REST APIMarkets

Get market timeseries

GET
/markets/{id}/timeseries

Authorization

ApiKeyAuth
headerx-api-key<token>

API key authentication via the x-api-key header.

Path Parameters

id*integer

The market's ID.

Formatint64

Query Parameters

metric*"chance"

The metric to query

Value in"chance"
resolution?string

Resolution (bucket size) for aggregation

Value in"1m""5m""1h""1d""1w""1M"
from*integer

Start of the time range in unix seconds, inclusive. It must be before to and at most 365 days earlier.

Formatint64
to?integer

End of the time range in unix seconds, inclusive. Defaults to now.

Formatint64
limit?integer

Most data points to return, from 1 to 250. Defaults to 50, and a value outside that range is clamped.

Formatint32
after?string

The cursor from the previous page, to get the next one.

Lengthlength <= 1024

Response Body

application/json; charset=utf-8
  1. response

Response for market timeseries

success*boolean
cursor?string
data*

Inner data for the timeseries response

Example Request
curl -X GET 'https://api.predict.fun/v1/markets/0/timeseries?metric=chance&from=0'
Example Response
{  "success": true,  "cursor": "string",  "data": {    "resolution": "1m",    "series": [      {        "x": 0.1,        "y": 0.1      }    ]  }}