Is my IP blocked?

sriquant
Hi, While connecting to API, Code is raising the below exception

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /orders/regular (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

I tried to connect from different computer, Connection is establishing without any exception. So, I am wondering if my IP is blocked for any reason at your end ?
  • sujith
    We haven't blocked any IPs. You may have to add some delay and then retry if you get timeout exception.
  • sriquant
    I have added delay too like below code. But it's taking too much time(2-3 minutes) to get the response.

    I disconnected my broadband and connected to my mobile hotspot and tried the same, Things are working fine and I am getting the response in 1-2 seconds. What might be the issue?

    while True:
    try:
    stock_instrument_token = kite.ohlc(NSE_Stock)[NSE_Stock]["instrument_token"]

    except (ReadTimeout, SSLError) as error:
    print(error)
    time.sleep(3)
    continue

    break
Sign In or Register to comment.