Get Balances
curl --request GET \
--url https://api.pro.daya.co/public/v1/balances \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/balances"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.pro.daya.co/public/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.pro.daya.co/public/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 => [
"X-Api-Key: <x-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.pro.daya.co/public/v1/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-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.pro.daya.co/public/v1/balances")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Balances retrieved successfully",
"data": {
"balances": [
{
"currency": "USD",
"total_balance": "1500.00",
"available_balance": "1000.00",
"held_balance": "500.00",
"used_credit": "0.00",
"held_credit": "0.00",
"available_credit": "0.00",
"credit_limit": "0.00",
"usd_rate": "1.00"
},
{
"currency": "NGN",
"total_balance": "1545000.00",
"available_balance": "1545000.00",
"held_balance": "0.00",
"used_credit": "0.00",
"held_credit": "0.00",
"available_credit": "0.00",
"credit_limit": "0.00",
"usd_rate": "0.00065"
}
]
},
"timestamp": "2024-01-15T10:30:00Z"
}
Account
Get Balances
Retrieve account balances for all currencies
GET
/
public
/
v1
/
balances
Get Balances
curl --request GET \
--url https://api.pro.daya.co/public/v1/balances \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/balances"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.pro.daya.co/public/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.pro.daya.co/public/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 => [
"X-Api-Key: <x-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.pro.daya.co/public/v1/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-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.pro.daya.co/public/v1/balances")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Balances retrieved successfully",
"data": {
"balances": [
{
"currency": "USD",
"total_balance": "1500.00",
"available_balance": "1000.00",
"held_balance": "500.00",
"used_credit": "0.00",
"held_credit": "0.00",
"available_credit": "0.00",
"credit_limit": "0.00",
"usd_rate": "1.00"
},
{
"currency": "NGN",
"total_balance": "1545000.00",
"available_balance": "1545000.00",
"held_balance": "0.00",
"used_credit": "0.00",
"held_credit": "0.00",
"available_credit": "0.00",
"credit_limit": "0.00",
"usd_rate": "0.00065"
}
]
},
"timestamp": "2024-01-15T10:30:00Z"
}
Overview
Get the current balance for all currencies in your Pro account. This endpoint requires authentication with an API key that has Read scope.Unified Balance: USDT, USDC, and USD are all mapped to a single unified USD balance. When you trade with any of these symbols (USDT-NGN, USDC-NGN, or USD-NGN), they all use the same USD balance.
Authentication
Your API key with Read scope
X-Api-Key: daya_sk_YOUR_API_KEY
Request Examples
curl --request GET \
--url https://api.pro.daya.co/public/v1/balances \
--header 'X-Api-Key: daya_sk_YOUR_API_KEY'
const response = await fetch('https://api.pro.daya.co/public/v1/balances', {
headers: {
'X-Api-Key': 'daya_sk_YOUR_API_KEY'
}
});
const result = await response.json();
console.log(result.data.balances);
import requests
headers = {
'X-Api-Key': 'daya_sk_YOUR_API_KEY'
}
response = requests.get(
'https://api.pro.daya.co/public/v1/balances',
headers=headers
)
result = response.json()
print(result['data']['balances'])
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.pro.daya.co/public/v1/balances", nil)
req.Header.Add("X-Api-Key", "daya_sk_YOUR_API_KEY")
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)
fmt.Println(data["data"])
}
Response
Indicates if the request was successful
Human-readable response message
Balances wrapper object
Show data properties
Show data properties
Array of balance objects
Show balance properties
Show balance properties
Currency codeExample:
USD, NGNTotal balance (available + held)Example:
1500.00Available balance (can be used for trading)Example:
1000.00Held balance (locked in open orders)Example:
500.00Outstanding credit debtExample:
0.00Credit held in open ordersExample:
0.00Available credit to useExample:
0.00Total credit limitExample:
0.00Current USD exchange rate for this currencyExample:
1.00ISO 8601 timestamp of the response
Success Response
{
"success": true,
"message": "Balances retrieved successfully",
"data": {
"balances": [
{
"currency": "USD",
"total_balance": "1500.00",
"available_balance": "1000.00",
"held_balance": "500.00",
"used_credit": "0.00",
"held_credit": "0.00",
"available_credit": "0.00",
"credit_limit": "0.00",
"usd_rate": "1.00"
},
{
"currency": "NGN",
"total_balance": "1545000.00",
"available_balance": "1545000.00",
"held_balance": "0.00",
"used_credit": "0.00",
"held_credit": "0.00",
"available_credit": "0.00",
"credit_limit": "0.00",
"usd_rate": "0.00065"
}
]
},
"timestamp": "2024-01-15T10:30:00Z"
}
Error Responses
401 Unauthorized
{
"success": false,
"message": "Unauthorized",
"error": {
"code": "API_KEY_INVALID",
"message": "Invalid or missing API key"
},
"timestamp": "2024-01-15T10:30:00Z"
}
- Missing
X-Api-Keyheader - Invalid API key format
- API key has been revoked
403 Forbidden
{
"success": false,
"message": "Forbidden",
"error": {
"code": "API_KEY_INVALID_SCOPE",
"message": "Insufficient scope for this operation"
},
"timestamp": "2024-01-15T10:30:00Z"
}
- API key does not have Read scope
- User account is suspended
Rate Limits
- 100 requests per minute per API key
- Requires Read scope
Next Steps
Place Order
Use your balance to place trades
List Orders
View your open and historical orders
⌘I