Quick Start
Minimal integration sequence for API + on-chain writes
For Traders
If you are a trader using the Diffusal trading app, you do not need to interact with the API directly. The app handles authentication, order submission, and portfolio management through its interface.
See the Trader Guides for step-by-step instructions on wallet setup, placing trades, managing positions, and more.
The sections below are for API integrators — market makers, bot operators, and developers building on the Diffusal protocol.
1. Connect to API
- Use your environment's API base URL.
- Validate connectivity with
GET /api/health. - Pull REST schemas from
https://docs.diffusal.xyz/openapi.json.
2. Read Market Data
Start with:
GET /api/marketsGET /api/markets/orderbook/:symbolGET /api/markets/ticker/:symbolGET /api/markets/trades/:symbolGET /api/markets/pairs
3. Prepare Transaction Params
Use helper endpoints for deterministic IDs and tick conversions:
GET /api/helpers/series-idGET /api/helpers/pair-idGET /api/helpers/tick-decimals/:pairIdGET /api/helpers/tick-to-priceGET /api/helpers/price-to-tick
4. Authenticate (If Needed)
For authenticated account or trading endpoints:
- Complete SIWE flow under
/api/auth/*
For programmatic authenticated workflows:
GET /api/keysPOST /api/keysGET /api/mm/ordersPOST /api/mm/orders/placeGET /api/mm/quotesPOST /api/mm/quotes/submitGET /api/portfolio/listPOST /api/portfolio/createPOST /api/strategies/preparePOST /api/strategies/place
5. Subscribe to Live Data
Connect to /ws/public for live market data and subscribe to channels such as <symbol>@depth, <symbol>@ticker, or <symbol>@trade. For RFQ live flows, hydrate first with GET /api/rfq/active-auctions or GET /api/rfq/quotes/:requestId and then attach to /ws/rfq/stream, /ws/rfq/mm, or /ws/rfq/quotes as needed. See WebSocket Streams for the multiplexed channel model, auth flow, and exact generated reference links.
6. Execute Writes On-Chain or via Managed Endpoints
Use wallet-signed transactions against protocol contracts (depositToPortfolio, placeOrderWithSignature, fillRfqQuoteInPortfolio, etc.). For order-book placement, the recommended current flow is:
POST /api/mm/orders/placeto getmode: "typed_data"and the exactPlaceOrderpayload- Sign the typed data with the maker wallet
- Submit the signature on-chain through
placeOrderWithSignature(...)
If the series may not exist yet, use placeOrderWithSeriesParamsWithSignature(...).
Direct registration via registerOrderInPortfolio(...) and registerOrderInPortfolioWithSeriesParams(...) remains available for lower-level integrations, but it is not the default recommended path.
For RFQ, request auction quotes via POST /api/rfq/request before on-chain fill. If your integration uses the authenticated API trading layer, manage MM orders and quotes through /api/mm/*, portfolio helpers through /api/portfolio/*, and multi-leg strategy helpers through /api/strategies/*.