Testnet Overview

LX Testnet - risk-free environment for development, testing, and integration

LX Testnet

Network: Lux Testnet | Chain ID: 96370 | Status: status.testnet.lux.network

The LX Testnet provides a full-featured, production-mirror environment for developing, testing, and validating your trading integrations without risking real assets.

Why Use Testnet

Risk-Free Development

  • No Real Assets: Trade with test tokens that have no monetary value
  • Unlimited Experimentation: Test edge cases, stress scenarios, and failure modes
  • Safe Integration Testing: Validate your systems before mainnet deployment

Production Parity

  • Identical APIs: Same endpoints, protocols, and message formats as mainnet
  • Same Performance: Sub-millisecond matching engine with identical characteristics
  • Full Feature Set: All trading features available including limit orders, market orders, and advanced order types

Developer Experience

  • Instant Access: No KYC, no approval process, start trading immediately
  • Free Test Tokens: Generous faucet with no rate limits for development
  • Detailed Logging: Enhanced debug output and request tracing
  • Reset Cycles: Predictable data resets for reproducible testing

Network Information

PropertyValue
Network NameLux DEX Testnet
Chain ID96370
Native TokentLUX (Test LUX)
Block Time1ms
ConsensusLux Consensus

Endpoints Quick Reference

ServiceURL
JSON-RPChttps://testnet-api.lux.network/rpc
WebSocketwss://testnet-api.lux.network/ws
REST APIhttps://testnet-api.lux.network/v1
gRPCtestnet-api.lux.network:9760
Faucethttps://faucet.testnet.lux.network
Explorerhttps://explorer.testnet.lux.network

Quick Start

1. Get Test Tokens

# Request tokens via CLI
curl -X POST https://faucet.testnet.lux.network/api/request \
  -H "Content-Type: application/json" \
  -d '{"address": "your_address", "tokens": ["tLUX", "tUSDC", "tBTC"]}'

2. Connect to Testnet

import { Client } from '@luxfi/trading';

const client = new Client({
  network: 'testnet',
  // Or explicitly:
  // rpcUrl: 'https://testnet-api.lux.network/rpc',
  // wsUrl: 'wss://testnet-api.lux.network/ws',
});

3. Place Your First Order

const order = await client.placeOrder({
  symbol: 'tBTC-tUSDC',
  type: 'limit',
  side: 'buy',
  price: 50000,
  size: 0.1,
});

console.log(`Order placed: ${order.orderId}`);

Testnet vs Mainnet

AspectTestnetMainnet
AssetsTest tokens (tLUX, tBTC, tUSDC)Real assets
Monetary ValueNoneReal value
KYC RequiredNoYes (for large volumes)
Rate LimitsRelaxedStandard
Data PersistenceWeekly resetsPermanent
API KeysOptionalRequired
SupportCommunityPriority

Use Cases

Integration Development

Build and test your trading systems against a live order book:

// Connect to testnet WebSocket
const ws = new WebSocket('wss://testnet-api.lux.network/ws');

ws.onopen = () => {
  ws.send(JSON.stringify({
    type: 'subscribe',
    channel: 'orderbook',
    symbol: 'tBTC-tUSDC',
  }));
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  // Process order book updates
  processOrderBook(data);
};

Strategy Backtesting

Test trading strategies with realistic market conditions:

from lux_dex import Client

client = Client(network='testnet')

# Execute paper trading strategy
for signal in strategy.signals():
    if signal.type == 'buy':
        client.place_order(
            symbol='tBTC-tUSDC',
            side='buy',
            order_type='limit',
            price=signal.price,
            size=signal.size
        )

Load Testing

Validate system behavior under high throughput:

# Generate high-frequency order flow
for i in {1..1000}; do
  curl -X POST https://testnet-api.lux.network/rpc \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "lx_placeOrder",
      "params": {
        "symbol": "tBTC-tUSDC",
        "type": 0,
        "side": 0,
        "price": '$((50000 + RANDOM % 1000))',
        "size": 0.01,
        "userID": "loadtest"
      },
      "id": '$i'
    }' &
done
wait

CI/CD Integration

Automate testing in your deployment pipeline:

# .github/workflows/integration-tests.yml
name: Integration Tests

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run integration tests
        env:
          LX_DEX_NETWORK: testnet
          LX_DEX_RPC_URL: https://testnet-api.lux.network/rpc
        run: |
          npm run test:integration

Testnet Rules

  1. No Real Value: Test tokens have no monetary value and cannot be exchanged
  2. Data Resets: All data is reset weekly (Sundays 00:00 UTC)
  3. Fair Use: Avoid excessive load that impacts other users
  4. No SLA: Testnet availability is best-effort
  5. Public Network: Do not store sensitive data

Getting Help

Next Steps