Guides
DocumentationLog In

Fields

IDs and referencing other objects

All resource IDs are represented in UUID format. Together with IDs, all resources have also a resource field which represents the resource type and resource_path for the location under api.coinbase.com. These values can be useful when building wrappers around the API or when linking to other resources.

{
  "id": "2bbf394c-193b-5b2a-9155-3b4732659ede",
  ...
  "resource": "account",
  "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede"
}

Money hash

Money values are represented by a hash object which contains amount and currency fields. Amount is always returned as a string which you should be careful when parsing to have correct decimal precision. Bitcoin, Bitcoin Cash, Litecoin and Ethereum values will have 8 decimal points and fiat currencies will have two.

{
    "amount": "39.59000000",
    "currency": "BTC"
}

Timestamps

All timestamp are returned in ISO8601 format in UTC with fields ending in postfix _at. Example: "created_at": "2015-07-01T00:55:47Z"

Enumerable values

Some fields like type usually have a constant set of values. As Coinbase is actively growing and adding features, new values can be added or removed over time and you should take this into account when designing implementation. A good example is the Transaction resource which has multiple type values and new ones are added as new features are added to Coinbase.

Lists

Similar to enumerable values, list values can be added or removed over time. Instead of hardcoding for specific values, your implementation should be flexible enough to take these requirements into account.