{
  "openapi": "3.1.0",
  "info": {
    "title": "Cohorra Data & Agent API",
    "version": "1.2.0",
    "description": "Dedicated Hyperliquid chain-state liquidation levels (130,000+ wallets, 357 main and HIP-3 perpetual markets), calibrated 30-minute cascade risk, resting book-wall odds, calibrated order cost, Hyperliquid-native funding forecasts, calibrated price ranges, live verification scorecard, archive pack manifest, and MCP agent tools. Free/keyless access provides 24h-delayed data (24h window delayed 24h for levels & positioning across 357 markets, 24h-delayed BTC & ETH preview across the 6 model tools, and live /v1/data/scorecard); live real-time (<60s) access requires Builder ($79/mo) or Scale ($199/mo). Cohorra is a trade name of Vestige LLC. Market data for information only. Not investment advice.",
    "termsOfService": "https://cohorra.com/legal/terms",
    "contact": {
      "name": "Cohorra Support",
      "email": "support@cohorra.com",
      "url": "https://cohorra.com/data/docs"
    }
  },
  "externalDocs": {
    "description": "Cohorra Hyperliquid Data API & MCP Tools Documentation",
    "url": "https://cohorra.com/data/docs"
  },
  "servers": [
    {
      "url": "https://edge.cohorra.com",
      "description": "Cohorra Edge Data API"
    }
  ],
  "security": [
    {},
    {
      "bearerAuth": []
    },
    {
      "apiKeyHeader": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key minted at https://suite.cohorra.com/data/keys (format: ck_live_...). Omit for keyless Free access (15 req/min; 24h-delayed levels & positioning across 357 markets, 24h-delayed BTC & ETH preview across the 6 model tools, and live /v1/data/scorecard)."
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "API key minted at https://suite.cohorra.com/data/keys (format: ck_live_...)."
      }
    },
    "parameters": {
      "coin": {
        "name": "coin",
        "in": "query",
        "required": true,
        "description": "Perpetual market symbol on Hyperliquid (e.g. BTC, ETH, SOL, or a HIP-3 market such as xyz:NVDA where supported by the endpoint).",
        "schema": {
          "type": "string",
          "example": "BTC"
        }
      },
      "coinOptional": {
        "name": "coin",
        "in": "query",
        "required": false,
        "description": "Optional Hyperliquid perpetual market symbol filter (e.g. BTC, ETH, SOL).",
        "schema": {
          "type": "string",
          "example": "BTC"
        }
      },
      "hours": {
        "name": "hours",
        "in": "query",
        "required": false,
        "description": "Number of hourly snapshots to return (1-24 on Free [delayed 24h] and Builder [live], 1-96 on Scale [live]).",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 96,
          "default": 24
        }
      },
      "asOf": {
        "name": "as_of",
        "in": "query",
        "required": false,
        "description": "Optional ISO-8601 UTC timestamp with seconds (YYYY-MM-DDTHH:MM:SSZ) or unix milliseconds for point-in-time queries within the plan's edge API window.",
        "schema": {
          "type": "string",
          "example": "2026-11-28T14:00:00Z"
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": ["error"],
        "properties": {
          "error": { "type": "string" },
          "words": { "type": "string" },
          "covered_coins": {
            "type": "array",
            "items": { "type": "string" },
            "description": "Returned on 404 when a coin is outside the endpoint's verified coverage."
          }
        }
      },
      "LadderRow": {
        "type": "object",
        "required": ["side", "price", "notional_usd"],
        "properties": {
          "side": { "type": "string", "enum": ["long", "short"] },
          "band": { "type": ["string", "null"] },
          "price": { "type": ["number", "null"] },
          "price_far": { "type": ["number", "null"] },
          "notional_usd": { "type": "number" },
          "wallets": { "type": ["integer", "null"], "minimum": 5 }
        }
      },
      "LevelsResponse": {
        "type": "object",
        "required": ["coin", "venue", "tier", "delayed", "state", "ladder", "hours"],
        "properties": {
          "coin": { "type": "string" },
          "venue": { "type": "string", "example": "hyperliquid" },
          "tier": { "type": "string", "enum": ["free", "builder", "scale"] },
          "delayed": { "type": "boolean" },
          "delay_hours": { "type": "integer" },
          "state": { "type": "string" },
          "as_of_ms": { "type": ["integer", "null"] },
          "bands": { "type": "array", "items": { "type": "object" } },
          "ladder": {
            "type": ["object", "null"],
            "properties": {
              "as_of_ms": { "type": ["integer", "null"] },
              "mark_px": { "type": "number" },
              "rows": {
                "type": "array",
                "items": { "$ref": "#/components/schemas/LadderRow" }
              }
            }
          },
          "hours": { "type": "array", "items": { "type": "object" } }
        }
      },
      "PositioningResponse": {
        "type": "object",
        "required": ["coin", "venue", "tier", "delayed", "state", "hours"],
        "properties": {
          "coin": { "type": "string" },
          "venue": { "type": "string", "example": "hyperliquid" },
          "tier": { "type": "string", "enum": ["free", "builder", "scale"] },
          "delayed": { "type": "boolean" },
          "delay_hours": { "type": "integer" },
          "state": { "type": "string" },
          "as_of_ms": { "type": ["integer", "null"] },
          "lev_bands": { "type": "array", "items": { "type": "object" } },
          "hours": { "type": "array", "items": { "type": "object" } }
        }
      },
      "CascadeMove": {
        "type": "object",
        "required": ["move_pct", "side", "middle_usd", "p10_usd", "p90_usd", "map_usd"],
        "properties": {
          "move_pct": { "type": "number", "description": "Signed price move percentage (e.g. -2, -1, 1, 2)." },
          "side": { "type": "string", "enum": ["longs", "shorts"] },
          "middle_usd": { "type": ["number", "null"], "description": "Median calibrated 30-minute forced liquidation estimate in USD." },
          "p10_usd": { "type": ["number", "null"], "description": "10th-percentile lower bound in USD." },
          "p90_usd": { "type": ["number", "null"], "description": "90th-percentile upper bound in USD." },
          "map_usd": { "type": ["number", "null"], "description": "Static chain-state liquidation map control in USD." },
          "reason": { "type": ["string", "null"] }
        }
      },
      "CascadeResponse": {
        "type": "object",
        "required": ["coin", "from_price", "horizon_min", "moves"],
        "properties": {
          "schema": { "type": "string", "example": "liq_estimate/1" },
          "product": { "type": "string", "const": "cohorra_cascade" },
          "coin": { "type": "string" },
          "venue": { "type": "string", "example": "hyperliquid" },
          "tier": { "type": "string", "enum": ["free", "builder", "scale"] },
          "delayed": { "type": "boolean" },
          "delay_hours": { "type": "integer" },
          "from_price": { "type": ["number", "null"] },
          "from_price_at_ms": { "type": ["integer", "null"] },
          "horizon_min": { "type": "integer", "example": 30 },
          "validated_moves_pct": { "type": "array", "items": { "type": "number" } },
          "moves": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/CascadeMove" }
          },
          "read_at_ms": { "type": ["integer", "null"] },
          "forward_scorecard": { "type": ["object", "null"] }
        }
      },
      "BookWallsResponse": {
        "type": "object",
        "required": ["product", "coin", "venue", "walls"],
        "properties": {
          "product": { "type": "string", "const": "cohorra_book_walls" },
          "coin": { "type": "string" },
          "venue": { "type": "string", "example": "hyperliquid" },
          "tier": { "type": "string", "enum": ["free", "builder", "scale"] },
          "delayed": { "type": "boolean" },
          "delay_hours": { "type": "integer" },
          "state": { "type": "string" },
          "as_of_ms": { "type": ["integer", "null"] },
          "usual_hold_rate": { "type": ["number", "null"] },
          "walls": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "coin": { "type": "string" },
                "side": { "type": "string", "enum": ["bid", "ask"] },
                "price": { "type": "number" },
                "size_usd": { "type": "number" },
                "distance_bp": { "type": "number" },
                "age_s": { "type": "number" },
                "hold_prob": { "type": "number" },
                "usual_hold_rate": { "type": ["number", "null"] }
              }
            }
          }
        }
      },
      "OrderCostRow": {
        "type": "object",
        "required": ["usd"],
        "properties": {
          "usd": { "type": "number", "description": "Order notional clip size in USD ($50K to $5M)." },
          "book_walk_bp": { "type": ["number", "null"], "description": "Naive L2 book-walk slippage in basis points." },
          "expected_impact_bp": { "type": ["number", "null"], "description": "Calibrated expected total impact in basis points." },
          "impact_p10_bp": { "type": ["number", "null"], "description": "10th-percentile impact bound in basis points." },
          "impact_p90_bp": { "type": ["number", "null"], "description": "90th-percentile impact bound in basis points." },
          "replenishment_30s_pct": { "type": ["number", "null"], "description": "Forecasted 30-second book replenishment percentage." },
          "short": { "type": "boolean", "description": "True when the clip exceeds visible top-of-book depth." },
          "levels": { "type": "integer", "description": "Number of resting book levels walked." }
        }
      },
      "OrderCostResponse": {
        "type": "object",
        "required": ["product", "coin", "venue", "sizes_usd"],
        "properties": {
          "product": { "type": "string", "const": "cohorra_order_cost" },
          "coin": { "type": "string" },
          "venue": { "type": "string", "example": "hyperliquid" },
          "tier": { "type": "string", "enum": ["free", "builder", "scale"] },
          "delayed": { "type": "boolean" },
          "delay_hours": { "type": "integer" },
          "state": { "type": "string" },
          "as_of_ms": { "type": ["integer", "null"] },
          "mid": { "type": ["number", "null"] },
          "sizes_usd": {
            "type": "array",
            "items": { "type": "number" }
          },
          "buy": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/OrderCostRow" }
          },
          "sell": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/OrderCostRow" }
          }
        }
      },
      "WalletGroupsResponse": {
        "type": "object",
        "required": ["product", "status", "venue", "groups"],
        "properties": {
          "product": { "type": "string", "const": "cohorra_wallet_groups" },
          "status": { "type": "string", "const": "experimental" },
          "venue": { "type": "string", "example": "hyperliquid" },
          "tier": { "type": "string", "enum": ["free", "builder", "scale"] },
          "delayed": { "type": "boolean" },
          "delay_hours": { "type": "integer" },
          "min_wallet_count": { "type": "integer", "minimum": 5 },
          "groups": {
            "type": "array",
            "description": "Experimental: anonymized co-trading behavioral whale clusters (>=5 wallet floor, zero addresses; descriptive holdings only).",
            "items": {
              "type": "object",
              "properties": {
                "group_id": { "type": ["string", "null"] },
                "wallet_count": { "type": "integer", "minimum": 5 },
                "long_usd": { "type": ["number", "null"] },
                "short_usd": { "type": ["number", "null"] },
                "net_usd": { "type": ["number", "null"] },
                "change_24h_usd": { "type": ["number", "null"] },
                "forced_liq_levels": { "type": "array", "items": { "type": "object" } }
              }
            }
          }
        }
      },
      "FundingForecastResponse": {
        "type": "object",
        "required": ["product", "coin", "venue", "venues"],
        "properties": {
          "product": { "type": "string", "const": "cohorra_funding_forecast" },
          "coin": { "type": "string" },
          "venue": { "type": "string", "example": "hyperliquid" },
          "tier": { "type": "string", "enum": ["free", "builder", "scale"] },
          "delayed": { "type": "boolean" },
          "delay_hours": { "type": "integer" },
          "issued_at": { "type": ["string", "null"] },
          "unit": { "type": "string", "example": "bp_per_8h" },
          "venues": {
            "type": "array",
            "description": "Hyperliquid-native funding rate forecasts for k=3 and k=8 hourly settlements.",
            "items": {
              "type": "object",
              "properties": {
                "venue": { "type": "string", "const": "hyperliquid" },
                "interval_h": { "type": "number" },
                "last_rate": { "type": ["number", "null"] },
                "horizons": { "type": "array", "items": { "type": "object" } }
              }
            }
          },
          "skill": { "type": "object" }
        }
      },
      "RangeResponse": {
        "type": "object",
        "required": ["product", "coin", "timeframe", "by_timeframe"],
        "properties": {
          "product": { "type": "string", "const": "cohorra_range" },
          "coin": { "type": "string" },
          "tier": { "type": "string", "enum": ["free", "builder", "scale"] },
          "delayed": { "type": "boolean" },
          "delay_hours": { "type": "integer" },
          "timeframe": { "type": "string", "enum": ["5m", "15m", "1h", "4h"] },
          "as_of": { "type": ["string", "null"] },
          "by_timeframe": { "type": "object" },
          "proof": {
            "type": "object",
            "properties": {
              "graded_outcomes": { "type": ["integer", "null"] },
              "coverage_80_pct": { "type": ["number", "null"] }
            }
          },
          "target_odds": {
            "type": ["object", "null"],
            "description": "Optional calibrated tail-bound probability (returned when target_price is supplied; honest upper/lower bounds rather than extrapolated point tails).",
            "properties": {
              "target_price": { "type": "number" },
              "p_above_lower_bound": { "type": ["number", "null"] },
              "p_above_upper_bound": { "type": ["number", "null"] },
              "tail": { "type": ["string", "null"], "enum": ["below_q10", "q10_q25", "q25_q50", "q50_q75", "q75_q90", "above_q90", null] }
            }
          }
        }
      },
      "ScorecardResponse": {
        "type": "object",
        "required": ["product", "status", "degraded_models", "models"],
        "properties": {
          "product": { "type": "string", "const": "cohorra_scorecard" },
          "status": { "type": "string", "enum": ["ok", "degraded"] },
          "degraded_models": {
            "type": "array",
            "items": { "type": "string" },
            "description": "Top-level list of model feed slugs currently flagged by the automatic circuit breaker (empty when all feeds are healthy)."
          },
          "read_at_ms": { "type": ["integer", "null"] },
          "models": { "type": "object" }
        }
      },
      "PackManifestEntry": {
        "type": "object",
        "required": ["size_label", "rows_label", "datasets_count", "coverage"],
        "properties": {
          "id": { "type": "string" },
          "name": { "type": "string" },
          "usd": { "type": "number" },
          "size_label": { "type": "string" },
          "rows_label": { "type": "string" },
          "datasets_count": { "type": "integer" },
          "markets_label": { "type": "string" },
          "days": { "type": "integer" },
          "files_label": { "type": "string" },
          "updated_at": { "type": "string", "format": "date" },
          "coverage": {
            "type": "array",
            "items": {
              "type": "array",
              "prefixItems": [{ "type": "string" }, { "type": "string" }],
              "minItems": 2,
              "maxItems": 2
            }
          }
        }
      },
      "PacksManifestResponse": {
        "type": "object",
        "required": ["updated_at", "packs"],
        "properties": {
          "updated_at": { "type": "string", "format": "date" },
          "packs": {
            "type": "object",
            "required": ["hl_series_v1", "hl_full_v1"],
            "properties": {
              "hl_series_v1": { "$ref": "#/components/schemas/PackManifestEntry" },
              "hl_full_v1": { "$ref": "#/components/schemas/PackManifestEntry" }
            }
          }
        }
      },
      "McpRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": { "type": "string", "const": "2.0" },
          "id": { "type": ["string", "integer", "null"] },
          "method": { "type": "string", "example": "tools/list" },
          "params": { "type": "object" }
        }
      }
    }
  },
  "paths": {
    "/v1/data/scorecard": {
      "get": {
        "operationId": "getDataScorecard",
        "summary": "Live verification scorecard across all Data API models",
        "description": "Public rolling verification scorecard reporting coverage, skill, and automatic circuit-breaker status (`degraded_models`) across Cohorra's Data API models. Always live on Free/keyless, Builder, and Scale.",
        "responses": {
          "200": {
            "description": "Live verification scorecard",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScorecardResponse" } } }
          },
          "503": { "description": "Scorecard temporarily unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/v1/data/packs": {
      "get": {
        "operationId": "getArchivePacksManifest",
        "summary": "Live Parquet archive pack manifest",
        "description": "Returns the current live ZIP sizes, row counts, dataset counts, and exact date coverage for downloadable Parquet archive packs (`hl_series_v1` and `hl_full_v1`).",
        "responses": {
          "200": {
            "description": "Live archive pack manifest",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PacksManifestResponse" } } }
          }
        }
      }
    },
    "/v1/data/hl/levels": {
      "get": {
        "operationId": "getHyperliquidLevels",
        "summary": "Whole-chain Hyperliquid liquidation levels (357 markets)",
        "description": "Returns chain-state liquidation clusters (`ladder.rows`) and hourly history across open Hyperliquid positions across 357 main and HIP-3 perpetuals. Free/keyless returns a 24h window delayed 24h (`t-48h` to `t-24h`); Builder returns live (<60s) 24h rolling; Scale returns live (<60s) 96h rolling.",
        "parameters": [
          { "$ref": "#/components/parameters/coin" },
          { "$ref": "#/components/parameters/hours" },
          { "$ref": "#/components/parameters/asOf" }
        ],
        "responses": {
          "200": {
            "description": "Chain-state liquidation levels",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LevelsResponse" } } }
          },
          "400": { "description": "Invalid parameter (e.g. malformed as_of timestamp)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "401": { "description": "Invalid API key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "429": { "description": "Rate limit exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/v1/data/hl/positioning": {
      "get": {
        "operationId": "getHyperliquidPositioning",
        "summary": "Wallet-level Hyperliquid positioning (357 markets)",
        "description": "Returns aggregated chain-state long/short exposure and margin distribution across 130,000+ Hyperliquid wallets and 357 main and HIP-3 perpetuals. Free/keyless returns a 24h window delayed 24h; Builder returns live (<60s) 24h rolling; Scale returns live (<60s) 96h rolling.",
        "parameters": [
          { "$ref": "#/components/parameters/coin" },
          { "$ref": "#/components/parameters/hours" },
          { "$ref": "#/components/parameters/asOf" }
        ],
        "responses": {
          "200": {
            "description": "Chain-state positioning summary",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PositioningResponse" } } }
          },
          "400": { "description": "Invalid parameter", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "401": { "description": "Invalid API key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "429": { "description": "Rate limit exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/v1/data/hl/cascade": {
      "get": {
        "operationId": "getHyperliquidCascade",
        "summary": "Forward-calibrated 30-minute cascade risk (14 markets)",
        "description": "Returns forward-calibrated 30-minute liquidation cascade simulation and 10th-90th percentile uncertainty bands across +/-1% and +/-2% moves (+33.3% closer live than a static liquidation map) across 14 liquid Hyperliquid perpetuals. Free/keyless includes 24h-delayed BTC & ETH preview; Builder and Scale return live (<60s) across all 14 covered markets.",
        "parameters": [
          { "$ref": "#/components/parameters/coin" }
        ],
        "responses": {
          "200": {
            "description": "30-minute cascade risk reading",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CascadeResponse" } } }
          },
          "403": { "description": "Paid Builder or Scale tier required for non-preview coins", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "404": { "description": "Coin outside covered markets (see covered_coins)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "429": { "description": "Rate limit exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/v1/data/hl/book-walls": {
      "get": {
        "operationId": "getHyperliquidBookWalls",
        "summary": "Resting order-book wall hold probabilities (10 liquid crypto perps)",
        "description": "Returns large resting bid/ask walls with calibrated hold probabilities across 10 liquid Hyperliquid crypto perpetuals (AAVE, AVAX, BTC, DOGE, ETH, HYPE, LINK, SOL, SUI, XRP; HIP-3 excluded on live API, while scorecard also grades historical HIP-3 walls). Free/keyless includes 24h-delayed BTC & ETH preview; Builder and Scale return live (<60s) across all 10 covered perps.",
        "parameters": [
          { "$ref": "#/components/parameters/coin" }
        ],
        "responses": {
          "200": {
            "description": "Resting-wall probabilities",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BookWallsResponse" } } }
          },
          "403": { "description": "Paid Builder or Scale tier required for non-preview coins", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "404": { "description": "Coin outside covered markets (HIP-3 excluded on live API; see covered_coins)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/v1/data/hl/order-cost": {
      "get": {
        "operationId": "getHyperliquidOrderCost",
        "summary": "Calibrated order-cost ladder and 30-second book replenishment (10 liquid crypto perps)",
        "description": "Returns precomputed execution impact ladders across $50K-$5M clip sizes for buy and sell market orders (`book_walk_bp`, `expected_impact_bp`, `impact_p10_bp`, `impact_p90_bp`, `replenishment_30s_pct`) across 10 liquid Hyperliquid crypto perpetuals (HIP-3 excluded on live API). Free/keyless includes 24h-delayed BTC & ETH preview; Builder and Scale return live (<60s) across all 10 covered perps.",
        "parameters": [
          { "$ref": "#/components/parameters/coin" },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "description": "Optional order side filter (`buy` or `sell`). Omit to return both sides.",
            "schema": { "type": "string", "enum": ["buy", "sell"] }
          }
        ],
        "responses": {
          "200": {
            "description": "Calibrated order-cost ladder",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderCostResponse" } } }
          },
          "403": { "description": "Paid Builder or Scale tier required for non-preview coins", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "404": { "description": "Coin outside covered markets (see covered_coins)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/v1/data/hl/wallet-groups": {
      "get": {
        "operationId": "getHyperliquidWalletGroups",
        "x-stability": "experimental",
        "summary": "Anonymized co-trading whale clusters (experimental, ~290+ markets)",
        "description": "Experimental endpoint (MCP tool `cohorra_hl_wallet_groups`): returns anonymized cohorts of wallets (>=5 wallet floor, zero addresses) exhibiting synchronized co-trading behavior and their net exposure across ~290+ Hyperliquid main and HIP-3 markets. Descriptive holdings only, no direction claim. Free/keyless includes 24h-delayed preview (top 5 groups, BTC/ETH forced liquidation levels); Builder and Scale return live (<60s) across all active cohorts and markets.",
        "parameters": [
          { "$ref": "#/components/parameters/coinOptional" }
        ],
        "responses": {
          "200": {
            "description": "Anonymized co-trading clusters",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WalletGroupsResponse" } } }
          },
          "403": { "description": "Paid Builder or Scale tier required for non-preview coins", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/v1/data/hl/funding-forecast": {
      "get": {
        "operationId": "getHyperliquidFundingForecast",
        "summary": "Hyperliquid-native funding forecast (13 crypto perps, k=3 & k=8)",
        "description": "Returns Hyperliquid-native funding rate forecasts at k=3 and k=8 hourly settlement horizons built strictly from Hyperliquid market state across 13 covered crypto perpetuals (AAVE, ARB, BTC, DOGE, ETH, HYPE, LINK, LIT, NEAR, SOL, XMR, XRP, ZEC). Free/keyless includes 24h-delayed BTC & ETH preview; Builder and Scale return live (<60s) across all 13 covered markets.",
        "parameters": [
          { "$ref": "#/components/parameters/coin" }
        ],
        "responses": {
          "200": {
            "description": "Hyperliquid-native funding rate forecast",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FundingForecastResponse" } } }
          },
          "403": { "description": "Paid Builder or Scale tier required for non-preview coins", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "404": { "description": "Coin outside covered markets (see covered_coins)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/v1/data/range": {
      "get": {
        "operationId": "getRangeForecast",
        "summary": "Calibrated Range price forecast bands (33 markets; 5m, 15m, 1h, 4h)",
        "description": "Returns 100% own-data calibrated 80% wide and 50% narrow price forecast bands across 33 tracked markets (9 crypto + 24 HIP-3 equity, index, and commodity perpetuals) on 5m, 15m, 1h, and 4h timeframes, plus honest tail-bound target-price odds. Public scorecard at https://cohorra.com/suite/range. Free/keyless includes 24h-delayed BTC & ETH preview; Builder and Scale return live (<60s) across all 33 covered markets.",
        "parameters": [
          { "$ref": "#/components/parameters/coin" },
          {
            "name": "timeframe",
            "in": "query",
            "required": false,
            "description": "Chart timeframe (`5m`, `15m`, `1h`, or `4h`; defaults to `1h`).",
            "schema": { "type": "string", "enum": ["5m", "15m", "1h", "4h"], "default": "1h" }
          },
          {
            "name": "target_price",
            "in": "query",
            "required": false,
            "description": "Optional target price for calibrated upper/lower tail-bound touch odds (`p_above_lower_bound`, `p_above_upper_bound`, `tail`).",
            "schema": { "type": "number" }
          }
        ],
        "responses": {
          "200": {
            "description": "Calibrated Range forecast bands",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RangeResponse" } } }
          },
          "403": { "description": "Paid Builder or Scale tier required for non-preview coins", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "404": { "description": "Coin outside covered markets (see covered_coins)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/v1/data/mcp": {
      "post": {
        "operationId": "callMcpEndpoint",
        "summary": "Model Context Protocol (MCP) JSON-RPC endpoint",
        "description": "Streamable HTTP JSON-RPC 2.0 MCP endpoint exposing all 9 Cohorra tools (`cohorra_scorecard`, `cohorra_hl_levels`, `cohorra_hl_positioning`, `cohorra_hl_cascade`, `cohorra_funding_forecast`, `cohorra_range`, `cohorra_hl_book_walls`, `cohorra_hl_order_cost`, and experimental `cohorra_hl_wallet_groups`). Free/keyless access provides live `cohorra_scorecard` plus 24h-delayed previews; Builder and Scale provide live (<60s) responses across all covered markets.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/McpRequest" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 MCP tool response",
            "content": { "application/json": { "schema": { "type": "object" } } }
          },
          "401": { "description": "Invalid API key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "429": { "description": "Rate limit exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    }
  }
}
