From option-crypto
Read public market data from Deribit's REST API — instruments, ticker, order book, index price, funding rate, historical DVOL — no auth required. Use this skill whenever the user asks for Deribit data on BTC, ETH, SOL, or any other Deribit currency, including option instruments, perpetual funding, dated futures basis, or the volatility index. Triggers: "Deribit", "BTC options", "ETH options", "BTC funding rate", "perpetual basis", "DVOL", "Deribit ticker", "options chain on Deribit", "BTC-PERPETUAL", "BTC-25DEC25-100000-C". Activate even with partial input — default currency = BTC, default kind = option.
How this skill is triggered — by the user, by Claude, or both
Slash command
/option-crypto:deribit-dataThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Pull market data from Deribit's free, no-auth public REST API. Wrapper around the most useful endpoints, with normalization for downstream skills.
Pull market data from Deribit's free, no-auth public REST API. Wrapper around the most useful endpoints, with normalization for downstream skills.
Base URL: https://www.deribit.com/api/v2/public/
| User wants | Endpoint | Params |
|---|---|---|
| List option instruments | /get_instruments | currency=BTC, kind=option, expired=false |
| List perp / futures instruments | /get_instruments | currency=BTC, kind=future |
| Full chain summary (all strikes/expiries) | /get_book_summary_by_currency | currency=BTC, kind=option |
| Single instrument quote | /ticker | instrument_name=BTC-25APR25-100000-C |
| Spot index | /get_index_price | index_name=btc_usd |
| Funding rate | /get_funding_rate_value | instrument_name=BTC-PERPETUAL, start_timestamp, end_timestamp |
| DVOL history | /get_volatility_index_data | currency=BTC, start_timestamp, end_timestamp, resolution=1 |
If the user names an instrument that isn't on Deribit (e.g. SOL options before 2024 listing), surface that — don't guess.
!`curl -sS --max-time 3 https://www.deribit.com/api/v2/public/get_index_price?index_name=btc_usd 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(f'BTC = \${d[\"result\"][\"index_price\"]:,.0f}')" || echo "DERIBIT_UNAVAILABLE"`
If the API is unreachable, stop and surface the failure — do not substitute cached data without telling the user.
import requests
BASE = "https://www.deribit.com/api/v2/public"
def deribit_get(path, **params):
r = requests.get(f"{BASE}/{path}", params=params, timeout=10)
r.raise_for_status()
j = r.json()
if 'error' in j:
raise RuntimeError(f"Deribit error {j['error']}")
return j['result']
# Examples:
instruments = deribit_get("get_instruments", currency="BTC", kind="option", expired="false")
chain = deribit_get("get_book_summary_by_currency", currency="BTC", kind="option")
spot = deribit_get("get_index_price", index_name="btc_usd")['index_price']
ticker = deribit_get("ticker", instrument_name="BTC-25APR25-100000-C")
For DVOL or funding history (range queries), supply start_timestamp and end_timestamp in milliseconds since epoch.
{COIN}-{DDMMMYY}-{STRIKE}-{C|P} e.g. BTC-26DEC25-120000-C
{COIN}-PERPETUAL perpetual swap
{COIN}-{DDMMMYY} dated future
Months are 3-letter UPPERCASE English (JAN/FEB/.../DEC). Strike is integer USD. Type is C (call) or P (put).
If a user gives "BTC 120k Dec calls" → resolve to BTC-26DEC25-120000-C (the last Friday closest to year-end). Always confirm if ambiguous (multiple Dec expiries listed).
Public endpoints rate limit: ~20 req/sec per IP. For full-chain pulls (300+ instruments per currency), batch via get_book_summary_by_currency (one call returns the whole chain) rather than per-instrument ticker calls.
If you hit 429 → back off exponentially (2s, 4s, 8s). After 3 failed retries, stop and report — don't pretend the chain is empty.
For options (returned by get_book_summary_by_currency):
| Field | Meaning |
|---|---|
instrument_name | The contract name |
mark_price | Deribit's mark in BTC/ETH (inverse-quoted) |
mark_iv | Mark implied vol, decimal (e.g. 0.65 = 65%) |
bid_price / ask_price | Top of book in coin units |
volume / volume_usd | 24h volume |
open_interest | OI in contracts (1 contract = 1 BTC notional for BTC, 1 ETH for ETH) |
underlying_price | Spot reference at the quote time |
Coin quoting: mark_price = 0.04 means premium ≈ 0.04 BTC. To get USD: usd_premium = mark_price * underlying_price.
Return structured JSON for the requested instrument(s). Always include:
as_of timestamp (UTC).Hand off:
deribit-options-chaininverse-options-pricingdvol-indexgex-max-painreferences/api_reference.md — Full endpoint catalog with field schemas, pagination, websocket alternativesProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub dongzhuoyao/finance-option-skills --plugin option-crypto