Integrations
Hummingbot Quick Start
Get started with Hummingbot and LX in 5 minutes
Hummingbot Quick Start
Get your first trading bot running on LX in under 5 minutes.
Prerequisites
- Docker installed
- A Lux wallet with some LUX for gas
- Basic terminal/command line knowledge
Step 1: Clone Hummingbot
git clone https://github.com/hummingbot/hummingbot.git
cd hummingbotStep 2: Install LX Connector
# Install the LX Gateway connector
cd gateway
npm install @lxdex/hummingbot-gateway-connectorStep 3: Configure LX
Create the configuration file:
cat > conf/lxdex.yml << 'EOF'
enabled: true
chain: lux
networks:
- testnet # Start with testnet!
trading:
slippagePct: 0.5
maxHops: 3
testnet:
chainId: 9393
apiEndpoint: https://api.testnet.dex.lux.network
wsEndpoint: wss://ws.testnet.dex.lux.network
EOFStep 4: Start Gateway
# Using Docker Compose
docker-compose up -d gateway
# Or manually
npm run startVerify Gateway is running:
curl http://localhost:15888/lxdex/healthExpected response:
{
"status": "healthy",
"network": "testnet",
"timestamp": 1702300000000
}Step 5: Start Hummingbot Client
docker-compose up -d hummingbot
docker attach hummingbotStep 6: Connect to LX
In the Hummingbot client:
>>> connect lxdexEnter your wallet private key when prompted.
Step 7: Create a Simple Strategy
Let's create a basic market making strategy:
>>> createSelect options:
- Strategy:
pure_market_making - Exchange:
lxdex - Trading pair:
LUX-USDC - Bid spread:
0.5% - Ask spread:
0.5% - Order amount:
10
Step 8: Start Trading
>>> startWatch your bot create orders! You can monitor with:
>>> status
>>> history
>>> open_ordersStep 9: Stop When Done
>>> stop
>>> exitQuick Commands Reference
| Command | Description |
|---|---|
connect lxdex | Connect to LX |
balance | Check wallet balances |
ticker LUX-USDC | Get current price |
create | Create new strategy |
start | Start strategy |
stop | Stop strategy |
status | Check strategy status |
history | View trade history |
Verify on Explorer
Check your transactions on the Lux Explorer:
- Go to the explorer
- Search for your wallet address
- View your trading transactions
Troubleshooting
Gateway Connection Failed
# Check Gateway is running
curl http://localhost:15888/lxdex/health
# Check logs
docker logs gatewayInsufficient Balance
Get testnet LUX from the faucet.
Order Failed
Check slippage settings. For testnet with lower liquidity:
trading:
slippagePct: 2.0 # Increase for testnetNext Steps
Now that you have a basic setup:
- Strategy Guide: Learn advanced strategies
- API Reference: Full endpoint documentation
- Deploy to Mainnet: Go live with real funds
Mainnet Deployment
When ready for mainnet:
- Update configuration:
networks:
- mainnet
mainnet:
chainId: 93
apiEndpoint: https://api.dex.lux.network
wsEndpoint: wss://ws.dex.lux.network- Fund your wallet with real LUX
- Start with small amounts
- Monitor closely for the first few hours
Getting Help
- Discord: Join our community
- GitHub: Report issues
- Hummingbot Discord: Hummingbot community