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.

Was this page helpful?