List accounts
curl --request GET \
--url https://app.crown-brlv.com/api/v1/accountsimport requests
url = "https://app.crown-brlv.com/api/v1/accounts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.crown-brlv.com/api/v1/accounts', 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://app.crown-brlv.com/api/v1/accounts",
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://app.crown-brlv.com/api/v1/accounts"
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://app.crown-brlv.com/api/v1/accounts")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.crown-brlv.com/api/v1/accounts")
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{
"accounts": [
{
"id": "019712cf-c86d-703f-85b8-bdaa4fc8d254",
"alias": "Trading account",
"status": "active",
"external-id": "ext-12345",
"created-at": "2024-01-15T10:30:00Z",
"parent-id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}Accounts
List Accounts
Lists the authenticated account together with its sub-accounts. The caller’s own record always comes first, with a null parent-id. Sub-accounts (every account whose parent is the caller, each carrying the caller’s id as its parent-id) are included only for callers with the manage-holders capability; without it, the response contains the caller alone. Requires API access.
GET
/
api
/
v1
/
accounts
List accounts
curl --request GET \
--url https://app.crown-brlv.com/api/v1/accountsimport requests
url = "https://app.crown-brlv.com/api/v1/accounts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.crown-brlv.com/api/v1/accounts', 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://app.crown-brlv.com/api/v1/accounts",
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://app.crown-brlv.com/api/v1/accounts"
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://app.crown-brlv.com/api/v1/accounts")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.crown-brlv.com/api/v1/accounts")
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{
"accounts": [
{
"id": "019712cf-c86d-703f-85b8-bdaa4fc8d254",
"alias": "Trading account",
"status": "active",
"external-id": "ext-12345",
"created-at": "2024-01-15T10:30:00Z",
"parent-id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}Response
Account and sub-accounts retrieved successfully
Show child attributes
Show child attributes
⌘I