getUserBalances to check what funds are available in your orderbook escrow and understand how to access each type.
Usage
Understanding Each Balance
| Field | Withdrawable? | How to Access |
|---|---|---|
pt | Yes | ixWrapperWithdrawFunds with ptAmount |
yt | Yes | ixWrapperWithdrawFunds with ytAmount |
sy | Yes | ixWrapperWithdrawFunds with syAmount |
staged | No | Use ixWrapperCollectInterest to transfer to your wallet |
stakedYt | No | Remove the sell order first with ixWrapperRemoveOffer |
stakedYt represents YT locked in active sell orders. Remove those orders first with ixWrapperRemoveOffer — the YT will move to yt, which is then withdrawable.Parameters
| Parameter | Type | Description |
|---|---|---|
user | PublicKey | The trader’s wallet public key |
Returns
Returns an object with the following string fields (token amounts as strings):pt— PT tokens from filled buy orders, available for withdrawalyt— YT tokens from filled or removed orders, available for withdrawalsy— SY tokens from filled sell orders, available for withdrawalstakedYt— YT locked in active sell orders (not directly withdrawable)staged— Accrued interest from YT in orders (collect separately)