Add addresses
curl --request POST \
--url https://api.exchange.coinbase.com/address-book \
--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 '
{
"addresses": [
{
"label": "my wallet",
"to": {
"address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk"
},
"currency": "BTC"
},
{
"label": "my XRP wallet",
"to": {
"address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
"destination_tag": "123"
},
"currency": "XRP"
}
]
}
'import requests
url = "https://api.exchange.coinbase.com/address-book"
payload = { "addresses": [
{
"label": "my wallet",
"to": { "address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk" },
"currency": "BTC"
},
{
"label": "my XRP wallet",
"to": {
"address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
"destination_tag": "123"
},
"currency": "XRP"
}
] }
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({
addresses: [
{
label: 'my wallet',
to: {address: '1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk'},
currency: 'BTC'
},
{
label: 'my XRP wallet',
to: {address: 'rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh', destination_tag: '123'},
currency: 'XRP'
}
]
})
};
fetch('https://api.exchange.coinbase.com/address-book', 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/address-book",
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([
'addresses' => [
[
'label' => 'my wallet',
'to' => [
'address' => '1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk'
],
'currency' => 'BTC'
],
[
'label' => 'my XRP wallet',
'to' => [
'address' => 'rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh',
'destination_tag' => '123'
],
'currency' => 'XRP'
]
]
]),
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/address-book"
payload := strings.NewReader("{\n \"addresses\": [\n {\n \"label\": \"my wallet\",\n \"to\": {\n \"address\": \"1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk\"\n },\n \"currency\": \"BTC\"\n },\n {\n \"label\": \"my XRP wallet\",\n \"to\": {\n \"address\": \"rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh\",\n \"destination_tag\": \"123\"\n },\n \"currency\": \"XRP\"\n }\n ]\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/address-book")
.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 \"addresses\": [\n {\n \"label\": \"my wallet\",\n \"to\": {\n \"address\": \"1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk\"\n },\n \"currency\": \"BTC\"\n },\n {\n \"label\": \"my XRP wallet\",\n \"to\": {\n \"address\": \"rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh\",\n \"destination_tag\": \"123\"\n },\n \"currency\": \"XRP\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exchange.coinbase.com/address-book")
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 \"addresses\": [\n {\n \"label\": \"my wallet\",\n \"to\": {\n \"address\": \"1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk\"\n },\n \"currency\": \"BTC\"\n },\n {\n \"label\": \"my XRP wallet\",\n \"to\": {\n \"address\": \"rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh\",\n \"destination_tag\": \"123\"\n },\n \"currency\": \"XRP\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"body": [
{
"id": "1",
"address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk",
"display_address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk",
"address_info": {
"address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk",
"display_address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk"
},
"currency": "BTC",
"label": "my wallet",
"address_booked": true,
"address_book_added_at": "2019-02-06T22:27:50.221Z"
}
]
}{
"message": "<string>"
}Address Book
Add addresses
Add new addresses to address book
POST
/
address-book
Add addresses
curl --request POST \
--url https://api.exchange.coinbase.com/address-book \
--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 '
{
"addresses": [
{
"label": "my wallet",
"to": {
"address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk"
},
"currency": "BTC"
},
{
"label": "my XRP wallet",
"to": {
"address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
"destination_tag": "123"
},
"currency": "XRP"
}
]
}
'import requests
url = "https://api.exchange.coinbase.com/address-book"
payload = { "addresses": [
{
"label": "my wallet",
"to": { "address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk" },
"currency": "BTC"
},
{
"label": "my XRP wallet",
"to": {
"address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
"destination_tag": "123"
},
"currency": "XRP"
}
] }
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({
addresses: [
{
label: 'my wallet',
to: {address: '1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk'},
currency: 'BTC'
},
{
label: 'my XRP wallet',
to: {address: 'rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh', destination_tag: '123'},
currency: 'XRP'
}
]
})
};
fetch('https://api.exchange.coinbase.com/address-book', 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/address-book",
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([
'addresses' => [
[
'label' => 'my wallet',
'to' => [
'address' => '1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk'
],
'currency' => 'BTC'
],
[
'label' => 'my XRP wallet',
'to' => [
'address' => 'rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh',
'destination_tag' => '123'
],
'currency' => 'XRP'
]
]
]),
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/address-book"
payload := strings.NewReader("{\n \"addresses\": [\n {\n \"label\": \"my wallet\",\n \"to\": {\n \"address\": \"1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk\"\n },\n \"currency\": \"BTC\"\n },\n {\n \"label\": \"my XRP wallet\",\n \"to\": {\n \"address\": \"rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh\",\n \"destination_tag\": \"123\"\n },\n \"currency\": \"XRP\"\n }\n ]\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/address-book")
.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 \"addresses\": [\n {\n \"label\": \"my wallet\",\n \"to\": {\n \"address\": \"1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk\"\n },\n \"currency\": \"BTC\"\n },\n {\n \"label\": \"my XRP wallet\",\n \"to\": {\n \"address\": \"rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh\",\n \"destination_tag\": \"123\"\n },\n \"currency\": \"XRP\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exchange.coinbase.com/address-book")
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 \"addresses\": [\n {\n \"label\": \"my wallet\",\n \"to\": {\n \"address\": \"1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk\"\n },\n \"currency\": \"BTC\"\n },\n {\n \"label\": \"my XRP wallet\",\n \"to\": {\n \"address\": \"rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh\",\n \"destination_tag\": \"123\"\n },\n \"currency\": \"XRP\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"body": [
{
"id": "1",
"address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk",
"display_address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk",
"address_info": {
"address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk",
"display_address": "1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk"
},
"currency": "BTC",
"label": "my wallet",
"address_booked": true,
"address_book_added_at": "2019-02-06T22:27:50.221Z"
}
]
}{
"message": "<string>"
}Authorizations
Body
application/json
List of addresses to add to the address book
Show child attributes
Show child attributes
Response
A successful response.
Show child attributes
Show child attributes
Was this page helpful?
⌘I