Limit Order executing immediately at market price

Hi Team,
When i am trying to place the Limit order at 25 with trigger price 24. It is executing immediately.
Could you please check and confirm what is the issue in the below data.

{‘quantity’: 15, ‘product’: ‘D’, ‘validity’: ‘DAY’, ‘price’: 25, ‘tag’: ‘’, ‘instrument_token’: ‘NSE_FO|56699’, ‘order_type’: ‘LIMIT’, ‘transaction_type’: ‘BUY’, ‘disclosed_quantity’: 0, ‘trigger_price’: 24.0, ‘is_amo’: False}
Order Execution Response:
[
true,
200,
{
“status”: “success”,
“data”: {
“order_id”: “240521025167784”
}
}
]

When i try to check the order status it is showing as status as below:

(True, 200, {‘status’: ‘success’, ‘data’: {‘exchange’: ‘NFO’, ‘product’: ‘D’, ‘price’: 25.0, ‘quantity’: 15, ‘status’: ‘cancelled after market order’, ‘guid’: None, ‘tag’: None, ‘instrument_token’: ‘NSE_FO|56699’, ‘placed_by’: ‘6PA9CT’, ‘tradingsymbol’: ‘BANKNIFTY24MAY51100CE’, ‘trading_symbol’: ‘BANKNIFTY24MAY51100CE’, ‘order_type’: ‘LIMIT’, ‘validity’: ‘DAY’, ‘trigger_price’: 0.0, ‘disclosed_quantity’: 0, ‘transaction_type’: ‘BUY’, ‘average_price’: 0.0, ‘filled_quantity’: 0, ‘pending_quantity’: 15, ‘status_message’: None, ‘status_message_raw’: None, ‘exchange_order_id’: ‘’, ‘parent_order_id’: None, ‘order_id’: ‘240520025014463’, ‘variety’: ‘SIMPLE’, ‘order_timestamp’: ‘2024-05-21 06:00:45’, ‘exchange_timestamp’: None, ‘is_amo’: False, ‘order_request_id’: ‘1’, ‘order_ref_id’: ‘6886080092353295482-6PA9CT-JAPIA’}})

Hi Team,
Could you please have a look into it?
It’s been not responded from last 2 days.

Thanks!!

Hi @bhargavireddy ,

Please do check the field description for trigger_price in the API documentation for place order request payload. [Place Order | Upstox Developer API]

As per the request payload that you shared, for order_type = LIMIT, price field was considered instead of trigger_price and at that time the LTP value seems to be 25. so it gets executed immediately.

Regarding the order status response, it is correct because there was a separate API call for order cancellation that you triggered before market open, check the order_timestamp for the request time and status: cancelled after market order confirms that too.

Do let us know if it helps, Thanks!

1 Like