Get Account Balances
curl --request GET \
--url https://api.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/balances \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/balances"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/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.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/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 => [
"X-API-Key: <api-key>"
],
]);
$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.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/balances")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"balances": [
{
"currency": "<string>",
"currency_type": "<string>",
"available_balance": "<string>",
"pending_payout": "<string>",
"pending_payin": "<string>",
"total_balance": "<string>",
"updated_at": "<string>"
}
]
}Accounts
Get Account Balances
Retrieve balance information for a specific account
GET
/
v1
/
customers
/
{customer_id}
/
accounts
/
{account_id}
/
balances
Get Account Balances
curl --request GET \
--url https://api.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/balances \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/balances"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/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.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/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 => [
"X-API-Key: <api-key>"
],
]);
$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.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/balances")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hopnow.io/v1/customers/{customer_id}/accounts/{account_id}/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"balances": [
{
"currency": "<string>",
"currency_type": "<string>",
"available_balance": "<string>",
"pending_payout": "<string>",
"pending_payin": "<string>",
"total_balance": "<string>",
"updated_at": "<string>"
}
]
}Path Parameters
string
required
The customer’s external ID (starts with
cus_)string
required
The account’s external ID (starts with
acc_)Response
string
Account identifier (starts with
acc_)string
Always returns
"account_balances"array
Array of balance objects for each currency
Show Balance Fields
Show Balance Fields
string
ISO 4217 currency code
string
Type of currency:
fiat or cryptostring
Amount available for immediate transactions (decimal string)
string
Amount tied up in pending outgoing transfers (decimal string)
string
Amount expected from pending incoming transfers (decimal string)
string
Total balance including pending amounts (decimal string)
string
ISO 8601 timestamp of last balance update
Response Example
{
"id": "acc_1234567890abcdef",
"object": "account_balances",
"balances": [
{
"currency": "USD",
"currency_type": "fiat",
"available_balance": "10000.50",
"pending_payout": "250.00",
"pending_payin": "500.00",
"total_balance": "10750.50",
"updated_at": "2024-01-15T12:30:00Z"
},
{
"currency": "EUR",
"currency_type": "fiat",
"available_balance": "5000.25",
"pending_payout": "0.00",
"pending_payin": "100.00",
"total_balance": "5100.25",
"updated_at": "2024-01-14T08:00:00Z"
}
]
}
⌘I