Bentrix Docs
HomePricingDashboard

SDK

Write your own program that works in Bentrix — read candles and ticks, compute an indicator, place orders, run a strategy or a backtest — in Python, JavaScript, C#, Go, Java, C++, Julia, R or Rust.

The SDK is a library for your own program. With it, a program you write does what you do in Bentrix with the mouse: it opens a chart, reads the candles, attaches an indicator or draws its own, steps the replay, buys and sells on a laboratory or paper workbench, runs a strategy and reads its report. It is the same set of tools an AI assistant uses (Agents), given to you as ordinary functions in your own language.

You do not need to be a professional programmer. If you can write a loop and an if in one of the nine languages, the guides below take you the rest of the way, one step at a time, and every step is shown in all nine languages.

01What a program can do

  • Read the market — the candles of any interval a chart draws, the ticks behind them, the quotes, a market's contract, several markets at once.
  • Move the clock — step a laboratory's replay by ticks or candles, jump to a moment, play and pause. A program, like you, only ever sees what has happened at the clock: never a candle from the future.
  • Indicators — attach any of Bentrix's indicators and read their values; compute your own and draw it on the chart; install an Assay script.
  • Orders — preview, market and pending orders, stops and targets, trailing stops, closing; the book and the deals.
  • Strategies — your own decision loop in your own language, or a strategy document Bentrix runs for you, with its tester report, batches over settings, and walk-forward tests.
  • Forecasts — put your model's forecast on the chart, evaluate a model over history, run an ONNX model file: Forecasts on the chart.
  • Drawings and alerts, and a reinforcement-learning environment (observations, actions, rewards).

02How it works, in one paragraph

Bentrix runs a small server on this computer only, whenever it is open. Your program finds it by itself, pairs with it under the name you give (it then appears in ☰ › Settings › Agents), and calls its tools. A first program has the scopes read, lab and paper: it can read everything and act in the laboratory and on paper, and it cannot touch a real account until you allow it. Nothing is typed by hand: no address, no password, no key.

03What you need

Bentrix open on the same computer, and one of the nine languages installed. Each language's page says how to install the SDK, how to connect, and shows a first program to run. Then follow the guides in order: the second one makes a laboratory of generated markets for the rest to use, so nothing you do there touches a broker or real money.

Start in your language

Step-by-step guides

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