latest trades

Returns the latest 50 DEX trades by token on Tron, where side currency smart contract is TNUC9Q…jWFR, currency smart contract is TJ9mxW…diAq and side amount is above 0: block time, owner address, protocol family, protocol name, currency symbol, smart contract, currency name and 9 more fields.

By Akshat · saved 20 September 2024 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query LatestTrades($token: String, $base: String) {
  Tron {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 50}
      where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {SmartContract: {is: $base}}}, Currency: {SmartContract: {is: $token}}, Price: {gt: 0}}, Transaction: {Result: {Success: true}}}
    ) {
      Block {
        allTime: Time
      }
      Trade {
        Dex {
          OwnerAddress
          ProtocolFamily
          ProtocolName
        }
        Currency {
          Symbol
          SmartContract
          Name
        }
        Price
        AmountInUSD
        Amount
        Side {
          Type
          Currency {
            Symbol
            SmartContract
            Name
          }
          AmountInUSD
          Amount
        }
      }
    }
  }
}

Variables

{
  "token": "TJ9mxWPmQSJswqMakEehFWcAntg73odiAq",
  "base": "TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR"
}

Similar queries