DEX prices

Returns the latest DEX trade on Ethereum, where pair smart contract is 0x9c4f…7c4c: buy currency symbol, buy fungible, buy currency name, buy smart contract, buy decimals, buy price, sell currency symbol and 7 more fields.

By Francesco Gasparetto · saved 13 March 2025 · run 24 times · Bitquery API v2

What it returns

Filters

The query

query dexPrices($contract: String!) {
  EVM(network: eth, dataset: archive) {
    DEXTrades(
      orderBy: {descending: Block_Time}
      where: {Trade: {Dex: {Pair: {SmartContract: {is: $contract}}}}, TransactionStatus: {Success: true}}
      limit: {count: 1}
    ) {
      Trade {
        Buy {
          Currency {
            Symbol
            Fungible
            Name
            SmartContract
            Decimals
          }
          Price_against_sell_currency: Price
        }
        Sell {
          Currency {
            Symbol
            Fungible
            Name
            SmartContract
            Decimals
          }
        }
      }
      Block {
        Date
        Number
      }
      Transaction {
        Hash
      }
    }
  }
}

Variables

{
  "contract":"0x9c4fe5ffd9a9fc5678cfbd93aa2d4fd684b67c4c",
  "block": "21929720"
}

Similar queries