ocoOrdersStreamer property
override
Stream of pending OCO trigger pairs — SL+TP legs not yet real orders. Make sure to stream before launching chart.
Once a leg fires, the broker reports it on ordersStreamer instead —
this stream only ever carries the pending, not-yet-fired form. Paired
only: every entry has both stopLoss and target populated.
productType is top-level, not nested per leg — both legs of one pair
always protect the same position.
JSON List of OCOOrder objects:
[
{
"groupId": "OCO001",
"symID": "NIFTY",
"name": "NIFTY 50",
"exchange": "NSE",
"side": "sell",
"productType": "normal",
"stopLoss": {
"type": "stopLoss",
"side": "sell",
"triggerPrice": 22500.0,
"qty": 50,
"price": 22490.0,
"fillQty": 0
},
"target": {
"type": "limit",
"side": "sell",
"triggerPrice": 23500.0,
"qty": 50,
"price": 23500.0,
"fillQty": 0
}
}
]
side: "buy", "sell"
productType: "normal", "intraday"
type (leg): "stopLoss", "limit"
Implementation
@override
Stream<String> get ocoOrdersStreamer =>
_ocoOrdersChannel.receiveBroadcastStream().cast<String>();