The examples on this page use Hyperliquid (
provider: 'hyperliquid'). Withdrawal mechanics (supported assets, destination chains, and processing times) vary by provider.Overview
PerpsClient.withdraw() is a single-call helper that builds the withdrawal payload, authorizes it through the registered provider plugin, and submits the signed action. It dispatches through the same createAction → authorize → executeAction pipeline documented in Actions, but consumers do not have to compose the steps manually.
Hyperliquid: Withdrawal processing typically takes 3–4 minutes. The bridge transfer from Hyperliquid L1 to Arbitrum is asynchronous.
Discovering Withdrawable Balances
CallgetWithdrawableBalances() before rendering a withdrawal picker. Providers that support the capability return one row per withdrawable (asset, route) pair; providers without the optional read return undefined, which means the form remains amount-only.
WithdrawableBalance contains:
The SDK joins provider rows with
/assets, drops unknown assets, and filters amounts below each asset’s minWithdrawalAmount. For a row-based provider, pass the selected asset.id and route through the withdrawal action params together; never merge balances across routes. The amount remains a human-readable decimal string — the provider signer applies the asset precision.
Using PerpsClient (recommended)
PerpsClient.withdraw
Build, sign with the provider-declared signer, and submit a withdrawal in a single call.WithdrawParams
WithdrawalParams:
Returns:
ExecuteActionResponse — { results: ActionResult[] }. The array contains a single result for the WITHDRAWAL action:
Using Service Functions (advanced)
For complete control over the create/sign/execute steps — for example, to surface the typed-data payload in a confirmation dialog before requesting the signature — call the lower-levelcreateAction / executeAction service functions directly. See Actions for the full create → sign → execute pattern.