Diffusal

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/markets
  • GET /api/markets/orderbook/:symbol
  • GET /api/markets/ticker/:symbol
  • GET /api/markets/trades/:symbol
  • GET /api/markets/pairs

3. Prepare Transaction Params

Use helper endpoints for deterministic IDs and tick conversions:

  • GET /api/helpers/series-id
  • GET /api/helpers/pair-id
  • GET /api/helpers/tick-decimals/:pairId
  • GET /api/helpers/tick-to-price
  • GET /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/keys
  • POST /api/keys
  • GET /api/mm/orders
  • POST /api/mm/orders/place
  • GET /api/mm/quotes
  • POST /api/mm/quotes/submit
  • GET /api/portfolio/list
  • POST /api/portfolio/create
  • POST /api/strategies/prepare
  • POST /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:

  1. POST /api/mm/orders/place to get mode: "typed_data" and the exact PlaceOrder payload
  2. Sign the typed data with the maker wallet
  3. 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/*.

Next

On this page