Get Consolidated Balance
Returns the balance for the master account and all linked subaccounts in a single call.
| Method | GET |
| Path | /dma/api/v1/master/balance/consolidated |
| 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/balance/consolidated")
r = requests.get(BASE_URL + path, headers=headers)
print(r.json())
HttpResponse<String> resp = client.send(
"GET", "/dma/api/v1/master/balance/consolidated", null, null);
System.out.println(resp.body());
headers, p, err := SignRequest("GET", "/dma/api/v1/master/balance/consolidated", 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/balance/consolidated');
const r = await fetch(BASE_URL + path, { headers });
console.log(await r.json());
Response
{
"message": "success",
"data": {
"balances": [
{
"subaccount_id": null,
"is_master": true,
"account_type": "UNIFIED",
"usdt_inr_rate": "84.50",
"balance_detail": {
"totalEquity": "10500.25",
"totalEquityINR": "887271.13",
"coin": [
{
"coin": "USDT",
"equity": "10500.25",
"equityINR": "887271.13",
"walletBalance": "10000.00",
"walletBalanceINR": "845000.00",
"unrealisedPnl": "500.25",
"unrealisedPnlINR": "42271.13"
}
]
},
"is_active": null
},
{
"subaccount_id": 1001,
"is_master": null,
"account_type": "UNIFIED",
"usdt_inr_rate": "84.50",
"balance_detail": {
"totalEquity": "5000.00",
"totalEquityINR": "422500.00",
"coin": [
{
"coin": "USDT",
"equity": "5000.00",
"equityINR": "422500.00",
"walletBalance": "5000.00",
"walletBalanceINR": "422500.00"
}
]
},
"is_active": true
}
]
}
}
| Field | Type | Description |
|---|---|---|
balances | array | Array of balance entries — first entry is always the master account. |
balances[].subaccount_id | integer (nullable) | null for master, integer for child subaccounts. |
balances[].is_master | boolean (nullable) | true for master account entry, null for children. |
balances[].is_active | boolean (nullable) | null for master, true/false for children. |
balances[].balance_detail | object | Dynamic exchange balance data with INR conversions. |
If a specific subaccount's balance fetch fails, partial results are still returned. Check individual entries for completeness.