binance.exceptions.BinanceAPIException: APIError(code=0): Service unavailable from a restricted location according to 'b. Eligibility' in https://www.binance.com/en/terms. Please contact customer service if you believe you received this message in error

Deployed my bot in heroku and sometimes bot crashes due to this error

binance.exceptions.BinanceAPIException: APIError(code=0): Service unavailable from a restricted location according to ‘b. Eligibility’ in https://www.binance.com/en/terms. Please contact customer service if you believe you received this message in error.
When i restart the bot it runs smoothly again.How can i solve this?

Got this error again today(27/11/2022),should i raise a ticket with customer support?

2 Likes

I have same issue too…
please dont block USA IPs…

3 Likes

Found the reason, i used ccxt.binanceUS all i had to do was remove US as i am not from US

Hi Vamsi, could you please clarify the root cause? I don’t use ccxt.binanceUS but meet the same error, very confused. BTW what do you mean ‘ccxt.binance’ ? Thank you.

I don’t use ccxt and I meet the same error recent days. I’m not a US resident but deploy my bot on the server located in California. The weird part is, that error never occurred in the past few months. It only shows up in the past few days, and each time it lasts no more than 30 min. 30 min later, evverything goes normal as usual.

@David ccxt is a external python library.

@David @Raymond Even i got the same error again, talked with few people in Telegram API Channel, 5 of them confirmed they are getting the same error between 12:00 UTC to 12:30 UTC, i can confirm the same.Bot is working fine after 12:30 UTC

@Vamsi_Krishna_Gannam Thanks for updating. For now, my temporary solution is to modify my bot to skip this error and retry a moment later, until it turns good :frowning:

@Raymond Yes for now, i am making it sleep for 30 minutes as it is working fine after 12:30 UTC

Today the error came up again. I tried to call API from 2 different IP at the same time with same API key, one located in California, another located in Asia country. The former one received the error, and the latter one worked fine. Tried 2 times got the same result. So the error is likely caused by IP location (IP from restricted location).

1 Like

Yes, its working fine from local environment (South Asian Region)

1 Like

Thanks @Vamsi_Krishna_Gannam and @Raymond, yes, I can confirm this is because US IP is blocked, as I have another server in Asia and working fine. But this is still ridiculous because sometimes it works fine and sometimes it pops the error.

1 Like

Can you share which endpoint returned this error? and what’s the base url of it? https://api.binance.com?

I am getting the same error, seems to be all futures endpoints
eg https://fapi.binance.com/fapi/v1/premiumIndex

1 Like

Yes, seems to be all futures endpoints

1 Like

fapi.binance.com/fapi/v1/income

@dino, could you please give some priority on this issue as the impact is broad and critical? Our tradings are all interrupted.

Thank you.

1 Like

I’ve been stressed out about this problem lately.
today, i changed aws server, us to singapore. ha ha ha T.T

1 Like

Anyone solved this error without changing ip location? Every region in US is now restricted?

2 Likes

Facing with the same issue, however I really wonder when this is announced as this is not a simple change that many users will be affected by such a restriction.

2 Likes