Order rejected as placed before 9:15 AM

Shaha
This one might sound funny at first, but i am trying to look for and fix all the exception cases in my code. And this one just came in the list.

Couple of my orders that i placed when datetime.datetime.now() on my system crossed 9:15 AM, got rejected for below reason:

order timestamp: 17-08-2017 09:14:59.
Exchange timestamp: 17-08-2017 09:14:59.

16387 : Security is not allowed to trade in this market

Reason is clear, they got fired bit earlier.

Actually, based on pre open market data, i need to place some orders at the market open price (as soon as the market opens after pre open session).

Is there a way, i can synchronize with the zerodha clock / exchange clock.
Or any alternative, (may be placing AMO order or something), to avoid this case.

I am trying to find a better alternative, than to rely on my system clock.

Any suggestions?
  • Vivek
    Vivek edited August 2017
    Our servers clock are synchronized with ntpd so its better if you synchronize your clock using ntpd to avoid this issue.
Sign In or Register to comment.