curl --request POST \
--url https://api.range.org/v2/accounts/refresh \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.range.org/v2/accounts/refresh"
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.range.org/v2/accounts/refresh', 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.range.org/v2/accounts/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.range.org/v2/accounts/refresh"
req, _ := http.NewRequest("POST", 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.post("https://api.range.org/v2/accounts/refresh")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.range.org/v2/accounts/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"refreshed": 12,
"failed": 1,
"skipped": 2,
"failures": [
{
"account_id": "account-uuid-1",
"label": "Kraken treasury",
"reason": "Provider timed out",
"reason_code": "provider_timeout"
}
]
}Refresh balances for the workspace
Synchronously refreshes balances for every account in the caller workspace — connection-backed (Wise/Kraken/Safe/etc.) and standalone on-chain wallets alike — and persists them.
curl --request POST \
--url https://api.range.org/v2/accounts/refresh \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.range.org/v2/accounts/refresh"
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.range.org/v2/accounts/refresh', 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.range.org/v2/accounts/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.range.org/v2/accounts/refresh"
req, _ := http.NewRequest("POST", 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.post("https://api.range.org/v2/accounts/refresh")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.range.org/v2/accounts/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"refreshed": 12,
"failed": 1,
"skipped": 2,
"failures": [
{
"account_id": "account-uuid-1",
"label": "Kraken treasury",
"reason": "Provider timed out",
"reason_code": "provider_timeout"
}
]
}Authorizations
Authorization method required to allow user to access the api endpoints.
Response
Number of accounts whose balances were refreshed.
12
Number of accounts whose balance refresh failed (e.g. provider error).
1
Number of accounts whose holdings could not be read at all — their chain has no readable balance source, or their connection's provider is no longer supported. Neither refreshed nor failed, since there is nothing to retry and nothing actionable to report. refreshed + failed + skipped is the total number of accounts this pass considered. Additive field (RNG-5758); clients reading only the existing counts keep working unmodified.
2
Per-account detail, one entry per failed account; its length always matches failed. Always present — an empty array when nothing failed. Additive field, so older clients that only read the counts keep working.
Show child attributes
Show child attributes
Was this page helpful?