getPendingWithdrawRequests
Read the queued (not yet claimable) withdraw requests for a subaccount. Scans a range of request ids and returns only the non-terminal ones found.
import { getPendingWithdrawRequests } from "@symmio/trading-core";
const pending = await getPendingWithdrawRequests(config, { user });Parameters
userAddressrequiredThe subaccount whose pending requests to list.
startbigintdefault 1nFirst request id to scan (inclusive). Request ids start at 1.
sizebigintdefault 200nNumber of request ids to scan from start. The returned array contains only the non-terminal requests found in that
range, so its length may be smaller.
chainIdnumberoptionalOptional chain override.
Returns
readonly WithdrawRequest[]idbigintSequential request id (starts at 1 per user).
userAddressThe subaccount the request belongs to.
partsreadonly WithdrawReceiverPart[]The receiver parts the withdrawal is split into.
timestampbigintBlock timestamp at which the request was created.
cooldownEndTimebigintEarliest timestamp the request can be finalized.
statusWithdrawStatusCurrent lifecycle status.
speedUpbooleanWhether the request opted into the cooldown speed-up flow.
isCooldownModifiedbooleanWhether the cooldown was modified after creation (e.g. by an accepted speed-up).
providerAddressThe provider bound to the request, or the zero address for a classic withdrawal.
isPureVirtualbooleanWhether the request is a pure-virtual (cross-chain, no express) withdrawal.
providerDataHexOpaque provider data (e.g. a signed option), or 0x.
totalAmountbigintTotal collateral amount across all parts.
totalVirtualAmountbigintTotal amount delivered via virtual providers.
Query options
import { getPendingWithdrawRequestsQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getPendingWithdrawRequestsQueryOptions(config, { user }));