get all trades using market address on solana

Returns the latest 50 DEX trades by token on Solana, where market market address is 8sLbNZ…Lwxj, block time after 2025-04-17 and side amount is above 0: block time, transaction signature, market address, protocol name, protocol family, side type, price in USD and 6 more fields.

By Divyasshree · saved 18 April 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query LatestTrades($time_ago: DateTime) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 50}
      where: {Transaction: {Result: {Success: true}}, Trade: {Side: {Amount: {gt: "0"}}, Market: {MarketAddress: {is: "8sLbNZoA1cfnvMJLPfp98ZLAnFSYCFApfJKMbiXNLwxj"}}}, Block: {Time: {after: $time_ago}}}
    ) {
      Block {
        Time
      }
      Transaction {
        Signature
      }
      Trade {
        Market {
          MarketAddress
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
        Side {
          Type
        }
        PriceInUSD
        Amount
        Side {
          Currency {
            Symbol
            MintAddress
            Name
          }
          AmountInUSD
          Amount
        }
      }
    }
  }
}

Variables

{
  "time_ago": "2025-04-17T21:17:47Z"
}

Similar queries