What the bot sandbox is
A code editor in your browser for writing Python trading bots, replaying them on past data and running them on paper. Nothing in it can place a real order.
On this page
The bot sandbox is where you write a trading strategy in Python and try it out. You can backtest it (replay it over past prices to see what it would have done) or run it against live prices, placing orders in a practice portfolio. It only ever places paper orders.
Open it from the menu in the bottom-right corner (Bot sandbox), or press ⌥ S (Alt S on Windows) when you are not typing in a box. It opens as its own page, with a full page load, because it runs under a stricter security policy than the rest of the app. It is built for a desktop-size window.
The screen#
- Top bar
Where you are (Bot sandbox › project › file), the reminder “Paper only · runs while this tab is open”, the runner's status, and the actions: Backtest, Unit tests, Stop and Run.
- Files
Your projects and files on the left, with search across files and each file's history.
- Editor
Tabbed, with completions and hover help for the
olypsemodule. It can split in two.- Terminal, Code check, Unit tests, Output
The drawer under the editor: what your code printed, the automatic code check, your unit tests' results and the live run's status history. Code check and Unit tests.
- Assistant, Positions, P&L, Backtest
The tabs on the right: the sandbox assistant, the practice portfolio's positions and P&L while a bot runs, and Backtest, a short summary of the last backtest with Open backtest view.
Backtest switches the whole page to the backtest view, and Back to code returns. Running a backtest.
Projects#
A project is a folder with an olypse.json file that names its entry file (usually strategy.py). Most projects also have a config.toml with the strategy's settings, a README.md, and a tests folder. Run, Backtest and Unit tests act on the project of the file you have open. A file outside any project runs on its own.
A new account starts with one starter project. To make another, choose New project… in the Files menu and pick a starter (Kalshi whale-crowd fade, Long-dated whale fade or News reaction) or a blank layout. Two single-file examples sit in the examples folder: Hello — read markets, which only runs (it has no strategy, so it cannot be backtested), and a mean-reversion strategy. A starter is a place to begin, not a strategy that is known to make money: read its README for what it does and how it can lose.
How your code runs#
- Your code runs in your browser, in an isolated Python runner, not on Olypse's servers. Only the Python standard library is available (no numpy or pandas).
- It reaches market data and the practice portfolio only through the
olypsemodule. SDK reference. - Your files, runs, saved backtests and assistant chats are saved to your account.
Limits#
| What | Limit |
|---|---|
| Files and folders | 400 per account, 8 MB in total |
| Runs and backtests started | 30 a minute |
| Saved backtests | 100, with 50 MB of results in total, and at most 30 saved an hour |
| Markets in one strategy | 25 in a run, up to 100 in a backtest |
| One backtest window | 92 days |