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
Connectors are Hummingbot’s standardized interfaces to exchanges, abstracting the differences between REST APIs, WebSocket feeds, and trading protocols. They enable strategies to interact with multiple exchanges using a unified API.Connector Architecture
All exchange connectors inherit from a base class that provides common functionality:hummingbot/connector/exchange_py_base.py:37-84.
Core Connector Components
Order Book Data Source
Manages WebSocket connections for real-time order book updates
- Subscribes to order book snapshots and diffs
- Handles order book message parsing
- Maintains order book state
Trading Rules
Stores exchange-specific trading constraintsSource:
hummingbot/connector/trading_rule.pyx:11-40.Connector Types by Exchange Architecture
Hummingbot categorizes connectors by exchange type and market structure. See Exchange Types for details on CLOB CEX, CLOB DEX, and AMM DEX.CLOB CEX Connectors
Centralized exchange connectors connect via REST API and WebSocket:- Authentication: API key + secret
- Order Book: Real-time WebSocket feeds
- Balance Management: Exchange-custodied funds
- Examples: Binance, OKX, Bybit, KuCoin
CLOB DEX Connectors
Decentralized exchanges with on-chain order books:- Authentication: Wallet private key
- Order Book: On-chain or hybrid (off-chain matching, on-chain settlement)
- Balance Management: Non-custodial wallet
- Examples: dYdX, Hyperliquid, Injective, Vertex
AMM DEX Connectors (Gateway)
AMM connectors use the Gateway middleware to interact with DeFi protocols:- Authentication: Wallet private key (managed by Gateway)
- Order Book: Simulated from AMM pool state
- Balance Management: On-chain wallet balance
- Examples: Uniswap, PancakeSwap, Raydium, Curve
hummingbot/connector/gateway/gateway_base.py.
Connector Lifecycle
Trading Rules Update
Fetches exchange-specific trading constraints (min order size, tick size, etc.)Runs every 30 minutes:
TRADING_RULES_INTERVAL = 30 * MINUTEConnector Development
To create a new connector, implement the abstract methods:hummingbot/connector/exchange_py_base.py:91-150.
Related Concepts
- Exchange Types - CLOB CEX, CLOB DEX, AMM DEX
- Order Types - Market, limit, and other order types
- Market Data - Order book and trade data structures