BlockTime_parameters_add

latest trades for a token - both buy and sell

Returns the latest 5 DEX trades on Ethereum, where buy currency smart contract is 0x2ef8…893b, sell currency symbol is WETH, USDC or 1 more and block time since 2023-12-14: buy currency symbol, buy amount, sell amount, sell currency symbol, block time, transaction hash and from.

By Omkar_BQ · saved 15 December 2023 · Bitquery API v2

What it returns

Filters

The query

query MyBuyerCompV3($limitCount: Int = 5, $excludeTokens: [String], $tokenContractAddress: String, $buyerAddress: String, $symbols: [String!]!, $amountSell: String, $netzwerk: evm_network) {
 EVM(dataset: combined, network: $netzwerk) {
   DEXTrades(
     limit: {count: $limitCount}
     where: {Trade: {Buy: {Currency: {SmartContract: {is: $tokenContractAddress}}, Buyer: {is: $buyerAddress}}, Sell: {Amount: {gt: $amountSell}, Currency: {Symbol: {in: $symbols}}, Buyer: {notIn: $excludeTokens}}}, Block: {Time: {since: "2023-12-14T21:27:45Z", till: "2023-12-14T21:57:45Z"}}}
     orderBy: {descending: Block_Time, descendingByField: "Trade_Sell_Amount"}
   ) {
     Trade {
       Buy {
         Currency {
           Symbol
         }
         Amount
       }
       Sell {
         Amount
         Currency {
           Symbol
         }
       }
     }
     Block {
       Time
     }
     Transaction {
       Hash
       From
     }
   }
 }
}

Variables

{
 "limitCount": 5,
 "netzwerk": "eth",
 "tokenContractAddress": "0x2ef8a2ccb058915e00e16aa13cc6e36f19d8893b",
 "symbols": ["WETH", "USDC", "USDT"],
 "amountSell": "0.01",
 "$excludeTokens": [
   "0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13",
   "0xaEC2605a04bB7709a61eF43d660712Ece030cb03"
 ]
}

Similar queries