curl --request GET \
--url https://api.lamarge.trade/v1/balances \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lamarge.trade/v1/balances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/balances"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"setup": [
{
"step": "permit",
"status": "done",
"reason": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"needed_for": [
"make"
]
}
],
"holdings": {
"available": "<string>",
"locked": "<string>",
"committed": "<string>",
"orders": "<string>",
"pool": "<string>",
"trades": "<string>",
"total": "<string>"
},
"portfolio": {
"revision": "<string>",
"changed_at": "2023-11-07T05:31:56Z",
"pending": true
},
"venue": "<string>",
"address": "<string>",
"venue_wallet": "<string>",
"equity": "<string>",
"withdrawable": "<string>",
"withdrawal_fee": "<string>",
"withdrawable_estimated": true,
"mode": "<string>",
"has_account": true,
"wallet": "<string>",
"xyz": {
"equity": "<string>",
"withdrawable": "<string>",
"read_at": "2023-11-07T05:31:56Z"
},
"chain_balance": "<string>",
"escrow_balance": "<string>",
"deposit_balance": "<string>",
"deposit_address": "<string>",
"read_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"chain_read_at": "2023-11-07T05:31:56Z",
"chain_error": "<string>",
"withdrawal_reserve": "<string>"
}
]{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Get balances
Cached balances per linked venue, in venue order (fields); a read 15 seconds old queues a refresh. Unknown values are null; a value with its error or chain_error set is stale.
curl --request GET \
--url https://api.lamarge.trade/v1/balances \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lamarge.trade/v1/balances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/balances"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"setup": [
{
"step": "permit",
"status": "done",
"reason": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"needed_for": [
"make"
]
}
],
"holdings": {
"available": "<string>",
"locked": "<string>",
"committed": "<string>",
"orders": "<string>",
"pool": "<string>",
"trades": "<string>",
"total": "<string>"
},
"portfolio": {
"revision": "<string>",
"changed_at": "2023-11-07T05:31:56Z",
"pending": true
},
"venue": "<string>",
"address": "<string>",
"venue_wallet": "<string>",
"equity": "<string>",
"withdrawable": "<string>",
"withdrawal_fee": "<string>",
"withdrawable_estimated": true,
"mode": "<string>",
"has_account": true,
"wallet": "<string>",
"xyz": {
"equity": "<string>",
"withdrawable": "<string>",
"read_at": "2023-11-07T05:31:56Z"
},
"chain_balance": "<string>",
"escrow_balance": "<string>",
"deposit_balance": "<string>",
"deposit_address": "<string>",
"read_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"chain_read_at": "2023-11-07T05:31:56Z",
"chain_error": "<string>",
"withdrawal_reserve": "<string>"
}
]{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Authorizations
Response
One entry per linked venue.
The account's setup steps as recorded, without reading the venue (setup steps): an escrow venue's permit, Aster's agent, and Lighter's api_key when paying from Lighter is on. A use answers SETUP_REQUIRED while a step it needs is not done; a payment reads the permit and Lighter's key when it uses them. An Aster account without its agent is not read.
Show child attributes
Show child attributes
True when withdrawable is only an upper bound from the venue's public data; false while read_at is null (venues).
Account mode on venues with several (venues).
Venue token outside the margin, where the venue has one (venues).
A standard Hyperliquid account's trade.xyz balance (HIP-3 dex xyz), apart from equity and withdrawable; withdrawable less transfers from there relayed since read_at; in the holdings' total, not their available. Null elsewhere and on a unified account, whose one balance includes it.
Show child attributes
Show child attributes
Waiting at deposit_address to be swept into the available balance (balances). Read with chain_balance.
Source-token balance kept back for withdrawal gas, in base units, not part of the signed amount: on Hyperliquid twice the current 200,000-gas bridge estimate in USDC, rounded up, unless HyperCore HYPE covers it; 0 elsewhere. Sends do not use it. Null: unknown, no Hyperliquid withdrawal.