Skip to main content
Glama

Loading prediction market prices

prediction_market_ohlcv
Read-only

Historical odds/volume candles for a Polymarket market.

When to use:

  • Current odds / implied probability, price history, and recent probability changes on a specific market.

Key fields:

  • Close is the share price for the displayed outcome side.

  • In binary markets, Yes and No shares are complementary and sum to about $1.

Pitfalls:

  • Each response is for one exact marketId — do not mix dates or prices across different markets.

  • If no candles are returned for the requested window, say so directly — do not estimate.

Prerequisites: If marketId is unknown, call prediction_market_lookup first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "description": "Request for historical prediction market OHLCV.",
      -    "properties": {
      -      "dateRange": {
      -        "anyOf": [
      -          {
      -            "description": "Date range via tokens or dates.\nTokens: NOW, XMIN_AGO, XD_AGO, XH_AGO; THIS_YEAR_START, THIS_QUARTER_START, THIS_MONTH_START, THIS_WEEK_START, TODAY_START; LAST_WEEK_START/END, LAST_MONTH_START/END, LAST_QUARTER_START/END, LAST_YEAR_START/END.\nWeek starts Monday. Quarters are calendar. Dates: YYYY-MM-DD or ___-MM-DD (year omitted).\nPlease check detailed system instructions for more information.",
      -            "properties": {
      -              "from": {
      -                "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -                "type": "string"
      -              },
      -              "to": {
      -                "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "from",
      -              "to"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Optional date range for OHLCV. Defaults to the last 30 days when omitted."
      -      },
      -      "marketId": {
      -        "description": "Numeric Polymarket market ID (e.g. '654412'). Obtain this from the prediction_market_screener tool.",
      -        "maxLength": 100,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "orderBy": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Optional sort field. Common fields: periodStart, volumeUsd, tradeCount."
      -      },
      -      "orderByDirection": {
      -        "default": "desc",
      -        "description": "Sort direction when orderBy is provided.",
      -        "enum": [
      -          "asc",
      -          "desc",
      -          "ASC",
      -          "DESC"
      -        ],
      -        "type": "string"
      -      },
      -      "page": {
      -        "default": 1,
      -        "description": "Page number for paginated results.",
      -        "minimum": 1,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "marketId"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "Request for historical prediction market OHLCV.",
      +    "properties": {
      +      "dateRange": {
      +        "anyOf": [
      +          {
      +            "description": "Date range via tokens or dates.\nTokens: NOW, XMIN_AGO, XD_AGO, XH_AGO; THIS_YEAR_START, THIS_QUARTER_START, THIS_MONTH_START, THIS_WEEK_START, TODAY_START; LAST_WEEK_START/END, LAST_MONTH_START/END, LAST_QUARTER_START/END, LAST_YEAR_START/END.\nWeek starts Monday. Quarters are calendar. Dates: YYYY-MM-DD or ___-MM-DD (year omitted).\nPlease check detailed system instructions for more information.",
      +            "properties": {
      +              "from": {
      +                "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +                "type": "string"
      +              },
      +              "to": {
      +                "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "from",
      +              "to"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Optional date range for OHLCV. Defaults to the last 30 days when omitted."
      +      },
      +      "marketId": {
      +        "description": "Numeric Polymarket market ID (e.g. '654412'). Obtain this from the prediction_market_screener tool.",
      +        "maxLength": 100,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "orderBy": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "period_start",
      +              "volume_usd",
      +              "trade_count"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Sort field. Pass an exact value above or None for default ('period_start')."
      +      },
      +      "orderByDirection": {
      +        "default": "DESC",
      +        "description": "Sort direction: 'ASC' or 'DESC' (case-insensitive).",
      +        "enum": [
      +          "ASC",
      +          "DESC",
      +          "asc",
      +          "desc"
      +        ],
      +        "type": "string"
      +      },
      +      "page": {
      +        "default": 1,
      +        "description": "Page number for paginated results.",
      +        "minimum": 1,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "marketId"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed3 schema fields changed
    • removedInput schema / $defs
      Removed value: -{
      -  "DateRange": {
      -    "description": "Date range via tokens or dates.\nTokens: NOW, XMIN_AGO, XD_AGO, XH_AGO; THIS_YEAR_START, THIS_QUARTER_START, THIS_MONTH_START, THIS_WEEK_START, TODAY_START; LAST_WEEK_START/END, LAST_MONTH_START/END, LAST_QUARTER_START/END, LAST_YEAR_START/END.\nWeek starts Monday. Quarters are calendar. Dates: YYYY-MM-DD or ___-MM-DD (year omitted).\nPlease check detailed system instructions for more information.",
      -    "properties": {
      -      "from": {
      -        "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -        "type": "string"
      -      },
      -      "to": {
      -        "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "from",
      -      "to"
      -    ],
      -    "type": "object"
      -  },
      -  "PredictionMarketOhlcvRequest": {
      -    "description": "Request for historical prediction market OHLCV.",
      -    "properties": {
      -      "dateRange": {
      -        "anyOf": [
      -          {
      -            "$ref": "#/$defs/DateRange"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Optional date range for OHLCV. Defaults to the last 30 days when omitted."
      -      },
      -      "marketId": {
      -        "description": "Numeric Polymarket market ID (e.g. '654412'). Obtain this from the prediction_market_screener tool.",
      -        "maxLength": 100,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "orderBy": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Optional sort field. Common fields: periodStart, volumeUsd, tradeCount."
      -      },
      -      "orderByDirection": {
      -        "default": "desc",
      -        "description": "Sort direction when orderBy is provided.",
      -        "enum": [
      -          "asc",
      -          "desc",
      -          "ASC",
      -          "DESC"
      -        ],
      -        "type": "string"
      -      },
      -      "page": {
      -        "default": 1,
      -        "description": "Page number for paginated results.",
      -        "minimum": 1,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "marketId"
      -    ],
      -    "type": "object"
      -  }
      -}
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "$ref": "#/$defs/PredictionMarketOhlcvRequest"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "Request for historical prediction market OHLCV.",
      +    "properties": {
      +      "dateRange": {
      +        "anyOf": [
      +          {
      +            "description": "Date range via tokens or dates.\nTokens: NOW, XMIN_AGO, XD_AGO, XH_AGO; THIS_YEAR_START, THIS_QUARTER_START, THIS_MONTH_START, THIS_WEEK_START, TODAY_START; LAST_WEEK_START/END, LAST_MONTH_START/END, LAST_QUARTER_START/END, LAST_YEAR_START/END.\nWeek starts Monday. Quarters are calendar. Dates: YYYY-MM-DD or ___-MM-DD (year omitted).\nPlease check detailed system instructions for more information.",
      +            "properties": {
      +              "from": {
      +                "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +                "type": "string"
      +              },
      +              "to": {
      +                "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "from",
      +              "to"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Optional date range for OHLCV. Defaults to the last 30 days when omitted."
      +      },
      +      "marketId": {
      +        "description": "Numeric Polymarket market ID (e.g. '654412'). Obtain this from the prediction_market_screener tool.",
      +        "maxLength": 100,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "orderBy": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Optional sort field. Common fields: periodStart, volumeUsd, tradeCount."
      +      },
      +      "orderByDirection": {
      +        "default": "desc",
      +        "description": "Sort direction when orderBy is provided.",
      +        "enum": [
      +          "asc",
      +          "desc",
      +          "ASC",
      +          "DESC"
      +        ],
      +        "type": "string"
      +      },
      +      "page": {
      +        "default": 1,
      +        "description": "Page number for paginated results.",
      +        "minimum": 1,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "marketId"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context beyond this, such as the warning that each response is for one exact marketId (do not mix across markets) and the instruction to say so directly if no candles are returned rather than estimating. These add practical pitfalls not present in annotations.

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?

The description is well organized with bolded section headers ('When to use', 'Key fields', 'Pitfalls', 'Prerequisites') and is front-loaded with the core purpose. Each section adds practical value without significant fluff, though it could be slightly tighter.

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

Completeness4/5

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

Given the tool's complexity (nested request object) and the presence of an output schema, the description covers prerequisites, key field semantics, and common pitfalls. It does not detail date range defaults or pagination in prose, but those are already documented in the input schema, and the output schema handles return value expectations. Overall, it is sufficiently complete for correct invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for parameter meaning. However, it does not explain the request object structure, dateRange tokens, orderBy options, or pagination. It only implicitly mentions marketId and explains the Close field's meaning. This fails to fill the gap left by the missing schema description.

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?

The opening line 'Historical odds/volume candles for a Polymarket market' states a specific verb, resource, and data type. The 'When to use' section further clarifies it covers current odds, implied probability, price history, and recent probability changes, which distinguishes it from sibling tools like prediction_market_orderbook or prediction_market_trades.

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

Usage Guidelines4/5

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

The description includes a 'When to use' section and a 'Prerequisites' note that tells the agent to call prediction_market_lookup if marketId is unknown. It does not explicitly state when not to use this tool or compare against alternatives like orderbook or trades, but it gives enough context for an agent to select it correctly.

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.

Resources