https://api.ocx.global, written below as {BASE_URL}.
Access tiers
Public
No credentials. Market-data reads and public streams.
Session
A SIWE sign-in yields a session token valid for 7 days. Required for orders, quotes, your account, and your wallet.
- the
astra_sessioncookie (httpOnly,Secure,SameSite=None), set by a successful sign-in — browsers send it automatically; - an
Authorization: Bearer <token>header — the form to use from a bot or agent.
Sign in with your wallet
1
Request a nonce
Ask the gateway for a one-time nonce to include in your signed
message.
walletAddress must be a 20-byte hex address. The nonce is single-use and expires after 10 minutes; request a fresh one on each sign-in.2
Build and sign a SIWE message
Construct a standard EIP-4361 message and sign it with your wallet (for example
personal_sign, wagmi’s signMessage, or viem’s account.signMessage). The gateway rejects the message unless it carries:3
Verify and open a session
Submit the exact message string and its signature. On success the response sets the The token itself is the value of the
astra_session cookie and returns your identity.astra_session cookie in the Set-Cookie response header.4
Make authenticated requests
Send the cookie (browsers) or the token as a bearer header (bots). Check or end the session with:
End-to-end example
API keys
The app can create API keys, and the gateway exposes key management under/fut/me/api-keys (list, create, revoke — session only). The public API does not yet accept these keys for authentication. Use a session token (cookie or Authorization: Bearer) for all automated access.
Access by capability
Rate limits
The gateway rate-limits requests per client. The/auth/* endpoints are limited to 10 requests per minute per IP. See Errors & rate limits for the full picture and the x-ratelimit-* headers.