GET /v1/balance — баланс аккаунта и статус торговли
Проверьте свой баланс CSBoard в USD, сколько средств подтверждено, а сколько удерживается, а также включена ли торговля для вашего API-ключа.
curl --request GET \
--url https://csboard.com/v1/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://csboard.com/v1/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://csboard.com/v1/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://csboard.com/v1/balance",
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://csboard.com/v1/balance"
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://csboard.com/v1/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://csboard.com/v1/balance")
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{
"currency": "USD",
"balance_usd": 1240.55,
"trading_enabled": true,
"settled_balance_usd": 980.1,
"held_usd": 260.45,
"held_until": "2026-07-06T12:00:00Z"
}{
"code": "missing_api_key",
"detail": "Provide your API key via `Authorization: Bearer csb_pub_…`. Generate one at https://csboard.com/profile?tab=api"
}{
"code": "rate_limit_exceeded",
"detail": "Read rate limit of 100 requests/min exceeded. The counter restarts in 23 s. For new listings use GET /v1/listings/stream instead of polling.",
"bucket": "read",
"limit_per_min": 100,
"retry_after_sec": 23
}trading_enabled, чтобы убедиться, что покупки включены для ключа, прежде чем оформлять заказ.
Требуется аутентификация. Отправьте ключ как Authorization: Bearer csb_pub_....
Параметры
Этот эндпоинт не принимает query-параметров.Поля ответа
"USD". Все суммы выражены в долларах США.false, эндпоинты покупки возвращают trading_not_enabled.POST /v1/market/buy.null, если ничего не удерживается.Пример запроса
curl https://csboard.com/v1/balance \
-H "Authorization: Bearer csb_pub_..."
Пример ответа
{
"currency": "USD",
"balance_usd": 1240.55,
"trading_enabled": true,
"settled_balance_usd": 980.10,
"held_usd": 260.45,
"held_until": "2026-07-06T12:00:00Z"
}
Коды ошибок
| HTTP-статус | Код | Значение |
|---|---|---|
| 401 | missing_api_key / invalid_api_key | Отсутствует или некорректный API-ключ. |
| 429 | rate_limit_exceeded | Слишком много запросов. Подождите время, указанное в заголовке Retry-After. |
settled_balance_usd, а не balance_usd — удерживаемые средства там потратить нельзя.Авторизации
Send your key as a Bearer token on every request: Authorization: Bearer csb_pub_.... Generate keys in your CSBoard profile. Calls made with a key are metered only by that key's own limits — there is no per-IP limit on top — and every answer carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and X-RateLimit-Bucket for the bucket the call spent. See Rate limits.
Ответ
Current balance and trading status.
"USD"
Total balance in USD.
Whether buying is enabled for this key.
Portion of the balance that is settled (reversal-safe) and spendable on reversal-safe purchases.
Portion of the balance currently held.
When the held portion clears, or null if nothing is held.
curl --request GET \
--url https://csboard.com/v1/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://csboard.com/v1/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://csboard.com/v1/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://csboard.com/v1/balance",
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://csboard.com/v1/balance"
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://csboard.com/v1/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://csboard.com/v1/balance")
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{
"currency": "USD",
"balance_usd": 1240.55,
"trading_enabled": true,
"settled_balance_usd": 980.1,
"held_usd": 260.45,
"held_until": "2026-07-06T12:00:00Z"
}{
"code": "missing_api_key",
"detail": "Provide your API key via `Authorization: Bearer csb_pub_…`. Generate one at https://csboard.com/profile?tab=api"
}{
"code": "rate_limit_exceeded",
"detail": "Read rate limit of 100 requests/min exceeded. The counter restarts in 23 s. For new listings use GET /v1/listings/stream instead of polling.",
"bucket": "read",
"limit_per_min": 100,
"retry_after_sec": 23
}