Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/hummingbot/hummingbot/llms.txt

Use this file to discover all available pages before exploring further.

Gateway is a TypeScript-based API middleware that provides standardized connectors for interacting with Automated Market Maker (AMM) decentralized exchanges (DEXs) across different blockchain networks.

What is Gateway?

Gateway serves as a bridge between Hummingbot and blockchain-based DEXs, enabling you to:
  • Trade on AMM DEXs without writing blockchain-specific code
  • Access multiple blockchain networks through a unified API
  • Interact with different DEX protocols using standardized methods
  • Execute swaps and manage liquidity positions across chains

Architecture

Gateway acts as a separate service that runs alongside Hummingbot:

DEX Connector Types

Gateway supports three types of AMM DEX connectors:

Router

DEX aggregators that find optimal swap routes across multiple liquidity pools.Examples: Uniswap Router, 0x Protocol, Jupiter

AMM

Traditional constant product (x*y=k) liquidity pools.Examples: SushiSwap, PancakeSwap, Trader Joe

CLMM

Concentrated Liquidity Market Makers with custom price ranges.Examples: Uniswap V3, Raydium CLMM, Meteora

Key Features

Unified API Interface

Gateway provides a consistent API regardless of the underlying blockchain or DEX protocol:
  • Swap operations: Execute token swaps across different DEXs
  • Liquidity management: Add and remove liquidity from pools
  • Price queries: Get real-time pricing information
  • Balance checking: Query wallet balances across chains

Non-Custodial Trading

All transactions are executed directly from your wallet:
  • You maintain full control of your private keys
  • No need to deposit funds to an exchange
  • Direct interaction with smart contracts

Multi-Chain Support

Access multiple blockchain networks through a single interface, including:
  • EVM-compatible chains (Ethereum, Polygon, BSC, Avalanche, etc.)
  • Solana
  • And more (see Supported Chains)

Use Cases

Execute arbitrage strategies between different DEXs on the same chain or across multiple chains.
Automate liquidity provision and management across multiple AMM pools.
Run market making strategies on AMM DEXs using the AMM Arbitrage strategy.
Automatically rebalance token holdings across different chains and protocols.

Gateway vs Direct Integration

Gateway is specifically designed for AMM DEX connectors. Here’s how it differs from other connector types:
FeatureGateway (AMM DEX)CLOB DEXCLOB CEX
CustodyNon-custodialNon-custodialCustodial
ConnectionWallet keys via GatewayWallet keys directAPI keys
Order BookNo (uses liquidity pools)Yes (on-chain)Yes (centralized)
MiddlewareRequiredNot requiredNot required
ExamplesUniswap, PancakeSwapdYdX, HyperliquidBinance, OKX
CLOB DEX connectors (like dYdX or Hyperliquid) connect directly to Hummingbot without Gateway, as they use order book-based trading similar to centralized exchanges.

How Gateway Works

1

Request Initiated

Hummingbot sends a trading request to Gateway via HTTP/HTTPS API.
2

Transaction Preparation

Gateway formats the request into a blockchain transaction and estimates gas fees.
3

Transaction Signing

The transaction is signed using your wallet’s private key stored in Gateway.
4

Blockchain Submission

Gateway submits the signed transaction to the appropriate blockchain network.
5

Confirmation

Gateway monitors the transaction status and returns the result to Hummingbot.

Security Considerations

Gateway stores your wallet private keys. By default, it runs in development mode with unencrypted HTTP endpoints. For production use, always enable HTTPS mode with certificate-based authentication.
See Configuration for details on running Gateway securely in production.

Next Steps

Installation

Set up Gateway with Hummingbot

Configuration

Configure Gateway for production use

Supported Chains

View all supported blockchains and DEXs

AMM DEX Connectors

Learn about AMM DEX connector strategies