REST APIMarkets

Get timeseries for multiple markets

GET
/markets/timeseries

Paginated chance points for up to 20 markets in one call. The cursor is a single shared timestamp that advances across all markets.

Authorization

ApiKeyAuth
headerx-api-key<token>

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

Query Parameters

ids*array<>

Up to 20 market IDs, comma-separated or repeated. A longer list is rejected.

metric*"chance"

The metric to query.

Value in"chance"
resolution?string

Bucket size of the data points, the same for every market. Defaults to one chosen from the length of the time range.

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 distinct timestamps to return across all markets, 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
success*boolean
cursor?string
data*

resolution is shared across all markets in the request.

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