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 · Subscriptions
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/Subscriptions
← PreviousModule typesNext →Inputs

Subscriptions

What wakes a module. Declare them as decorators on the methods that handle them.
Declaring subscriptions
import while25
from while25 import Strategy, on

class Breakout(Strategy):
    id = "breakout"

    @on.tick("EQ:US:AAPL")
    def price(self, ctx, tick):
        ...

    @on.fill(tag="breakout")
    def filled(self, ctx, event):
        ...
DecoratorDeliveredPayload
@on.bar(symbol, interval, hours=None)yesOne closed bar, never the forming one: symbol, interval, hours ("" regular, "eth" full session), time_ms (its start), open, high, low, close, volume
@on.tick(symbol)yesOne tick: symbol, ltp, bid, ask, timestamp_ms, as_of. bid, ask and timestamp_ms are None when the venue sent none — never 0
@on.schedule(every="10m")yes"250ms", "5s", "10m", "2h"; checked once a second. cron= and tz= are not implemented: a schedule without every= is refused at registration
@on.signal(name, **filters)yesWhatever while25.emit sent, to running subscribers only
@on.news(symbol)yesOne live news article, as a plain dict
@on.order(tag=, symbol=)yesEvery matching order event on the account, fills included (see Orders)
@on.fill(tag=, symbol=)yesThe same stream, executions only
@on.position(**filters)noNo publisher — refused at registration
A handler that raises halts the module
Routing stops, on purpose. See Errors for what each failure raises and how to handle it.
← PreviousModule typesNext →Inputs
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.