HMAC Authentication
This page describes API request authentication. It is not wallet signing. Every private endpoint request must include an HMAC value in x-api-sign.
Authentication payload
Five lines joined by \n:
METHOD
URI
TIMESTAMP
NONCE
RAW_BODYMETHOD
Uppercase HTTP method.
URI
Path with sorted query string. No domain or context path.
TIMESTAMP
Same as x-api-ts (ms).
NONCE
Same as x-api-nonce.
RAW_BODY
Raw body string, or empty if none.
Query string sorting
Parameters sorted by name ascending. Example request:
GET /api/v1/orders?page=1&limit=10Authenticated URI:
Avoid duplicate query parameter names when building the authentication payload.
Body authentication
JSON requests use Content-Type: application/json. RAW_BODY must match the sent body exactly (spaces, field order).
GET and bodyless POST use empty RAW_BODY.
HMAC-SHA256
UTF-8 encoding throughout.
Python
cURL
cURL + openssl works for a quick check, but shell HMAC has sharp edges (trailing-newline stripping by $(...), secrets starting with -, date +%s%3N on macOS/BSD, PATH clobbering). For production, prefer the Python example above or the Node crypto version in examples.md.
Last updated

