getPoolTransactions
Fetch pool deposit and withdrawal history, newest first — refunded deposits included — for one pool or across every pool.
import { getPoolTransactions, PoolTransactionStatus, PoolTransactionType } from "@symmio/trading-core";
// The latest activity across every pool — no filters.
const latest = await getPoolTransactions(config);
// One pool's pending withdrawals.
const pending = await getPoolTransactions(config, {
tokenAddress: "0x800822d361335b4d5F352Dac293cA4128b5B605f",
transactionType: PoolTransactionType.WITHDRAW,
transactionStatus: PoolTransactionStatus.PENDING,
});Public and unscoped by default: every LP’s rows on every pool, in one newest-first sequence. Every filter is optional and they combine — narrow by pool (tokenAddress), by the chain the pool’s token lives on (marketChainId), by wallet, by type, or by status. Each row names its own pool (tokenAddress, chainId), so an all-pools page stays attributable row by row.
Unlike the other pool tables, this one has rows before the pool is tradable — deposits exist from the moment a
listing is applied for, while the quote and history tables need a symbolId.
Ordering and pagination
- Newest first, fixed. The service orders every page by
time, newest first, across all pools. There is no sort parameter — the order is the same whatever the filters. - Path-based paging.
startandsizetravel in the path (/{start}/{size}), not the query string.startcounts rows, not pages: pagen(0-based) isstart: n * size, and/2/50is the first page shifted by two rows, not page 3.countis the total matching the filters across all pages, so it is what a pager divides — notitems.length. Astartpastcountreturns an empty page withcountintact. - Capped page size. The backend caps
sizeat 50 and rejects a larger value with a422. The default is that cap.
Parameters
chainIdnumberoptionalTarget chain id. Defaults to the config’s defaultChainId. Selects which deployment’s listing backend is asked — it
is not a filter; marketChainId is.
tokenAddressstringoptionalNarrow to one pool by its token contract address (ListingMarket.contractAddress). Omit for every pool. EVM
addresses match case-insensitively; Solana base58 addresses are case-sensitive. An address with no listed market
fails with a 400 (Market not found) rather than returning an empty page.
marketAddressstringoptionalDeprecated — prefer tokenAddress. The same filter under its old name. It keeps working: the SDK sends it as
token_address too, so it is unaffected if the service retires its own market_address alias. When both are set,
tokenAddress wins.
Narrow to pools whose token lives on this chain (ListingMarket.chainId). The service rejects a chain outside its
supported deposit chains (getListingConfig) with a 422.
walletAddressstringoptionalNarrow to one wallet’s rows. Omit for every LP’s.
transactionTypePoolTransactionTypeoptionalNarrow to deposits or withdrawals only. Omit for both.
transactionStatusPoolTransactionStatusoptionalNarrow to one status (e.g. only REFUND). Omit for all statuses.
startnumberoptionalRow offset. Defaults to 0.
sizenumberoptionalPage size. Defaults to 50, which is also the backend’s cap.
Migrating from marketAddress
Rename the parameter — the result is the same:
// Before
await getPoolTransactions(config, { marketAddress: address });
// After
await getPoolTransactions(config, { tokenAddress: address });marketAddress was required before; with every filter optional, omitting both reads every pool.
Returns
Promise<PoolTransactionPage>marketAddressstring | nullThe token address the page was narrowed to, echoed by the backend in its canonical form, or null when the page
spans every pool. Each row carries its own tokenAddress either way.
countnumberTotal rows matching the query across all pages — so this is what a pager divides, not items.length.
itemsPoolTransaction[]The rows themselves, newest first.
Each PoolTransaction:
transactionIdstringBackend id for the transaction.
tokenAddressstringThe pool’s token contract address (EVM 0x… or Solana base58) — the pool this row belongs to.
chainIdListingDepositChainIdThe chain the pool’s token lives on — not the chain the market trades on.
walletAddressstringThe wallet that made it. Varies row to row.
amountbigintAmount moved, in the transaction’s own denomination.
usdcAmountbigintCollateral value moved, USD.
tokenAmountbigintToken amount moved, in the pool token’s units.
transactionHashstring | nullOn-chain hash or Solana signature, when known.
refundAddressstring | nullAddress a refund was sent to; null when not a refund.
refundTransactionHashstring | nullHash of the refund transaction; null when not a refund.
refundTimenumber | nullWhen the refund completed, Unix seconds; null when not a refund.
typePoolTransactionTypeDEPOSIT or WITHDRAW.
statusPoolTransactionStatusPENDING, SUCCESS, REJECTED, REFUND or CANCELED.
timenumberWhen the transaction happened, Unix seconds.
A row carries the pool’s identity but not its display metadata. To label an all-pools page with names and tickers, join each row to its ListingMarket from getListingMarkets on tokenAddress + chainId (contractAddress + chainId on the market).
Query options
import { getPoolTransactionsQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getPoolTransactionsQueryOptions(config, { tokenAddress, size: 25, start: page * 25 }));getPoolTransactionsQueryOptions(config, options) returns a TanStack options bag with a stable queryKey, the queryFn, and enabled. Every filter and the paging are part of the key, so differently filtered pages never share a cache entry. The deprecated marketAddress folds into tokenAddress in the key, so both spellings of one filter do share one. The pools write hooks (withdraw, cancel withdraw, refund) invalidate every key under the "getPoolTransactions" prefix.
Throws
LISTING_NOT_CONFIGURED— aSymmError(kind: "config") when the chain has no listing backend.UNSUPPORTED_CHAIN— aSymmError(kind: "config") for an unknown chain id.FETCH_POOL_TRANSACTIONS_FAILED— an axios failure becomes aSymmApiErrorcarryingstatus,statusTextandresponseData; a non-axios throw becomes a plainSymmError(kind: "api"). Notable statuses:400withresponseData.error_message"Market not found"— thetokenAddress(ormarketAddress) has no listed market. An unlisted pool is an error, not an empty page.422— a filter value the service rejects (a malformed address, amarketChainIdoutside its supported deposit chains) or asizeabove 50.
Related
getUserTransactions— the authed, per-user counterpart, with token display metadata on each row.getListingMarkets— the catalogue to join an all-pools page against for names and tickers.- Pool detail tables — the other pool-page reads.
- React:
usePoolTransactions.