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 30, 2025

Commit 31bac96

  • Setup on MacOS via docker build (docker desktop)
  • Built local images for this PR and gateway (dev branch) ok
  • Utilized Codex AI to run endpoints and save to a log file
  • Create controller configuration for generic.arbtirage_controller successfully
  • Random endpoints
    • GET /gateway/status ok
    • POST /gateway/start ok
    • POST /gateway/stop ok
    • POST /gateway/restart ok
    • GET /accounts/gateway/wallets ok
    • POST /accounts/gateway/add-wallet ok
      • Check balances, the master_account returns all exchanges {DEX, CEX}
    • POST /gateway/networks/{network_id} ok
    • GET /gateway/networks/{network_id} ok
  • Gateway Swaps
    • POST/gateway/swap/quote ok
    • POST/gateway/swap/execute ok
    • GET/gateway/swaps/{transaction_hash}/status ok
    • POST/gateway/swaps/search ok
    • GET/gateway/swaps/summary ok
    • Check postgres ok
      image
      • Swap summary matches recorded on database ok
  • Bot orchestration
    • Deploy controller configuration of generic.arbitrage_controller
    • Stop and archived successfully

Attached are the logs of gateway and test endpoints: 10302025a.zip


Pending: Source and docker build on a fresh installation before approval

@rapcmia
Copy link
Contributor

rapcmia commented Oct 31, 2025

Commit 31bac96

  • Clean installation and purge conda env for source build
  • Build docker images for this PR and gateway dev ok
  • Tested endpoints by adding wallets, update config and network
  • Tested stop/start/restart gateway container ok
  • Tested gateway swaps by rebalancing wallet ok
    • Track all txns and prices on DB, matched
  • Created configuration contrller generic.arbitrage_controller and deploy
  • All tested done on:
    • MacOs + docker desktop ✅
    • Linux + docker (native) ❗
      • Reported to dev via discord that gateway service unavailable
      • I tested with using "GATEWAY_URL=http://172.17.0.1:15888" instead and work for my use case (docker) ✅

Incase needed attached is the log files of gateway and test endpoints: 10312025a.zip

Copy link
Contributor

@rapcmia rapcmia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Clean installation and purge conda env for source build
  • Build docker images for this PR and gateway dev ok
  • Tested endpoints by adding wallets, update config and network
  • Tested stop/start/restart gateway container ok
  • Tested gateway swaps by rebalancing wallet ok
    • Track all txns and prices on DB, matched
  • Created configuration contrller generic.arbitrage_controller and deploy
  • All tested done on:
    • MacOs + docker desktop ✅
    • Linux + docker (native) ✅
  • Skipped CLMM endpoints ❗

Incase needed attached is the log files of gateway and test endpoints
11032025a.zip

@cardosofede cardosofede merged commit 438f4c3 into main Nov 3, 2025
@rapcmia rapcmia moved this from Under Review to Development v2.10.0 in Pull Request Board Nov 3, 2025
@rapcmia rapcmia moved this from Development v2.10.0 to Release v2.9.0 in Pull Request Board Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants