Skip to Content
Symmio Trading-SDK — the SDK surface for builders on Arbitrum
CorePoolsgetClaimHistory

getClaimHistory

Fetch the signed-in user’s claim history — their past pool-reward claims, newest first. The authed, per-user read behind a “your claims” panel and the natural companion to claimProfit.

import { getClaimHistory } from "@symmio/trading-core"; const page = await getClaimHistory(config, { accessToken: token.accessToken, tokenContractAddress: "0xToken…", // optional — omit for every pool size: 25, });

The endpoint is authed and scoped to the caller — it only ever returns claims the user owns — so the optional filters narrow within that set. 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 getClaimHistory 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

accessTokenstringrequired

Bearer token from authenticateListing. Sent as Authorization: Bearer <token>. A bad or expired token yields a 401 (see Throws).

tokenContractAddressstringoptional

Narrow to one pool by its token contract address. Omit for the user’s claims across every pool.

accountAddressstringoptional

Narrow to claims credited to one sub-account. Omit for the user’s claims across all of their sub-accounts.

startnumberoptional

Row offset. Defaults to 0.

sizenumberoptional

Page size. Defaults to 150.

chainIdnumberoptional

Target 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<PoolClaimHistoryPage>

One page of the user’s claims. count is the total across all pages (what a pager divides); items is the page’s PoolClaim rows, newest first. Each row carries claimRequestId, the accountAddress that received the USDC, the amount (18-decimal bigint USD), the transactionHash (or null), and the time (Unix seconds).

Query options

import { getClaimHistoryQueryOptions } from "@symmio/trading-core"; import { useQuery } from "@tanstack/react-query"; useQuery(getClaimHistoryQueryOptions(config, { accessToken, tokenContractAddress: "0xToken…" }));

getClaimHistoryQueryOptions(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 — a SymmError (kind: "config") when the chain has no listing backend configured. Gate with supportsListingService to hide the claim history instead of erroring.
  • FETCH_CLAIM_HISTORY_FAILED — the request itself failed. Any axios failure becomes a SymmApiError carrying status, statusText, responseData, url and method; a non-axios throw becomes a plain SymmError (kind: "api"). A 401 means the accessToken was missing, malformed, or expired — re-run authenticateListing and retry.
Last updated on