Get account balance
curl --request GET \
--url https://playground.runa.io/v2/balance \
--header 'X-Api-Key: <api-key>'import requests
url = "https://playground.runa.io/v2/balance"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://playground.runa.io/v2/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://playground.runa.io/v2/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 => [
"X-Api-Key: <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://playground.runa.io/v2/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<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://playground.runa.io/v2/balance")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://playground.runa.io/v2/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balance": "10.00",
"currency": "USD"
}Get account balance
Fetch the current balances for your account
GET
/
balance
Get account balance
curl --request GET \
--url https://playground.runa.io/v2/balance \
--header 'X-Api-Key: <api-key>'import requests
url = "https://playground.runa.io/v2/balance"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://playground.runa.io/v2/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://playground.runa.io/v2/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 => [
"X-Api-Key: <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://playground.runa.io/v2/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<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://playground.runa.io/v2/balance")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://playground.runa.io/v2/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balance": "10.00",
"currency": "USD"
}Retrieves the account balance.
- If the
currencyparameter is provided, the response will be a single balance object for the currency requested. - If the
currencyparameter is omitted, the response will be an array of balance objects for all currencies with a balance greater than 0.
Need a hand with balances?
Take a read of our guide to help manage your balances, including setting up
alerts.
Authorizations
Headers
The dated version of the API, if not specified a default is used. See API versioning for more information.
Query Parameters
The currency of the account, represented by ISO 4217 currency codes. Check the currencies for a listing of supported currencies.
Pattern:
^[A-Z]{3}$Response
OK
- Single balance · object
- Multiple balances · object[]
If the currency parameter is provided, the response will be a single balance object.
The balance of the account.
Pattern:
^[0-9]+\.[0-9]{2}$Example:
"10.00"
The currency of the account, represented by ISO 4217 currency codes. Check the currencies for a listing of supported currencies.
Pattern:
^[A-Z]{3}$Example:
"USD"
Was this page helpful?