Skip to main content
Private requests authenticate with an API key: mint a key and secret, then HMAC-sign every request. Calibri validates the signature and authenticates you as the member the key belongs to for the rest of the request. Public endpoints need no authentication.
Authentication proves who you are. It does not authorise the movement of any funds. Every order additionally carries your own EIP-712 signature, and every transfer out of your Safe is a transaction you sign — apart from a matched order’s taker fee, which the matcher takes under the approval you gave at setup; USDC sent to your address on another network, which can only be carried to your own Safe on Polygon; and, if you turn on auto-redeem, resolved positions redeemed back into your Safe. A compromised API key can read your account. With the trade scope it can also cancel your orders and accept a bridge fee Calibri has quoted on a cross-network deposit — taken from that deposit, with the rest still delivered only to your Safe on Polygon. It cannot place an order without your signature or move USDC anywhere else.

API keys

Create keys in Settings on calibri.io. Creating, changing or deleting a key requires a current two-factor code, so 2FA must be enabled on the account. The secret is shown once, when the key is created.

Scopes

Each key carries read, and optionally trade, chosen when you create it: Keys created before scopes existed act as both read and trade. A request outside the key’s scope is refused with 403 authz.invalid_permission_scope.

Browser-only actions

Some actions change who controls the account or where its money can go. An API key cannot reach them — they return 403 and must be done in the browser, signed in:
  • API key management
  • Linking a wallet
  • Changing your email
  • Webhook settings
  • Passkey registration (/atlas/account/wallet/passkey)
  • GraphQL
Self-custody actions — orders, Safe relays, signing-key changes — are not on this list: each already needs a wallet signature an API key cannot produce.

API-key (HMAC) authentication

Send three headers on every private request:

The canonical message

Concatenated with no separators. Each part is exact: Because the method, path, and body are covered, one signature authorises exactly one request. It cannot be replayed against a different path, a different limit=, or different body contents.

The exact string signed, for a POST

Sign the body you actually send. If your HTTP client re-serialises JSON — reordering keys or changing whitespace — after you compute the signature, the signature will not match. Build the body string once, sign that string, and transmit it verbatim.

Clock skew and replay

X-Auth-Nonce is checked against server time: it must be within 10 seconds of it, in either direction, or the request is rejected with authz.nonce_expired. Read GET /api/v2/atlas/public/timestamp (Unix seconds) to measure your offset before signing; the nonce itself is in milliseconds. Each signature is single-use. Sending the same signed request twice — same nonce, method, path and body — is rejected the second time with authz.nonce_reused. To retry, sign again with a fresh nonce.

WebSocket

The private WebSocket upgrade is signed exactly like a REST call, so the signed path must include the full ?stream=… query string you connect with. Signing the bare path will fail.

Authentication is not authorisation to trade

Signing the request proves who you are. It does not authorise an order — every non-custodial order carries your own EIP-712 signature as well, and whether your client can produce one depends entirely on what owns your Safe. Check signature_type on GET /api/v2/atlas/account/wallet before you build. The number tells you what owns your Safe, which is what decides how your client signs — and whether it can sign at all: Every order on Calibri is a signed order placed through POST /api/v2/atlas/account/orders. The unsigned POST /api/v2/pythia/orders is not available on Calibri. Open your type below.
Reads work as normal. For writes it depends on whether you have added a second signing key.A passkey signs only in a browser on a device that holds it, and a session key cannot be read out of the browser, so neither can reach a server. Without a second key your client can read balances, positions, orders, contracts and market data, and cancel your orders; it cannot place orders, withdraw or redeem.With a second signing key (Settings → Trading → Wallet → Signing keys — adding one requires two-factor authentication) your client signs as an owner of your Safe: orders, withdrawals and redemptions all work. The order stays signature_type: 3 with maker == signer == your Safe — what changes is the signature, which becomes a standard Safe owner signature:
Sign the SafeMessage, not the order hash — the Safe hashes it again itself, so signing the order hash directly always fails validation. The symptom is a 422 reading Invalid signed_order signature, on a signature that recovers to your key perfectly when you check it yourself — the Safe is recovering against a different digest.Computed OFFLINE. Your Safe exposes getMessageHash(bytes) and will return the same value, but that needs an RPC connection to the chain, which an API client generally has no reason to hold:
The domain is chainId and verifyingContract only — no name, no version. That is Safe 1.3.0’s domain, and getting it wrong fails exactly the same way as signing the raw order hash, so verify once against getMessageHash if you can reach a node.

API overview

Base URLs, response format, and pagination.

Errors

The dot-coded error catalog.

Signed orders

The EIP-712 signature every order carries, separate from authentication.

Session keys

Browser-held keys that sign orders without a passkey prompt.