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, ALL_TIME, 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.\nALL_TIME is full history. It resolves to 2009-01-03. Use ALL_TIME instead of a very large day count.\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"
      -  }
      -]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, ALL_TIME, XMIN_AGO, XD_AGO, XH_AGO, XY_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.\nDurations are exact rolling UTC timestamps at both ends: 1D_AGO equals 24H_AGO; 1Y_AGO equals 365 days. Bare duration aliases and case variants are supported.\nExplicit dates and calendar tokens keep calendar boundaries and inclusive final dates. TODAY_START is current-day midnight. Date-only endpoints keep their calendar contracts.\nALL_TIME is full history. It resolves to 2009-01-03. Use ALL_TIME instead of a very large day count.\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 token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps; dates and calendar tokens start at midnight.",
      +                "type": "string"
      +              },
      +              "to": {
      +                "description": "End token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps without an extra day. Dates and calendar tokens include the final date; TODAY_START stays at midnight.",
      +                "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. 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": [
      -          {
      -            "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"
      -  }
      -]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, ALL_TIME, 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.\nALL_TIME is full history. It resolves to 2009-01-03. Use ALL_TIME instead of a very large day count.\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"
      +  }
      +]
  3. 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"
      +  }
      +]
  4. 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"
      +  }
      +]
  5. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources