token pairs
Returns 200 DEX trades by token on Ethereum, where currency smart contract is 0x0000…f92c and block time after 2024-10-19, sorted by USD, highest first: currency symbol, currency name, smart contract, fungible, side currency symbol, side currency name, side smart contract and 4 more fields.
What it returns
- currency symbol
- currency name
- smart contract
- fungible
- side currency symbol
- side currency name
- side smart contract
- price in USD
- trade price
- sum of trade amount in USD
- count
Filters
- currency smart contract is 0x0000…f92c
- block time after 2024-10-19
The query
query tokenTrades($network: evm_network, $token: String, $time_10min_ago: DateTime, $time_1h_ago: DateTime, $time_3h_ago: DateTime, $time_ago: DateTime) {
EVM(network: $network) {
DEXTradeByTokens(
orderBy: {descendingByField: "usd"}
where: {Trade: {Currency: {SmartContract: {is: $token}}}, Block: {Time: {after: $time_ago}}}
limit: {count: 200}
) {
Trade {
Currency {
Symbol
Name
SmartContract
Fungible
}
Side {
Currency {
Symbol
Name
SmartContract
}
}
price_usd: PriceInUSD(maximum: Block_Number)
price_last: Price(maximum: Block_Number)
price_10min_ago: Price(
maximum: Block_Number
if: {Block: {Time: {before: $time_10min_ago}}}
)
price_1h_ago: Price(
maximum: Block_Number
if: {Block: {Time: {before: $time_1h_ago}}}
)
price_3h_ago: Price(
maximum: Block_Number
if: {Block: {Time: {before: $time_3h_ago}}}
)
}
usd: sum(of: Trade_AmountInUSD)
count
}
}
}
Variables
{
"network": "eth",
"token": "0x000000000000e63d2c9c29d3edf6efb99071f92c",
"time_10min_ago": "2024-10-22T18:49:39Z",
"time_1h_ago": "2024-10-22T17:59:39Z",
"time_3h_ago": "2024-10-22T15:59:39Z",
"time_ago": "2024-10-19T18:59:39Z"
}
Similar queries
- CRV hourly OHLC on Curve - Ethereum · Ethereum · DEXTradeByTokens
- Top Metric liquidity pools by 24h volume on Ethereum · Ethereum · DEXTradeByTokens
- ATH of eth token · Ethereum · DEXTradeByTokens
- historical price and historical volume · Ethereum · DEXTradeByTokens
- topTraders EVM · Ethereum · DEXTradeByTokens