I’m using a bracket order and quite frequently receive the following error:
take_profit.limit_price must be >= base_price + 0.01
How can I know what the base price is? It obviously depends on the market and is not something you can specify in a bracket order.
It seems sometimes my take_profit.limit_price is below the “expected fill price”. But I don’t want to set my limit_price and stop_price to arbitrarily huge values just to ensure they meet the requirements of whatever the base_price might be.
Can I query somehow to get the base_price? Or how do I overcome this error?
market_order_data = MarketOrderRequest(
symbol="SPY",
qty=10,
side=OrderSide.BUY,
time_in_force=TimeInForce.DAY,
order_class=OrderClass.BRACKET,
take_profit=TakeProfitRequest(limit_price=?),
stop_loss=StopLossRequest(stop_price=?)