Realised PnL

Returns DEX trades by token on Solana, where currency mint address is 4iLKj7…pump, account owner is 2vqBfR…XUAK and block date since 2026-03-11: currency name, currency symbol, currency mint address, account owner, sum of trade side amount in USD, calculate and count.

By Akshat · saved 12 March 2026 · run 1 time · Bitquery API v2

What it returns

Filters

The query

{
  Solana(dataset: combined) {
    DEXTradeByTokens(
      where: {
        Trade: {
          Currency: {
            MintAddress: { is: "4iLKj7fkZF2rSpgSD8W6UFq4fkKXkkbJMGXMz3B8pump" }
          }
          Account:{Owner:{is:"2vqBfRdhX8sHmVFo1TY1yBdFXkHMe4LgifrxvHBpXUAK"}}
        }
        Transaction: { Result: { Success: true } }
        Block: { Date: { since: "2026-03-11", till: "2026-03-13" } }
      }
    ) {
      Trade {
        Currency {
          Name
          Symbol
          MintAddress
        }
        Account {
          Owner
        }
      }
      buy_volume: sum(
        of: Trade_Side_AmountInUSD
        if: { Trade: { Side: { Type: { is: buy } } } }
      )
      sell_volume: sum(
        of: Trade_Side_AmountInUSD
        if: { Trade: { Side: { Type: { is: sell } } } }
      )
      PnL:calculate(expression:"$sell_volume - $buy_volume")
      trades: count
    }
  }
}

Similar queries