Coder Social home page Coder Social logo

deploy's Introduction

Hummingbot


License Twitter Youtube Discord

Hummingbot is an open source framework that helps you build automated trading strategies, or bots that run on cryptocurrency exchanges.

This code is free and publicly available under the Apache 2.0 open source license!

Why Hummingbot?

  • Both CEX and DEX connectors: Hummingbot supports connectors to centralized exchanges like Binance and KuCoin, as well as decentralized exchanges like Uniswap and PancakeSwap on various blockchains (Ethereum, BNB Chain, etc).
  • Cutting edge strategy framework: Our new V2 Strategies framework allows you to compose powerful, backtestable, multi-venue, multi-timeframe stategies of any type
  • Secure local client: Hummingbot is a local client software that you install and run on your own devices or cloud virtual machines. It encrypts your API keys and private keys and never exposes them to any third parties.
  • Community focus: Hummingbot is driven by a global community of quant traders and developers who maintain the connectors and contribute strategies to the codebase.

Help us democratize high-frequency trading and make powerful trading algorithms accessible to everyone in the world!

Quick Links

  • Website and Docs: Official Hummingbot website and documentation
  • Installation: Install Hummingbot on various platforms
  • FAQs: Answers to all your burning questions
  • Botcamp: Learn how build your own custom HFT strategy in Hummingbot with our hands-on bootcamp!
  • Newsletter: Get our monthly newletter whenever we ship a new release
  • Discord: The main gathering spot for the global Hummingbot community
  • YouTube: Videos that teach you how to get the most of of Hummingbot
  • Twitter: Get the latest announcements about Hummingbot
  • Snapshot: Participate in monthly polls that decide which components should be prioritized

Getting Started

Install with Docker

We recommend installing Hummingbot using Docker if you want the simplest, easiest installation method and don't need to modify the Hummingbot codebase.

Prerequisites:

  • MacOS 10.12.6+ / Linux (Ubuntu 20.04+, Debian 10+) / Windows 10+
  • Memory: 4 GB RAM per instance
  • Storage: 5 GB HDD space per instance
  • Install Docker Compose
git clone https://github.com/hummingbot/hummingbot
cd hummingbot
docker compose up -d
docker attach hummingbot

Install from Source

We recommend installing Hummingbot from source if you want to customize or extend the Hummingbot codebase, build new components like connectors or strategies, and/or learn how Hummingbot works at a deeper, technical level.

Prerequisites:

  • MacOS 10.12.6+ / Linux (Ubuntu 20.04+, Debian 10+)
  • Memory: 4 GB RAM per instance
  • Storage: 3 GB HDD space per instance
  • Install Anaconda or Miniconda
git clone https://github.com/hummingbot/hummingbot
cd hummingbot
./install
conda activate hummingbot
./compile
./start

See Installation for detailed guides for each OS.

Architecture

Hummingbot architecture features modular components that can be maintained and extended by individual community members.

Strategies and Scripts

A Hummingbot strategy is an ongoing process that executes an algorithmic trading strategy. It is constructed as a user-defined program that uses an underlying framework to abstracts low-level operations:

V2 Strategies: The latest and most advanced way to create strategies in Hummingbot, V2 strategies are built using composable elements known as Controllers and PositionExecutors. These elements can be mixed and matched, offering a modular approach to strategy creation and making the development process faster and more efficient.

Scripts: For those who are looking for a lightweight solution, Hummingbot provides scripting support. These are single-file strategies that are quick to implement and can be an excellent starting point for those new to algorithmic trading. Check out the /scripts folder for all Script examples included in the codebase.

V1 Strategies: Templatized programs templates for various algorithmic trading strategies that expose a set of user-defined parameters, allowing you to customize the strategy's behavior. While these V1 strategies were Hummingbot's original method of defining strategies and have been superceded by V2 Strategies and Scripts, the strategies below are still often used:

Connectors

Hummingbot connectors standardize trading logic and order types across different types of exchanges and blockchain networks. Each connector's code is contained in modularized folders in the Hummingbot and/or Gateway codebases.

Currently, the Hummingbot codebase contains 50+ connectors of the following types:

  • CEX: Centralized exchanges take custody of user assets, i.e. Binance, Kucoin, etc.
  • DEX: Decentralized exchanges are platforms in which user assets are stored non-custodially in smart contracts, i.e. dYdX, Uniswap, etc.
  • Chain: Layer 1 blockchain ecosystems such as Ethereum, BNB Chain, Avalanche, etc.

Each exchange has one or more connectors in the Hummingbot codebase that supports a specific market type that the exchange supports:

  • spot: Connectors to central limit order book (CLOB) exchanges that trade spot markets
  • perp: Connectors to central limit order book (CLOB) exchanges that trade perpetual swap markets
  • amm: Connectors to decentralized exchanges that use the Automatic Market Maker (AMM) methodology

Quarterly Polls allow HBOT holders decide how maintenance bandwidth and development bounties are allocated toward the connectors in the codebase.

Sponsors & Partners

The Hummingbot Foundation, supported by its sponsors, partners and backers, is dedicated to fostering a robust, community-driven ecosystem for algorithmic crypto trading.

Sponsors

Exchange Partners

For more information about the support provided by these partners, see the financial reports provided in HBOT Tracker.

Other Hummingbot Repos

  • Dashboard: Community pages that help you create, backtest, deploy, and manage Hummingbot instances
  • Gateway: API middleware for DEX connectors
  • Deploy Examples: Deploy Hummingbot in various configurations with Docker
  • Hummingbot Site: Official documentation for Hummingbot - we welcome contributions here too!
  • Awesome Hummingbot: All the Hummingbot links
  • Brokers: Different brokers that can be used to communicate with multiple instances of Hummingbot

Contributions

Hummingbot belongs to its community, so we welcome contributions! Please review these guidelines first.

To have your exchange connector or other pull request merged into the codebase, please submit a New Connector Proposal or Pull Request Proposal, following these guidelines. Note that you will need some amount of HBOT tokens in your Ethereum wallet to submit a proposal.

Legal

deploy's People

Contributors

cardosofede avatar david-hummingbot avatar fengtality avatar klpanagi avatar nikspz avatar rapcmia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

deploy's Issues

log errors

Hello i get this error message every time i start hummingBot from the terminal

`2023-07-14 11:45:02,441 - 1 - hummingbot.connector.exchange.kraken.kraken_exchange - WARNING - The Kraken API does not allow enough bandwidth for a reduced rate-limit share percentage. Current percentage: 50.0.
2023-07-14 11:45:03,478 - 1 - hummingbot.connector.time_synchronizer - NETWORK - Error getting server time.
Traceback (most recent call last):
File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 65, in update_server_time_offset_with_time_provider
server_time_ms: float = await time_provider
File "/home/hummingbot/hummingbot/connector/exchange/binance/binance_web_utils.py", line 69, in get_current_server_time
response = await rest_assistant.execute_request(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 75, in execute_request
raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. "
OSError: Error executing request GET https://api.binance.us/api/v3/time. HTTP status is 403. Error:

<TITLE>ERROR: The request could not be satisfied</TITLE>

403 ERROR

The request could not be satisfied.


The Amazon CloudFront distribution is configured to block access from your country. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: oQAbPJHBHUvxMTvKNmBnL-FILgj26zILR1tToXWNz3utxgIuh4o03Q==
2023-07-14 11:45:03,481 - 1 - hummingbot.connector.time_synchronizer - WARNING - Could not refresh server time. Check network connection. 2023-07-14 11:45:03,807 - 1 - hummingbot.connector.exchange.binance.binance_exchange.BinanceExchange - ERROR - There was an error requesting exchange info. Traceback (most recent call last): File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 1092, in _initialize_trading_pair_symbol_map exchange_info = await self._make_trading_pairs_request() File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 1105, in _make_trading_pairs_request exchange_info = await self._api_get(path_url=self.trading_pairs_request_path) File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 896, in _api_get return await self._api_request(*args, **kwargs) File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 938, in _api_request request_result = await rest_assistant.execute_request( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 75, in execute_request raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. " OSError: Error executing request GET https://api.binance.us/api/v3/exchangeInfo. HTTP status is 403. Error: <TITLE>ERROR: The request could not be satisfied</TITLE>

403 ERROR

The request could not be satisfied.


The Amazon CloudFront distribution is configured to block access from your country. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: h2M4yjeYd4lbQFsg6fsRXi-vsPI22kbt4V25gpBxCPAWjpm3PLyv7A==
2023-07-14 11:45:12,740 - 1 - hummingbot.core.utils.trading_pair_fetcher - ERROR - Connector k2 failed to retrieve its trading pairs. Trading pairs autocompletion won't work. Traceback (most recent call last): File "/home/hummingbot/hummingbot/core/utils/trading_pair_fetcher.py", line 64, in call_fetch_pairs pairs = await fetch_fn File "/home/hummingbot/hummingbot/connector/exchange/k2/k2_exchange.py", line 867, in all_trading_pairs return await K2APIOrderBookDataSource.fetch_trading_pairs() File "/home/hummingbot/hummingbot/connector/exchange/k2/k2_api_order_book_data_source.py", line 62, in fetch_trading_pairs async with client.get(f"{constants.REST_URL}{constants.GET_TRADING_PAIRS}", File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/site-packages/aiohttp/client.py", line 1117, in __aenter__ self._resp = await self._coro File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/site-packages/aiohttp/client.py", line 619, in _request break File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/site-packages/aiohttp/helpers.py", line 656, in __exit__ raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError 2023-07-14 11:53:35,919 - 1 - hummingbot.connector.exchange.kraken.kraken_exchange - WARNING - The Kraken API does not allow enough bandwidth for a reduced rate-limit share percentage. Current percentage: 50.0. 2023-07-14 11:53:37,106 - 1 - hummingbot.connector.time_synchronizer - NETWORK - Error getting server time. Traceback (most recent call last): File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 65, in update_server_time_offset_with_time_provider server_time_ms: float = await time_provider File "/home/hummingbot/hummingbot/connector/exchange/binance/binance_web_utils.py", line 69, in get_current_server_time response = await rest_assistant.execute_request( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 75, in execute_request raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. " OSError: Error executing request GET https://api.binance.us/api/v3/time. HTTP status is 403. Error: <TITLE>ERROR: The request could not be satisfied</TITLE>

403 ERROR

The request could not be satisfied.


The Amazon CloudFront distribution is configured to block access from your country. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: _vnLx378MRrEeGhznQtQh9MNZhScLdohUxQFYLnOEkLHxEBRLVon3w==
2023-07-14 11:53:37,111 - 1 - hummingbot.connector.time_synchronizer - WARNING - Could not refresh server time. Check network connection. 2023-07-14 11:53:37,362 - 1 - hummingbot.connector.exchange.binance.binance_exchange.BinanceExchange - ERROR - There was an error requesting exchange info. Traceback (most recent call last): File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 1092, in _initialize_trading_pair_symbol_map exchange_info = await self._make_trading_pairs_request() File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 1105, in _make_trading_pairs_request exchange_info = await self._api_get(path_url=self.trading_pairs_request_path) File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 896, in _api_get return await self._api_request(*args, **kwargs) File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 938, in _api_request request_result = await rest_assistant.execute_request( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 75, in execute_request raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. " OSError: Error executing request GET https://api.binance.us/api/v3/exchangeInfo. HTTP status is 403. Error: <TITLE>ERROR: The request could not be satisfied</TITLE>

403 ERROR

The request could not be satisfied.


The Amazon CloudFront distribution is configured to block access from your country. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: 6fcabznh5eXQrZ-nTZK-EA88i-wImF-aVdQxWxpVqHvwtCpno-jHDw==
2023-07-14 11:53:46,732 - 1 - hummingbot.core.utils.trading_pair_fetcher - ERROR - Connector k2 failed to retrieve its trading pairs. Trading pairs autocompletion won't work. Traceback (most recent call last): File "/home/hummingbot/hummingbot/core/utils/trading_pair_fetcher.py", line 64, in call_fetch_pairs pairs = await fetch_fn File "/home/hummingbot/hummingbot/connector/exchange/k2/k2_exchange.py", line 867, in all_trading_pairs return await K2APIOrderBookDataSource.fetch_trading_pairs() File "/home/hummingbot/hummingbot/connector/exchange/k2/k2_api_order_book_data_source.py", line 62, in fetch_trading_pairs async with client.get(f"{constants.REST_URL}{constants.GET_TRADING_PAIRS}", File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/site-packages/aiohttp/client.py", line 1117, in __aenter__ self._resp = await self._coro File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/site-packages/aiohttp/client.py", line 619, in _request break File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/site-packages/aiohttp/helpers.py", line 656, in __exit__ raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError 2023-07-14 12:04:18,436 - 1 - hummingbot.connector.exchange.kraken.kraken_exchange - WARNING - The Kraken API does not allow enough bandwidth for a reduced rate-limit share percentage. Current percentage: 50.0. 2023-07-14 12:04:19,408 - 1 - hummingbot.connector.time_synchronizer - NETWORK - Error getting server time. Traceback (most recent call last): File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 65, in update_server_time_offset_with_time_provider server_time_ms: float = await time_provider File "/home/hummingbot/hummingbot/connector/exchange/binance/binance_web_utils.py", line 69, in get_current_server_time response = await rest_assistant.execute_request( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 75, in execute_request raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. " OSError: Error executing request GET https://api.binance.us/api/v3/time. HTTP status is 403. Error: <TITLE>ERROR: The request could not be satisfied</TITLE>

403 ERROR

The request could not be satisfied.


The Amazon CloudFront distribution is configured to block access from your country. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: ivR4rK6jL2Yl-5vhw0Cq3uPx36F2Stl95NguXIUvJVjn4jhB5anQdQ==
2023-07-14 12:04:19,410 - 1 - hummingbot.connector.time_synchronizer - WARNING - Could not refresh server time. Check network connection. 2023-07-14 12:04:19,653 - 1 - hummingbot.connector.exchange.binance.binance_exchange.BinanceExchange - ERROR - There was an error requesting exchange info. Traceback (most recent call last): File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 1092, in _initialize_trading_pair_symbol_map exchange_info = await self._make_trading_pairs_request() File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 1105, in _make_trading_pairs_request exchange_info = await self._api_get(path_url=self.trading_pairs_request_path) File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 896, in _api_get return await self._api_request(*args, **kwargs) File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 938, in _api_request request_result = await rest_assistant.execute_request( File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 75, in execute_request raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. " OSError: Error executing request GET https://api.binance.us/api/v3/exchangeInfo. HTTP status is 403. Error: <TITLE>ERROR: The request could not be satisfied</TITLE>

403 ERROR

The request could not be satisfied.


The Amazon CloudFront distribution is configured to block access from your country. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: M55f_-gpwT5vZvq0hOYRNmGvx5bag5KzMrq05_xEYATLWkqFfdwLcQ==
2023-07-14 12:04:28,763 - 1 - hummingbot.core.utils.trading_pair_fetcher - ERROR - Connector k2 failed to retrieve its trading pairs. Trading pairs autocompletion won't work. Traceback (most recent call last): File "/home/hummingbot/hummingbot/core/utils/trading_pair_fetcher.py", line 64, in call_fetch_pairs pairs = await fetch_fn File "/home/hummingbot/hummingbot/connector/exchange/k2/k2_exchange.py", line 867, in all_trading_pairs return await K2APIOrderBookDataSource.fetch_trading_pairs() File "/home/hummingbot/hummingbot/connector/exchange/k2/k2_api_order_book_data_source.py", line 62, in fetch_trading_pairs async with client.get(f"{constants.REST_URL}{constants.GET_TRADING_PAIRS}", File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/site-packages/aiohttp/client.py", line 1117, in __aenter__ self._resp = await self._coro File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/site-packages/aiohttp/client.py", line 619, in _request break File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/site-packages/aiohttp/helpers.py", line 656, in __exit__ raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError `

json: cannot unmarshal number ERROR

https://github.com/hummingbot/deploy-examples/tree/main/hummingbot_gateway_compose.yml

When running "docker-compose up -d", I got the following error:

"json: cannot unmarshal number into Go struct field LogConfig.HostConfig.LogConfig.Config of type string"

The FIX for this issue is to change the 'logging: max-file: 5' to use a "5" with the quotes

logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5 --> "5"

I didn't check all the other deploy-examples docker-compose.yml files, but if using a number without the "", it will generate same error

autostart_hummingbot_compose fails - No such file or directory... .password_verification

Environment

  • Ubuntu 20.04
  • Hummingbot deploy_examples (latest)

Summary
autostart_hummingbot_compose fails. Container exits after 10 seconds. Errors on docker attach, "FileNotFoundError: [Errno 2] No such file or directory: '/home/hummingbot/conf/.password_verification'"

Steps to reproduce

  • Follow autostart_hummingbot_compose
  • Copy the docker-compose.yml to a new directory. Edit it with password and strategy.
  • Copy the conf_pure_mm_SSWP-USDT.yml strategy to the same directory
  • Run docker compose up -d
  • Observe, โœ” Container hummingbot-okx-sswp Started
  • docker ps shows container stopped after about 10 seconds
  • Run sudo chmod -R a+rw ./hummingbot_files
  • Run docker attach hummingbot-okx-sswp. Returns, "You cannot attach to a stopped container, start it first"
  • Run docker start hummingbot-okx-sswp
  • Run docker attach hummingbot-okx-sswp, or docker logs hummingbot-okx-sswp. Returns errors below

Errors

Traceback (most recent call last):
  File "./bin/hummingbot_quickstart.py", line 155, in <module>
    main()
  File "./bin/hummingbot_quickstart.py", line 151, in main
    asyncio.get_event_loop().run_until_complete(quick_start(args, secrets_manager))
  File "/opt/conda/envs/hummingbot/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "./bin/hummingbot_quickstart.py", line 81, in quick_start
    if not Security.login(secrets_manager):
  File "/home/hummingbot/hummingbot/client/config/security.py", line 42, in login
    if not validate_password(secrets_manager):
  File "/home/hummingbot/hummingbot/client/config/config_crypt.py", line 72, in validate_password
    with open(PASSWORD_VERIFICATION_PATH, "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/hummingbot/conf/.password_verification'

docker-compose.yml

version: "3.9"
services:
  hummingbot:
    container_name: hummingbot-okx-sswp
    image: hummingbot/hummingbot:latest
    volumes:
      - "./hummingbot_files/conf:/home/hummingbot/conf"
      - "./hummingbot_files/conf/connectors:/home/hummingbot/conf/connectors"
      - "./hummingbot_files/conf/strategies:/home/hummingbot/conf/strategies"
      - "./hummingbot_files/logs:/home/hummingbot/logs"
      - "./hummingbot_files/data:/home/hummingbot/data"
      - "./hummingbot_files/scripts:/home/hummingbot/scripts"
      - "./hummingbot_files/certs:/home/hummingbot/certs"
    environment:
      - CONFIG_PASSWORD=aaa
      - CONFIG_FILE_NAME=conf_pure_mm_SSWP-USDT.yml
    logging:
      driver: "json-file"
      options:
          max-size: "10m"
          max-file: "5"
    tty: true
    stdin_open: true
    network_mode: host

Backtesting - ValueError: Out of range float values are not JSON compliant

Describe the bug

When running backtesting for kucoin with 3 order levels on a total amount of 70usdt, im getting an error of Expecting value: line 1 column 1 (char 0). I tried to increase the total amount but getting same error

image

Check the backend-api logs found:

INFO:     192.168.0.2:34744 - "GET /is-docker-running HTTP/1.1" 200 OK
INFO:     192.168.0.2:34750 - "GET /all-controller-configs HTTP/1.1" 200 OK
/opt/conda/envs/backend-api/lib/python3.10/site-packages/hummingbot/strategy_v2/backtesting/backtesting_engine_base.py:279: RuntimeWarning: divide by zero encountered in scalar divide
  sharpe_ratio = returns.mean() / returns.std() if len(returns) > 1 else 0
INFO:     192.168.0.2:34760 - "POST /run-backtesting HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 396, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/fastapi/routing.py", line 307, in app
    response = actual_response_class(content, **response_args)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/responses.py", line 184, in __init__
    super().__init__(content, status_code, headers, media_type, background)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/responses.py", line 41, in __init__
    self.body = self.render(content)
  File "/opt/conda/envs/backend-api/lib/python3.10/site-packages/starlette/responses.py", line 187, in render
    return json.dumps(
  File "/opt/conda/envs/backend-api/lib/python3.10/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/opt/conda/envs/backend-api/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/opt/conda/envs/backend-api/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
ValueError: Out of range float values are not JSON compliant
2024-06-25 12:24:54,084 - apscheduler.executors.default - WARNING - Run time of job "update_active_bots (trigger: interval[0:00:10], next run at: 2024-06-25 12:25:02 UTC)" was missed by 0:00:01.109299
INFO:     192.168.0.2:42104 - "GET /is-docker-running HTTP/1.1" 200 OK
INFO:     192.168.0.2:42106 - "GET /all-controller-configs HTTP/1.1" 200 OK

Steps to reproduce bug

  1. Clone https://github.com/hummingbot/deploy and run bash setup.sh to setup
  2. Once setup is complete, open the deploy directory and go to bots/conf/controllers
  3. Create a .yml file and paste the config below.( This was created from dashboard )
    buy_amounts_pct:
    - 0.16666666666666666
    - 0.16666666666666666
    - 0.16666666666666666
    buy_spreads:
    - 0.01
    - 0.015
    - 0.02
    candles_config: []
    connector_name: kucoin
    controller_name: pmm_simple
    controller_type: market_making
    cooldown_time: 60.0
    executor_refresh_time: 180.0
    id: robin-compute_0.2
    leverage: 20
    manual_kill_switch: null
    position_mode: HEDGE
    sell_amounts_pct:
    - 0.16666666666666666
    - 0.16666666666666666
    - 0.16666666666666666
    sell_spreads:
    - 0.01
    - 0.015
    - 0.02
    stop_loss: 0.015
    take_profit: 0.006999999999999999
    take_profit_order_type: 2
    time_limit: 900
    total_amount_quote: 70
    trading_pair: XCAD-USDT
    trailing_stop:
      activation_price: 0.018
      trailing_delta: 0.002
    
  4. Reload dashboard page, go to config generator
  5. Load the config then run backtest

Deploy - Unable to docker compose emqx

When setting up source for testing PR18, we have to use docker compose. up emqx for running the hummingbot-broker however it requires to manually add .env file which is created from bash setup.sh

image

Workaround: Manually create .env file below:

CONFIG_PASSWORD=a
BOTS_PATH=insert-directory-of-deploy

Steps to reproduce:

  1. Clone https://github.com/hummingbot/deploy
  2. Run docker compose up emqx -d

Broken Documentation Links (Minor)

First off, Great work folks!
I just happened to notice a mistake in the instructions and it seemed silly to do a feature branch just for two links when one of you can do it directly.
Just before step Five on hummingbot_with_dashboard

Noticed the same block of links here which have the same issues, just before step Seven;
docker pull hummingbot/gateway

"Seeking Assistance with an Issue Related to Gateway Disconnection in Hummingbot"

ๅฑๅน•ๆˆชๅ›พ 2023-07-22 124149
I am experiencing an issue while using the gateway that I set up with Docker. Specifically, the problem arises when I use 'gateway connect quickswap' in Hummingbot, and after entering 'polygon, mainnet', the connection is lost. Upon investigation, I noticed that the gateway container displayed a 404 error, indicating that the resource could not be found. I'd appreciate any assistance you can provide.

Deploy - Creates instance using different docker image

When testing PR18 then launch the bot with controller but without selected available image it uses dardonacci/hummingbot:latest instead of hummingbot/hummingbot:latest

image
image

Recording here: https://www.loom.com/share/4bdd19ce15724943845641386d7d5134

Steps to reproduce:

  1. Setup deploy on source ( dashboard + backend-api + hummingbot-broker )
  2. On dashboard page, create config then deploy without selecting any images
  3. Go to terminal and run docker ps or docker images to check the container and image used

้˜ฟ้‡Œไบ‘้ƒจ็ฝฒ๏ผŒconnect ่ฟžๆŽฅ่ถ…ๆ—ถ

ๅœจ้˜ฟ้‡Œไบ‘้ƒจ็ฝฒdocker็š„ๆ—ถๅ€™๏ผŒconnect ่ฟžๆŽฅ่ถ…ๆ—ถใ€‚
้”™่ฏฏไฟกๆฏ
24-03-26 03:11:56,085 - 15 - hummingbot.connector.exchange.injective_v2.injective_v2_exchange.InjectiveV2Exchange - ERROR - There was an error requesting exchange info.
Traceback (most recent call last):
File "/home/hummingbot/hummingbot/connector/exchange/injective_v2/injective_v2_exchange.py", line 799, in _initialize_trading_pair_symbol_map
mapping = await self._data_source.spot_market_and_trading_pair_map()
File "/home/hummingbot/hummingbot/connector/exchange/injective_v2/data_sources/injective_read_only_data_source.py", line 115, in spot_market_and_trading_pair_map
await self.update_markets()
File "/home/hummingbot/hummingbot/connector/exchange/injective_v2/data_sources/injective_read_only_data_source.py", line 220, in update_markets
) = await self._get_markets_and_tokens()
File "/home/hummingbot/hummingbot/connector/exchange/injective_v2/data_sources/injective_data_source.py", line 1587, in _get_markets_and_tokens
spot_markets: Dict[str, SpotMarket] = await self.query_executor.spot_markets()
File "/home/hummingbot/hummingbot/connector/exchange/injective_v2/injective_query_executor.py", line 161, in spot_markets
return await self._sdk_client.all_spot_markets()
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/async_client.py", line 324, in all_spot_markets
await self._initialize_tokens_and_markets()
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/async_client.py", line 2653, in _initialize_tokens_and_markets
markets_info = (await self.fetch_spot_markets(market_statuses=["active"]))["markets"]
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/async_client.py", line 1325, in fetch_spot_markets
return await self.exchange_spot_api.fetch_markets(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/client/indexer/grpc/indexer_grpc_spot_api.py", line 29, in fetch_markets
response = await self._execute_call(call=self._stub.Markets, request=request)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/client/indexer/grpc/indexer_grpc_spot_api.py", line 240, in _execute_call
return await self._assistant.execute_call(call=call, request=request)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/utils/grpc_api_request_assistant.py", line 12, in execute_call
metadata = await self._metadata_provider()
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/core/network.py", line 331, in exchange_metadata
return await self.cookie_assistant.exchange_metadata(metadata_query_provider=metadata_query_provider)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/core/network.py", line 25, in exchange_metadata
cookie = await self.exchange_cookie(metadata_query_provider=metadata_query_provider)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/core/network.py", line 113, in exchange_cookie
await self._fetch_exchange_cookie(metadata_query_provider=metadata_query_provider)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/pyinjective/core/network.py", line 133, in _fetch_exchange_cookie
raise RuntimeError(f"Error fetching exchange cookie ({metadata})")
RuntimeError: Error fetching exchange cookie (Metadata((('alt-svc', 'h3=":443"; ma=2592000'), ('server', 'Caddy'), ('date', 'Tue, 26 Mar 2024 03:11:55 GMT'))))
2024-03-26 03:14:04,692 - 15 - hummingbot.connector.time_synchronizer - NETWORK - Error getting server time.
Traceback (most recent call last):
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection
raise exceptions[0]
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
sock = await self._connect_sock(
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
await self.sock_connect(sock, address)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
return await fut
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect
sock.connect(address)
OSError: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 65, in update_server_time_offset_with_time_provider
server_time_ms: float = await time_provider
File "/home/hummingbot/hummingbot/connector/exchange/kucoin/kucoin_web_utils.py", line 74, in get_current_server_time
response = await rest_assistant.execute_request(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
response = await self.execute_request_and_get_response(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 94, in execute_request_and_get_response
response = await self.call(request=request, timeout=timeout)
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 108, in call
resp = await wait_for(self._connection.call(request), timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 408, in wait_for
return await fut
File "/home/hummingbot/hummingbot/core/web_assistant/connections/rest_connection.py", line 10, in call
aiohttp_resp = await self._client_session.request(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/client.py", line 578, in _request
conn = await self._connector.connect(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 544, in connect
proto = await self._create_connection(req, traces, timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 911, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1235, in _create_direct_connection
raise last_exc
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1000, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.kucoin.com:443 ssl:default [Network is unreachable]
2024-03-26 03:14:04,698 - 15 - hummingbot.connector.time_synchronizer - WARNING - Could not refresh server time. Check network connection.
2024-03-26 03:14:04,699 - 15 - hummingbot.connector.exchange.ascend_ex.ascend_ex_exchange.AscendExExchange - ERROR - There was an error requesting exchange info.
Traceback (most recent call last):
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection
raise exceptions[0]
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
sock = await self._connect_sock(
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
await self.sock_connect(sock, address)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
return await fut
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect
sock.connect(address)
OSError: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 1074, in _initialize_trading_pair_symbol_map
exchange_info = await self._make_trading_pairs_request()
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 1087, in _make_trading_pairs_request
exchange_info = await self._api_get(path_url=self.trading_pairs_request_path)
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 863, in _api_get
return await self._api_request(*args, **kwargs)
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 906, in _api_request
request_result = await rest_assistant.execute_request(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
response = await self.execute_request_and_get_response(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 94, in execute_request_and_get_response
response = await self.call(request=request, timeout=timeout)
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 108, in call
resp = await wait_for(self._connection.call(request), timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 408, in wait_for
return await fut
File "/home/hummingbot/hummingbot/core/web_assistant/connections/rest_connection.py", line 10, in call
aiohttp_resp = await self._client_session.request(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/client.py", line 578, in _request
conn = await self._connector.connect(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 544, in connect
proto = await self._create_connection(req, traces, timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 911, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1235, in _create_direct_connection
raise last_exc
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1000, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host ascendex.com:443 ssl:default [Network is unreachable]
2024-03-26 03:14:04,700 - 15 - hummingbot.connector.time_synchronizer - NETWORK - Error getting server time.
Traceback (most recent call last):
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection
raise exceptions[0]
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
sock = await self._connect_sock(
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
await self.sock_connect(sock, address)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
return await fut
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect
sock.connect(address)
OSError: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 65, in update_server_time_offset_with_time_provider
server_time_ms: float = await time_provider
File "/home/hummingbot/hummingbot/connector/exchange/binance/binance_web_utils.py", line 69, in get_current_server_time
response = await rest_assistant.execute_request(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
response = await self.execute_request_and_get_response(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 94, in execute_request_and_get_response
response = await self.call(request=request, timeout=timeout)
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 108, in call
resp = await wait_for(self._connection.call(request), timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 408, in wait_for
return await fut
File "/home/hummingbot/hummingbot/core/web_assistant/connections/rest_connection.py", line 10, in call
aiohttp_resp = await self._client_session.request(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/client.py", line 578, in _request
conn = await self._connector.connect(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 544, in connect
proto = await self._create_connection(req, traces, timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 911, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1235, in _create_direct_connection
raise last_exc
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1000, 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 [Network is unreachable]
2024-03-26 03:14:04,700 - 15 - hummingbot.connector.time_synchronizer - WARNING - Could not refresh server time. Check network connection.
2024-03-26 03:14:26,460 - 15 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task:
Traceback (most recent call last):
File "/home/hummingbot/hummingbot/user/user_balances.py", line 92, in add_exchange
err_msg = await UserBalances._update_balances(market)
File "/home/hummingbot/hummingbot/user/user_balances.py", line 53, in _update_balances
await market._update_balances()
File "/home/hummingbot/hummingbot/connector/exchange/binance/binance_exchange.py", line 517, in _update_balances
account_info = await self._api_get(
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 863, in _api_get
return await self._api_request(*args, **kwargs)
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 906, in _api_request
request_result = await rest_assistant.execute_request(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
response = await self.execute_request_and_get_response(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 94, in execute_request_and_get_response
response = await self.call(request=request, timeout=timeout)
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 106, in call
request = await self._pre_process_request(request)
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 114, in _pre_process_request
request = await pre_processor.pre_process(request)
File "/home/hummingbot/hummingbot/connector/utils.py", line 106, in pre_process
await self._synchronizer.update_server_time_if_not_initialized(time_provider=self._time_provider())
File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 84, in update_server_time_if_not_initialized
await self.update_server_time_offset_with_time_provider(time_provider)
File "/home/hummingbot/hummingbot/connector/time_synchronizer.py", line 65, in update_server_time_offset_with_time_provider
server_time_ms: float = await time_provider
File "/home/hummingbot/hummingbot/connector/exchange/binance/binance_web_utils.py", line 69, in get_current_server_time
response = await rest_assistant.execute_request(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
response = await self.execute_request_and_get_response(
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 94, in execute_request_and_get_response
response = await self.call(request=request, timeout=timeout)
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 108, in call
resp = await wait_for(self._connection.call(request), timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 408, in wait_for
return await fut
File "/home/hummingbot/hummingbot/core/web_assistant/connections/rest_connection.py", line 10, in call
aiohttp_resp = await self._client_session.request(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/client.py", line 578, in _request
conn = await self._connector.connect(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 544, in connect
proto = await self._create_connection(req, traces, timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 911, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/opt/conda/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
sock = await self._connect_sock(
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
await self.sock_connect(sock, address)
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/hummingbot/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
return await c
File "/home/hummingbot/hummingbot/client/command/connect_command.py", line 63, in connect_exchange
await self._perform_connect(connector_config)
File "/home/hummingbot/hummingbot/client/command/connect_command.py", line 144, in _perform_connect
err_msg = await self.validate_n_connect_connector(connector_name)
File "/home/hummingbot/hummingbot/client/command/connect_command.py", line 122, in validate_n_connect_connector
err_msg = await asyncio.wait_for(
File "/opt/conda/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
2024-03-26 03:15:13,401 - 15 - hummingbot.client.hummingbot_application - ERROR - MQTT is already stopped!

Credentials - Unable to add Injective v2 connector

Describe the bug

When setting up injective v2 (spot and perpetual), observed that is missing some required data in order to successfully add the connector.

image

Compare setup on client:
image

Steps to reproduce bug

  1. Setup Deploy
  2. Go to Credentials, select either injective_v2 or injective_v2_perpetual

Generating gateway certs does not work anymore

Describe the bug
I am using hummingbot_gateway_compose.

Everything seems to install fine, but when running hummingbot command gateway generate-certs fails in latest version i.e

File "/home/hummingbot/hummingbot/core/gateway/__init__.py", line 105, in get_gateway_paths raise EnvironmentError("CERTS_FOLDER, GATEWAY_CONF_FOLDER and GATEWAY_LOGS_FOLDER must be defined when " OSError: CERTS_FOLDER, GATEWAY_CONF_FOLDER and GATEWAY_LOGS_FOLDER must be defined when running as container.

I have tried to add those manually in compose then rebuild i.e

      - CERTS_FOLDER=/home/gateway/certs
      - GATEWAY_CONF_FOLDER=/home/gateway/conf
      - GATEWAY_LOGS_FOLDER=/home/gateway/logs

Command works and says that certs were copied to copied to home/hummingbot/.hummingbot-gateway/certs, but then new error arises in gateway:

Error: Error: ENOENT: no such file or directory, open './certs/server_key.pem'

Seems the certs are copied in the wrong directory since they do not sync in /gateway_files/certs

So I tried to add the volume in compose and rebuild but still no luck

      - "./gateway_files/certs:/home/hummingbot/.hummingbot-gateway/certs"

Steps To Reproduce

  1. Setup docker compose for hummingbot_gateway_compose
  2. Start hummingbot and run gateway generate-certs
  3. Observe behavior

Multiple clients does not support same DEX connectors but different wallets

Describe the bug
When checking multiple client support for gateway using docker compose, it is not possible use same DEX connector but with different wallets.

Note: Docker compose lets you create multiple instances of client containers but on same volume where gateway is connected.

Screen.Recording.2023-07-27.at.8.25.21.PM.mov

Steps To Reproduce

  1. Setup docker compose for multiple_hummingbot_gateway_compose
  2. Setup any DEX connector for both client
  3. Add new wallet on either of the two on same DEX connector
  4. Observe behavior

Release version
Master and Development branch

Deploy - Set hummingbot as default image

After config was uploaded and about to launch the bot, observed that it does not use hummingbot/hummingbot:latest as default client image

image

Steps to reproduce:

  1. Create a config and upload
  2. Go to instance, select the config and client image before launch bot

PMM Dynamic - Getting ValueError: If using all scalar values, you must pass an index

Describe the bug

When testing a PR and compare with the latest deploy version, found this error when setting up a market on kucoin and binance

image

# dashboard logs
2024-06-26 12:36:04.033 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/pmm_dynamic/app.py", line 40, in <module>
    candles = get_candles(connector_name=inputs["candles_connector"], trading_pair=inputs["candles_trading_pair"], interval=inputs["interval"], days=days_to_visualize)
  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 23, in get_candles
    df = pd.DataFrame(backend_client.get_historical_candles(connector_name, trading_pair, interval,
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/pandas/core/frame.py", line 778, in __init__
    mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 503, in dict_to_mgr
    return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 114, in arrays_to_mgr
    index = _extract_index(arrays)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 667, in _extract_index
    raise ValueError("If using all scalar values, you must pass an index")
ValueError: If using all scalar values, you must pass an index
# backend logs
INFO:     192.168.0.3:33054 - "GET /is-docker-running HTTP/1.1" 200 OK
INFO:     192.168.0.3:33056 - "GET /all-controller-configs HTTP/1.1" 200 OK
2024-06-26 12:36:04,025 - asyncio - ERROR - Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0xffff7c352590>
2024-06-26 12:36:04,026 - asyncio - ERROR - Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0xffff7c358760>, 6730.242969143)]']
connector: <aiohttp.connector.TCPConnector object at 0xffff7c353d90>
INFO:     192.168.0.3:33062 - "POST /historical-candles HTTP/1.1" 200 OK

Check traceback seems to be pointing to historical candles. Tried to check if we can reproduce using data and MACD_BB V1
image

Steps to reproduce bug

  1. Clone latest deploy version then setup bash setup.sh
  2. Go to Dashboard page
  3. Go to Config Generator then PMM Dynamic (on this test we used kucoin XCAD-USDT, binance FIRO-USDT) then observe error on setup
  4. Go to data then download candles for the same market and it would return same error

Error running simple docker compose

After attaching to Terminal and entering password, client exits with this error:

Traceback (most recent call last):
  File "/home/hummingbot/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/hummingbot/hummingbot/core/utils/async_call_scheduler.py", line 128, in call_async
    return await self.schedule_async_call(coro, timeout_seconds, app_warning_msg=app_warning_msg)
  File "/home/hummingbot/hummingbot/core/utils/async_call_scheduler.py", line 117, in schedule_async_call
    return await fut
  File "/home/hummingbot/hummingbot/core/utils/async_call_scheduler.py", line 80, in _coro_scheduler
    fut.set_result(await coro)
  File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/hummingbot/hummingbot/client/config/security.py", line 53, in decrypt_all
    encrypted_files = list_connector_configs()
  File "/home/hummingbot/hummingbot/client/config/config_helpers.py", line 668, in list_connector_configs
    Path(f.path) for f in scandir(str(CONNECTORS_CONF_DIR_PATH))
FileNotFoundError: [Errno 2] No such file or directory: '/home/hummingbot/conf/connectors'
Unhandled error in background task: [Errno 2] No such file or directory: '/home/hummingbot/conf/connectors'
Traceback (most recent call last):
  File "/home/hummingbot/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/hummingbot/hummingbot/core/utils/async_call_scheduler.py", line 128, in call_async
    return await self.schedule_async_call(coro, timeout_seconds, app_warning_msg=app_warning_msg)
  File "/home/hummingbot/hummingbot/core/utils/async_call_scheduler.py", line 117, in schedule_async_call
    return await fut
  File "/home/hummingbot/hummingbot/core/utils/async_call_scheduler.py", line 80, in _coro_scheduler
    fut.set_result(await coro)
  File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/hummingbot/hummingbot/client/config/security.py", line 53, in decrypt_all
    encrypted_files = list_connector_configs()
  File "/home/hummingbot/hummingbot/client/config/config_helpers.py", line 668, in list_connector_configs
    Path(f.path) for f in scandir(str(CONNECTORS_CONF_DIR_PATH))
FileNotFoundError: [Errno 2] No such file or directory: '/home/hummingbot/conf/connectors'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.