Permission | Description |
---|---|
View | Key has read permissions for all endpoints (including GET) |
Transfer | Key can transfer value for accounts, including deposits/withdrawals (and bypasses 2FA) |
Trade | Key can post orders and get data |
Manage | Key can manage user settings and preferences such as address books entries |
Header | Description |
---|---|
CB-ACCESS-KEY | API key as a string |
CB-ACCESS-SIGN | base64-encoded signature (see Signing a Message) |
CB-ACCESS-TIMESTAMP | Timestamp for your request |
CB-ACCESS-PASSPHRASE | Passphrase you specified when creating the API key |
application/json
and be valid JSON.
CB-ACCESS-TIMESTAMP
header MUST be number of seconds since Unix Epoch in UTC. Decimal values are allowed.
Your timestamp must be within 30 seconds of the API service time or your request is considered expired and rejected. We recommend using the time endpoint to query for the API server time if you believe there is a time difference between your server and the API servers.
CB-ACCESS-SIGN
header is generated by creating a sha256 HMAC using the base64-decoded secret key on the prehash string timestamp + method + requestPath + body
(where +
represents string concatenation) and base64-encode the output.
timestamp
is the same as the CB-ACCESS-TIMESTAMP
header.
method
should be UPPER CASE e.g., GET
or POST
.
requestPath
should only include the path of the API endpoint.
body
is the request body string or omitted if there is no request body (typically for GET
requests).