getTransferHistory
Internal transfers — margin moves between SYMMIO accounts — for a set of accounts, from the events subgraph’s internalTransfers collection (the source behind a “Transfer” tab).
import { getTransferHistory } from "@symmio/trading-core";
const transfers = await getTransferHistory(config, {
accounts: [subAccount],
first: 50,
});Parameters
accountsreadonly Address[]requiredThe accounts whose transfers to read (e.g. the addresses from getUserSubAccounts). A transfer is matched when one
of these is the sender or the recipient. An empty array reads nothing.
directionTransferDirectiondefault allWhich transfers to return relative to accounts: "all", "outgoing" (sent from a queried account), or
"incoming" (received by one).
firstnumberdefault 1000Page size.
skipnumberdefault 0Page offset.
startTimenumberdefault 0Lower bound on the transfer timestamp (unix seconds).
endTimenumberdefault 2_000_000_000Upper bound on the transfer timestamp (unix seconds).
orderDirection"asc" | "desc"default descSort direction on the transfer timestamp.
chainIdnumberoptionalOptional chain override.
Returns
readonly TransferRow[]idstringSubgraph entity id (use as a stable row key).
fromAddressSender (the from endpoint), checksummed. A raw on-chain endpoint (SubAccount / Virtual Account), not necessarily
the controlling wallet.
toAddressRecipient (the to endpoint), checksummed.
amountbigintAmount, raw bigint in 18 decimals (account-balance units) — NOT the 6-decimal collateral units used by
getBalanceHistory.
timestampnumberBlock timestamp, unix seconds.
transactionHexTransaction hash of the transfer.
direction"outgoing" | "incoming"Whether this transfer is outgoing or incoming relative to the queried accounts.
Query options
import { getTransferHistoryQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getTransferHistoryQueryOptions(config, { accounts: [subAccount] }));