Bentrix Docs
HomePricingDashboard

Python: account

Every method of client.account in the Python SDK.

fills_get#

Read a real account's measured fills · tool fills_get

scope: readplan: freesince 1.14.0

Answers the measurement fills_measure started: whether it is still reading, the laboratory it re-prices on, per market the shortfall's figures and the calibrated slippage (fixed at the median, random up to twice the mean, each in the market's price units), the latency, and every deal re-priced.

Declaration

client.account
def fills_get(self, account: str) -> Dict[str, Any]

Parameters

NameTypeWhat it is
accountstrrequiredThe account's uri, as get_state gives it: bentrix://account/<id>.

Returns

Dict[str, Any] — the tool’s answer as a dict of plain values.

What it answers

Answers the measurement fills_measure started: whether it is still reading, the laboratory it re-prices on, per market the shortfall's figures and the calibrated slippage (fixed at the median, random up to twice the mean, each in the market's price units), the latency, and every deal re-priced.

Example

client.account.fills_get(account)

fills_make_bench#

Make a workbench with a real account's measured slippage · tool fills_make_bench

scope: labplan: freesince 1.14.0

Makes a laboratory workbench alike one of the account's history's laboratory, its fills slipping by what fills_measure measured — fixed at the median or random with the measured mean, each market in its own price units — and waiting the measured latency where chosen; a strategy re-run there runs on the person's own slippage. Answers the workbench's uri.

Declaration

client.account
def fills_make_bench(self, account: str, *, alike: Optional[str] = None, latency: Optional[bool] = None, slippage: Optional[str] = None) -> Dict[str, Any]

Parameters

NameTypeWhat it is
accountstrrequiredThe account's uri, as get_state gives it: bentrix://account/<id>.
alikeOptional[str]optionalThe laboratory workbench to make it alike (the laboratory's first when absent): bentrix://lab/<lab>/bench/<bench>.
latencyOptional[bool]optionalWhether the measured latency is taken too (true when absent).
slippageOptional[str]optionalMedian (fixed at each market's median shortfall) or mean (random, its mean the measured mean); median when absent.

Returns

Dict[str, Any] — the tool’s answer as a dict of plain values.

What it answers

Answers the workbench's uri.

Example

client.account.fills_make_bench(account)

fills_measure#

Measure a real account's own fills · tool fills_measure

scope: readplan: freesince 1.14.0

Reads a real account's deals and orders off its MetaTrader (prices and moments, no money figure) and re-prices each on the laboratory of that account's history: per market the shortfall against what Bentrix's venue would have filled (median, mean, 90th percentile, worst, in points), the latency from placing a market order to its fill, and a calibrated slippage. Starts the read and answers as fills_get does; fills_get again until reading is false.

Declaration

client.account
def fills_measure(self, account: str, *, span: Optional[str] = None) -> Dict[str, Any]

Parameters

NameTypeWhat it is
accountstrrequiredThe account's uri, as get_state gives it: bentrix://account/<id>.
spanOptional[str]optionalHow far back: 30d, 90d, 1y or all (90d when absent).

Returns

Dict[str, Any] — the tool’s answer as a dict of plain values.

What it answers

What the tool's description says.

Example

client.account.fills_measure(account)

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