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.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.
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
Cross-DEX Arbitrage
Cross-DEX Arbitrage
Execute arbitrage strategies between different DEXs on the same chain or across multiple chains.
Liquidity Provision
Liquidity Provision
Automate liquidity provision and management across multiple AMM pools.
Market Making
Market Making
Run market making strategies on AMM DEXs using the AMM Arbitrage strategy.
Portfolio Rebalancing
Portfolio Rebalancing
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:| Feature | Gateway (AMM DEX) | CLOB DEX | CLOB CEX |
|---|---|---|---|
| Custody | Non-custodial | Non-custodial | Custodial |
| Connection | Wallet keys via Gateway | Wallet keys direct | API keys |
| Order Book | No (uses liquidity pools) | Yes (on-chain) | Yes (centralized) |
| Middleware | Required | Not required | Not required |
| Examples | Uniswap, PancakeSwap | dYdX, Hyperliquid | Binance, 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
Transaction Preparation
Gateway formats the request into a blockchain transaction and estimates gas fees.
Security Considerations
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