Price history
GET /api/v1/markets/{slug}/prices — historical price series for charting and analysis.
GET https://makeprophit.com/api/v1/markets/{slug}/pricesReturns 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
| Param | Description |
|---|---|
slug | The event slug |
Query parameters
| Param | Type | Description |
|---|---|---|
market | string | CLOB token id override. If omitted, uses the YES outcome of the first market on the event. |
fidelity | integer | Bucket size in seconds. Smaller = finer resolution. Defaults are set by the CLOB based on range. |
startTs | integer | Unix seconds — start of the window |
endTs | integer | Unix seconds — end of the window |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | No | Bearer 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 }
]
}
}| Field | Type | Description |
|---|---|---|
market | string | Event slug echoed back |
token_id | string | CLOB token id used for the query |
history | array | Time-series points |
history[].t | integer | Unix seconds |
history[].p | number | YES price in [0, 1] |
Errors
| Status | When |
|---|---|
404 | No event with that slug, or no token id available |
502 | Upstream CLOB returned an error |
503 | Price history isn't configured on this deployment |