Every method of client.accounts() in the Rust SDK.
account_forget#
Ask the person to forget an account · tool account_forget
Opens Bentrix's own sheet that forgets a real account - or every account on its server - with its connection and its workbenches; the person forgets it or keeps it. Answers a job: completed when it is gone, failed when the person kept it.
Declaration
client.accounts()
pub fn account_forget(&self, args: AccountsAccountForgetArgs) -> Result<JobParameters
| Name | Type | What it is | |
|---|---|---|---|
account | impl Into<String> | required | The account's uri, as get_state gives it. |
whole_server | bool | optional | Every account on the same server, as the broker row's menu forgets them. |
Returns
Result<Job, Error> — job.wait(None, poll) answers the result: this is long work, or work the person allows first, so the call answers at once with a job and its result comes when it ends, as a serde_json::Value.
What it answers
Answers a job: completed when it is gone, failed when the person kept it.
Example
client.accounts().account_forget(mcp::AccountsAccountForgetArgs::new(account.clone()))?account_read#
Read the sign-in and what the account holds · tool account_read
Answers whether this install is signed in and the account's subject when it is; whether this run reaches Bentrix's sign-in service; the ways in the service offers (phone, email) and whether they were read; a sign-in under way, through which door and how it stands; the sentence the last sign-in ended on; and what the account holds - its tier, the feature map's version, and each feature's grant (allowed, limited with its count, refused with the tier that holds it, or unknown) with whose word it stands on (the account's answer, the published free column, or the build's seed). Signing in, typing a code and signing out are the person's own.
Declaration
client.accounts()
pub fn account_read(&self) -> Result<ValueIt takes no arguments.
Returns
Result<Value, Error> — the tool’s answer as a serde_json::Value.
What it answers
Answers whether this install is signed in and the account's subject when it is; whether this run reaches Bentrix's sign-in service; the ways in the service offers (phone, email) and whether they were read; a sign-in under way, through which door and how it stands; the sentence the last sign-in ended on; and what the account holds - its tier, the feature map's version, and each feature's grant (allowed, limited with its count, refused with the tier that holds it, or unknown) with whose word it stands on (the account's answer, the published free column, or the build's seed).
Example
client.accounts().account_read()?paper_create#
Make a paper workbench of a real account · tool paper_create
Makes a paper workbench on a real account's live prices, trading on Bentrix's own venue and never reaching the broker, as the account's new workbench sheet does with Orders: Paper; only the opening balance is chosen. Refused while the account is not the one MetaTrader is on. Answers the workbench.
Declaration
client.accounts()
pub fn paper_create(&self, args: AccountsPaperCreateArgs) -> Result<ValueParameters
| Name | Type | What it is | |
|---|---|---|---|
account | impl Into<String> | required | The real account the paper workbench copies, as get_state gives it. |
opening_balance | f64 | optional | What it opens on, in the account's currency; the sheet's own default when omitted. |
Returns
Result<Value, Error> — the tool’s answer as a serde_json::Value.
What it answers
Answers the workbench.
Example
client.accounts().paper_create(mcp::AccountsPaperCreateArgs::new(account.clone()))?terminal_connect#
Connect to a MetaTrader terminal · tool terminal_connect
Connects Bentrix to a terminal's account, as its card's Connect does on the Sources sheet: the account and its REAL workbench appear in get_state when the connection stands. It may restart a MetaTrader that has nothing of Bentrix inside. Answers that the connection is under way.
Declaration
client.accounts()
pub fn terminal_connect(&self, args: AccountsTerminalConnectArgs) -> Result<ValueParameters
| Name | Type | What it is | |
|---|---|---|---|
terminal | i64 | required | The terminal's place in terminals_list. |
Returns
Result<Value, Error> — the tool’s answer as a serde_json::Value.
What it answers
Answers that the connection is under way.
Example
client.accounts().terminal_connect(mcp::AccountsTerminalConnectArgs::new(1))?terminal_start#
Open the MetaTrader of a real account · tool terminal_start
Starts the MetaTrader a real account was connected through, as its row's Open MetaTrader does. Answers that it was asked.
Declaration
client.accounts()
pub fn terminal_start(&self, args: AccountsTerminalStartArgs) -> Result<ValueParameters
| Name | Type | What it is | |
|---|---|---|---|
account | impl Into<String> | required | The account's uri, as get_state gives it. |
Returns
Result<Value, Error> — the tool’s answer as a serde_json::Value.
What it answers
Answers that it was asked.
Example
client.accounts().terminal_start(mcp::AccountsTerminalStartArgs::new(account.clone()))?terminal_switch_account#
Switch MetaTrader to a real account · tool terminal_switch_account
Switches the MetaTrader that is on another account to this real account, as the account row's Switch does: in place when MetaTrader can, by a restart when only a restart can; refused with the row's own reason when it is not offered. Answers that the switch was asked.
Declaration
client.accounts()
pub fn terminal_switch_account(&self, args: AccountsTerminalSwitchAccountArgs) -> Result<ValueParameters
| Name | Type | What it is | |
|---|---|---|---|
account | impl Into<String> | required | The account's uri, as get_state gives it. |
Returns
Result<Value, Error> — the tool’s answer as a serde_json::Value.
What it answers
Answers that the switch was asked.
Example
client.accounts().terminal_switch_account(mcp::AccountsTerminalSwitchAccountArgs::new(account.clone()))?terminals_list#
Read the MetaTrader terminals · tool terminals_list
Answers the MetaTrader terminals the drivers found - each one's place in the list, the label that names where it lives, the server it was last on and whether it runs - or that the look is still under way.
Declaration
client.accounts()
pub fn terminals_list(&self) -> Result<ValueIt takes no arguments.
Returns
Result<Value, Error> — the tool’s answer as a serde_json::Value.
What it answers
Answers the MetaTrader terminals the drivers found - each one's place in the list, the label that names where it lives, the server it was last on and whether it runs - or that the look is still under way.
Example
client.accounts().terminals_list()?