Skip to main content

Get Price History

Query historical price data for a prediction outcome token. Returns OHLC candlestick data for charting and analysis.

HTTP Request

POST/v5/alpha/prediction/price-history

Request Parameters

ParameterRequiredTypeComments
tokenIdtruestringOutcome token ID
intervaltruestringTime interval. Refer to predictionPriceInterval

Response Parameters

ParameterTypeComments
tokenIdstringOutcome token ID
intervalstringTime interval used
listarrayOHLC candlestick records, newest first
> openTimeintegerCandle open timestamp (UTC milliseconds)
> openstringOpen price
> highstringHigh price
> lowstringLow price
> closestringClose price
> volumestringTrading volume in USDC for this candle

Request Example

POST /v5/alpha/prediction/price-history HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1704067200000
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"tokenId": "token_yes_123",
"interval": "1H"
}

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"tokenId": "token_yes_123",
"interval": "1H",
"list": [
{
"openTime": 1704067200000,
"open": "0.63",
"high": "0.68",
"low": "0.62",
"close": "0.65",
"volume": "12500"
},
{
"openTime": 1704063600000,
"open": "0.60",
"high": "0.64",
"low": "0.59",
"close": "0.63",
"volume": "9800"
}
]
},
"retExtInfo": {},
"time": 1704067200000
}