Skip to content

Binance

Support Hummingbot

Hummingbot Foundation has a fee share partnership with Binance. When you use our software to trade on Binance, a custom API header tells Binance that the trade was executed using Hummingbot, so they share a portion of your fees with us, at no cost to you. To support us, create an account using our Binance referral link and enter that account's API keys into Hummingbot and run bots! Thanks for your support! 🙏

🛠 Connector Info

  • Exchange Type: Centralized Exchange (CEX)
  • Market Type: Central Limit Order Book (CLOB)
Component Status Connector Version V2 Strategies Notes
🔀 Spot Connector ✅ v2.1 Yes Supports MARKET order type
🔀 Perp Connector ✅ v2.1 Yes Supports testnet
đŸ•¯ Spot Candles Feed ✅
đŸ•¯ Perp Candles Feed ✅
📓 Connector Guide ✅

ℹī¸ Exchange Info

🔑 How to Connect

Tip

See the Binance Connector Guide for details on create API keys on Binance.

From inside the Hummingbot client, run connect binance:

>>> connect binance

Enter your binance API key >>>
Enter your binance secret key >>>

If connection is successful:

You are now connected to binance

🔀 Spot Connector

Integration to spot markets API endpoints

Order Types

This connector supports the following OrderType constants:

  • LIMIT
  • LIMIT_MAKER
  • MARKET

Paper Trading

Access the Paper Trade version of this connector by running connect binance_paper_trade instead of connect binance.

If this is not available by default, you can configure Hummingbot to add this paper trade exchange. See Adding Exchanges for more information.

🔀 Perp Connector

Integration to perpetual futures markets API endpoints

Usage

From inside the Hummingbot client, run connect binance_perpetual:

>>> connect binance_perpetual

Enter your binance_perpetual API key >>>
Enter your binance_perpetual secret key >>>

If connection is successful:

You are now connected to binance_perpetual

Order Types

This connector supports the following OrderType constants:

  • LIMIT
  • LIMIT_MAKER
  • MARKET

Position Modes

This connector supports the following position modes:

  • One-way
  • Hedge

Paper Trading

This perp exchange offers a paper trading mode: https://testnet.binancefuture.com

Afer you create an account and create the API keys, you can enter them by using the connect binance_perpetual_testnet command within the Hummingbot client. Once connected, you should be able to use the testnet with the available perpetual strategies / scripts.

đŸ•¯ Spot Candles Feed

OHLCV candles data collector from spot markets

Usage

In a Hummingbot script, import CandlesFactory to create the candles that you want:

    from hummingbot.data_feed.candles_feed.candles_factory import CandlesFactory
    candles = CandlesFactory.get_candle(connector="binance",
                                        trading_pair="ETH-USDT",
                                        interval="1m", max_records=50)

See candles_example.py for more details.

đŸ•¯ Perp Candles Feed

OHLCV candles data collector from perpetual futures markets

  • ID: binance_perpetual
  • Supported Intervals: 1s | 1m | 3m | 5m | 15m | 30m | 1h | 2h | 4h | 6h | 8h | 12h | 1d | 3d | 1w | 1M
  • Github Folder

Usage

In a Hummingbot script, import CandlesFactory to create the candles that you want:

    from hummingbot.data_feed.candles_feed.candles_factory import CandlesFactory
    candles = CandlesFactory.get_candle(connector="binance_perpetual",
                                        trading_pair=trading_pair,
                                        interval="3m", max_records=50)

See candles_example.py for more details.