get https://api.amberdata.com/defi/dex/trades
Retrieves the historical (time series) DEX trades.
Related Endpoints
You can query this endpoint using the information found in
Time Range Limit
The maximum time range (difference between endDate and startDate) is 366 days.
Not specifying startDate and endDate
If the startDate and endDate query parameters are not provided, the API will return the data from the previous 7 days.
Historical Coverage
The API provides a rolling 2 year history of trade data. If you require data older than two years, please contact your Amberdata Account Executive to discuss bulk data delivery options.
Data Use-cases
You can use this trade data to
- Analyze the assets that a specific wallet is swapping
- Compare and contrast the trading volume of various assets by protocol, blockchain and more...
- Create technical indicators just as VWAP and TWAP
- Analyze price movements, by creating candlestick (OHLCV) data
Response Data
Fields and paths are relative to the top-level payload
field i.e. metadata.next
is equivalent to payload.metadata.next
.
JSON Field/Path | Value Type | Optional | Description |
---|---|---|---|
data[index].assetBoughtAddress | string | The smart contract address of the asset that was bought in this trade. | |
data[index].assetBoughtAmount | string | The amount of the asset bought normalized to its decimals. | |
data[index].assetBoughtAmountRaw | string | The amount of the asset bought unnormalized. | |
data[index].assetBoughtDecimals | integer | The bought asset's decimals for normalizing its native units. | |
data[index].assetBoughtPrice | string | The price of the bought asset in relation to 1 unit of the sold asset. | |
data[index].assetBoughtSymbol | string | The short-form, human readable, abbreviated identifier of the asset. | |
data[index].assetPair | string | An hyphenated (-) concatenation of the sold and bought assets' addresses. | |
data[index].assetSoldAddress | string | The smart contract address of the asset that was sold in this trade. | |
data[index].assetSoldAmount | string | The amount of the asset sold normalized to its decimals. | |
data[index].assetSoldAmountRaw | string | The amount of the asset sold unnormalized. | |
data[index].assetSoldDecimals | integer | The sold asset's decimals for normalizing its native units. | |
data[index].assetSoldPrice | string | The price of the sold asset in relation to 1 unit of the sold asset. | |
data[index].assetSoldSymbol | string | The short-form, human readable, abbreviated identifier of the asset. | |
data[index].blockNumber | integer | ||
data[index].blockchain | string | The blockchain this trade occurred on. | |
data[index].callerAddress | string | ||
data[index].event | string | The decoded, human readable interpretation of the smart contract function. | |
data[index].liquidityPoolAddress | string | The smart contract address of the liquidity pool where the sold and bought asset trade. | |
data[index].logIndex | integer | ||
data[index].project | string | ||
data[index].protocolName | string | The human readable name of the DEX protocol this trade happened on. | |
data[index].receiverAddress | string | ||
data[index].timestamp | string | The timestamp at which this trade occurred in ISO8601 format by default. | |
data[index].tradeFeeBought | string | The amount of trading fees generated in terms of the bought asset. | |
data[index].tradeFeeSold | string | The amount of trading fees generated in terms of the sold asset. | |
data[index].tradeId | string | An underscore (_) concatenation of the transactionHash and the logIndex. | |
data[index].transactionFee | string | ||
data[index].transactionFromAddress | string | ||
data[index].transactionGasPrice | string | The price of gas for this transaction | |
data[index].transactionGasUsed | string | The amount of gas used for this transaction | |
data[index].transactionHash | string | ||
data[index].transactionToAddress | string |