Skip to main content

Get past snapshots for a token pair

This API provides an option to fetch last n snapshots for a token pair. It supports fetching the tradeVolume or the pairTotalReserves snapshots.

Response Details

Returns an array of snapshots for the token pair. data.payload is returned only if data flag is passed as true. Otherwise only the snapshot CID stored in IPFS is returned.

Pair Total Reserves Response

Response payload is stored in data.payload which contains TokenReserves and TokenReserves in USD for both tokens in the pair. Reserves are returned for each blockHeight in the snapshot. It also has a data.cid field which has the CID of the snapshot stored on IPFS.

TradeVolume Response

Response payload is stored in data.payload or the blockHeights in between which this snapshot is generated. Payload contains the following:

  • raw categorized transaction logs(Swap. Mint and Burn) of the token pair
  • computed TradeVolume (both in native token value and USD) for each token categorized by Swap, Mint and Burn
  • computed overall TradeVolume
  • Total fees
Path Parameters
  • pair_contract_address string required
Query Parameters
  • maxCount integer

    Number of snapshots to fetch

    Example: 3
  • stream string

    Specifies the stream from which snapshots have to be returned, currently only trade_volume or pair_total_reserves are supported.

    Example: trade_volume
  • data boolean

    If set to true returns snapshot(s) data, otherwise only the IPFS CID of the snapshot(s) is returned

    Example: true

Successful response