Customer Support
Trillion Direct Search Network
API Manual
API Queries - Get Balance
The get_balance function returns the current balance of your account. This is the same figure shown in the top navigation bar when you are logged in. No additional parameters are required for this function.
All balances are returned in USD.
Note: Your balance reflects account activity that has not yet been finalised, so it may change during the day as traffic is delivered and charges are settled. A balance retrieved mid-day is a live figure, not an end-of-day statement.
Additional Parameters
- type - Specifies the format of the API response. Set to "json" for a JSON response; otherwise, the response will be in XML. (Optional)
Example query and response:
-
Example query:
https://www.trillion.com/api.html?mode=get_balance
Use Trillion Direct API key in place of Bearer Token.
Response (XML):
<results> <result balance="1234.56"/> </results>
Response (JSON):
{ "results": [ { "balance": "1234.56" } ] }
Error Responses:
Possible error responses for this function are:
- General errors, such as 200 - Internal Error or 300 - Username or password invalid.