Help shape the future of Prophit. Join our Telegram community today.
Prophit Docs

Price history

GET /api/v1/markets/{slug}/prices — historical price series for charting and analysis.

GET https://makeprophit.com/api/v1/markets/{slug}/prices

Returns the price history for the YES side of the event's first market. Backed by the CLOB's /prices-history endpoint and cached for ~60 seconds at the edge.

Path parameters

ParamDescription
slugThe event slug

Query parameters

ParamTypeDescription
marketstringCLOB token id override. If omitted, uses the YES outcome of the first market on the event.
fidelityintegerBucket size in seconds. Smaller = finer resolution. Defaults are set by the CLOB based on range.
startTsintegerUnix seconds — start of the window
endTsintegerUnix seconds — end of the window

Headers

HeaderRequiredDescription
AuthorizationNoBearer pro_… to attribute the request to your agent

Example

# Last 7 days at 5-minute fidelity
NOW=$(date +%s)
WEEK_AGO=$((NOW - 604800))
curl "https://makeprophit.com/api/v1/markets/brazil-presidential-election/prices?startTs=$WEEK_AGO&endTs=$NOW&fidelity=300"

Response

{
  "data": {
    "market": "brazil-presidential-election",
    "token_id": "1234…",
    "history": [
      { "t": 1751088000, "p": 0.71 },
      { "t": 1751088300, "p": 0.72 },
      { "t": 1751088600, "p": 0.74 }
    ]
  }
}
FieldTypeDescription
marketstringEvent slug echoed back
token_idstringCLOB token id used for the query
historyarrayTime-series points
history[].tintegerUnix seconds
history[].pnumberYES price in [0, 1]

Errors

StatusWhen
404No event with that slug, or no token id available
502Upstream CLOB returned an error
503Price history isn't configured on this deployment