Guides
Exchange & Trading
White-label centralized exchange, DEX aggregation, matching engine, and institutional trading infrastructure.
Exchange & Trading
Launch a white-label centralized exchange (CEX) or integrate decentralized exchange (DEX) aggregation with Lux Financial's trading infrastructure.
Overview
- White-Label CEX: Full centralized exchange with your branding
- DEX Aggregation: 100+ DEX venues with smart order routing
- Matching Engine: Sub-10ms execution with deep order books
- Institutional Liquidity: Access to top market makers
Quick Start
import { Lux } from '@luxfi/bank-sdk';
const lux = new Lux({ apiKey: 'sk_live_...' });
const order = await lux.exchange.createOrder({
symbol: 'BTC/USD',
side: 'buy',
type: 'limit',
quantity: '1.5',
price: '42500.00',
});
// { id: "ord_abc123", status: "open", filled: "0.00", remaining: "1.5" }CEX Features
Matching Engine
- Sub-10ms order execution
- Full order book with market depth
- Spot, margin, and futures trading
- FIX API for institutional clients
Order Types
| Type | Description |
|---|---|
| Market | Execute immediately at best price |
| Limit | Execute at specified price or better |
| Stop | Trigger market order at stop price |
| Stop-Limit | Trigger limit order at stop price |
| TWAP | Time-weighted average price |
| Iceberg | Hide order size |
Trading Pairs
500+ trading pairs: major crypto (BTC, ETH, SOL), stablecoins (USDC, USDT, PYUSD), fiat pairs (USD, EUR, GBP), and DeFi tokens.
DEX Aggregation
Smart Order Routing
const quote = await lux.dex.getQuote({
fromToken: 'ETH',
toToken: 'USDC',
amount: '10.0',
slippage: '0.5',
});
// { route: ["Uniswap V3", "Curve"], expectedOutput: "25420.50", priceImpact: "0.02%" }
const swap = await lux.dex.executeSwap(quote, {
mevProtection: true,
deadline: 300,
});Supported DEXs
Uniswap V2/V3, SushiSwap, Curve, Balancer, PancakeSwap, and 100+ more.
MEV Protection
All DEX swaps include MEV protection via private mempool: frontrunning prevention, sandwich attack protection, gas optimization.
WebSocket Streams
// Order book
lux.exchange.subscribe('orderbook', 'BTC/USD', (data) => {
console.log('Bids:', data.bids, 'Asks:', data.asks);
});
// Trades
lux.exchange.subscribe('trades', 'BTC/USD', (trade) => {
console.log(`${trade.side} ${trade.quantity} @ ${trade.price}`);
});
// User orders
lux.exchange.onOrderUpdate((update) => {
console.log(`Order ${update.id}: ${update.status}`);
});FIX API
For institutional clients, we support FIX 4.4 protocol:
Host: fix.lux.financial
Port: 8443
Comp ID: YOUR_COMP_IDContact sales for FIX API credentials.