Every method of client.drivers in the C++ SDK.
driver_forget#
Ask the person to forget a driver · tool driver_forget
Asks the person, on a card in Bentrix's window naming this agent, to forget a driver elsewhere; Allow forgets it as Settings > Drivers' Forget does, and it must be paired again to be reached. Answers a job.
Declaration
client.drivers
Job driver_forget(const DriverForgetArgs &args)Parameters
| Name | Type | What it is | |
|---|---|---|---|
driver | std::string | required | The driver's key, as drivers_list gives it. |
Returns
Job — job.wait() 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 Json value.
What it answers
Answers a job.
Example
client.drivers.driver_forget(DriversApi::DriverForgetArgs("…"))driver_pair#
Pair with a driver elsewhere · tool driver_pair
Pairs with a terminal driver on another computer of this network, as Settings > Drivers' Pair does: its address and the one-use code it shows on its own computer, where the person allows it. Answers that pairing is under way; the driver appears in drivers_list once paired.
Declaration
client.drivers
Json driver_pair(const DriverPairArgs &args)Parameters
| Name | Type | What it is | |
|---|---|---|---|
address | std::string | required | The driver's address on this network, host:port. |
code | std::string | required | The one-use code the driver shows on its own computer. |
Returns
Json — the tool’s answer as a Json value.
What it answers
Answers that pairing is under way; the driver appears in drivers_list once paired.
Example
client.drivers.driver_pair(DriversApi::DriverPairArgs("…", "…"))driver_set_inside#
Run the driver inside Bentrix, or apart · tool driver_set_inside
Sets where this computer's driver runs, as Settings > Drivers' Run the driver inside Bentrix does: inside Bentrix's own process (one process fewer), or as a process of its own (the default: a fault of the driver's never closes Bentrix). Takes effect the next time the driver starts. Answers the drivers.
Declaration
client.drivers
Json driver_set_inside(const DriverSetInsideArgs &args)Parameters
| Name | Type | What it is | |
|---|---|---|---|
inside | bool | required | True runs the driver inside Bentrix's own process; false (the default) as a process of its own. |
Returns
Json — the tool’s answer as a Json value.
What it answers
Answers the drivers.
Example
client.drivers.driver_set_inside(DriversApi::DriverSetInsideArgs(true))driver_set_rendezvous#
Set the drivers' rendezvous · tool driver_set_rendezvous
Sets the rendezvous a driver elsewhere is reached through, as Settings > Drivers' rendezvous row does; empty is Bentrix's own. Answers the drivers, or the row's own refusal of what was typed.
Declaration
client.drivers
Json driver_set_rendezvous(const DriverSetRendezvousArgs &args)Parameters
| Name | Type | What it is | |
|---|---|---|---|
host | std::string | required | The rendezvous host the drivers elsewhere are reached through; empty for Bentrix's own. |
Returns
Json — the tool’s answer as a Json value.
What it answers
Answers the drivers, or the row's own refusal of what was typed.
Example
client.drivers.driver_set_rendezvous(DriversApi::DriverSetRendezvousArgs("…"))driver_settings#
Read the driver's settings · tool driver_settings
What Settings > Driver shows, as this computer's driver last answered it: Keep the driver running, run as this user or as a Windows service, the applications paired with it (their capabilities, whether connected, whether paired from another computer), a pairing code and an application asking to pair, Reachable on this network and over the internet with the rendezvous, Allow trading through this driver, Manage MetaTrader's settings myself, the build and the log folder. Asks the driver again; an answer older than a moment is what it said last. Who may reach this computer's terminals, and how, is the person's to change, never an agent's.
Declaration
client.drivers
Json driver_settings()It takes no arguments.
Returns
Json — the tool’s answer as a Json value.
What it answers
What the tool's description says.
Example
client.drivers.driver_settings()list#
Read the drivers · tool drivers_list
Answers the terminal drivers elsewhere this install remembers - each one's key, the label it gave itself and the address it was paired at - the rendezvous in force, and this computer's driver's update setting.
Declaration
client.drivers
Json list()It takes no arguments.
Returns
Json — the tool’s answer as a Json value.
What it answers
Recorded from a running Bentrix 0.1.382 on a laboratory of generated markets (long lists cut to their first rows):
{
"elsewhere": [],
"rendezvous": "link.bentrix.net"
}Example
client.drivers.list()