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)
| Provider | Asset Classes | Type |
|---|---|---|
| Alpaca | Equities, Crypto | Broker-dealer |
| Interactive Brokers | Equities, Options, Futures, FX | Prime broker |
| Tradier | Equities, Options | Broker-dealer |
| Coinbase | Crypto | Exchange (Advanced Trade) |
| Binance | Crypto | Exchange |
| Kraken | Crypto | Exchange |
| Gemini | Crypto | Exchange |
| SFOX | Crypto | Prime dealer / SOR |
| FalconX | Crypto | Institutional RFQ |
| Fireblocks | Crypto | Custody + OTC |
| BitGo | Crypto | Custody + Prime |
| Circle | USDC / Stablecoins | Stablecoin infrastructure |
| CurrencyCloud (Visa) | FX (35 pairs) | Institutional FX |
| LMAX Digital | FX, Crypto, Metals | Institutional CLOB |
| Polygon.io | Equities, FX, Crypto | Market data aggregator |
| Finix | Payments | Payment 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 fillsSplit 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 Var | Description |
|---|---|
BROKER_LISTEN | Listen address (default :8090) |
ALPACA_API_KEY / ALPACA_API_SECRET | Alpaca (equities + crypto) |
IBKR_ACCESS_TOKEN / IBKR_ACCOUNT_ID | Interactive Brokers |
COINBASE_API_KEY / COINBASE_API_SECRET | Coinbase Advanced Trade |
BINANCE_API_KEY / BINANCE_API_SECRET | Binance |
KRAKEN_API_KEY / KRAKEN_API_SECRET | Kraken |
GEMINI_API_KEY / GEMINI_API_SECRET | Gemini |
SFOX_API_KEY | SFOX Prime |
FALCON_API_KEY / FALCON_API_SECRET | FalconX |
FIREBLOCKS_API_KEY / FIREBLOCKS_PRIVATE_KEY | Fireblocks |
BITGO_ACCESS_TOKEN / BITGO_ENTERPRISE | BitGo |
CIRCLE_API_KEY | Circle |
TRADIER_ACCESS_TOKEN / TRADIER_ACCOUNT_ID | Tradier |
POLYGON_API_KEY | Polygon.io |
CURRENCYCLOUD_LOGIN_ID / CURRENCYCLOUD_API_KEY | CurrencyCloud |
LMAX_API_KEY / LMAX_USERNAME / LMAX_PASSWORD | LMAX Digital |
FINIX_USERNAME / FINIX_PASSWORD | Finix |
Source
- Repository:
luxfi/broker - Language: Go
- Key packages:
pkg/provider,pkg/router,pkg/api