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
Integrate a DappAdd to your Dapp (embed)
Integrate a walletAdd to your crypto wallet (API taker)
TypeScript SDK@opshuns/sdk (../sdk)
Own RFQ → CLOBCall the CLOB directly
Own RFQ → settleSettle matched intents with your own RFQ
Traders / appTrading app
Traders / premiumPremium ratio
Traders / spreadsOption spreads
Embed / iframe (detail)Embed 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
FeesProtocol & referral fees
Borrow feesBorrow protocol & liquidation fees. coming soon
BorrowRespond to Borrow RFQs. coming soon
API basicsAPI overview
API-only quotesOption spread quotes
CLOB orders (REST)Orders & exclusive fills
Sign-inAuthentication (SIWE)
Explore / loan analytics authExplore & loan data auth
Live feedsWebSockets & pubsub

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
Tradingopshuns.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)
  • sdk: TypeScript client @opshuns/sdk. guide