trade data v1 to v2
Returns DEX trades by token on Ethereum, where currency smart contract is 0xdac1…1ec7 or 0xC02a…6Cc2, sorted by count, highest first: block time, currency name, currency symbol, smart contract, trade price, count, sum of trade side amount in USD and unique of transaction from.
What it returns
- block time
- currency name
- currency symbol
- smart contract
- trade price
- count
- sum of trade side amount in USD
- unique of transaction from
Filters
- currency smart contract is 0xdac1…1ec7 or 0xC02a…6Cc2
The query
query MyQuery($in: [String!]) {
EVM(dataset: realtime, network: eth) {
DEXTradeByTokens(
where: {Trade: {Currency: {SmartContract: {in: $in}}}}
orderBy: {descendingByField: "count"}
) {
Block{
Time(minimum: Block_Time)
}
Trade {
Currency {
Name
Symbol
SmartContract
}
maxPrice: Price(maximum: Trade_Price, if: {Trade: {Side: {AmountInUSD: {ge: "1"}}}}) # Price against the side/quote currency
openPrice: Price(minimum: Block_Time)
}
count
tradeAmount: sum(of: Trade_Side_AmountInUSD)
buyAmount: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}})
sellAmount: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}})
senders: uniq(of: Transaction_From)
}
}
}
Variables
{
"in": ["0xdac17f958d2ee523a2206206994597c13d831ec7", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"]
}
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