diff --git a/go.mod b/go.mod index dd41f2fcb..b7b78bb09 100644 --- a/go.mod +++ b/go.mod @@ -2,12 +2,14 @@ module github.com/c9s/bbgo -go 1.20 +go 1.21 + +toolchain go1.21.6 require ( github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/Masterminds/squirrel v1.5.3 - github.com/adshao/go-binance/v2 v2.4.5 + github.com/adshao/go-binance/v2 v2.5.0 github.com/c-bata/goptuna v0.8.1 github.com/c9s/requestgen v1.3.6 github.com/c9s/rockhopper/v2 v2.0.3-0.20240124055428-2473c6221858 diff --git a/go.sum b/go.sum index 913c3ef34..b34d87b4d 100644 --- a/go.sum +++ b/go.sum @@ -54,6 +54,8 @@ github.com/adshao/go-binance/v2 v2.4.2 h1:NBNMUyXrci45v3sr0RkZosiBYSw1/yuqCrJNky github.com/adshao/go-binance/v2 v2.4.2/go.mod h1:41Up2dG4NfMXpCldrDPETEtiOq+pHoGsFZ73xGgaumo= github.com/adshao/go-binance/v2 v2.4.5 h1:V3KpolmS9a7TLVECSrl2gYm+GGBSxhVk9ILaxvOTOVw= github.com/adshao/go-binance/v2 v2.4.5/go.mod h1:41Up2dG4NfMXpCldrDPETEtiOq+pHoGsFZ73xGgaumo= +github.com/adshao/go-binance/v2 v2.5.0 h1:mk8ylSjIzDYVBF9Wf2KXu6GWD/Ws4LLzD9q2R2mqZB0= +github.com/adshao/go-binance/v2 v2.5.0/go.mod h1:41Up2dG4NfMXpCldrDPETEtiOq+pHoGsFZ73xGgaumo= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= diff --git a/pkg/exchange/binance/exchange.go b/pkg/exchange/binance/exchange.go index 6d4594da4..bca1eff14 100644 --- a/pkg/exchange/binance/exchange.go +++ b/pkg/exchange/binance/exchange.go @@ -320,7 +320,9 @@ func (e *Exchange) QueryMarginAssetMaxBorrowable(ctx context.Context, asset stri return resp.Amount, nil } -func (e *Exchange) borrowRepayAsset(ctx context.Context, asset string, amount fixedpoint.Value, marginType binanceapi.BorrowRepayType) error { +func (e *Exchange) borrowRepayAsset( + ctx context.Context, asset string, amount fixedpoint.Value, marginType binanceapi.BorrowRepayType, +) error { req := e.client2.NewPlaceMarginOrderRequest() req.Asset(asset) req.Amount(amount) @@ -1435,7 +1437,7 @@ func (e *Exchange) QueryFundingRateHistory(ctx context.Context, symbol string) ( return &types.FundingRate{ FundingRate: fundingRate, FundingTime: time.Unix(0, rate.FundingTime*int64(time.Millisecond)), - Time: time.Unix(0, rate.Time*int64(time.Millisecond)), + Time: time.Unix(0, rate.FundingTime*int64(time.Millisecond)), }, nil }