Prediction Market OHLC Probability Candlesticks
Retrieve historical OHLC probability candlesticks (open, high, low, close, change_bps, tick_count) for any Polymarket contract slug, CLOB token ID, or "latest_active".
curl -sG "https://api.agentapigate.ai/v1/prediction/markets/candles" \ --data-urlencode "market=latest_active" \ --data-urlencode "resolution=1h" \ --data-urlencode "limit=24" \ --data-urlencode "format=md" \ -H "Authorization: Bearer aag_live_YOUR_KEY" \ -H "X-AAG-Max-Cost: 0.0100"
# Prediction Market OHLC Probability Candlesticks (`prediction.markets.candles`) **market_slug**: will-there-be-no-change-in-fed-interest-rates-after-the-december-2026-meeting-20260729232808635 · **token_id**: 42865728742506860386768556888821101266630139112044622335353850919229585308601 · **question**: Will there be no change in Fed interest rates after the December 2026 meeting? · **resolution**: 1h · **count**: 24 ## candles - [1] timestamp: 1796065200, iso_time: 2026-11-30T19:00:00.000Z, open: 0.0185, high: 0.0215, low: 0.0185 - [2] timestamp: 1796068800, iso_time: 2026-11-30T20:00:00.000Z, open: 0.0255, high: 0.0255, low: 0.0225 - [3] timestamp: 1796072400, iso_time: 2026-11-30T21:00:00.000Z, open: 0.0225, high: 0.0255, low: 0.022 - [4] timestamp: 1796076000, iso_time: 2026-11-30T22:00:00.000Z, open: 0.0245, high: 0.0245, low: 0.0235 - [5] timestamp: 1796079600, iso_time: 2026-11-30T23:00:00.000Z, open: 0.0235, high: 0.0235, low: 0.0205 - [6] timestamp: 1796083200, iso_time: 2026-12-01T00:00:00.000Z, open: 0.021, high: 0.0245, low: 0.021 - [7] timestamp: 1796086800, iso_time: 2026-12-01T01:00:00.000Z, open: 0.0225, high: 0.0225, low: 0.022 - [8] timestamp: 1796090400, iso_time: 2026-12-01T02:00:00.000Z, open: 0.0225, high: 0.0225, low: 0.0225 - [9] timestamp: 1796094000, iso_time: 2026-12-01T03:00:00.000Z, open: 0.0225, high: 0.0245, low: 0.0225 - [10] timestamp: 1796097600, iso_time: 2026-12-01T04:00:00.000Z, open: 0.0245, high: 0.0245, low: 0.0245 - [11] timestamp: 1796101200, iso_time: 2026-12-01T05:00:00.000Z, open: 0.0235, high: 0.0235, low: 0.0235 - [12] timestamp: 1796104800, iso_time: 2026-12-01T06:00:00.000Z, open: 0.0235, high: 0.024, low: 0.0235 - [13] timestamp: 1796108400, iso_time: 2026-12-01T07:00:00.000Z, open: 0.0195, high: 0.022, low: 0.0195 - [14] timestamp: 1796112000, iso_time: 2026-12-01T08:00:00.000Z, open: 0.022, high: 0.022, low: 0.0185 - [15] timestamp: 1796115600, iso_time: 2026-12-01T09:00:00.000Z, open: 0.0195, high: 0.0225, low: 0.0195
Endpoint Parameters, Cost & Token Economy Reference
Endpoint ID:prediction.markets.candles · Method: GET| Parameter | Type | Req | Sample / Default | Description |
|---|---|---|---|---|
| market | string | optional | latest_active | Polymarket market slug, CLOB token_id, or "latest_active" for the top active contract |
| resolution | string | optional | 1h | OHLC candlestick bucket resolution: 15m, 1h, 4h, or 1d |
| limit | number | optional | 24 | Maximum OHLC candles returned (1-100, default 24) |
| format | enum | optional | json | compact | md | Response format; compact or md cuts LLM tokens. |
| dry_run | 0 | 1 | optional | 1 | Returns exact pre-flight price quote & validation at $0.00 cost. |
| Access Rail / Metric | Value | Policy & SLA |
|---|---|---|
| API Key (PAYG) | $0.0020 / call | $0/mo · Balance never expires |
| Remote MCP Tool | prediction_markets_candles | OAuth 2.1 Hub & /mcp/finance |
| x402 Base USDC | $0.0020 / call | Zero-signup USDC enabled |
| P50 Latency | 308 ms | $0 billed on empty or 4xx/5xx |
| Token Economy | 5527t → 546t (-90%) | Partner credit: eligible |
More prediction.markets Sibling Endpoints
Frequently Asked Questions
How do I call Prediction Market OHLC Probability Candlesticks (prediction.markets.candles) over REST and Remote MCP?
Send GET requests to https://api.agentapigate.ai/v1/prediction/markets/candles with an aag_live_* / aag_agent_* Bearer key, pay per call via x402 USDC, or call MCP tool prediction_markets_candles on https://mcp.agentapigate.ai/mcp.
What does prediction.markets.candles cost per call and are failed calls billed?
Each successful HTTP 200 response costs $0.002 USD from a non-expiring PAYG balance ($0/month minimum). Upstream errors, empty responses, and ?dry_run=1 pre-flight quotes always bill $0.00.
How does ?format=md or ?format=compact optimize AI agent token usage on prediction.markets.candles?
Passing ?format=md transforms the response into normalized Markdown (~546 tokens vs ~5527 raw tokens, saving 90% of LLM context budget) while preserving structured JSON via ?format=json.
Can I restrict an AI agent key to only finance endpoints with a daily USD cap?
Yes. Create a scoped aag_agent_* sub-key via POST /v1/keys with allowed_packs: ["finance"], optional allowed_endpoints: ["prediction.markets.candles"], read_only: true, and a hard daily_cap_usd enforced atomically in Redis.