Skip to main content

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:
https://api.quantdesk.app
Most trading and portfolio routes live under the V2 namespace (/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:
curl -s -H "Authorization: Bearer $QD_TOKEN" \
  "https://api.quantdesk.app/api/v2/portfolio" | jq .
In the Try it playground, paste your token into the Authorization field to run authenticated requests against your own account.

Endpoint groups

GroupWhat it covers
MarketsRegistry, metadata, leverage tiers, and orderbook depth
OraclePyth-sourced price feeds
PortfolioUnified balances, positions, and open orders
DataMarket stats snapshots and historical OHLCV candles
SocialLeaderboard and verified proof (flex) cards
BacktestingStrategy simulation lifecycle and dataset catalog
ReferralsReferral loop validation before on-chain assignment

Conventions

  • Responses are JSON with a top-level success boolean and a data payload.
  • Errors return success: false with code, message, and a request_id for correlation.
  • Retry with backoff on 503 and transient network failures, and respect documented rate limits.