API access (v2)
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 deadline (
orderTtl): how long each order stays open after the build. It lets you override the default deadline and impose your own: ask Khalani to set it. Every build signs it into its order.
Read all of them with GET /v2/params.
Send the key from your backend
Section titled “Send the key from your backend”Send the key in the X-API-Key header:
curl -s https://api.hyperstream.dev/v2/params -H "X-API-Key: $KHALANI_API_KEY"Call the API from your backend only. Anyone who has your key can use it, so keep it out of browser code and app bundles.
| Route | Auth |
|---|---|
GET /v2/params |
API key |
GET /v2/quote |
API key |
POST /v2/build |
API key |
GET /v2/orders |
API key |
POST /v2/orders/{orderId}/cancel |
API key |
GET /v2/orders/{orderId} |
Public |
GET /v2/health |
Public |
What a key can do
Section titled “What a key can do”One key is your whole integration. It can build orders under your name, list every order you built along with each depositor and recipient, and read your terms.
It cannot move funds. A deposit is a transaction the user signs, and a cancel needs the user’s signature.
Authentication errors
Section titled “Authentication errors”| Status | error |
Meaning |
|---|---|---|
401 |
X-API-Key required |
The header is missing. |
403 |
Unknown or inactive integrator |
The key is not recognised. |
403 |
Integrator <integratorId> is not enabled on the integrator registry |
The key is valid, but your account is disabled or not set up yet. |
403 |
Integrator <integratorId> owes a commission with no wallet configured |
Your terms are invalid. |
403 |
Integrator <integratorId> carries a fee at or above 100% |
Your terms are invalid. |
A 403 is always about your account, so retry logic can treat every 403 as final. Contact Khalani through your onboarding channel to resolve one.
Check that you are ready
Section titled “Check that you are ready”GET /v2/params is the readiness check for your key. It reflects your account and 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. Back off and retry a 429.