problem
In ECS, I chose to install freqtrade directly (including installing C++ dependencies first) due to docker installation failures, set up the proxy(VPN,global-japan), and then tried to download the data:
ccxt.base.errors.ExchangeNotAvailable: binance GET https://api.binance.com/api/v3/exchangeInfo
2024-06-11 17:17:12,810 - freqtrade - ERROR - Markets were not loaded.
C:\Users\Administrator\freqtrade\ft_userdata>freqtrade download-data --config user_data/config.json --exchange binance --timerange 20200101- -t 5m 15m 30m 1h
2024-06-11 17:14:47,713 - freqtrade - INFO - freqtrade 2024.6-dev-0d6109211
2024-06-11 17:14:47,713 - freqtrade.configuration.load_config - INFO - Using config: user_data/config.json ...
2024-06-11 17:14:47,713 - freqtrade.loggers - INFO - Verbosity set to 0
2024-06-11 17:14:47,713 - freqtrade.configuration.configuration - INFO - Parameter --timerange detected: 20200101- ...
2024-06-11 17:14:47,713 - freqtrade.configuration.configuration - INFO - Using exchange binance
2024-06-11 17:14:47,713 - freqtrade.configuration.configuration - INFO - Using user-data directory: C:\Users\Administrator\freqtrade\ft_userdata\user_data ...
2024-06-11 17:14:47,713 - freqtrade.configuration.configuration - INFO - Using data directory: C:\Users\Administrator\freqtrade\ft_userdata\user_data\data\binance ...
2024-06-11 17:14:47,713 - freqtrade.configuration.configuration - INFO - timeframes --timeframes: ['5m', '15m', '30m', '1h']
2024-06-11 17:14:47,713 - freqtrade.configuration.configuration - INFO - Filter trades by timerange: 20200101-
2024-06-11 17:14:47,728 - freqtrade.exchange.check_exchange - INFO - Checking exchange...
2024-06-11 17:14:47,745 - freqtrade.exchange.check_exchange - INFO - Exchange "binance" is officially supported by the Freqtrade development team.
2024-06-11 17:14:47,745 - freqtrade.configuration.configuration - INFO - Using pairlist from configuration.
2024-06-11 17:14:47,745 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
2024-06-11 17:14:47,745 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled
2024-06-11 17:14:47,745 - freqtrade.exchange.exchange - INFO - Using CCXT 4.3.38
2024-06-11 17:14:47,745 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}, 'timeout': 30000}
2024-06-11 17:14:47,760 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}, 'timeout': 30000}
2024-06-11 17:14:47,776 - freqtrade.exchange.exchange - INFO - Using Exchange "Binance"
2024-06-11 17:14:47,776 - freqtrade.resolvers.exchange_resolver - INFO - Using resolved exchange 'Binance'...
2024-06-11 17:14:47,776 - freqtrade.exchange.exchange - INFO - Markets were not loaded. Loading them now..
2024-06-11 17:15:09,153 - freqtrade.exchange.exchange - ERROR - Could not load markets.
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\connector.py", line 1025, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1122, in create_connection
raise exceptions[0]
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1104, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1007, in _connect_sock
await self.sock_connect(sock, address)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\asyncio\proactor_events.py", line 729, in sock_connect
return await self._proactor.connect(sock, address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\asyncio\windows_events.py", line 803, in _poll
value = callback(transferred, key, ov)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\asyncio\windows_events.py", line 599, in finish_connect
ov.getresult()
OSError: [WinError 121] 信号灯超时时间已到
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\ccxt\async_support\base\exchange.py", line 199, in fetch
async with session_method(yarl.URL(url, encoded=True),
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\client.py", line 1197, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\client.py", line 581, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\connector.py", line 544, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\connector.py", line 944, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\connector.py", line 1257, in _create_direct_connection
raise last_exc
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\connector.py", line 1226, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\connector.py", line 1033, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.binance.com:443 ssl:default [信号灯超时时间已到]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Administrator\freqtrade\freqtrade\exchange\exchange.py", line 562, in reload_markets
self._markets = self._load_async_markets(reload=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\freqtrade\freqtrade\exchange\exchange.py", line 535, in _load_async_markets
markets = self.loop.run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\ccxt\async_support\base\exchange.py", line 276, in load_markets
raise e
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\ccxt\async_support\base\exchange.py", line 272, in load_markets
result = await self.markets_loading
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\ccxt\async_support\base\exchange.py", line 262, in load_markets_helper
markets = await self.fetch_markets(params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\ccxt\async_support\binance.py", line 2832, in fetch_markets
promises = await asyncio.gather(*promisesRaw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\ccxt\async_support\binance.py", line 10334, in request
response = await self.fetch2(path, api, method, params, headers, body, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\ccxt\async_support\base\exchange.py", line 829, in fetch2
return await self.fetch(request['url'], request['method'], request['headers'], request['body'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\ccxt\async_support\base\exchange.py", line 237, in fetch
raise ExchangeNotAvailable(details) from e
ccxt.base.errors.ExchangeNotAvailable: binance GET https://api.binance.com/api/v3/exchangeInfo
2024-06-11 17:17:12,810 - freqtrade - ERROR - Markets were not loaded.
when i try curl:
C:\Users\Administrator\freqtrade\ft_userdata>curl https://api.binance.com/api/v3/exchangeInfo
curl: (28) Failed to connect to api.binance.com port 443 after 21055 ms: Couldn't connect to server
and i see #18799 but it didn`t help.So I guess the problem may be with the proxy, but I looked through the issues of ccxt and freqtrade and tried to set up the proxy, but it still failed.
ubuntu(in docker)
freqtrade | raise NetworkError(details) from e
freqtrade | ccxt.base.errors.NetworkError: binance GET https://api.binance.com/api/v3/exchangeInfo
freqtrade | 2024-06-09 13:49:55,045 - freqtrade - ERROR - Could not load markets, therefore cannot start. Please investigate the above error for more details.
Operating System
windows and ububtu
Programming Languages
Python
CCXT Version
4.3.38
Description
problem In ECS, I chose to install freqtrade directly (including installing C++ dependencies first) due to docker installation failures, set up the proxy(VPN,global-japan), and then tried to download the data: ccxt.base.errors.ExchangeNotAvailable: binance GET https://api.binance.com/api/v3/exchangeInfo 2024-06-11 17:17:12,810 - freqtrade - ERROR - Markets were not loaded.
when i try curl:
then i try :
and i get the transaction data.
and i see #18799 but it didn`t help.So I guess the problem may be with the proxy, but I looked through the issues of ccxt and freqtrade and tried to set up the proxy, but it still failed.
ubuntu(in docker)
Code
config.json