diff --git a/config.json b/config.json index c7f7425..6776a96 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,7 @@ "trade_enabled": true, "arb_threshold": 0.03, "scan_interval_ms": 200, - "trade_threshold": 0.1, + "trade_threshold": 0.25, "trade_amount_usd": 5, "trade_cooldown_ms": 30000, "alert_cooldown_sec": 300, diff --git a/dashboard.go b/dashboard.go index dcf769b..df7eb44 100644 --- a/dashboard.go +++ b/dashboard.go @@ -379,7 +379,7 @@ func (d *Dashboard) broadcastLoop() { shortAvg := weightedAvgPrice(pos.ShortEntryPrices, pos.AmountUSD/float64(max(1, len(pos.ShortEntryPrices)))) longPnl := (longCurrent - longAvg) / longAvg * 100 shortPnl := (shortAvg - shortCurrent) / shortAvg * 100 - totalFees := 2 * (makerFees[ExBitget] + makerFees[ExHyperLiquid]) + totalFees := 2 * (takerFees[ExBitget] + takerFees[ExHyperLiquid]) netPnl := longPnl + shortPnl - totalFees currentSpread := (hlP - bgP) / bgP * 100 diff --git a/scanner.go b/scanner.go index b8e3453..0f69db7 100644 --- a/scanner.go +++ b/scanner.go @@ -10,10 +10,10 @@ const ( ExBitget = "Bitget" ) -// Maker fee rates (%) — for limit orders on trading exchanges -var makerFees = map[string]float64{ - ExHyperLiquid: 0.015, - ExBitget: 0.020, // standard maker +// Taker fee rates (%) — for IOC market orders on trading exchanges +var takerFees = map[string]float64{ + ExHyperLiquid: 0.045, + ExBitget: 0.060, } // TickerCoins defines all coins we monitor. @@ -59,9 +59,9 @@ func ScanBGHL(store *PriceStore) []*ArbOpportunity { } // BG->HL: buy cheap at Bitget, sell expensive at HyperLiquid - profitBG := netProfit(bgP, hlP, makerFees[ExBitget], makerFees[ExHyperLiquid]) + profitBG := netProfit(bgP, hlP, takerFees[ExBitget], takerFees[ExHyperLiquid]) // HL->BG: buy cheap at HyperLiquid, sell expensive at Bitget - profitHL := netProfit(hlP, bgP, makerFees[ExHyperLiquid], makerFees[ExBitget]) + profitHL := netProfit(hlP, bgP, takerFees[ExHyperLiquid], takerFees[ExBitget]) grossBG := (hlP - bgP) / bgP * 100 grossHL := (bgP - hlP) / hlP * 100 diff --git a/trader.go b/trader.go index fa8dc9c..6074fe7 100644 --- a/trader.go +++ b/trader.go @@ -524,7 +524,7 @@ func (t *Trader) checkExit(pos *ArbPosition, bgP, hlP, diffPct float64, notifier longPnl := (longCurrent - longAvg) / longAvg * 100 shortPnl := (shortAvg - shortCurrent) / shortAvg * 100 - totalFees := 2 * (makerFees[ExBitget] + makerFees[ExHyperLiquid]) // 开仓 + 平仓手续费 + totalFees := 2 * (takerFees[ExBitget] + takerFees[ExHyperLiquid]) // 开仓 + 平仓手续费 netPnl := longPnl + shortPnl - totalFees // Convergence analysis diff --git a/types.go b/types.go index ea3c6cd..1f90ba5 100644 --- a/types.go +++ b/types.go @@ -163,8 +163,8 @@ func (swt *SpreadWindowTracker) Tick(snap map[string]map[string]float64, thresho sellFee float64 } for _, dir := range []dirCheck{ - {"BG->HL", bgP, hlP, makerFees[ExBitget], makerFees[ExHyperLiquid]}, - {"HL->BG", hlP, bgP, makerFees[ExHyperLiquid], makerFees[ExBitget]}, + {"BG->HL", bgP, hlP, takerFees[ExBitget], takerFees[ExHyperLiquid]}, + {"HL->BG", hlP, bgP, takerFees[ExHyperLiquid], takerFees[ExBitget]}, } { key := coin.Name + ":" + dir.name netSpr := netProfit(dir.buyPrice, dir.sellPrice, dir.buyFee, dir.sellFee)