While25 Python SDK
Write trading strategies, chart indicators, monitors and panels in plain Python, and run them on the While25 platform.

What you can build
| What it is | Read more | |
|---|---|---|
| Strategy | Code that places orders when your rules say so | Your first module |
| Indicator | A line, histogram or zone drawn on the chart | Indicators |
| Monitor | Code that watches the market and alerts you | Monitors |
| App | A panel of your own in the platform | Panels |
| Backtest | Any logic, any model, any mix of instruments and timeframes | Backtests |
You write a Python class. While25 feeds it prices, sends its orders to your broker, and draws what it produces.
Install
pip install while25Python 3.11 or newer, no dependencies, fully typed. You can write and test your code on any computer; to run it against live markets, use While25 Desktop.
A strategy in 10 lines
import while25
from while25 import Strategy, on
class BuyTheDip(Strategy):
id = "buy_the_dip"
label = "Buy the dip"
@on.bar("EQ:US:AAPL", "1D") # runs once a day, when the bar closes
def on_day(self, ctx, bar):
if bar["close"] < bar["open"] * 0.97: # fell 3% today
while25.buy("EQ:US:AAPL", 10)Open the Code Editor in While25, paste it, and press Run. The platform shows the strategy as armed and lists every order it sends.
Open source
The SDK is Apache-2.0 and developed in the open: github.com/Aayush2504/while25-sdk. Bug reports and ideas are welcome in its issues. For AI assistants, every page here is also served as Markdown: add .md to its address. llms.txt at the root of these docs lists every page, and llms-full.txt holds them all in one file.