deribit-options-analytics
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
deribit-options-analytics
An MCP server that answers option questions about Deribit with arithmetic you can check, not vibes. Every greek is repriced from the venue's own mark IV, every dollar figure is derived from that chain, and every number in this document was measured on the live venue — the date is printed with the table.
Ask it:
Where does the BTC book feel the most pain on Friday?
Which strike is the dealer gamma wall, and is gamma positive above spot?
What is the 25-delta risk reversal telling me — are puts bid or offered?
What implied move is the market pricing for the weekly?
What did the whole BTC chain do in the last five minutes?
BTC-27NOV26 max pain 71,000 (+16.8 % from spot)
BTC all expiries, gamma -78.4 M USD per 1 % puts -207.5 M, calls +129.1 M
BTC nearest, 30d IV 43.2 % expected move 1.96 %
BTC Feb-27, 25d RR -679 bps butterfly +109 bpsNo API key. No account. Deribit's public endpoints answer anonymously, so the server works the moment it is installed.
Contents
Related MCP server: Option Desk
What it does
Six read-only tools over the public Deribit v2 API. Nothing is written, no order is ever placed, and no credential is read:
Tool | The question it answers |
| List every expiry with forward, ATM IV, expected move, open interest and put/call ratio. |
| One expiry, one row per strike, with IV, delta, gamma and dollar gamma. |
| The strike where option holders' payout is smallest — per expiry or across the book. |
| Net dealer gamma by strike: the walls, the flip point, and which way it pushes. |
| The smile in vol points: ATM IV, 25-delta and 10-delta risk reversals, butterfly, slope. |
| Which option venues answer, and how fast. |
The venue is a parameter, not a fork. A second venue is one class and one tuple entry; the tools, the maths and the error contract do not change. See Why one venue is modelled in full.
The arithmetic, stated plainly
Deribit options are inverse and coin-settled: the premium is quoted in the
underlying coin, one contract is one coin, and settlement happens in coin. So
the model has to price a call that pays (S − K)/S in BTC, not (S − K) in
dollars. Under Black-Scholes with zero rates that is exactly
coin premium of a call = N(d1) − (K/F)·N(d2)
coin premium of a put = (K/F)·N(−d2) − N(−d1)
USD premium = coin premium × forwardwhere F is the forward for that expiry, computed from the venue's own
underlying_price, and
d1 = [ln(F/K) + ½σ²t] / (σ√t), d2 = d1 − σ√t
delta_call = N(d1) delta_put = N(d1) − 1
gamma = N′(d1) / (F·σ√t) vega = F·N′(d1)·√tTwo consequences worth knowing before you use the output:
A call's delta is
N(d1), between 0 and 1, and a put's is between −1 and 0 — the same convention as any other book. There is no coin/dollar delta ambiguity in the payload:deltais per coin andgamma_usd_per_1pctis already in dollars.Dollar gamma per 1 % move is
gamma · F² · 0.01per contract. The payload reports it per contract in the chain and multiplied by open interest in the walls and profile, because that is where it means something. A wall of "0 USD" next to a strike with 4,800 contracts of open interest was a bug in this server once; the field namenet_gex_usd_per_1pctnow always includes open interest.
Zero discounting is not a shortcut, it is the venue: Deribit's interest_rate
is 0.0 and premium is paid in coin, so the forward already carries the carry and
the coin premium needs no discount factor.
The day count is measured, not assumed
The single choice that moves the answer most is how a year is counted. Rather
than pick one, we repriced every live BTC option (1,007 priced contracts) from
its own mark_iv under three conventions and compared the model premium with the
venue's mark. Measured 2026-11-26 14:00 UTC:
Day count | Median relative error | 90th percentile | Verdict |
ACT/365 | 0.008 % | 0.055 % | used |
ACT/365.25 | 0.032 % | 0.280 % | 4× worse at the median |
ACT/360 | 0.637 % | 4.914 % | 82× worse at the median |
The gap is not noise, and it is not one lucky run either: across four runs on the
same day the median error was 0.005–0.022 % for ACT/365, 0.030–0.042 % for
ACT/365.25 and 0.61–0.64 % for ACT/360, always in that order, across the whole
distribution rather than at one percentile. That is what you would expect from a
venue whose expiries are always at 08:00 UTC. So DAYS_PER_YEAR = 365.0 is a
measurement, and the table above is the evidence.
That the model reproduces the venue's marks to 0.008 % at the median is also the main correctness test of this server: if the inverse-premium formula, the forward or the expiry timestamp were wrong, this number would be in the per-cent range, not the per-basis-point range.
Term structure as measured
expiry_summary on BTC, 2026-11-26 14:00 UTC, spot 60,798.92:
Expiry | Days | Forward | ATM IV | Expected move | Open interest (USD) | Put/call |
2026-11-27 | 0.75 | 60,809.91 | 43.24 % | 1.96 % | 6,898,099,842 | 0.85 |
2026-11-28 | 1.75 | 60,813.79 | 42.08 % | 2.91 % | 92,126,810 | 0.93 |
2026-11-29 | 2.75 | 60,825.22 | 37.50 % | 3.25 % | 55,083,319 | 2.64 |
2026-11-30 | 3.75 | 60,827.77 | 39.61 % | 4.01 % | 0 | — |
2026-12-04 | 7.75 | 60,847.68 | 48.57 % | 7.08 % | 1,628,210,900 | 1.44 |
2026-12-11 | 14.75 | 60,882.71 | 51.81 % | 10.41 % | 709,107,012 | 1.25 |
The whole chain is 1,036 options across 13 expiries and arrives in one request: 155 ms measured end to end, including deserialising 563 KB and repricing all of it. ETH answered the same question with 824 options across 13 expiries and a spot of 1,702.10.
Two things the table shows honestly rather than hiding:
2026-11-30(and2026-12-18) have IV and an expected move but zero open interest: the venue lists expiries before anyone trades them.max_painon such an expiry returnsno_open_interestinstead of inventing a strike, and the tools note it rather than silently dropping the date.Expected move is one standard deviation to expiry in per-cent of forward, not a confidence interval:
ATM IV × √t.
Max pain as measured
max_pain prices, for every candidate strike, the total coin payout that would
be exercised if the expiry settled there, converts it at the forward, and
reports the minimum. Measured 2026-11-26:
Expiry | Max pain | Distance from spot | Payout at that strike |
2026-11-27 | 71,000 | +16.76 % | 185,131,900 USD |
2026-11-28 | 59,500 | −2.16 % | 88,250 USD |
2026-11-29 | 59,500 | −2.18 % | 103,250 USD |
2026-12-04 | 63,000 | +3.54 % | 8,028,700 USD |
2026-12-11 | 62,000 | +1.84 % | 2,829,800 USD |
2026-12-25 | 70,000 | +14.74 % | 241,336,200 USD |
all expiries | 70,000 | +15.13 % | — |
The two distant readings are not a bug, and this is exactly the kind of thing a
paid tool owes you rather than a smoothed number: those expiries carry thousands
of in-the-money puts at 63,000–70,000 (2026-11-27 alone holds 2,931.9 puts at
63,000 and 3,006.7 at 70,000), so the cheapest settlement for the book really is
above spot, where those puts expire worthless. Whether "max pain" is a
meaningful signal is a separate question; the tool reports the arithmetic, and
pain_usd tells you how flat the minimum is — at 2026-11-28 the total payout is
88 thousand dollars, i.e. nothing to defend.
nearest gives the three closest strikes to the minimum and curve the payout
at every candidate, so you can see how flat the bottom is instead of trusting a
single point.
Gamma as measured
gamma_walls with the default dealer convention (calls add gamma, puts subtract
it), all expiries, BTC, 2026-11-26:
Quantity | Value |
Net gamma, calls | +129,100,312 USD per 1 % |
Net gamma, puts | −207,456,132 USD per 1 % |
Net gamma, book | −78,355,820 USD per 1 % |
Call wall | 66,000 |
Put wall | 58,000 |
Flip strike | none (cumulative never crosses zero) |
Strikes in the profile | 94 |
Nearest expiry alone: −28,590,527 USD per 1 %, call wall 60,500, put wall 62,000. Note that the call wall can print below the put wall: the walls are the strongest positive and the strongest negative strike, not an ordered pair, and a book with puts bid above spot will show it.
The flip is null here and that is the honest answer: the cumulative profile
starts negative at the lowest strike and never crosses zero, so there is no
strike where dealer gamma changes sign. The tool says so in notes rather than
reporting the nearest strike it can find. When the cumulative does cross — a
put-heavy top and a call-heavy bottom — flip_strike appears with
flip_vs_forward_pct.
The convention parameter switches to absolute, which sums unsigned gamma when
you want gross exposure rather than a directional read.
Skew as measured
Expiry | Days | ATM IV | 25-delta RR | 10-delta RR | Butterfly | Slope | Quotes |
2026-11-27 | 1 | 43.24 % | +334 bps | +459 bps | +95 bps | +11.88 pt / 10 % | 14 |
2026-11-30 | 4 | 39.61 % | −207 bps | −648 bps | +91 bps | −3.81 pt / 10 % | 24 |
2027-02-26 | 92 | 46.15 % | −679 bps | −1,232 bps | +109 bps | −2.10 pt / 10 % | 58 |
Risk reversal is calls minus puts in basis points of vol: negative means puts are bid, the normal state of a crypto smile. The butterfly is the same measure of how much the wings bulge over ATM. The slope is a least-squares fit of IV against log-moneyness in vol points per 10 % strike move.
Two caveats printed in the payload rather than buried:
The one-day expiry reads positive (+334 bps) and its slope is +11.88, because at 0.75 days the call wing is bid and the fitted line is steep. The same expiry quotes 149.2 % IV at a strike with no market at all. A one-day smile is a gamma story, not a skew story, and the payload gives you
days_to_expiryso you can see it.The slope deliberately does not fit the whole chain. Wings are excluded by absolute delta (0.10 to 0.90). Measured on the same day, fitting every quote produced +9.44 pt/10 % on one expiry and −16.93 on the next — the sign flipped between neighbouring expiries, which is a description of noise, not of a smile.
slope_quotesreports how many quotes survived the filter: 14 for the one-day expiry, which is why its number deserves doubt.
by_delta gives put and call IV at fixed deltas (10, 25, 50), interpolated from
OTM quotes only, so the points are always on a traded side of the smile.
min_iv_pct and max_iv_pct are the quoted range of that expiry, which is how
the 149.2 % wing becomes visible instead of silently shifting a curve.
A chain row, and what each field means
option_chain row for the busiest strike of the nearest BTC expiry, 2026-11-26:
{
"instrument": "BTC-27NOV26-63000-P",
"strike": 63000.0,
"type": "put",
"expiry": "2026-11-27",
"iv_pct": 53.85,
"delta": -0.9247,
"gamma": 9.565254469e-05,
"open_interest": 2931.9,
"open_interest_usd": 178288575.13,
"volume_usd": 74763.97,
"bid": 0.0355,
"ask": 0.039,
"mid": 0.03725,
"mark": 0.03681489,
"spread_bps": 939.6,
"moneyness": 1.036,
"gamma_usd_per_1pct": 3537.08
}Field | Unit | Meaning |
| coin | Premium, not dollars. |
| per cent | The venue's |
| per coin |
|
| per coin, per coin |
|
| USD |
|
| contracts | One contract is one coin. |
| USD |
|
| USD | The venue's own volume field, passed through. |
| basis points |
|
| ratio |
|
A field can be null for a real reason: BTC-27NOV26-90000-C on the same day had
4,791.8 contracts of open interest, a 127.75 % mark IV and no mark price at
all — a one-tick ask of 0.0001 with no bid. Open interest without a market is a
state the venue allows, and the payload leaves the price fields empty rather than
inventing them from the model.
The six tools
Every tool returns a dict, is annotated readOnlyHint and openWorldHint, and
never raises. Common envelope on chain-based tools: symbol, venue, spot,
contracts, as_of, plus notes when something needs saying.
expiry_summary
{"symbol": "BTC", "window": "all"}window is week, month, quarter or all; limit caps the number of
expiries (1–40, default 12). Each expiry carries forward,
forward_vs_spot_pct, atm_iv_pct, atm_strike, expected_move_pct,
expected_move_usd, open_interest, open_interest_calls,
open_interest_puts, open_interest_usd, put_call_ratio, volume_usd,
strikes and contracts. Alongside expiries the payload carries count,
truncated, and a total block with the open-interest-weighted ATM vol of the
window and the earliest and latest expiry in it.
option_chain
{"symbol": "BTC", "expiry": "2026-12-25", "sort": "oi", "limit": 20,
"min_open_interest": 10}expiry accepts YYYY-MM-DD or YYYY-MM (the first expiry of that month);
omitted means the nearest listed expiry. sort is one of oi, volume,
strike, iv, gamma, delta. limit is 1–200 (default 40), and
min_open_interest filters in contracts. The rows are the fields in the table
above; expiry, days_to_expiry, summary (the same object
expiry_summary returns for that date), count and truncated sit beside them.
max_pain
{"symbol": "BTC", "expiry": "2026-11-27", "top": 3}Returns max_pain, pain_usd, distance_pct, strikes_considered, nearest
(the closest strikes with their payout) and curve. Omit expiry to aggregate
the whole book, where distance_pct is measured from spot.
gamma_walls
{"symbol": "BTC", "convention": "dealer_calls_long", "top": 6}Returns total_gex_usd_per_1pct, call_gamma_usd_per_1pct,
put_gamma_usd_per_1pct, call_wall, put_wall, flip_strike,
flip_vs_forward_pct, convention, walls_above, walls_below and a
profile of strike, net_gex_usd_per_1pct, cumulative_usd_per_1pct
(trimmed to the 60 strikes nearest spot, with profile_truncated saying so).
iv_skew
{"symbol": "BTC", "expiry": "2027-02-26"}Omit expiry for every expiry (limit caps how many, default 12). Each smile
carries atm_iv_pct, atm_strike, risk_reversal_25d_bps,
risk_reversal_10d_bps, butterfly_25d_bps, slope_vol_points_per_10pct,
slope_quotes, min_iv_pct, max_iv_pct and by_delta.
list_venues
{"probe": true}Reports the configured venues, their currencies, their cache TTL and — with
probe — a live latency and contract count. probe: false answers from the
registry without touching the network, which is useful when the venue is down.
Install
git clone https://github.com/tordagaz-ops/deribit-options-analytics
cd deribit-options-analytics
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
pip install -e .Python 3.10 or newer. One runtime dependency (httpx) plus mcp.
Run
python -m mcp_deribit_optionsMCP_TRANSPORT selects the transport; the default is stdio, which is what MCP
clients expect:
MCP_TRANSPORT=stdio python -m mcp_deribit_options # default
MCP_TRANSPORT=sse python -m mcp_deribit_options
MCP_TRANSPORT=streamable-http python -m mcp_deribit_optionsConfigure your client
{
"mcpServers": {
"deribit-options-analytics": {
"command": "python",
"args": ["-m", "mcp_deribit_options"],
"env": { "MCP_LOCALE": "en" }
}
}
}Via Smithery:
npx -y @smithery/cli install deribit-options-analytics --client claudeDocker
docker build -t deribit-options-analytics .
docker run -i --rm deribit-options-analyticsThe image runs as a non-root user, installs only the runtime dependency and
speaks stdio on stdin/stdout, so -i is required and -t is not.
Errors
Failures are values, never exceptions. Every error is
{"error": "<code>", "message": "<localized>", ...}:
Code | When |
| The underlying is not one this venue lists. |
| The venue itself does not know the instrument. |
| An expiry that is not |
| A parameter outside its allowed set. |
| A numeric argument that is not a number. |
| A venue that is not configured. |
| The expiry exists but nothing has traded. |
| The venue answered but the requested slice is empty. |
| The venue did not answer. Retry is safe: every tool is read-only. |
| The venue refused or is down. |
| The venue answered with something that is not the documented shape. |
A partial answer beats none: if one expiry of a multi-expiry request fails, the
rest are returned and notes says which one was skipped.
Tests
pytest -q # 189 offline
pytest -m live -q # 12 live, needs the networkLayer | Tests | What it proves |
Unit ( | 91 | The arithmetic: inverse premiums against a closed-form oracle, greeks against finite differences, ACT/365, max pain on a hand-computed book, walls and flip on constructed profiles, smile fitting. |
Tools ( | 76 | Every tool through a real MCP client session on a replayed recording: payload shapes, every error code, argument validation, locales. |
End to end ( | 22 | A real subprocess speaking JSON-RPC over stdio: handshake, tool list, calls, a rejected argument coming back as JSON rather than a crash. |
Live ( | 12 | The real venue: contract counts, repricing accuracy, that the name-decode matches the venue's own fields. |
The offline layers replay a recording made from the live API
(tests/fixtures/deribit.json), served through httpx.MockTransport, so pytest
needs no network and gives the same answer on a plane.
Recorded data is trimmed: four expiries, eight strikes per expiry, contract fields only. The e2e layer uses the same recording through a subprocess, which is why it is 22 tests in about 29 seconds rather than minutes.
Why one venue is modelled in full
Deribit is where the crypto option book is, and options are the case where one
venue is the market: there is no cross-exchange best execution to aggregate,
because the same contract does not exist on another exchange with the same
settlement. So the venue is a parameter on every tool, and a second one is a
class with book_summary, index_price, instruments and chain, plus one
entry in VENUE_NAMES. The maths, the tool contracts and the error codes are
venue-independent.
What is Deribit-specific is documented as such: inverse coin premium, one
contract = one coin, 08:00 UTC expiries, mark_iv as the source of truth, and
the JSON-RPC envelope on top of HTTP.
Design notes
server.pyhas nofrom __future__ import annotations. FastMCP resolves type hints at runtime and lazy annotations break it.Parameters are annotated
list[str] | str,float | str,int | str,bool | strand validated in the body, because FastMCP validates before the tool runs and a schema rejection would not be our JSON error contract.Undeclared arguments are ignored by the SDK, not rejected. Verified end to end:
list_venues({"venue": "nope"})returns a normal payload. The e2e layer asserts that ignored-argument behaviour instead of assuming a rejection.The chain cache is 5 seconds and caches the raw payload, not the parsed chain, because greeks depend on
nowand a cachedChainwould carry stale time-to-expiry.Prices are formatted with
.10g, neverround(x, 6): a 0.0001 premium is a real price and must not collapse to 0.0.The instrument name is enough.
BTC-27NOV26-63000-Pcarries currency, expiry, strike and type, so/get_instruments(905 KB) is not needed at runtime. It stays in the adapter so the claim remains falsifiable — and the live layer checks the decode against the venue's ownexpiration_timestamp,strikeandoption_typefields for all 1,036 instruments.
Locales
MCP_LOCALE selects the language of tool titles, descriptions, parameter
documentation, error messages and notes: en (default), es, ru.
MCP_LOCALE=ru python -m mcp_deribit_optionsThe payload keys and numeric fields never change with the locale — only human text does, so a client can switch language without touching its parsing. The three catalogues are test-verified to have identical key sets.
This page is also available in Spanish and Russian.
Licence
MIT. See LICENSE.
Data comes from the public Deribit API and is provided as is. Nothing here is investment advice, and a gamma wall is not a prediction.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only US options flow, darkpool prints, dealer gamma (GEX), IV and BTC/ETH options analytics.
Crypto market signals and portfolio telemetry. 6 tools pay-per-call in USDC, no API key.
Read-only Hyperliquid analytics: orderflow, liquidation levels, whale positioning, funding.
Derived prediction-market flow, price changes, trader research and news. 11 read-only tools.
Related MCP Servers
- AlicenseAqualityCmaintenanceExposes the Greeks options-analytics API as MCP tools, enabling live queries for GEX, Greeks, Max Pain, unusual flow, and full dashboard on any ticker.12MIT
- FlicenseNot gradedqualityBmaintenanceOptions analytics an agent can drive: import a permitted chain, solve implied volatility, build a sixteen-Greek ladder, map dealer gamma walls, rank twenty-three structures, run a GARCH-t simulation with a convergence gate, and backtest with modelled premiums. Twelve stdio tools; every output is a schema-validated JSON file with source, assumptions and a degraded flag. Research only, no orders.12-
- AlicenseBqualityBmaintenanceEnables an LLM agent to reason over real Bybit crypto-options data through typed, read-only tools for GEX, vanna, skew, vol surface, flow, sentiment, technicals, portfolio greeks, scenarios, and positions, and to generate trader-grade market memos and delta updates from natural-language requests.22MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to pull live Deribit public market data for BTC and ETH options: per-strike call and put open interest by expiry, put/call open-interest ratios, and computed max pain, all keyless and refreshed on every call. Also lists available expiries and reports snapshot times so agents can reason about current positioning rather than history.MIT