Error while extracting OHLC Quotes V3

I am getting the error with this API randomly, sometimes.
2025-12-01 09:23:00,068 - ERROR - Failed fetching market quote: HTTPSConnectionPool(host=‘api.upstox.com’, port=443): Max retries exceeded with url: /v3/market-quote/ohlc?instrument_key=NSE_INDEX%7CNifty+50&interval=I1 (Caused by NameResolutionError(“<urllib3.connection.HTTPSConnection object at 0x000001FF56444D10>: Failed to resolve ‘api.upstox.com’ ([Errno 11001] getaddrinfo failed)”))

Can Developer team have a look at the API.
I am calling it every 1 minute, hence i am sure that i am not exceeding quota

\

Hi @Sonu_51669323
The error you’re seeing is not coming from the Upstox API.
The message:

NameResolutionError: Failed to resolve 'api.upstox.com'

indicates a DNS resolution issue on your system or network, meaning your machine was temporarily unable to convert api.upstox.com into an IP address.

This can happen intermittently due to:

  • Temporary DNS failures from your local DNS resolver / ISP
  • Network instability on the client side
  • Firewall or proxy hiccups
  • Cloud/VPS instances switching DNS servers
  • Short-lived connectivity drops

Since your request is failing before reaching Upstox, it is not related to API rate limits or server-side issues.

Recommended checks on your side:

  • Switch to a more stable DNS provider (Cloudflare 1.1.1.1, Google DNS 8.8.8.8)
  • Ensure your network/firewall does not block outbound port 443
  • Add retry logic (exponential backoff) to handle temporary DNS failures
  • Verify AWS/Cloud hosting (if used) network health status

Thanks