Skip to content

Conversation

@cardosofede
Copy link
Contributor

No description provided.

@rapcmia rapcmia moved this to Backlog in Pull Request Board Oct 14, 2025
@rapcmia rapcmia requested review from fengtality and rapcmia October 14, 2025 06:22
@rapcmia rapcmia moved this from Backlog to Under Review in Pull Request Board Oct 14, 2025
@rapcmia
Copy link
Contributor

rapcmia commented Oct 14, 2025

commit b5f63ad

  • Run sh [setup.sh](http://setup.sh)
    image
  • Run ./run.sh --dev, ModuleNotFoundError: No module named 'models.gateway_trading' ❌
    image
    ### Intiate ./run.sh --dev
    Running API from source...
    [+] Running 2/2
     ✔ Container hummingbot-postgres  Running                                                                                                                                                                                                 0.0s
     ✔ Container hummingbot-broker    Running                                                                                                                                                                                                 0.0s
    INFO:     Will watch for changes in these directories: ['/home/yawnyunehh/hummingbot/hummingbot-api/89']
    INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    INFO:     Started reloader process [183598] using WatchFiles
    Process SpawnProcess-1:
    Traceback (most recent call last):
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
        self.run()
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/multiprocessing/process.py", line 108, in run
        self._target(*self._args, **self._kwargs)
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/_subprocess.py", line 80, in subprocess_started
        target(sockets=sockets)
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/server.py", line 67, in run
        return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/asyncio/runners.py", line 195, in run
        return runner.run(main)
               ^^^^^^^^^^^^^^^^
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/asyncio/runners.py", line 118, in run
        return self._loop.run_until_complete(task)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/server.py", line 71, in serve
        await self._serve(sockets)
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/server.py", line 78, in _serve
        config.load()
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/config.py", line 438, in load
        self.loaded_app = import_from_string(self.app)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/importer.py", line 22, in import_from_string
        raise exc from None
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/importer.py", line 19, in import_from_string
        module = importlib.import_module(module_str)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/importlib/__init__.py", line 90, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 999, in exec_module
      File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
      File "/home/yawnyunehh/hummingbot/hummingbot-api/89/main.py", line 35, in <module>
        from services.bots_orchestrator import BotsOrchestrator
      File "/home/yawnyunehh/hummingbot/hummingbot-api/89/services/__init__.py", line 3, in <module>
        from .docker_service import DockerService
      File "/home/yawnyunehh/hummingbot/hummingbot-api/89/services/docker_service.py", line 16, in <module>
        from models import V2ScriptDeployment
      File "/home/yawnyunehh/hummingbot/hummingbot-api/89/models/__init__.py", line 132, in <module>
        from .gateway_trading import (
    ModuleNotFoundError: No module named 'models.gateway_trading'
    

@rapcmia
Copy link
Contributor

rapcmia commented Oct 15, 2025

Commit e5b04d8

  • Use ./run —dev
    image
    • (optional) Had to use uvicorn main:app --reload --host 0.0.0.0 --port 8000 to test on diff machine ✅
    • User must have a gateway instance running on the background, else it will not work ✅
      image
      • Tested on both source and docker build ✅

Tested with hummingbot-mcp

  • Created generic.arbitrage_controller config successfully
  • Gateway stop/start ✅
  • Added gateway solana wallet and check balance ok
  • Change rpcProvider for both solana and ethereum
    • Does not completely change url to {helius, infura} but instead udpate the rpc url and add apiKey
    • Updated the nodeURL successfully and logs shows same as with hummingbot+gateway approach
  • Able to call configs and updates in progress
  • However im not able to deploy v2 controller with gateway yet getting error that format jupiter/router is not yet supported ❌
    image
    • Same when we use POST /bot-orchestration/deploy-v2-controllers
      curl -X 'POST' \
        'http://192.168.1.11:8000/bot-orchestration/deploy-v2-controllers' \
        -H 'accept: application/json' \
        -H 'Content-Type: application/json' \
        -d '{
        "instance_name": "arb01",
        "credentials_profile": "master_account",
        "controllers_config": [
          "arbitrage_jup_kucoin.yml"
        ],
        "max_global_drawdown_quote": 0,
        "max_controller_drawdown_quote": 0,
        "image": "hummingbot/hummingbot:dev",
        "headless": false
      }'
      

incase needed, here are the recorded logs of tests with mcp: test-gateway-endpoints.log

@rapcmia
Copy link
Contributor

rapcmia commented Oct 21, 2025

Commit 49f5c84

  • Purged everything and start from scrach to finalize the test
  • Test with humingbot-api + hummingbot-mcp + gateway
    • Successfully connected with source and docker
    • gateway start and stop is used with docker only
    • update nodeURL POST /gateway/networks/{network_id}
      curl -X 'POST' \
        'http://localhost:8000/gateway/networks/solana-mainnet-beta' \
        -u "admin:admin" \
        -H 'accept: application/json' \
        -H 'Content-Type: application/json' \
        -d '{
        "nodeURL": "https://wandering-chaotic-firefly.solana-mainnet.quiknode.pro/4fe376aa40a47aeaaa935036b56d33504e51dffb"
      }'
      
      # response
      {
        "success": true,
        "message": "Updated 1 config parameter(s) for solana-mainnet-beta. Restart Gateway for changes to take effect.",
        "restart_required": true,
        "restart_endpoint": "POST /gateway/restart",
        "results": [
          {
            "message": "Configuration updated successfully: 'solana-mainnet-beta.nodeURL' set to \"https://wandering-chaotic-firefly.solana-mainnet.quiknode.pro/4fe376aa40a47aeaaa935036b56d33504e51dffb\""
          }
        ]
      }
      
      • Commit still does not have the restart_endpoint": "POST /gateway/restart" ❌
        image
        • Had to manually restart or use the gateway stop/start endpoint so changes take effect
  • Test gateway trading:

Test generic.arbitrage_controller

  • Create generic.arbitrage_controller POST /controllers/configs/{config_name} ✅

    curl -X 'POST' \
      'http://localhost:8000/controllers/configs/arb01' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -d '{
          "id": "test1",
          "controller_name": "arbitrage_controller",
          "controller_type": "generic",
          "total_amount_quote": "6",
          "manual_kill_switch": false,
          "candles_config": [],
          "initial_positions": [],
          "exchange_pair_1": {
            "connector_name": "jupiter/router",
            "trading_pair":"JUP-USDC"
           },
          "exchange_pair_2": {
            "connector_name": "kucoin",
            "trading_pair":"JUP-USDT"
           },
          "min_profitability": "-0.0015",
          "delay_between_executors": 30,
          "max_executors_imbalance": 1,
          "rate_connector": "binance",
          "quote_conversion_asset": "USDT"
    }'
    
    # response:
    {
      "message": "Configuration 'arb01' saved successfully"
    }
    
    image
    • Uses the updated generic.arbitrage_controller ✅
  • Successfully deploy ✅

Incase needed, attached is the logs of hummingbot-mcp tests: test-endpoint-logs.log

--

im able to reproduce this behavior when i stop/start gateway and deploy any v2 controller configuration e.g generic.arbitrage_controller config hummingbot/deploy#87

@rapcmia
Copy link
Contributor

rapcmia commented Oct 21, 2025

  • Commit 7676c29
    • ./run.sh —dev : ModuleNotFoundError: No module named 'services.gateway_transaction_poller' ❌
      image
      INFO:     Will watch for changes in these directories: ['/home/yawnyunehh/hummingbot/hummingbot-api/89b']
      INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
      INFO:     Started reloader process [1221674] using WatchFiles
      Process SpawnProcess-1:
      Traceback (most recent call last):
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
          self.run()
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/multiprocessing/process.py", line 108, in run
          self._target(*self._args, **self._kwargs)
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/_subprocess.py", line 80, in subprocess_started
          target(sockets=sockets)
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/server.py", line 67, in run
          return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/asyncio/runners.py", line 195, in run
          return runner.run(main)
                 ^^^^^^^^^^^^^^^^
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/asyncio/runners.py", line 118, in run
          return self._loop.run_until_complete(task)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/server.py", line 71, in serve
          await self._serve(sockets)
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/server.py", line 78, in _serve
          config.load()
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/config.py", line 439, in load
          self.loaded_app = import_from_string(self.app)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/importer.py", line 22, in import_from_string
          raise exc from None
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/site-packages/uvicorn/importer.py", line 19, in import_from_string
          module = importlib.import_module(module_str)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/yawnyunehh/anaconda3/envs/hummingbot-api/lib/python3.12/importlib/__init__.py", line 90, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 999, in exec_module
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "/home/yawnyunehh/hummingbot/hummingbot-api/89b/main.py", line 35, in <module>
          from services.bots_orchestrator import BotsOrchestrator
        File "/home/yawnyunehh/hummingbot/hummingbot-api/89b/services/__init__.py", line 1, in <module>
          from .accounts_service import AccountsService
        File "/home/yawnyunehh/hummingbot/hummingbot-api/89b/services/accounts_service.py", line 16, in <module>
          from services.gateway_transaction_poller import GatewayTransactionPoller
      ModuleNotFoundError: No module named 'services.gateway_transaction_poller'
      INFO:     Stopping reloader process [1221674]
      
      

@rapcmia
Copy link
Contributor

rapcmia commented Oct 21, 2025

Commit c3528a0

  • Fixed gateway tx poller error ✅
  • Fresh install returns warning on market_data_provider omva;od connector format ❗
    INFO:     Will watch for changes in these directories: ['/home/yawnyunehh/hummingbot/hummingbot-api/89b']
    INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
    INFO:     Started reloader process [1254309] using WatchFiles
    INFO:     Started server process [1254311]
    INFO:     Waiting for application startup.
    INFO:     Application startup complete.
    2025-10-21 23:33:48,860 - hummingbot.data_feed.market_data_provider - WARNING - Could not get chain/network for gateway: Invalid connector format. Use format like 'uniswap/amm' or 'jupiter/router'
    2025-10-21 23:33:48,860 - hummingbot.data_feed.market_data_provider - WARNING - Could not get chain/network for gateway: Invalid connector format. Use format like 'uniswap/amm' or 'jupiter/router'
    2025-10-21 23:33:48,860 - hummingbot.data_feed.market_data_provider - WARNING - Could not get chain/network for gateway: Invalid connector format. Use format like 'uniswap/amm' or 'jupiter/router
    
    • Fixed when adding dex wallet POST /accounts/gateway/add-wallet

Checked gateway endpoints, restart is now available ✅
image

curl -X 'POST' \
  'http://100.124.88.27:8000/gateway/restart' \
  -u "admin:admin" \
  -H 'Content-Type: application/json' \
  -d '{
  "passphrase": "string",
  "image": "hummingbot/gateway:latest",
  "port": 15888,
  "dev_mode": true
}'

# response
{
  "success": true,
  "message": "Gateway started successfully",
  "container_id": "333d637ed0a5206553357b570297a07680247e225f4973640edbf01fa22b5d54",
  "port": 15888
}

@rapcmia
Copy link
Contributor

rapcmia commented Oct 27, 2025

Commit 78dcd46

  • Tested hummingbot-api on source build + docker gateway (dev branch)
  • Tested using helius nodeURL
  • Not getting the data_feed.market_data_provider warning ✅
    image
  • Gateway status, stop, start and restart ✅
  • Added solana wallets, helius API key ✅
  • Add controller configuration for generic.arbitrage_controller, deploy, stop and archived ✅
  • Tested gateway/swap quote and execute for {buy and sell} ✅
    • Compare prices, data on curl response and txn, all ok

Setup production mode gateway by changing dev_mode to true
image

  • Not able to start either valid or invalid passphrase
  • Container kept on restarting, can’t stop even using POST /gateway/stop
    • Workaround: Run on terminal docker rm -f gateway to force remove
    • Gateway works best on development mode (dev_mode: false) atm ✅

Test both this PR and gateway on docker ❗

  • Successfully build local docker image from this PR ✅
  • Check gateway status, stop, start and restart ✅
  • Other gateway endpoints returning gateway service is unavailable or gateway service is not available ❌
    image
    • GET or POST gateway/connector, gateway/chains, gateway/network, accounts/gateway/wallets and accounts/gateway/add-wallet ❌

in case needed, attached logs and hummingbot-mcp endpoint logs:
10272025a.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Under Review

Development

Successfully merging this pull request may close these issues.

3 participants