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
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"
}- 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?
Authorizations
Your API key. See the API key page on details of how to generate and store your keys.
Headers
The dated version of the API, if not specified a default is used. See API versioning for more information. The dated version of the Runa API. Send it on every request: a client that omits it silently follows whatever the server default happens to be.
2024-02-05 Query Parameters
The currency of the account, represented by ISO 4217 currency codes. Check the currencies for a listing of supported currencies.
^[A-Z]{3}$"USD"
Response
OK
- Single balance · object
- Multiple balances · object[]
If the currency parameter is provided, the response will be a single balance object.
The currency of the account, represented by ISO 4217 currency codes. Check the currencies for a listing of supported currencies.
^[A-Z]{3}$"USD"
Was this page helpful?