Read a client's balances
curl --request GET \
--url https://api.example.com/client/balance \
--header 'Authorization: Bearer <token>' \
--header 'X-Hevn-Account: <x-hevn-account>'import requests
url = "https://api.example.com/client/balance"
headers = {
"X-Hevn-Account": "<x-hevn-account>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Hevn-Account': '<x-hevn-account>', Authorization: 'Bearer <token>'}
};
fetch('https://api.example.com/client/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"clientId": "cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"totalUsd": "500.00",
"baseSmartWallet": "<string>",
"accounts": [
{
"account": "USDC",
"balance": "500.00",
"usdValue": "500.00"
}
]
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Clients
Read a client's balances
One row per account the client holds: the tokens on the Base smart wallet of the client selected by X-Hevn-Account, plus any custodial balance. A custodial row is read live from the provider that holds it and is left out when that provider cannot be reached.
GET
/
client
/
balance
Read a client's balances
curl --request GET \
--url https://api.example.com/client/balance \
--header 'Authorization: Bearer <token>' \
--header 'X-Hevn-Account: <x-hevn-account>'import requests
url = "https://api.example.com/client/balance"
headers = {
"X-Hevn-Account": "<x-hevn-account>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Hevn-Account': '<x-hevn-account>', Authorization: 'Bearer <token>'}
};
fetch('https://api.example.com/client/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"clientId": "cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"totalUsd": "500.00",
"baseSmartWallet": "<string>",
"accounts": [
{
"account": "USDC",
"balance": "500.00",
"usdValue": "500.00"
}
]
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The selected client account, as a cl_… id.
Example:
"cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"
Response
Successful Response
Account associated with this balance.
Pattern:
^(?:cl_)?[A-Za-z0-9._:\-]{1,216}$Example:
"cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"
Indicative total balance converted to USD.
Example:
"500.00"
Base smart-wallet address controlled by the account.
One entry per account the client holds a balance on.
Show child attributes
Show child attributes
Was this page helpful?