API Reference
Endpoint groups, discovery methods, and interactive explorer
Interactive Explorer
Use the Reference page for symbols and shared payload details. The interactive Scalar explorer is served at https://docs.diffusal.xyz/reference/rest on the docs site.
Base URLs
| Network | Base URL |
|---|---|
| Testnet | https://api.testnet.diffusal.xyz |
| Mainnet | https://api.diffusal.xyz |
OpenAPI Spec
The full OpenAPI specification is available for generating typed client bindings in any language.
- Raw spec:
https://docs.diffusal.xyz/openapi.json - Canonical public reference:
https://docs.diffusal.xyz/reference/rest - Exact endpoint deep links: generated under
/reference/rest/tag/<tag-slug>/<METHOD><path>so public docs can link directly to exact REST operations - Example exact links: Generate SIWE nonce and Request RFQ auction
- Contributor-only backend references cover non-public REST capabilities separately and are not published on the public docs site.
WebSocket AsyncAPI
- Public websocket reference:
/reference/ws - Raw public AsyncAPI spec:
/asyncapi-ws.json - Example exact links: Price stream and Instrument depth channel
- RFQ bootstrap REST paths used with websockets:
GET /api/rfq/active-auctionsandGET /api/rfq/quotes/:requestId - Contributor-only backend references cover non-public realtime capabilities separately and are not published on the public docs site.
Core Endpoint Groups
| Group | Paths | Auth |
|---|---|---|
| Health | /api/health | No |
| Markets | /api/markets/* | No |
| Platform | /api/platform/* | No |
| Leaderboard | /api/leaderboard/* | Mixed (/me requires auth) |
| Account | /api/account/* | Yes |
| Helpers | /api/helpers/* | No |
| API Keys | /api/keys* | Yes |
| RFQ | /api/rfq/* | No |
| Managed MM | /api/mm/* | Yes |
| Portfolio | /api/portfolio/* | Yes |
| Strategies | /api/strategies/* | Yes |
| Points | /api/points/* | Yes |
| Referrals | /api/referral/* | Dynamic auth |
| User Analytics | /api/user/* | Dynamic auth |
| Webhooks | /api/webhooks/* | Provider-authenticated |
| Auth (SIWE) | /api/auth/* | Mixed |
WebSocket Surface
- Public direct streams: Price, Oracle, Ticker, Trades, Orderbook, and Markets
- Public multiplexed stream: Public stream with stable channel anchors such as Instrument depth, Instrument ticker, and Instrument trade
- Contributor-only backend references document non-public realtime integrations separately.
Request Conventions
- Numeric values are generally returned as strings for precision safety.
- WAD-scale values use 18 decimals; collateral cash values use USDT 6 decimals.
- Cursor/limit pagination is used on list endpoints.
Recommended Client Flow
- Pull OpenAPI spec and generate typed client bindings.
- Use public market/helper endpoints before auth.
- Authenticate with SIWE for account access and API-key management.
- Create scoped API keys under
/api/keys*when you need programmatic authenticated access. - Use
/api/mm/*,/api/portfolio/*, and/api/strategies/*when you want authenticated API-managed trading workflows. - Connect to direct or multiplexed WebSocket streams for live updates.