Withdrawal
The withdrawal process in the TON network using the Staking API can be done following these steps:
- Create an unstake transaction.
- Sign and broadcast the transaction to withdrawing staked tokens from a pool.
To create an unstake transaction:
-
Send a POST request to /api/v1/ton/{network}/staking/single-nominator/unstake to create a special memo message for withdrawal.
Example request (for
testnet
):curl --request POST \ --url https://api.p2p.org//api/v1/ton/testnet/staking/single-nominator/unstake \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' \ --header 'content-type: application/json' \ --data ' { "walletAddress": "EQCJkysqW3iwTGXDsC7BaCMxsFN3cBt9S6X8TS3V6FB5l4nB", "amount": "300000" }'
walletAddress
— main account address of the bounceable type which keeps tokens.amount
— amount of tokens to unstake in TON.
Example response:
-
Sign and broadcast the
unsignedTransaction
to the TON network.
What's Next?
- Getting Started.
- Staking API reference.
Updated 20 days ago