placeOCOOrder method
- String params
override
Places an OCO (One Cancels Other) order with a stop-loss and target leg.
params JSON shape:
{
"side": "buy",
"productType": "normal",
"stopPrice": 22500.0,
"stopQty": 50,
"symID": "NIFTY",
"targetPrice": 23500.0,
"targetQty": 50,
"targetTriggerPrice": 23400.0,
"groupId": "OCO001"
}
productType is top-level, not nested per leg — both legs of one pair
always protect the same position.
groupId is optional — only required for modify flows.
Implementation
@override
void placeOCOOrder(String params) {
unawaited(_data.invokeMethod<void>('placeOCOOrder', params));
}