Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into apexpro
  • Loading branch information
samuael committed Oct 15, 2024
2 parents c9e3496 + 9645b7b commit 2ca31f1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/proto-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
- uses: bufbuild/buf-setup-action@v1.44.0
- uses: bufbuild/buf-setup-action@v1.45.0

- name: buf generate
working-directory: ./gctrpc
Expand Down
1 change: 1 addition & 0 deletions exchanges/bybit/bybit_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ func (by *Bybit) GetWithdrawalsHistory(ctx context.Context, c currency.Code, a a
Fee: withdrawals.Rows[i].WithdrawFee.Float64(),
CryptoToAddress: withdrawals.Rows[i].ToAddress,
CryptoTxID: withdrawals.Rows[i].TransactionID,
CryptoChain: withdrawals.Rows[i].Chain,
Timestamp: withdrawals.Rows[i].UpdateTime.Time(),
}
}
Expand Down
24 changes: 13 additions & 11 deletions exchanges/huobi/huobi_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ func (h *HUOBI) UpdateTickers(ctx context.Context, a asset.Item) error {
Low: ticks.Data[i].Low,
Bid: ticks.Data[i].Bid,
Ask: ticks.Data[i].Ask,
Volume: ticks.Data[i].Volume,
QuoteVolume: ticks.Data[i].Amount,
Volume: ticks.Data[i].Amount,
QuoteVolume: ticks.Data[i].Volume,
Open: ticks.Data[i].Open,
Close: ticks.Data[i].Close,
BidSize: ticks.Data[i].BidSize,
Expand Down Expand Up @@ -389,8 +389,8 @@ func (h *HUOBI) UpdateTickers(ctx context.Context, a asset.Item) error {
err = ticker.ProcessTicker(&ticker.Price{
High: ticks[i].High.Float64(),
Low: ticks[i].Low.Float64(),
Volume: ticks[i].Volume.Float64(),
QuoteVolume: ticks[i].Amount.Float64(),
Volume: ticks[i].Amount.Float64(),
QuoteVolume: ticks[i].Volume.Float64(),
Open: ticks[i].Open.Float64(),
Close: ticks[i].Close.Float64(),
Bid: ticks[i].Bid[0],
Expand Down Expand Up @@ -439,12 +439,11 @@ func (h *HUOBI) UpdateTickers(ctx context.Context, a asset.Item) error {
}
continue
}
tt := time.UnixMilli(ticks[i].Timestamp)
err = ticker.ProcessTicker(&ticker.Price{
High: ticks[i].High.Float64(),
Low: ticks[i].Low.Float64(),
Volume: ticks[i].Volume.Float64(),
QuoteVolume: ticks[i].Amount.Float64(),
Volume: ticks[i].Amount.Float64(),
QuoteVolume: ticks[i].Volume.Float64(),
Open: ticks[i].Open.Float64(),
Close: ticks[i].Close.Float64(),
Bid: ticks[i].Bid[0],
Expand All @@ -454,7 +453,7 @@ func (h *HUOBI) UpdateTickers(ctx context.Context, a asset.Item) error {
Pair: cp,
ExchangeName: h.Name,
AssetType: a,
LastUpdated: tt,
LastUpdated: time.UnixMilli(ticks[i].Timestamp),
})
if err != nil {
errs = common.AppendError(errs, err)
Expand Down Expand Up @@ -483,7 +482,8 @@ func (h *HUOBI) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item)
err = ticker.ProcessTicker(&ticker.Price{
High: tickerData.Tick.High,
Low: tickerData.Tick.Low,
Volume: tickerData.Tick.Volume,
Volume: tickerData.Tick.Amount,
QuoteVolume: tickerData.Tick.Volume,
Open: tickerData.Tick.Open,
Close: tickerData.Tick.Close,
Pair: p,
Expand All @@ -509,7 +509,8 @@ func (h *HUOBI) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item)
err = ticker.ProcessTicker(&ticker.Price{
High: marketData.Tick.High,
Low: marketData.Tick.Low,
Volume: marketData.Tick.Vol,
Volume: marketData.Tick.Amount,
QuoteVolume: marketData.Tick.Vol,
Open: marketData.Tick.Open,
Close: marketData.Tick.Close,
Pair: p,
Expand All @@ -530,7 +531,8 @@ func (h *HUOBI) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item)
err = ticker.ProcessTicker(&ticker.Price{
High: marketData.Tick.High,
Low: marketData.Tick.Low,
Volume: marketData.Tick.Vol,
Volume: marketData.Tick.Amount,
QuoteVolume: marketData.Tick.Vol,
Open: marketData.Tick.Open,
Close: marketData.Tick.Close,
Pair: p,
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/thrasher-corp/gct-ta v0.0.0-20200623072738-f2b55b7f9f41
github.com/thrasher-corp/goose v2.7.0-rc4.0.20191002032028-0f2c2a27abdb+incompatible
github.com/thrasher-corp/sqlboiler v1.0.1-0.20191001234224-71e17f37a85e
github.com/urfave/cli/v2 v2.27.4
github.com/urfave/cli/v2 v2.27.5
github.com/volatiletech/null v8.0.0+incompatible
golang.org/x/crypto v0.28.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
Expand All @@ -32,7 +32,7 @@ require (
golang.org/x/time v0.7.0
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.34.2
google.golang.org/protobuf v1.35.1
)

require (
Expand All @@ -41,7 +41,7 @@ require (
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/boombuler/barcode v1.0.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/friendsofgo/errors v0.9.2 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/d5/tengo/v2 v2.17.0 h1:BWUN9NoJzw48jZKiYDXDIF3QrIVZRm1uV1gTzeZ2lqM=
github.com/d5/tengo/v2 v2.17.0/go.mod h1:XRGjEs5I9jYIKTxly6HCF8oiiilk5E/RYXOZ5b0DZC8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -244,8 +244,8 @@ github.com/thrasher-corp/sqlboiler v1.0.1-0.20191001234224-71e17f37a85e/go.mod h
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8=
github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ=
github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w=
github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
github.com/volatiletech/inflect v0.0.0-20170731032912-e7201282ae8d/go.mod h1:jspfvgf53t5NLUT4o9L1IX0kIBNKamGq1tWc/MgWK9Q=
github.com/volatiletech/inflect v0.0.1 h1:2a6FcMQyhmPZcLa+uet3VJ8gLn/9svWhJxJYwvE8KsU=
github.com/volatiletech/inflect v0.0.1/go.mod h1:IBti31tG6phkHitLlr5j7shC5SOo//x0AjDzaJU1PLA=
Expand Down Expand Up @@ -365,8 +365,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down

0 comments on commit 2ca31f1

Please sign in to comment.