Get Balance by Exchange
Account
Get Account Balances
Returns balance data for a specific exchange and wallet address. Supports Hyperliquid, Lighter, Aster, and Avantis.
GET
Get Balance by Exchange
Retrieve account balances for a specific exchange and wallet address. This endpoint provides detailed balance information including available, locked, and total amounts for each asset.
Example Request:
Features
- Multi-exchange support: Query balances from Hyperliquid, Lighter, Aster, and Avantis
- Wallet-based queries: Fetch balances for any EVM wallet address
- Detailed balance breakdown: Free, locked, and total amounts per asset
- Exchange-specific fields: Additional metadata like collateral, account index, and PnL
Request
- Method:
GET - Endpoint:
/api/trading/{exchange}/balances - Path Parameters:
exchange(required - hyperliquid, lighter, aster, or avantis) - Headers:
x-wallet-id(required for Hyperliquid - Wallet UUID) - Query Parameters:
walletAddress(required for Lighter/Aster - EVM wallet address)
Hyperliquid
Lighter / Aster
Response Example
Hyperliquid
Lighter
Aster
Avantis
Avantis Response
The Avantis balance endpoint uses
/api/balances/:walletAddress (not the exchange-specific path). The usdc field represents total USDC on Base, while availableBalance is total minus deployed collateral.Aster Endpoint
GET /api/aster/perp/:walletId/account
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
walletId | string | Yes | Wallet ID (UUID) |
Use Cases
- Display account overview and portfolio value across exchanges
- Validate order placement against available balance
- Monitor asset distribution across multiple venues
- Track collateral and margin requirements
Authentication
- Hyperliquid: No authentication required (public API)
- Lighter: No authentication required (public API)
- Aster: Requires HMAC-SHA256 credentials configured on the server
- Avantis: No authentication required (public API, wallet address only)
Aster requires
ASTER_API_KEY and ASTER_API_SECRET environment variables to be configured on the API server.Response Fields
Common Fields (All Exchanges)
success— Request statusexchange— Exchange identifieraddress— Wallet address (checksum format)balances— Array of asset balancestimestamp— Unix timestamp in milliseconds
Balance Object Fields
asset— Asset symbol (e.g., USDC)free— Available balance for tradingtotal— Total balance (free + locked)locked— Balance locked in orders/positions (Aster only)
Exchange-Specific Fields
Hyperliquid:withdrawable— Amount available for withdrawalaccountValue— Total account value including positions
accountIndex— Lighter account indexcollateral— Total collateralavailableBalance— Available for new positionsaccountType— Account type (standard/isolated)
accountType— Account type (futures/spot)crossWalletBalance— Cross margin balancecrossUnPnl— Unrealized PnLmaxWithdrawAmount— Maximum withdrawable amount
usdc— Total USDC balance on BaseavailableBalance— Available balance (total minus deployed collateral)
Address Format
All wallet addresses are automatically converted to checksum format. You can provide addresses in any format:- Lowercase:
0xe7beccec683a6e141ead23237088cfbc348b2295 - Uppercase:
0xE7BECCEC683A6E141EAD23237088CFBC348B2295 - Checksum:
0xE7bECcEC683a6e141EaD23237088CfbC348b2295
Authorizations
Path Parameters
Exchange name
Available options:
hyperliquid, lighter, aster, avantis Query Parameters
EVM wallet address (0x...)