jramirez query
Returns the latest 1000 DEX trades on Base, where buy currency smart contract is 0x50c5…b0cb, 0x8335…2913 or 1 more, sell currency smart contract is 0x50c5…b0cb, 0x8335…2913 or 1 more and sell buyer is 0x5dC7…5db2: block time, transaction hash, buy currency symbol, buy smart contract, buy currency name, buy decimals, buy amount and 9 more fields.
What it returns
- block time
- transaction hash
- buy currency symbol
- buy smart contract
- buy currency name
- buy decimals
- buy amount
- buy amount in USD
- delegated
- delegated to
- sell currency symbol
- sell smart contract
- sell currency name
- sell decimals
- sell amount
- sell amount in USD
Filters
- buy currency smart contract is 0x50c5…b0cb, 0x8335…2913 or 1 more
- sell currency smart contract is 0x50c5…b0cb, 0x8335…2913 or 1 more
- sell buyer is 0x5dC7…5db2
- block time since 2024-04-11
- block time till 2024-10-11
- buy amount in USD is above 0.001
- sell amount in USD is above 0.001
The query
query getTokenTrades(
$dataset: dataset_arg_enum!
$network: evm_network!
$limit: Int!
$tokenAddress:[String!]
$wallet: String!
$since: DateTime!
$till: DateTime!
) {
EVM(dataset: $dataset, network: $network) {
buyside: DEXTrades(
limit: { count: $limit }
orderBy: { descending: Block_Time }
where: {
Trade: { Buy: { Currency: { SmartContract: { in: $tokenAddress } }, AmountInUSD: {gt: "0.001"} } }
Block: { Time: { since: $since, till: $till } }
}
) {
Block {
Time
}
Transaction {
Hash
}
Trade {
Buy {
Currency {
Symbol
SmartContract
Name
Decimals
}
Amount
AmountInUSD
}
Dex {
Delegated
DelegatedTo
}
}
}
sellside: DEXTrades(
limit: { count: $limit }
orderBy: { descending: Block_Time }
where: {
Trade: { Sell: { Currency: { SmartContract: { in: $tokenAddress } }, AmountInUSD: {gt: "0.001"}, Buyer: { is: $wallet } } }
Block: { Time: { since: $since, till: $till } }
}
) {
Block {
Time
}
Transaction {
Hash
}
Trade {
Sell {
Currency {
Symbol
SmartContract
Name
Decimals
}
Amount
AmountInUSD
}
Dex {
Delegated
DelegatedTo
}
}
}
}
}
Variables
{
"dataset": "archive",
"network": "base",
"tokenAddress": [
"0x50c5725949a6f0c72e6c4a641f24049a917db0cb",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"0x4200000000000000000000000000000000000006"
],
"since": "2024-04-11T12:00:00Z",
"till": "2024-10-11T12:00:00Z",
"wallet": "0x5dC76A02C49d6f15FBdE0506e0d7cc630CEe5db2",
"limit": 1000
}
Similar queries
- Zora Trades For A Wallet Up To A Block · Base · DEXTrades
- dex_trade_by_tx_base · Base · DEXTrades
- base dextrades · Base · DEXTrades
- trades · Ethereum · DEXTrades
- base_aerodrome_slipstream · Base · DEXTrades