API reference
Interactive reference for the QuantDesk REST gateway. Every endpoint on this tab is generated from the OpenAPI specification, so request parameters, response schemas, and the Try it playground stay in sync with the contract. Prefer narrative walkthroughs? Start with the Developer quickstart and API overview, then come back here for field-level detail.Base URL
All endpoints are served from the production gateway:/api/v2/...). When you run the stack yourself, set QD_API to your own gateway origin.
Authentication
Public read routes (markets, oracle prices, orderbook, leaderboard) require no credentials. Authenticated routes expect a Bearer JWT obtained from the wallet session flow described in Authentication:Authorization field to run authenticated requests against your own account.
Endpoint groups
| Group | What it covers |
|---|---|
| Markets | Registry, metadata, leverage tiers, and orderbook depth |
| Oracle | Pyth-sourced price feeds |
| Portfolio | Unified balances, positions, and open orders |
| Data | Market stats snapshots and historical OHLCV candles |
| Social | Leaderboard and verified proof (flex) cards |
| Backtesting | Strategy simulation lifecycle and dataset catalog |
| Referrals | Referral loop validation before on-chain assignment |
Conventions
- Responses are JSON with a top-level
successboolean and adatapayload. - Errors return
success: falsewithcode,message, and arequest_idfor correlation. - Retry with backoff on
503and transient network failures, and respect documented rate limits.