-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to insert a new ERC20 token and getting error #28
Comments
It seems like the issue is occurring due to a restriction imposed by Binance. The traceback indicates that the API request made to Binance's service is being blocked because it's coming from a restricted location. |
If token, you must check this code
|
What must we check in that code? |
This is correct. Binance is region locked in many parts of the world. I fixed this by adding additional data sources, and adjust the call logic to ensure data if not call other data source. it's a bit slower initially, but once running no issues. |
Traceback (most recent call last):
File "manage.py", line 16, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.8/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.8/site-packages/django/core/management/init.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/app/cryptocoins/management/commands/add_token.py", line 162, in handle
is_price_external = binance_data_source.is_pair_exists(pair_to_usdt) or kucoin_data_source.is_pair_exists(
File "/app/cryptocoins/data_sources/crypto.py", line 37, in is_pair_exists
binance_client = BinanceClient()
File "/usr/local/lib/python3.8/site-packages/binance/client.py", line 300, in init
self.ping()
File "/usr/local/lib/python3.8/site-packages/binance/client.py", line 526, in ping
return self._get('ping', version=self.PRIVATE_API_VERSION)
File "/usr/local/lib/python3.8/site-packages/binance/client.py", line 371, in _get
return self._request_api('get', path, signed, version, **kwargs)
File "/usr/local/lib/python3.8/site-packages/binance/client.py", line 334, in _request_api
return self._request(method, uri, signed, **kwargs)
File "/usr/local/lib/python3.8/site-packages/binance/client.py", line 315, in _request
return self._handle_response(self.response)
File "/usr/local/lib/python3.8/site-packages/binance/client.py", line 324, in _handle_response
raise BinanceAPIException(response, response.status_code, response.text)
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.
The text was updated successfully, but these errors were encountered: