Type/to search
Getting Started
Platform Basics
Writing Strategies
Development Tools
Backtesting System
Advanced Topics
Data and Research
Extended API Interface
AI Integration
Create ApiKey
Authentication Methods
Extended API Interface Details
GetAccount
GetNodeList
DeleteNode
GetExchangeList
GetPlatformList
GetStrategyList
GetRobotGroupList
GetRobotList
GetRobotDetail
GetRobotLogs
NewRobot
RestartRobot
StopRobot
CommandRobot
DeleteRobot
PluginRun
pub
Extended API Interface Return Codes
Live Trading Status Codes

Gets the account information of the account that owns the API key, including the balance and the total amount spent.

Examples

Query the account balance.

python
# api() is the function in the Python example on the signature authentication page r = api('GetAccount') print(r['data']['result']['balance'] / 1e8) # output: 229.44702436 (USD)

Returns

TypeDescription

object

On success data.result is the account information; its fields are in the attributes table below.

Attributes

NameTypeDescription

balance

number

Account balance in USD, as an integer scaled by 1e8; divide by 1e8 for the actual value (229.44702436 in the example).

consumed

number

Total amount spent, in the same unit and scaling as balance.

username

string

User name.

email

string

Account email.

uid

string

Account UID.

Remarks

Example response
json
{ "code": 0, "data": { "result": { "balance": 22944702436, "concurrent": 0, "consumed": 211092719653, "email": "[email protected]", "openai": false, "settings": {}, "sns": {"wechat": true}, "uid": "105ea6e51bcc177926a10fdbb7e2a1d6", "username": "abc" }, "error": null } }