List Balances
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/balances \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/balances"
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-idempotency-key': '<x-idempotency-key>', 'x-auth-token': '<api-key>'}
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment/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.uqpaytech.com/api/v2/payment/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-auth-token: <api-key>",
"x-idempotency-key: <x-idempotency-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-sandbox.uqpaytech.com/api/v2/payment/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-auth-token", "<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-sandbox.uqpaytech.com/api/v2/payment/balances")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_pages": 10,
"total_items": 105,
"data": [
{
"balance_id": "4a2dd9f0-bfe9-432b-be2e-4d5af5d0b448",
"currency": "SGD",
"available_balance": "1000.00",
"payable_balance": "950.00",
"pending_balance": "50.00",
"reserved_balance": "0.00",
"margin_balance": "0.00",
"frozen_balance": "0.00"
}
]
}Payment Balances
List Balances
查询各币种账户余额列表
GET
/
v2
/
payment
/
balances
List Balances
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/balances \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/balances"
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-idempotency-key': '<x-idempotency-key>', 'x-auth-token': '<api-key>'}
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment/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.uqpaytech.com/api/v2/payment/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-auth-token: <api-key>",
"x-idempotency-key: <x-idempotency-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-sandbox.uqpaytech.com/api/v2/payment/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-auth-token", "<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-sandbox.uqpaytech.com/api/v2/payment/balances")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_pages": 10,
"total_items": 105,
"data": [
{
"balance_id": "4a2dd9f0-bfe9-432b-be2e-4d5af5d0b448",
"currency": "SGD",
"available_balance": "1000.00",
"payable_balance": "950.00",
"pending_balance": "50.00",
"reserved_balance": "0.00",
"margin_balance": "0.00",
"frozen_balance": "0.00"
}
]
}授权
UQPay 提供的登录 API Token。
请求头
指定代表哪个子账户发起该请求。应设置为 account_id,可通过 List Connected Accounts 获取。若省略或为空,则使用主账户执行请求。
更多信息见 Connected Accounts。
用于保持操作幂等性的唯一标识符(UUID),确保同一操作重复执行不会产生意外影响或重复结果。它有助于在网络错误、重试或故障时保持数据一致性。
查询参数
用于获取下一批条目的页码,取值必须大于 1。
必填范围:
x >= 1示例:
1
每页返回的最大条目数,取值范围 1 - 100。
必填范围:
1 <= x <= 100示例:
10
⌘I

