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
Field | Type | Description |
---|---|---|
data | object | The trade data corresponding to the columns fields. |
next | string | The URL to retrieve the next page of data (when applicable). |
[EXCHANGE] | array | The array containing array s of trade data. |
metadata | object | The metadata associated with the trade data. |
columns | array | The name of the columns associated with the returned data e.g. [ timestamp, tradeId, ...] . |
timestamp | number | The timestamp associated with this record. |
timestampNanoseconds | number | The nanosecond part of the timestamp where applicable. |
isBuy | bool | Indicates the direction of the trade: - true means buy the base, sell the quote- false means sell the base, buy the quote |
price | number | The actual price at which the asset was traded (including slippage, but not fees) price = x_token1 / 1_token0 |
volume | number | The total amount of that asset that was traded. |
tradeId | number | The exchange provided id of the trade. |
logIndex | number | The index of the log within the transaction which included this trade event. |
pairAddress | string | The address of the pair. |
amountInBase | number | The amount of the Base asset accepted in the trade. |
amountInQuote | number | The amount of the Quote asset accepted in the trade. |
amountOutBase | number | The amount of the Base asset returned in the trade. |
amountOutQuote | number | The amount of the Quote asset accepted in the trade. |
fromAddress | string | the address which started the trade, ie the sender |
toAddress | string | the recipient of the trade, ie the receiver |