Open mw66 opened 2 years ago
There is a placeholder for contingent orders in the API but doesn't seem to work. Tried the following with no luck.
{
"PreviewOrderRequest": {
"orderType": "OPTN",
"clientOrderId": "20220106-TSLACBO42",
"Order": [
{
"allOrNone": "false",
"priceType": "LIMIT",
"limitPrice": "0.01",
"orderTerm": "GOOD_FOR_DAY",
"marketSession": "REGULAR",
"conditionSymbol": "TSLA",
"conditionType": "CONTINGENT_LTE",
"conditionFollowPrice": "LAST",
"conditionPrice": "980",
"Instrument": [
{
"Product": {
"symbol": "TSLA",
"securityType": "OPTN",
"callPut": "CALL",
"expiryYear": "2022",
"expiryMonth": "01",
"expiryDay": "07",
"strikePrice": "1100"
},
"orderAction": "BUY_OPEN",
"orderedQuantity": "1",
"quantity": "1"
}
]
}
]
}
}
{
"Error": {
"code": 9999,
"message": "Please validate the input and try again"
}
}
Hi,
I'm reading this doc:
https://apisb.etrade.com/docs/api/order/api-order-v1.html#/definitions/OrderDetail
And found it's confusing: on one hand, the doc listed all the fields needed by the contingent orders, on the other hand, it also says: it's not supported.
So I am wondering if it's actually supported?
Has anyone tried to place contingent orders using API before? What's your experience?
Thanks!