Lux Financial
Trading

Broker (brokerd)

Federated smart order router with best execution across 16 providers — crypto, equities, FX, and precious metals.

Broker — Federated Smart Order Router

brokerd is an institutional-grade federated broker that aggregates 16 providers behind a unified API. It routes orders for best execution across crypto exchanges, equity brokers, institutional FX venues, custody platforms, and market data providers.

Providers (16)

ProviderAsset ClassesType
AlpacaEquities, CryptoBroker-dealer
Interactive BrokersEquities, Options, Futures, FXPrime broker
TradierEquities, OptionsBroker-dealer
CoinbaseCryptoExchange (Advanced Trade)
BinanceCryptoExchange
KrakenCryptoExchange
GeminiCryptoExchange
SFOXCryptoPrime dealer / SOR
FalconXCryptoInstitutional RFQ
FireblocksCryptoCustody + OTC
BitGoCryptoCustody + Prime
CircleUSDC / StablecoinsStablecoin infrastructure
CurrencyCloud (Visa)FX (35 pairs)Institutional FX
LMAX DigitalFX, Crypto, MetalsInstitutional CLOB
Polygon.ioEquities, FX, CryptoMarket data aggregator
FinixPaymentsPayment processing

Smart Routing Logic

1. Client submits order
2. Broker queries all capable venues in parallel
3. Compute net price: raw price + maker/taker fees per venue
4. Rank by effective cost, depth, and latency
5. If order fits single venue: route to best
6. If order exceeds venue depth: split across venues (VWAP)
7. Execute and report fills

Split Orders

For orders larger than single-venue depth, the broker splits across venues:

Order: Buy 100 BTC
  - Coinbase depth: 40 BTC at $45,000 (8 bps taker)
  - Kraken depth: 30 BTC at $45,010 (6 bps taker)
  - LMAX quote: 50 BTC at $45,020 (3 bps taker)
  -> Split: 40 Coinbase + 30 Kraken + 30 LMAX
  -> VWAP: $45,008.57 (net of fees)

Fee-Aware Net-Price Routing

Each provider has a configured fee schedule (maker/taker bps). The router computes net effective price including fees before ranking venues, ensuring true best execution.

Best Execution Policy

The broker implements regulatory best-execution requirements:

  • Price: Net effective cost after fees (primary factor)
  • Speed: Latency-adjusted pricing
  • Likelihood of fill: Venue reliability and depth
  • Cost: Trading fees, spread, and slippage
  • Size: Available depth at quoted price

All routing decisions are logged for regulatory audit (MiFID II best-execution reports, FINRA Rule 5310).

Configuration

Env VarDescription
BROKER_LISTENListen address (default :8090)
ALPACA_API_KEY / ALPACA_API_SECRETAlpaca (equities + crypto)
IBKR_ACCESS_TOKEN / IBKR_ACCOUNT_IDInteractive Brokers
COINBASE_API_KEY / COINBASE_API_SECRETCoinbase Advanced Trade
BINANCE_API_KEY / BINANCE_API_SECRETBinance
KRAKEN_API_KEY / KRAKEN_API_SECRETKraken
GEMINI_API_KEY / GEMINI_API_SECRETGemini
SFOX_API_KEYSFOX Prime
FALCON_API_KEY / FALCON_API_SECRETFalconX
FIREBLOCKS_API_KEY / FIREBLOCKS_PRIVATE_KEYFireblocks
BITGO_ACCESS_TOKEN / BITGO_ENTERPRISEBitGo
CIRCLE_API_KEYCircle
TRADIER_ACCESS_TOKEN / TRADIER_ACCOUNT_IDTradier
POLYGON_API_KEYPolygon.io
CURRENCYCLOUD_LOGIN_ID / CURRENCYCLOUD_API_KEYCurrencyCloud
LMAX_API_KEY / LMAX_USERNAME / LMAX_PASSWORDLMAX Digital
FINIX_USERNAME / FINIX_PASSWORDFinix

Source

  • Repository: luxfi/broker
  • Language: Go
  • Key packages: pkg/provider, pkg/router, pkg/api

On this page