Skip to content

Withdraw from MegaVault

Withdraw funds (USDC) from the subaccount to the address.

Method Declaration

Python
async def withdraw(
    self,
    wallet: Wallet,
    address: str,
    subaccount_number: int,
    min_amount: Decimal,
    shares: Optional[int],
) -> Any

Parameters

ParameterLocationTypeDescription
accountqueryAccountOwner's account
subaccountquerySubaccountInfoSubaccount information
min_amountqueryDecimalMinimum amount to withdraw i usdc
sharesqueryBigIntNumber of shares

Response

StatusMeaningSchemaDescription
200OKTxHashThe transaction hash.
400Bad RequestThe request was malformed or invalid.
404Not FoundThe subaccount was not found.