Skip to content

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, just enter your 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)
  • Maintenance Tier:
  • Maintainer: Hummingbot Foundation

Currently, Gate.io is a Silver exchange, as voted by HBOT holders in each quarterly Epoch. This means that Hummingbot Foundation maintains the components below via Bounties, tracking improvements made to the Gold exchange connectors of that type.

Component Status Notes
🔀 Spot Connector ✅ Supports MARKET order type
🔀 Perp Connector ✅
đŸ•¯ Spot Candles Feed ✅
đŸ•¯ Perp Candles Feed ✅

ℹī¸ Exchange Info

🔑 How to Connect

Generate API Keys

Step 1

  1. Go to Gate.io Log in or create a new account at https://www.gate.io/.

  2. Open the API Management page Hover over the profile icon on the top right corner and go to the API Management page:

  3. Click on the Create API Key button

    Create API

  4. Name your API keys

  5. 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 select Later instead but the API keys you create will only be valid for 90 days.

  6. Choose API v4 Key and a Classic Account type

    API Trading

  7. 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.
  8. Carefully read the Risk Reminder, tick both paragraphs, and click I Accept

    accept

  9. Enter Fund Password, choose 2FA Authentication method and enter its code

    fund password

  10. Copy your API keys and store them somewhere safe.

  11. Now, you have created API keys for your Gate.io exchange!

Add Keys to Hummingbot

From inside the Hummingbot client, run connect gate_io:

>>> connect gate_io

Enter your gate_io API key >>>
Enter your gate_io secret key >>>

If connection is successful:

You are now connected to gate_io

🔀 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 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

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

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

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.