account trades without WSOL

Returns the latest DEX trades by token on Solana: block time, protocol name, protocol family, program address, currency symbol, currency name, currency mint address and 12 more fields.

By Aleksey · saved 12 July 2024 · Bitquery API v2

What it returns

The query

query LatestTrades($account: String) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      where: {any: [{Trade:
        {Currency: {Wrapped: false}, 
          Account: {Token: {Owner: {is: $account}}}}}, {Trade: {Side: {Account: {Address: {is: $account}}}}}], Transaction: {Result: {Success: true}}}
    ) {
      Block {
        Time
      }
      Trade {
        Dex {
          ProtocolName
          ProtocolFamily
          ProgramAddress
        }
        Currency {
          Symbol
          Name
          MintAddress
        }
        Account {
          Address
          Token {
            Owner
          }
        }
        Price
        Amount
        Side {
          Type
          Account {
            Address
          }
          Currency {
            Symbol
            Name
            MintAddress
            Native
          }
          AmountInUSD
          Amount
          Type
        }
      }
    }
  }
}

Variables

{
  "account": "HBV9sARNHeCZcLpMZ7jt9hagjBoRPnuGPZPfdE249Sw8"
}

Similar queries