Retrieve Balances
GET /balance/
Get user balances in Nord PAY.
Headers
Name
Value
Content-Type
application/json
X-API-KEY
<token>
Response
{
"USDTBEP20": 100,
"USDTERC20": 100,
"USDTTRC20": 100,
...
}{
"detail": [
{
"loc": [],
"msg": "string",
"type": "string"
}
]
}Example
curl -X GET "https://api.nord-pay.com/balance/" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY"import requests
def get_balances():
url = "https://api.nord-pay.com/balance/"
headers = {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
}
resp = requests.get(url, headers=headers)
resp.raise_for_status()
return resp.json()
# usage:
balances = get_balances()<?php
function getBalances(): array {
$ch = curl_init("https://api.nord-pay.com/balance/");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: YOUR_API_KEY"
],
]);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
// usage:
$balances = getBalances();async function loadBalances() {
const response = await fetch("https://api.nord-pay.com/balance/", {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return response.json();
}
// usage:
loadBalances().then(balances => {
// work with balances
});const axios = require('axios');
async function getBalances() {
const { data } = await axios.get("https://api.nord-pay.com/balance/", {
headers: {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
}
});
return data;
}
// usage:
getBalances().then(balances => {
// work with balances
});Last updated