Unable to place AMO order via API

We are unable to place AMO order via API. Please look into the matter. SS attached. @Ketan


Hello @Mayur_Pansheriya,

It appears that you placed this order around 4:05 PM today. Please note that After Market Orders (AMOs) are restricted for a specific duration after the market closes, typically ranging from 30 to 45 minutes.

You may check again now, as I was able to successfully place an order using the instrument you mentioned.

Could you confirm the exact timings? When it will start? As if we place order via App or Web at the same time we are able to place the same. @Pradeep_Jaiswar @Ketan

Hello @Mayur_Pansheriya,

You can place AMO orders for both NSE and BSE starting from 4:06 PM onwards

@Ketan But we can place AMO order via Mobile or Web on or after 4:05:05 PM. Then why we can’t place via API.
{
update_type: ‘order’,
user_id: ‘2B’,
userId: '2
B’,
exchange: ‘BSE’,
instrument_token: ‘BSE_EQ|INE098E01026’,
instrument_key: ‘BSE_EQ|INE098E01026’,
trading_symbol: ‘HARSHILAGR’,
tradingsymbol: ‘HARSHILAGR’,
product: ‘D’,
order_type: ‘MARKET’,
average_price: 0,
price: 0,
trigger_price: 0,
quantity: 15000,
disclosed_quantity: 0,
pending_quantity: 15000,
transaction_type: ‘SELL’,
order_ref_id: ‘UDAPI-I-LyhBoS5UTNSys3D7uVCUDqdG’,
exchange_order_id: ‘’,
parent_order_id: null,
validity: ‘DAY’,
status: ‘rejected’,
2****B variety: ‘SIMPLE’,
tag: ‘string’,
exchange_timestamp: null,
status_message: ‘You cannot place AMO orders currently.’,
order_id: ‘241209040122511’,
order_request_id: ‘1’,
order_timestamp: ‘2024-12-09 16:05:06’,
filled_quantity: 0,
guid: null,
placed_by: ‘2KC6RB’,
status_message_raw: ‘Admin stopped AMO’
}

@Mayur_Pansheriya, you can place AMO orders via API starting at 4:05:05 PM, the same as on the web or mobile platforms. I mentioned 4:06 PM earlier just to account for a slight buffer in case the processing takes a bit longer.

@Ketan Then why it’s getting rejected?

order_timestamp: ‘2024-12-09 16:05:06’

@Ketan waiting for your reply

The automated system enables and disables AMO (After Market Orders) within the order management system. This process is consistent across the app, API, or any other system attempting to place orders.

That said, the Upstox API is specifically configured and optimized to route your requests quickly to the order management system, ensuring faster execution since API orders are more time-sensitive.

In contrast, with the app, the process involves more network hops and multiple checks at different stages (in the case of api, checks are bundled together for faster execution). This is why you may notice a difference between when AMO is enabled and when it is disabled in seconds and milliseconds.

To ensure certainty, you can place your AMO order after 4:06 PM.

1 Like

@Pradeep_Jaiswar Now could you tell me 1) when market open @9:00 AM next day which order get fired from your OMS to the exchange, order placed at 4:06PM or 4:07PM considering both are market order?

  1. Suppose I have next day before market open (8:58 AM) I have modified the 4:07PM order to the limit order then priorities will be changed or not?

The AMO order placement occurs through an automated system triggered by the market open message from the exchange, following the FIFO (First In, First Out) principle.

If the order is modified later, its position in the queue remains unchanged.