Skip to main content
Gateway is DEX middleware that lets Hummingbot API trade on decentralized exchanges. It gives one interface for swapping tokens and providing liquidity across Solana and EVM chains.

What is Gateway?

Gateway is a separate service that:
  • Connects to blockchain RPCs
  • Stores wallet keys and signs transactions
  • Provides one API across different DEX protocols
  • Submits transactions and tracks their status
The Hummingbot API starts Gateway as a Docker container and talks to it over mutual TLS. Condor never talks to Gateway directly: every DEX action goes through the API. See Architecture.

Supported Connectors

These are the connectors in the hummingbot/gateway:development image. Your server’s own list is at GET /gateway/connectors.
  • Router connectors find a swap route across many pools.
  • AMM pools spread liquidity over the full price range.
  • CLMM (concentrated liquidity) pools let you choose a price range.

Supported Chains

Gateway groups networks under two chains. A network ID is chain-network, for example solana-mainnet-beta or ethereum-bsc. GET /gateway/networks lists every network ID on your server.

Setup

1. Start Gateway

Gateway doesn’t start with the API. Start it once from any of these:
  • Workspace: Settings → Gateway → Deploy Gateway. See Settings.
  • Telegram: /gateway → 🚀 Deploy Gateway.
  • API: POST /gateway/start. The body can be empty ({}). It defaults to the image hummingbot/gateway:development on port 15888.
Gateway always runs with TLS and mutual TLS. The API creates the certificates and uses your API’s CONFIG_PASSWORD as Gateway’s passphrase, so you don’t enter one. When the API runs in Docker, Gateway’s port is published on 127.0.0.1 only.

2. Add a wallet

Gateway signs transactions with a wallet stored on your server. Use a wallet that holds only what you’re prepared to trade with.
  • Workspace: Settings → Keys and Wallets → Add Wallet. See Add a Gateway wallet.
  • Telegram: /gateway → 🔑 Wallets → ➕ Add Wallet, pick the chain, then send the private key.
  • API:
set_default is optional and defaults to true: the new wallet becomes the default for its chain.

3. Configure networks

Each network has its own settings, such as its RPC endpoint (node_url) and default swap provider:
A POST to the same path updates them. Tokens and pools have their own subpaths: /gateway/networks/{network_id}/tokens and /gateway/networks/{network_id}/pools. In the Workspace, the same settings are under Settings → Gateway → Networks & RPC.

4. Check it’s running

Using Gateway through the API

Swaps

Get a quote with POST /gateway/swap/quote:
  • amount is always in the base token. For SELL it is the amount to sell; for BUY it is the amount to receive.
  • connector is a router name (jupiter), or a typed name such as raydium/amm or meteora/clmm to swap through one pool type.
POST /gateway/swap/execute takes the same fields and sends the swap. It also takes optional slippage_pct and wallet_address. Without wallet_address, it uses the chain’s default wallet. Past swaps are searchable with POST /gateway/swaps/search, and a transaction’s status is at GET /gateway/swaps/{transaction_hash}/status.

Liquidity positions

The /gateway/clmm endpoints take the bare connector name, such as raydium, meteora or orca. For example, pool-info answers 400 to connector=raydium/clmm.
To open a position, use POST /gateway/clmm/open. /gateway/clmm/add, /remove, /collect-fees and /close act on an existing position by its position_address. Full-range AMM liquidity has its own router under /gateway/amm. To run a position that is monitored and closed for you, use an LP executor. For a complete example, see Guide: Solana DEX LP Expert Agent.

Gateway vs CEX Connectors

Resources

Gateway GitHub

Gateway source code

Gateway Docs

Full Gateway documentation