ohlc
Returns DEX trades by token on Ethereum, where side currency smart contract is 0x0cca…1098, currency smart contract is 0xc02a…6cc2 and side amount is above 0, sorted by block time: block time, price in USD and sum of trade side amount.
What it returns
- block time
- price in USD
- sum of trade side amount
Filters
- side currency smart contract is 0x0cca…1098
- currency smart contract is 0xc02a…6cc2
- side amount is above 0
The query
query tradingViewPairs($network: evm_network, $token: String, $base: String) {
EVM(network: $network) {
DEXTradeByTokens(
orderBy: {ascendingByField: "Block_Time"}
where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {SmartContract: {is: $base}}}, Currency: {SmartContract: {is: $token}}}}
) {
Block {
Time(interval: {count: 5, in: minutes})
}
Trade {
open: PriceInUSD(minimum: Block_Number)
close: PriceInUSD(maximum: Block_Number)
max: PriceInUSD(maximum: Trade_PriceInUSD)
min: PriceInUSD(minimum: Trade_PriceInUSD)
}
volume: sum(of: Trade_Side_Amount)
}
}
}
Variables
{
"network": "eth",
"token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"base": "0x0ccae1bc46fb018dd396ed4c45565d4cb9d41098"
}
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