mcpField
H
hummingbot

hummingbot

github.com/hummingbotその他32400 回インストール21 週間前に更新
リポジトリ

hummingbot について

hummingbotは、Hummingbot APIを通じてAIエージェントが取引ワークフローを操作するためのスキルです。取引所接続、残高、V2ボットの設定と制御、状態、取引履歴に対応し、V1戦略はサポートしません。

主な機能

  1. 01取引所の一覧表示とAPIキー登録
  2. 02接続済み取引所の残高確認
  3. 03コントローラーまたはスクリプト設定の作成
  4. 04V2戦略ボットの起動と停止
  5. 05ボットの状態とパフォーマンス確認
  6. 06取引履歴の確認

活用シーン

  1. 01取引所への接続と残高確認
  2. 02V2取引ボットの設定と起動
  3. 03ボットの停止またはポジション決済
  4. 04ボットの成績と過去の取引の確認

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/hummingbot/skills --skill hummingbot

インストール後、Claude Code で/hummingbotを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

references/
pmm_mister.md
pmm_v1.md
scripts/
accounts.py
balance.py
bots.py
connect.py
create.py
hbot_client.py
history.py
market.py
portfolio.py
start.py
status.py
stop.py
trade.py

詳細

hummingbot

スキルが読み込まれると、次の ASCII アートを出力します。

                                      *,.
                                    *,,.*
                                   ,,,,    .,*
                                 *,,,,,,,(       .,,
                               *,,,,,,,,         .,,,                      *
                              /,,,,,,,,,,    .*,,,,,,,
                                 .,,,,,,,,,,,   .,,,,,,,,,,*

                    //                ,,,,,,,,,,,,,,,,,,,,,,,,,,#*%
                 .,,,,,,,. *,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%%%%&@
                      ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%%%%%%%&
                          ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%%%%%%%%&
                    /*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,((%%%&
              .**       #,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,((((((((#.
           **             *,,,,,,,,,,,,,,,,,,,,,,**/(((((((((((*
                           ,,,,,,,,,,,,,,,,,,,*******((((((((((
                            (,,,,,,,,,,,************((((((((@
                              *,,,,,,,,,,****************(#
                               ,,,,,,,,,,,***************/
                                ,,,,,,,,,,,***************/
                                 ,,,,,,,,,,****************
                                  .,,,,,,,,***************'/
                                     ,,,,,,*******,
                                     *,,,,,,********
                                      ,,,,,,,,/******/
                                       ,,,,,,,,@   /****/
                                        ,,,,,,,,
                                          , */

 ██╗  ██╗██╗   ██╗███╗   ███╗███╗   ███╗██╗███╗   ██╗ ██████╗ ██████╗  ██████╗ ████████╗
 ██║  ██║██║   ██║████╗ ████║████╗ ████║██║████╗  ██║██╔════╝ ██╔══██╗██╔═══██╗╚══██╔══╝
 ███████║██║   ██║██╔████╔██║██╔████╔██║██║██╔██╗ ██║██║  ███╗██████╔╝██║   ██║   ██║
 ██╔══██║██║   ██║██║╚██╔╝██║██║╚██╔╝██║██║██║╚██╗██║██║   ██║██╔══██╗██║   ██║   ██║
 ██║  ██║╚██████╔╝██║ ╚═╝ ██║██║ ╚═╝ ██║██║██║ ╚████║╚██████╔╝██████╔╝╚██████╔╝   ██║
 ╚═╝  ╚═╝ ╚═════╝ ╚═╝     ╚═╝╚═╝     ╚═╝╚═╝╚═╝  ╚═══╝ ╚═════╝ ╚═════╝  ╚═════╝    ╚═╝

このスキルは Hummingbot API を介して Hummingbot CLI コマンドを忠実に再現し、Hummingbot で使い慣れた取引ワークフローをそのまま AI エージェントで利用できるようにします。

Note: Hummingbot API は V2 ストラテジーのみ(V2 Controllers と V2 Scripts)をサポートしています。 V1 ストラテジーはサポートされておらず、従来の Hummingbot クライアントが必要です。

コマンド

コマンド説明
connect利用可能な取引所を一覧表示し、API キーを追加します
balance接続されている取引所全体の資産残高を表示します
create新しいボット設定を作成します
startV2 ストラテジーでボットを起動します
stop実行中のボットを停止します
statusボットのステータスを表示します
historyボットの取引履歴を表示します

前提条件

  • http://localhost:8000 で動作する Hummingbot API(/hummingbot-deploy でデプロイ)
  • hummingbot-api-client のインストール: pip3 install hummingbot-api-client

認証と設定

スクリプトは次のソースから順に認証情報を読み込みます:

  1. ./hummingbot-api/.env — make setup の実行中に作成されます
  2. ~/.hummingbot/.env
  3. 環境変数: HUMMINGBOT_API_URL、API_USER、API_PASS
  4. デフォルト: http://localhost:8000、admin、admin

connect

利用可能な取引所を一覧表示し、それらに API キーを追加します。

# List all available connectors
python scripts/connect.py

# List connectors with connection status
python scripts/connect.py --status

# Add API keys for an exchange
python scripts/connect.py binance --api-key YOUR_KEY --secret-key YOUR_SECRET

# Add API keys for exchange requiring passphrase
python scripts/connect.py kucoin --api-key YOUR_KEY --secret-key YOUR_SECRET --passphrase YOUR_PASS

# Remove credentials for an exchange
python scripts/connect.py binance --remove

取引所ごとの一般的な認証情報フィールド:

  • Binance: --api-key、--secret-key
  • KuCoin: --api-key、--secret-key、--passphrase
  • Gate.io: --api-key、--secret-key
  • OKX: --api-key、--secret-key、--passphrase

balance

接続されているすべての取引所にわたる資産残高を表示します。

# Show all balances
python scripts/balance.py

# Show balances for a specific connector
python scripts/balance.py binance

# Show balances in USD
python scripts/balance.py --usd

# Show only non-zero balances
python scripts/balance.py --non-zero

出力列:

  • Exchange/Connector 名
  • 資産シンボル
  • 合計残高
  • 利用可能残高
  • USD 評価額(--usd 使用時)

create

新しいボット設定(controller config または script config)を作成します。

# List available controller templates
python scripts/create.py --list-controllers

# List available scripts
python scripts/create.py --list-scripts

# List existing configs
python scripts/create.py --list-configs

# Create a controller config
python scripts/create.py controller my_mm_config --template pmm_v1
推奨されるマーケットメイキングコントローラー
コントローラー最適な用途主な機能
pmm_v1CEX スポット取引複数レベルのスプレッド、インベントリースキュー、注文更新、価格バンド
pmm_misterスポット & パーペチュアルポジション追跡、レバレッジ、クールダウン、利益保護、ハンギングエクゼキューター

pmm_v1: 従来の Pure Market Making ストラテジーの忠実なクローンです。buy_spreads、sell_spreads、order_amount を設定し、inventory_skew を有効にしてバランスを維持します。

pmm_mister: スポット市場とパーペチュアル市場向けの高度なコントローラーで、leverage、take_profit、global_stop_loss、個別の buy_cooldown_time/sell_cooldown_time、および損益分岐点を下回る売却を防ぐ position_profit_protection を備えています。


start

V2 ストラテジー設定でボットを起動します。V1 ストラテジーはサポートされていません。

# Interactive mode - prompts for strategy type
python scripts/start.py <bot_name>

# Start with a V2 Controller config
python scripts/start.py <bot_name> --controller <config_name>

# Start with a V2 Script
python scripts/start.py <bot_name> --script <script_name>

# Start with a V2 Script and config file
python scripts/start.py <bot_name> --script <script_name> --config <config_name>

# List running bots
python scripts/start.py --list

V2 ストラテジーの種類:

  • --controller — V2 コントローラー設定(マーケットメイキング、アービトラージなど)をデプロイします
  • --script — V2 スクリプト(例: v2_with_controllers)をデプロイします

ボットの命名: btc_mm_bot、eth_arb_bot などの説明的な名前を使用してください。


stop

実行中のボットを停止します。

# Stop a bot by name
python scripts/stop.py <bot_name>

# Stop a bot and close all positions
python scripts/stop.py <bot_name> --close-positions

# Stop all running bots
python scripts/stop.py --all

# Examples
python scripts/stop.py my_bot
python scripts/stop.py arb_bot --close-positions

status

ボットのステータスとパフォーマンス指標を表示します。

# List all bots with status
python scripts/status.py

# Get detailed status for a specific bot
python scripts/status.py <bot_name>

# Get status with performance metrics
python scripts/status.py <bot_name> --performance

# Get live status (refreshes)
python scripts/status.py <bot_name> --live

ステータス値: running、stopped、error、starting

パフォーマンス指標:

  • 総取引数
  • 損益(絶対額と %)
  • 取引量
  • 稼働時間

history

ボットの取引履歴を表示します。

# Show trade history for a bot
python scripts/history.py <bot_name>

# Show summary statistics
python scripts/history.py <bot_name> --summary

履歴の列:

  • タイムスタンプ
  • 取引ペア
  • 売買(buy/sell)
  • 価格
  • 数量
  • 手数料
  • PnL

クイックリファレンス

一般的なワークフロー
# 1. Connect to an exchange
python scripts/connect.py binance --api-key XXX --secret-key YYY

# 2. Check your balances
python scripts/balance.py binance

# 3. Create a bot config
python scripts/create.py controller btc_mm \
  --template pure_market_making \
  --connector binance \
  --trading-pair BTC-USDT

# 4. Start the bot
python scripts/start.py btc_bot --controller btc_mm

# 5. Monitor status
python scripts/status.py btc_bot

# 6. Check history
python scripts/history.py btc_bot

# 7. Stop when done
python scripts/stop.py btc_bot
トラブルシューティング
エラー原因対処
Cannot connect to APIAPI が動作していないcd ./hummingbot-api && make deploy
401 Unauthorized認証情報が不正./hummingbot-api/.env を確認
Connector not found取引所名が無効python scripts/connect.py を実行して有効な名前を一覧表示
No credentials取引所が接続されていないpython scripts/connect.py <exchange> --api-key ... を実行

関連スキル

  • lp-agent — Meteora/Solana における専門的な DEX 流動性提供。CLMM 戦略に使用します。
  • hummingbot-deploy — Hummingbot API サーバーの初回セットアップ。このスキルを使用する前に実行してください。

コメント