Latest Trades of NFT Token

Returns the latest 10 DEX trades on Ethereum, where buy currency smart contract is 0x0fcb…4170, block date since 2023-05-02 and block date till 2023-05-09: block time, transaction hash, protocol family, protocol name, protocol version, smart contract, buy price and 7 more fields.

By Aleksey · saved 9 May 2023 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query($network: evm_network, $limit: Int!, $offset: Int!, 
  $from: String, $till: String, $token: String) {
  EVM(dataset: combined network: $network){
    DEXTrades(
      orderBy: {descending: Block_Number}
      limit: {offset: $offset count: $limit}
      where: {
        Block: {Date: {since: $from till: $till }}
        Trade: {
          Buy: {
            Currency: {SmartContract: {is: $token }}
          }
        }
      }
    ){
      Block {
        Time
      }
      Transaction {
        Hash
      }
      Trade {
        Dex {
          ProtocolFamily
          ProtocolName
          ProtocolVersion
          SmartContract
        }
        Buy {
					Price
          Buyer
          Ids
          URIs
        }
        Sell {
          Seller
          Amount
          Currency {
            Symbol
            SmartContract
          }        
        }
      }
    }
  }
}

Variables

{
  "network": "eth",
  "limit": 10,
  "offset": 0,
  "from": "2023-05-02",
  "till": "2023-05-09",
  "token": "0x0fcbd68251819928c8f6d182fc04be733fa94170"
}

Similar queries