Skip to main content

getPrices

Retrieve historical candlestick price data for cryptocurrency trading pairs across different time intervals.

Parameters

interval
PriceInterval
required
The time interval for price aggregation. Available values:
  • ONE_MIN - 1 minute candles
  • FIVE_MIN - 5 minute candles
  • TEN_MIN - 10 minute candles
  • FIFTEEN_MIN - 15 minute candles
  • ONE_HOUR - 1 hour candles
first
Int
Number of records to return (pagination)
after
String
Cursor for pagination
where
PriceFilterInput
Filter conditions for price data
order
PriceSortInput
Sort order for results. Can sort by: symbol, bucket, open, high, low, close, volume

Response

prices
Connection<Price>
Paginated connection of price records
pageInfo
PageInfo
totalCount
Int
Total number of matching records

Examples

query GetBitcoinPrices {
  prices(interval: ONE_MIN, first: 100, where: { symbol: { eq: "BTCUSDT" } }) {
    nodes {
      symbol
      open
      high
      low
      close
      volume
      bucket
      exchange {
        name
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
    totalCount
  }
}

Build docs developers (and LLMs) love