Opshuns documentation
Guides for integrating with the Opshuns API as a taker or market maker (options RFQ filler), and for using the trading app.
Borrow is coming soon. Lending against opshun collateral is not live. The trading Borrow page shows a coming-soon notice; Borrow RFQ endpoints, pubsub topics, and on-chain borrow are planned and may change.
Start here
| Role | Guide |
|---|---|
| Traders / app | Trading app |
| Traders / spreads | Option spreads |
| Embed / iframe | Embed the quote box (Frame) |
| Portfolio | Portfolio |
| Market maker / filler | Become a market maker |
| Options RFQ filling | Fill options RFQ quotes |
| On-chain fills | FillMatched, Dutch, Authority (incl. future KYC modes) |
| CLOB | OpshunsClob |
| Borrow | Respond to Borrow RFQs — coming soon |
| API basics | API overview |
| API-only quotes | Option spread quotes |
| CLOB orders (REST) | Orders & exclusive fills |
| Sign-in | Authentication (SIWE) |
| Live feeds | WebSockets & pubsub |
Products in this monorepo
- Trading — web app (port 3000): quote box, pair factory, portfolio, makers, testnet faucet. Borrow tab is coming soon.
- Docs — this site (port 3003)
- Status — health page (port 3004)
- Framed — embeddable quote box portal (port 3005; allows iframes). How to use: Embed the quote box (Frame)
Maker ops UI in the trading app lives at /makers.
Local development
# API + Anvil (from the api repo)
mix dev.local
# Docs (from this web repo)
npm install
npm run dev:docs
- API: http://localhost:4000
- Docs: http://localhost:3003
- Trading: http://localhost:3000
- Framed embed: http://localhost:3005
Production (Cloudflare Pages)
Each site is a separate Pages project built from this monorepo (Node 20, install from the repo root).
| Site | Production | Testnet | Build |
|---|---|---|---|
| Trading | app.opshuns.com | testnet.opshuns.com | npm run build:trading |
| Docs | docs.opshuns.com | docs.testnet.opshuns.com | npm run build:docs |
| Status | status.opshuns.com | status.testnet.opshuns.com | npm run build:status |
| Framed | frame.opshuns.com | frame.testnet.opshuns.com | npm run build:framed |
Env templates live in .env.*.example and deploy/cloudflare/env/. Set VITE_* / DOCS_* as build environment variables. See the web repo README for the full Pages table.
VITE_MARGIN_COMING_SOON (true / 1 / yes) keeps the trading Borrow page on a coming-soon blurb instead of the RFQ UI.
VITE_TESTNET_BANNER / VITE_STAGING_BANNER show a site-wide environment banner (also toggleable in the trading debug panel when VITE_DEBUG is on).
Related repositories
- api — Elixir/Phoenix JSON API and Phoenix Channels
- core — OpshunsMothership / OpshunsClob / RFQ on-chain logic
- margin — MarginRFQCore and vaults (coming soon)