Account
The Account area exposes the holder (profile, permissions, limits, fee rules) and the balance. Use it to validate the token, check the balance before a withdrawal, and read operational limits.
When to use each one
| Question | Endpoint |
|---|---|
| Is the token valid? | GET /user |
| What is the account's name, document, plan and limits? | GET /user |
| Available balance right now? | GET /user/balance |
| Do I have enough balance to make this withdrawal? | GET /user/balance |
| How much is blocked in pending transactions? | GET /user/balance |
Examples
Best practices
- Do not poll balance in a loop: the balance changes on callbacks. React to the webhook instead of hitting
GET /user/balancerepeatedly. - Short cache: for UI, caching the balance for 5 to 10 seconds is enough. Invalidate when receiving a callback of a completed or reversed transaction.
- Available balance ≠ total balance:
availableis what you can move now;blockedis held in transactions in progress or MED disputes. /userrarely changes: caching for 1 hour or more is reasonable. Invalidate when support changes limits.