Skip to main content
Glama

Backtesting Arena

Get Deribit BTC Max Pain History

arena_get_max_pain_history
Read-only

Does max pain actually pull price to the strike? Settled Deribit BTC options expiries with the max-pain level we compute per expiry, for measuring the convergence question: does spot drift toward the max-pain level as expiry approaches? Each row: expiry_date, max_pain_strike, spot_at_expiry, %-diff, P/C ratio, notional, expiry-type flags. The mandatory base_rates block answers the convergence question PER expiry class (n, median |diff|, shares within 1%/2%, max, sample_adequate at n>=30) — the pooled median mixes tiny daily expiries with large quarterlies, which is what the per-class split separates. Filter with expiry_type / min_contracts / snapshot_expiry_date instead of post-processing the full row set. With include_open_snapshots=true it adds the daily observation series of still-open expiries — that series starts 2026-05-28, is not backfillable, and its per-expiry depth is thin, so check open_snapshot_coverage before computing anything from it. Days auto-capped by tier: Pro 365d, Power 3650d. Max-pain levels are our own aggregation across the option chain; the chain itself is not redistributed. Source: Deribit. Related: arena_get_max_pain (current + upcoming), arena_get_iv_snapshot. [API Pro tier]

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "arena_get_max_pain_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoDays back from today (default 90, capped by tier).
marketNoOptions market. Only DERIBIT_BTC is served: IBIT (BlackRock spot-ETF options) is still collected daily but no longer delivered — the chain comes from an unlicensed source, so it cannot be redistributed (2026-09-24).
expiry_typeNoFilter expiries AND open_snapshots to one expiry class (label = highest level reached; the nesting booleans stay untouched). base_rates are always computed BEFORE this filter.
min_contractsNoOnly finalized expiries with total_contracts >= this (rows with unknown contracts drop out when set).
snapshot_expiry_dateNoReduce open_snapshots[] to exactly this expiry date (YYYY-MM-DD). Only meaningful with include_open_snapshots=true. Works for settled expiries too: returns that book's daily series up to expiry (open_snapshot_coverage.settled_expiry=true).
include_open_snapshotsNoDefault false. When true, adds open_snapshots[] (daily observations of not-yet-expired contracts) plus open_snapshot_coverage. Omit for the unchanged response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / snapshot_expiry_date / description
      Previous value: -"Reduce open_snapshots[] to exactly this expiry date (YYYY-MM-DD). Only meaningful with include_open_snapshots=true."New value: +"Reduce open_snapshots[] to exactly this expiry date (YYYY-MM-DD). Only meaningful with include_open_snapshots=true. Works for settled expiries too: returns that book's daily series up to expiry (open_snapshot_coverage.settled_expiry=true)."
  2. Changed3 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / days / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / min_contracts / maximum
      Added value: +9007199254740991
  3. Added
  4. Removed
  5. Changed2 schema fields changed
    • changedInput schema / properties / market / description
      Previous value: -"Options market. Currently only 'DERIBIT_BTC' (default)."New value: +"Options market: 'DERIBIT_BTC' (default) or 'IBIT' (collected since 2026-08-24 — history is correspondingly short)."
    • changedInput schema / properties / market / enum
      Previous value: -[
      -  "DERIBIT_BTC"
      -]New value: +[
      +  "DERIBIT_BTC",
      +  "IBIT"
      +]
  6. Changed3 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): \"Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization.\"",
      -  "type": "string"
      -}
    • removedInput schema / required
      Removed value: -[
      -  "context"
      -]
  7. Changed3 schema fields changed
    • addedInput schema / properties / expiry_type
      Added value: +{
      +  "description": "Filter expiries AND open_snapshots to one expiry class (label = highest level reached; the nesting booleans stay untouched). base_rates are always computed BEFORE this filter.",
      +  "enum": [
      +    "daily",
      +    "weekly",
      +    "monthly",
      +    "quarterly"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / min_contracts
      Added value: +{
      +  "description": "Only finalized expiries with total_contracts >= this (rows with unknown contracts drop out when set).",
      +  "exclusiveMinimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / snapshot_expiry_date
      Added value: +{
      +  "description": "Reduce open_snapshots[] to exactly this expiry date (YYYY-MM-DD). Only meaningful with include_open_snapshots=true.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
  8. Changed1 schema field changed
    • addedInput schema / properties / include_open_snapshots
      Added value: +{
      +  "description": "Default false. When true, adds open_snapshots[] (daily observations of not-yet-expired contracts) plus open_snapshot_coverage. Omit for the unchanged response.",
      +  "type": "boolean"
      +}
  9. First observed

TDQS

A4.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With only readOnlyHint=true supplied, the description carries real weight and delivers it: tier-based day caps (Pro 365d, Power 3650d), the non-backfillable 2026-05-28 start of open snapshots with thin per-expiry depth and a mandatory open_snapshot_coverage check, and the licensing limit that the raw chain is not redistributed. The only reason this is not a 5 is that the return-shape discussion overlaps what a structured output description would carry and pagination/volume behavior is unaddressed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the driving question, then the row fields, the mandatory base_rates block, then filtering advice and caveats — a sensible order. It is dense and em-dash-heavy with some repetition between description and schema text, but almost every sentence carries operational information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description must describe returns — and it does: the per-row fields (expiry_date, max_pain_strike, spot_at_expiry, %-diff, P/C ratio, notional, flags) and the base_rates contents (n, median |diff|, shares within 1%/2%, max, sample_adequate at n>=30). Tier caps, data provenance, and the open-snapshot caveat round out what an agent needs to call and interpret it safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: base_rates are computed before expiry_type filtering, the pooled median convolves daily and quarterly expiries (motivating the per-class split), and include_open_snapshots toggles a distinct observation series with its own coverage block. Those are interpretive notes the schema does not fully spell out.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — settled Deribit BTC option expiries with per-expiry max-pain levels — and frames the analytical purpose (convergence of spot to max pain). It explicitly separates itself from arena_get_max_pain ('current + upcoming') so an agent can pick the right sibling without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the alternative (arena_get_max_pain for current/upcoming) and the condition selecting this one (settled history for measuring convergence). It also directs the agent to use expiry_type / min_contracts / snapshot_expiry_date rather than post-processing, which is concrete when-to-use guidance for the parameters.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.