Get OHLC candles
Returns OHLC candlestick data for a feed. Reads from ClickHouse with gap detection; missing ranges are backfilled from the Pyth Lazer History API and the in-progress candle is appended from the live ingester. Set ema=true to include EMA-12 and EMA-26 arrays, bb=true to include Bollinger Bands. Live windows are cached for 5 seconds; fully historical windows for 10 minutes.
Returns OHLC candlestick data for a feed. Reads from ClickHouse with gap detection; missing ranges are backfilled from the Pyth Lazer History API and the in-progress candle is appended from the live ingester. Set ema=true to include EMA-12 and EMA-26 arrays, bb=true to include Bollinger Bands. Live windows are cached for 5 seconds; fully historical windows for 10 minutes.
feed_id*numberPyth Lazer feed ID (e.g. 1 for BTC)
1 <= valueresolution*string"1""5""15""60"from*numberStart Unix timestamp (seconds, inclusive)
to*numberEnd Unix timestamp (seconds, inclusive)
ema?stringSet to 'true' to include EMA-12 and EMA-26 arrays
bb?stringSet to 'true' to include Bollinger Bands (upper/middle/lower) arrays
OHLC candles for a feed
application/json- response
OHLC candles for a feed
timestamps*array<number>Candle open time, Unix timestamp (seconds)
opens*array<number>Open prices
highs*array<number>High prices
lows*array<number>Low prices
closes*array<number>Close prices
ema12?array<number>EMA-12 of closes
ema26?array<number>EMA-26 of closes
bb_upper?array<number>Bollinger upper band
bb_middle?array<number>Bollinger middle band
bb_lower?array<number>Bollinger lower band
curl -X GET 'https://data.scalar.market/candles/1?resolution=1&from=0&to=0'{
"timestamps": [
0
],
"opens": [
0
],
"highs": [
0
],
"lows": [
0
],
"closes": [
0
],
"ema12": [
0
],
"ema26": [
0
],
"bb_upper": [
0
],
"bb_middle": [
0
],
"bb_lower": [
0
]
}Get username by address GET
Returns the username tied to an address. With a valid session token for that address, a username is generated and claimed on first lookup.
Get instrument data GET
Returns trading statistics for an instrument: trade count, open interest, volume, last traded price, resolution state and the live buyer payout ratio implied by the latest Pyth 1s prices.