curl --request POST \
--url https://sandbox.users.niobi.co/api/v3/get-unified-balance \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr",
"sender": "<string>",
"timestamp": 123,
"salt": "<string>",
"signature": "<string>",
"params": {
"wallet_account": "ACC847291",
"currency": "KES"
}
}
'import requests
url = "https://sandbox.users.niobi.co/api/v3/get-unified-balance"
payload = {
"client_id": "K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr",
"sender": "<string>",
"timestamp": 123,
"salt": "<string>",
"signature": "<string>",
"params": {
"wallet_account": "ACC847291",
"currency": "KES"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 'K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr',
sender: '<string>',
timestamp: 123,
salt: '<string>',
signature: '<string>',
params: {wallet_account: 'ACC847291', currency: 'KES'}
})
};
fetch('https://sandbox.users.niobi.co/api/v3/get-unified-balance', 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://sandbox.users.niobi.co/api/v3/get-unified-balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 'K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr',
'sender' => '<string>',
'timestamp' => 123,
'salt' => '<string>',
'signature' => '<string>',
'params' => [
'wallet_account' => 'ACC847291',
'currency' => 'KES'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.users.niobi.co/api/v3/get-unified-balance"
payload := strings.NewReader("{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": \"ACC847291\",\n \"currency\": \"KES\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.users.niobi.co/api/v3/get-unified-balance")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": \"ACC847291\",\n \"currency\": \"KES\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.users.niobi.co/api/v3/get-unified-balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": \"ACC847291\",\n \"currency\": \"KES\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Balance fetched successfully.",
"data": {
"currency": "KES",
"total_balance": 150000.5,
"on_hold_balance": 5000,
"available_balance": 145000.5,
"unsettled_balance": 0
}
}{
"success": "false",
"message": "User not found."
}{
"success": "false",
"message": "Entity integration record not found or Client id not matched or Request was not verified.."
}{
"success": "false",
"message": "User not found."
}Account Balance
Retrieve the live balance for a specific wallet and currency in your Niobi account. Returns total, available, on-hold, and unsettled balances. Each request must carry a freshly generated signature. See Payout Best Practices for balance monitoring guidance.
curl --request POST \
--url https://sandbox.users.niobi.co/api/v3/get-unified-balance \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr",
"sender": "<string>",
"timestamp": 123,
"salt": "<string>",
"signature": "<string>",
"params": {
"wallet_account": "ACC847291",
"currency": "KES"
}
}
'import requests
url = "https://sandbox.users.niobi.co/api/v3/get-unified-balance"
payload = {
"client_id": "K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr",
"sender": "<string>",
"timestamp": 123,
"salt": "<string>",
"signature": "<string>",
"params": {
"wallet_account": "ACC847291",
"currency": "KES"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 'K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr',
sender: '<string>',
timestamp: 123,
salt: '<string>',
signature: '<string>',
params: {wallet_account: 'ACC847291', currency: 'KES'}
})
};
fetch('https://sandbox.users.niobi.co/api/v3/get-unified-balance', 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://sandbox.users.niobi.co/api/v3/get-unified-balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 'K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr',
'sender' => '<string>',
'timestamp' => 123,
'salt' => '<string>',
'signature' => '<string>',
'params' => [
'wallet_account' => 'ACC847291',
'currency' => 'KES'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.users.niobi.co/api/v3/get-unified-balance"
payload := strings.NewReader("{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": \"ACC847291\",\n \"currency\": \"KES\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.users.niobi.co/api/v3/get-unified-balance")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": \"ACC847291\",\n \"currency\": \"KES\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.users.niobi.co/api/v3/get-unified-balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": \"ACC847291\",\n \"currency\": \"KES\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Balance fetched successfully.",
"data": {
"currency": "KES",
"total_balance": 150000.5,
"on_hold_balance": 5000,
"available_balance": 145000.5,
"unsettled_balance": 0
}
}{
"success": "false",
"message": "User not found."
}{
"success": "false",
"message": "Entity integration record not found or Client id not matched or Request was not verified.."
}{
"success": "false",
"message": "User not found."
}signature for every request — signatures cannot be reused.Body
Signed payload to query a wallet balance.
Your Client ID from the Niobi Dashboard under Workspace > Integrations.
"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr"
The exact title of your integration as registered in the Dashboard. Case-sensitive.
Unix timestamp in seconds at the time of signing. Must match the value used to generate the signature.
A unique random string you generate per request. Must be the same value used when generating the signature.
SHA-256 signature computed from this payload. Generate via the Signature endpoint or your own backend.
Show child attributes
Show child attributes

