Quickstart
Three steps: provision a key pair, sign a request, read the response. There is no SDK requirement — the interface is plain HTTP/1.1 or HTTP/2 with JSON bodies.
1. Provision credentials
Keys are issued per environment. A sandbox key returns synthetic series drawn from the same generator used in backtests, so response shapes are identical but values are not live.
Store the pair on disk with restrictive permissions and read it at run time. Do not inline it in a script or pass it on a command line, where it would appear in the process list:
# One-time setup, in the shell of the account that owns the pipeline
mkdir -p "$HOME/.laquid" && chmod 700 "$HOME/.laquid"
$EDITOR "$HOME/.laquid/key_id" # public identifier, mode 600
$EDITOR "$HOME/.laquid/signing_key" # secret, mode 600
chmod 600 "$HOME/.laquid/key_id" "$HOME/.laquid/signing_key"
2. Sign the request
The signature covers the HTTP method, the canonical path, the query string, and a Unix timestamp. Construct it as follows:
payload = METHOD + "\n" + PATH_WITH_QUERY + "\n" + TIMESTAMP + "\n" + SHA256_HEX(BODY)
signature = HEX( HMAC_SHA256( SECRET, payload ) )
Send all three headers:
X-Laquid-Key: lq_id_4f8c2a91d7e0
X-Laquid-Timestamp: 1795765314
X-Laquid-Signature: <64 lowercase hex characters>
A working shell helper, roughly twelve lines, is included on the Authentication page. Requests with a timestamp more than 300 seconds from server time are rejected with 401 signature_expired.
3. Verify the response
Successful responses carry 200 and a JSON body. Every response includes these headers:
| Header | Meaning |
|---|---|
X-Laquid-Snapshot | Identifier of the data snapshot the response was resolved against |
X-Laquid-Quota-Remaining | Requests left in the current window |
X-Laquid-Quota-Reset | Unix timestamp when the window rolls over |
X-Request-Id | Stable identifier; quote this in support requests |
Choosing a transport
HTTP/2 is enabled on the public edge and is the better choice for pipelines that issue many small sequential requests: header compression alone typically saves 20–40 % of bytes on paginated sweeps. HTTP/1.1 with keep-alive is fully supported and is a reasonable default for batch jobs.
- Keep the connection open across calls; a TLS handshake costs more than the request itself.
- Do not pipeline account-scoped calls — quota accounting is per connection at the edge.
- For bulk history, prefer one wide request over many narrow ones; the pagination ceiling is documented under pagination.
GET /api/v2/rates/latest?symbols=AAA.XNGS in the sandbox returns exactly one rate object. If you get an empty array, the symbol namespace is usually wrong — venue suffixes are mandatory.
Avoiding the common mistakes
- Signing the raw body instead of its digest. The payload includes the SHA-256 hex of the body, not the body itself.
- Re-sorting query parameters. Sign the query string exactly as transmitted.
- Reusing a signature. Timestamps are single-use within the freshness window.
- Assuming constant latency. Consolidation cadence affects tail latency more than load does.
- Trimming the trailing newline. The canonical payload has no trailing newline; most bugs here come from
echowhereprintfwas needed.