Skip to content

Commit d55d1e9

Browse files
committed
upgrade github.com/adshao/go-binance/v2
1 parent 39d9445 commit d55d1e9

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

go.mod

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
module github.com/c9s/bbgo
44

5-
go 1.20
5+
go 1.21
6+
7+
toolchain go1.21.6
68

79
require (
810
github.com/DATA-DOG/go-sqlmock v1.5.0
911
github.com/Masterminds/squirrel v1.5.3
10-
github.com/adshao/go-binance/v2 v2.4.5
12+
github.com/adshao/go-binance/v2 v2.5.0
1113
github.com/c-bata/goptuna v0.8.1
1214
github.com/c9s/requestgen v1.3.6
1315
github.com/c9s/rockhopper/v2 v2.0.3-0.20240124055428-2473c6221858

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ github.com/adshao/go-binance/v2 v2.4.2 h1:NBNMUyXrci45v3sr0RkZosiBYSw1/yuqCrJNky
5454
github.com/adshao/go-binance/v2 v2.4.2/go.mod h1:41Up2dG4NfMXpCldrDPETEtiOq+pHoGsFZ73xGgaumo=
5555
github.com/adshao/go-binance/v2 v2.4.5 h1:V3KpolmS9a7TLVECSrl2gYm+GGBSxhVk9ILaxvOTOVw=
5656
github.com/adshao/go-binance/v2 v2.4.5/go.mod h1:41Up2dG4NfMXpCldrDPETEtiOq+pHoGsFZ73xGgaumo=
57+
github.com/adshao/go-binance/v2 v2.5.0 h1:mk8ylSjIzDYVBF9Wf2KXu6GWD/Ws4LLzD9q2R2mqZB0=
58+
github.com/adshao/go-binance/v2 v2.5.0/go.mod h1:41Up2dG4NfMXpCldrDPETEtiOq+pHoGsFZ73xGgaumo=
5759
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
5860
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
5961
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=

pkg/exchange/binance/exchange.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,9 @@ func (e *Exchange) QueryMarginAssetMaxBorrowable(ctx context.Context, asset stri
320320
return resp.Amount, nil
321321
}
322322

323-
func (e *Exchange) borrowRepayAsset(ctx context.Context, asset string, amount fixedpoint.Value, marginType binanceapi.BorrowRepayType) error {
323+
func (e *Exchange) borrowRepayAsset(
324+
ctx context.Context, asset string, amount fixedpoint.Value, marginType binanceapi.BorrowRepayType,
325+
) error {
324326
req := e.client2.NewPlaceMarginOrderRequest()
325327
req.Asset(asset)
326328
req.Amount(amount)
@@ -1435,7 +1437,7 @@ func (e *Exchange) QueryFundingRateHistory(ctx context.Context, symbol string) (
14351437
return &types.FundingRate{
14361438
FundingRate: fundingRate,
14371439
FundingTime: time.Unix(0, rate.FundingTime*int64(time.Millisecond)),
1438-
Time: time.Unix(0, rate.Time*int64(time.Millisecond)),
1440+
Time: time.Unix(0, rate.FundingTime*int64(time.Millisecond)),
14391441
}, nil
14401442
}
14411443

0 commit comments

Comments
 (0)