subscribe to account owner trades

Streams DEX trades on Solana as they happen, where buy account owner is 2ois1y…5W72 or fdsa, sell account owner is 2ois1y…5W72 or fdsa and block time after 2025-04-25: block time, slot, transaction signature, fee payer, fee in USD, protocol name, protocol family and 14 more fields.

By asss as · saved 26 April 2025 · Bitquery API v2

What it returns

Filters

The subscription

subscription GetTradesByOwnerS($ownerAddresses: [String!]!, $sinceTime: DateTime!) {
  Solana {
    DEXTrades(
      where: {Trade: {Buy: {Account: {Owner: {in: $ownerAddresses}}}, Sell: {Account: {Owner: {in: $ownerAddresses}}}}, Block: {Time: {after: $sinceTime}}}
    ) {
      Block {
        Time
        Slot
      }
      Transaction {
        Signature
        FeePayer
        FeeInUSD
      }
      Trade {
        Dex {
          ProtocolName
          ProtocolFamily
        }
        Buy {
          Price
          PriceInUSD
          Currency {
            Symbol
            Name
            MintAddress
          }
          Account {
            Owner
          }
          AmountInUSD
        }
        Sell {
          Currency {
            Name
            Symbol
            MintAddress
          }
          AmountInUSD
          Account {
            Owner
          }
          Price
          PriceInUSD
        }
      }
    }
  }
}

Variables

{
  "ownerAddresses": [
    "2ois1yQ7pEQjQkjohnN9rYBk8HWmAfCStWCFzc535W72", "fdsa"
  ],
  "sinceTime": "2025-04-25T00:00:00Z"
}

Similar queries