Make your first request
1
Create a key
Open API keys on app.mob.exchange. Connect your wallet, bind at least two venues, and create a key that grants both. Choose a maximum USD size per leg and save the full secret when shown—it appears only once.
2
Set your environment
Use the production API URL with a key created on app.mob.exchange:For demo or local development, copy Base URL from that app’s Quick start and create a key in the same environment. Keys, venue bindings, and tasks are environment-specific.In Bash or Zsh, run this command and paste your key at the hidden prompt. The secret is not entered into shell history.Run subsequent commands in this terminal. A running coding agent does not inherit a later export: restart it from this terminal if it needs access to the variable. Never paste the key into agent chat, source control, or logs.
Production API
API key
3
Check the service
Request
Expected response · 200 OK
4
Check your key
Request
Expected response · 200 OK
401 means the key is missing, invalid, or revoked; check that it was created in this environment.Authentication
Every/v1 request requires:
GET /health and GET /openapi.json are public.
Before placing a trade
- Use two different venues, both bound to the wallet and granted to the key.
sizeUsdis USD per leg, at least $10 and within the key’s limit and venue minimums.- Configure leverage and margin mode on the venue accounts. The API does not set them.
- Persist an
Idempotency-Keyfor each intended mutation before sending it. Reuse the same key and body for uncertain retries.
202 Accepted acknowledges a command, not a filled order. Poll the task to observe the worker’s result.Create a task
Request fields, limits, and examples.
Monitor tasks
Pagination and status filtering.
Venues and markets
Use the correct IDs for each leg.
Retries and errors
Idempotency, rate limits, and recovery.
Use with a coding agent
Copy the Coding agent prompt from Quick start. It includes your environment’s API URL and checks for a key before authenticated requests. For local development, run the agent on the same computer as the API. The machine-readable contract is available fromGET /openapi.json on your API deployment. Runnable Bun examples are in the API demo directory.
