Charts

OHLC data for an pair of assets

Returns OHLC data for a trading pair for the provided asset and sats.

GEThttps://indexer-dev.saturnbtc.io/v0/ohlc
Query parameters
Response
Body
token0*string
token1*string
granularity*one of
rows*array of OHLCDataRow (object)
Request
const response = await fetch('https://indexer-dev.saturnbtc.io/v0/ohlc?startDate=text&endDate=text&token0=text&token1=text', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "token0": "text",
  "token1": "text",
  "rows": [
    {
      "startTimestamp": "2025-01-18T01:45:37.506Z",
      "endTimestamp": "2025-01-18T01:45:37.506Z",
      "data": {
        "openPrice": "text",
        "highPrice": "text",
        "lowPrice": "text",
        "closePrice": "text",
        "volume": "text",
        "transactions": 0,
        "feeToken0": "text",
        "feeToken1": "text"
      }
    }
  ]
}

Last updated