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¶
- Website: https://www.binance.com
- CoinMarketCap: https://coinmarketcap.com/exchanges/binance/
- CoinGecko: https://www.coingecko.com/en/exchanges/binance
- Fees: https://www.binance.com/en/fee/schedule
- Supported Countries: https://www.binance.com/en/support/faq/115003824812
- Binance referral link: https://accounts.binance.com/register?ref=CBWO4LU6
đ 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
:
If connection is successful:
đ Spot Connector¶
Integration to spot markets API endpoints
- ID:
binance
- Connection Type: WebSocket
- API Docs: https://binance-docs.github.io/apidocs/spot/en/
- Github Folder
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
- ID:
binance_perpetual
- Connection Type: WebSocket
- Github Folder
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:
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
- ID:
binance
- Supported Intervals: 1s | 1m | 3m | 5m | 15m | 30m | 1h | 2h | 4h | 6h | 8h | 12h | 1d | 3d | 1w | 1M
- API Docs: https://binance-docs.github.io/apidocs/futures/en/
- 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",
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.