Skip to main content
Hummingbot is an open source framework for building and running automated trading strategies. Hummingbot API loads the Hummingbot Python library in-process for exchange connectivity, market data and executors. Bots that the API deploys are Docker containers running the Hummingbot client.

Why Hummingbot?

  • Open source: Apache 2.0 licensed. All code is on GitHub.
  • In production since 2019: CoinAlpha open-sourced Hummingbot in April 2019.
  • Self-hosted: your API keys and wallet keys stay on your server. The API encrypts exchange credentials with your CONFIG_PASSWORD.
  • No intermediary: connectors talk to each exchange’s API directly.
  • Standardized connectors: every exchange is reached through the same interface, so the API’s trading, market data and executor endpoints work the same across them.
  • Isolated bots: each bot runs in its own container, with its own configuration, data and logs.

How Hummingbot API Uses It

Exchange connectors

The API builds a Hummingbot connector for each account and exchange you add credentials for, and uses it for trading, balances and market data. These are the same classes the Hummingbot client uses, for example:
You don’t import these yourself. Call the API’s endpoints with the connector’s name (binance, hyperliquid, and so on).

Executors

Executors run inside the API, using Hummingbot’s executor classes. No bot container is needed. You create one with POST /executors/ and a config such as a position_executor config. See Executors, and Position Executor for a full API example.

Bot containers

When you deploy a bot (POST /bot-orchestration/deploy-v2-controllers or deploy-v2-script), the API:
  • Names the bot <instance_name>-<timestamp> and creates its folder under bots/instances/, with its own conf, data and logs
  • Starts a container from the hummingbot/hummingbot:latest image by default
  • Passes it your CONFIG_PASSWORD so it can decrypt the exchange credentials
  • Gives it the broker credentials and the Gateway client certificates
Each bot reports its status and performance to the API through the EMQX broker. You can start, stop and archive bots through the API.

Connector Coverage

The API’s GET /connectors/ lists every connector your server supports. On the current image that is more than 40 exchange connectors, not counting testnets, plus one entry per Gateway network. Some of the connector names it returns: To connect one, see Exchange Credentials.

Resources

Hummingbot Docs

Full Hummingbot documentation

GitHub

Hummingbot source code