Commit Graph

2 Commits

Author SHA1 Message Date
ramseshk 3520056313 Fix Hyperliquid API: asset names come from universe array, not context dicts
The metaAndAssetCtxs endpoint returns asset names in a parallel
universe array — asset contexts don't have a "name" field.
Fixed the API module to index by the universe array properly.

Also added get_mark_price() helper. Tested against testnet:
BTC funding 0.00125% per 8h, mark $62,873.
2026-08-03 11:39:11 +00:00
ramseshk c1da0cbe65 Wire up real Hyperliquid integration and funding rate API
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
2026-08-03 11:37:47 +00:00