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.

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
Perpetual Markets: Trading perpetual futures contracts with leverage.
  • 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

ExchangeSpot ConnectorPerpetual ConnectorType
Binancebinancebinance_perpetualCLOB CEX
OKXokxokx_perpetualCLOB CEX
Bybitbybitbybit_perpetualCLOB CEX
KuCoinkucoinkucoin_perpetualCLOB CEX
Gate.iogate_iogate_io_perpetualCLOB CEX
Source: README.md:102-131.

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

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
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
Perpetual Markets: On-chain perpetual futures trading.
  • Examples: dYdX v4, Hyperliquid Perps, Injective Perps
  • Connector examples: dydx_v4_perpetual, hyperliquid_perpetual, injective_v2_perpetual

Examples

ExchangeSpot ConnectorPerpetual ConnectorType
Hyperliquidhyperliquidhyperliquid_perpetualCLOB DEX
dYdX v4-dydx_v4_perpetualCLOB DEX
Injectiveinjective_v2injective_v2_perpetualCLOB DEX
Vertexvertex-CLOB DEX
Derivederivederive_perpetualCLOB DEX
XRP Ledgerxrpl-CLOB DEX
Source: README.md:106-132.

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

DEX aggregators that route trades across multiple pools for best prices.
  • Examples: 0x Protocol, Jupiter
  • Features: Multi-hop routing, price optimization
  • Connectors: 0x, jupiter
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
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:
# Install Hummingbot with Gateway
make setup
# Answer 'y' when prompted:
Include Gateway? [y/N]
Gateway provides:
  • Blockchain node connectivity (Ethereum, BSC, Polygon, Solana, etc.)
  • Smart contract interaction
  • Wallet management and transaction signing
  • Standardized APIs for AMM interactions
Source: README.md:52-78.

Examples

DEXTypeSub-TypeConnector
UniswapAMM DEXRouter, AMM, CLMMuniswap
PancakeSwapAMM DEXAMMpancakeswap
RaydiumAMM DEXAMM, CLMMraydium
CurveAMM DEXAMMcurve
0x ProtocolAMM DEXRouter0x
JupiterAMM DEXRouterjupiter
MeteoraAMM DEXCLMMmeteora
SushiSwapAMM DEXAMMsushiswap
BalancerAMM DEXAMMbalancer
Source: README.md:139-162.

Comparison Matrix

FeatureCLOB CEXCLOB DEXAMM DEX
CustodyCustodialNon-custodialNon-custodial
Auth MethodAPI KeysWallet KeysWallet Keys (via Gateway)
Order PlacementInstantFast (hybrid) or slow (on-chain)N/A (direct swaps)
Gas FeesNoYes (on settlement)Yes (every swap)
LatencyLow (ms)Medium (hybrid) to High (on-chain)High (block time)
Order TypesMarket, Limit, StopMarket, LimitSwap only
SlippageLow (order book)Low (order book)Can be high (pool depth)
MEV RiskNoYesYes
LiquidityDeepVariesPool-dependent

Choosing an Exchange Type

Use CLOB CEX when:
  • You need high-frequency trading with low latency
  • You want deep liquidity and tight spreads
  • You’re comfortable with custodial risk
  • You need advanced order types (stop-loss, trailing stop, etc.)
Use CLOB DEX when:
  • You want non-custodial trading with order book efficiency
  • You’re trading on-chain derivatives or exotic pairs
  • You need transparency and censorship resistance
  • You can tolerate gas fees and some latency
Use AMM DEX when:
  • You’re trading long-tail assets not on centralized exchanges
  • You want to provide liquidity and earn fees
  • You need permissionless, unstoppable trading
  • You’re comfortable with impermanent loss and gas costs
  • Connectors - Technical implementation of exchange interfaces
  • Strategies - Trading strategies that work across exchange types
  • Order Types - Different order execution methods