Skip to main content
GET
/
v1
/
organizations
/
{organization_id}
/
ledgers
/
{ledger_id}
/
accounts
/
external
/
{code}
/
balances
Retrieve the Balance of an External Account
curl --request GET \
  --url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/external/{code}/balances
import requests

url = "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/external/{code}/balances"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/external/{code}/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://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/external/{code}/balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/external/{code}/balances"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/external/{code}/balances")
.asString();
require 'uri'
require 'net/http'

url = URI("https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/external/{code}/balances")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "items": [
    {
      "id": "019c96a0-0ae3-70fd-95f7-e009f61233f1",
      "organizationId": "019c96a0-0a98-7287-9a31-786e0809c769",
      "ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
      "accountId": "019c96a0-0adf-7ee2-baf4-93477f9c259c",
      "alias": "@external/BRL",
      "key": "default",
      "assetCode": "BRL",
      "available": "-20000",
      "onHold": "0",
      "version": 20,
      "accountType": "external",
      "allowSending": true,
      "allowReceiving": true,
      "createdAt": "2026-02-25T21:06:36.899066Z",
      "updatedAt": "2026-02-25T21:06:38.864811Z",
      "deletedAt": null
    }
  ],
  "limit": 10
}

Headers

Content-Type
string

The type of media of the resource. Recommended value is application/json.

X-Request-Id
string<uuid>

A unique identifier used to trace and track each request.

Authorization
string

Bearer JWT token for authentication. Required when PLUGIN_AUTH_ENABLED=true (enforced in multi-tenant deployments). Optional in default OSS single-tenant mode. Format: Bearer <token>

Path Parameters

organization_id
string<uuid>
required

The unique identifier of the Organization associated with the Ledger.

ledger_id
string<uuid>
required

The unique identifier of the associated Ledger.

code
string
required

The code that identifies the Asset used in the Account.

Response

Indicates that the request was successful and the response contains the expected data.

items
object[]
limit
integer

The maximum number of items included in the response.