REST APIMarkets
Get market timeseries
ApiKeyAuthx-api-key<token>API key authentication via the x-api-key header.
id*integerThe market's ID.
int64metric*"chance"The metric to query
"chance"resolution?stringResolution (bucket size) for aggregation
"1m""5m""1h""1d""1w""1M"from*integerStart of the time range in unix seconds, inclusive. It must be before to and at
most 365 days earlier.
int64to?integerEnd of the time range in unix seconds, inclusive. Defaults to now.
int64limit?integerMost data points to return, from 1 to 250. Defaults to 50, and a value outside that range is clamped.
int32after?stringThe cursor from the previous page, to get the next one.
length <= 1024application/json; charset=utf-8- response
Response for market timeseries
success*booleancursor?stringdata*Inner data for the timeseries response
curl -X GET 'https://api.predict.fun/v1/markets/0/timeseries?metric=chance&from=0'{ "success": true, "cursor": "string", "data": { "resolution": "1m", "series": [ { "x": 0.1, "y": 0.1 } ] }}Get market quote GET
Get the best bid and best ask resting on a market's order book, quoted against the outcome whose indexSet is 1, as the book itself is. Prefer this over the full order book when only the current price matters, and over the quotes embedded in a market payload, which are deprecated.
Get latest market timeseries value GET
Next Page