ton top traders - last trades

Returns the latest 50 DEX trades by token on TON, where block time since 2024-10-18: block time, protocol family, amount in USD, price in USD, trade amount, side type, side currency symbol and 9 more fields.

By Srdjan Stankovic · saved 21 October 2024 · Bitquery API v2

What it returns

Filters

The query

query lastTrades($time_ago: DateTime, $trader: String) {
  Ton {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 50}
      where: {Block: {Time: {since: $time_ago}}, any: [{Trade: {Seller: {Address: {is: $trader}}}}, {Trade: {Buyer: {Address: {is: $trader}}}}]}
    ) {
      Block {
        Time
      }
      Trade {
        Dex {
          ProtocolFamily
        }
        AmountInUSD
        PriceInUSD
        Amount
        Side {
          Type
          Currency {
            Symbol
            SmartContract {
              Address
              Workchain
            }
            Name
          }
          AmountInUSD
          Amount
        }
        Currency {
          Symbol
          SmartContract {
            Address
            Workchain
          }
          Name
        }
      }
    }
  }
}

Variables

{
  "trader": "UQA4c2edlFI4soyArI9Qa71dzt1a2zkO-a44u5RrQ7QG8u34",
  "time_ago": "2024-10-18T18:08:49Z"
}

Similar queries