hummingbot / dashboard

Application that helps you create, backtest, deploy, and manage Hummingbot instances
Apache License 2.0
191 stars 127 forks source link

Config generator - Candles not availble for some pairs #166

Open nikspz opened 4 months ago

nikspz commented 4 months ago

Describe the bug

kucoin XDC-USDT returns binance candles error 🤔

kucoin XDC-USDT returns binance candles error

Backend-api logs:

2024-07-23 05:56:52,233 - hummingbot.data_feed.candles_feed.binance_perpetual_candles.binance_perpetual_candles - ERROR - Error fetching historical candles: Error executing request GET https://fapi.binance.com/fapi/v1/klines. HTTP status is 400. Error: {"code":-1121,"msg":"Invalid symbol."}
Traceback (most recent call last):
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/hummingbot/data_feed/candles_feed/candles_base.py", line 167, in get_historical_candles
    fetched_candles = await self.fetch_candles(end_time=current_end_time)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/hummingbot/data_feed/candles_feed/candles_base.py", line 217, in fetch_candles
    candles = await rest_assistant.execute_request(url=self.candles_url,
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
    response = await self.execute_request_and_get_response(
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/hummingbot/core/web_assistant/rest_assistant.py", line 100, in execute_request_and_get_response
    raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. "
OSError: Error executing request GET https://fapi.binance.com/fapi/v1/klines. HTTP status is 400. Error: {"code":-1121,"msg":"Invalid symbol."}
2024-07-23 05:56:52,234 - asyncio - ERROR - Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fac923674c0>
2024-07-23 05:56:52,234 - asyncio - ERROR - Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fac919bd420>, 54238.510678988)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fac92366890>
INFO:     172.24.0.2:42260 - "POST /historical-candles HTTP/1.1" 200 OK

Dashboard logs:

2024-07-23 06:01:12.891 Uncaught app exception
Traceback (most recent call last):
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 584, in _run_script
    exec(code, module.__dict__)
  File "/home/dashboard/frontend/pages/config/macd_bb_v1/app.py", line 30, in <module>
    candles = get_candles(connector_name=inputs["candles_connector"], trading_pair=inputs["candles_trading_pair"],
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/caching/cache_utils.py", line 168, in wrapper
    return cached_func(*args, **kwargs)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/caching/cache_utils.py", line 197, in __call__
    return self._get_or_create_cached_value(args, kwargs)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/caching/cache_utils.py", line 224, in _get_or_create_cached_value
    return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/caching/cache_utils.py", line 280, in _handle_cache_miss
    computed_value = self._info.func(*func_args, **func_kwargs)
  File "/home/dashboard/frontend/pages/config/utils.py", line 26, in get_candles
    df.index = pd.to_datetime(df.timestamp, unit='s')
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/pandas/core/generic.py", line 6299, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'timestamp'. Did you mean: 'to_timestamp'?

Another: BIFI-USDT candles localBIFI

Steps to reproduce bug

  1. clone deploy repo
  2. do bash setup_dev.sh
  3. check dashboard UI and change candles pair
Darrrren commented 4 months ago

Similar issue with BTC-FDUSD. If you use the menu to try and download the candles, it will fail with the same error. It will also fail if you try and build a PMM Dynamic strategy but interestingly enough, works fine with PMM Simple!

hidefsooner commented 2 months ago

Where is this in priority? I get the same error.