Skip to main content

1st DEX — Market Maker API

These docs cover how to quote, update, and risk‑manage orders programmatically using:
  • The on‑chain Controller contract (single entrypoint) to batch trading actions.
  • The Subgraph to read books, orders, and fills with low latency.
Architecture: each pair has two order books, one per direction. Orders are denominated in units (multiples of unitSize) at discrete ticks. See Books & units and Ticks.

What’s different vs AMM DEXes?

  • Price–time priority instead of pools and curves.
  • Quote‑collateralized makers: quote is locked when you MAKE, released when you CANCEL or after CLAIM.
  • Fee model with protocol fees and optional referrer fee sharing.
  • Single batch entrypoint: all actions go through Controller.execute(...) so you can atomically make/take/cancel/claim in one tx.
Get started with the Setup guide.