withdrawPortals

withdrawPortals()

async def withdrawPortals(amount: int | float, wallet: str, authData: str) -> str:

Withdraw funds from your Portals account to specified TON address.

Returns

A string containing id of the withdrawal

Raises

  • authDataError if authData is not provided

  • accountError if amount, wallet aren't provided

  • requestError if request fails.

Example:

from aportalsmp.account import withdrawPortals
from aportalsmp.auth import update_auth
import asyncio

auth = asyncio.run(update_auth(api_id=123, api_hash="..."))
myWallet = "UQC9f1mTuu2hKuBP_0soC5RVkq2mLp8uiPBBhn69vadU7h8W"

async def main():
    withdrawal_id = await withdrawPortals(amount = 10.5, wallet = myWallet, authData = auth)
    print(withdrawal_id) # 8dfa8fijq-fiwf9f3-dfih239-3f9fj something like that xd

See used functions: update_auth

Last updated