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 hummingbot

Step 2: Install LX Connector

# Install the LX Gateway connector
cd gateway
npm install @lxdex/hummingbot-gateway-connector

Step 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
EOF

Step 4: Start Gateway

# Using Docker Compose
docker-compose up -d gateway

# Or manually
npm run start

Verify Gateway is running:

curl http://localhost:15888/lxdex/health

Expected response:

{
  "status": "healthy",
  "network": "testnet",
  "timestamp": 1702300000000
}

Step 5: Start Hummingbot Client

docker-compose up -d hummingbot
docker attach hummingbot

Step 6: Connect to LX

In the Hummingbot client:

>>> connect lxdex

Enter your wallet private key when prompted.

Step 7: Create a Simple Strategy

Let's create a basic market making strategy:

>>> create

Select options:

  1. Strategy: pure_market_making
  2. Exchange: lxdex
  3. Trading pair: LUX-USDC
  4. Bid spread: 0.5%
  5. Ask spread: 0.5%
  6. Order amount: 10

Step 8: Start Trading

>>> start

Watch your bot create orders! You can monitor with:

>>> status
>>> history
>>> open_orders

Step 9: Stop When Done

>>> stop
>>> exit

Quick Commands Reference

CommandDescription
connect lxdexConnect to LX
balanceCheck wallet balances
ticker LUX-USDCGet current price
createCreate new strategy
startStart strategy
stopStop strategy
statusCheck strategy status
historyView trade history

Verify on Explorer

Check your transactions on the Lux Explorer:

  1. Go to the explorer
  2. Search for your wallet address
  3. View your trading transactions

Troubleshooting

Gateway Connection Failed

# Check Gateway is running
curl http://localhost:15888/lxdex/health

# Check logs
docker logs gateway

Insufficient Balance

Get testnet LUX from the faucet.

Order Failed

Check slippage settings. For testnet with lower liquidity:

trading:
  slippagePct: 2.0  # Increase for testnet

Next Steps

Now that you have a basic setup:

  1. Strategy Guide: Learn advanced strategies
  2. API Reference: Full endpoint documentation
  3. Deploy to Mainnet: Go live with real funds

Mainnet Deployment

When ready for mainnet:

  1. Update configuration:
networks:
  - mainnet

mainnet:
  chainId: 93
  apiEndpoint: https://api.dex.lux.network
  wsEndpoint: wss://ws.dex.lux.network
  1. Fund your wallet with real LUX
  2. Start with small amounts
  3. Monitor closely for the first few hours

Getting Help