Latest price of the specific token

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

By Vishal · saved 29 May 2024 · run 5 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"}}}}}
      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