APIKEY header: a request carrying it is verified as HMAC and never retried
as a session, even if the signature is bad.
Session tokens
Exchange an email and password for a JWT:read, trade, and
withdraw), or only read for view-only accounts. See Scopes.
API keys
Mint a key from a session: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:
PATH_AND_QUERYis 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.BODYis 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.- 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 fromPOST /auth/ws-ticket (session, read only) or POST /auth/ws-ticket/signed
(API key, the key’s scopes). See Websockets.