Get account state
get_accountRetrieve a connected account's balance, equity, margin, and leverage while protecting privacy by masking the login to its last four digits.
Instructions
Return the connected account's balance, equity, margin and leverage.
The login is masked to its last four digits and the broker, server and account holder names are never returned. On the replay source these figures are invented placeholders describing no real account: the payload carries synthetic=true, the currency is SYN and the login is ****0000. Do not restate them as a real balance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| equity | Yes | Balance plus floating profit and loss. | |
| margin | Yes | Margin currently in use. | |
| source | Yes | Data source that produced these figures. | |
| balance | Yes | Balance, excluding floating profit and loss. | |
| currency | Yes | Account deposit currency. | |
| leverage | Yes | Account leverage, for example 100 for 1:100. | |
| synthetic | Yes | True when the figures are generated. The replay source always sets this, and its balance and equity are invented placeholders that describe no real account. | |
| margin_free | Yes | Margin available for new positions. | |
| login_masked | Yes | Account login masked to its last four digits. The full login is never returned. | |
| margin_level | Yes | Equity divided by margin, as a percentage. |