config: lower threshold 0.10->0.05, arb 0.03->0.02, amount 0->0
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user