Latest price of the token in BSC

To get the price of the token, "put the address of the your token in place of $token

By Vishal · saved 27 May 2024 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query ($token: String!) {
  EVM(dataset: archive, network: bsc) {
    DEXTrades(
      limit: {count: 10}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: $token}}}, Sell: {Currency: {SmartContract: {is: "0x55d398326f99059ff775485246999027b3197955"}}}}, Block: {Date: {is: "2024-05-27"}}}
      orderBy: {descending: Block_Time}
    ) {
      Block {
        Time
      }
      Transaction {
        Hash
      }
      Trade {
        Buy {
          Amount
          PriceInUSD
          Seller
         
          Price
           PriceInUSD
          Currency {
            Name
          SmartContract
          }
          Buyer
         
        }
       
        Sell {
          Amount
          Buyer
          PriceInUSD
          Seller
          Price
          Currency {
            Name
            SmartContract
          }
        }
      }
    }
  }
}

Variables

{
  "network": "bsc",
  "token": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
}

Similar queries