Delay in Order Placement - 7 seconds

shivdas_b
I am using multithreaded python code to punch orders. From yesterday I am getting delay while placing orders.
As I am using the same code and same system from last 4months. (I don't think there is something to do with system or network)[have HP | windows 10 | i7 | 8GB RAM | Network speed 8Mbps]

Its Approx. 7 seconds of delay from call of threaded function till order execution.
I have noted this is happening every time. Tried it several times.

2021-09-16 11:33:53,683 INFO [+] Placing order for NIFTY2191617500CE row_no => 4
2021-09-16 11:33:53,701 DEBUG Starting new HTTPS connection (1): api.kite.trade:443
2021-09-16 11:33:57,015 DEBUG Starting new HTTPS connection (1): api.kite.trade:443
2021-09-16 11:34:01,023 DEBUG https://api.kite.trade:443 "POST /orders/regular HTTP/1.1" 200 None
2021-09-16 11:34:01,025 INFO [+] Order Placed BUY NIFTY2191617500CE, NRML, LIMIT, quantity=50, price=45.5, trigger_price=0.0, id#210916003302465 > {'product': 'NRML', 'tradingsymbol': 'NIFTY2191617500CE', 'transaction_type': 'BUY', 'order_type': 'LIMIT', 'quantity': 50.0, 'price': 45.5, 'trigger_price': 0.0, 'order_status_cell': None, 'adj': -10.0, 'row_no': 4}

2021-09-16 11:34:27,349 INFO [+] Placing order for NIFTY2191617500CE row_no => 4
2021-09-16 11:34:27,355 DEBUG Starting new HTTPS connection (1): api.kite.trade:443
2021-09-16 11:34:27,597 DEBUG Starting new HTTPS connection (1): api.kite.trade:443
2021-09-16 11:34:34,649 DEBUG https://api.kite.trade:443 "POST /orders/regular HTTP/1.1" 200 None
2021-09-16 11:34:34,651 INFO [+] Order Placed BUY NIFTY2191617500CE, NRML, LIMIT, quantity=50, price=24.9, trigger_price=0.0, id#210916003310874 > {'product': 'NRML', 'tradingsymbol': 'NIFTY2191617500CE', 'transaction_type': 'BUY', 'order_type': 'LIMIT', 'quantity': 50.0, 'price': 24.9, 'trigger_price': 0.0, 'order_status_cell': None, 'adj': -30.0, 'row_no': 4}

  • rakeshr
    Actual APIs internally have a 3-second timeout, so 7 seconds indicates an external network issue. You should try changing your local system DNS and check. Go through this article to know the steps to change your local DNS.
  • shivdas_b
    thanks @rakeshr ,
    Its working fine now.. Seems having issue with DNS
This discussion has been closed.