Quick Setup
Understanding Asset IDs
Monaco uses asset IDs (UUIDs) for all vault operations. See the Deposit Tokens page for a detailed explanation.Step-by-Step Withdrawal Process
1. Authenticate
Authentication is required before any vault operations:2. Get Asset Information
Retrieve the asset you want to withdraw from a trading pair:3. Check Vault Balance
Verify you have sufficient balance to withdraw:4. Execute Withdrawal
Withdraw tokens from the vault to your wallet:5. Verify Withdrawal
Check updated balances:Complete Example
Partial Withdrawals
Withdraw a portion of your vault balance:Maximum Withdrawal
Withdraw all available tokens:Error Handling
Transaction Result
Thewithdraw() method returns a WithdrawResult object:
Low-Level Withdrawals (no broadcast)
sdk.vault.withdraw is the high-level flow: it fetches the gateway-signed
calldata and broadcasts the transaction on-chain through the connected
wallet. If you’d rather submit the transaction yourself — a custom signer,
relayer, batching, or just inspecting the calldata first — use the low-level
sdk.withdrawals API, which returns the signed executeSignedWithdrawal
calldata without broadcasting.
Withdrawal Validation
Check Balance Before Withdrawal
Best Practices
- Always authenticate first - Login before any vault operations
- Get asset IDs from trading pairs - Use
sdk.market.getTradingPairBySymbol()orsdk.market.getPaginatedTradingPairs()to get valid asset IDs - Check balances - Verify sufficient vault balance before withdrawal
- Handle errors gracefully - Check for
ASSET_NOT_FOUNDerrors if using invalid asset IDs - Verify results - Check vault balance after withdrawals
Troubleshooting
Asset Not Found Error
If you get anASSET_NOT_FOUND error, make sure you’re using a valid asset ID from a trading pair:

