# Get price history

GET /api/v1/market-data/prices/history

## Get price history

> Returns historical midpoint price series for a single outcome token. Requires a market address and either token ID or outcome index. Control the lookback window with \`duration\` or explicit \`start\_ts\`/\`end\_ts\` timestamps. Use \`fidelity\` to cap the number of data points returned (downsampled if exceeded).

```json
{"openapi":"3.1.1","info":{"title":"FortyTwo Read API","version":"1.0"},"tags":[{"description":"GET /api/v1/market-data/prices/history","name":"get-price-history"}],"servers":[{"url":"https://rest.ft.42.space/"}],"paths":{"/api/v1/market-data/prices/history":{"get":{"description":"Returns historical midpoint price series for a single outcome token. Requires a market address and either token ID or outcome index. Control the lookback window with `duration` or explicit `start_ts`/`end_ts` timestamps. Use `fidelity` to cap the number of data points returned (downsampled if exceeded).","tags":["get-price-history"],"summary":"Get price history","parameters":[{"schema":{"type":"string"},"description":"Market contract address","name":"market","in":"query","required":true},{"schema":{"type":"string"},"description":"Outcome token ID (provide token_id or outcome_index, not both)","name":"token_id","in":"query"},{"schema":{"type":"integer"},"description":"Outcome index, 0-based (provide token_id or outcome_index, not both)","name":"outcome_index","in":"query"},{"schema":{"type":"string","enum":["1h","4h","24h","7d","30d","90d","1y","all"]},"description":"Lookback duration (default 24h)","name":"duration","in":"query"},{"schema":{"type":"integer"},"description":"End unix timestamp (default: now)","name":"end_ts","in":"query"},{"schema":{"type":"integer"},"description":"Start unix timestamp (filters results after fetch)","name":"start_ts","in":"query"},{"schema":{"type":"integer"},"description":"Max data points returned — downsamples if the window contains more","name":"fidelity","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.PriceHistoryResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.ErrorResponse"}}}}}}}},"components":{"schemas":{"handler.PriceHistoryResponse":{"description":"Historical price series.","type":"object","properties":{"history":{"type":"array","items":{"$ref":"#/components/schemas/handler.PriceHistoryPoint"}},"outcomeName":{"type":"string"}}},"handler.PriceHistoryPoint":{"description":"Single price bucket.","type":"object","properties":{"p":{"type":"number"},"payout":{"type":"number"},"t":{"type":"integer"},"v":{"type":"number"}}},"api.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string"}}}}}}
```
