Contracts
Contracts · Flow

Withdraw

Open, finalize, and cancel withdraw requests, and read pending requests and cooldown timing.

Wallet
Not connected

useBalanceHistory
read
Read a subaccount's deposit / withdraw history from the analytics subgraph, filterable by movement type. Internal margin-transfer legs are excluded by default.
Margin legs
Enter a subaccount address to load its history.
getPendingWithdrawRequests
read
List a subaccount's active (non-terminal) withdraw requests.
Run the read to see pending requests.
getWithdrawRequests
read
Read a single withdraw request by subaccount and request id.
Run the read to see the request.
getLastWithdrawRequestId
read
Read a subaccount's most recent withdraw request id (0 when there are none).
Run the read to see the last request id.
getWithdrawableTime
read
Read the earliest time a withdrawal initiated now could be finalized for a subaccount.
Run the read to see the withdrawable time.

initiateWithdraw
write
Open a classic same-chain withdraw request for a subaccount (routed via AccountLayer _call).
Fill the fields above and submit.
finalizeWithdrawRequest
write
Finalize a matured withdraw request, paying out to its receivers. Permissionless after cooldown.
Fill the fields above and submit.
requestCancelWithdraw
write
Cancel a pending withdraw request for a subaccount (routed via AccountLayer _call).
Fill the fields above and submit.