getUserTransactions
Fetch the signed-in user’s transaction history — their pool deposits and withdrawals across every pool, newest first, refunded deposits included. The authed, per-user counterpart to getPoolTransactions (which is one pool, every LP).
import { getUserTransactions } from "@symmio/trading-core";
const page = await getUserTransactions(config, {
accessToken: token.accessToken,
size: 25,
});The endpoint is authed and scoped to the caller — it only ever returns transactions the user owns, so it needs no address parameter. Optionally narrow by type, status, or pool. Pagination is path-based (/{start}/{size}); count is the total across all pages, so it is what a pager should divide, not items.length.
This is a REST read against the listing backend, not a contract call, and it is authed: the accessToken from
authenticateListing is sent as an Authorization: Bearer <token> header. The backend is
resolved from the config before the request, so a target without Pools fails immediately and without any network
traffic — see resolveListingService.
No solver id
Pool listing is chain-level — one listing backend is served per chain — so getUserTransactions takes only an optional chainId and no solverId. Pass a chainId to target a specific deployment’s listing backend; omit it to use the config’s default chain.
Parameters
accessTokenstringrequiredBearer token from authenticateListing. Sent as Authorization: Bearer <token>. A bad
or expired token yields a 401 (see Throws).
transactionTypePoolTransactionTypeoptionalNarrow to deposits or withdrawals only. Omit for both.
transactionStatusPoolTransactionStatusoptionalNarrow to one status (e.g. only PENDING). Omit for all statuses.
tokenAddressstringoptionalNarrow to one pool by its token contract address. Omit for every pool.
startnumberoptionalRow offset. Defaults to 0.
sizenumberoptionalPage size. Defaults to 150.
chainIdnumberoptionalTarget chain id. Defaults to the config’s defaultChainId. Selects which chain’s listing backend is used. There is
no solverId — listing is resolved at chain level.
Returns
Promise<UserTransactionPage>One page of the user’s transactions. count is the total across all pages (what a pager divides); items is the
page’s UserTransaction rows, newest first. Each row carries type (deposit / withdraw), status, the amount
(18-decimal bigint, a 1e18-scaled figure), the token identity (tokenAddress, tokenName, tokenTicker,
tokenDecimals, chainId), wallet, refundAddress, transactionHash, and time (Unix seconds).
Query options
import { getUserTransactionsQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getUserTransactionsQueryOptions(config, { accessToken }));getUserTransactionsQueryOptions(config, options) returns a TanStack options bag with a stable queryKey, the queryFn, and enabled. The bearer accessToken is dropped from the key — it is a credential, not a cache dimension.
Throws
LISTING_NOT_CONFIGURED— aSymmError(kind: "config") when the chain has nolistingbackend configured. Gate withsupportsListingServiceto hide the history instead of erroring.FETCH_USER_TRANSACTIONS_FAILED— the request itself failed. Any axios failure becomes aSymmApiErrorcarryingstatus,statusText,responseData,urlandmethod; a non-axios throw becomes a plainSymmError(kind: "api"). A401means theaccessTokenwas missing, malformed, or expired — re-runauthenticateListingand retry.
Related
getPoolTransactions— one pool’s transactions (every LP, public).getUserProfit— the user’s current LP position and balances.- Listing auth — mints the
accessTokenthis read requires. useUserTransactions— the React hook.- Pools — the slice overview.