mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-11 06:46:59 +08:00
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:
18
trader/hyperliquid/symbol_conversion_test.go
Normal file
18
trader/hyperliquid/symbol_conversion_test.go
Normal 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user