Skip to content
Get started

API access

Khalani issues API keys during onboarding. There is no self-serve sign-up. Your account comes with:

  • Your commercial terms: your commission in basis points and the wallet it is paid to.
  • Your order deadlines: how long the user has to fund each order (fundBy), and solvers to fill it (fillBy). Ask Khalani to change them.

GET /v3/catalog returns your commission and Khalani’s fee in basis points. Every quote gives your order deadlines as terms.fundWithinSeconds and terms.fillWithinSeconds.

Send the key in the X-API-Key header, on every request:

Terminal window
curl -sS https://api.hyperstream.dev/v3/catalog -H "X-API-Key: $KHALANI_API_KEY"

Every v3 route needs the key, order reads included. Call the API from your backend only. Anyone who has your key can use it, so keep it out of browser code, app bundles and logs.

One key is your whole integration. It can quote, create orders under your name, read and list every order you created along with its accounts, and relay cancels.

It can’t move funds. A deposit is a transaction or transfer the user sends from their own wallet, and a cancel needs the signature of the order’s refundTo account.

Answer Meaning
401 UNAUTHENTICATED The X-API-Key header is missing.
403 FORBIDDEN The key is unknown or inactive, or your account isn’t set up to trade. message says which.

A 403 is always about your account. Its recovery is contact_support, and retrying won’t fix it. Contact Khalani through your onboarding channel with the requestId.

GET /v3/catalog is the readiness check for your key. It keeps working during maintenance, subject to its per-IP rate limit. A 200 means your key works and your account is enabled; a 403 names the problem. Retry a 429 after retryAfterSeconds.