diff --git a/exchange/hyperliquid_trade.go b/exchange/hyperliquid_trade.go index 837beb5..de6e6fd 100644 --- a/exchange/hyperliquid_trade.go +++ b/exchange/hyperliquid_trade.go @@ -145,22 +145,7 @@ func (h *HyperLiquidTrade) PlaceMarketOrder(coin, side, sz string) (string, erro ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() - mids, err := h.info.AllMids(ctx) - if err != nil { - return "", fmt.Errorf("mids: %w", err) - } - priceStr, ok := mids[coin] - if !ok { - return "", fmt.Errorf("coin %s not found", coin) - } - midPx, _ := strconv.ParseFloat(priceStr, 64) - - limitPx := midPx * 2.0 - if !isBuy { - limitPx = midPx * 0.5 - } - - result, err := h.exchange.MarketOpen(ctx, coin, isBuy, size, &limitPx, 0.05, nil, nil) + result, err := h.exchange.MarketOpen(ctx, coin, isBuy, size, nil, 0.05, nil, nil) if err != nil { return "", fmt.Errorf("market open: %w", err) }