Skip to main content
GET
/
2
/
pm
/
market
/
ohlcv
Get prediction market OHLCV candles
curl --request GET \
  --url https://demo-api.mobula.io/api/2/pm/market/ohlcv
{
  "data": [
    {
      "t": 123,
      "o": 123,
      "h": 123,
      "l": 123,
      "c": 123,
      "v": 123,
      "tradesCount": 123
    }
  ],
  "pagination": {
    "page": 123,
    "offset": 123,
    "limit": 123,
    "pageEntries": 123
  },
  "hostname": "<string>",
  "took": 123
}

Query Parameters

platform
string
required
The prediction market platform (e.g., polymarket).
marketId
string
The platform-specific market identifier (optional, for documentation purposes).
outcomeId
string
required
The outcome token ID.
period
string
default:"1h"
Candle period. Possible values: 1s, 5s, 10s, 1m, 5m, 15m, 1h, 4h, 1d, 1w.
from
string | number
Start time. Accepts Unix timestamp in milliseconds (e.g., 1709913600000) or ISO 8601 string (e.g., 2024-03-01T00:00:00Z). If omitted, returns the most recent candles.
to
string | number
End time. Accepts Unix timestamp in milliseconds (e.g., 1709913600000) or ISO 8601 string (e.g., 2024-03-01T00:00:00Z). Defaults to now.
limit
number
default:"500"
Maximum number of candles to return (1 to 1000).
offset
number
default:"0"
Number of records to skip for pagination.

Response

data
array
Array of OHLCV candle objects. Uses the same abbreviated field names as the spot OHLCV endpoint (/2/token/ohlcv-history).
pagination
object
Pagination metadata.
hostname
string
Server node identifier.
took
number
Request processing time in milliseconds.

Usage Example

curl -X GET "https://api.mobula.io/api/2/pm/market/ohlcv?platform=polymarket&marketId=0x1234...&outcomeId=71321...&period=1h&limit=100"

Example Response

{
  "data": [
    { "t": 1709910000000, "o": 0.34, "h": 0.36, "l": 0.33, "c": 0.35, "v": 12500, "tradesCount": 45 },
    { "t": 1709913600000, "o": 0.35, "h": 0.37, "l": 0.34, "c": 0.36, "v": 8900, "tradesCount": 32 }
  ],
  "pagination": { "page": 1, "offset": 0, "limit": 500, "pageEntries": 2 },
  "hostname": "node-xyz",
  "took": 42
}

Query Parameters

platform
string
required
marketId
string
outcomeId
string
required
period
enum<string>
default:1h
Available options:
1s,
5s,
10s,
1m,
5m,
15m,
1h,
4h,
1d,
1w
from

Start time (Unix ms timestamp or ISO 8601 string). If omitted, returns the most recent candles.

to

End time (Unix ms timestamp or ISO 8601 string). Defaults to now.

limit
number
default:500
Required range: 1 <= x <= 1000
offset
number
default:0
Required range: x >= 0

Response

200 - application/json

OHLCV candles

data
object[]
pagination
object
hostname
string
took
number