Skip to main content

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

RoleGuide
Traders / appTrading app
Traders / spreadsOption spreads
Embed / iframeEmbed the quote box (Frame)
PortfolioPortfolio
Market maker / fillerBecome a market maker
Options RFQ fillingFill options RFQ quotes
On-chain fillsFillMatched, Dutch, Authority (incl. future KYC modes)
CLOBOpshunsClob
BorrowRespond to Borrow RFQscoming soon
API basicsAPI overview
API-only quotesOption spread quotes
CLOB orders (REST)Orders & exclusive fills
Sign-inAuthentication (SIWE)
Live feedsWebSockets & 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

Production (Cloudflare Pages)

Each site is a separate Pages project built from this monorepo (Node 20, install from the repo root).

SiteProductionTestnetBuild
Tradingapp.opshuns.comtestnet.opshuns.comnpm run build:trading
Docsdocs.opshuns.comdocs.testnet.opshuns.comnpm run build:docs
Statusstatus.opshuns.comstatus.testnet.opshuns.comnpm run build:status
Framedframe.opshuns.comframe.testnet.opshuns.comnpm 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).

  • api — Elixir/Phoenix JSON API and Phoenix Channels
  • core — OpshunsMothership / OpshunsClob / RFQ on-chain logic
  • margin — MarginRFQCore and vaults (coming soon)