List Subaccounts
Returns all subaccounts (including disabled ones) belonging to your master account.
| Method | GET |
| Path | /dma/api/v1/master/subaccounts |
| Auth | Authenticated (master account API key). |
Request
- Python
- Java
- Go
- Node.js
from reference_client import sign_request, BASE_URL
import requests
headers, path = sign_request("GET", "/dma/api/v1/master/subaccounts")
r = requests.get(BASE_URL + path, headers=headers)
print(r.json())
HttpResponse<String> resp = client.send(
"GET", "/dma/api/v1/master/subaccounts", null, null);
System.out.println(resp.body());
headers, p, err := SignRequest("GET", "/dma/api/v1/master/subaccounts", nil)
if err != nil { panic(err) }
req, _ := http.NewRequest("GET", BaseURL+p, nil)
for k, v := range headers { req.Header.Set(k, v) }
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
const {signRequest, BASE_URL} = require('./reference-client');
const {headers, path} = signRequest('GET', '/dma/api/v1/master/subaccounts');
const r = await fetch(BASE_URL + path, { headers });
console.log(await r.json());
Response
{
"message": "success",
"data": {
"subaccounts": [
{
"subaccount_id": 1000,
"is_master": true
},
{
"subaccount_id": 1001,
"is_active": true
},
{
"subaccount_id": 1002,
"is_active": false
}
]
}
}
| Field | Type | Description |
|---|---|---|
subaccount_id | integer (int64) | Unique subaccount identifier. |
is_master | boolean (nullable) | true only for the master account's own entry. Omitted for child subaccounts. |
is_active | boolean (nullable) | Whether the subaccount is active. Omitted for the master account entry. |