# Optiva > Options on Hyperliquid, with a floor. Pick a market, a structure (call, put, spread, straddle, strangle), a strike, > a number of days and a budget: the budget is the floor, the loss at which the engine closes. The engine keeps one perp in > the user's own Hyperliquid account, sized at the option's delta, and resizes it as the price moves for the life of > the position. No engine fee. Hyperliquid's trading fees and funding are inside every quote. Every engine decision is a > leaf in a Merkle tree; each minute's root is sealed on Elysium. ## Read (no key, JSON { data } or { error }, CORS open) - GET https://optiva.cfd/api/v1: every endpoint, with links to the MCP server, the SDK and the docs. - GET https://optiva.cfd/api/v1/status: network, pause, engine heartbeat, record contract, token, limits (holderTiers: the holder floors, below). - GET https://optiva.cfd/api/v1/markets: markets with mark, 24 h change, hourly funding, 7-day ATM vol and its source ("market" = Derive listed options, "model" = realized vol with a cushion), sessionClosed. - GET https://optiva.cfd/api/v1/board?sort=move&group=all (page: https://optiva.cfd/board): the Floor Board, every market with what a floor costs there now. Each row is priced like POST /api/v1/quote for 7 days, the strike at today's price and a $100 floor: up (a call), down (a put) and either (a straddle), each the signed move in % from the mark to the breakeven at expiry (4.2 = +4.2 %; the straddle has two), with chance (0 to 1, risk-neutral, not a forecast); iv and ivSource; mark, change24h, sessionClosed, session, openBlocked, pricedAt. highlights: the coin with the smallest move up, the smallest move down and the highest vol among markets open now, once at least 90 % of the listed markets are priced or refused (null before). listed, priced, refused, pending (the most traded are priced first). sort: move, vol, change, volume, name; group: all, crypto, stocks, indices, commodities. - GET https://optiva.cfd/api/v1/protect?user=0x…&days=7 (page: https://optiva.cfd/protect?user=0x…; no user: Hyperliquid's HLP vault, through one of its trading vaults): an address's open perps on Hyperliquid (main dex and xyz), read live, and for the largest 12 by notional on listed markets the option that protects each one, priced like POST /api/v1/quote: a put at today's price under a long, a call over a short. Per row: coin, side, size, entry, mark, pnlOnMargin, pnlOnEntry, liquidation, leverage, and protection: structure, strike, floor, cap, units, coverage (units ÷ size), moveToBreakeven, chance, iv, ivSource, scenarios (at expiry, for a 0, 10 and 20 % move against the perp: perp, protected and covered, fractions of value; liquidated with null figures when the move reaches the liquidation price), trade (the ticket link); or missing (refused, with the pricing code's sentence). Read only: nothing is signed or sent. - GET https://optiva.cfd/api/v1/replay?coin=BTC&preset=call&budget=100&start=YYYY-MM-DD&days=7 (page: https://optiva.cfd/replay): what a floor would have done. A call, put or straddle (or intent=up|down|either) at the price of 00:00 UTC on a start day within the last 30 days (at least a day ago), priced with the quote's formulas at the vol the ticket would have used then: on markets priced from Derive, Derive's vol backed out of the marks of the trades on its options around the start (vol.listed); on the others, or when Derive's marks give no smile, the realized-vol model on the 8 days before. Then replayed hour by hour on Hyperliquid's hourly candles with the engine's own rules (lib/sizing): the hedge resized past its band, the floor closing the position when the loss plus the cost to close (option.closeRate of the hedge held, with a gap allowance of 1 %, 2.5 % on HIP-3 markets) reaches the floor. floor { closed, reason floor | expiry | null while still running, at, price, resultPct (% of the floor), lowPct, highPct, resizes }; perp (same direction, sized like the opening hedge, its stop where the loss equals the floor; null for a straddle); path (one point per hour: close, low, high, held, option, value, perp, trigger); lines; page. An ended replay is stored and returned the same. Simplified: no funding, hourly prices. Not a forecast. - GET https://optiva.cfd/api/v1/surface/{coin}: the smile per expiry (strike, iv), ATM vol, realized vol and the source. - POST https://optiva.cfd/api/v1/quote { coin, preset, strikePct?, widthPct?, legs?, days, budget } (or GET with the same query parameters): units, notional, breakdown { optionValue, expectedFunding, expectedFees, closeReserve, engineFee, total = budget }, greeks (delta: USD notional held now; gamma: change in that per 1 % move; vega: USD per vol point; theta: USD per day), breakevens, 100 payoff points at expiry, the floor, chanceOfProfit, chanceBasis, maxProfit ({ open: true } when the gain has no cap, else pct and at), moveToBreakeven, exposure (perp notional ÷ budget, signed), marginNeeded, marginSetAside, sizeAtFull { reserve, margin, setAside } in multiples of the floor, refusal (null, or the sentence the engine refuses the ticket with) and fit (the nearest ticket that passes, or null). - Share a quote: https://optiva.cfd/q?coin=BTC&intent=up&preset=call&strike=100&days=7&budget=50 is a page priced live (readable without JavaScript, cached about 30 s); https://optiva.cfd/q/card? is its 1200 × 630 PNG card (its Open Graph and X image). Params: coin, intent (up, target, down, protect, either, huge), preset, strike (% of the price, 70–130), width (% of the price), days, budget. https://optiva.cfd/trade? opens the ticket with floors up to $100. - GET https://optiva.cfd/api/v1/book: the demo book (paper fills on live prices, the same engine code; every two hours it opens a standard set: BTC, ETH, HYPE, SOL, xyz:GOLD and xyz:NVDA, a call and a put each, 7 days, strike at the price, $100 floor) and real positions, results in % of budget. - GET https://optiva.cfd/api/v1/positions/{id}: one position and every decision it took (leaves). - GET https://optiva.cfd/api/v1/decisions?limit=20: the latest decisions across the book. paper: true marks the demo book. - GET https://optiva.cfd/api/v1/record?limit=30, /api/v1/record/{minuteMs}: minute roots and their leaves. - GET https://optiva.cfd/api/v1/proof: the latest sealed minute and one sample leaf with its Merkle proof. - GET https://optiva.cfd/api/v1/proof/{leaf}: Merkle proof of any leaf against its minute root. - GET https://optiva.cfd/api/v1/proof/live (page: https://optiva.cfd/proof/live): the live engine checked at the request. - GET https://optiva.cfd/api/v1/me?user=0x…: a wallet's own positions, agent status, last nonce and holder tier. - GET https://optiva.cfd/api/v1/rules (page: https://optiva.cfd/rules): the rules every position runs under, as they stand. Presets: call, put, call_spread (long strikePct, short strikePct + widthPct), put_spread (long strikePct, short strikePct − widthPct), straddle, strangle (put at 100 − widthPct/2, call at 100 + widthPct/2), custom (up to 4 legs on one coin; short legs must be covered). Strikes 70–130 % of the price, 1–30 days; $10–$100 and 3 open for every wallet; 1M OPTIVA held: up to $250 and 5 open; 5M OPTIVA held: up to $500 and 10 open. ## Holder floors The OPTIVA a wallet holds on Elysium sets the largest floor it can open and how many positions it can run at once: $10–$100 and 3 open for every wallet; 1M OPTIVA held: up to $250 and 5 open; 5M OPTIVA held: up to $500 and 10 open. The minimum floor and the global cap on open notional are the same for every wallet. The engine reads balanceOf(user) on the OPTIVA contract at the open (a read at most 30 s old); the wallet that signs the open is the one whose balance counts. Tiers: GET https://optiva.cfd/api/v1/status (limits.holderTiers). A wallet's own: GET https://optiva.cfd/api/v1/me?user=0x… (holder). ## Write (signed by the user's wallet, EIP-712) domain { name: "Optiva", version: "1", chainId: 99901 } Request { string action; address user; bytes32 payload; uint64 nonce; uint64 deadline } payload = keccak256(utf8(canonical JSON of body)): keys sorted, no spaces, non-integer numbers as decimal strings. nonce strictly increasing per wallet (a millisecond timestamp works); deadline in Unix seconds, at most 5 minutes ahead. 1. POST https://optiva.cfd/api/v1/agent { request: { action: "agent", user, nonce, deadline, body: {} }, signature } → its result holds the agent address. The user approves it on Hyperliquid (approveAgent). An agent key can trade the account and can never withdraw; revoke it on Hyperliquid at any time. 2. POST https://optiva.cfd/api/v1/positions { request: { action: "open", …, body: { coin, preset, strikePct, days, budget } }, signature } 3. POST https://optiva.cfd/api/v1/positions/{id}/close { request: { action: "close", …, body: { position: id } }, signature } Writes answer with an intent to poll: GET /api/v1/intents/{id}, new → taken → done (result) or failed (error). ## MCP Streamable HTTP, JSON-RPC: POST https://optiva.cfd/mcp (JSON answers, no event stream, no session). GET https://optiva.cfd/mcp describes the server: the tools with their input schemas and curl examples. Claude Code: claude mcp add --transport http optiva https://optiva.cfd/mcp Tools: list_markets, get_board, protect_position, replay_floor, get_surface, quote_option, share_quote, open_option, close_option, get_positions, get_book, get_rules, verify_leaf. open_option and close_option without a signature return the typed data to sign; call again with request + signature. ## SDK https://optiva.cfd/sdk/optiva.ts: a single TypeScript file (needs viem) with read helpers and the signing helpers above. ## How the engine works - Vol: Derive mark vols per strike and expiry where listed (BTC, ETH, HYPE, SOL, NVDA, S&P 500, XYZ100, gold, oil), otherwise a realized-vol model (EWMA and Parkinson from Hyperliquid hourly candles, floor 25 %, × 1.25, × 1.3 while a stock or commodity's cash market is closed). - Price: Black-Scholes per leg, plus the expected funding of holding the hedge, Leland-style hedging fees, and a close reserve; units = budget / all-in cost per unit. - Hedge: one perp per position, target = Σ qty · units · delta. It resizes when off by more than a gamma-scaled band (2–8 % of the size) and the order is worth at least $10. - Floor: the loss in dollars (fills net of real fees, plus held × price, minus real funding) plus the cost to close what is held is checked on every price the engine reads; the position closes when it reaches the budget. A fast gap can land the close slightly past it. A reduce-only stop order on Hyperliquid at 1.1 × the budget is the backstop if the engine is down. - Record: every decision is canonical JSON, leaf = keccak256("optiva.leaf.v1" ‖ json); per UTC minute the sorted leaves form a Merkle tree (sorted pairs, an odd node carried up) whose root the sealer writes to OptivaRecord on Elysium (chain 99901). OptivaRecord's address is published here once it is deployed. ## Contact The site: https://optiva.cfd ## Token OPTIVA launches on Montra, on Elysium (chain 99901). Its address is published here and in GET https://optiva.cfd/api/v1/status once live; until then a token using the name is not ours.