FAQ

Frequently asked questions about LX trading, APIs, and integration

Frequently Asked Questions

General

What is LX?

LX is a high-performance decentralized exchange built on the Lux blockchain. It features:

  • Sub-microsecond order matching
  • On-chain order book with 1ms finality
  • Multi-backend support (Go, C++, GPU acceleration)
  • Professional-grade APIs (WebSocket, gRPC, FIX)

How is LX different from other DEXs?

FeatureLXAMM DEXsOther Order Book DEXs
Latency~1μs~seconds~100ms
Order BookFull on-chainNoneHybrid/off-chain
Finality1msBlock timeVaries
MEV ProtectionBuilt-inLimitedVaries

Is LX audited?

Yes. See our Security page for audit reports and bug bounty program.

Trading

What trading pairs are available?

Check the live markets at:

curl https://api.dex.lux.network/v1/markets

Or via WebSocket:

{"type": "get_markets"}

What are the fees?

TypeFee
Maker0.02%
Taker0.05%
WithdrawalNetwork gas only

Volume-based discounts available for high-volume traders.

What order types are supported?

  • Limit: Execute at specified price or better
  • Market: Execute immediately at best available price
  • Stop-Limit: Trigger limit order when stop price reached
  • Stop-Market: Trigger market order when stop price reached
  • Iceberg: Large orders with visible/hidden portions
  • Post-Only: Rejected if would take liquidity
  • IOC: Immediate-or-cancel, fill what's available
  • FOK: Fill-or-kill, complete fill or nothing

What's the minimum order size?

Varies by market. Typical minimums:

  • BTC pairs: 0.0001 BTC
  • ETH pairs: 0.001 ETH
  • Stablecoin pairs: 1 USD equivalent

How do I place a limit order?

// WebSocket
ws.send(JSON.stringify({
  type: "place_order",
  data: {
    symbol: "BTC-USD",
    side: "buy",
    type: "limit",
    price: "50000.00",
    size: "0.1"
  }
}));

How do I cancel an order?

// Cancel specific order
ws.send(JSON.stringify({
  type: "cancel_order",
  data: { order_id: "ord_123abc" }
}));

// Cancel all orders for a symbol
ws.send(JSON.stringify({
  type: "cancel_all",
  data: { symbol: "BTC-USD" }
}));

API & Integration

What APIs are available?

APIUse CaseLatency
WebSocketReal-time trading, market dataLowest
gRPCHigh-throughput applicationsLow
RESTSimple queries, one-off requestsMedium
FIX 4.4Institutional integrationLow

What's the rate limit?

  • REST API: 100 requests/second
  • WebSocket: 1000 messages/second
  • gRPC: 10000 requests/second

Rate limits are per API key. Contact us for higher limits.

How do I authenticate?

// Generate signature
const timestamp = Date.now();
const message = `${timestamp}${method}${path}${body}`;
const signature = hmacSHA256(apiSecret, message);

// Include in headers
headers: {
  "X-API-Key": apiKey,
  "X-Timestamp": timestamp,
  "X-Signature": signature
}

Do you support FIX protocol?

Yes. FIX 4.4 is supported for institutional clients. See FIX Documentation.

Is there a sandbox/testnet?

Yes. Testnet available at:

  • WebSocket: wss://testnet.dex.lux.network/ws
  • REST: https://testnet.dex.lux.network/api/v1

See Testnet Guide for setup.

SDKs & Clients

Which programming languages are supported?

LanguageSDKCLI Client
Go
Rust
Python
TypeScript
C++
C

Where can I find SDK documentation?

See the SDK Guide for all languages.

Which SDK is best for HFT?

For lowest latency:

  1. C/C++: Direct WebSocket with minimal overhead
  2. Rust: Safe low-latency with zero-copy parsing
  3. Go: Good balance of performance and ease

Can I use CCXT?

CCXT integration is planned. For now, use our native SDKs.

Technical

What consensus does LX use?

DAG-based consensus with:

  • 1ms finality
  • Parallel transaction processing
  • Quantum-resistant signatures (optional)

See Consensus for details.

How does settlement work?

  1. Order matched on LX L2 chain (sub-millisecond)
  2. Settlement message sent via Warp to C-Chain
  3. On-chain confirmation (1ms finality)
  4. Balances updated atomically

Is the order book really on-chain?

Yes. Every order, cancel, and trade is recorded on-chain with full transparency. The matching engine runs on the LX L2 chain for performance, sharing consensus and finality with the main Lux network. Settlement is atomic and on-chain.

What about MEV?

LX has built-in MEV protection:

  • Encrypted order flow until execution
  • Fair ordering guarantees
  • No front-running possible due to consensus design

Account & Security

How do I create an account?

LX uses wallet-based authentication. Connect your wallet to start trading:

  1. Connect wallet (MetaMask, WalletConnect, etc.)
  2. Sign authentication message
  3. Start trading

How do I generate API keys?

# Via CLI
lx-cli create-api-key --name "Trading Bot" --permissions "trade,read"

# Returns
# API Key: lx_abc123...
# Secret: sk_xyz789...

Are my funds safe?

  • Non-custodial: You control your keys
  • On-chain settlement: All trades settled on Lux blockchain
  • Audited smart contracts
  • Bug bounty program active

What if I lose my API key?

API keys can be revoked and regenerated:

lx-cli revoke-api-key --key-id "key_123"
lx-cli create-api-key --name "New Key"

Your funds remain safe as API keys cannot withdraw to external addresses.