GetBalance
Get all token balances for your account, including both L1 (wallet) and Exchange (trading) balances.
GET
GetBalance🔐 Auth RequiredReturns your current balances across all tokens and account types. L1 balances are in your wallet; Exchange balances are available for trading.
Request
No additional parameters required. Uses your authenticated address.
| Parameter | Type |
|---|
Response
| Field | Type |
|---|---|
success | bool |
balances | TokenBalance[] |
timestamp | uint64 |
Example
Requesttypescript
const balance = await client.getBalance();console.log('RLM L1:', balance.rlmL1);console.log('RLM Exchange:', balance.rlmExchange);console.log('USDC L1:', balance.usdcL1);console.log('USDC Exchange:', balance.usdcExchange);// Total RLMconst totalRlm = balance.rlmL1 + balance.rlmExchange;
Responsejson
{"success": true,"balances": [{"token": "RLM","tokenId": 0,"l1Balance": 5000.0,"exchangeBalance": 2500.0,"lockedBalance": 100.0},{"token": "USDC","tokenId": 3,"l1Balance": 10000.0,"exchangeBalance": 5000.0,"lockedBalance": 500.0}],"timestamp": 1704067200000000000}
TokenBalance Structure
| Field | Type | Description |
|---|---|---|
token | string | Token symbol (RLM, USDC, WBTC, WETH) |
token_id | uint32 | Token ID (0=RLM, 1=WBTC, 2=WETH, 3=USDC) |
l1_balance | int64 | Balance in L1 wallet (8 decimals) |
exchange_balance | int64 | Balance on exchange (8 decimals) |
locked_balance | int64 | Balance locked in open orders (8 decimals) |
Balance Types
- L1 Balance — Tokens in your wallet. Safe from liquidation but not usable for trading. Use
Depositto move to exchange. - Exchange Balance — Tokens available for trading. Used as margin for positions. Can be withdrawn to L1.
- Locked Balance — Portion of exchange balance locked in open orders. Released when orders fill or cancel.
Available Tokens
| Token | ID | Decimals | Use |
|---|---|---|---|
| RLM | 0 | 8 | Native token, gas, staking |
| WBTC | 1 | 8 | Wrapped Bitcoin |
| WETH | 2 | 8 | Wrapped Ethereum |
| USDC | 3 | 8 | Stablecoin, margin |