NeoCharts
Trading

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.

FieldTypeAccepted values
symIDStringrequired; the symbol the order is for
pricedoublerequired; order price
orderTypeStringrequired; "market", "limit", "stopmarket", "stoploss" — lowercase, no separators. "stoplimit" is accepted as a legacy alias for "stoploss"; anything else silently falls back to "limit"
orderActionStringrequired; "buy" / "sell", case-insensitive
qtyintrequired; order quantity
productTypeStringrequired; "normal" or "intraday" — disambiguates which product type the order protects when a symbol has simultaneous positions under more than one
triggerPricedoubleoptional; 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
  }
]
FieldTypeAccepted values
orderIDStringrequired; unique order identifier
typeStringrequired; "market", "limit", "stopmarket", "stoploss" — same lowercase values as placeOrder's orderType
orderActionStringrequired; "buy" / "sell", case-insensitive
productTypeStringrequired; "normal" or "intraday" — disambiguates which product type this order belongs to
avgPricedoublerequired; average fill price
pricedoublerequired; the order's limit/stop price (separate field from avgPrice)
netQtyintrequired; order quantity
fillQtyintrequired; quantity filled so far
ordTimeStringrequired; "DD-MM-YYYY HH:mm:ss", 24-hour — not ISO-8601. Parsed with this exact separator layout; a different format will fail to parse
orderStatusStringrequired; "open", "completed", "rejected", "cancelled"
triggerPricedoublerequired; only meaningful for stop-type orders, 0 for market/limit
symbolobjectrequired; full symbolInfo shape
reasonString?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" }
FieldTypeAccepted values
typeStringrequired; "positive" or "negative" — a render-color discriminator, not a success/failure flag; a deliberate cancel/delete is "negative" too
messageStringrequired; human-readable feedback text shown in the snackbar

On this page