Historical Individual Solana Trades on the API
Until October 2026, individual Solana trades on the API lived in Solana.DEXTrades on the realtime dataset, which keeps about 12 hours. Anything older came as aggregates from DEXTradeByTokens on archive, or as per-trade rows from the Trading API for the last month.
Solana.DEXTrades is now available on dataset: archive and dataset: combined too: individual trades, one row per swap, with the signature, signer, both legs of the trade, the DEX program and USD values. The archive is being enabled window by window and will reach back to 2024. Like every archive dataset, it is not included in the self-service plans by default: it is part of the Solana Historical OHLCV & Token Price Data add-on on the pricing page, the same add-on that unlocks DEXTradeByTokens history, so customers who already have it can run these queries today. The free trial is realtime only.
What you get
- Every trade of a token in a time window, with the wallet that made it.
- Every trade a wallet signed, as far back as the archive reaches.
- Trade counts and volumes by DEX inside any window.
- Trades in a slot range, for reconciling against your own indexer.
- With
combined, one query that covers the archive and the current slot.
Two rules
The table is large and has no index on token or wallet columns, so two rules apply on archive and on the archive half of combined. Realtime is unchanged.
Every query needs a bound. Put a Block.Time, Block.Slot or Block.Date filter at the top level of where. A mint or wallet filter on its own is rejected with:
DEXTrade from the API table dex_trades needs a filter on Block_Time or Block_Slot in the where clause
Order by slot, not time. Use orderBy: {descending: Block_Slot}. It is the first column of the primary key, so a limited query stops reading early. On combined, a recent window ordered by Block_Time times out.
Keep the window narrow when you filter on an address. There is no index on mint, wallet or signer columns, so every trade in the window is read. An hour or a day works; a multi-day range with an address filter can time out.
Example: a token's trades in one hour
Run it in the IDE.
{
Solana(dataset: archive) {
DEXTrades(
limit: {count: 10}
orderBy: {descending: Block_Slot}
where: {
Block: {Time: {since: "2026-09-01T00:00:00Z", till: "2026-09-01T01:00:00Z"}}
Transaction: {Result: {Success: true}}
Trade: {Buy: {Currency: {MintAddress: {is: "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"}}}}
}
) {
Block {
Time
Slot
}
Transaction {
Signature
Signer
}
Trade {
Dex {
ProtocolName
ProtocolFamily
}
Buy {
Amount
AmountInUSD
PriceInUSD
Currency {
Symbol
MintAddress
}
Account {
Address
Owner
}
}
Sell {
Amount
AmountInUSD
Currency {
Symbol
MintAddress
}
}
}
}
}
}
Example: a wallet's trades on one day
Run it in the IDE.
{
Solana(dataset: archive) {
DEXTrades(
limit: {count: 20}
orderBy: {descending: Block_Slot}
where: {
Block: {Time: {since: "2026-09-15T00:00:00Z", till: "2026-09-16T00:00:00Z"}}
Transaction: {Signer: {is: "F7yD9Uk47rhxRwet5xh7t8rZS4wN5iE16y2o64KoiQYX"}}
}
) {
Block {
Time
}
Transaction {
Signature
}
Trade {
Dex {
ProtocolName
}
Buy {
Amount
AmountInUSD
Currency {
Symbol
MintAddress
}
}
Sell {
Amount
AmountInUSD
Currency {
Symbol
MintAddress
}
}
}
}
}
}
Example: latest trades up to the current slot
combined adds the realtime tail on top of the archive. Run it in the IDE.
{
Solana(dataset: combined) {
DEXTrades(
limit: {count: 10}
orderBy: {descending: Block_Slot}
where: {
Block: {Time: {since_relative: {hours_ago: 1}}}
Trade: {Buy: {Currency: {MintAddress: {is: "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"}}}}
}
) {
Block {
Time
Slot
}
Transaction {
Signature
Signer
}
Trade {
Dex {
ProtocolName
}
Buy {
Amount
AmountInUSD
PriceInUSD
Currency {
Symbol
}
}
Sell {
Amount
Currency {
Symbol
}
}
}
}
}
}
More queries
- Trades of a token by DEX: count, USD volume and distinct signers per DEX in a window.
- Wallet buys on a day: count and USD volume for one owner.
- Trades in a slot range:
Block.Slotas the bound. - Archive coverage: total count and first and last trade time, one of the few aggregates that runs without a bound.
Which cube when
| You need | Use |
|---|---|
| Live swaps or the last 30 days, with USD price and market cap on every row | Trading API |
| Individual Solana trades, last 12 hours, no bound needed | Solana(dataset: realtime) DEXTrades |
| Individual Solana trades, older than 12 hours | Solana(dataset: archive) or combined DEXTrades |
| OHLCV, volume, buyers and sellers back to June 2024 | Solana(dataset: archive) DEXTradeByTokens |
The full rule set, including how Block.Date is turned into a time range and which fields differ from realtime, is on the Solana DEX Trades API page.
Ready to run this in production?
Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.