bp
Returns one DEX trade by token on Ethereum, where currency smart contract is <TOKEN> and block time before <BLOCKTIME>, sorted by USD, highest first: smart contract, currency name, trade amount, amount in USD, sum of trade amount in USD, sum of trade side amount in USD, unique of trade buyer and 2 more fields.
What it returns
- smart contract
- currency name
- trade amount
- amount in USD
- sum of trade amount in USD
- sum of trade side amount in USD
- unique of trade buyer
- unique of trade sender
- count
Filters
- currency smart contract is <TOKEN>
- block time before <BLOCKTIME>
The query
{
EVM(network: eth, dataset: combined) {
DEXTradeByTokens(
where: {Trade: {Currency: {SmartContract:
{is: "<TOKEN>"}}},
Block: {Time: {before: "<BLOCKTIME>"}}}
orderBy: {descendingByField: "usd"}
limit: {count: 1}
) {
Trade {
Currency {
SmartContract
Name
}
Amount(maximum: Block_Number)
AmountInUSD(maximum: Block_Number)
}
usd: sum(of: Trade_AmountInUSD)
usd2: sum(of: Trade_Side_AmountInUSD)
buyers: uniq(of: Trade_Buyer)
sellers: uniq(of: Trade_Sender)
count
}
}
}
Variables
{
"network": "bsc"
}
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