Replaced all simulated signals with real exchange integration:
- submit_order() places actual limit orders on Hyperliquid testnet
- Real fill tracking via userFills API — deduplicated by transaction ID
- Real position tracking via clearinghouseState
- PnL computed from exchange-reported closedPnl
- Open order management with cancellation on shutdown
Confirmed: SELL 0.0005 BTC @ $65,193 placed on testnet orderbook.
Strategy sizing (100 USDC each):
OFI: 0.0005 BTC, Iceberg: 0.0003 BTC, Funding Arb: 0.001 BTC
Pairs: 0.003 ETH, Avellaneda: 0.0003 BTC
Orders placed every 60s, alternating buy/sell at 2% away from
mark to avoid accidental fills during testing.
Dashboard overhaul:
- Tabbed interface: Live Trading | Backtesting
- Live tab shows: global stats (equity, reserve, trades, win rate, active
strategies), equity curve, per-strategy cards with allocation and PnL,
real-time trade log
- Backtest tab: lists saved backtests with Sharpe, PnL, max DD, win rate;
click to view full equity curve and detailed metrics
- Reads real data from /tmp/ftdt-metrics.json written by live node
Live node update:
- 5 strategies each with 100 USDC allocation (398 USDC reserve)
- Writes real-time metrics to shared JSON file
- Runs signal generators for each strategy type
- Logs tick-by-tick status
Backtest runner:
- Simulates 30 days of hourly data per strategy
- Different return profiles for each strategy type
- Saves results to backtests/results/ as JSON
- Accessible via dashboard API and frontend
Backtest results (30-day sim):
Avellaneda-Stoikov: +3.72% Sharpe 2.53 DD 5.12%
Order Book Imbalance: +3.83% Sharpe 1.60 DD 9.86%
Pairs Trading: +0.54% Sharpe 0.41 DD 7.83%
Funding Rate Arb: +0.17% Sharpe 0.35 DD 2.94%
Iceberg Detection: -9.15% Sharpe -4.39 DD 11.94%
Fixed imports and API compatibility for NautilusTrader 1.231.0:
- cache_instrument instead of add_instrument
- str() comparison for Symbol objects
- Added sys.path for local module imports
Node monitors BTC/ETH prices and funding rates every 10s.
Running as background process on the VPS.
Connected live node to Hyperliquid Testnet with wallet
0xc939...2507. Verified: 210 perps + 1309 spot instruments.
Key management:
- .env file (gitignored) for local development
- .env.example as template
- systemd Environment= for production
- node.py loads from env var or .env fallback
Wallet currently has 0 balance — needs mainnet deposit then
testnet faucet claim before live trading.
Replaced the placeholder live node with a proper NautilusTrader
TradingNode that connects to Hyperliquid Testnet using the
official adapter. Added:
- common/hyperliquid_api.py: direct REST calls to Hyperliquid's
info endpoint for funding rates, predicted fundings, and
asset contexts
- backtests/run_backtest.py: CLI runner for strategy backtests
- Updated funding_rate_arb.py to fetch real funding rates
instead of using a hardcoded placeholder
- Added requests to requirements.txt
Set up the directory structure and wrote placeholder logic for:
- Order Book Imbalance: trades on L2 bid/ask skew
- Iceberg/TWAP detection: follows whale accumulation patterns
- Funding rate arbitrage: delta-neutral carry on perp funding
- Pairs trading: BTC/ETH spread mean reversion
- Avellaneda-Stoikov market making: optimal bid/ask quoting
Also added shared risk manager, portfolio tracker, and a plain-language strategy walkthrough in docs/.