Skip to content

Commit 50c0624

Browse files
Merge pull request #16 from Logarithm-Labs/test-quick-start
Add a test for quick-start
2 parents ff3f784 + ba88667 commit 50c0624

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

hyperliquid/hyperliquid_test.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
func GetHyperliquidAPI() *Hyperliquid {
99
hl := NewHyperliquid(&HyperliquidClientConfig{
10-
IsMainnet: true,
10+
IsMainnet: false,
1111
AccountAddress: os.Getenv("TEST_ADDRESS"),
1212
PrivateKey: os.Getenv("TEST_PRIVATE_KEY"),
1313
})
@@ -113,3 +113,12 @@ func TestHyperliquid_MakeSomeTradingLogic(t *testing.T) {
113113
}
114114
t.Logf("GetAccountState(): %v", res9)
115115
}
116+
117+
func TestHyperliquid_MakeOrder(t *testing.T) {
118+
client := GetHyperliquidAPI()
119+
order, err := client.MarketOrder("ADA", 15, nil)
120+
if err != nil {
121+
t.Errorf("Error: %v", err)
122+
}
123+
t.Logf("MarketOrder(ADA, 15, nil): %+v", order)
124+
}

0 commit comments

Comments
 (0)