FYERS API V3 throwing 502 bad gateway when accessing from Azure

Hi Team,

I am using an Azure App Service for hosting my application which utilizes the FYERS API V3.
Since yesterday afternoon, trying to access any API is throwing 502 error. This is definitely an issue with API V3 because when I switch back to V2 everything is working fine.

I believe trying to access the URLs with “http://api-t1.fyers.in” is causing the issue.

Can you please check and update if any restrictions/changes have been done to the API.
This was working fine till yesterday afternoon.
I thought it was an issue with Azure, but calling other APIs(other than fyers) is working fine.

Please check and give an update as soon as possible.

Thanks.

Hi @anudeep_sai ,

Can you please share more details on this, are running it on locally or any servers also share which API you are calling.

Hi @ZppA1qLXjC
I’m running my application on Azure AppService. This is the response I am getting.
IST 16-11-2023 09:25:12 [13] INFO Http - The GetAsync HTTP call has started for URL - /data/quotes

IST 16-11-2023 09:25:12 [4] ERROR Http - The GetAsync HTTP call has failed for URL - /data/quotes

IST 16-11-2023 09:25:12 [4] ERROR Http - <html>

<head><title>502 Bad Gateway</title></head>

<body>

<center><h1>502 Bad Gateway</h1></center>

<hr><center>cloudflare</center>

</body>

</html>

Iam using the below APIs

“TOKEN_GENERATION”: "https://api-t1.fyers.in/api/v3/generate-authcode?client_id={0}&redirect_uri={1}&response_type=code&state=sample_state",

“ACTIVE_POSITIONS”: "https://api-t1.fyers.in/api/v3/positions",

“VALIDATE_AUTH_CODE”: "https://api-t1.fyers.in/api/v3/validate-authcode",

“MARKET_STATUS”: "https://api-t1.fyers.in/data/marketStatus",

“QUOTES”: "https://api-t1.fyers.in/data/quotes?symbols={0}",

“PROFILE”: "https://api-t1.fyers.in/api/v3/profile",

“MULTIORDERPLACEMENT”: "https://api-t1.fyers.in/api/v3/multi-order/sync",

“ORDERBOOK”: "https://api-t1.fyers.in/api/v3/orders",

“ORDERBYID”: "https://api-t1.fyers.in/api/v3/orders?id={0}",

“TRADEBOOK”: "https://api-t1.fyers.in/api/v3/tradebook"

Hi @ZppA1qLXjC

I am running the application on Azure AppService. The code deployed utitlizes the below endpoints for various activities.

“TOKEN_GENERATION”: "https://api-t1.fyers.in/api/v3/generate-authcode?client_id={0}&redirect_uri={1}&response_type=code&state=sample_state",

“ACTIVE_POSITIONS”: "https://api-t1.fyers.in/api/v3/positions",

“VALIDATE_AUTH_CODE”: "https://api-t1.fyers.in/api/v3/validate-authcode",

“MARKET_STATUS”: "https://api-t1.fyers.in/data/marketStatus",

“QUOTES”: "https://api-t1.fyers.in/data/quotes?symbols={0}",

“PROFILE”: "https://api-t1.fyers.in/api/v3/profile",

“MULTIORDERPLACEMENT”: "https://api-t1.fyers.in/api/v3/multi-order/sync",

“ORDERBOOK”: "https://api-t1.fyers.in/api/v3/orders",

“ORDERBYID”: "https://api-t1.fyers.in/api/v3/orders?id={0}",

“TRADEBOOK”: "https://api-t1.fyers.in/api/v3/tradebook"

The error occurring is given below. This is happening for all the endpoints mentioned above.

IST 16-11-2023 09:25:12 [13] INFO Http - The GetAsync HTTP call has started for URL - /data/quotes

IST 16-11-2023 09:25:12 [4] ERROR Http - The GetAsync HTTP call has failed for URL - /data/quotes

IST 16-11-2023 09:25:12 [4] ERROR Http - <html>

<head><title>502 Bad Gateway</title></head>

<body>

<center><h1>502 Bad Gateway</h1></center>

<hr><center>cloudflare</center>

</body>

</html>

Hi @ZppA1qLXjC
Are you able to see my response for your query ?
I don’t see that in the thread. I already posted twice but it is saying pending review.
I am attaching my response to this comment. Please check once.

FYERS-API-V3 Issue.pdf (74 KB)

Hi @anudeep_sai ,

Can you please share your Client Id and IP address in my DM

Hi @anudeep_sai
This issue is fixed.
Can you check once.