mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
upgrade github.com/adshao/go-binance/v2
This commit is contained in:
parent
39d9445529
commit
d55d1e9867
6
go.mod
6
go.mod
|
@ -2,12 +2,14 @@
|
||||||
|
|
||||||
module github.com/c9s/bbgo
|
module github.com/c9s/bbgo
|
||||||
|
|
||||||
go 1.20
|
go 1.21
|
||||||
|
|
||||||
|
toolchain go1.21.6
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/DATA-DOG/go-sqlmock v1.5.0
|
github.com/DATA-DOG/go-sqlmock v1.5.0
|
||||||
github.com/Masterminds/squirrel v1.5.3
|
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/c-bata/goptuna v0.8.1
|
||||||
github.com/c9s/requestgen v1.3.6
|
github.com/c9s/requestgen v1.3.6
|
||||||
github.com/c9s/rockhopper/v2 v2.0.3-0.20240124055428-2473c6221858
|
github.com/c9s/rockhopper/v2 v2.0.3-0.20240124055428-2473c6221858
|
||||||
|
|
2
go.sum
2
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.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 h1:V3KpolmS9a7TLVECSrl2gYm+GGBSxhVk9ILaxvOTOVw=
|
||||||
github.com/adshao/go-binance/v2 v2.4.5/go.mod h1:41Up2dG4NfMXpCldrDPETEtiOq+pHoGsFZ73xGgaumo=
|
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/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-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||||
|
|
|
@ -320,7 +320,9 @@ func (e *Exchange) QueryMarginAssetMaxBorrowable(ctx context.Context, asset stri
|
||||||
return resp.Amount, nil
|
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 := e.client2.NewPlaceMarginOrderRequest()
|
||||||
req.Asset(asset)
|
req.Asset(asset)
|
||||||
req.Amount(amount)
|
req.Amount(amount)
|
||||||
|
@ -1435,7 +1437,7 @@ func (e *Exchange) QueryFundingRateHistory(ctx context.Context, symbol string) (
|
||||||
return &types.FundingRate{
|
return &types.FundingRate{
|
||||||
FundingRate: fundingRate,
|
FundingRate: fundingRate,
|
||||||
FundingTime: time.Unix(0, rate.FundingTime*int64(time.Millisecond)),
|
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
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user