Skip to main content
The endpoint pages in this section are generated from the API’s OpenAPI spec, published with these docs as api-reference/openapi.json. The API 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, so the base URL is https://api.hashlock.markets/v1. The maker feed is a WebSocket at wss://api.hashlock.markets/v1/ws. The app’s host serves the same API at https://hashlock.markets/api/v1 (and the feed at wss://hashlock.markets/api/v1/ws). It is an alias with the same keys and the same rate budget; these docs use https://api.hashlock.markets/v1.

Authentication

Send an API key on every call except GET /v1/keys/nonce and POST /v1/keys:
X-Api-Key: hk_live_... 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 return nextCursor (null on the last page).
  • Idempotency: send Idempotency-Key on POSTs. See Rate limits and idempotency.
  • Rate limits: RateLimit-* headers on every response; 429 with Retry-After when over.