Orders
Place, modify, and cancel orders; the orders stream.
isMarketOrderSupported
Whether the broker supports market orders. Limit and stop-loss are assumed universally
supported — this flag only gates whether "market" is offered as an order type.
bool get isMarketOrderSupported => true;false removes "market" from every order-entry surface's order-type options — the order
pad, modify pad, exit panel, and order preferences each still only ever offer the subset of
order types they natively support; this flag only controls whether "market" is one of them.
placeOrder / modifyOrder / cancelOrder
void placeOrder(String params);
void modifyOrder(String params);
void cancelOrder(String orderID);placeOrder params:
{
"symID": "RELIANCE",
"price": 2400.0,
"orderType": "limit",
"orderAction": "buy",
"qty": 10,
"productType": "normal",
"triggerPrice": 0.0
}modifyOrder is the same shape plus "orderID". cancelOrder's orderID is the plain
string, not wrapped in JSON.
| Field | Type | Accepted values |
|---|---|---|
symID | String | required; the symbol the order is for |
price | double | required; order price |
orderType | String | required; "market", "limit", "stopmarket", "stoploss" — lowercase, no separators. "stoplimit" is accepted as a legacy alias for "stoploss"; anything else silently falls back to "limit" |
orderAction | String | required; "buy" / "sell", case-insensitive |
qty | int | required; order quantity |
productType | String | required; "normal" or "intraday" — disambiguates which product type the order protects when a symbol has simultaneous positions under more than one |
triggerPrice | double | optional; only meaningful for "stopmarket"/"stoploss", omit or 0 for market/limit orders |
ordersStreamer
Stream<String> get ordersStreamer;Must be a broadcast stream (.asBroadcastStream() or a broadcast StreamController) — a
single-subscription stream crashes with Bad state: Stream has already been listened to.
Emits a JSON list of order objects:
[
{
"orderID": "ORD123",
"type": "limit",
"orderAction": "buy",
"productType": "normal",
"avgPrice": 2405.0,
"price": 2400.0,
"netQty": 10,
"fillQty": 0,
"ordTime": "20-11-2025 09:15:00",
"orderStatus": "open",
"triggerPrice": 0.0,
"symbol": { "id": "RELIANCE", "name": "Reliance Industries" },
"reason": null
}
]| Field | Type | Accepted values |
|---|---|---|
orderID | String | required; unique order identifier |
type | String | required; "market", "limit", "stopmarket", "stoploss" — same lowercase values as placeOrder's orderType |
orderAction | String | required; "buy" / "sell", case-insensitive |
productType | String | required; "normal" or "intraday" — disambiguates which product type this order belongs to |
avgPrice | double | required; average fill price |
price | double | required; the order's limit/stop price (separate field from avgPrice) |
netQty | int | required; order quantity |
fillQty | int | required; quantity filled so far |
ordTime | String | required; "DD-MM-YYYY HH:mm:ss", 24-hour — not ISO-8601. Parsed with this exact separator layout; a different format will fail to parse |
orderStatus | String | required; "open", "completed", "rejected", "cancelled" |
triggerPrice | double | required; only meaningful for stop-type orders, 0 for market/limit |
symbol | object | required; full symbolInfo shape |
reason | String? | optional; freeform — shown on rejected orders (the SDK's own Orders list renders it under a rejected order's row) |
See OCO Orders for stop-loss + target bracket pairs — those never appear on this stream until a leg actually fires, at which point they show up here as a plain order.
actionFeedbackStreamer
Shared across Orders/OCO/Alerts — a single broadcast stream carrying user-facing feedback
for any action (order or alert create/modify/cancel). type is a render-color discriminator,
not a success/failure flag — a deliberate cancel/delete is "negative" too.
Required for every snackbar the SDK shows
This is the only channel that drives the SDK's own snackbar/notification UI — the single chart, Scalper, and Terminal screens all show feedback purely from this stream, for every action (place/modify/cancel an order or OCO, create/modify/delete an alert, adjust a position from the option chain). If the host never pushes to this stream, none of those screens will ever show a snackbar for anything — not an error, not a success — even when the underlying action succeeded or failed on the broker side. There's no fallback and no log for this: it's a silent, total loss of user-facing feedback across the whole SDK.
Stream<String> get actionFeedbackStreamer;Must be a broadcast stream — same requirement as ordersStreamer.
{ "type": "positive", "message": "Order placed successfully" }
{ "type": "negative", "message": "Insufficient margin" }| Field | Type | Accepted values |
|---|---|---|
type | String | required; "positive" or "negative" — a render-color discriminator, not a success/failure flag; a deliberate cancel/delete is "negative" too |
message | String | required; human-readable feedback text shown in the snackbar |