Open new loan
curl --request POST \
--url https://api.exchange.coinbase.com/loans/open \
--header 'Content-Type: application/json' \
--header 'cb-access-key: <api-key>' \
--header 'cb-access-passphrase: <api-key>' \
--header 'cb-access-sign: <api-key>' \
--header 'cb-access-timestamp: <api-key>' \
--data '
{
"loan_id": "<string>",
"currency": "<string>",
"native_amount": "<string>",
"interest_rate": "<string>",
"term_start_date": "2023-11-07T05:31:56Z",
"term_end_date": "2023-11-07T05:31:56Z",
"profile_id": "<string>"
}
'import requests
url = "https://api.exchange.coinbase.com/loans/open"
payload = {
"loan_id": "<string>",
"currency": "<string>",
"native_amount": "<string>",
"interest_rate": "<string>",
"term_start_date": "2023-11-07T05:31:56Z",
"term_end_date": "2023-11-07T05:31:56Z",
"profile_id": "<string>"
}
headers = {
"cb-access-key": "<api-key>",
"cb-access-passphrase": "<api-key>",
"cb-access-sign": "<api-key>",
"cb-access-timestamp": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'cb-access-key': '<api-key>',
'cb-access-passphrase': '<api-key>',
'cb-access-sign': '<api-key>',
'cb-access-timestamp': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
loan_id: '<string>',
currency: '<string>',
native_amount: '<string>',
interest_rate: '<string>',
term_start_date: '2023-11-07T05:31:56Z',
term_end_date: '2023-11-07T05:31:56Z',
profile_id: '<string>'
})
};
fetch('https://api.exchange.coinbase.com/loans/open', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exchange.coinbase.com/loans/open",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'loan_id' => '<string>',
'currency' => '<string>',
'native_amount' => '<string>',
'interest_rate' => '<string>',
'term_start_date' => '2023-11-07T05:31:56Z',
'term_end_date' => '2023-11-07T05:31:56Z',
'profile_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"cb-access-key: <api-key>",
"cb-access-passphrase: <api-key>",
"cb-access-sign: <api-key>",
"cb-access-timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exchange.coinbase.com/loans/open"
payload := strings.NewReader("{\n \"loan_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"native_amount\": \"<string>\",\n \"interest_rate\": \"<string>\",\n \"term_start_date\": \"2023-11-07T05:31:56Z\",\n \"term_end_date\": \"2023-11-07T05:31:56Z\",\n \"profile_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cb-access-key", "<api-key>")
req.Header.Add("cb-access-passphrase", "<api-key>")
req.Header.Add("cb-access-sign", "<api-key>")
req.Header.Add("cb-access-timestamp", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exchange.coinbase.com/loans/open")
.header("cb-access-key", "<api-key>")
.header("cb-access-passphrase", "<api-key>")
.header("cb-access-sign", "<api-key>")
.header("cb-access-timestamp", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"loan_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"native_amount\": \"<string>\",\n \"interest_rate\": \"<string>\",\n \"term_start_date\": \"2023-11-07T05:31:56Z\",\n \"term_end_date\": \"2023-11-07T05:31:56Z\",\n \"profile_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exchange.coinbase.com/loans/open")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cb-access-key"] = '<api-key>'
request["cb-access-passphrase"] = '<api-key>'
request["cb-access-sign"] = '<api-key>'
request["cb-access-timestamp"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"loan_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"native_amount\": \"<string>\",\n \"interest_rate\": \"<string>\",\n \"term_start_date\": \"2023-11-07T05:31:56Z\",\n \"term_end_date\": \"2023-11-07T05:31:56Z\",\n \"profile_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"loan": {
"id": "<string>",
"currency": "<string>",
"principal_amount": "<string>",
"outstanding_principal_amount": "<string>",
"interest_rate": "<string>",
"interest_currency": "<string>",
"status": "loan_pending",
"effective_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z",
"term_start_date": "2023-11-07T05:31:56Z",
"term_end_date": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}Loan
Open new loan
This API triggers a loan open request. Funding is not necessarily instantaneous and there is no SLA. You are notified when funds have settled in your Exchange account. Loan open requests, once initiated, cannot be canceled.
POST
/
loans
/
open
Open new loan
curl --request POST \
--url https://api.exchange.coinbase.com/loans/open \
--header 'Content-Type: application/json' \
--header 'cb-access-key: <api-key>' \
--header 'cb-access-passphrase: <api-key>' \
--header 'cb-access-sign: <api-key>' \
--header 'cb-access-timestamp: <api-key>' \
--data '
{
"loan_id": "<string>",
"currency": "<string>",
"native_amount": "<string>",
"interest_rate": "<string>",
"term_start_date": "2023-11-07T05:31:56Z",
"term_end_date": "2023-11-07T05:31:56Z",
"profile_id": "<string>"
}
'import requests
url = "https://api.exchange.coinbase.com/loans/open"
payload = {
"loan_id": "<string>",
"currency": "<string>",
"native_amount": "<string>",
"interest_rate": "<string>",
"term_start_date": "2023-11-07T05:31:56Z",
"term_end_date": "2023-11-07T05:31:56Z",
"profile_id": "<string>"
}
headers = {
"cb-access-key": "<api-key>",
"cb-access-passphrase": "<api-key>",
"cb-access-sign": "<api-key>",
"cb-access-timestamp": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'cb-access-key': '<api-key>',
'cb-access-passphrase': '<api-key>',
'cb-access-sign': '<api-key>',
'cb-access-timestamp': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
loan_id: '<string>',
currency: '<string>',
native_amount: '<string>',
interest_rate: '<string>',
term_start_date: '2023-11-07T05:31:56Z',
term_end_date: '2023-11-07T05:31:56Z',
profile_id: '<string>'
})
};
fetch('https://api.exchange.coinbase.com/loans/open', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exchange.coinbase.com/loans/open",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'loan_id' => '<string>',
'currency' => '<string>',
'native_amount' => '<string>',
'interest_rate' => '<string>',
'term_start_date' => '2023-11-07T05:31:56Z',
'term_end_date' => '2023-11-07T05:31:56Z',
'profile_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"cb-access-key: <api-key>",
"cb-access-passphrase: <api-key>",
"cb-access-sign: <api-key>",
"cb-access-timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exchange.coinbase.com/loans/open"
payload := strings.NewReader("{\n \"loan_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"native_amount\": \"<string>\",\n \"interest_rate\": \"<string>\",\n \"term_start_date\": \"2023-11-07T05:31:56Z\",\n \"term_end_date\": \"2023-11-07T05:31:56Z\",\n \"profile_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cb-access-key", "<api-key>")
req.Header.Add("cb-access-passphrase", "<api-key>")
req.Header.Add("cb-access-sign", "<api-key>")
req.Header.Add("cb-access-timestamp", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exchange.coinbase.com/loans/open")
.header("cb-access-key", "<api-key>")
.header("cb-access-passphrase", "<api-key>")
.header("cb-access-sign", "<api-key>")
.header("cb-access-timestamp", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"loan_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"native_amount\": \"<string>\",\n \"interest_rate\": \"<string>\",\n \"term_start_date\": \"2023-11-07T05:31:56Z\",\n \"term_end_date\": \"2023-11-07T05:31:56Z\",\n \"profile_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exchange.coinbase.com/loans/open")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cb-access-key"] = '<api-key>'
request["cb-access-passphrase"] = '<api-key>'
request["cb-access-sign"] = '<api-key>'
request["cb-access-timestamp"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"loan_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"native_amount\": \"<string>\",\n \"interest_rate\": \"<string>\",\n \"term_start_date\": \"2023-11-07T05:31:56Z\",\n \"term_end_date\": \"2023-11-07T05:31:56Z\",\n \"profile_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"loan": {
"id": "<string>",
"currency": "<string>",
"principal_amount": "<string>",
"outstanding_principal_amount": "<string>",
"interest_rate": "<string>",
"interest_currency": "<string>",
"status": "loan_pending",
"effective_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z",
"term_start_date": "2023-11-07T05:31:56Z",
"term_end_date": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}Coinbase Exchange Loans ProgramSee Coinbase Exchange Loans Program for program details including qualification criteria and sample terms.
CautionThe lending rate limit is 10 RPS per profile.
Authorizations
Body
application/json
Response
A successful response.
Show child attributes
Show child attributes
Was this page helpful?
⌘I