Price of a token on bsc

Returns the latest DEX trade on BNB Chain, where buy currency smart contract is 0x2170…33F8 and sell currency smart contract is 0x55d3…7955: block time, sell smart contract, sell currency symbol, sell price, protocol name, buy currency symbol, buy smart contract and buy price.

By Akshat · saved 16 April 2024 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(network: bsc) {
    DEXTrades(
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0x2170Ed0880ac9A755fd29B2688956BD959F933F8"}}}, Sell: {Currency: {SmartContract: {is: "0x55d398326f99059fF775485246999027B3197955"}}}}}
      limit: {count: 1}
      orderBy: {descending: Block_Time}
    ) {
      Block{
        Time
      }
      Trade {
        Sell {
          Currency {
            SmartContract
            Symbol
          }
          Price_in_terms_buy_currency: Price
        }
        Dex {
          ProtocolName
        }
        Buy {
          Currency {
            Symbol
            SmartContract
          }
          Price_in_terms_sell_currency: Price
        }
      }
    }
  }
}

Similar queries