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)[
{
"venue": "<string>",
"address": "<string>",
"venue_wallet": "<string>",
"equity": "<string>",
"withdrawable": "<string>",
"withdrawable_estimated": true,
"mode": "<string>",
"has_account": true,
"wallet": "<string>",
"chain_balance": "<string>",
"read_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"chain_read_at": "2023-11-07T05:31:56Z",
"chain_error": "<string>"
}
]{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}Get balances
Cached venue margin and linked-address token balances. read_at and error describe the venue read; chain_read_at and chain_error the escrow-chain read. Unknown values are null; a value with an error 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)[
{
"venue": "<string>",
"address": "<string>",
"venue_wallet": "<string>",
"equity": "<string>",
"withdrawable": "<string>",
"withdrawable_estimated": true,
"mode": "<string>",
"has_account": true,
"wallet": "<string>",
"chain_balance": "<string>",
"read_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"chain_read_at": "2023-11-07T05:31:56Z",
"chain_error": "<string>"
}
]{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}Authorizations
Master session from POST /v1/auth/verify. Revocable; expires after seven days by default. Required for financial operations.
Response
One entry per linked venue.
A venue id from GET /v1/venues.
Responses are lowercase.
^0x[0-9a-fA-F]{40}$Null on venues without one.
Base units; null before the first read.
Base units that can leave the venue margin.
False while the venue knows no account for the address; true while read_at is null.
Last observed token balance of the linked address on the escrow chain.
Last successful venue read.
Why the last venue read failed; null on success.
RFC 3339 UTC; snapshots and history may keep fractional seconds.