Every method of client.settings in the JavaScript SDK.
keysList#
Read the keyboard's keys · tool keys_list
Answers every action Bentrix reads a key for, as Settings > Keyboard lists them: its token (chart.zoom_in), its group (everywhere, chart, tools, replay, trade, dialogs, editor, desk), what it does, its keys now, its default keys and whether they were changed - with the most keys an action may have and the operating system's own keys, which are refused.
Declaration
client.settings
keysList(): Promise<any>It takes no arguments.
Returns
Promise<any> — the tool’s answer as a plain object.
What it answers
Answers every action Bentrix reads a key for, as Settings > Keyboard lists them: its token (chart.
Example
await client.settings.keysList()keysReset#
Put keys back to the defaults · tool keys_reset
Puts one action's keys back to Bentrix's default, or every action's when none is named - Settings > Keyboard's Reset and Reset all to defaults. Answers the keys.
Declaration
client.settings
keysReset(args: { action?: string }): Promise<any>Parameters
| Name | Type | What it is | |
|---|---|---|---|
action | string | optional | The action whose keys go back to Bentrix's default; omitted, every action's. |
Returns
Promise<any> — the tool’s answer as a plain object.
What it answers
Answers the keys.
Example
await client.settings.keysReset()keysSet#
Change an action's keys · tool keys_set
Gives one action its keys, as Settings > Keyboard does: at most two, any combination of Ctrl, Alt and Shift with one key, or none. A key another action holds where both are read at once is refused naming that action, unless replace moves it here; the operating system's own keys are always refused. Kept with the account. Answers the action's row.
Declaration
client.settings
keysSet(args: { action: string; keys: string[]; replace?: boolean }): Promise<any>Parameters
| Name | Type | What it is | |
|---|---|---|---|
action | string | required | The action's token, as keys_list answers it: chart.zoom_in. |
keys | string[] | required | Its keys, at most two, each written as Ctrl+Alt+K, Shift+F12 or Space; an empty list leaves the action with no key. |
replace | boolean | optional | Take a key another action holds where both are read at once, as Settings > Keyboard's Replace does; otherwise such a key is refused, naming that action. |
Returns
Promise<any> — the tool’s answer as a plain object.
What it answers
Answers the action's row.
Example
await client.settings.keysSet({ action: "…", keys: "…" })profileDelete#
Delete a settings profile · tool profile_delete
Deletes a settings profile - never the last one, never the one in use - as Settings > Profiles' Delete does. Answers the profiles.
Declaration
client.settings
profileDelete(args: { name: string }): Promise<any>Parameters
| Name | Type | What it is | |
|---|---|---|---|
name | string | required | The profile's name, as profiles_list answers it. |
Returns
Promise<any> — the tool’s answer as a plain object.
What it answers
Answers the profiles.
Example
await client.settings.profileDelete({ name: "…" })profileRename#
Rename a settings profile · tool profile_rename
Renames a settings profile, as Settings > Profiles' Rename does. Answers the profiles.
Declaration
client.settings
profileRename(args: { name: string; to: string }): Promise<any>Parameters
| Name | Type | What it is | |
|---|---|---|---|
name | string | required | The profile's name now. |
to | string | required | Its new name. |
Returns
Promise<any> — the tool’s answer as a plain object.
What it answers
Answers the profiles.
Example
await client.settings.profileRename({ name: "…", to: "…" })profileSaveAs#
Save the settings in use as a new profile · tool profile_save_as
Makes a new settings profile from the settings in use, under a new name, and puts it in use - Settings > Profiles' Save as a new profile. At most 20 profiles, a name of at most 40 characters, never one another profile has. Answers the profiles.
Declaration
client.settings
profileSaveAs(args: { name: string }): Promise<any>Parameters
| Name | Type | What it is | |
|---|---|---|---|
name | string | required | The profile's name, as profiles_list answers it. |
Returns
Promise<any> — the tool’s answer as a plain object.
What it answers
Answers the profiles.
Example
await client.settings.profileSaveAs({ name: "…" })profileUse#
Use a settings profile · tool profile_use
Puts a settings profile in use, as Settings > Profiles' Use does: every setting, default and template it holds is in force at once; the workbenches, this computer's settings and where the windows stand do not move. Answers the profiles.
Declaration
client.settings
profileUse(args: { name: string }): Promise<any>Parameters
| Name | Type | What it is | |
|---|---|---|---|
name | string | required | The profile's name, as profiles_list answers it. |
Returns
Promise<any> — the tool’s answer as a plain object.
What it answers
Answers the profiles.
Example
await client.settings.profileUse({ name: "…" })profilesList#
Read the settings profiles · tool profiles_list
Answers the account's settings profiles, as Settings > Profiles lists them: each one's name, whether it is in use, when it last changed and when it was last synced, and where they are kept (this computer, or Bentrix's server too on Plus and Pro). A profile holds every setting, default and template, never the work.
Declaration
client.settings
profilesList(): Promise<any>It takes no arguments.
Returns
Promise<any> — the tool’s answer as a plain object.
What it answers
Answers the account's settings profiles, as Settings > Profiles lists them: each one's name, whether it is in use, when it last changed and when it was last synced, and where they are kept (this computer, or Bentrix's server too on Plus and Pro).
Example
await client.settings.profilesList()get#
Read the settings · tool settings_get
Answers the settings an agent may read: the theme, the network route (automatic, direct or proxy) and the proxy's address without its password, and the folder agents' exports go to.
Declaration
client.settings
get(): Promise<any>It takes no arguments.
Returns
Promise<any> — the tool’s answer as a plain object.
What it answers
Recorded from a running Bentrix 0.1.382 on a laboratory of generated markets (long lists cut to their first rows):
{
"adjusted_prices": "off",
"calendar": "gregorian",
"exports": "C:\\Users\\mohaa\\AppData\\Local\\Temp\\bx-docs-answers-11gvyak4\\LocalAppData\\BENTRIX\\exports",
"proxy_url": "http://127.0.0.1:9998",
"route": "automatic",
"theme": "night"
}Example
await client.settings.get()set#
Set a setting · tool settings_set
Sets one setting through its own control's door: theme (night or day), adjusted_prices (on or off: charts on adjusted prices), route (automatic, direct or proxy), proxy_url (an address with no password - a password is never set by an agent) or exports (an absolute folder, or default). Answers the settings.
Declaration
client.settings
set(args: { key: "theme" | "adjusted_prices" | "route" | "proxy_url" | "exports"; value: string }): Promise<any>Parameters
| Name | Type | What it is | |
|---|---|---|---|
key | "theme" | "adjusted_prices" | "route" | "proxy_url" | "exports" | required | |
value | string | required |
Returns
Promise<any> — the tool’s answer as a plain object.
What it answers
Answers the settings.
Example
await client.settings.set({ key: "…", value: "…" })