Premarket orders are not working

Venkat123
Venkat123 edited July 2020 in General
Hi,

I have written a small placeorder code which places order.

Its working in market hours.But if run this at 9AM its not working .(If I manually place premarket order at 9AM on the same stock is working ,only thru Algo its failing )

Thru Algo, Its sending orders and getting rejected with below error

The instrument is either suspended from trading, or the order was placed outside of trading hours.


Whereas thru Algo, My orders are working well in market hours.

Then what is the correct way of placing orders in premarket with Algo, Please help
  • themohammedfaisal
    @Venkat123,
    Can you share the order parameters?
    Especially variety, validity, order type, and exchange?
  • sujith
    @Venkat123,
    Only limit and market orders are allowed in the pre-market session. What type of order did you place?
  • Venkat123
    Venkat123 edited July 2020
    @sujith @themohammedfaisal

    My code is below

    ord_id = kite.place_order(variety='regular', exchange='NSE', tradingsymbol='xyz',transaction_type='BUY', quantity='100', product='CNC',order_type='LIMIT', price='500', validity='DAY')
  • Venkat123
    Venkat123 edited July 2020
    What exactly is happening is below,

    One stock is daily hitting 5% UC, I want to buy it.
    So i'm placing a premarket order via python code.

    I kept my code in while loop and starting at 8:58 AM,

    Bcoz I want my order to be placed first.

    first few orders are failing then succeeding .

    When time is 9 AM. My orders are working, But my order is not getting filled.

    Any other best way ?
  • Venkat123
    My first order accepted is at 2020-07-27 09:00:26

    So, By that time so many orders are there and my order is never filled.


    Even-though I'm starting at 8:59:55 (5 seconds before the pre market opens), and doing infenatly

    All orders failed till time 2020-07-27 09:00:26


    So, How can place first oder
  • themohammedfaisal
    @Venkat123,

    The exchange will accept normal orders in the equity segment starting at 9.00 AM only. You can place an AMO before 8.57 AM to be able to send the order at 9 AM. The AMO will be validated and sent at 9 AM.
    Read more about the pre-market session here.
  • Venkat123
    @themohammedfaisal
    @sujith


    They are clearly saying, AMO orders can execute at any time its a bulk order.


    So I want to place in premarket. so, It can send it exactly 9.


    But the problem is, We can't relay on my computer time 9 AM.

    So, Starting at 8:59:55 AM (5 seconds before the pre market) and continuously sending orders

    So, First few should fail (with reason market is not yet opened), As on when time becomes 9 , The orders should get succeed .


    But the problem is, My first successful order time is 2020-07-27 09:00:26

    So, I'm 26 seconds delay,


    Now what I want to know is below

    1) what is the best way to place order exactly at 9 AM
    2) Why my order is executed at 09:00:26 instead of 9AM (Below info I got from console)




    Time Status Exch. time Exch. update Qty. Filled qty. Avg. price Price
    09:00:26 OPEN 09:00:26 09:00:26 100 0 0 492.85
    09:00:01 OPEN PENDING — — 100 0 0 492.85
    09:00:00 VALIDATION PENDING — — 100 0 0 492.85
    09:00:00 PUT ORDER REQ RECEIVED — — 100 0 0 492.85
Sign In or Register to comment.