Bentrix Docs
HomePricingDashboard

15. When a call is refused

A refusal is an answer, in Bentrix's own words — what each language throws, how to read the sentence, and the refusals a program meets most.

When Bentrix will not do what a call asks — a market that is closed, a volume below the market's step, a scope the program was not given, a workbench whose engine is still arming — the call does not fail silently. It raises an error in your language carrying Bentrix's own sentence, the same one a person would read on the screen, and often a short machine word for the kind of refusal.

01What each language raises

LanguageA refused toolIts sentenceIts machine wordBentrix not running
Pythonbentrix.ToolError (a bentrix.BentrixError)e.messagee.machinebentrix.NotRunning
JavaScriptToolError (a BentrixError)e.messagee.machineNotRunning
C#ToolException (a BentrixException)e.Message—NotRunningException
Go*mcp.ToolError (check with errors.As)e.Msge.Machinean error from mcp.Connect
JavaClient.ToolException (a Client.McpException)e.getMessage()—Client.NotRunningException
C++bentrix::mcp::ToolError (a bentrix::mcp::Error)e.what()e.machinebentrix::mcp::NotRunning
JuliaBentrixMCP.ToolErrore.msg—an error from connect
Rthe condition bentrix_tool_error (also a bentrix_error)conditionMessage(e)—a bentrix_error from connect
Rustmcp::Error::Tool { tool, message, machine }messagemachinean mcp::Error from connect

Catch it as you catch any error in your language — try/except, try/catch, if err != nil, tryCatch, match — and print the sentence: it says what was wrong and, most of the time, what to do.

02The refusals a program meets most

The sentence saysWhat it meansWhat to do
…has no engine yet… / …is not mounted…the workbench is still arming over its marketswait until its engine is ready (guide 2's step 4)
…is not the one open in the window; select the workbench first.a laboratory's data is read through the selected workbenchselect_bench it
insufficient scope: …the program's pairing does not have that scopegive it in ☰ › Settings › Agents, or decide it should not have it
…is on the wrong side of the market…a limit or stop order's price is on the wrong sidea buy limit below the ask, a buy stop above it
…inside the stops level…a stop or target too close to the price, as the broker sets itmove it further out
…is closed…the market is closed at the workbench's clockstep the clock to a trading session
busy16 calls of this program are already runningwait for one to finish
expired / refused_by_capa real order under One-click outran its time or its capssee real accounts and safety

A refusal never leaves anything half done: an order the venue refused is not in the book; a step that was refused did not move the clock.

03Long work: a job

A few tools answer a job instead of a result: work that takes long, or that waits for you first (closing Bentrix, forgetting an account, deleting a laboratory). The call answers at once; the job's wait gives the result when it ends, or raises the job's failure — the person kept it, for instance. Each method's page says when it answers a job.

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