LatestTradesOfWallet

trades

Returns the latest 1000 DEX trades by token on Solana, where account owner is 4Ddrfi…9nNh and currency symbol is not WSOL or SOL: block time, trade amount, amount in USD, trade price, price in USD, price asymmetry, trade index and 12 more fields.

By Chandra Pratap SIngh · saved 11 February 2025 · run 13 times · Bitquery API v2

What it returns

Filters

The query

query LatestTrades($wallet_address: String) {
  Solana(dataset: realtime) {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 1000}
      where: {Trade: {Account: {Owner: {is: $wallet_address}}, Currency: {Symbol: {notIn: ["WSOL", "SOL"]}}}}
    ) {
      Block {
        Time
      }
      Trade {
        Amount
        AmountInUSD
        Price
        PriceInUSD
        PriceAsymmetry
        Index
        Side {
          Type
          Amount
          AmountInUSD
        }
        Currency {
          Symbol
          MintAddress
          Name
        }
        Dex {
          ProgramAddress
          ProtocolFamily
          ProtocolName
        }
      }
      bought: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: buy}}}})
      sold: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}})
      volume: sum(of: Trade_Amount)
      volumeUsd: sum(of: Trade_Side_AmountInUSD)
      PriceUsd : sum(of: Trade_PriceInUSD)
    }
  }
}

Variables

{
  "wallet_address":"4DdrfiDHpmx55i4SPssxVzS9ZaKLb8qr45NKY9Er9nNh"
}

Similar queries