Skip to main content
GET
/
2
/
pm
/
market
/
spread-history
Get Prediction Spread History
curl --request GET \
  --url https://pm-api-prod-eu.mobula.io/api/2/pm/market/spread-history
{
  "data": [
    {}
  ]
}
Alpha — This endpoint is part of the Prediction Markets API, currently in early access. May change without notice.

Query Parameters

platform
string
required
The prediction market platform (e.g., polymarket).
outcomeId
string
required
The outcome token ID.
period
string
default:"5m"
Sampling period. Possible values: 1m, 5m, 15m, 1h, 4h, 1d.
limit
number
default:"100"
Maximum number of data points to return (1 to 500).
offset
number
default:"0"
Number of records to skip for pagination.

Response

data
array
Array of orderbook depth snapshots.
pagination
object
Pagination metadata.
hostname
string
Server hostname that handled the request.
took
number
Time in milliseconds the request took to process.

Usage Example

curl -X GET "https://api.mobula.io/api/2/pm/market/spread-history?platform=polymarket&outcomeId=71321...&period=1h&limit=50"

Example Response

{
  "data": [
    { "timestamp": 1709910000000, "bestBidUSD": 0.34, "bestAskUSD": 0.36, "spreadUSD": 0.02 },
    { "timestamp": 1709913600000, "bestBidUSD": 0.35, "bestAskUSD": 0.37, "spreadUSD": 0.02 }
  ],
  "pagination": { "page": 1, "offset": 0, "limit": 100, "pageEntries": 2 },
  "hostname": "pm-api-prod-eu-abc12",
  "took": 42
}

Query Parameters

platform
enum<string>
required

Prediction market platform. Today only polymarket is supported; any other value returns 400.

Available options:
polymarket
Example:

"polymarket"

outcomeId
string
required

Polymarket outcome / token ID — uint256 decimal string (the ERC-1155 token id of the YES/NO/etc. side).

Pattern: ^[0-9]+$
Example:

"59855952379545476461266875939089074481171378466995213858930892770855011813551"

period
enum<string>
default:5m

Candle resolution.

Available options:
1m,
5m,
15m,
1h,
4h,
1d
limit
integer
default:100

Page size (1-500).

Required range: 1 <= x <= 500
offset
integer
default:0

Pagination offset.

Required range: x >= 0

Response

200 - application/json

Spread history

data
object[]