api-reference/openapi.json. Once the API is open, it serves the same spec itself at https://api.hashlock.markets/v1/openapi.json, with an interactive reference at https://api.hashlock.markets/v1/docs.
Servers
All paths start with
/v1. The maker feed is a WebSocket at wss://<host>/v1/ws.
Authentication
Send an API key on every call exceptGET /v1/keys/nonce and POST /v1/keys:
X-Api-Key: hk_test_... is accepted too. A missing key returns 401; an invalid, revoked or expired one returns 401; a key without the needed scope returns 403.
Get a key at /developers, or mint one with a wallet signature. See API keys.
Conventions
- Amounts are base-unit integer strings.
- Errors are
{ "error": "<message>" }. - Pagination: list endpoints take
?limit=(up to 100, default 20) and?cursor=, and returnnextCursor(nullon the last page). - Idempotency: send
Idempotency-Keyon POSTs. See Rate limits and idempotency. - Rate limits:
RateLimit-*headers on every response;429withRetry-Afterwhen over.