Copy of Buys, Sells, BuyVolume, SellVolume, Makers, TotalTradedVolume, PriceinUSD for a eth pair
Returns DEX trades by token on Ethereum, where currency smart contract is 0x6982…1933, DEX smart contract is 0xA43f…Ec9f and block time since 2024-11-14: currency name, smart contract, currency symbol, price in USD, protocol name, protocol family, side currency symbol and 3 more fields.
What it returns
- currency name
- smart contract
- currency symbol
- price in USD
- protocol name
- protocol family
- side currency symbol
- side currency name
- side smart contract
- sum of trade side amount in USD
Filters
- currency smart contract is 0x6982…1933
- DEX smart contract is 0xA43f…Ec9f
- block time since 2024-11-14
The query
query MyQuery($network: evm_network, $token: String, $pairAddress: String, $min5_timestamp: DateTime, $hr1_timestamp: DateTime) {
EVM(dataset: realtime, network: $network) {
DEXTradeByTokens(
where: {TransactionStatus: {Success: true}, Trade: {Currency: {SmartContract: {is: $token}}, Dex: {SmartContract: {is: $pairAddress}}}, Block: {Time: {since: $hr1_timestamp}}}
) {
Trade {
Currency {
Name
SmartContract
Symbol
}
Price_at_min5: PriceInUSD(
minimum: Block_Time
if: {Block: {Time: {after: $min5_timestamp}}}
)
Price_at_min5: PriceInUSD(
minimum: Block_Time
if: {Block: {Time: {after: $min5_timestamp}}}
)
Price_at_min5: PriceInUSD(
minimum: Block_Time
if: {Block: {Time: {after: $min5_timestamp}}}
)
Price_at_min5: PriceInUSD(
minimum: Block_Time
if: {Block: {Time: {after: $min5_timestamp}}}
)
Price_at_min5: PriceInUSD(
minimum: Block_Time
if: {Block: {Time: {after: $min5_timestamp}}}
)
current_price: PriceInUSD(maximum: Block_Time)
Dex {
ProtocolName
ProtocolFamily
SmartContract
}
Side {
Currency {
Symbol
Name
SmartContract
}
}
}
traded_volume_24h: sum(
of: Trade_Side_AmountInUSD
if: {Block: {Time: {after: $min5_timestamp}}}
)
}
}
}
Variables
{
"network": "eth",
"token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
"pairAddress": "0xA43fe16908251ee70EF74718545e4FE6C5cCEc9f",
"hr1_timestamp": "2024-11-14T03:20:00Z",
"min5_timestamp": "2024-11-14T04:15:00Z"
}
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