Bentrix Docs
HomePricingDashboard

Your own Python and the Gym

Write a strategy in Python against Bentrix's engine, or train a learning agent in a Gym environment on Bentrix's venue.

The SDK's engine binding runs Bentrix's replay and venue inside your own Python program: open a session on a recording, step it, read bars, place orders, read the book. The same strategy rules hold: the clock advances, and nothing after it exists.

For reinforcement learning, a Gym-shaped environment wraps the venue: observations from the bars, actions as orders, the episode a stretch of history. A recipe-generated market gives a fresh episode with every seed.

The Gym section covers it step by step: how one step works, the observation, the three kinds of action, the eight rewards, episodes and seeds, then guides that run an episode, beat a rule, train a policy in nine languages, and train PPO with Gymnasium and Stable-Baselines3.

The engine binding, page by page

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