Bentrix Docs
HomePricingDashboard

C#: real accounts

Every method of client.Accounts in the C# SDK.

AccountForget#

Ask the person to forget an account · tool account_forget

scope: adminplan: freesince 1.0.0long work: answers a job

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
public Task<Job> AccountForget(string account, bool? wholeServer = null, CancellationToken ct = default)

Parameters

NameTypeWhat it is
accountstringrequiredThe account's uri, as get_state gives it.
wholeServerbool?optionalEvery account on the same server, as the broker row's menu forgets them.

Returns

Task<Job> — await job.WaitAsync() 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 JsonNode.

What it answers

Answers a job: completed when it is gone, failed when the person kept it.

Example

await client.Accounts.AccountForget(account)

AccountRead#

Read the sign-in and what the account holds · tool account_read

scope: readplan: freesince 1.6.0

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
public Task<JsonNode?> AccountRead(CancellationToken ct = default)

It takes no arguments.

Returns

Task<JsonNode?> — the tool’s answer as a JsonNode.

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

await client.Accounts.AccountRead()

PaperCreate#

Make a paper workbench of a real account · tool paper_create

scope: paperplan: freesince 1.0.0

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
public Task<JsonNode?> PaperCreate(string account, double? openingBalance = null, CancellationToken ct = default)

Parameters

NameTypeWhat it is
accountstringrequiredThe real account the paper workbench copies, as get_state gives it.
openingBalancedouble?optionalWhat it opens on, in the account's currency; the sheet's own default when omitted.

Returns

Task<JsonNode?> — the tool’s answer as a JsonNode.

What it answers

Answers the workbench.

Example

await client.Accounts.PaperCreate(account)

TerminalConnect#

Connect to a MetaTrader terminal · tool terminal_connect

scope: adminplan: freesince 1.0.0

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
public Task<JsonNode?> TerminalConnect(long terminal, CancellationToken ct = default)

Parameters

NameTypeWhat it is
terminallongrequiredThe terminal's place in terminals_list.

Returns

Task<JsonNode?> — the tool’s answer as a JsonNode.

What it answers

Answers that the connection is under way.

Example

await client.Accounts.TerminalConnect(1)

TerminalStart#

Open the MetaTrader of a real account · tool terminal_start

scope: adminplan: freesince 1.0.0

Starts the MetaTrader a real account was connected through, as its row's Open MetaTrader does. Answers that it was asked.

Declaration

client.Accounts
public Task<JsonNode?> TerminalStart(string account, CancellationToken ct = default)

Parameters

NameTypeWhat it is
accountstringrequiredThe account's uri, as get_state gives it.

Returns

Task<JsonNode?> — the tool’s answer as a JsonNode.

What it answers

Answers that it was asked.

Example

await client.Accounts.TerminalStart(account)

TerminalSwitchAccount#

Switch MetaTrader to a real account · tool terminal_switch_account

scope: adminplan: freesince 1.0.0

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
public Task<JsonNode?> TerminalSwitchAccount(string account, CancellationToken ct = default)

Parameters

NameTypeWhat it is
accountstringrequiredThe account's uri, as get_state gives it.

Returns

Task<JsonNode?> — the tool’s answer as a JsonNode.

What it answers

Answers that the switch was asked.

Example

await client.Accounts.TerminalSwitchAccount(account)

TerminalsList#

Read the MetaTrader terminals · tool terminals_list

scope: readplan: freesince 1.0.0

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
public Task<JsonNode?> TerminalsList(CancellationToken ct = default)

It takes no arguments.

Returns

Task<JsonNode?> — the tool’s answer as a JsonNode.

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

await client.Accounts.TerminalsList()

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed