With token filter.
Returns the latest DEX trades by token on Ethereum, where currency smart contract is 0xe9cd…ee66, transaction from is 0x703a…68ab and pair smart contract is not 0x: log after call index, buyer, smart contract, pair name and currency symbol.
What it returns
- log after call index
- buyer
- smart contract
- pair name
- currency symbol
Filters
- currency smart contract is 0xe9cd…ee66
- transaction from is 0x703a…68ab
- pair smart contract is not 0x
- block number is above 0
The query
query MyQuery($dataset: dataset_arg_enum!, $network: evm_network!, $addresses: [String!], $start_block: String!) {
EVM(dataset: $dataset, network: $network) {
existing_pnl: DEXTradeByTokens(
where: {TransactionStatus: {Success: true}, Block: {Number: {gt: $start_block}}, Trade: {Currency: {SmartContract: {is: "0xe9cdb1639bf18be40a231525c22844b3bd0eee66"}}, Dex: {Pair: {SmartContract: {not: "0x"}}}}, Transaction: {From: {in: $addresses}}}
orderBy: {descending: Block_Number, descendingByField: "Log_LogAfterCallIndex"}
limitBy: {by: Transaction_From, count: 1}
) {
Log {
LogAfterCallIndex
}
Trade {
Buyer
Dex {
Pair {
SmartContract
Name
}
}
Currency {
SmartContract
Symbol
}
}
}
}
}
Variables
{"dataset": "combined", "network": "eth", "token_address": "0xe9cdb1639bf18be40a231525c22844b3bd0eee66", "addresses": ["0x703a7bc77f797b7a87aa757b59687df81ef468ab"], "start_block": "0"}
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