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 · Instrument rules
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/Calling/Instrument rules
← PreviousMarket dataNext →Options, futures & combos

Instrument rules

The venue’s size and price rules for one instrument. Every rule is Decimal | None: absent means the venue stated none.
PYwhile25.data.instrument(key) → Instrument · while25.data.instruments(keys) → list[Instrument]
Unknown key: INSTRUMENT_NOT_FOUND.
Attributes
size_increment / min_qty / max_qty / lot_multipleDecimal | Nonerequired
inst.step is the lot, else the increment.
price_increment / sub_band_price_increment / price_band_floorDecimal | Nonerequired
The tick, and a finer one below a band floor.
multiplier / min_notionalDecimal | None / Money | Nonerequired
 
quote_currency / settlement_currency / tradeable / untradeable_reasonstr / str / bool / strrequired
 
PYinst.snap(price, mode="nearest" | "down" | "up") · inst.offset(price, ticks) · inst.ticks_between(a, b) · inst.tick_for(price)
A float from the feed onto the tick grid, as an exact Decimal; None when the venue states no tick. Do arithmetic on the snapped figure, never the float.
PYinst.check(quantity=None, price=None) → str | None · inst.notice(quantity=None, price=None) → str | None
Local pre-check mirroring the engine’s: None passes, else the reason. Only a rule the venue stated is judged; notice() names the gaps. The engine re-checks every order.
Sizing on the grid
inst = while25.data.instrument("CRYPTO:GLOBAL:BTC-USD")
stop = inst.snap(ltp * 0.995, mode="down")          # a SELL stop, on the tick
if stop is None:
    while25.log("no tick on file: not entering", level="error")
elif (why := inst.check(quantity=qty, price=stop)):
    while25.log(f"skipping: {why}")
else:
    while25.buy("CRYPTO:GLOBAL:BTC-USD", qty, stop_loss=stop)
← PreviousMarket dataNext →Options, futures & combos
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.