feat(hyperliquid): add stock symbol market data support

- Add Hyperliquid/XYZ symbol normalization tests and backend coverage

- Extend kline and market data lookup paths for US stock symbols

- Wire frontend data API types for stock-oriented market requests
This commit is contained in:
tinklefund
2026-05-25 01:24:49 +08:00
parent 908fc09aca
commit f37fc9f887
12 changed files with 551 additions and 109 deletions

View File

@@ -0,0 +1,18 @@
package hyperliquid
import "testing"
func TestConvertSymbolToHyperliquidXYZAliases(t *testing.T) {
cases := map[string]string{
"SAMSUNG-USDC": "xyz:SMSN",
"SK-HYNIX-USDC": "xyz:SKHX",
"TSLAUSDT": "xyz:TSLA",
"xyz:SMSN": "xyz:SMSN",
"HYPEUSDT": "HYPE",
}
for input, want := range cases {
if got := convertSymbolToHyperliquid(input); got != want {
t.Fatalf("convertSymbolToHyperliquid(%q) = %q, want %q", input, got, want)
}
}
}