pricequery

Returns the latest DEX trade, where sell currency smart contract is 0xdac1…1ec7: block time, transaction hash, buy amount, buy seller, buy price, buy currency name, buy buyer and 7 more fields.

By panarean · saved 17 February 2025 · Bitquery API v2

What it returns

Filters

The query

query ($token: String!, $network: evm_network!) {
  EVM(network: $network) {
    DEXTrades(
      limit: {count: 1}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: $token}}}, Sell: {Currency: {SmartContract: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}}}}}
      orderBy: {descending: Block_Time}
    ) {
      Block {
        Time
      }
      Transaction {
        Hash
      }
      Trade {
        Buy {
          Amount
          Seller
          Price
          Currency {
            Name
          }
          Buyer
        }
        Dex {
          ProtocolName
        }
        Sell {
          Amount
          Buyer
          Seller
          Price
          Currency {
            Name
            SmartContract
          }
        }
      }
    }
  }
}

Similar queries