Version 0.5.0 of the Solana Tracker Data API SDK (@solana-tracker/data-api) adds trade and liquidity history methods, live liquidity rooms, and opt-in identity enrichment without removing anything from 0.4.0. Existing trade calls, transaction rooms, and types keep working, so most upgrades are a version bump followed by opt-in changes. The only removals in the 0.3.x to 0.5.0 range happened in 0.3.1.
What changed in the Solana Tracker Data API SDK
| Release | Date | Changes that matter for an upgrade |
|---|---|---|
| 0.3.1 | 2026-05-27 | Removed getPnlV2WalletStatus and refreshPnlV2Wallet. Added Jupiter DCA REST methods and subscribe.dca rooms |
| 0.4.0 | 2026-08-12 | Added PredictionMarketsClient, whale and KOL trade methods and rooms, Lighthouse market stats, subscribe.tx.poolWallet, and prediction-market rooms. Nothing removed |
| 0.5.0 | 2026-09-18 | Added trade/liquidity history methods, subscribe.liquidity, { enriched: true } options, and getMarketTradersByExchange. Nothing removed |
The 0.5.0 release also fixes two runtime issues. Subscriptions created before a browser Datastream worker existed are now forwarded once the worker starts. The REST client now falls back to the bundled node-fetch when the runtime has no native fetch.
Upgrade the package
npm install @solana-tracker/data-api@^0.5.0
npm ls @solana-tracker/data-api
npx tsc --noEmit
From 0.4.x, the type check should pass unchanged: 0.5.0 introduced separate EnrichedTrade, EnrichedTokenTransaction, and EnrichedWalletTransaction types so that existing type keys and DatastreamRoom members stay identical. The SDK's own compatibility checks run against the published 0.3.1, 0.3.2, and 0.4.0 packages.
From 0.3.0, remove calls to the wallet status and refresh methods. PnL v2 wallet endpoints can return a queued response while a wallet is indexing, so check queued === true before reading analytics fields.
Move trade calls to the history methods
The legacy trade methods keep their positional arguments, swaps-only results, and the numeric nextCursor on TradesResponse. The new methods take an options object and return TradeHistoryResponse, whose cursor can be a number, an opaque string, or null.
| 0.4.x method (still supported) | 0.5.0 history method |
|---|---|
getTokenTrades(mint, cursor, ...) | getTokenTradeHistory(mint, options) |
getPoolTrades(mint, pool, cursor, ...) | getPoolTradeHistory(mint, pool, options) |
getUserTokenTrades(mint, wallet, cursor, ...) | getUserTokenTradeHistory(mint, wallet, options) |
getUserPoolTrades(mint, pool, wallet, cursor, ...) | getUserPoolTradeHistory(mint, pool, wallet, options) |
Before:
// 0.4.x: positional flags, swaps only, numeric cursor
const page = await client.getTokenTrades(mint, cursor, true, false, true);
After:
// 0.5.0: options object; events defaults to 'trades'
const page = await client.getTokenTradeHistory(mint, {
events: 'trades',
showMeta: true,
hideArb: true,
limit: 100,
cursor,
});
if (page.hasNextPage && page.nextCursor != null) cursor = page.nextCursor;
Migrate in two steps. First switch to the history method with events: 'trades' and confirm the screen shows the same swaps. Then add 'liquidity' or 'all' with a switch on the row type, because LP rows have no price or volume fields and their token amounts are exact strings. limit must be 1-500; the SDK throws a ValidationError before sending anything outside that range.
Cursors are tied to their query. Swap feeds use timestamp cursors; liquidity and mixed feeds use opaque strings. Pass nextCursor back unchanged with the same scope, event mode, and sort direction, and widen any stored cursor type from number before persisting the new values. The Solana liquidity events guide has the full backfill and reconciliation pattern.
Opt into liquidity and identity streams
subscribe.liquidity exposes five scopes: token, tokenPool, tokenPoolWallet, pool, and wallet. Live LP events arrive at processed commitment with no rollback message, so reconcile them against REST history and do not deduplicate them by signature.
Passing { enriched: true } to a liquidity room or to subscribe.tx.token, .pool, .poolWallet, .wallet, .whale, or .kol joins a separate :enriched room. Existing transaction rooms stay swaps-only and unenriched. Enriched events can arrive later or out of order, and identityStatus: 'partial' will not be corrected afterwards. See the Solana wallet identity API guide for how identity fields are shaped.
Replace deprecated stream helpers
These still work in 0.5.0 but are deprecated:
- The token price helper under the price namespace: use
subscribe.price.aggregated(mint)for the aggregate price, orsubscribe.price.pool(pool)for one pool. - The balance helpers under
subscribe.tx.wallet(wallet): usesubscribe.wallet(wallet).balance()and.tokenBalance(mint). - The
addressfield on risk entries: readwallet. The SDK still normalizes the old alias.
For prediction markets, getMarketTraders() keeps its signature; getMarketTradersByExchange() returns exchange-specific shapes.
Check before you ship
- REST calls still have no timeout and no retries. Keep your own bounded retry for 429, 5xx, and network errors.
- Datastream reconnects and rejoins rooms on its own. Remove manual reconnect timers that compete with it.
- On Node without a native
WebSocket, installwsif your install omits optional dependencies. - Test an empty page, a
nullfinal cursor, a disconnect followed by a reconnect, and teardown: listenerunsubscribe(),ds.unsubscribe(room), thends.disconnect(). - Keep the Datastream URL server-side; it contains your key. Keys live in the Data API dashboard.
The SDK covers the Solana Data API and Datastream. For raw RPC methods, use your Solana client against Solana RPC.
FAQ
Do I have to rewrite existing trade calls?
No. The legacy methods keep their signatures and behavior. Move to the history methods when you need liquidity rows, enrichment, sorting, or larger pages.
Is 0.5.0 a breaking change from 0.4.0?
No methods, rooms, or type keys were removed. Run your type check and tests anyway, especially around wrappers that re-export SDK types.
Where did the PnL wallet status and refresh methods go?
They were removed in 0.3.1. Handle the queued PnL response instead.
Which SDK version added the Jupiter DCA methods?
0.3.1. The Jupiter DCA API guide covers them.