Guides
DocumentationLog In

Addresses

Address resource

The Address resource represents an address for any Coinbase supported asset. An account can have more than one address, but an address can only be associated with one account.

To be notified when an address receives a new transactions, you can set up an API notification.

ParameterDescription
id stringResource ID
address stringAddress for any Coinbase supported asset
name string, optionalUser defined label for the address
network stringName of blockchain
created_at timestamp
updated_at timestamp
resource string, constant address
resource_path string

Example address resource

{
  "id": "dd3183eb-af1d-5f5d-a90d-cbff946435ff",
  "address": "mswUGcPHp1YnkLCgF1TtoryqSc5E9Q8xFa",
  "name": "One off payment",
  "created_at": "2015-01-31T20:49:02Z",
  "updated_at": "2015-03-31T17:25:29-07:00",
  "network": "bitcoin",
  "resource": "address",
  "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/addresses/dd3183eb-af1d-5f5d-a90d-cbff946435ff"
}

List addresses

Lists addresses for an account.

🚧

An address can only be associated with one account. See Create Address to create new addresses.

HTTP Request

GET https://api.coinbase.com/v2/accounts/:account_id/addresses

Scopes

  • wallet:addresses:read

Example request

curl https://api.coinbase.com/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/addresses \
  -H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'
require 'coinbase/wallet'
client = Coinbase::Wallet::Client.new(api_key: <api key>, api_secret: <api secret>)

addresses = client.addresses('2bbf394c-193b-5b2a-9155-3b4732659ede')
from coinbase.wallet.client import Client
client = Client(<api_key>, <api_secret>)

addresses = client.get_addresses('2bbf394c-193b-5b2a-9155-3b4732659ede')
var Client = require('coinbase').Client;

var client = new Client({'apiKey': 'API KEY',
                         'apiSecret': 'API SECRET'});

client.getAccount('82de7fcd-db72-5085-8ceb-bee19303080b', function(err, account) {
  account.getAddresses(function(err, addresses) {
    console.log(addresses);
  });
});

Example response

{
  "pagination": {
    "ending_before": null,
    "starting_after": null,
    "limit": 25,
    "order": "desc",
    "previous_uri": null,
    "next_uri": null
  },
  "data": [
    {
      "id": "dd3183eb-af1d-5f5d-a90d-cbff946435ff",
      "address": "mswUGcPHp1YnkLCgF1TtoryqSc5E9Q8xFa",
      "name": null,
      "created_at": "2015-01-31T20:49:02Z",
      "updated_at": "2015-03-31T17:25:29-07:00",
      "network": "bitcoin",
      "resource": "address",
      "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/addresses/dd3183eb-af1d-5f5d-a90d-cbff946435ff"
    },
    {
      "id": "ac5c5f15-0b1d-54f5-8912-fecbf66c2a64",
      "address": "mgSvu1z1amUFAPkB4cUg8ujaDxKAfZBt5Q",
      "name": null,
      "created_at": "2015-03-31T17:23:52-07:00",
      "updated_at": "2015-01-31T20:49:02Z",
      "network": "bitcoin",
      "resource": "address",
      "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/addresses/ac5c5f15-0b1d-54f5-8912-fecbf66c2a64"
    }
  ]
}

Show Addresss

Get an single address for an account. A regular cryptocurrency address can be used in place of address_id but the address must be associated with the correct account.

🚧

An address can only be associated with one account. See Create Address to create new addresses.

HTTP Request

GET https://api.coinbase.com/v2/accounts/:account_id/addresses/:address_id

Scopes

  • wallet:addresses:read

Example request

curl https://api.coinbase.com/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/addresses/dd3183eb-af1d-5f5d-a90d-cbff946435ff \
  -H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'
require 'coinbase/wallet'
client = Coinbase::Wallet::Client.new(api_key: <api key>, api_secret: <api secret>)

address = client.address('2bbf394c-193b-5b2a-9155-3b4732659ede', 'dd3183eb-af1d-5f5d-a90d-cbff946435ff')
from coinbase.wallet.client import Client
client = Client(<api_key>, <api_secret>)

address = client.get_address('2bbf394c-193b-5b2a-9155-3b4732659ede', 'dd3183eb-af1d-5f5d-a90d-cbff946435ff')
var Client = require('coinbase').Client;

var client = new Client({'apiKey': 'API KEY',
                         'apiSecret': 'API SECRET'});

client.getAccount('82de7fcd-db72-5085-8ceb-bee19303080b', function(err, account) {
  account.getAddress('dd3183eb-af1d-5f5d-a90d-cbff946435ff', function(err, address) {
    console.log(address);
  });
});

Example response

{
  "data": {
    "id": "dd3183eb-af1d-5f5d-a90d-cbff946435ff",
    "address": "mswUGcPHp1YnkLCgF1TtoryqSc5E9Q8xFa",
    "name": null,
    "callback_url": null,
    "created_at": "2015-01-31T20:49:02Z",
    "updated_at": "2015-03-31T17:25:29-07:00",
    "network": "bitcoin",
    "resource": "address",
    "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/addresses/dd3183eb-af1d-5f5d-a90d-cbff946435ff/"
  }
}

List Transactions

List transactions that have been sent to a specific address. A regular cryptocurrency address can be used in place of address_id but the address must be associated with the correct account.

HTTP Request

GET https://api.coinbase.com/v2/accounts/:account_id/addresses/:address_id/transactions

Scopes

  • wallet:transactions:read

Example request

curl https://api.coinbase.com/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/addresses/dd3183eb-af1d-5f5d-a90d-cbff946435ff/transactions \
  -H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'
require 'coinbase/wallet'
client = Coinbase::Wallet::Client.new(api_key: <api key>, api_secret: <api secret>)

txs = client.address_transactions('2bbf394c-193b-5b2a-9155-3b4732659ede', 'dd3183eb-af1d-5f5d-a90d-cbff946435ff')
from coinbase.wallet.client import Client
client = Client(<api_key>, <api_secret>)

txs = client.get_address_transactions('2bbf394c-193b-5b2a-9155-3b4732659ede', 'dd3183eb-af1d-5f5d-a90d-cbff946435ff')
var Client = require('coinbase').Client;

var client = new Client({'apiKey': 'API KEY',
                         'apiSecret': 'API SECRET'});

client.getAccount('82de7fcd-db72-5085-8ceb-bee19303080b', function(err, account) {
  account.getAddress('dd3183eb-af1d-5f5d-a90d-cbff946435ff', function(err, address) {
    console.log(address);
    address.getTransactions({}, function(err, txs) {
      console.log(txs);
    });
  });
});

Example response

{
  "pagination": {
    "ending_before": null,
    "starting_after": null,
    "limit": 25,
    "order": "desc",
    "previous_uri": null,
    "next_uri": null
  },
  "data": [
    {
      "id": "57ffb4ae-0c59-5430-bcd3-3f98f797a66c",
      "type": "send",
      "status": "completed",
      "amount": {
        "amount": "0.00100000",
        "currency": "BTC"
      },
      "native_amount": {
        "amount": "0.01",
        "currency": "USD"
      },
      "description": null,
      "created_at": "2015-03-11T13:13:35-07:00",
      "updated_at": "2015-03-26T15:55:43-07:00",
      "resource": "transaction",
      "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/transactions/57ffb4ae-0c59-5430-bcd3-3f98f797a66c",
      "network": {
        "status": "off_blockchain",
        "name": "bitcoin"
      },
      "from": {
        "id": "a6b4c2df-a62c-5d68-822a-dd4e2102e703",
        "resource": "user"
      }
    }
  ]
}

Create Address

Creates a new address for an account. Addresses can be created for wallet account types.

πŸ‘

You can create an address with an empty POST request as all arguments are optional. This is handy if you need to create new receive addresses for an account on-demand.

HTTP Request

POST https://api.coinbase.com/v2/accounts/:account_id/addresses

Scopes

  • wallet:addresses:create

Arguments

ParameterTypeRequiredDescription
namestringOptionalAddress label

Example request

curl https://api.coinbase.com/v2/accounts/82de7fcd-db72-5085-8ceb-bee19303080b/addresses \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c' \
  -d '{"name": "New receive address"}'
}
require 'coinbase/wallet'
client = Coinbase::Wallet::Client.new(api_key: <api key>, api_secret: <api secret>)

address = client.create_address('2bbf394c-193b-5b2a-9155-3b4732659ede')
from coinbase.wallet.client import Client
client = Client(<api_key>, <api_secret>)

address = client.create_address('2bbf394c-193b-5b2a-9155-3b4732659ede')
var Client = require('coinbase').Client;

var client = new Client({'apiKey': 'API KEY',
                         'apiSecret': 'API SECRET'});

client.getAccount('82de7fcd-db72-5085-8ceb-bee19303080b', function(err, account) {
  account.createAddress(null, function(err, address) {
    console.log(address);
  });
});

Response (201)

{
  "data": {
    "id": "dd3183eb-af1d-5f5d-a90d-cbff946435ff",
    "address": "mswUGcPHp1YnkLCgF1TtoryqSc5E9Q8xFa",
    "name": "New receive address",
    "created_at": "2015-01-31T20:49:02Z",
    "updated_at": "2015-03-31T17:25:29-07:00",
    "network": "bitcoin",
    "resource": "address",
    "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/addresses/dd3183eb-af1d-5f5d-a90d-cbff946435ff"
  }
}