Accounts
Get account
Retrieve a single account by ID, including its current balances and attached funding methods. Balances are fetched from the ledger in real time.
GET
/
v1
/
accounts
/
{accountId}
cURL
curl --request GET \
--url https://api.nxos.io/v1/accounts/{accountId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.nxos.io/v1/accounts/{accountId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.nxos.io/v1/accounts/{accountId}', 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.nxos.io/v1/accounts/{accountId}",
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: <authorization>"
],
]);
$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.nxos.io/v1/accounts/{accountId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.nxos.io/v1/accounts/{accountId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nxos.io/v1/accounts/{accountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"object": "account",
"accountId": "acct_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"name": "Main",
"description": null,
"isPrimary": true,
"status": "ACTIVE",
"fundingMethods": [],
"balances": [
{
"object": "balance",
"asset": "USD",
"amount": "15000.00"
},
{
"object": "balance",
"asset": "USDC",
"amount": "5000.000000"
}
],
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}{
"error": {
"code": "missing_api_key",
"message": "No Authorization header provided.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded: 1000 requests per minute. Retry in 23 seconds.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}{
"error": {
"code": "internal_error",
"message": "An unexpected server error occurred.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}Headers
Bearer token. Format: Bearer <api_key>
Path Parameters
Response
The request has succeeded.
Detailed view of a financial account, including balances and funding methods.
Object type. Always account.
Available options:
account Unique account identifier.
Display name for the account.
Optional description of the account's purpose.
Whether this is the organization's primary account.
Current account status.
Available options:
ACTIVE, SUSPENDED, CLOSED Funding methods attached to this account.
Show child attributes
Show child attributes
Current balances per asset held in this account.
Show child attributes
Show child attributes
When the account was created.
When the account was last updated.
⌘I
cURL
curl --request GET \
--url https://api.nxos.io/v1/accounts/{accountId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.nxos.io/v1/accounts/{accountId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.nxos.io/v1/accounts/{accountId}', 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.nxos.io/v1/accounts/{accountId}",
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: <authorization>"
],
]);
$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.nxos.io/v1/accounts/{accountId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.nxos.io/v1/accounts/{accountId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nxos.io/v1/accounts/{accountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"object": "account",
"accountId": "acct_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"name": "Main",
"description": null,
"isPrimary": true,
"status": "ACTIVE",
"fundingMethods": [],
"balances": [
{
"object": "balance",
"asset": "USD",
"amount": "15000.00"
},
{
"object": "balance",
"asset": "USDC",
"amount": "5000.000000"
}
],
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}{
"error": {
"code": "missing_api_key",
"message": "No Authorization header provided.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded: 1000 requests per minute. Retry in 23 seconds.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}{
"error": {
"code": "internal_error",
"message": "An unexpected server error occurred.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}