trades of a wallet

Returns DEX trades on Solana, where buy account owner is 2Yyf4V…WZCf and sell account owner is 2Yyf4V…WZCf: program address, protocol family, protocol name, buy amount, buy account address, buy metadata address, buy currency key and 22 more fields.

By gaurav · saved 7 January 2025 · run 3 times · Bitquery API v2

What it returns

Filters

The query

{
  Solana {
    buy: DEXTrades(
      where: {Trade: {Buy: {Account: {Owner: {is: "2Yyf4VgGxG9A6w433uSi7AqVFDEDYTGmMdmVKTJbWZCf"}}}}}
    ) {
      Trade {
        Dex {
          ProgramAddress
          ProtocolFamily
          ProtocolName
        }
        Buy {
          Amount
          Account {
            Address
          }
          Currency {
            MetadataAddress
            Key
            IsMutable
            EditionNonce
            Decimals
            CollectionAddress
            Fungible
            Symbol
            Native
            Name
          }
          Order {
            LimitPrice
            LimitAmount
            OrderId
          }
          Price
        }
        Market {
          MarketAddress
        }
        Sell {
          Account {
            Address
          }
          Currency {
            IsMutable
            Decimals
            CollectionAddress
            Fungible
            Symbol
            Native
            Name
          }
          Price
        }
      }
    }
    sell: DEXTrades(
      where: {Trade: {Sell: {Account: {Owner: {is: "2Yyf4VgGxG9A6w433uSi7AqVFDEDYTGmMdmVKTJbWZCf"}}}}}
    ) {
      Trade {
        Dex {
          ProgramAddress
          ProtocolFamily
          ProtocolName
        }
        Buy {
          Amount
          Account {
            Address
          }
          Currency {
            MetadataAddress
            Key
            IsMutable
            EditionNonce
            Decimals
            CollectionAddress
            Fungible
            Symbol
            Native
            Name
          }
          Order {
            LimitPrice
            LimitAmount
            OrderId
          }
          Price
        }
        Market {
          MarketAddress
        }
        Sell {
          Account {
            Address
          }
          Currency {
            IsMutable
            Decimals
            CollectionAddress
            Fungible
            Symbol
            Native
            Name
          }
          Price
        }
      }
    }
  }
}

Similar queries