Get account balance
curl --request GET \
--url https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"accountId": "5b7c1f2a-3d4e-4f8a-9b1c-2d3e4f5a6b7c",
"fiat": [
{
"amount": {
"value": "5000.00",
"asset": "BRL",
"decimals": 2
},
"synced": true
}
],
"crypto": [
{
"amount": {
"value": "1.500000",
"asset": "USDC",
"decimals": 6
},
"synced": true
}
]
}
Retrieves the multi-currency balance for the given account, grouped into fiat and crypto arrays.
GET
/
v1
/
accounts
/
{accountId}
/
balances
Get account balance
curl --request GET \
--url https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tracefinance.com/v1/accounts/{accountId}/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"accountId": "5b7c1f2a-3d4e-4f8a-9b1c-2d3e4f5a6b7c",
"fiat": [
{
"amount": {
"value": "5000.00",
"asset": "BRL",
"decimals": 2
},
"synced": true
}
],
"crypto": [
{
"amount": {
"value": "1.500000",
"asset": "USDC",
"decimals": 6
},
"synced": true
}
]
}
Authorizations
JWT bearer token. Include as Authorization: Bearer <token>. See the Authentication guide for how to obtain one.
Headers
API version. Omit to use the default version.
Example:
"1"
Path Parameters
UUID of the account.
Response
Account balance.
Multi-currency balance grouped by asset class.
Identifier of the account these balances belong to.
Example:
"5b7c1f2a-3d4e-4f8a-9b1c-2d3e4f5a6b7c"
Fiat balances, one entry per enabled fiat currency.
Show child attributes
Show child attributes
Crypto balances, one entry per enabled crypto currency.
Show child attributes
Show child attributes
Was this page helpful?
⌘I