get_market_history
Retrieve price history data for prediction markets on Kalshi or Polymarket over specified time periods to analyze market trends and support trading decisions.
Instructions
Get price history for a prediction market over a configurable period.
Args: platform: Platform: "kalshi" or "polymarket". market_id: Platform-specific market identifier. period: History window: "48h", "7d", or "30d". max_points: Maximum data points to return.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | ||
| market_id | Yes | ||
| period | No | 7d | |
| max_points | No |
Implementation Reference
- src/rekko_mcp/server.py:103-118 (handler)The get_market_history tool implementation, which acts as a handler for the MCP tool and calls the internal _request helper.
async def get_market_history( platform: str, market_id: str, period: str = "7d", max_points: int = 48 ) -> str: """Get price history for a prediction market over a configurable period. Args: platform: Platform: "kalshi" or "polymarket". market_id: Platform-specific market identifier. period: History window: "48h", "7d", or "30d". max_points: Maximum data points to return. """ return await _request( "GET", f"/v1/markets/{platform}/{market_id}/history", params={"period": period, "max_points": max_points}, )