get_balance
Queries the requester's account, and returns the total amount of money in the account and the amount that is allocated to pending transactions.
Request parameters
Standard request parameters
- action = get_balance
- object = domain
Response parameters
Standard response parameters
- action = reply
- object = domain
- is_success = Boolean indicating success or failure of the request.
- response_code = Response code indicating outcome of the request.
- response_text = Message describing the outcome of the request.
Response attributes
If the request is successful, the attributes associative array may include the following:
Parameter | Obligation | Definition/Value |
---|---|---|
balance | Always returned | The total amount of money in the requester's account, including the amount that is allocated to pending transactions. |
hold_balance | Always returned | The amount of money in the requestor's account that is allocated to pending transactions. |
Example
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="action">GET_BALANCE</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="action">REPLY</item>
<item key="is_success">1</item>
<item key="attributes">
<dt_assoc>
<item key="balance">9000.01</item>
<item key="hold_balance">0.00</item>
</dt_assoc>
</item>
<item key="response_code">200</item>
<item key="response_text">Command successful</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
Updated about 2 years ago