Balance
The method allows you to retrieve your account balance by sending a POST request.
What the method allows you to do
Returns an array of your account balances.
Endpoint
POST https://api.trybit.com/v2/merchant/wallet/balance/all
Headers
Authorization*
string
Token eyJ0eXAiOiJK<...>4npi1ksS8tSY
Project API key
Request Body
No request body is required.
Request examples
These examples show how to send a request to retrieve the account balance. Note that the Request Body does not need to be filled in.
curl -X POST https://api.trybit.com/v2/merchant/wallet/balance/all \
-H "Authorization: Token <API KEY>"import requests
url = "https://api.trybit.com/v2/merchant/wallet/balance/all"
headers = {
"Authorization": "Token <API KEY>"
}
response = requests.post(url, headers=headers)
if response.status_code == 200:
print("Success:", response.json())
else:
print("Fail:", response.status_code, response.text)fetch('https://api.trybit.com/v2/merchant/wallet/balance/all', {
method: 'POST',
headers: {
'Authorization': 'Token <API KEY>'
}
})
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error('Fail: ' + response.status + ' ' + response.statusText);
}
})
.then(data => console.log('Success:', data))
.catch(error => console.error('Error:', error));Response examples
A successful request returns a response with the status success and a result object.
Response parameters
The result object contains:
currency
dict
"currency": {
"id": 4,
"code": "USDT_TRC20", "short_code": "USDT",
"name": "Tether", "is_email_required": false, "stablecoin": true, "icon_base": "https://cdn.trybit.com/img/currency/USDT.svg", "icon_network": "https://cdn.trybit.com/img/currency_network/USDT_TRC.svg",
"icon_qr": "https://cdn.trybit.com/img/stroke/USDT_STROKE.svg",
"order": 1, "obj_network": {
"code": "TRC20",
"id": 4,
"icon": "https://cdn.trybit.com/img/network/TRC20.svg", "fullname": "Tron"
},
"enable": true
}
Currency object associated with the balance
balance_crypto
float
10.0
Balance in cryptocurrency
balance_usd
float
10.0
Balance in USD at the exchange rate at the time of the request
available_balance
float
10.0
Withdrawable balance in cryptocurrency
available_balance_usd
float
10.0
Withdrawable balance in USD
Last updated
Was this helpful?
