While25 - Programmable Trading Platform
Home
SDK
BlogCardsSupportDownload
While25

A programmable trading platform.

Download While25Book a call

Order managementRisk managementChartsAI assistantCompare

Python SDKSDKDownload

AboutBlogWhile CardsCareersSupportContact

Interactive BrokersAlpacaZerodhaUpstoxAll brokers

TermsPrivacyLicenceRiskAIAcceptable useNotices

While25 is software. It is not a broker, dealer, exchange or investment adviser, and nothing on this site is a recommendation to buy or sell any instrument. Orders you place route to your own brokerage account; While25 never holds funds or securities.

Trading carries risk of loss, including losses greater than your deposit on leveraged products. Backtests and simulations do not predict future returns. Broker and exchange names are trademarks of their owners. We plan to add Coinbase, Binance and Robinhood; you cannot connect them yet.

© 2026 While25

while25
Start here
  • Quickstart
  • Writing a module
Declaring
  • Module types
  • Subscriptions
  • Inputs
  • Plots & style
Calling
  • Market data
  • Instrument rules
  • Options, futures & combos
  • Portfolio
  • Orders
  • Chart
  • Panels & UI
  • Workspace
  • Context
  • Errors
Contents · Module types
Start here
  • Quickstart
  • Writing a module
Declaring
  • Module types
  • Subscriptions
  • Inputs
  • Plots & style
Calling
  • Market data
  • Instrument rules
  • Options, futures & combos
  • Portfolio
  • Orders
  • Chart
  • Panels & UI
  • Workspace
  • Context
  • Errors
SDK/Declaring/Module types
← PreviousWriting a moduleNext →Subscriptions

Module types

The base class decides what a module may do. All four share the lifecycle hooks.
BasePurposeEntry point
IndicatorReturns named series the chart draws.compute(self, ctx) → dict
StrategyMay place orders, once a human has deployed it from the Code panel.@on.* handlers
MonitorProduces verdicts and notifications. Never orders.@on.schedule
AppDrives a custom panel.on_start(self, ctx) or run(self, ctx)
PYon_start(self, ctx) · on_stop(self, ctx)
on_start runs first, before any handler; the module reads starting until it returns, so a warmup() there delays only its first decision, and a raise puts it in error. on_stop runs once at a Stop, a restart of its code or the app closing: from then while25.alive() is False and every order call raises MODULE_STOPPING. It may log and read what the module holds, and has two seconds. State on self lives for the deployment.
PYrun(self, ctx)
Called once after on_start, for work with a beginning and an end. Nothing else of the module runs meanwhile, so a loop checks while25.alive() each pass and returns when it is False.
When the computer sleeps, nothing runs
No price or bar reaches a module, no order goes out, and the engine’s held stops fire late, on the first price after waking. The module is not stopped; its log and the app say how long the sleep was, and the missed bars are not delivered after the fact.
PYcompute(self, ctx) → dict | None
Indicators only. Returns {plot_name: values} and sets self.times to matching epoch-millisecond timestamps, one per value — which may extend past the newest candle to forecast forward. Return None to draw nothing. Use float('nan') for a gap — never 0.
← PreviousWriting a moduleNext →Subscriptions
The SDK itself has no dependencies, so you can write and unit-test a module on a plain Python install before it ever touches the platform. numpy and pandas are available in the runtime. Get the desktop app to run it — Python runs beside the engine, which a browser cannot host.