Gate.io
Support Hummingbot
Hummingbot Foundation has a fee share partnership with Gate.io. When you use our software to trade on Gate.io, a custom API header tells Gate.io 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 Gate.io 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 | |
đ¯ Spot Candles Feed | â | |||
đ¯ Perp Candles Feed | â |
âšī¸ Exchange Info¶
- Website: https://www.gate.io
- CoinMarketCap: https://coinmarketcap.com/exchanges/
- CoinGecko: https://www.coingecko.com/en/exchanges/gate-io
- API Docs: https://www.gate.io/docs/apiv4/en/index.html
- Fees: https://www.gate.io/fee?
- Supported Countries: https://www.gate.io/help/c2c/c2ctrade/21130/Which-Counties-Regions-are-supported-by-our-OTC-Services
- Gate.io referral link: https://www.gate.io/signup/5868285
đ How to Connect¶
Generate API Keys¶
Step 1
-
Go to Gate.io Log in or create a new account at https://www.gate.io/.
-
Open the API Management page Hover over the profile icon on the top right corner and go to the API Management page:
-
Click on the Create API Key button
-
Name your API keys
-
Add IP whitelist (optional) Enable
Bind IP
and input the IP addresses, separated by a comma. You'll need to find the public IP address of the machine you are running Hummingbot If you don't want to whitelist your IP then selectLater
instead but the API keys you create will only be valid for 90 days. -
Choose API v4 Key and a Classic Account type
-
Select Permissions Please select the following permissions and then click on the Submit button.
- [Spot/Margin Trade] -> [Read And Write] - it allows trading Spot and Margin
- [Perpetual Contract] -> [Read And Write] - this will allow trading Futures.
- [Wallet ] -> [Read Only] -> this is necessary to display the balances correctly.
-
Carefully read the Risk Reminder, tick both paragraphs, and click I Accept
-
Enter Fund Password, choose 2FA Authentication method and enter its code
-
Copy your API keys and store them somewhere safe.
-
Now, you have created API keys for your Gate.io exchange!
Add Keys to Hummingbot¶
From inside the Hummingbot client, run connect gate_io
:
If connection is successful:
đ Spot Connector¶
Integration to spot markets API endpoints
- ID:
gate_io
- Connection Type: WebSocket
- Folder: https://github.com/hummingbot/hummingbot/tree/master/hummingbot/connector/exchange/gate_io
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 gate_io_paper_trade
instead of connect gate_io
.
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:
gate_io_perpetual
- Connection Type: WebSocket
- Folder: https://github.com/hummingbot/hummingbot/tree/master/hummingbot/connector/derivative/gate_io_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://www.gate.io/testnet/futures_trade/USDT/BTC_USDT
Users can use the perpetual testnet by clicking on the link above - however the testnet does not currently work with Hummingbot
đ¯ Spot Candles Feed¶
Collect historical OHCLV data from this exchange's spot markets
- ID:
gate_io
- Supported Intervals:
10s
|1m
|5m
|15m
|30m
|1h
|2h
|4h
|6h
|8h
|12h
|1d
|7d
|30d
- Folder: https://github.com/hummingbot/hummingbot/tree/master/hummingbot/data_feed/candles_feed/gate_io_spot_candles
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="gate_io",
trading_pair="ETH-USDT",
interval="1m", max_records=50)
See candles_example.py for more details.
đ¯ Perp Candles Feed¶
Collect historical OHCLV data from this exchange's perp markets
- ID:
gate_io_perpetual
- Supported Intervals:
1m
|5m
|15m
|30m
|1h
|2h
|4h
|6h
|8h
|12h
|1d
|7d
- Folder: https://github.com/hummingbot/hummingbot/tree/master/hummingbot/data_feed/candles_feed/gate_io_perpetual_candles
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="gate_io_perpetual",
trading_pair=trading_pair,
interval="3m", max_records=50)
See candles_example.py for more details.