config: lower threshold 0.10->0.05, arb 0.03->0.02, amount 0->0

This commit is contained in:
jackyu66git
2026-05-04 19:31:08 +08:00
parent 19443c132a
commit 6e9b982c66
3 changed files with 10 additions and 8 deletions
+5 -3
View File
@@ -121,9 +121,11 @@ func (h *HyperLiquidTrade) PlaceMarketOrder(coin, side, sz string) (string, erro
return string(respJSON), nil
}
// GetTradeFee parses the MarketOpen JSON response to extract filled size and
// estimates the actual fee from the exchange taker rate.
func (h *HyperLiquidTrade) GetTradeFee(orderResponseJSON string, takerFeePct float64) (feeUSD float64, err error) {
// EstimateFeeFromResponse calculates the fee using the response's filled size × price
// × configured taker rate. This is NOT an actual fee from HL — HL does not return
// fee amounts in the order response. The result is equivalent to estimating from
// TradeAmountUSD, but more accurate for partial fills since it uses actual filled sz/px.
func (h *HyperLiquidTrade) EstimateFeeFromResponse(orderResponseJSON string, takerFeePct float64) (feeUSD float64, err error) {
var resp struct {
Statuses []struct {
Filled *struct {