fix: HL balance now reads spot USDC via SpotUserState

HL testnet USDC lives in the spot account, not the perp clearinghouse.
GetBalance() was calling UserState() (perp clearinghouseState), which
returned /usr/bin/bash. Switched to SpotUserState() and parse USDC.total - USDC.hold.

Also cleaned up .gitignore to exclude .env, binary, logs, data/.
This commit is contained in:
jackyu66git
2026-05-04 17:48:14 +08:00
parent 156ce22474
commit 49da6fd35b
7 changed files with 143 additions and 171 deletions
+2 -2
View File
@@ -3,8 +3,8 @@
"trade_enabled": true,
"arb_threshold": 0.03,
"scan_interval_ms": 200,
"trade_threshold": 0.20,
"trade_amount_usd": 5,
"trade_threshold": 0.10,
"trade_amount_usd": 10,
"trade_cooldown_ms": 30000,
"alert_cooldown_sec": 300,
"mock_slippage_pct": 0.05,