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.