curl --request GET \
--url https://api.zopay.cash/connect/v1/balances \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zopay.cash/connect/v1/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.zopay.cash/connect/v1/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.zopay.cash/connect/v1/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.zopay.cash/connect/v1/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.zopay.cash/connect/v1/balances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zopay.cash/connect/v1/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{
"external_ref": "<string>",
"valued_at": "2023-11-07T05:31:56Z",
"balances": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"totals": {}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}Get Balances
GET /balances
curl --request GET \
--url https://api.zopay.cash/connect/v1/balances \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zopay.cash/connect/v1/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.zopay.cash/connect/v1/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.zopay.cash/connect/v1/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.zopay.cash/connect/v1/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.zopay.cash/connect/v1/balances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zopay.cash/connect/v1/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{
"external_ref": "<string>",
"valued_at": "2023-11-07T05:31:56Z",
"balances": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"totals": {}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "Missing or malformed Authorization header. Send: Authorization: Bearer sk_live_... or sk_test_...",
"doc_url": "https://docs.zopay.cash/errors/authentication_required",
"param": "currencies"
}
}Authorizations
Paste your Connect API key (sk_live_… for production, sk_test_… for sandbox) without the Bearer prefix. Mint and rotate keys from the admin panel.
Query Parameters
The partner's user identifier. Omit to query the tenant-wide aggregate.
Response
Successful Response
- ConnectBalancesResponse
- ConnectTenantBalancesResponse
Per-user balance response (external_ref was supplied).
The partner's user identifier, echoed back.
Server timestamp when the spot prices were fetched. Partners use this to decide whether to refresh.
One row per enabled (asset, network) pair. Empty list when the user has no holdings, including the just-minted case where the external_ref was new to us.
Show child attributes
Show child attributes
Sum of line amount_<fiat> values per enabled fiat currency. Keys are lowercase ISO codes (usd, pen). Values are decimal strings; absent currencies indicate the per-line valuation was unavailable for at least one line (fail-closed total).
Show child attributes
Show child attributes