# 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/internal_handler.PriceHistoryResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.ErrorResponse"}}}}}}}},"components":{"schemas":{"internal_handler.PriceHistoryResponse":{"description":"Historical price series.","type":"object","properties":{"history":{"type":"array","items":{"$ref":"#/components/schemas/internal_handler.PriceHistoryPoint"}},"outcomeName":{"type":"string"}}},"internal_handler.PriceHistoryPoint":{"description":"Single price bucket.","type":"object","properties":{"p":{"type":"number"},"payout":{"type":"number"},"t":{"type":"integer"},"v":{"type":"number"}}},"ft_market-service-v2_pkg_api.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.42.space/api/rest-api-alpha/markets/get-price-history.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
