LatestTradesOfWallet

Returns the latest 1000 DEX trades by token on Solana, where account owner is 4Ddrfi…9nNh and currency symbol is not WSOL: block time, side type, currency symbol, currency mint address, currency name, program address, protocol family and 5 more fields.

By ashish verma · saved 11 February 2025 · run 7 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: {not: "WSOL"}}}}
    ) {
      Block {
        Time
      }
      Trade {
        Side {
          Type
        }
        Currency {
          Symbol
          MintAddress
          Name
        }
        Dex {
          ProgramAddress
          ProtocolFamily
          ProtocolName
        }
      }
      bought: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}})
      sold: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}})
      volume: sum(of: Trade_Amount)
      volumeUsd: sum(of: Trade_Side_AmountInUSD)
      Transaction {
        Fee
        Signature
      }
    }
  }
}

Variables

{
  "wallet_address":"4DdrfiDHpmx55i4SPssxVzS9ZaKLb8qr45NKY9Er9nNh"
}

Similar queries