Hi Team,
I am using the Alpaca API for the first time and referring to the documentation on how to place bracket orders for options: Alpaca Documentation on Bracket Orders. I created the response body accordingly, but I am encountering an error stating “complex orders not supported for options trading.”
{
"symbol": "SPY240520C00530000",
"qty": "1",
"side": "buy",
"type": "limit",
"time_in_force": "day",
"limit_price": "0.67",
"order_class": "bracket",
"stop_loss": {
"stop_price": "0.47",
"limit_price": "0.46"
},
"take_profit": {
"limit_price": "0.88"
}
}
I have two questions regarding this issue:
- Could you please help me understand where I might be going wrong with my current approach?
- As an alternative, can I place two separate orders: first, buy a stock, and then add the stop and profit prices using OCO orders as mentioned in the documentation? I noticed this approach in the JavaScript code example at the bottom of the same documentation page. Could you please confirm if this method will work?
Thank you for your assistance.
Looping @Dan_Whitnable_Alpaca for response