get tokens traded 3 minutes ago and oldest price

Returns DEX trades on Solana, sorted by block time: buy currency name, buy currency symbol, buy currency mint address, buy price in USD, buy price, sell price, sell price in USD and 10 more fields.

By Divyasshree · saved 14 July 2025 · run 2 times · Bitquery API v2

What it returns

The query

query RecentActiveTokens($since: DateTime!) {
  Solana(network: solana, dataset: realtime) {
    DEXTrades(
      where: {Transaction: {Result: {Success: true}}}
      limitBy: {count: 1, by: Trade_Buy_Currency_MintAddress}
      orderBy: {ascending: Block_Time}
    ) {
      Trade {
        Buy {
          Currency {
            Name
            Symbol
            MintAddress
          }
          PriceInUSD
          Price
        }
        Sell {
          Price
          PriceInUSD
          Currency {
            Name
            MintAddress
          }
          AmountInUSD
          Amount
          Account {
            Address
          }
        }
        Dex {
          ProtocolFamily
          ProtocolName
        }
      }
      Block {
        Time
      }
      joinDEXTradeByTokens(
        Trade_Currency_MintAddress: Trade_Buy_Currency_MintAddress
        join: inner
        where: {Block: {Time: {since: $since}}}
        limit: {count: 100}
      ) {
        Trade {
          Currency {
            Name
            MintAddress
          }
        }
      }
    }
  }
}

Variables

{
  "since":"2025-07-14T05:52:00Z"
}

Similar queries