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.
Overview
Hummingbot connectors standardize interfaces to three fundamentally different types of exchanges, each with distinct trading mechanisms, custody models, and technical architectures.CLOB CEX (Centralized Exchange Order Book)
Central Limit Order Book (CLOB) on Centralized Exchanges (CEX) are traditional cryptocurrency exchanges with custodial wallets.Characteristics
Custody
Custodial - Exchange holds your funds. You deposit assets to exchange wallets.
Connection
API Keys - Connect using API key + secret (and sometimes passphrase).
Order Matching
Off-chain - Order matching happens on exchange servers, instant execution.
Settlement
Off-chain - Trades settle in exchange internal ledger, no blockchain transaction required.
Market Types
Spot Markets: Trading physical cryptocurrency assets.- Connector suffix: None (e.g.,
binance,okx) - Order types: Market, limit, limit maker
- Examples: Binance Spot, OKX Spot, KuCoin Spot
- Connector suffix:
_perpetual(e.g.,binance_perpetual,okx_perpetual) - Additional features: Funding rates, position modes (hedge/one-way), leverage
- Order types: Market, limit, stop-loss, take-profit
- Examples: Binance Futures, OKX Perpetuals, Bybit Perpetuals
Examples
| Exchange | Spot Connector | Perpetual Connector | Type |
|---|---|---|---|
| Binance | binance | binance_perpetual | CLOB CEX |
| OKX | okx | okx_perpetual | CLOB CEX |
| Bybit | bybit | bybit_perpetual | CLOB CEX |
| KuCoin | kucoin | kucoin_perpetual | CLOB CEX |
| Gate.io | gate_io | gate_io_perpetual | CLOB CEX |
CLOB DEX (Decentralized Exchange Order Book)
Central Limit Order Book (CLOB) on Decentralized Exchanges (DEX) use blockchain-based or hybrid order books with non-custodial wallets.Characteristics
Custody
Non-custodial - You control your funds via private key. No deposits required.
Connection
Wallet Keys - Connect using wallet private key or seed phrase.
Order Matching
On-chain or Hybrid - Orders may be matched on-chain or off-chain depending on design.
Settlement
On-chain - Trades require blockchain transactions, may have gas fees and latency.
Architecture Variants
Fully On-Chain Order Books
Fully On-Chain Order Books
All order operations (place, cancel, match) happen on-chain.
- Higher latency (block time)
- Gas fees for all operations
- Maximum decentralization
- Example: XRP Ledger, early Dexalot
Hybrid Order Books
Hybrid Order Books
Orders placed off-chain, settlement on-chain.
- Fast order placement and cancellation
- Gas fees only on settlement
- Reduced blockchain load
- Examples: dYdX v4, Hyperliquid, Injective, Vertex
Market Types
Spot Markets: Trading tokens directly on-chain.- Examples: Hyperliquid Spot, Injective Spot, Vertex Spot
- Connector examples:
hyperliquid,injective_v2,vertex
- Examples: dYdX v4, Hyperliquid Perps, Injective Perps
- Connector examples:
dydx_v4_perpetual,hyperliquid_perpetual,injective_v2_perpetual
Examples
| Exchange | Spot Connector | Perpetual Connector | Type |
|---|---|---|---|
| Hyperliquid | hyperliquid | hyperliquid_perpetual | CLOB DEX |
| dYdX v4 | - | dydx_v4_perpetual | CLOB DEX |
| Injective | injective_v2 | injective_v2_perpetual | CLOB DEX |
| Vertex | vertex | - | CLOB DEX |
| Derive | derive | derive_perpetual | CLOB DEX |
| XRP Ledger | xrpl | - | CLOB DEX |
AMM DEX (Automated Market Maker)
Automated Market Maker (AMM) decentralized exchanges use liquidity pools and algorithmic pricing instead of order books.Characteristics
Custody
Non-custodial - Assets in smart contract pools or your wallet.
Connection
Gateway Middleware - Hummingbot connects via Gateway to blockchain nodes.
Pricing
Algorithmic - Prices determined by pool ratios (e.g., constant product x*y=k).
Settlement
On-chain - All swaps are blockchain transactions with gas fees.
AMM Sub-Types
Router DEXs
Router DEXs
DEX aggregators that route trades across multiple pools for best prices.
- Examples: 0x Protocol, Jupiter
- Features: Multi-hop routing, price optimization
- Connectors:
0x,jupiter
AMM (Constant Product)
AMM (Constant Product)
Traditional AMMs using constant product formula (x*y=k).
- Examples: Uniswap V2, PancakeSwap, SushiSwap
- Features: Simple liquidity pools, full-range liquidity
- Connectors:
uniswap,pancakeswap,sushiswap,traderjoe,quickswap,balancer,curve
CLMM (Concentrated Liquidity)
CLMM (Concentrated Liquidity)
Concentrated Liquidity Market Makers with custom price ranges.
- Examples: Uniswap V3, Raydium CLMM, Meteora
- Features: Capital efficiency, custom liquidity ranges, higher fees
- Connectors:
uniswap(V3),raydium(CLMM mode),meteora
Gateway Middleware
AMM connectors require Gateway, a separate TypeScript service that interfaces with blockchain nodes:- Blockchain node connectivity (Ethereum, BSC, Polygon, Solana, etc.)
- Smart contract interaction
- Wallet management and transaction signing
- Standardized APIs for AMM interactions
Examples
| DEX | Type | Sub-Type | Connector |
|---|---|---|---|
| Uniswap | AMM DEX | Router, AMM, CLMM | uniswap |
| PancakeSwap | AMM DEX | AMM | pancakeswap |
| Raydium | AMM DEX | AMM, CLMM | raydium |
| Curve | AMM DEX | AMM | curve |
| 0x Protocol | AMM DEX | Router | 0x |
| Jupiter | AMM DEX | Router | jupiter |
| Meteora | AMM DEX | CLMM | meteora |
| SushiSwap | AMM DEX | AMM | sushiswap |
| Balancer | AMM DEX | AMM | balancer |
Comparison Matrix
| Feature | CLOB CEX | CLOB DEX | AMM DEX |
|---|---|---|---|
| Custody | Custodial | Non-custodial | Non-custodial |
| Auth Method | API Keys | Wallet Keys | Wallet Keys (via Gateway) |
| Order Placement | Instant | Fast (hybrid) or slow (on-chain) | N/A (direct swaps) |
| Gas Fees | No | Yes (on settlement) | Yes (every swap) |
| Latency | Low (ms) | Medium (hybrid) to High (on-chain) | High (block time) |
| Order Types | Market, Limit, Stop | Market, Limit | Swap only |
| Slippage | Low (order book) | Low (order book) | Can be high (pool depth) |
| MEV Risk | No | Yes | Yes |
| Liquidity | Deep | Varies | Pool-dependent |
Choosing an Exchange Type
Related Concepts
- Connectors - Technical implementation of exchange interfaces
- Strategies - Trading strategies that work across exchange types
- Order Types - Different order execution methods