Recommendations for Agents
Use getTransactionsForAddress instead of two-step lookup
getTransactionsForAddress combines signature lookup and transaction fetching into a single call with server-side filtering. It supports time/slot ranges, token account filtering, and pagination.
Use sendSmartTransaction for standard sends
It automatically simulates, estimates compute units, fetches priority fees, and confirms. Do not manually build ComputeBudget instructions — the SDK adds them automatically.
Use Helius Sender for ultra-low latency
For time-sensitive transactions (arbitrage, sniping, liquidations), usesendTransactionWithSender. It routes through Helius’s multi-region infrastructure and Jito.
Use getAssetBatch for multiple assets
When fetching more than one asset, batch them. Do not call getAsset in a loop.
Use webhooks or WebSockets instead of polling
Do not pollgetTransactionsForAddress in a loop. Use webhooks for server-to-server notifications or WebSockets for real-time client-side streaming.
Pagination
The SDK uses different pagination strategies depending on the method.Token/Cursor-Based (RPC V2 Methods)
Page-Based (DAS API)
tokenAccounts Filter
When querying getTransactionsForAddress, the tokenAccounts filter controls whether token account activity is included:
| Value | Behavior | Use When |
|---|---|---|
omitted / "none" | Only transactions directly involving the address | You only care about SOL transfers and program calls |
"balanceChanged" | Also includes token transactions that changed a balance | Recommended for most agents — shows token sends/receives without noise |
"all" | Includes all token account transactions | You need complete token activity (can return many results) |
changedSinceSlot — Incremental Account Fetching
changedSinceSlot returns only accounts modified after a given slot. Useful for syncing or indexing workflows. Supported by getProgramAccountsV2, getTokenAccountsByOwnerV2, getAccountInfo, getMultipleAccounts, getProgramAccounts, and getTokenAccountsByOwner.
Common Mistakes
-
transactionDetails: "full"is not the default — By default,getTransactionsForAddressreturns signatures only. SettransactionDetails: "full"to get full transaction data. -
Do not add ComputeBudget instructions with
sendSmartTransaction— The SDK adds them automatically. Adding your own causes duplicate instructions and transaction failure. -
Priority fees are in microlamports per compute unit — Not lamports. Values from
getPriorityFeeEstimateare already in the correct unit forSetComputeUnitPrice. -
DAS pagination is 1-indexed —
page: 1is the first page, notpage: 0. -
blockTimeis Unix seconds, not milliseconds — UseMath.floor(Date.now() / 1000)when filtering byblockTime. -
getAssethides fungible tokens by default — Passoptions: { showFungible: true }to include them. -
WebSocket streams need cleanup — Always use an AbortController signal and call
helius.ws.close()when done to avoid connection leaks.
Error Handling and Retries
The SDK throws nativeError objects with the HTTP status code embedded in the message string (e.g., "API error (429): ..."). There is no .status property on the error object, so status detection requires message parsing.
| Status | Meaning | Action |
|---|---|---|
| 401 | Invalid or missing API key | Check API key |
| 429 | Rate limited or out of credits | Back off and retry |
| 5xx | Server error | Retry with exponential backoff |