Generate crypto address
curl --request POST \
--url https://api.exchange.coinbase.com/coinbase-accounts/{account_id}/addresses \
--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 '
{
"account_id": "<string>",
"profile_id": "<string>",
"network": "<string>"
}
'import requests
url = "https://api.exchange.coinbase.com/coinbase-accounts/{account_id}/addresses"
payload = {
"account_id": "<string>",
"profile_id": "<string>",
"network": "<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({account_id: '<string>', profile_id: '<string>', network: '<string>'})
};
fetch('https://api.exchange.coinbase.com/coinbase-accounts/{account_id}/addresses', 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/coinbase-accounts/{account_id}/addresses",
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([
'account_id' => '<string>',
'profile_id' => '<string>',
'network' => '<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/coinbase-accounts/{account_id}/addresses"
payload := strings.NewReader("{\n \"account_id\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"network\": \"<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/coinbase-accounts/{account_id}/addresses")
.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 \"account_id\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"network\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exchange.coinbase.com/coinbase-accounts/{account_id}/addresses")
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 \"account_id\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"network\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "fc9fed1e-d25b-54d8-b52b-7fa250c9ae2d",
"address": 1.2165647733617772e+48,
"address_info": {
"address": 1.2165647733617772e+48
},
"name": "New exchange deposit address",
"created_at": "2020-03-31T02:38:44.000Z",
"updated_at": "2020-03-31T02:38:44.000Z",
"network": "ethereum",
"uri_scheme": "ethereum",
"resource": "address",
"resource_path": "/v2/accounts/faf4b657-a48c-56b2-bec2-77567e3f4f97/addresses/fc9fed1e-d25b-54d8-b52b-7fa250c9ae2d",
"warnings": [
{
"title": "Only send Orchid (OXT) to this address",
"details": "Sending any other digital asset, including Ethereum (ETH), will result in permanent loss.",
"image_url": "https://dynamic-assets.coinbase.com/22b24ad9886150535671f158ccb0dd9d12089803728551c998e17e0f503484e9c38f3e8735354b5e622753684f040488b08d55b8ef5fef51592680f0c572bdfe/asset_icons/023010d790b9b1f47bc285802eafeab3d83c4de2029fe808d59935fbc54cdd7c.png"
}
],
"deposit_uri": "ethereum:0x4575f41308ec1483f3d399aa9a2826d74da13deb/transfer?address=0xd518A6B23D8bCA15B9cC46a00Be8a818E34Ca79E",
"exchange_deposit_address": true
}{
"message": "<string>"
}{
"message": "<string>"
}Coinbase Accounts
Generate crypto address
Generates a one-time crypto address for depositing crypto.
POST
/
coinbase-accounts
/
{account_id}
/
addresses
Generate crypto address
curl --request POST \
--url https://api.exchange.coinbase.com/coinbase-accounts/{account_id}/addresses \
--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 '
{
"account_id": "<string>",
"profile_id": "<string>",
"network": "<string>"
}
'import requests
url = "https://api.exchange.coinbase.com/coinbase-accounts/{account_id}/addresses"
payload = {
"account_id": "<string>",
"profile_id": "<string>",
"network": "<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({account_id: '<string>', profile_id: '<string>', network: '<string>'})
};
fetch('https://api.exchange.coinbase.com/coinbase-accounts/{account_id}/addresses', 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/coinbase-accounts/{account_id}/addresses",
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([
'account_id' => '<string>',
'profile_id' => '<string>',
'network' => '<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/coinbase-accounts/{account_id}/addresses"
payload := strings.NewReader("{\n \"account_id\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"network\": \"<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/coinbase-accounts/{account_id}/addresses")
.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 \"account_id\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"network\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exchange.coinbase.com/coinbase-accounts/{account_id}/addresses")
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 \"account_id\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"network\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "fc9fed1e-d25b-54d8-b52b-7fa250c9ae2d",
"address": 1.2165647733617772e+48,
"address_info": {
"address": 1.2165647733617772e+48
},
"name": "New exchange deposit address",
"created_at": "2020-03-31T02:38:44.000Z",
"updated_at": "2020-03-31T02:38:44.000Z",
"network": "ethereum",
"uri_scheme": "ethereum",
"resource": "address",
"resource_path": "/v2/accounts/faf4b657-a48c-56b2-bec2-77567e3f4f97/addresses/fc9fed1e-d25b-54d8-b52b-7fa250c9ae2d",
"warnings": [
{
"title": "Only send Orchid (OXT) to this address",
"details": "Sending any other digital asset, including Ethereum (ETH), will result in permanent loss.",
"image_url": "https://dynamic-assets.coinbase.com/22b24ad9886150535671f158ccb0dd9d12089803728551c998e17e0f503484e9c38f3e8735354b5e622753684f040488b08d55b8ef5fef51592680f0c572bdfe/asset_icons/023010d790b9b1f47bc285802eafeab3d83c4de2029fe808d59935fbc54cdd7c.png"
}
],
"deposit_uri": "ethereum:0x4575f41308ec1483f3d399aa9a2826d74da13deb/transfer?address=0xd518A6B23D8bCA15B9cC46a00Be8a818E34Ca79E",
"exchange_deposit_address": true
}{
"message": "<string>"
}{
"message": "<string>"
}InfoYou can generate an address for crypto deposits. See the Coinbase Accounts section for information on how to retrieve your coinbase account ID.
API Key Permissions
This endpoint requires the “transfer” permission. API key must belong to default profile.Authorizations
Path Parameters
Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I