Skip to main content
Every endpoint accepts one of two credentials. The server picks the scheme from the APIKEY header: a request carrying it is verified as HMAC and never retried as a session, even if the signature is bad.
In the API playground on this site, authenticate with a session token from POST /auth/login. The HMAC scheme signs the exact request bytes and cannot be computed by the playground.

Session tokens

Exchange an email and password for a JWT:
Send it as a bearer token. Sessions carry every scope (read, trade, and withdraw), or only read for view-only accounts. See Scopes.

API keys

Mint a key from a session:
Store the secret now: the response is the only time it is returned. A key carries the scopes you name when minting it, up to your session’s own, and they never change. To check a key, send a signed GET /auth/whoami. It needs no scope and returns the key’s api_key_id, the user_id that owns it, and its scopes.

Scopes

Signing requests

Each HMAC request sends three headers: The canonical message is:
Three details matter:
  1. PATH_AND_QUERY is the full request target including the query string: /rfq/quote?request_id=..., not /rfq/quote. Every GET endpoint takes its parameters from the query string, so they are inside the signature.
  2. BODY is the exact raw bytes you transmit. Sign the serialized string you send, not a re-serialization. For bodyless requests (GETs, DELETEs without a payload) the body segment is empty; the message still ends with the third \n.
  3. The timestamp must be within ±30 seconds of server time, which also limits the replay window.

Failure modes

A common cause of 401 is signing path while sending path?query, or letting an HTTP client re-serialize the JSON body after signing.

Websocket tickets

Websocket connections authenticate with a 30-second ticket from POST /auth/ws-ticket (session, read only) or POST /auth/ws-ticket/signed (API key, the key’s scopes). See Websockets.