Get a balance
curl --request GET \
--url https://api.jenzy.com/v2/balances/{asset} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.jenzy.com/v2/balances/{asset}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.jenzy.com/v2/balances/{asset}', 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.jenzy.com/v2/balances/{asset}",
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.jenzy.com/v2/balances/{asset}"
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.jenzy.com/v2/balances/{asset}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jenzy.com/v2/balances/{asset}")
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{
"asset": "KES",
"available": "1250000.00",
"held": "50000.00",
"shortfall": "0.00"
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}Account
Get a balance
Your ledger balance in one enabled asset.
GET
/
balances
/
{asset}
Get a balance
curl --request GET \
--url https://api.jenzy.com/v2/balances/{asset} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.jenzy.com/v2/balances/{asset}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.jenzy.com/v2/balances/{asset}', 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.jenzy.com/v2/balances/{asset}",
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.jenzy.com/v2/balances/{asset}"
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.jenzy.com/v2/balances/{asset}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jenzy.com/v2/balances/{asset}")
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{
"asset": "KES",
"available": "1250000.00",
"held": "50000.00",
"shortfall": "0.00"
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}Authorizations
Your Jenzy API key: Authorization: Bearer jz_live_…
Path Parameters
An asset code as GET /v2/assets lists it — uppercase, never compound (KES, USDT; never USDT-TRON). Network and rail live on the payment object.
Minimum string length:
1Example:
"KES"
Response
The balance.
An asset code as GET /v2/assets lists it — uppercase, never compound (KES, USDT; never USDT-TRON). Network and rail live on the payment object.
Minimum string length:
1Example:
"KES"
What you can spend in this asset, as an exact decimal string at the asset’s decimals.
Example:
"1250000.00"
Reserved by in-flight payouts in this asset, as an exact decimal string.
Example:
"50000.00"
Still owed on fees already incurred in this asset. Normally zero; the next collection in this asset covers it before adding to available.
Example:
"0.00"