Skip to main content

Wallet API: Accounts

Deprecating Select Wallet and Account APIs on Feb 15

On February 15, 2024, the following Sign in with Coinbase v2 APIs are being deprecated:

Available workarounds:

Table of Endpoints​

NameMethodEndpointLegacy ScopeCDP API Key Scope
Create WalletGET/v2/accounts/{asset-id}wallet:accounts:createNot supported (deprecated)
List AccountsGET/v2/accountswallet:accounts:readview
Show AccountGET/v2/accounts/:account_idwallet:accounts:readview
Update AccountPUT/v2/accounts/:account_idwallet:accounts:updateNot supported (deprecated)
Delete AccountDELETE/v2/accounts/:account_idwallet:accounts:deleteNot supported (deprecated)

Overview​

The Account resource represents all of a user's accounts, including cryptocurrency wallets, fiat currency accounts, and vaults. This is represented in the type field. New types may be added in the future, so make sure this won't break your implementation.

User can only have one primary account and its type can only be wallet.

ParameterDescription
id stringResource ID
name stringUser or system defined name
primary booleanPrimary account (or not)
type string, enumerableAccount's type. Valid values: wallet, fiat, vault
currency hashAccount's currency
balance money hashCrypto balance
created_at timestamp
updated_at timestamp
resource string, constant account
resource_path string

Account Resource​

{
"id": "2bbf394c-193b-5b2a-9155-3b4732659ede",
"name": "My Wallet",
"primary": true,
"type": "wallet",
"currency" : {
"address_regex" : "^([13][a-km-zA-HJ-NP-Z1-9]{25,34})|^(bc1[qzry9x8gf2tvdw0s3jn54khce6mua7l]([qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}|[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{58}))$",
"asset_id" : "5b71fc48-3dd3-540c-809b-f8c94d0e68b5",
"code" : "BTC",
"color" : "#F7931A",
"exponent" : 8,
"name" : "Bitcoin",
"slug" : "bitcoin",
"sort_index" : 100,
"type" : "crypto"
}
"balance": {
"amount": "39.59000000",
"currency": "BTC"
},
"created_at": "2024-01-31T20:49:02Z",
"updated_at": "2024-01-31T20:49:02Z",
"resource": "account",
"resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede"
}

Create Wallet (Deprecated)​

Create new wallet.

HTTP request​

GET https://api.coinbase.com/v2/accounts/{asset-id}

Scopes​

  • wallet:accounts:create

Examples​

Request​

curl --location --request GET 'https://api.coinbase.com/v2/accounts/LTC' \
--header 'CB-ACCESS-KEY:<key>' \
--header 'CB-ACCESS-SIGN: <hash>' \
--header 'CB-ACCESS-TIMESTAMP: 1665694716' \
--header 'CB-VERSION: 2022-05-07'

Response (200)​

{
"data": {
"id": "f5d0397a-0e0b-5c00-8fcc-b5e9fea21b0b",
"name": "LTC Wallet",
"primary": true,
"type": "wallet",
"currency": {
"code": "LTC",
"name": "Litecoin",
"color": "#A6A9AA",
"sort_index": 104,
"exponent": 8,
"type": "crypto",
"address_regex": "^((L|M)[a-km-zA-HJ-NP-Z1-9]{25,34})|^(ltc1([qpzry9x8gf2tvdw0s3jn54khce6mua7l]{39}|[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{59}))$",
"asset_id": "c9c24c6e-c045-5fde-98a2-00ea7f520437",
"slug": "litecoin"
},
"balance": {
"amount": "0.00000000",
"currency": "LTC"
},
"created_at": "2022-10-13T21:07:04Z",
"updated_at": "2022-10-13T21:07:04Z",
"resource": "account",
"resource_path": "/v2/accounts/f5d0397a-0e0b-5c00-8fcc-b5e9fea21b0b",
"allow_deposits": true,
"allow_withdrawals": true
}
}

List Accounts​

List a current user's accounts to which the authentication method has access to.

HTTP Request​

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

Scopes​

  • wallet:accounts:read

Examples​

Request​

curl https://api.coinbase.com/v2/accounts \
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'

Response​

{
"pagination": {
"ending_before": null,
"starting_after": null,
"limit": 25,
"order": "desc",
"previous_uri": null,
"next_uri": null
},
"data": [
{
"id": "58542935-67b5-56e1-a3f9-42686e07fa40",
"name": "My Vault",
"primary": false,
"type": "vault",
"currency" : {
"address_regex" : "^([13][a-km-zA-HJ-NP-Z1-9]{25,34})|^(bc1[qzry9x8gf2tvdw0s3jn54khce6mua7l]([qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}|[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{58}))$",
"asset_id" : "5b71fc48-3dd3-540c-809b-f8c94d0e68b5",
"code" : "BTC",
"color" : "#F7931A",
"exponent" : 8,
"name" : "Bitcoin",
"slug" : "bitcoin",
"sort_index" : 100,
"type" : "crypto"
}
"balance": {
"amount": "4.00000000",
"currency": "BTC"
},
"created_at": "2024-01-31T20:49:02Z",
"updated_at": "2024-01-31T20:49:02Z",
"resource": "account",
"resource_path": "/v2/accounts/58542935-67b5-56e1-a3f9-42686e07fa40",
"ready": true
},
{
"id": "2bbf394c-193b-5b2a-9155-3b4732659ede",
"name": "My Wallet",
"primary": true,
"type": "wallet",
"currency" : {
"address_regex" : "^([13][a-km-zA-HJ-NP-Z1-9]{25,34})|^(bc1[qzry9x8gf2tvdw0s3jn54khce6mua7l]([qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}|[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{58}))$",
"asset_id" : "5b71fc48-3dd3-540c-809b-f8c94d0e68b5",
"code" : "BTC",
"color" : "#F7931A",
"exponent" : 8,
"name" : "Bitcoin",
"slug" : "bitcoin",
"sort_index" : 100,
"type" : "crypto"
}
"balance": {
"amount": "39.59000000",
"currency": "BTC"
},
"created_at": "2024-01-31T20:49:02Z",
"updated_at": "2024-01-31T20:49:02Z",
"resource": "account",
"resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede"
}
]
}

Show Account​

Show (or get) a current user's account. To access the primary account for a given currency, a currency string (e.g., BTC or ETH) can be used instead of the account ID in the URL.

HTTP Request​

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

Scopes​

  • wallet:accounts:read

Examples​

Request​

curl https://api.coinbase.com/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede \
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'

Response​

{
"data": {
"id": "2bbf394c-193b-5b2a-9155-3b4732659ede",
"name": "My Wallet",
"primary": true,
"type": "wallet",
"currency" : {
"address_regex" : "^([13][a-km-zA-HJ-NP-Z1-9]{25,34})|^(bc1[qzry9x8gf2tvdw0s3jn54khce6mua7l]([qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}|[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{58}))$",
"asset_id" : "5b71fc48-3dd3-540c-809b-f8c94d0e68b5",
"code" : "BTC",
"color" : "#F7931A",
"exponent" : 8,
"name" : "Bitcoin",
"slug" : "bitcoin",
"sort_index" : 100,
"type" : "crypto"
}
"balance": {
"amount": "39.59000000",
"currency": "BTC"
},
"created_at": "2024-01-31T20:49:02Z",
"updated_at": "2024-01-31T20:49:02Z",
"resource": "account",
"resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede"
}
}

Update Account (Deprecated)​

Modify a user's account.

HTTP Request​

PUT https://api.coinbase.com/v2/accounts/:account_id

Scopes​

  • wallet:accounts:update

Arguments​

ParameterTypeRequiredDescription
namestringOptionalAccount name

Examples​

Request​

curl https://api.coinbase.com/v2/accounts/82de7fcd-db72-5085-8ceb-bee19303080b \
-X PUT
-H 'Content-Type: application/json'
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'
-d '{"name": "New account name"}'

Response (200)​

{
"data": {
"id": "82de7fcd-db72-5085-8ceb-bee19303080b",
"name": "New account name",
"primary": false,
"type": "wallet",
"currency" : {
"address_regex" : "^([13][a-km-zA-HJ-NP-Z1-9]{25,34})|^(bc1[qzry9x8gf2tvdw0s3jn54khce6mua7l]([qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}|[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{58}))$",
"asset_id" : "5b71fc48-3dd3-540c-809b-f8c94d0e68b5",
"code" : "BTC",
"color" : "#F7931A",
"exponent" : 8,
"name" : "Bitcoin",
"slug" : "bitcoin",
"sort_index" : 100,
"type" : "crypto"
}
"balance": {
"amount": "0.00000000",
"currency": "BTC"
},
"created_at": "2023-03-31T15:21:58-07:00",
"updated_at": "2023-03-31T15:21:58-07:00",
"resource": "account",
"resource_path": "/v2/accounts/82de7fcd-db72-5085-8ceb-bee19303080b"
}
}

Delete Account (Deprecated)​

Remove a user's account. You cannot remove:

  • Primary accounts
  • Accounts with non-zero balance
  • Fiat accounts
  • Vaults with a pending withdrawal

HTTP Request​

DELETE https://api.coinbase.com/v2/accounts/:account_id

Scopes​

  • wallet:accounts:delete

Examples​

Request​

curl https://api.coinbase.com/v2/accounts/82de7fcd-db72-5085-8ceb-bee19303080b \
-X DELETE
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'

Response (204 No Content)​

Was this helpful?