Trades Historical

Retrieves the historical (time series) trade data for the specified pool/pair.

  • Asset information can be used from the metadata payload.
  • Base & Quote information is using the first and second asset in a pool/pair, which is the represented price.

👍

Protocols Supported

This endpoints supports Uniswap v2, Uniswap v3, Sushiswap and Uniswap clones.

This endpoint does not support Curve.

We have trade data for Balancer starting from 2022-05-06T09:14:29.

There reference data for this endpoint can be found at Information - Swaps.

👍

Blockchains Supported

This endpoint only supports data from ethereum-mainnet.

🚧

Time Range Limit

The maximum time range (difference between endDate and startDate) is 30 days.

In order to get more than 30 days, you must use the startDate & endDate parameters to move the time frame window to get the next n hours/days/months of data.

📘

Not specifying startDate and endDate

If the startDate and endDate query parameters are not provided, the API will return the data from the previous 30 days.

Response Data

FieldTypeDescription
dataobjectThe trade data corresponding to the columns fields.
nextstringThe URL to retrieve the next page of data (when applicable).
[EXCHANGE]arrayThe array containing arrays of trade data.
metadataobjectThe metadata associated with the trade data.
columnsarrayThe name of the columns associated with the returned data e.g. [ timestamp, tradeId, ...].
timestampnumberThe timestamp associated with this record.
timestampNanosecondsnumberThe nanosecond part of the timestamp where applicable.
isBuyboolIndicates the direction of the trade:
- true means buy the base, sell the quote
- false means sell the base, buy the quote
pricenumberThe actual price at which the asset was traded (including slippage, but not fees) price = x_token1 / 1_token0
volumenumberThe total amount of that asset that was traded.
tradeIdnumberThe exchange provided id of the trade.
logIndexnumberThe index of the log within the transaction which included this trade event.
pairAddressstringThe address of the pair.
amountInBasenumberThe amount of the Base asset accepted in the trade.
amountInQuotenumberThe amount of the Quote asset accepted in the trade.
amountOutBasenumberThe amount of the Base asset returned in the trade.
amountOutQuotenumberThe amount of the Quote asset accepted in the trade.
fromAddressstringthe address which started the trade, ie the sender
toAddressstringthe recipient of the trade, ie the receiver
Language
Credentials
Header
Click Try It! to start a request and see the response here!