Skip to main content

Get Subaccount Balance

Returns the wallet balance for a specific child subaccount.

MethodGET
Path/dma/api/v1/master/subaccount/balance
AuthAuthenticated (master account API key).

Query parameters

ParameterTypeRequiredDescription
subaccount_idinteger (int64)YesThe subaccount_id whose balance to fetch.

Request

from reference_client import sign_request, BASE_URL
import requests

headers, path = sign_request("GET", "/dma/api/v1/master/subaccount/balance?subaccount_id=1001")
r = requests.get(BASE_URL + path, headers=headers)
print(r.json())

Response

{
"message": "success",
"data": {
"subaccount_id": 1001,
"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
}
}
FieldTypeDescription
data.subaccount_idintegerThe subaccount queried.
data.is_activebooleanWhether the subaccount is active.
data.balance_detailobjectDynamic balance structure from the exchange.

Errors

StatusMessageCause
400subaccount_id query parameter is requiredMissing query parameter.
403subaccount does not belong to master accountSubaccount belongs to another master.
404subaccount not foundInvalid subaccount_id.