Skip to main content
GET
Midprice History

Path Parameters

string
required
The pool config PDA address.

Query Parameters

string
default:"1h"
Sample interval. One of: 1m, 5m, 30m, 1h, 2h, 4h, 12h, 24h, raw.When set to raw, every recorded midprice point is returned without bucketing/sampling. Results are paginated via cursor.
integer
Start of the time range as a Unix timestamp in seconds (inclusive). Defaults to end_time - 86400 (24 hours ago).
integer
End of the time range as a Unix timestamp in seconds (inclusive). Defaults to current time.
integer
default:"200"
Number of records per page (1–1000). Only applicable when timeframe=raw.
integer
Unix timestamp in seconds. Fetch records before this timestamp (newest first). Use the next_cursor value from a previous response to paginate backwards through history. Only applicable when timeframe=raw.
string
default:"mainnet-beta"
Solana cluster — mainnet-beta or devnet.

Response

integer
Start of the requested range (Unix seconds).
integer
End of the requested range (Unix seconds).
string
The sample interval used.
integer | null
Timestamp of the oldest record in the current page (Unix seconds). Pass as cursor to fetch the next (older) page. null when there are no more records. Only present when timeframe=raw.
array
Array of midprice samples. One entry per time bucket that contains data (sampled modes), or every recorded point (raw mode).

Errors