{
  "name": "Market History",
  "description": "Historical market data: datasets, symbol search, per-instrument coverage, exact cost estimates, OHLCV bars, crypto funding rates and corporate actions. Every call needs the account's API key or OAuth sign-in; data skills spend the account's bars exactly like the REST API and the MCP server. Each request is one message with one data part: {\"skill\": \"<skill id>\", \"arguments\": {...}}.",
  "supportedInterfaces": [
    {
      "url": "https://getmarkethistory.com/a2a",
      "protocolBinding": "JSONRPC",
      "protocolVersion": "1.0"
    }
  ],
  "provider": {
    "organization": "Market History",
    "url": "https://getmarkethistory.com"
  },
  "version": "1.0.0",
  "documentationUrl": "https://getmarkethistory.com/docs/a2a",
  "capabilities": {
    "streaming": false,
    "pushNotifications": false,
    "extendedAgentCard": false
  },
  "securitySchemes": {
    "apiKey": {
      "httpAuthSecurityScheme": {
        "scheme": "Bearer",
        "description": "An API key (mh_live_...) from the dashboard, https://getmarkethistory.com/dashboard."
      }
    },
    "oauth": {
      "oauth2SecurityScheme": {
        "description": "OAuth 2.1 sign-in with PKCE (the MCP server's authorization server).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://getmarkethistory.com/oauth/authorize",
            "tokenUrl": "https://getmarkethistory.com/oauth/token",
            "scopes": {
              "mcp": "Read market data and spend the account's bars"
            },
            "pkceRequired": true
          }
        },
        "oauth2MetadataUrl": "https://getmarkethistory.com/.well-known/oauth-authorization-server"
      }
    }
  },
  "securityRequirements": [
    {
      "schemes": {
        "apiKey": {
          "list": []
        }
      }
    },
    {
      "schemes": {
        "oauth": {
          "list": [
            "mcp"
          ]
        }
      }
    }
  ],
  "defaultInputModes": [
    "application/json"
  ],
  "defaultOutputModes": [
    "text/plain"
  ],
  "skills": [
    {
      "id": "search_symbols",
      "name": "search_symbols",
      "description": "Find instruments by ticker or by name. Tickers containing the query come first (exact matches first); then instruments whose name holds every word of the query as the start of a word, in any order (\"trump 2028\" finds a prediction market's outcomes, \"apple\" finds AAPL), active ones and the most recently traded first, with their name and status. In one dataset with a ticker match, each one's first and last bar instead. Free: costs no bars.\n\nSend one data part {\"skill\": \"search_symbols\", \"arguments\": {...}}; arguments follow this JSON Schema: {\"type\":\"object\",\"properties\":{\"dataset\":{\"type\":\"string\",\"description\":\"Dataset id from get_coverage, e.g. stocks/us, crypto/perps, predictions/global. Omit to search every dataset.\"},\"query\":{\"type\":\"string\",\"description\":\"Case-insensitive: a substring of the ticker (AAPL, BTC) or words of the name (trump election, bitcoin above).\"},\"status\":{\"type\":\"string\",\"enum\":[\"active\",\"inactive\"],\"description\":\"Only instruments listed (active) or delisted, expired or resolved (inactive).\"},\"timeframe\":{\"type\":\"string\",\"description\":\"Timeframe whose index to search; default the dataset's finest.\"}},\"required\":[\"query\"]}",
      "tags": [
        "search",
        "free"
      ],
      "examples": [
        "{\"skill\":\"search_symbols\",\"arguments\":{\"query\":\"apple\"}}"
      ]
    },
    {
      "id": "inspect_instrument",
      "name": "inspect_instrument",
      "description": "What one symbol has: each product (bar timeframes with first and last bar and row count, L3/L2 sessions, depth, funding, perpetual prices, open interest, book depth, corporate actions) and the API route serving it, plus related instruments (the same asset in other markets, a stock's option chain, an option's underlying). Free: costs no bars.\n\nSend one data part {\"skill\": \"inspect_instrument\", \"arguments\": {...}}; arguments follow this JSON Schema: {\"type\":\"object\",\"properties\":{\"dataset\":{\"type\":\"string\",\"description\":\"Dataset id from get_coverage (asset/region), e.g. stocks/us.\"},\"ticker\":{\"type\":\"string\",\"description\":\"Ticker, e.g. AAPL or BTCUSDT (case-sensitive).\"},\"feed\":{\"type\":\"string\",\"description\":\"Optional feed of a dataset with several (get_coverage lists them per dataset at /api/v1/{dataset}), e.g. bybit on crypto/perps. Default: the dataset's first feed holding the ticker.\"}},\"required\":[\"dataset\",\"ticker\"]}",
      "tags": [
        "instrument",
        "free"
      ],
      "examples": [
        "{\"skill\":\"inspect_instrument\",\"arguments\":{\"dataset\":\"stocks/us\",\"ticker\":\"AAPL\"}}"
      ]
    },
    {
      "id": "estimate_cost",
      "name": "estimate_cost",
      "description": "Exactly how many bars get_bars (or get_funding) would bill for one symbol and range, before pulling it: the API counts the rows without returning them. Call it before any large pull. Free: costs no bars.\n\nSend one data part {\"skill\": \"estimate_cost\", \"arguments\": {...}}; arguments follow this JSON Schema: {\"type\":\"object\",\"properties\":{\"dataset\":{\"type\":\"string\",\"description\":\"Dataset id from get_coverage (asset/region), e.g. stocks/us.\"},\"ticker\":{\"type\":\"string\",\"description\":\"Ticker, e.g. AAPL or BTCUSDT (case-sensitive).\"},\"feed\":{\"type\":\"string\",\"description\":\"Optional feed of a dataset with several (get_coverage lists them per dataset at /api/v1/{dataset}), e.g. bybit on crypto/perps. Default: the dataset's first feed holding the ticker.\"},\"product\":{\"type\":\"string\",\"enum\":[\"bars\",\"funding\"],\"description\":\"What to price, default bars.\"},\"timeframe\":{\"type\":\"string\",\"description\":\"Bars only: timeframe, e.g. 1m, 1h, 1d (any whole multiple of a stored one).\"},\"start\":{\"type\":\"string\",\"description\":\"Inclusive start, RFC 3339 or YYYY-MM-DD.\"},\"end\":{\"type\":\"string\",\"description\":\"Inclusive end, RFC 3339 or YYYY-MM-DD (a date is the whole UTC day).\"},\"tz\":{\"type\":\"string\",\"description\":\"Bars only: tz as get_bars takes it.\"},\"hours\":{\"type\":\"string\",\"enum\":[\"regular\",\"extended\"],\"description\":\"Bars only: hours as get_bars takes it (regular by default).\"}},\"required\":[\"dataset\",\"ticker\"]}",
      "tags": [
        "cost",
        "free"
      ],
      "examples": [
        "{\"skill\":\"estimate_cost\",\"arguments\":{\"dataset\":\"stocks/us\",\"ticker\":\"AAPL\",\"timeframe\":\"1m\",\"start\":\"2025-01-01\",\"end\":\"2025-12-31\"}}"
      ]
    },
    {
      "id": "get_coverage",
      "name": "get_coverage",
      "description": "List the datasets (ids to pass as `dataset`), what each holds, its timeframes and its first and last date. Free: costs no bars.\n\nSend one data part {\"skill\": \"get_coverage\", \"arguments\": {...}}; arguments follow this JSON Schema: {\"type\":\"object\",\"properties\":{}}",
      "tags": [
        "coverage",
        "free"
      ],
      "examples": [
        "{\"skill\":\"get_coverage\",\"arguments\":{}}"
      ]
    },
    {
      "id": "get_bars",
      "name": "get_bars",
      "description": "OHLCV bars for one symbol as CSV, oldest first, up to 2000 rows a call; continue with next_cursor. Billed per call: the rows returned, rounded up to the next 100 bars (1 row = 1 bar). Free monthly bars pay for bars at 1h and longer only; everything else spends bought bars. Before a large pull, call estimate_cost (free).\n\nSend one data part {\"skill\": \"get_bars\", \"arguments\": {...}}; arguments follow this JSON Schema: {\"type\":\"object\",\"properties\":{\"dataset\":{\"type\":\"string\",\"description\":\"Dataset id from get_coverage (asset/region), e.g. stocks/us.\"},\"ticker\":{\"type\":\"string\",\"description\":\"Ticker, e.g. AAPL or BTCUSDT.\"},\"feed\":{\"type\":\"string\",\"description\":\"Optional feed of a dataset with several (get_coverage lists them per dataset at /api/v1/{dataset}), e.g. bybit on crypto/perps. Default: the dataset's first feed holding the ticker.\"},\"timeframe\":{\"type\":\"string\",\"description\":\"Bar timeframe, e.g. 1m, 1h, 1d. Free bars pay for 1h and longer only.\"},\"start\":{\"type\":\"string\",\"description\":\"Inclusive start, RFC 3339 or YYYY-MM-DD.\"},\"end\":{\"type\":\"string\",\"description\":\"Inclusive end, RFC 3339 or YYYY-MM-DD (a date is the whole UTC day).\"},\"limit\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":2000,\"description\":\"Rows, default 500, at most 2000.\"},\"cursor\":{\"type\":\"string\",\"description\":\"next_cursor from the previous call, to continue.\"},\"adjust\":{\"type\":\"string\",\"enum\":[\"raw\",\"splits\",\"all\",\"rolls\",\"dividends\"],\"description\":\"raw (default). stocks/us: splits, or all (splits and dividends). CFD datasets (commodities/global, indices/global, bonds/global): rolls (contract rolls back-adjusted), dividends (index dividend adjustments), or all (both).\"},\"tz\":{\"type\":\"string\",\"description\":\"Which day 1d, 1w, 1M and 1Y bars follow: exchange (default, the listing or underlying exchange's trading day, e.g. 17:00 New York for spot FX), venue (the quoting venue's), UTC, an IANA zone such as Asia/Tokyo, or a UTC offset such as UTC+1 or -3 (local midnight there).\"},\"hours\":{\"type\":\"string\",\"enum\":[\"regular\",\"extended\"],\"description\":\"stocks/us only: regular (default) keeps 09:30-16:00 New York (13:00 on early closes) on every timeframe, so a 1d bar is the regular session; extended adds pre-market, after-hours and overnight rows. Other datasets ignore it.\"}},\"required\":[\"dataset\",\"ticker\",\"timeframe\"]}",
      "tags": [
        "ohlcv",
        "bars",
        "billed"
      ],
      "examples": [
        "{\"skill\":\"get_bars\",\"arguments\":{\"dataset\":\"stocks/us\",\"ticker\":\"AAPL\",\"timeframe\":\"1d\",\"start\":\"2025-01-01\",\"end\":\"2025-01-31\"}}"
      ]
    },
    {
      "id": "get_funding",
      "name": "get_funding",
      "description": "Funding rate events of one crypto perpetual (dataset crypto/perps) as CSV, up to 2000 rows a call. Paid: free bars never pay for it; 1 row = 1 bar, rounded up to the next 100 per call. Before a large pull, check its span with inspect_instrument (free).\n\nSend one data part {\"skill\": \"get_funding\", \"arguments\": {...}}; arguments follow this JSON Schema: {\"type\":\"object\",\"properties\":{\"ticker\":{\"type\":\"string\",\"description\":\"The perpetual, e.g. BTCUSDT.\"},\"feed\":{\"type\":\"string\",\"description\":\"Optional venue feed of crypto/perps, e.g. binance (default) or bybit.\"},\"start\":{\"type\":\"string\",\"description\":\"Inclusive start, RFC 3339 or YYYY-MM-DD.\"},\"end\":{\"type\":\"string\",\"description\":\"Inclusive end, RFC 3339 or YYYY-MM-DD (a date is the whole UTC day).\"},\"limit\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":2000,\"description\":\"Rows, default 500, at most 2000.\"},\"cursor\":{\"type\":\"string\",\"description\":\"next_cursor from the previous call, to continue.\"}},\"required\":[\"ticker\"]}",
      "tags": [
        "funding",
        "crypto",
        "billed"
      ],
      "examples": [
        "{\"skill\":\"get_funding\",\"arguments\":{\"ticker\":\"BTCUSDT\",\"start\":\"2025-01-01\",\"end\":\"2025-01-31\"}}"
      ]
    },
    {
      "id": "get_corporate_actions",
      "name": "get_corporate_actions",
      "description": "Corporate actions of one ticker as CSV: splits, dividends, symbol changes and mergers of a stock (dataset stocks/us, the default), or a CFD's contract rolls and index dividend adjustments (dataset commodities/global, indices/global or bonds/global). start and end filter on the ex-date (the process date when there is none). A stock's announced actions are listed up to 90 days ahead and refreshed nightly until paid; an empty result means no rows are loaded, not a verified absence of events. Billed per call: the rows returned, rounded up to the next 100 bars (1 row = 1 bar). Free monthly bars pay for bars at 1h and longer only; everything else spends bought bars. An account that never bought bars or a plan pays at least 1,000 bars a call.\n\nSend one data part {\"skill\": \"get_corporate_actions\", \"arguments\": {...}}; arguments follow this JSON Schema: {\"type\":\"object\",\"properties\":{\"dataset\":{\"type\":\"string\",\"description\":\"stocks/us (default), commodities/global, indices/global or bonds/global.\"},\"ticker\":{\"type\":\"string\",\"description\":\"Ticker, e.g. AAPL or BRENT.CMD.\"},\"start\":{\"type\":\"string\",\"description\":\"Inclusive start, RFC 3339 or YYYY-MM-DD.\"},\"end\":{\"type\":\"string\",\"description\":\"Inclusive end, RFC 3339 or YYYY-MM-DD (a date is the whole UTC day).\"}},\"required\":[\"ticker\"]}",
      "tags": [
        "corporate-actions",
        "billed"
      ],
      "examples": [
        "{\"skill\":\"get_corporate_actions\",\"arguments\":{\"ticker\":\"AAPL\"}}"
      ]
    }
  ]
}