diff --git a/.github/workflows/amd64.Dockerfile b/.github/workflows/amd64.Dockerfile index f0619ac0443..773e8e775ec 100644 --- a/.github/workflows/amd64.Dockerfile +++ b/.github/workflows/amd64.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23-alpine +FROM golang:1.24-alpine # Install GCC and musl-dev (needed for SQLite library) RUN apk add --no-cache gcc musl-dev diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 3fe34b478a9..1bd1e4b5b08 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -8,8 +8,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.23.x' + go-version: '1.24.x' - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.60.1 \ No newline at end of file + version: v1.64.6 \ No newline at end of file diff --git a/.github/workflows/proto-lint.yml b/.github/workflows/proto-lint.yml index 6b86a966810..9d00153e325 100644 --- a/.github/workflows/proto-lint.yml +++ b/.github/workflows/proto-lint.yml @@ -12,7 +12,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.23.x + go-version: 1.24.x - name: Setup build depends run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ac16dd69020..7813117f66f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,7 +1,7 @@ on: [push, pull_request] name: CI env: - GO_VERSION: 1.23.x + GO_VERSION: 1.24.x jobs: backend: name: GoCryptoTrader backend (${{ matrix.os }}, ${{ matrix.goarch }}, psql=${{ matrix.psql }}, skip_wrapper_tests=${{ matrix.skip_wrapper_tests}}, sonic=${{ matrix.sonic && matrix.goarch != '386' }}) diff --git a/.golangci.yml b/.golangci.yml index dff58d4cb9e..9e9ae2d6b9a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -36,7 +36,7 @@ linters: # - errorlint # - exhaustive # - exhaustruct - - exportloopref +# - exptostd - fatcontext # - forbidigo - forcetypeassert @@ -100,7 +100,7 @@ linters: - stylecheck - tagalign # - tagliatelle - - tenv +# - tenv # Duplicate feature of another linter. Replaced by usetesting. - testableexamples - testifylint # - testpackage @@ -109,6 +109,7 @@ linters: - unconvert - unparam - usestdlibvars +# - usetesting # Disabled temporarily due to the number of t.Context changes required # - varnamelen - wastedassign - whitespace @@ -163,21 +164,12 @@ issues: - text: 'shadow: declaration of "err" shadows declaration at' linters: [ govet ] - exclude-dirs: - vendor - web/ - testdata - database/models/ - # List of regexps of issue texts to exclude, empty list by default. - # But independently from this option we use default exclude patterns, - # it can be disabled by `exclude-use-default: false`. To list all - # excluded by default patterns execute `golangci-lint run --help` - exclude: - # The following silences false positives in table tests - # https://github.com/kyoh86/scopelint/issues/4 - - Using the variable on range scope `ti` in function literal include: - EXC0012 # revive: Comment exported (.+) should have comment( \(or a comment on this block\))? or be unexported - EXC0014 # revive: Comment on exported (.+) should be of the form "(.+)..." diff --git a/Dockerfile b/Dockerfile index 93a2b7e5a33..6e450612033 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23 as build +FROM golang:1.24 as build WORKDIR /go/src/github.com/thrasher-corp/gocryptotrader COPY . . RUN GO111MODULE=on go mod vendor diff --git a/Makefile b/Makefile index 35f2e3efdeb..c7b51ecda64 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ LDFLAGS = -ldflags "-w -s" GCTPKG = github.com/thrasher-corp/gocryptotrader -LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1 +LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.6 LINTBIN = $(GOPATH)/bin/golangci-lint GCTLISTENPORT=9050 GCTPROFILERLISTENPORT=8085 diff --git a/backtester/btcli/commands.go b/backtester/btcli/commands.go index 8677006c2e0..8ca4091b6f2 100644 --- a/backtester/btcli/commands.go +++ b/backtester/btcli/commands.go @@ -1,15 +1,16 @@ package main import ( + "errors" "fmt" "path/filepath" - "strconv" "time" "github.com/thrasher-corp/gocryptotrader/backtester/btrpc" "github.com/thrasher-corp/gocryptotrader/backtester/config" "github.com/thrasher-corp/gocryptotrader/common" "github.com/urfave/cli/v2" + "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -49,10 +50,10 @@ var executeStrategyFromFileCommand = &cli.Command{ Aliases: []string{"e"}, Usage: fmt.Sprintf("override the strategy file's end time using your local time. eg '%v'", time.Now().Truncate(time.Hour).Format(time.DateTime)), }, - &cli.Uint64Flag{ + &cli.DurationFlag{ Name: "intervaloverride", Aliases: []string{"i"}, - Usage: "override the strategy file's candle interval, in seconds. eg 60 = 1 minute", + Usage: "override the strategy file's candle interval in the format of a time duration. eg '1m' for 1 minute", }, }, } @@ -118,16 +119,18 @@ func executeStrategyFromFile(c *cli.Context) error { } } - var intervalOverride uint64 + var intervalOverride time.Duration if c.IsSet("intervaloverride") { - intervalOverride = c.Uint64("intervaloverride") + intervalOverride = c.Duration("intervaloverride") } else if c.Args().Get(5) != "" { - intervalOverride, err = strconv.ParseUint(c.Args().Get(5), 10, 64) + intervalOverride, err = time.ParseDuration(c.Args().Get(5)) if err != nil { return err } } - overrideDuration := time.Duration(intervalOverride) * time.Second + if intervalOverride < 0 { + return errors.New("interval override duration cannot be less than 0") + } client := btrpc.NewBacktesterServiceClient(conn) result, err := client.ExecuteStrategyFromFile( @@ -138,7 +141,7 @@ func executeStrategyFromFile(c *cli.Context) error { DoNotStore: dns, StartTimeOverride: timestamppb.New(s), EndTimeOverride: timestamppb.New(e), - IntervalOverride: uint64(overrideDuration), + IntervalOverride: durationpb.New(intervalOverride), }, ) @@ -503,7 +506,7 @@ func executeStrategyFromConfig(c *cli.Context) error { } dataSettings := &btrpc.DataSettings{ - Interval: uint64(defaultConfig.DataSettings.Interval.Duration().Nanoseconds()), + Interval: durationpb.New(defaultConfig.DataSettings.Interval.Duration()), Datatype: defaultConfig.DataSettings.DataType, } if defaultConfig.DataSettings.APIData != nil { @@ -546,7 +549,7 @@ func executeStrategyFromConfig(c *cli.Context) error { if defaultConfig.DataSettings.DatabaseData != nil { dbConnectionDetails := &btrpc.DatabaseConnectionDetails{ Host: defaultConfig.DataSettings.DatabaseData.Config.Host, - Port: uint32(defaultConfig.DataSettings.DatabaseData.Config.Port), + Port: defaultConfig.DataSettings.DatabaseData.Config.Port, Password: defaultConfig.DataSettings.DatabaseData.Config.Password, Database: defaultConfig.DataSettings.DatabaseData.Config.Database, SslMode: defaultConfig.DataSettings.DatabaseData.Config.SSLMode, diff --git a/backtester/btrpc/btrpc.pb.go b/backtester/btrpc/btrpc.pb.go index 42c09cd90bb..bf529a669f1 100644 --- a/backtester/btrpc/btrpc.pb.go +++ b/backtester/btrpc/btrpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.36.1 // protoc (unknown) // source: btrpc.proto @@ -10,6 +10,7 @@ import ( _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" @@ -24,23 +25,20 @@ const ( // struct definitions type StrategySettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - UseSimultaneousSignalProcessing bool `protobuf:"varint,2,opt,name=use_simultaneous_signal_processing,json=useSimultaneousSignalProcessing,proto3" json:"use_simultaneous_signal_processing,omitempty"` - DisableUsdTracking bool `protobuf:"varint,3,opt,name=disable_usd_tracking,json=disableUsdTracking,proto3" json:"disable_usd_tracking,omitempty"` - CustomSettings []*CustomSettings `protobuf:"bytes,4,rep,name=custom_settings,json=customSettings,proto3" json:"custom_settings,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + UseSimultaneousSignalProcessing bool `protobuf:"varint,2,opt,name=use_simultaneous_signal_processing,json=useSimultaneousSignalProcessing,proto3" json:"use_simultaneous_signal_processing,omitempty"` + DisableUsdTracking bool `protobuf:"varint,3,opt,name=disable_usd_tracking,json=disableUsdTracking,proto3" json:"disable_usd_tracking,omitempty"` + CustomSettings []*CustomSettings `protobuf:"bytes,4,rep,name=custom_settings,json=customSettings,proto3" json:"custom_settings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StrategySettings) Reset() { *x = StrategySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StrategySettings) String() string { @@ -51,7 +49,7 @@ func (*StrategySettings) ProtoMessage() {} func (x *StrategySettings) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95,21 +93,18 @@ func (x *StrategySettings) GetCustomSettings() []*CustomSettings { } type CustomSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + KeyField string `protobuf:"bytes,1,opt,name=key_field,json=keyField,proto3" json:"key_field,omitempty"` + KeyValue string `protobuf:"bytes,2,opt,name=key_value,json=keyValue,proto3" json:"key_value,omitempty"` unknownFields protoimpl.UnknownFields - - KeyField string `protobuf:"bytes,1,opt,name=key_field,json=keyField,proto3" json:"key_field,omitempty"` - KeyValue string `protobuf:"bytes,2,opt,name=key_value,json=keyValue,proto3" json:"key_value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CustomSettings) Reset() { *x = CustomSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomSettings) String() string { @@ -120,7 +115,7 @@ func (*CustomSettings) ProtoMessage() {} func (x *CustomSettings) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,24 +145,21 @@ func (x *CustomSettings) GetKeyValue() string { } type ExchangeLevelFunding struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` + InitialFunds string `protobuf:"bytes,4,opt,name=initial_funds,json=initialFunds,proto3" json:"initial_funds,omitempty"` + TransferFee string `protobuf:"bytes,5,opt,name=transfer_fee,json=transferFee,proto3" json:"transfer_fee,omitempty"` unknownFields protoimpl.UnknownFields - - ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` - InitialFunds string `protobuf:"bytes,4,opt,name=initial_funds,json=initialFunds,proto3" json:"initial_funds,omitempty"` - TransferFee string `protobuf:"bytes,5,opt,name=transfer_fee,json=transferFee,proto3" json:"transfer_fee,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ExchangeLevelFunding) Reset() { *x = ExchangeLevelFunding{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExchangeLevelFunding) String() string { @@ -178,7 +170,7 @@ func (*ExchangeLevelFunding) ProtoMessage() {} func (x *ExchangeLevelFunding) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,21 +221,18 @@ func (x *ExchangeLevelFunding) GetTransferFee() string { } type FundingSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` UseExchangeLevelFunding bool `protobuf:"varint,1,opt,name=use_exchange_level_funding,json=useExchangeLevelFunding,proto3" json:"use_exchange_level_funding,omitempty"` ExchangeLevelFunding []*ExchangeLevelFunding `protobuf:"bytes,2,rep,name=exchange_level_funding,json=exchangeLevelFunding,proto3" json:"exchange_level_funding,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FundingSettings) Reset() { *x = FundingSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FundingSettings) String() string { @@ -254,7 +243,7 @@ func (*FundingSettings) ProtoMessage() {} func (x *FundingSettings) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,22 +273,19 @@ func (x *FundingSettings) GetExchangeLevelFunding() []*ExchangeLevelFunding { } type PurchaseSide struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + MinimumSize string `protobuf:"bytes,1,opt,name=minimum_size,json=minimumSize,proto3" json:"minimum_size,omitempty"` + MaximumSize string `protobuf:"bytes,2,opt,name=maximum_size,json=maximumSize,proto3" json:"maximum_size,omitempty"` + MaximumTotal string `protobuf:"bytes,3,opt,name=maximum_total,json=maximumTotal,proto3" json:"maximum_total,omitempty"` unknownFields protoimpl.UnknownFields - - MinimumSize string `protobuf:"bytes,1,opt,name=minimum_size,json=minimumSize,proto3" json:"minimum_size,omitempty"` - MaximumSize string `protobuf:"bytes,2,opt,name=maximum_size,json=maximumSize,proto3" json:"maximum_size,omitempty"` - MaximumTotal string `protobuf:"bytes,3,opt,name=maximum_total,json=maximumTotal,proto3" json:"maximum_total,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PurchaseSide) Reset() { *x = PurchaseSide{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurchaseSide) String() string { @@ -310,7 +296,7 @@ func (*PurchaseSide) ProtoMessage() {} func (x *PurchaseSide) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -347,21 +333,18 @@ func (x *PurchaseSide) GetMaximumTotal() string { } type SpotDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InitialBaseFunds string `protobuf:"bytes,1,opt,name=initial_base_funds,json=initialBaseFunds,proto3" json:"initial_base_funds,omitempty"` - InitialQuoteFunds string `protobuf:"bytes,2,opt,name=initial_quote_funds,json=initialQuoteFunds,proto3" json:"initial_quote_funds,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + InitialBaseFunds string `protobuf:"bytes,1,opt,name=initial_base_funds,json=initialBaseFunds,proto3" json:"initial_base_funds,omitempty"` + InitialQuoteFunds string `protobuf:"bytes,2,opt,name=initial_quote_funds,json=initialQuoteFunds,proto3" json:"initial_quote_funds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SpotDetails) Reset() { *x = SpotDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpotDetails) String() string { @@ -372,7 +355,7 @@ func (*SpotDetails) ProtoMessage() {} func (x *SpotDetails) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,20 +385,17 @@ func (x *SpotDetails) GetInitialQuoteFunds() string { } type FuturesDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Leverage *Leverage `protobuf:"bytes,1,opt,name=leverage,proto3" json:"leverage,omitempty"` unknownFields protoimpl.UnknownFields - - Leverage *Leverage `protobuf:"bytes,1,opt,name=leverage,proto3" json:"leverage,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FuturesDetails) Reset() { *x = FuturesDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FuturesDetails) String() string { @@ -426,7 +406,7 @@ func (*FuturesDetails) ProtoMessage() {} func (x *FuturesDetails) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,35 +429,32 @@ func (x *FuturesDetails) GetLeverage() *Leverage { } type CurrencySettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Base string `protobuf:"bytes,3,opt,name=base,proto3" json:"base,omitempty"` - Quote string `protobuf:"bytes,4,opt,name=quote,proto3" json:"quote,omitempty"` - BuySide *PurchaseSide `protobuf:"bytes,5,opt,name=buy_side,json=buySide,proto3" json:"buy_side,omitempty"` - SellSide *PurchaseSide `protobuf:"bytes,6,opt,name=sell_side,json=sellSide,proto3" json:"sell_side,omitempty"` - MinSlippagePercent string `protobuf:"bytes,7,opt,name=min_slippage_percent,json=minSlippagePercent,proto3" json:"min_slippage_percent,omitempty"` - MaxSlippagePercent string `protobuf:"bytes,8,opt,name=max_slippage_percent,json=maxSlippagePercent,proto3" json:"max_slippage_percent,omitempty"` - MakerFeeOverride string `protobuf:"bytes,9,opt,name=maker_fee_override,json=makerFeeOverride,proto3" json:"maker_fee_override,omitempty"` - TakerFeeOverride string `protobuf:"bytes,10,opt,name=taker_fee_override,json=takerFeeOverride,proto3" json:"taker_fee_override,omitempty"` - MaximumHoldingsRatio string `protobuf:"bytes,11,opt,name=maximum_holdings_ratio,json=maximumHoldingsRatio,proto3" json:"maximum_holdings_ratio,omitempty"` - SkipCandleVolumeFitting bool `protobuf:"varint,12,opt,name=skip_candle_volume_fitting,json=skipCandleVolumeFitting,proto3" json:"skip_candle_volume_fitting,omitempty"` - UseExchangeOrderLimits bool `protobuf:"varint,13,opt,name=use_exchange_order_limits,json=useExchangeOrderLimits,proto3" json:"use_exchange_order_limits,omitempty"` - UseExchangePnlCalculation bool `protobuf:"varint,14,opt,name=use_exchange_pnl_calculation,json=useExchangePnlCalculation,proto3" json:"use_exchange_pnl_calculation,omitempty"` - SpotDetails *SpotDetails `protobuf:"bytes,15,opt,name=spot_details,json=spotDetails,proto3" json:"spot_details,omitempty"` - FuturesDetails *FuturesDetails `protobuf:"bytes,16,opt,name=futures_details,json=futuresDetails,proto3" json:"futures_details,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Base string `protobuf:"bytes,3,opt,name=base,proto3" json:"base,omitempty"` + Quote string `protobuf:"bytes,4,opt,name=quote,proto3" json:"quote,omitempty"` + BuySide *PurchaseSide `protobuf:"bytes,5,opt,name=buy_side,json=buySide,proto3" json:"buy_side,omitempty"` + SellSide *PurchaseSide `protobuf:"bytes,6,opt,name=sell_side,json=sellSide,proto3" json:"sell_side,omitempty"` + MinSlippagePercent string `protobuf:"bytes,7,opt,name=min_slippage_percent,json=minSlippagePercent,proto3" json:"min_slippage_percent,omitempty"` + MaxSlippagePercent string `protobuf:"bytes,8,opt,name=max_slippage_percent,json=maxSlippagePercent,proto3" json:"max_slippage_percent,omitempty"` + MakerFeeOverride string `protobuf:"bytes,9,opt,name=maker_fee_override,json=makerFeeOverride,proto3" json:"maker_fee_override,omitempty"` + TakerFeeOverride string `protobuf:"bytes,10,opt,name=taker_fee_override,json=takerFeeOverride,proto3" json:"taker_fee_override,omitempty"` + MaximumHoldingsRatio string `protobuf:"bytes,11,opt,name=maximum_holdings_ratio,json=maximumHoldingsRatio,proto3" json:"maximum_holdings_ratio,omitempty"` + SkipCandleVolumeFitting bool `protobuf:"varint,12,opt,name=skip_candle_volume_fitting,json=skipCandleVolumeFitting,proto3" json:"skip_candle_volume_fitting,omitempty"` + UseExchangeOrderLimits bool `protobuf:"varint,13,opt,name=use_exchange_order_limits,json=useExchangeOrderLimits,proto3" json:"use_exchange_order_limits,omitempty"` + UseExchangePnlCalculation bool `protobuf:"varint,14,opt,name=use_exchange_pnl_calculation,json=useExchangePnlCalculation,proto3" json:"use_exchange_pnl_calculation,omitempty"` + SpotDetails *SpotDetails `protobuf:"bytes,15,opt,name=spot_details,json=spotDetails,proto3" json:"spot_details,omitempty"` + FuturesDetails *FuturesDetails `protobuf:"bytes,16,opt,name=futures_details,json=futuresDetails,proto3" json:"futures_details,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CurrencySettings) Reset() { *x = CurrencySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CurrencySettings) String() string { @@ -488,7 +465,7 @@ func (*CurrencySettings) ProtoMessage() {} func (x *CurrencySettings) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,22 +593,19 @@ func (x *CurrencySettings) GetFuturesDetails() *FuturesDetails { } type ApiData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` StartDate *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` EndDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` InclusiveEndDate bool `protobuf:"varint,3,opt,name=inclusive_end_date,json=inclusiveEndDate,proto3" json:"inclusive_end_date,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ApiData) Reset() { *x = ApiData{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiData) String() string { @@ -642,7 +616,7 @@ func (*ApiData) ProtoMessage() {} func (x *ApiData) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,28 +653,25 @@ func (x *ApiData) GetInclusiveEndDate() bool { } type DbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + Verbose bool `protobuf:"varint,2,opt,name=verbose,proto3" json:"verbose,omitempty"` + Driver string `protobuf:"bytes,3,opt,name=driver,proto3" json:"driver,omitempty"` + Host string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"` + Port uint32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"` + Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,7,opt,name=password,proto3" json:"password,omitempty"` + Database string `protobuf:"bytes,8,opt,name=database,proto3" json:"database,omitempty"` + SslMode string `protobuf:"bytes,9,opt,name=ssl_mode,json=sslMode,proto3" json:"ssl_mode,omitempty"` unknownFields protoimpl.UnknownFields - - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - Verbose bool `protobuf:"varint,2,opt,name=verbose,proto3" json:"verbose,omitempty"` - Driver string `protobuf:"bytes,3,opt,name=driver,proto3" json:"driver,omitempty"` - Host string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"` - Port uint32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"` - Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,7,opt,name=password,proto3" json:"password,omitempty"` - Database string `protobuf:"bytes,8,opt,name=database,proto3" json:"database,omitempty"` - SslMode string `protobuf:"bytes,9,opt,name=ssl_mode,json=sslMode,proto3" json:"ssl_mode,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DbConfig) Reset() { *x = DbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DbConfig) String() string { @@ -711,7 +682,7 @@ func (*DbConfig) ProtoMessage() {} func (x *DbConfig) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,24 +761,21 @@ func (x *DbConfig) GetSslMode() string { } type DbData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` StartDate *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` EndDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` Config *DbConfig `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` InclusiveEndDate bool `protobuf:"varint,5,opt,name=inclusive_end_date,json=inclusiveEndDate,proto3" json:"inclusive_end_date,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DbData) Reset() { *x = DbData{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DbData) String() string { @@ -818,7 +786,7 @@ func (*DbData) ProtoMessage() {} func (x *DbData) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,20 +837,17 @@ func (x *DbData) GetInclusiveEndDate() bool { } type CsvData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CsvData) Reset() { *x = CsvData{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CsvData) String() string { @@ -893,7 +858,7 @@ func (*CsvData) ProtoMessage() {} func (x *CsvData) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -916,25 +881,22 @@ func (x *CsvData) GetPath() string { } type DatabaseConnectionDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` + Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` + UserName string `protobuf:"bytes,3,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + Database string `protobuf:"bytes,5,opt,name=database,proto3" json:"database,omitempty"` + SslMode string `protobuf:"bytes,6,opt,name=ssl_mode,json=sslMode,proto3" json:"ssl_mode,omitempty"` unknownFields protoimpl.UnknownFields - - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - UserName string `protobuf:"bytes,3,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` - Database string `protobuf:"bytes,5,opt,name=database,proto3" json:"database,omitempty"` - SslMode string `protobuf:"bytes,6,opt,name=ssl_mode,json=sslMode,proto3" json:"ssl_mode,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DatabaseConnectionDetails) Reset() { *x = DatabaseConnectionDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseConnectionDetails) String() string { @@ -945,7 +907,7 @@ func (*DatabaseConnectionDetails) ProtoMessage() {} func (x *DatabaseConnectionDetails) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1003,23 +965,20 @@ func (x *DatabaseConnectionDetails) GetSslMode() string { } type DatabaseConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + Verbose bool `protobuf:"varint,2,opt,name=verbose,proto3" json:"verbose,omitempty"` + Driver string `protobuf:"bytes,3,opt,name=driver,proto3" json:"driver,omitempty"` + Config *DatabaseConnectionDetails `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` unknownFields protoimpl.UnknownFields - - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - Verbose bool `protobuf:"varint,2,opt,name=verbose,proto3" json:"verbose,omitempty"` - Driver string `protobuf:"bytes,3,opt,name=driver,proto3" json:"driver,omitempty"` - Config *DatabaseConnectionDetails `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DatabaseConfig) Reset() { *x = DatabaseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseConfig) String() string { @@ -1030,7 +989,7 @@ func (*DatabaseConfig) ProtoMessage() {} func (x *DatabaseConfig) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1074,24 +1033,21 @@ func (x *DatabaseConfig) GetConfig() *DatabaseConnectionDetails { } type DatabaseData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` StartDate *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` EndDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` Config *DatabaseConfig `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` InclusiveEndDate bool `protobuf:"varint,5,opt,name=inclusive_end_date,json=inclusiveEndDate,proto3" json:"inclusive_end_date,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DatabaseData) Reset() { *x = DatabaseData{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseData) String() string { @@ -1102,7 +1058,7 @@ func (*DatabaseData) ProtoMessage() {} func (x *DatabaseData) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1153,20 +1109,17 @@ func (x *DatabaseData) GetInclusiveEndDate() bool { } type CSVData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CSVData) Reset() { *x = CSVData{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CSVData) String() string { @@ -1177,7 +1130,7 @@ func (*CSVData) ProtoMessage() {} func (x *CSVData) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1200,27 +1153,24 @@ func (x *CSVData) GetPath() string { } type LiveData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NewEventTimeout int64 `protobuf:"varint,1,opt,name=new_event_timeout,json=newEventTimeout,proto3" json:"new_event_timeout,omitempty"` - DataCheckTimer int64 `protobuf:"varint,2,opt,name=data_check_timer,json=dataCheckTimer,proto3" json:"data_check_timer,omitempty"` - RealOrders bool `protobuf:"varint,3,opt,name=real_orders,json=realOrders,proto3" json:"real_orders,omitempty"` - ClosePositionsOnStop bool `protobuf:"varint,4,opt,name=close_positions_on_stop,json=closePositionsOnStop,proto3" json:"close_positions_on_stop,omitempty"` - DataRequestRetryTolerance int64 `protobuf:"varint,5,opt,name=data_request_retry_tolerance,json=dataRequestRetryTolerance,proto3" json:"data_request_retry_tolerance,omitempty"` - DataRequestRetryWaitTime int64 `protobuf:"varint,6,opt,name=data_request_retry_wait_time,json=dataRequestRetryWaitTime,proto3" json:"data_request_retry_wait_time,omitempty"` - UseRealOrders bool `protobuf:"varint,7,opt,name=use_real_orders,json=useRealOrders,proto3" json:"use_real_orders,omitempty"` - Credentials []*Credentials `protobuf:"bytes,8,rep,name=credentials,proto3" json:"credentials,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + NewEventTimeout int64 `protobuf:"varint,1,opt,name=new_event_timeout,json=newEventTimeout,proto3" json:"new_event_timeout,omitempty"` + DataCheckTimer int64 `protobuf:"varint,2,opt,name=data_check_timer,json=dataCheckTimer,proto3" json:"data_check_timer,omitempty"` + RealOrders bool `protobuf:"varint,3,opt,name=real_orders,json=realOrders,proto3" json:"real_orders,omitempty"` + ClosePositionsOnStop bool `protobuf:"varint,4,opt,name=close_positions_on_stop,json=closePositionsOnStop,proto3" json:"close_positions_on_stop,omitempty"` + DataRequestRetryTolerance int64 `protobuf:"varint,5,opt,name=data_request_retry_tolerance,json=dataRequestRetryTolerance,proto3" json:"data_request_retry_tolerance,omitempty"` + DataRequestRetryWaitTime int64 `protobuf:"varint,6,opt,name=data_request_retry_wait_time,json=dataRequestRetryWaitTime,proto3" json:"data_request_retry_wait_time,omitempty"` + UseRealOrders bool `protobuf:"varint,7,opt,name=use_real_orders,json=useRealOrders,proto3" json:"use_real_orders,omitempty"` + Credentials []*Credentials `protobuf:"bytes,8,rep,name=credentials,proto3" json:"credentials,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *LiveData) Reset() { *x = LiveData{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LiveData) String() string { @@ -1231,7 +1181,7 @@ func (*LiveData) ProtoMessage() {} func (x *LiveData) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1303,21 +1253,18 @@ func (x *LiveData) GetCredentials() []*Credentials { } type Credentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Keys *ExchangeCredentials `protobuf:"bytes,2,opt,name=keys,proto3" json:"keys,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Keys *ExchangeCredentials `protobuf:"bytes,2,opt,name=keys,proto3" json:"keys,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Credentials) Reset() { *x = Credentials{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Credentials) String() string { @@ -1328,7 +1275,7 @@ func (*Credentials) ProtoMessage() {} func (x *Credentials) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1358,25 +1305,22 @@ func (x *Credentials) GetKeys() *ExchangeCredentials { } type ExchangeCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` - ClientId string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - PemKey string `protobuf:"bytes,4,opt,name=pem_key,json=pemKey,proto3" json:"pem_key,omitempty"` - SubAccount string `protobuf:"bytes,5,opt,name=sub_account,json=subAccount,proto3" json:"sub_account,omitempty"` - OneTimePassword string `protobuf:"bytes,6,opt,name=one_time_password,json=oneTimePassword,proto3" json:"one_time_password,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` + ClientId string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + PemKey string `protobuf:"bytes,4,opt,name=pem_key,json=pemKey,proto3" json:"pem_key,omitempty"` + SubAccount string `protobuf:"bytes,5,opt,name=sub_account,json=subAccount,proto3" json:"sub_account,omitempty"` + OneTimePassword string `protobuf:"bytes,6,opt,name=one_time_password,json=oneTimePassword,proto3" json:"one_time_password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExchangeCredentials) Reset() { *x = ExchangeCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExchangeCredentials) String() string { @@ -1387,7 +1331,7 @@ func (*ExchangeCredentials) ProtoMessage() {} func (x *ExchangeCredentials) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1445,25 +1389,22 @@ func (x *ExchangeCredentials) GetOneTimePassword() string { } type DataSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Interval *durationpb.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` + Datatype string `protobuf:"bytes,2,opt,name=datatype,proto3" json:"datatype,omitempty"` + ApiData *ApiData `protobuf:"bytes,3,opt,name=api_data,json=apiData,proto3" json:"api_data,omitempty"` + DatabaseData *DatabaseData `protobuf:"bytes,4,opt,name=database_data,json=databaseData,proto3" json:"database_data,omitempty"` + CsvData *CSVData `protobuf:"bytes,5,opt,name=csv_data,json=csvData,proto3" json:"csv_data,omitempty"` + LiveData *LiveData `protobuf:"bytes,6,opt,name=live_data,json=liveData,proto3" json:"live_data,omitempty"` unknownFields protoimpl.UnknownFields - - Interval uint64 `protobuf:"varint,1,opt,name=interval,proto3" json:"interval,omitempty"` - Datatype string `protobuf:"bytes,2,opt,name=datatype,proto3" json:"datatype,omitempty"` - ApiData *ApiData `protobuf:"bytes,3,opt,name=api_data,json=apiData,proto3" json:"api_data,omitempty"` - DatabaseData *DatabaseData `protobuf:"bytes,4,opt,name=database_data,json=databaseData,proto3" json:"database_data,omitempty"` - CsvData *CSVData `protobuf:"bytes,5,opt,name=csv_data,json=csvData,proto3" json:"csv_data,omitempty"` - LiveData *LiveData `protobuf:"bytes,6,opt,name=live_data,json=liveData,proto3" json:"live_data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DataSettings) Reset() { *x = DataSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSettings) String() string { @@ -1474,7 +1415,7 @@ func (*DataSettings) ProtoMessage() {} func (x *DataSettings) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1489,11 +1430,11 @@ func (*DataSettings) Descriptor() ([]byte, []int) { return file_btrpc_proto_rawDescGZIP(), []int{19} } -func (x *DataSettings) GetInterval() uint64 { +func (x *DataSettings) GetInterval() *durationpb.Duration { if x != nil { return x.Interval } - return 0 + return nil } func (x *DataSettings) GetDatatype() string { @@ -1532,23 +1473,20 @@ func (x *DataSettings) GetLiveData() *LiveData { } type Leverage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CanUseLeverage bool `protobuf:"varint,1,opt,name=can_use_leverage,json=canUseLeverage,proto3" json:"can_use_leverage,omitempty"` - MaximumOrdersWithLeverageRatio string `protobuf:"bytes,2,opt,name=maximum_orders_with_leverage_ratio,json=maximumOrdersWithLeverageRatio,proto3" json:"maximum_orders_with_leverage_ratio,omitempty"` - MaximumLeverageRate string `protobuf:"bytes,3,opt,name=maximum_leverage_rate,json=maximumLeverageRate,proto3" json:"maximum_leverage_rate,omitempty"` - MaximumCollateralLeverageRate string `protobuf:"bytes,4,opt,name=maximum_collateral_leverage_rate,json=maximumCollateralLeverageRate,proto3" json:"maximum_collateral_leverage_rate,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + CanUseLeverage bool `protobuf:"varint,1,opt,name=can_use_leverage,json=canUseLeverage,proto3" json:"can_use_leverage,omitempty"` + MaximumOrdersWithLeverageRatio string `protobuf:"bytes,2,opt,name=maximum_orders_with_leverage_ratio,json=maximumOrdersWithLeverageRatio,proto3" json:"maximum_orders_with_leverage_ratio,omitempty"` + MaximumLeverageRate string `protobuf:"bytes,3,opt,name=maximum_leverage_rate,json=maximumLeverageRate,proto3" json:"maximum_leverage_rate,omitempty"` + MaximumCollateralLeverageRate string `protobuf:"bytes,4,opt,name=maximum_collateral_leverage_rate,json=maximumCollateralLeverageRate,proto3" json:"maximum_collateral_leverage_rate,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Leverage) Reset() { *x = Leverage{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Leverage) String() string { @@ -1559,7 +1497,7 @@ func (*Leverage) ProtoMessage() {} func (x *Leverage) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1603,22 +1541,19 @@ func (x *Leverage) GetMaximumCollateralLeverageRate() string { } type PortfolioSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Leverage *Leverage `protobuf:"bytes,1,opt,name=leverage,proto3" json:"leverage,omitempty"` + BuySide *PurchaseSide `protobuf:"bytes,2,opt,name=buy_side,json=buySide,proto3" json:"buy_side,omitempty"` + SellSide *PurchaseSide `protobuf:"bytes,3,opt,name=sell_side,json=sellSide,proto3" json:"sell_side,omitempty"` unknownFields protoimpl.UnknownFields - - Leverage *Leverage `protobuf:"bytes,1,opt,name=leverage,proto3" json:"leverage,omitempty"` - BuySide *PurchaseSide `protobuf:"bytes,2,opt,name=buy_side,json=buySide,proto3" json:"buy_side,omitempty"` - SellSide *PurchaseSide `protobuf:"bytes,3,opt,name=sell_side,json=sellSide,proto3" json:"sell_side,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PortfolioSettings) Reset() { *x = PortfolioSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PortfolioSettings) String() string { @@ -1629,7 +1564,7 @@ func (*PortfolioSettings) ProtoMessage() {} func (x *PortfolioSettings) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1666,20 +1601,17 @@ func (x *PortfolioSettings) GetSellSide() *PurchaseSide { } type StatisticSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + RiskFreeRate string `protobuf:"bytes,1,opt,name=risk_free_rate,json=riskFreeRate,proto3" json:"risk_free_rate,omitempty"` unknownFields protoimpl.UnknownFields - - RiskFreeRate string `protobuf:"bytes,1,opt,name=risk_free_rate,json=riskFreeRate,proto3" json:"risk_free_rate,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StatisticSettings) Reset() { *x = StatisticSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatisticSettings) String() string { @@ -1690,7 +1622,7 @@ func (*StatisticSettings) ProtoMessage() {} func (x *StatisticSettings) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1713,27 +1645,24 @@ func (x *StatisticSettings) GetRiskFreeRate() string { } type Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` - Goal string `protobuf:"bytes,2,opt,name=goal,proto3" json:"goal,omitempty"` - StrategySettings *StrategySettings `protobuf:"bytes,3,opt,name=strategy_settings,json=strategySettings,proto3" json:"strategy_settings,omitempty"` - FundingSettings *FundingSettings `protobuf:"bytes,4,opt,name=funding_settings,json=fundingSettings,proto3" json:"funding_settings,omitempty"` - CurrencySettings []*CurrencySettings `protobuf:"bytes,5,rep,name=currency_settings,json=currencySettings,proto3" json:"currency_settings,omitempty"` - DataSettings *DataSettings `protobuf:"bytes,6,opt,name=data_settings,json=dataSettings,proto3" json:"data_settings,omitempty"` - PortfolioSettings *PortfolioSettings `protobuf:"bytes,7,opt,name=portfolio_settings,json=portfolioSettings,proto3" json:"portfolio_settings,omitempty"` - StatisticSettings *StatisticSettings `protobuf:"bytes,8,opt,name=statistic_settings,json=statisticSettings,proto3" json:"statistic_settings,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` + Goal string `protobuf:"bytes,2,opt,name=goal,proto3" json:"goal,omitempty"` + StrategySettings *StrategySettings `protobuf:"bytes,3,opt,name=strategy_settings,json=strategySettings,proto3" json:"strategy_settings,omitempty"` + FundingSettings *FundingSettings `protobuf:"bytes,4,opt,name=funding_settings,json=fundingSettings,proto3" json:"funding_settings,omitempty"` + CurrencySettings []*CurrencySettings `protobuf:"bytes,5,rep,name=currency_settings,json=currencySettings,proto3" json:"currency_settings,omitempty"` + DataSettings *DataSettings `protobuf:"bytes,6,opt,name=data_settings,json=dataSettings,proto3" json:"data_settings,omitempty"` + PortfolioSettings *PortfolioSettings `protobuf:"bytes,7,opt,name=portfolio_settings,json=portfolioSettings,proto3" json:"portfolio_settings,omitempty"` + StatisticSettings *StatisticSettings `protobuf:"bytes,8,opt,name=statistic_settings,json=statisticSettings,proto3" json:"statistic_settings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Config) Reset() { *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Config) String() string { @@ -1744,7 +1673,7 @@ func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1816,27 +1745,24 @@ func (x *Config) GetStatisticSettings() *StatisticSettings { } type TaskSummary struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + StrategyName string `protobuf:"bytes,2,opt,name=strategy_name,json=strategyName,proto3" json:"strategy_name,omitempty"` + DateLoaded string `protobuf:"bytes,3,opt,name=date_loaded,json=dateLoaded,proto3" json:"date_loaded,omitempty"` + DateStarted string `protobuf:"bytes,4,opt,name=date_started,json=dateStarted,proto3" json:"date_started,omitempty"` + DateEnded string `protobuf:"bytes,5,opt,name=date_ended,json=dateEnded,proto3" json:"date_ended,omitempty"` + Closed bool `protobuf:"varint,6,opt,name=closed,proto3" json:"closed,omitempty"` + LiveTesting bool `protobuf:"varint,7,opt,name=live_testing,json=liveTesting,proto3" json:"live_testing,omitempty"` + RealOrders bool `protobuf:"varint,8,opt,name=real_orders,json=realOrders,proto3" json:"real_orders,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - StrategyName string `protobuf:"bytes,2,opt,name=strategy_name,json=strategyName,proto3" json:"strategy_name,omitempty"` - DateLoaded string `protobuf:"bytes,3,opt,name=date_loaded,json=dateLoaded,proto3" json:"date_loaded,omitempty"` - DateStarted string `protobuf:"bytes,4,opt,name=date_started,json=dateStarted,proto3" json:"date_started,omitempty"` - DateEnded string `protobuf:"bytes,5,opt,name=date_ended,json=dateEnded,proto3" json:"date_ended,omitempty"` - Closed bool `protobuf:"varint,6,opt,name=closed,proto3" json:"closed,omitempty"` - LiveTesting bool `protobuf:"varint,7,opt,name=live_testing,json=liveTesting,proto3" json:"live_testing,omitempty"` - RealOrders bool `protobuf:"varint,8,opt,name=real_orders,json=realOrders,proto3" json:"real_orders,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TaskSummary) Reset() { *x = TaskSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskSummary) String() string { @@ -1847,7 +1773,7 @@ func (*TaskSummary) ProtoMessage() {} func (x *TaskSummary) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1920,25 +1846,22 @@ func (x *TaskSummary) GetRealOrders() bool { // Requests and responses type ExecuteStrategyFromFileRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` StrategyFilePath string `protobuf:"bytes,1,opt,name=strategy_file_path,json=strategyFilePath,proto3" json:"strategy_file_path,omitempty"` DoNotRunImmediately bool `protobuf:"varint,2,opt,name=do_not_run_immediately,json=doNotRunImmediately,proto3" json:"do_not_run_immediately,omitempty"` DoNotStore bool `protobuf:"varint,3,opt,name=do_not_store,json=doNotStore,proto3" json:"do_not_store,omitempty"` StartTimeOverride *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time_override,json=startTimeOverride,proto3" json:"start_time_override,omitempty"` EndTimeOverride *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_time_override,json=endTimeOverride,proto3" json:"end_time_override,omitempty"` - IntervalOverride uint64 `protobuf:"varint,6,opt,name=interval_override,json=intervalOverride,proto3" json:"interval_override,omitempty"` + IntervalOverride *durationpb.Duration `protobuf:"bytes,6,opt,name=interval_override,json=intervalOverride,proto3" json:"interval_override,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExecuteStrategyFromFileRequest) Reset() { *x = ExecuteStrategyFromFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteStrategyFromFileRequest) String() string { @@ -1949,7 +1872,7 @@ func (*ExecuteStrategyFromFileRequest) ProtoMessage() {} func (x *ExecuteStrategyFromFileRequest) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1999,28 +1922,25 @@ func (x *ExecuteStrategyFromFileRequest) GetEndTimeOverride() *timestamppb.Times return nil } -func (x *ExecuteStrategyFromFileRequest) GetIntervalOverride() uint64 { +func (x *ExecuteStrategyFromFileRequest) GetIntervalOverride() *durationpb.Duration { if x != nil { return x.IntervalOverride } - return 0 + return nil } type ExecuteStrategyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Task *TaskSummary `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` unknownFields protoimpl.UnknownFields - - Task *TaskSummary `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ExecuteStrategyResponse) Reset() { *x = ExecuteStrategyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteStrategyResponse) String() string { @@ -2031,7 +1951,7 @@ func (*ExecuteStrategyResponse) ProtoMessage() {} func (x *ExecuteStrategyResponse) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2054,22 +1974,19 @@ func (x *ExecuteStrategyResponse) GetTask() *TaskSummary { } type ExecuteStrategyFromConfigRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DoNotRunImmediately bool `protobuf:"varint,1,opt,name=do_not_run_immediately,json=doNotRunImmediately,proto3" json:"do_not_run_immediately,omitempty"` - DoNotStore bool `protobuf:"varint,2,opt,name=do_not_store,json=doNotStore,proto3" json:"do_not_store,omitempty"` - Config *Config `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + DoNotRunImmediately bool `protobuf:"varint,1,opt,name=do_not_run_immediately,json=doNotRunImmediately,proto3" json:"do_not_run_immediately,omitempty"` + DoNotStore bool `protobuf:"varint,2,opt,name=do_not_store,json=doNotStore,proto3" json:"do_not_store,omitempty"` + Config *Config `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExecuteStrategyFromConfigRequest) Reset() { *x = ExecuteStrategyFromConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteStrategyFromConfigRequest) String() string { @@ -2080,7 +1997,7 @@ func (*ExecuteStrategyFromConfigRequest) ProtoMessage() {} func (x *ExecuteStrategyFromConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2117,18 +2034,16 @@ func (x *ExecuteStrategyFromConfigRequest) GetConfig() *Config { } type ListAllTasksRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListAllTasksRequest) Reset() { *x = ListAllTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAllTasksRequest) String() string { @@ -2139,7 +2054,7 @@ func (*ListAllTasksRequest) ProtoMessage() {} func (x *ListAllTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2155,20 +2070,17 @@ func (*ListAllTasksRequest) Descriptor() ([]byte, []int) { } type ListAllTasksResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Tasks []*TaskSummary `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` unknownFields protoimpl.UnknownFields - - Tasks []*TaskSummary `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ListAllTasksResponse) Reset() { *x = ListAllTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAllTasksResponse) String() string { @@ -2179,7 +2091,7 @@ func (*ListAllTasksResponse) ProtoMessage() {} func (x *ListAllTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2202,20 +2114,17 @@ func (x *ListAllTasksResponse) GetTasks() []*TaskSummary { } type StopTaskRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StopTaskRequest) Reset() { *x = StopTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopTaskRequest) String() string { @@ -2226,7 +2135,7 @@ func (*StopTaskRequest) ProtoMessage() {} func (x *StopTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2249,20 +2158,17 @@ func (x *StopTaskRequest) GetId() string { } type StopTaskResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + StoppedTask *TaskSummary `protobuf:"bytes,1,opt,name=stopped_task,json=stoppedTask,proto3" json:"stopped_task,omitempty"` unknownFields protoimpl.UnknownFields - - StoppedTask *TaskSummary `protobuf:"bytes,1,opt,name=stopped_task,json=stoppedTask,proto3" json:"stopped_task,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StopTaskResponse) Reset() { *x = StopTaskResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopTaskResponse) String() string { @@ -2273,7 +2179,7 @@ func (*StopTaskResponse) ProtoMessage() {} func (x *StopTaskResponse) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2296,20 +2202,17 @@ func (x *StopTaskResponse) GetStoppedTask() *TaskSummary { } type StartTaskRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StartTaskRequest) Reset() { *x = StartTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartTaskRequest) String() string { @@ -2320,7 +2223,7 @@ func (*StartTaskRequest) ProtoMessage() {} func (x *StartTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2343,20 +2246,17 @@ func (x *StartTaskRequest) GetId() string { } type StartTaskResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Started bool `protobuf:"varint,1,opt,name=started,proto3" json:"started,omitempty"` unknownFields protoimpl.UnknownFields - - Started bool `protobuf:"varint,1,opt,name=started,proto3" json:"started,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StartTaskResponse) Reset() { *x = StartTaskResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartTaskResponse) String() string { @@ -2367,7 +2267,7 @@ func (*StartTaskResponse) ProtoMessage() {} func (x *StartTaskResponse) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2390,18 +2290,16 @@ func (x *StartTaskResponse) GetStarted() bool { } type StartAllTasksRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StartAllTasksRequest) Reset() { *x = StartAllTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartAllTasksRequest) String() string { @@ -2412,7 +2310,7 @@ func (*StartAllTasksRequest) ProtoMessage() {} func (x *StartAllTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2428,20 +2326,17 @@ func (*StartAllTasksRequest) Descriptor() ([]byte, []int) { } type StartAllTasksResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + TasksStarted []string `protobuf:"bytes,1,rep,name=tasks_started,json=tasksStarted,proto3" json:"tasks_started,omitempty"` unknownFields protoimpl.UnknownFields - - TasksStarted []string `protobuf:"bytes,1,rep,name=tasks_started,json=tasksStarted,proto3" json:"tasks_started,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StartAllTasksResponse) Reset() { *x = StartAllTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartAllTasksResponse) String() string { @@ -2452,7 +2347,7 @@ func (*StartAllTasksResponse) ProtoMessage() {} func (x *StartAllTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2475,18 +2370,16 @@ func (x *StartAllTasksResponse) GetTasksStarted() []string { } type StopAllTasksRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StopAllTasksRequest) Reset() { *x = StopAllTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopAllTasksRequest) String() string { @@ -2497,7 +2390,7 @@ func (*StopAllTasksRequest) ProtoMessage() {} func (x *StopAllTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2513,20 +2406,17 @@ func (*StopAllTasksRequest) Descriptor() ([]byte, []int) { } type StopAllTasksResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + TasksStopped []*TaskSummary `protobuf:"bytes,1,rep,name=tasks_stopped,json=tasksStopped,proto3" json:"tasks_stopped,omitempty"` unknownFields protoimpl.UnknownFields - - TasksStopped []*TaskSummary `protobuf:"bytes,1,rep,name=tasks_stopped,json=tasksStopped,proto3" json:"tasks_stopped,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StopAllTasksResponse) Reset() { *x = StopAllTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopAllTasksResponse) String() string { @@ -2537,7 +2427,7 @@ func (*StopAllTasksResponse) ProtoMessage() {} func (x *StopAllTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2560,20 +2450,17 @@ func (x *StopAllTasksResponse) GetTasksStopped() []*TaskSummary { } type ClearTaskRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ClearTaskRequest) Reset() { *x = ClearTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearTaskRequest) String() string { @@ -2584,7 +2471,7 @@ func (*ClearTaskRequest) ProtoMessage() {} func (x *ClearTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2607,20 +2494,17 @@ func (x *ClearTaskRequest) GetId() string { } type ClearTaskResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ClearedTask *TaskSummary `protobuf:"bytes,1,opt,name=cleared_task,json=clearedTask,proto3" json:"cleared_task,omitempty"` unknownFields protoimpl.UnknownFields - - ClearedTask *TaskSummary `protobuf:"bytes,1,opt,name=cleared_task,json=clearedTask,proto3" json:"cleared_task,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ClearTaskResponse) Reset() { *x = ClearTaskResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearTaskResponse) String() string { @@ -2631,7 +2515,7 @@ func (*ClearTaskResponse) ProtoMessage() {} func (x *ClearTaskResponse) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2654,18 +2538,16 @@ func (x *ClearTaskResponse) GetClearedTask() *TaskSummary { } type ClearAllTasksRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ClearAllTasksRequest) Reset() { *x = ClearAllTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearAllTasksRequest) String() string { @@ -2676,7 +2558,7 @@ func (*ClearAllTasksRequest) ProtoMessage() {} func (x *ClearAllTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2692,21 +2574,18 @@ func (*ClearAllTasksRequest) Descriptor() ([]byte, []int) { } type ClearAllTasksResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClearedTasks []*TaskSummary `protobuf:"bytes,1,rep,name=cleared_tasks,json=clearedTasks,proto3" json:"cleared_tasks,omitempty"` - RemainingTasks []*TaskSummary `protobuf:"bytes,2,rep,name=remaining_tasks,json=remainingTasks,proto3" json:"remaining_tasks,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ClearedTasks []*TaskSummary `protobuf:"bytes,1,rep,name=cleared_tasks,json=clearedTasks,proto3" json:"cleared_tasks,omitempty"` + RemainingTasks []*TaskSummary `protobuf:"bytes,2,rep,name=remaining_tasks,json=remainingTasks,proto3" json:"remaining_tasks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ClearAllTasksResponse) Reset() { *x = ClearAllTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_btrpc_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearAllTasksResponse) String() string { @@ -2717,7 +2596,7 @@ func (*ClearAllTasksResponse) ProtoMessage() {} func (x *ClearAllTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_btrpc_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2754,6 +2633,8 @@ var file_btrpc_proto_rawDesc = []byte{ 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x22, @@ -2985,247 +2866,251 @@ var file_btrpc_proto_rawDesc = []byte{ 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x6e, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x84, 0x02, 0x0a, 0x0c, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, - 0x70, 0x69, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x61, 0x70, 0x69, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x38, 0x0a, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x64, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x08, 0x63, 0x73, 0x76, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x53, 0x56, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x63, 0x73, 0x76, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x09, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x4c, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6c, 0x69, 0x76, 0x65, 0x44, 0x61, - 0x74, 0x61, 0x22, 0xfd, 0x01, 0x0a, 0x08, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, - 0x28, 0x0a, 0x10, 0x63, 0x61, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, - 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x55, 0x73, - 0x65, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x4a, 0x0a, 0x22, 0x6d, 0x61, 0x78, - 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, - 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, - 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, - 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x65, 0x76, - 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x20, 0x6d, 0x61, 0x78, - 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, - 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x1d, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x6f, 0x6c, 0x6c, - 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x61, - 0x74, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x11, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2b, 0x0a, 0x08, 0x6c, 0x65, 0x76, 0x65, - 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6c, 0x65, 0x76, - 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x5f, 0x73, 0x69, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x69, 0x64, 0x65, 0x52, 0x07, 0x62, 0x75, - 0x79, 0x53, 0x69, 0x64, 0x65, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x73, 0x69, - 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x69, 0x64, 0x65, 0x52, 0x08, 0x73, - 0x65, 0x6c, 0x6c, 0x53, 0x69, 0x64, 0x65, 0x22, 0x39, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x24, 0x0a, 0x0e, - 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x69, 0x73, 0x6b, 0x46, 0x72, 0x65, 0x65, 0x52, 0x61, - 0x74, 0x65, 0x22, 0xd3, 0x03, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, - 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x61, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x67, 0x6f, 0x61, 0x6c, 0x12, 0x44, 0x0a, - 0x11, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x52, 0x10, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x10, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x44, 0x0a, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x63, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x63, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x0d, - 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x47, 0x0a, 0x12, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, - 0x6c, 0x69, 0x6f, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, - 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x11, 0x70, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x47, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x11, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x73, - 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x65, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x12, 0x21, - 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x65, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x69, 0x76, 0x65, - 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x6c, 0x69, 0x76, 0x65, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x72, - 0x65, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x72, 0x65, 0x61, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0xe6, 0x02, 0x0a, - 0x1e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, - 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x33, 0x0a, - 0x16, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x6d, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, - 0x6f, 0x4e, 0x6f, 0x74, 0x52, 0x75, 0x6e, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, - 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x73, 0x74, 0x6f, - 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, - 0x12, 0x46, 0x0a, 0x11, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x41, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x26, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0xa0, 0x01, 0x0a, 0x20, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, - 0x16, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x6d, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, - 0x6f, 0x4e, 0x6f, 0x74, 0x52, 0x75, 0x6e, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, - 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x73, 0x74, 0x6f, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x15, 0x0a, 0x13, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x40, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, - 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x61, - 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x05, 0x74, - 0x61, 0x73, 0x6b, 0x73, 0x22, 0x21, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x70, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x73, - 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x54, 0x61, - 0x73, 0x6b, 0x22, 0x22, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2d, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, - 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, - 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, - 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x53, - 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, - 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x74, 0x61, - 0x73, 0x6b, 0x73, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x6f, 0x70, - 0x70, 0x65, 0x64, 0x22, 0x22, 0x0a, 0x10, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4a, 0x0a, 0x11, 0x43, 0x6c, 0x65, 0x61, 0x72, - 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0c, - 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x69, 0x6d, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x9f, 0x02, 0x0a, 0x0c, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x35, 0x0a, 0x08, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x29, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x70, 0x69, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x07, 0x61, 0x70, 0x69, 0x44, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x0d, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x08, 0x63, 0x73, 0x76, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, + 0x53, 0x56, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x63, 0x73, 0x76, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x2c, 0x0a, 0x09, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x76, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6c, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xfd, 0x01, + 0x0a, 0x08, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x61, + 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x55, 0x73, 0x65, 0x4c, 0x65, 0x76, 0x65, + 0x72, 0x61, 0x67, 0x65, 0x12, 0x4a, 0x0a, 0x22, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, + 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x1e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x57, + 0x69, 0x74, 0x68, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, + 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x65, 0x76, 0x65, + 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x20, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, + 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, + 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0xa2, 0x01, + 0x0a, 0x11, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x2b, 0x0a, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, + 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, + 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, + 0x61, 0x73, 0x65, 0x53, 0x69, 0x64, 0x65, 0x52, 0x07, 0x62, 0x75, 0x79, 0x53, 0x69, 0x64, 0x65, + 0x12, 0x30, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x72, 0x63, + 0x68, 0x61, 0x73, 0x65, 0x53, 0x69, 0x64, 0x65, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x6c, 0x53, 0x69, + 0x64, 0x65, 0x22, 0x39, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x69, 0x73, 0x6b, 0x5f, + 0x66, 0x72, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x69, 0x73, 0x6b, 0x46, 0x72, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0xd3, 0x03, + 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x67, 0x6f, 0x61, 0x6c, 0x12, 0x44, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x10, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x41, + 0x0a, 0x10, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x52, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x44, 0x0a, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x47, 0x0a, 0x12, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x5f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x11, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, + 0x69, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x47, 0x0a, 0x12, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x52, 0x11, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, + 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, + 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, + 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6c, 0x69, 0x76, 0x65, 0x54, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x61, + 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0x81, 0x03, 0x0a, 0x1e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x46, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, + 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x33, 0x0a, 0x16, 0x64, 0x6f, 0x5f, 0x6e, + 0x6f, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, + 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x52, + 0x75, 0x6e, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x12, 0x20, 0x0a, + 0x0c, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, + 0x4a, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x65, + 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, + 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x41, 0x0a, 0x17, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0xa0, + 0x01, 0x0a, 0x20, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x16, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x75, + 0x6e, 0x5f, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x52, 0x75, 0x6e, 0x49, 0x6d, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x6f, 0x5f, 0x6e, + 0x6f, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x40, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x28, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x21, 0x0a, 0x0f, 0x53, 0x74, + 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x49, 0x0a, + 0x10, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x73, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x74, 0x6f, + 0x70, 0x70, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x22, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2d, 0x0a, 0x11, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x70, + 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x37, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0c, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x22, 0x22, 0x0a, 0x10, 0x43, 0x6c, 0x65, + 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4a, 0x0a, + 0x11, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x61, + 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0b, 0x63, 0x6c, + 0x65, 0x61, 0x72, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x6c, 0x65, + 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, + 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x63, + 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0b, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x54, - 0x61, 0x73, 0x6b, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x15, - 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, - 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x52, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x3b, - 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x73, 0x6b, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x6d, - 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x32, 0xbe, 0x07, 0x0a, 0x11, - 0x42, 0x61, 0x63, 0x6b, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x85, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x12, 0x3b, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x32, 0xbe, 0x07, 0x0a, 0x11, 0x42, 0x61, 0x63, 0x6b, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x46, + 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x46, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x66, 0x72, 0x6f, 0x6d, 0x66, 0x69, 0x6c, 0x65, 0x12, + 0x8b, 0x01, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, - 0x31, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, - 0x79, 0x66, 0x72, 0x6f, 0x6d, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, - 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, - 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x66, 0x72, 0x6f, - 0x6d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x61, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x55, 0x0a, 0x09, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0f, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x61, 0x73, - 0x6b, 0x12, 0x65, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, - 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x51, 0x0a, 0x08, 0x53, 0x74, 0x6f, 0x70, - 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, - 0x70, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, 0x0c, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x61, 0x0a, 0x0c, 0x53, - 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x10, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x55, - 0x0a, 0x09, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x17, 0x2e, 0x62, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, - 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x2a, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x65, 0x61, - 0x72, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x65, 0x0a, 0x0d, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, - 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, - 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, 0x61, - 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x63, - 0x6c, 0x65, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x3a, 0x5a, 0x38, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x68, 0x72, 0x61, 0x73, - 0x68, 0x65, 0x72, 0x2d, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x67, 0x6f, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x74, 0x65, 0x73, 0x74, - 0x65, 0x72, 0x2f, 0x62, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1d, + 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x66, 0x72, 0x6f, 0x6d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x61, 0x0a, + 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1a, 0x2e, + 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, + 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x12, 0x55, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x17, 0x2e, + 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x65, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x51, + 0x0a, 0x08, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x2e, 0x62, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x0e, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x74, 0x61, 0x73, + 0x6b, 0x12, 0x61, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, + 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x12, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x6c, 0x6c, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x12, 0x55, 0x0a, 0x09, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, + 0x6b, 0x12, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x2a, 0x0d, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x65, 0x0a, 0x0d, 0x43, + 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x62, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, + 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x74, 0x68, 0x72, 0x61, 0x73, 0x68, 0x65, 0x72, 0x2d, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x67, + 0x6f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x62, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3241,7 +3126,7 @@ func file_btrpc_proto_rawDescGZIP() []byte { } var file_btrpc_proto_msgTypes = make([]protoimpl.MessageInfo, 42) -var file_btrpc_proto_goTypes = []interface{}{ +var file_btrpc_proto_goTypes = []any{ (*StrategySettings)(nil), // 0: btrpc.StrategySettings (*CustomSettings)(nil), // 1: btrpc.CustomSettings (*ExchangeLevelFunding)(nil), // 2: btrpc.ExchangeLevelFunding @@ -3285,6 +3170,7 @@ var file_btrpc_proto_goTypes = []interface{}{ (*ClearAllTasksRequest)(nil), // 40: btrpc.ClearAllTasksRequest (*ClearAllTasksResponse)(nil), // 41: btrpc.ClearAllTasksResponse (*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 43: google.protobuf.Duration } var file_btrpc_proto_depIdxs = []int32{ 1, // 0: btrpc.StrategySettings.custom_settings:type_name -> btrpc.CustomSettings @@ -3305,52 +3191,54 @@ var file_btrpc_proto_depIdxs = []int32{ 13, // 15: btrpc.DatabaseData.config:type_name -> btrpc.DatabaseConfig 17, // 16: btrpc.LiveData.credentials:type_name -> btrpc.Credentials 18, // 17: btrpc.Credentials.keys:type_name -> btrpc.ExchangeCredentials - 8, // 18: btrpc.DataSettings.api_data:type_name -> btrpc.ApiData - 14, // 19: btrpc.DataSettings.database_data:type_name -> btrpc.DatabaseData - 15, // 20: btrpc.DataSettings.csv_data:type_name -> btrpc.CSVData - 16, // 21: btrpc.DataSettings.live_data:type_name -> btrpc.LiveData - 20, // 22: btrpc.PortfolioSettings.leverage:type_name -> btrpc.Leverage - 4, // 23: btrpc.PortfolioSettings.buy_side:type_name -> btrpc.PurchaseSide - 4, // 24: btrpc.PortfolioSettings.sell_side:type_name -> btrpc.PurchaseSide - 0, // 25: btrpc.Config.strategy_settings:type_name -> btrpc.StrategySettings - 3, // 26: btrpc.Config.funding_settings:type_name -> btrpc.FundingSettings - 7, // 27: btrpc.Config.currency_settings:type_name -> btrpc.CurrencySettings - 19, // 28: btrpc.Config.data_settings:type_name -> btrpc.DataSettings - 21, // 29: btrpc.Config.portfolio_settings:type_name -> btrpc.PortfolioSettings - 22, // 30: btrpc.Config.statistic_settings:type_name -> btrpc.StatisticSettings - 42, // 31: btrpc.ExecuteStrategyFromFileRequest.start_time_override:type_name -> google.protobuf.Timestamp - 42, // 32: btrpc.ExecuteStrategyFromFileRequest.end_time_override:type_name -> google.protobuf.Timestamp - 24, // 33: btrpc.ExecuteStrategyResponse.task:type_name -> btrpc.TaskSummary - 23, // 34: btrpc.ExecuteStrategyFromConfigRequest.config:type_name -> btrpc.Config - 24, // 35: btrpc.ListAllTasksResponse.tasks:type_name -> btrpc.TaskSummary - 24, // 36: btrpc.StopTaskResponse.stopped_task:type_name -> btrpc.TaskSummary - 24, // 37: btrpc.StopAllTasksResponse.tasks_stopped:type_name -> btrpc.TaskSummary - 24, // 38: btrpc.ClearTaskResponse.cleared_task:type_name -> btrpc.TaskSummary - 24, // 39: btrpc.ClearAllTasksResponse.cleared_tasks:type_name -> btrpc.TaskSummary - 24, // 40: btrpc.ClearAllTasksResponse.remaining_tasks:type_name -> btrpc.TaskSummary - 25, // 41: btrpc.BacktesterService.ExecuteStrategyFromFile:input_type -> btrpc.ExecuteStrategyFromFileRequest - 27, // 42: btrpc.BacktesterService.ExecuteStrategyFromConfig:input_type -> btrpc.ExecuteStrategyFromConfigRequest - 28, // 43: btrpc.BacktesterService.ListAllTasks:input_type -> btrpc.ListAllTasksRequest - 32, // 44: btrpc.BacktesterService.StartTask:input_type -> btrpc.StartTaskRequest - 34, // 45: btrpc.BacktesterService.StartAllTasks:input_type -> btrpc.StartAllTasksRequest - 30, // 46: btrpc.BacktesterService.StopTask:input_type -> btrpc.StopTaskRequest - 36, // 47: btrpc.BacktesterService.StopAllTasks:input_type -> btrpc.StopAllTasksRequest - 38, // 48: btrpc.BacktesterService.ClearTask:input_type -> btrpc.ClearTaskRequest - 40, // 49: btrpc.BacktesterService.ClearAllTasks:input_type -> btrpc.ClearAllTasksRequest - 26, // 50: btrpc.BacktesterService.ExecuteStrategyFromFile:output_type -> btrpc.ExecuteStrategyResponse - 26, // 51: btrpc.BacktesterService.ExecuteStrategyFromConfig:output_type -> btrpc.ExecuteStrategyResponse - 29, // 52: btrpc.BacktesterService.ListAllTasks:output_type -> btrpc.ListAllTasksResponse - 33, // 53: btrpc.BacktesterService.StartTask:output_type -> btrpc.StartTaskResponse - 35, // 54: btrpc.BacktesterService.StartAllTasks:output_type -> btrpc.StartAllTasksResponse - 31, // 55: btrpc.BacktesterService.StopTask:output_type -> btrpc.StopTaskResponse - 37, // 56: btrpc.BacktesterService.StopAllTasks:output_type -> btrpc.StopAllTasksResponse - 39, // 57: btrpc.BacktesterService.ClearTask:output_type -> btrpc.ClearTaskResponse - 41, // 58: btrpc.BacktesterService.ClearAllTasks:output_type -> btrpc.ClearAllTasksResponse - 50, // [50:59] is the sub-list for method output_type - 41, // [41:50] is the sub-list for method input_type - 41, // [41:41] is the sub-list for extension type_name - 41, // [41:41] is the sub-list for extension extendee - 0, // [0:41] is the sub-list for field type_name + 43, // 18: btrpc.DataSettings.interval:type_name -> google.protobuf.Duration + 8, // 19: btrpc.DataSettings.api_data:type_name -> btrpc.ApiData + 14, // 20: btrpc.DataSettings.database_data:type_name -> btrpc.DatabaseData + 15, // 21: btrpc.DataSettings.csv_data:type_name -> btrpc.CSVData + 16, // 22: btrpc.DataSettings.live_data:type_name -> btrpc.LiveData + 20, // 23: btrpc.PortfolioSettings.leverage:type_name -> btrpc.Leverage + 4, // 24: btrpc.PortfolioSettings.buy_side:type_name -> btrpc.PurchaseSide + 4, // 25: btrpc.PortfolioSettings.sell_side:type_name -> btrpc.PurchaseSide + 0, // 26: btrpc.Config.strategy_settings:type_name -> btrpc.StrategySettings + 3, // 27: btrpc.Config.funding_settings:type_name -> btrpc.FundingSettings + 7, // 28: btrpc.Config.currency_settings:type_name -> btrpc.CurrencySettings + 19, // 29: btrpc.Config.data_settings:type_name -> btrpc.DataSettings + 21, // 30: btrpc.Config.portfolio_settings:type_name -> btrpc.PortfolioSettings + 22, // 31: btrpc.Config.statistic_settings:type_name -> btrpc.StatisticSettings + 42, // 32: btrpc.ExecuteStrategyFromFileRequest.start_time_override:type_name -> google.protobuf.Timestamp + 42, // 33: btrpc.ExecuteStrategyFromFileRequest.end_time_override:type_name -> google.protobuf.Timestamp + 43, // 34: btrpc.ExecuteStrategyFromFileRequest.interval_override:type_name -> google.protobuf.Duration + 24, // 35: btrpc.ExecuteStrategyResponse.task:type_name -> btrpc.TaskSummary + 23, // 36: btrpc.ExecuteStrategyFromConfigRequest.config:type_name -> btrpc.Config + 24, // 37: btrpc.ListAllTasksResponse.tasks:type_name -> btrpc.TaskSummary + 24, // 38: btrpc.StopTaskResponse.stopped_task:type_name -> btrpc.TaskSummary + 24, // 39: btrpc.StopAllTasksResponse.tasks_stopped:type_name -> btrpc.TaskSummary + 24, // 40: btrpc.ClearTaskResponse.cleared_task:type_name -> btrpc.TaskSummary + 24, // 41: btrpc.ClearAllTasksResponse.cleared_tasks:type_name -> btrpc.TaskSummary + 24, // 42: btrpc.ClearAllTasksResponse.remaining_tasks:type_name -> btrpc.TaskSummary + 25, // 43: btrpc.BacktesterService.ExecuteStrategyFromFile:input_type -> btrpc.ExecuteStrategyFromFileRequest + 27, // 44: btrpc.BacktesterService.ExecuteStrategyFromConfig:input_type -> btrpc.ExecuteStrategyFromConfigRequest + 28, // 45: btrpc.BacktesterService.ListAllTasks:input_type -> btrpc.ListAllTasksRequest + 32, // 46: btrpc.BacktesterService.StartTask:input_type -> btrpc.StartTaskRequest + 34, // 47: btrpc.BacktesterService.StartAllTasks:input_type -> btrpc.StartAllTasksRequest + 30, // 48: btrpc.BacktesterService.StopTask:input_type -> btrpc.StopTaskRequest + 36, // 49: btrpc.BacktesterService.StopAllTasks:input_type -> btrpc.StopAllTasksRequest + 38, // 50: btrpc.BacktesterService.ClearTask:input_type -> btrpc.ClearTaskRequest + 40, // 51: btrpc.BacktesterService.ClearAllTasks:input_type -> btrpc.ClearAllTasksRequest + 26, // 52: btrpc.BacktesterService.ExecuteStrategyFromFile:output_type -> btrpc.ExecuteStrategyResponse + 26, // 53: btrpc.BacktesterService.ExecuteStrategyFromConfig:output_type -> btrpc.ExecuteStrategyResponse + 29, // 54: btrpc.BacktesterService.ListAllTasks:output_type -> btrpc.ListAllTasksResponse + 33, // 55: btrpc.BacktesterService.StartTask:output_type -> btrpc.StartTaskResponse + 35, // 56: btrpc.BacktesterService.StartAllTasks:output_type -> btrpc.StartAllTasksResponse + 31, // 57: btrpc.BacktesterService.StopTask:output_type -> btrpc.StopTaskResponse + 37, // 58: btrpc.BacktesterService.StopAllTasks:output_type -> btrpc.StopAllTasksResponse + 39, // 59: btrpc.BacktesterService.ClearTask:output_type -> btrpc.ClearTaskResponse + 41, // 60: btrpc.BacktesterService.ClearAllTasks:output_type -> btrpc.ClearAllTasksResponse + 52, // [52:61] is the sub-list for method output_type + 43, // [43:52] is the sub-list for method input_type + 43, // [43:43] is the sub-list for extension type_name + 43, // [43:43] is the sub-list for extension extendee + 0, // [0:43] is the sub-list for field type_name } func init() { file_btrpc_proto_init() } @@ -3358,512 +3246,6 @@ func file_btrpc_proto_init() { if File_btrpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_btrpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StrategySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExchangeLevelFunding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FundingSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PurchaseSide); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SpotDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FuturesDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrencySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApiData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DbData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CsvData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DatabaseConnectionDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DatabaseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DatabaseData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CSVData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiveData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Credentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExchangeCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Leverage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PortfolioSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatisticSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecuteStrategyFromFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecuteStrategyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecuteStrategyFromConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopTaskResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartTaskResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartAllTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartAllTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopAllTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopAllTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearTaskResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearAllTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_btrpc_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearAllTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/backtester/btrpc/btrpc.proto b/backtester/btrpc/btrpc.proto index 94fc3e9be91..eb820259cae 100644 --- a/backtester/btrpc/btrpc.proto +++ b/backtester/btrpc/btrpc.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package btrpc; import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/thrasher-corp/gocryptotrader/backtester/btrpc"; @@ -151,7 +152,7 @@ message ExchangeCredentials { } message DataSettings { - uint64 interval = 1; + google.protobuf.Duration interval = 1; string datatype = 2; ApiData api_data = 3; DatabaseData database_data = 4; @@ -205,7 +206,7 @@ message ExecuteStrategyFromFileRequest { bool do_not_store = 3; google.protobuf.Timestamp start_time_override = 4; google.protobuf.Timestamp end_time_override = 5; - uint64 interval_override = 6; + google.protobuf.Duration interval_override = 6; } message ExecuteStrategyResponse { diff --git a/backtester/btrpc/btrpc.swagger.json b/backtester/btrpc/btrpc.swagger.json index 1c593d050c1..04e3e6b13ed 100644 --- a/backtester/btrpc/btrpc.swagger.json +++ b/backtester/btrpc/btrpc.swagger.json @@ -138,8 +138,7 @@ "name": "config.dataSettings.interval", "in": "query", "required": false, - "type": "string", - "format": "uint64" + "type": "string" }, { "name": "config.dataSettings.datatype", @@ -426,8 +425,7 @@ "name": "intervalOverride", "in": "query", "required": false, - "type": "string", - "format": "uint64" + "type": "string" } ], "tags": [ @@ -723,8 +721,7 @@ "type": "object", "properties": { "interval": { - "type": "string", - "format": "uint64" + "type": "string" }, "datatype": { "type": "string" diff --git a/backtester/btrpc/btrpc_grpc.pb.go b/backtester/btrpc/btrpc_grpc.pb.go index 7323090a509..f5327200bd5 100644 --- a/backtester/btrpc/btrpc_grpc.pb.go +++ b/backtester/btrpc/btrpc_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.4.0 // - protoc (unknown) // source: btrpc.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( BacktesterService_ExecuteStrategyFromFile_FullMethodName = "/btrpc.BacktesterService/ExecuteStrategyFromFile" @@ -54,8 +54,9 @@ func NewBacktesterServiceClient(cc grpc.ClientConnInterface) BacktesterServiceCl } func (c *backtesterServiceClient) ExecuteStrategyFromFile(ctx context.Context, in *ExecuteStrategyFromFileRequest, opts ...grpc.CallOption) (*ExecuteStrategyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ExecuteStrategyResponse) - err := c.cc.Invoke(ctx, BacktesterService_ExecuteStrategyFromFile_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BacktesterService_ExecuteStrategyFromFile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -63,8 +64,9 @@ func (c *backtesterServiceClient) ExecuteStrategyFromFile(ctx context.Context, i } func (c *backtesterServiceClient) ExecuteStrategyFromConfig(ctx context.Context, in *ExecuteStrategyFromConfigRequest, opts ...grpc.CallOption) (*ExecuteStrategyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ExecuteStrategyResponse) - err := c.cc.Invoke(ctx, BacktesterService_ExecuteStrategyFromConfig_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BacktesterService_ExecuteStrategyFromConfig_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -72,8 +74,9 @@ func (c *backtesterServiceClient) ExecuteStrategyFromConfig(ctx context.Context, } func (c *backtesterServiceClient) ListAllTasks(ctx context.Context, in *ListAllTasksRequest, opts ...grpc.CallOption) (*ListAllTasksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListAllTasksResponse) - err := c.cc.Invoke(ctx, BacktesterService_ListAllTasks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BacktesterService_ListAllTasks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -81,8 +84,9 @@ func (c *backtesterServiceClient) ListAllTasks(ctx context.Context, in *ListAllT } func (c *backtesterServiceClient) StartTask(ctx context.Context, in *StartTaskRequest, opts ...grpc.CallOption) (*StartTaskResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StartTaskResponse) - err := c.cc.Invoke(ctx, BacktesterService_StartTask_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BacktesterService_StartTask_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -90,8 +94,9 @@ func (c *backtesterServiceClient) StartTask(ctx context.Context, in *StartTaskRe } func (c *backtesterServiceClient) StartAllTasks(ctx context.Context, in *StartAllTasksRequest, opts ...grpc.CallOption) (*StartAllTasksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StartAllTasksResponse) - err := c.cc.Invoke(ctx, BacktesterService_StartAllTasks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BacktesterService_StartAllTasks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -99,8 +104,9 @@ func (c *backtesterServiceClient) StartAllTasks(ctx context.Context, in *StartAl } func (c *backtesterServiceClient) StopTask(ctx context.Context, in *StopTaskRequest, opts ...grpc.CallOption) (*StopTaskResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StopTaskResponse) - err := c.cc.Invoke(ctx, BacktesterService_StopTask_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BacktesterService_StopTask_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -108,8 +114,9 @@ func (c *backtesterServiceClient) StopTask(ctx context.Context, in *StopTaskRequ } func (c *backtesterServiceClient) StopAllTasks(ctx context.Context, in *StopAllTasksRequest, opts ...grpc.CallOption) (*StopAllTasksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StopAllTasksResponse) - err := c.cc.Invoke(ctx, BacktesterService_StopAllTasks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BacktesterService_StopAllTasks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -117,8 +124,9 @@ func (c *backtesterServiceClient) StopAllTasks(ctx context.Context, in *StopAllT } func (c *backtesterServiceClient) ClearTask(ctx context.Context, in *ClearTaskRequest, opts ...grpc.CallOption) (*ClearTaskResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ClearTaskResponse) - err := c.cc.Invoke(ctx, BacktesterService_ClearTask_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BacktesterService_ClearTask_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -126,8 +134,9 @@ func (c *backtesterServiceClient) ClearTask(ctx context.Context, in *ClearTaskRe } func (c *backtesterServiceClient) ClearAllTasks(ctx context.Context, in *ClearAllTasksRequest, opts ...grpc.CallOption) (*ClearAllTasksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ClearAllTasksResponse) - err := c.cc.Invoke(ctx, BacktesterService_ClearAllTasks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, BacktesterService_ClearAllTasks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } diff --git a/backtester/btrpc/buf.lock b/backtester/btrpc/buf.lock index ce22a7bcc9c..ba2d7f13826 100644 --- a/backtester/btrpc/buf.lock +++ b/backtester/btrpc/buf.lock @@ -4,8 +4,15 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: 62f35d8aed1149c291d606d958a7ce32 + commit: 546238c53f7340c6a2a6099fb863bc1b + digest: shake256:8d75c12f391e392b24c076d05117b47aeddb090add99c70247a8f4389b906a65f61a933c68e54ed8b73a050b967b6b712ba194348b67c3ab3ee26cc2cb25852c - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway - commit: bc28b723cd774c32b6fbc77621518765 + commit: 4c5ba75caaf84e928b7137ae5c18c26a + digest: shake256:e174ad9408f3e608f6157907153ffec8d310783ee354f821f57178ffbeeb8faa6bb70b41b61099c1783c82fe16210ebd1279bc9c9ee6da5cffba9f0e675b8b99 + - remote: buf.build + owner: protocolbuffers + repository: wellknowntypes + commit: d4f14e5e0a9c40889c90d373c74e95eb + digest: shake256:c9824714afd6cc432c2e1fafa20df47c87a8a0aca9e27192cd5732619453997af1721c2eac5c0fbbe7b29a741af5b8d7ba4ee89c85903e782d9c725d7b9436b5 diff --git a/backtester/btrpc/buf.yaml b/backtester/btrpc/buf.yaml index cf96fb1bbee..8f5d43a2345 100644 --- a/backtester/btrpc/buf.yaml +++ b/backtester/btrpc/buf.yaml @@ -14,4 +14,5 @@ breaking: - FILE deps: - buf.build/googleapis/googleapis + - buf.build/protocolbuffers/wellknowntypes - buf.build/grpc-ecosystem/grpc-gateway diff --git a/backtester/config/strategyconfigbuilder/main.go b/backtester/config/strategyconfigbuilder/main.go index a7ff152c7cd..6c048a7e903 100644 --- a/backtester/config/strategyconfigbuilder/main.go +++ b/backtester/config/strategyconfigbuilder/main.go @@ -429,12 +429,12 @@ func parseDatabase(reader *bufio.Reader, cfg *config.Config) error { input = quickParse(reader) var port uint64 if input != "" { - port, err = strconv.ParseUint(input, 10, 16) + port, err = strconv.ParseUint(input, 10, 32) if err != nil { return err } } - cfg.DataSettings.DatabaseData.Config.Port = uint16(port) + cfg.DataSettings.DatabaseData.Config.Port = uint32(port) //nolint:gosec // No overflow risk err = database.DB.SetConfig(&cfg.DataSettings.DatabaseData.Config) if err != nil { return fmt.Errorf("database failed to set config: %w", err) diff --git a/backtester/data/kline/kline.go b/backtester/data/kline/kline.go index 194fb9df284..40bfe955bff 100644 --- a/backtester/data/kline/kline.go +++ b/backtester/data/kline/kline.go @@ -130,7 +130,7 @@ candleLoop: d.Item.RemoveDuplicates() d.Item.SortCandlesByTimestamp(false) if d.RangeHolder != nil { - d.RangeHolder, err = gctkline.CalculateCandleDateRanges(d.Item.Candles[0].Time, d.Item.Candles[len(d.Item.Candles)-1].Time.Add(d.Item.Interval.Duration()), d.Item.Interval, uint32(d.RangeHolder.Limit)) + d.RangeHolder, err = gctkline.CalculateCandleDateRanges(d.Item.Candles[0].Time, d.Item.Candles[len(d.Item.Candles)-1].Time.Add(d.Item.Interval.Duration()), d.Item.Interval, d.RangeHolder.Limit) if err != nil { return err } diff --git a/backtester/engine/grpcserver.go b/backtester/engine/grpcserver.go index 17a50794737..a0a757a0be2 100644 --- a/backtester/engine/grpcserver.go +++ b/backtester/engine/grpcserver.go @@ -211,11 +211,11 @@ func (s *GRPCServer) ExecuteStrategyFromFile(_ context.Context, request *btrpc.E return nil, err } - if io64 := int64(request.IntervalOverride); io64 > 0 { - if io64 < gctkline.FifteenSecond.Duration().Nanoseconds() { - return nil, fmt.Errorf("%w, interval must be >= 15 seconds, received '%v'", gctkline.ErrInvalidInterval, time.Duration(request.IntervalOverride)) + if io := request.IntervalOverride.AsDuration(); io > 0 { + if io < gctkline.FifteenSecond.Duration() { + return nil, fmt.Errorf("%w, interval must be >= 15 seconds, received '%v'", gctkline.ErrInvalidInterval, io) } - cfg.DataSettings.Interval = gctkline.Interval(request.IntervalOverride) + cfg.DataSettings.Interval = gctkline.Interval(io) } if startTime := request.StartTimeOverride.AsTime(); startTime.Unix() != 0 && !startTime.IsZero() { @@ -528,7 +528,7 @@ func (s *GRPCServer) ExecuteStrategyFromConfig(_ context.Context, request *btrpc Driver: request.Config.DataSettings.DatabaseData.Config.Driver, ConnectionDetails: drivers.ConnectionDetails{ Host: request.Config.DataSettings.DatabaseData.Config.Config.Host, - Port: uint16(request.Config.DataSettings.DatabaseData.Config.Config.Port), + Port: request.Config.DataSettings.DatabaseData.Config.Config.Port, Username: request.Config.DataSettings.DatabaseData.Config.Config.UserName, Password: request.Config.DataSettings.DatabaseData.Config.Config.Password, Database: request.Config.DataSettings.DatabaseData.Config.Config.Database, @@ -591,7 +591,7 @@ func (s *GRPCServer) ExecuteStrategyFromConfig(_ context.Context, request *btrpc }, CurrencySettings: configSettings, DataSettings: config.DataSettings{ - Interval: gctkline.Interval(request.Config.DataSettings.Interval), + Interval: gctkline.Interval(request.Config.DataSettings.Interval.AsDuration()), DataType: request.Config.DataSettings.Datatype, APIData: apiData, DatabaseData: dbData, diff --git a/backtester/engine/grpcserver_test.go b/backtester/engine/grpcserver_test.go index 28feea9eea9..f476b9188de 100644 --- a/backtester/engine/grpcserver_test.go +++ b/backtester/engine/grpcserver_test.go @@ -17,6 +17,7 @@ import ( "github.com/thrasher-corp/gocryptotrader/backtester/eventhandlers/strategies/binancecashandcarry" gctcommon "github.com/thrasher-corp/gocryptotrader/common" gctkline "github.com/thrasher-corp/gocryptotrader/exchanges/kline" + "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -80,7 +81,7 @@ func TestExecuteStrategyFromFile(t *testing.T) { StrategyFilePath: dcaConfigPath, StartTimeOverride: timestamppb.New(time.Now().Add(-time.Minute)), EndTimeOverride: timestamppb.New(time.Now()), - IntervalOverride: 1, + IntervalOverride: durationpb.New(time.Duration(1)), }) if !errors.Is(err, gctkline.ErrInvalidInterval) { t.Errorf("received '%v' expecting '%v'", err, gctkline.ErrInvalidInterval) @@ -90,7 +91,7 @@ func TestExecuteStrategyFromFile(t *testing.T) { StrategyFilePath: dcaConfigPath, StartTimeOverride: timestamppb.New(time.Now().Add(-time.Hour * 6).Truncate(time.Hour)), EndTimeOverride: timestamppb.New(time.Now().Add(-time.Hour * 2).Truncate(time.Hour)), - IntervalOverride: uint64(time.Hour.Nanoseconds()), + IntervalOverride: durationpb.New(time.Hour), }) if !errors.Is(err, nil) { t.Errorf("received '%v' expecting '%v'", err, nil) @@ -218,7 +219,7 @@ func TestExecuteStrategyFromConfig(t *testing.T) { } dataSettings := &btrpc.DataSettings{ - Interval: uint64(defaultConfig.DataSettings.Interval.Duration().Nanoseconds()), + Interval: durationpb.New(defaultConfig.DataSettings.Interval.Duration()), Datatype: defaultConfig.DataSettings.DataType, } if defaultConfig.DataSettings.APIData != nil { @@ -256,7 +257,7 @@ func TestExecuteStrategyFromConfig(t *testing.T) { if defaultConfig.DataSettings.DatabaseData != nil { dbConnectionDetails := &btrpc.DatabaseConnectionDetails{ Host: defaultConfig.DataSettings.DatabaseData.Config.Host, - Port: uint32(defaultConfig.DataSettings.DatabaseData.Config.Port), + Port: defaultConfig.DataSettings.DatabaseData.Config.Port, Password: defaultConfig.DataSettings.DatabaseData.Config.Password, Database: defaultConfig.DataSettings.DatabaseData.Config.Database, SslMode: defaultConfig.DataSettings.DatabaseData.Config.SSLMode, diff --git a/backtester/engine/setup.go b/backtester/engine/setup.go index acbd3e06c17..57ce719adb0 100644 --- a/backtester/engine/setup.go +++ b/backtester/engine/setup.go @@ -820,19 +820,12 @@ func (bt *BackTest) loadData(cfg *config.Config, exch gctexchange.IBotExchange, cfg.DataSettings.APIData.EndDate = cfg.DataSettings.APIData.EndDate.Add(cfg.DataSettings.Interval.Duration()) } - var limit int64 - limit, err = b.Features.Enabled.Kline.GetIntervalResultLimit(cfg.DataSettings.Interval) + limit, err := b.Features.Enabled.Kline.GetIntervalResultLimit(cfg.DataSettings.Interval) if err != nil { return nil, err } - resp, err = loadAPIData( - cfg, - exch, - fPair, - a, - uint32(limit), - dataType) + resp, err = loadAPIData(cfg, exch, fPair, a, limit, dataType) if err != nil { return resp, err } @@ -894,7 +887,7 @@ func loadDatabaseData(cfg *config.Config, name string, fPair currency.Pair, a as isUSDTrackingPair) } -func loadAPIData(cfg *config.Config, exch gctexchange.IBotExchange, fPair currency.Pair, a asset.Item, resultLimit uint32, dataType int64) (*kline.DataFromKline, error) { +func loadAPIData(cfg *config.Config, exch gctexchange.IBotExchange, fPair currency.Pair, a asset.Item, resultLimit uint64, dataType int64) (*kline.DataFromKline, error) { if cfg.DataSettings.Interval <= 0 { return nil, errIntervalUnset } diff --git a/backtester/eventhandlers/strategies/strategies.go b/backtester/eventhandlers/strategies/strategies.go index dfdc5295a9d..9cfe5558480 100644 --- a/backtester/eventhandlers/strategies/strategies.go +++ b/backtester/eventhandlers/strategies/strategies.go @@ -31,39 +31,29 @@ func LoadStrategyByName(name string, useSimultaneousProcessing bool) (Handler, e func createNewStrategy(name string, useSimultaneousProcessing bool, h Handler) (Handler, error) { if h == nil { - return nil, fmt.Errorf("cannot load %v supported strategies contains %w", name, common.ErrNilPointer) + return nil, fmt.Errorf("cannot load strategy %q: %w", name, common.ErrNilPointer) } + if !strings.EqualFold(name, h.Name()) { return nil, nil } - // create new instance so strategy is not shared across all tasks + strategyValue := reflect.ValueOf(h) - if strategyValue.IsNil() { - return nil, fmt.Errorf("cannot load %v supported strategies element is a %w", name, common.ErrNilPointer) - } - strategyElement := strategyValue.Elem() - if !strategyElement.IsValid() { - return nil, fmt.Errorf("cannot load %v strategy element is invalid %w", name, common.ErrTypeAssertFailure) - } - strategyType := strategyElement.Type() - if strategyType == nil { - return nil, fmt.Errorf("cannot load %v strategy type is a %w", name, common.ErrNilPointer) - } - newStrategy := reflect.New(strategyType) - if newStrategy.IsNil() { - return nil, fmt.Errorf("cannot load %v new instance of strategy is a %w", name, common.ErrNilPointer) + if strategyValue.Kind() != reflect.Ptr || strategyValue.IsNil() { + return nil, fmt.Errorf("cannot load strategy %q: handler must be a non-nil pointer, got %T", name, h) } - strategyInterface := newStrategy.Interface() - if strategyInterface == nil { - return nil, fmt.Errorf("cannot load %v new instance of strategy is not an interface. %w", name, common.ErrTypeAssertFailure) - } - strategy, ok := strategyInterface.(Handler) + + // create new instance so strategy is not shared across all tasks + strategy, ok := reflect.New(strategyValue.Elem().Type()).Interface().(Handler) if !ok { - return nil, fmt.Errorf("cannot load %v new instance of strategy is not a Handler interface. %w", name, common.ErrTypeAssertFailure) + return nil, fmt.Errorf("cannot load strategy %q: type %T doesn't implement Handler interface: %w", + name, strategy, common.ErrTypeAssertFailure) } + if useSimultaneousProcessing && !strategy.SupportsSimultaneousProcessing() { return nil, base.ErrSimultaneousProcessingNotSupported } + strategy.SetSimultaneousProcessing(useSimultaneousProcessing) return strategy, nil } diff --git a/backtester/eventhandlers/strategies/strategies_test.go b/backtester/eventhandlers/strategies/strategies_test.go index 9dd2b61fff9..976ba61fadd 100644 --- a/backtester/eventhandlers/strategies/strategies_test.go +++ b/backtester/eventhandlers/strategies/strategies_test.go @@ -4,6 +4,7 @@ import ( "errors" "testing" + "github.com/stretchr/testify/assert" "github.com/thrasher-corp/gocryptotrader/backtester/data" "github.com/thrasher-corp/gocryptotrader/backtester/eventhandlers/portfolio" "github.com/thrasher-corp/gocryptotrader/backtester/eventhandlers/strategies/base" @@ -82,35 +83,33 @@ func TestCreateNewStrategy(t *testing.T) { t.Parallel() // invalid Handler - resp, err := createNewStrategy(dollarcostaverage.Name, false, nil) - if !errors.Is(err, common.ErrNilPointer) { - t.Errorf("received '%v' expected '%v'", err, common.ErrNilPointer) - } - if resp != nil { - t.Errorf("received '%v' expected '%v'", resp, nil) - } + _, err := createNewStrategy(dollarcostaverage.Name, false, nil) + assert.ErrorIs(t, err, common.ErrNilPointer) // mismatched name - resp, err = createNewStrategy(dollarcostaverage.Name, false, &customStrategy{}) - if !errors.Is(err, nil) { - t.Errorf("received '%v' expected '%v'", err, nil) - } - if resp != nil { - t.Errorf("received '%v' expected '%v'", resp, nil) - } + resp, err := createNewStrategy(dollarcostaverage.Name, false, &customStrategy{}) + assert.NoError(t, err, "createNewStrategy should not error") + assert.Nil(t, resp) + + // nil Handler + var h Handler = (*customStrategy)(nil) + _, err = createNewStrategy("custom-strategy", false, h) + assert.ErrorContains(t, err, "must be a non-nil pointer") // valid - h := new(dollarcostaverage.Strategy) - resp, err = createNewStrategy(dollarcostaverage.Name, false, h) - if !errors.Is(err, nil) { - t.Errorf("received '%v' expected '%v'", err, nil) - } - if resp == nil { - t.Errorf("received '%v' expected '%v'", resp, h) - } + h = new(dollarcostaverage.Strategy) + resp, err = createNewStrategy(dollarcostaverage.Name, true, h) + assert.NoError(t, err, "createNewStrategy should not error") + assert.NotSame(t, h, resp, "createNewStrategy should return a new pointer") + + // simultaneous processing desired but not supported + h = &customStrategy{allowSimultaneousProcessing: false} + _, err = createNewStrategy("custom-strategy", true, h) + assert.ErrorIs(t, err, base.ErrSimultaneousProcessingNotSupported) } type customStrategy struct { + allowSimultaneousProcessing bool base.Strategy } @@ -121,7 +120,7 @@ func (s *customStrategy) Description() string { return "this is a demonstration of loading strategies via custom plugins" } func (s *customStrategy) SupportsSimultaneousProcessing() bool { - return true + return s.allowSimultaneousProcessing } func (s *customStrategy) OnSignal(d data.Handler, _ funding.IFundingTransferer, _ portfolio.Handler) (signal.Event, error) { return s.createSignal(d) diff --git a/cmd/config/config.go b/cmd/config/config.go index 0952955e351..dc22ca71656 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -4,6 +4,7 @@ import ( "context" "flag" "fmt" + "math" "os" "slices" "strings" @@ -23,7 +24,7 @@ func main() { var in, out, keyStr string var inplace bool - var version int + var version uint fs := flag.NewFlagSet("config", flag.ExitOnError) fs.Usage = func() { usage(fs) } @@ -31,7 +32,7 @@ func main() { fs.StringVar(&out, "out", "[in].out", "The config output file") fs.BoolVar(&inplace, "edit", false, "Edit; Save result to the original file") fs.StringVar(&keyStr, "key", "", "The key to use for AES encryption") - fs.IntVar(&version, "version", 0, "The version to downgrade to") + fs.UintVar(&version, "version", 0, "The version to downgrade to") cmd, args := parseCommand(os.Args[1:]) if cmd == "" { @@ -85,13 +86,13 @@ func main() { usage(fs) os.Exit(3) } - version = versions.LatestVersion - } else if version < 0 { - fmt.Fprintln(os.Stderr, "Error: version must be positive") + version = versions.UseLatestVersion + } else if version >= math.MaxUint16 { + fmt.Fprintln(os.Stderr, "Error: version must be less than 65535") usage(fs) os.Exit(3) } - if data, err = versions.Manager.Deploy(context.Background(), data, version); err != nil { + if data, err = versions.Manager.Deploy(context.Background(), data, uint16(version)); err != nil { fatal("Unable to " + cmd + " config; Error: " + err.Error()) } if !isEncrypted { diff --git a/cmd/exchange_wrapper_issues/main.go b/cmd/exchange_wrapper_issues/main.go index 6fb7983ba2a..75eb39c73ea 100644 --- a/cmd/exchange_wrapper_issues/main.go +++ b/cmd/exchange_wrapper_issues/main.go @@ -275,8 +275,6 @@ func parseOrderType(orderType string) order.Type { return order.Limit case order.Market.String(): return order.Market - case order.ImmediateOrCancel.String(): - return order.ImmediateOrCancel case order.Stop.String(): return order.Stop case order.TrailingStop.String(): diff --git a/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go b/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go index 0f7e007e985..5b52a1929e3 100644 --- a/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go +++ b/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go @@ -444,30 +444,30 @@ func generateMethodArg(ctx context.Context, t *testing.T, argGenerator *MethodAr input = reflect.ValueOf(req) case argGenerator.MethodInputType.AssignableTo(orderSubmitParam): input = reflect.ValueOf(&order.Submit{ - Exchange: exchName, - Type: order.Limit, - Side: order.Buy, - Pair: argGenerator.AssetParams.Pair, - AssetType: argGenerator.AssetParams.Asset, - Price: 150, - Amount: 1, - ClientID: "1337", - ClientOrderID: "13371337", - ImmediateOrCancel: true, - Leverage: 1, + Exchange: exchName, + Type: order.Limit, + Side: order.Buy, + Pair: argGenerator.AssetParams.Pair, + AssetType: argGenerator.AssetParams.Asset, + Price: 150, + Amount: 1, + ClientID: "1337", + ClientOrderID: "13371337", + TimeInForce: order.ImmediateOrCancel, + Leverage: 1, }) case argGenerator.MethodInputType.AssignableTo(orderModifyParam): input = reflect.ValueOf(&order.Modify{ - Exchange: exchName, - Type: order.Limit, - Side: order.Buy, - Pair: argGenerator.AssetParams.Pair, - AssetType: argGenerator.AssetParams.Asset, - Price: 150, - Amount: 1, - ClientOrderID: "13371337", - OrderID: "1337", - ImmediateOrCancel: true, + Exchange: exchName, + Type: order.Limit, + Side: order.Buy, + Pair: argGenerator.AssetParams.Pair, + AssetType: argGenerator.AssetParams.Asset, + Price: 150, + Amount: 1, + ClientOrderID: "13371337", + OrderID: "1337", + TimeInForce: order.ImmediateOrCancel, }) case argGenerator.MethodInputType.AssignableTo(orderCancelParam): input = reflect.ValueOf(&order.Cancel{ diff --git a/cmd/gctcli/commands.go b/cmd/gctcli/commands.go index 7057964d969..694ec65c41b 100644 --- a/cmd/gctcli/commands.go +++ b/cmd/gctcli/commands.go @@ -2958,7 +2958,7 @@ func withdrawlRequestByExchangeID(c *cli.Context) error { &gctrpc.WithdrawalEventsByExchangeRequest{ Exchange: exchange, Id: ID, - Limit: int32(limit), + Limit: int32(limit), //nolint:gosec // TODO: SQL boiler's QueryMode limit only accepts the int type Currency: currency, AssetType: assetType, }, @@ -3034,7 +3034,7 @@ func withdrawlRequestByDate(c *cli.Context) error { Exchange: exchange, Start: s.Format(common.SimpleTimeFormatWithTimezone), End: e.Format(common.SimpleTimeFormatWithTimezone), - Limit: int32(limit), + Limit: int32(limit), //nolint:gosec // TODO: SQL boiler's QueryMode limit only accepts the int type }, ) if err != nil { @@ -3427,7 +3427,7 @@ func getAuditEvent(c *cli.Context) error { &gctrpc.GetAuditEventRequest{ StartDate: s.Format(common.SimpleTimeFormatWithTimezone), EndDate: e.Format(common.SimpleTimeFormatWithTimezone), - Limit: int32(limit), + Limit: int32(limit), //nolint:gosec // TODO: SQL boiler's QueryMode limit only accepts the int type OrderBy: orderingDirection, }) diff --git a/cmd/gctcli/data_history.go b/cmd/gctcli/data_history.go index cbd3f2e6aa6..61d288e5cf0 100644 --- a/cmd/gctcli/data_history.go +++ b/cmd/gctcli/data_history.go @@ -507,15 +507,15 @@ func upsertDataHistoryJob(c *cli.Context) error { StartDate: s.Format(common.SimpleTimeFormatWithTimezone), EndDate: e.Format(common.SimpleTimeFormatWithTimezone), Interval: int64(candleInterval), - RequestSizeLimit: int64(requestSizeLimit), + RequestSizeLimit: requestSizeLimit, DataType: dataType, - MaxRetryAttempts: int64(maxRetryAttempts), - BatchSize: int64(batchSize), + MaxRetryAttempts: maxRetryAttempts, + BatchSize: batchSize, ConversionInterval: int64(conversionInterval), OverwriteExistingData: overwriteExistingData, PrerequisiteJobNickname: prerequisiteJobNickname, InsertOnly: !upsert, - DecimalPlaceComparison: int64(comparisonDecimalPlaces), + DecimalPlaceComparison: comparisonDecimalPlaces, SecondaryExchangeName: secondaryExchange, IssueTolerancePercentage: intolerancePercentage, ReplaceOnIssue: replaceOnIssue, diff --git a/cmd/gen_sqlboiler_config/main.go b/cmd/gen_sqlboiler_config/main.go index 3a1b05c80b5..396206cfd3b 100644 --- a/cmd/gen_sqlboiler_config/main.go +++ b/cmd/gen_sqlboiler_config/main.go @@ -24,7 +24,7 @@ var sqlboilerConfig map[string]driverConfig type driverConfig struct { DBName string `json:"dbname,omitempty"` Host string `json:"host,omitempty"` - Port uint16 `json:"port,omitempty"` + Port uint32 `json:"port,omitempty"` User string `json:"user,omitempty"` Pass string `json:"pass,omitempty"` Schema string `json:"schema,omitempty"` diff --git a/common/cache/lru.go b/common/cache/lru.go index d4a264bd30d..812b7adfb38 100644 --- a/common/cache/lru.go +++ b/common/cache/lru.go @@ -94,7 +94,7 @@ func (l *LRU) Clear() { // Len returns length of l func (l *LRU) Len() uint64 { - return uint64(l.l.Len()) + return uint64(l.l.Len()) //nolint:gosec // False positive as uint64 (2^64-1) can support both 2^31-1 on 32bit systems and 2^63-1 on 64bit systems } // removeOldest removes the oldest item from the cache. diff --git a/common/common.go b/common/common.go index 65c05172fbe..7fb5cf92756 100644 --- a/common/common.go +++ b/common/common.go @@ -72,6 +72,7 @@ var ( ErrUnknownError = errors.New("unknown error") ErrGettingField = errors.New("error getting field") ErrSettingField = errors.New("error setting field") + ErrParsingWSField = errors.New("error parsing websocket field") ) var ( diff --git a/common/common_test.go b/common/common_test.go index 4c722030dc4..dfb226f0368 100644 --- a/common/common_test.go +++ b/common/common_test.go @@ -789,7 +789,7 @@ func TestCounter(t *testing.T) { // 683185328 1.787 ns/op 0 B/op 0 allocs/op func BenchmarkCounter(b *testing.B) { c := Counter{} - for i := 0; i < b.N; i++ { + for b.Loop() { c.IncrementAndGet() } } diff --git a/common/convert/convert.go b/common/convert/convert.go index c0537770181..ba6fb24dbf2 100644 --- a/common/convert/convert.go +++ b/common/convert/convert.go @@ -103,14 +103,13 @@ func FloatToHumanFriendlyString(number float64, decimals uint, decPoint, thousan number = -number neg = true } - dec := int(decimals) - str := fmt.Sprintf("%."+strconv.Itoa(dec)+"F", number) - return numberToHumanFriendlyString(str, dec, decPoint, thousandsSep, neg) + str := fmt.Sprintf("%."+strconv.FormatUint(uint64(decimals), 10)+"F", number) + return numberToHumanFriendlyString(str, decimals, decPoint, thousandsSep, neg) } // DecimalToHumanFriendlyString converts a decimal number to a comma separated string at the thousand point // eg 1000 becomes 1,000 -func DecimalToHumanFriendlyString(number decimal.Decimal, rounding int, decPoint, thousandsSep string) string { +func DecimalToHumanFriendlyString(number decimal.Decimal, rounding uint, decPoint, thousandsSep string) string { neg := false if number.LessThan(decimal.Zero) { number = number.Abs() @@ -119,20 +118,25 @@ func DecimalToHumanFriendlyString(number decimal.Decimal, rounding int, decPoint str := number.String() if rnd := strings.Split(str, "."); len(rnd) == 1 { rounding = 0 - } else if len(rnd[1]) < rounding { - rounding = len(rnd[1]) + } else if uint(len(rnd[1])) < rounding { + rounding = uint(len(rnd[1])) } - return numberToHumanFriendlyString(number.StringFixed(int32(rounding)), rounding, decPoint, thousandsSep, neg) + + if rounding > math.MaxInt32 { + rounding = math.MaxInt32 // Not feasible to test due to the size of the number + } + + return numberToHumanFriendlyString(number.StringFixed(int32(rounding)), rounding, decPoint, thousandsSep, neg) //nolint:gosec // Checked above } -func numberToHumanFriendlyString(str string, dec int, decPoint, thousandsSep string, neg bool) string { +func numberToHumanFriendlyString(str string, dec uint, decPoint, thousandsSep string, neg bool) string { var prefix, suffix string - if len(str)-(dec+1) < 0 { + if dec > 0 && (dec)+1 > uint(len(str)) { dec = 0 } if dec > 0 { - prefix = str[:len(str)-(dec+1)] - suffix = str[len(str)-dec:] + prefix = str[:len(str)-(int(dec)+1)] + suffix = str[len(str)-int(dec):] } else { prefix = str } diff --git a/common/convert/convert_test.go b/common/convert/convert_test.go index 2b7004cc361..934025e03b0 100644 --- a/common/convert/convert_test.go +++ b/common/convert/convert_test.go @@ -1,7 +1,6 @@ package convert import ( - "strings" "testing" "time" @@ -156,131 +155,44 @@ func TestBoolPtr(t *testing.T) { func TestFloatToHumanFriendlyString(t *testing.T) { t.Parallel() - test := FloatToHumanFriendlyString(0, 3, ".", ",") - if strings.Contains(test, ",") { - t.Error("unexpected ','") - } - test = FloatToHumanFriendlyString(100, 3, ".", ",") - if strings.Contains(test, ",") { - t.Error("unexpected ','") - } - test = FloatToHumanFriendlyString(1000, 3, ".", ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - - test = FloatToHumanFriendlyString(-1000, 3, ".", ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - test = FloatToHumanFriendlyString(-1000, 10, ".", ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - - test = FloatToHumanFriendlyString(1000.1337, 1, ".", ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - dec := strings.Split(test, ".") - if len(dec) == 1 { - t.Error("expected decimal place") - } - if dec[1] != "1" { - t.Error("expected decimal place") - } + assert.Equal(t, "0.000", FloatToHumanFriendlyString(0, 3, ".", ",")) + assert.Equal(t, "100.000", FloatToHumanFriendlyString(100, 3, ".", ",")) + assert.Equal(t, "1,000.000", FloatToHumanFriendlyString(1000, 3, ".", ",")) + assert.Equal(t, "-1,000.000", FloatToHumanFriendlyString(-1000, 3, ".", ",")) + assert.Equal(t, "-1,000.0000000000", FloatToHumanFriendlyString(-1000, 10, ".", ",")) + assert.Equal(t, "1!000.1", FloatToHumanFriendlyString(1000.1337, 1, ".", "!")) } func TestDecimalToHumanFriendlyString(t *testing.T) { t.Parallel() - test := DecimalToHumanFriendlyString(decimal.Zero, 0, ".", ",") - if strings.Contains(test, ",") { - t.Log(test) - t.Error("unexpected ','") - } - test = DecimalToHumanFriendlyString(decimal.NewFromInt(100), 0, ".", ",") - if strings.Contains(test, ",") { - t.Log(test) - t.Error("unexpected ','") - } - test = DecimalToHumanFriendlyString(decimal.NewFromInt(1000), 0, ".", ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - - test = DecimalToHumanFriendlyString(decimal.NewFromFloat(1000.1337), 1, ".", ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - dec := strings.Split(test, ".") - if len(dec) == 1 { - t.Error("expected decimal place") - } - if dec[1] != "1" { - t.Error("expected decimal place") - } - test = DecimalToHumanFriendlyString(decimal.NewFromFloat(-1000.1337), 1, ".", ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - - test = DecimalToHumanFriendlyString(decimal.NewFromFloat(-1000.1337), 100000, ".", ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - - test = DecimalToHumanFriendlyString(decimal.NewFromFloat(1000.1), 10, ".", ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - dec = strings.Split(test, ".") - if len(dec) == 1 { - t.Error("expected decimal place") - } - if dec[1] != "1" { - t.Error("expected decimal place") - } + assert.Equal(t, "0", DecimalToHumanFriendlyString(decimal.Zero, 0, ".", ",")) + assert.Equal(t, "100", DecimalToHumanFriendlyString(decimal.NewFromInt(100), 0, ".", ",")) + assert.Equal(t, "1,000", DecimalToHumanFriendlyString(decimal.NewFromInt(1000), 0, ".", ",")) + assert.Equal(t, "-1,000", DecimalToHumanFriendlyString(decimal.NewFromInt(-1000), 0, ".", ",")) + assert.Equal(t, "-1~000!42", DecimalToHumanFriendlyString(decimal.NewFromFloat(-1000.42069), 2, "!", "~")) + assert.Equal(t, "1,000.42069", DecimalToHumanFriendlyString(decimal.NewFromFloat(1000.42069), 5, ".", ",")) + assert.Equal(t, "1,000.42069", DecimalToHumanFriendlyString(decimal.NewFromFloat(1000.42069), 100, ".", ",")) } func TestIntToHumanFriendlyString(t *testing.T) { t.Parallel() - test := IntToHumanFriendlyString(0, ",") - if strings.Contains(test, ",") { - t.Log(test) - t.Error("unexpected ','") - } - test = IntToHumanFriendlyString(100, ",") - if strings.Contains(test, ",") { - t.Log(test) - t.Error("unexpected ','") - } - test = IntToHumanFriendlyString(1000, ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - - test = IntToHumanFriendlyString(-1000, ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - test = IntToHumanFriendlyString(1000000, ",") - if !strings.Contains(test, ",") { - t.Error("expected ','") - } - dec := strings.Split(test, ",") - if len(dec) <= 2 { - t.Error("expected two commas place") - } + assert.Equal(t, "0", IntToHumanFriendlyString(0, ",")) + assert.Equal(t, "100", IntToHumanFriendlyString(100, ",")) + assert.Equal(t, "1,000", IntToHumanFriendlyString(1000, ",")) + assert.Equal(t, "-1,000", IntToHumanFriendlyString(-1000, ",")) + assert.Equal(t, "-1!000", IntToHumanFriendlyString(-1000, "!")) } func TestNumberToHumanFriendlyString(t *testing.T) { - resp := numberToHumanFriendlyString("1", 1337, ".", ",", false) - if strings.Contains(resp, ".") { - t.Error("expected no comma") - } + t.Parallel() + + assert.Equal(t, "0", numberToHumanFriendlyString("0", 0, "", ",", false)) + assert.Equal(t, "1,337.69", numberToHumanFriendlyString("1337.69", 2, ".", ",", false)) + assert.Equal(t, "-1!000.1", numberToHumanFriendlyString("1000.1", 1, ".", "!", true)) + assert.Equal(t, "1,000", numberToHumanFriendlyString("1000", 20, ".", ",", false)) } func TestInterfaceToFloat64OrZeroValue(t *testing.T) { diff --git a/common/math/math_test.go b/common/math/math_test.go index 4888ebad701..7efd26643c6 100644 --- a/common/math/math_test.go +++ b/common/math/math_test.go @@ -53,7 +53,7 @@ func TestPercentageDifference(t *testing.T) { // 1000000000 0.2215 ns/op 0 B/op 0 allocs/op func BenchmarkPercentageDifference(b *testing.B) { - for i := 0; i < b.N; i++ { + for b.Loop() { PercentageDifference(1.469, 1.471) } } @@ -71,7 +71,7 @@ func TestPercentageDifferenceDecimal(t *testing.T) { // 1585596 751.8 ns/op 792 B/op 27 allocs/op func BenchmarkDecimalPercentageDifference(b *testing.B) { d1, d2 := decimal.NewFromFloat(1.469), decimal.NewFromFloat(1.471) - for i := 0; i < b.N; i++ { + for b.Loop() { PercentageDifferenceDecimal(d1, d2) } } diff --git a/common/timedmutex/timed_mutex_test.go b/common/timedmutex/timed_mutex_test.go index 0e1cf30f6e3..fe27fa44c58 100644 --- a/common/timedmutex/timed_mutex_test.go +++ b/common/timedmutex/timed_mutex_test.go @@ -9,7 +9,7 @@ import ( // 2423571 503.9 ns/op 0 B/op 0 allocs/op (current) func BenchmarkTimedMutexTime(b *testing.B) { tm := NewTimedMutex(0) - for i := 0; i < b.N; i++ { + for b.Loop() { tm.LockForDuration() } } @@ -18,7 +18,7 @@ func BenchmarkTimedMutexTime(b *testing.B) { // 927051118 1.298 ns/op 0 B/op 0 allocs/op func BenchmarkTimedMutexTimeUnlockNotPrimed(b *testing.B) { tm := NewTimedMutex(0) - for i := 0; i < b.N; i++ { + for b.Loop() { tm.UnlockIfLocked() } } @@ -28,7 +28,7 @@ func BenchmarkTimedMutexTimeUnlockNotPrimed(b *testing.B) { func BenchmarkTimedMutexTimeUnlockPrimed(b *testing.B) { tm := NewTimedMutex(0) tm.LockForDuration() - for i := 0; i < b.N; i++ { + for b.Loop() { tm.UnlockIfLocked() } } @@ -37,7 +37,7 @@ func BenchmarkTimedMutexTimeUnlockPrimed(b *testing.B) { // 38592405 36.12 ns/op 0 B/op 0 allocs/op func BenchmarkTimedMutexTimeLinearInteraction(b *testing.B) { tm := NewTimedMutex(0) - for i := 0; i < b.N; i++ { + for b.Loop() { tm.LockForDuration() tm.UnlockIfLocked() } diff --git a/config/config.go b/config/config.go index 89c3a1f952f..615da01784a 100644 --- a/config/config.go +++ b/config/config.go @@ -1504,7 +1504,7 @@ func (c *Config) readConfig(d io.Reader) error { } } - if j, err = versions.Manager.Deploy(context.Background(), j, versions.LatestVersion); err != nil { + if j, err = versions.Manager.Deploy(context.Background(), j, versions.UseLatestVersion); err != nil { return err } diff --git a/config/config_encryption.go b/config/config_encryption.go index 41ef946b7dd..d58f2ef8734 100644 --- a/config/config_encryption.go +++ b/config/config_encryption.go @@ -4,7 +4,7 @@ import ( "bytes" "crypto/aes" "crypto/cipher" - "crypto/rand" + "encoding/binary" "errors" "fmt" "io" @@ -18,7 +18,9 @@ import ( ) const ( - saltRandomLength = 12 + saltRandomLength = 12 + encryptionVersion = 1 + versionSize = 2 // 2 bytes as uint16, allows for 65535 versions (at our current rate of 1 version per decade, should last a few generations) ) // Public errors @@ -27,14 +29,16 @@ var ( ) var ( - errAESBlockSize = errors.New("config file data is too small for the AES required block size") - errNoPrefix = errors.New("data does not start with Encryption Prefix") - errKeyIsEmpty = errors.New("key is empty") - errUserInput = errors.New("error getting user input") + errAESBlockSize = errors.New("config file data is too small for the AES required block size") + errNoPrefix = errors.New("data does not start with Encryption Prefix") + errKeyIsEmpty = errors.New("key is empty") + errUserInput = errors.New("error getting user input") + errUnsupportedEncryptionVersion = errors.New("unsupported encryption version") // encryptionPrefix is a prefix to tell us the file is encrypted - encryptionPrefix = []byte("THORS-HAMMER") - saltPrefix = []byte("~GCT~SO~SALTY~") + encryptionPrefix = []byte("THORS-HAMMER") + saltPrefix = []byte("~GCT~SO~SALTY~") + encryptionVersionPrefix = []byte("ENCVER") ) // promptForConfigEncryption asks for encryption confirmation @@ -120,18 +124,24 @@ func (c *Config) encryptConfigData(configData []byte) ([]byte, error) { if err != nil { return nil, err } - - ciphertext := make([]byte, aes.BlockSize+len(configData)) - iv := ciphertext[:aes.BlockSize] - if _, err := io.ReadFull(rand.Reader, iv); err != nil { + aead, err := cipher.NewGCMWithRandomNonce(block) + if err != nil { return nil, err } - stream := cipher.NewCFBEncrypter(block, iv) - stream.XORKeyStream(ciphertext[aes.BlockSize:], configData) - - appendedFile := append(bytes.Clone(encryptionPrefix), c.storedSalt...) - appendedFile = append(appendedFile, ciphertext...) + ciphertext := aead.Seal(nil, nil, configData, nil) + + appendedFile := make([]byte, len(encryptionPrefix)+len(c.storedSalt)+len(encryptionVersionPrefix)+versionSize+len(ciphertext)) + offset := 0 + copy(appendedFile[offset:], encryptionPrefix) + offset += len(encryptionPrefix) + copy(appendedFile[offset:], c.storedSalt) + offset += len(c.storedSalt) + copy(appendedFile[offset:], encryptionVersionPrefix) + offset += len(encryptionVersionPrefix) + binary.BigEndian.PutUint16(appendedFile[offset:offset+versionSize], encryptionVersion) + offset += versionSize + copy(appendedFile[offset:], ciphertext) return appendedFile, nil } @@ -165,23 +175,63 @@ func (c *Config) decryptConfigData(d, key []byte) ([]byte, error) { d = d[len(salt):] } - blockDecrypt, err := aes.NewCipher(key) + var ciphertext []byte + if !bytes.HasPrefix(d, encryptionVersionPrefix) { + ciphertext, err = decryptAESCFBCiphertext(d, key) + if err != nil { + return nil, err + } + } else { + d = d[len(encryptionVersionPrefix):] + switch ver := binary.BigEndian.Uint16(d[:versionSize]); ver { + case 1: // TODO: Intertwine this with the existing config versioning system + d = d[versionSize:] + ciphertext, err = decryptAESGCMCiphertext(d, key) + if err != nil { + return nil, err + } + default: + return nil, fmt.Errorf("%w: %d", errUnsupportedEncryptionVersion, ver) + } + } + + c.sessionDK, c.storedSalt = sessionDK, storedSalt + return ciphertext, nil +} + +// decryptAESGCMCiphertext decrypts the ciphertext using AES-GCM +func decryptAESGCMCiphertext(data, key []byte) ([]byte, error) { + block, err := aes.NewCipher(key) if err != nil { return nil, err } - if len(d) < aes.BlockSize { - return nil, errAESBlockSize + cipherAEAD, err := cipher.NewGCMWithRandomNonce(block) + if err != nil { + return nil, err } - iv, d := d[:aes.BlockSize], d[aes.BlockSize:] + return cipherAEAD.Open(nil, nil, data, nil) +} - stream := cipher.NewCFBDecrypter(blockDecrypt, iv) - stream.XORKeyStream(d, d) +// decryptAESCFBCiphertext decrypts the ciphertext using AES-CFB (legacy mode) +func decryptAESCFBCiphertext(data, key []byte) ([]byte, error) { + if len(data) < aes.BlockSize { + return nil, errAESBlockSize + } - c.sessionDK, c.storedSalt = sessionDK, storedSalt + iv := data[:aes.BlockSize] + ciphertext := data[aes.BlockSize:] + + block, err := aes.NewCipher(key) + if err != nil { + return nil, err + } - return d, nil + stream := cipher.NewCFBDecrypter(block, iv) //nolint:staticcheck // Deprecated CFB is used for legacy mode + plaintext := make([]byte, len(ciphertext)) + stream.XORKeyStream(plaintext, ciphertext) + return plaintext, nil } // IsEncrypted returns if the data sequence is encrypted diff --git a/config/config_encryption_test.go b/config/config_encryption_test.go index 5bb20c0b054..fb6ec6badef 100644 --- a/config/config_encryption_test.go +++ b/config/config_encryption_test.go @@ -3,9 +3,13 @@ package config import ( "bytes" "crypto/aes" + "crypto/cipher" + "crypto/rand" + "encoding/binary" "io" "os" "path/filepath" + "strings" "testing" "github.com/stretchr/testify/assert" @@ -57,7 +61,7 @@ func TestPromptForConfigKey(t *testing.T) { }) } -func TestEncryptConfigFile(t *testing.T) { +func TestEncryptConfigData(t *testing.T) { t.Parallel() _, err := EncryptConfigData([]byte("test"), nil) require.ErrorIs(t, err, errKeyIsEmpty) @@ -83,7 +87,7 @@ func TestEncryptConfigFile(t *testing.T) { require.NoError(t, err) } -func TestDecryptConfigFile(t *testing.T) { +func TestDecryptConfigData(t *testing.T) { t.Parallel() e, err := EncryptConfigData([]byte(`{"test":1}`), []byte("key")) require.NoError(t, err) @@ -100,6 +104,93 @@ func TestDecryptConfigFile(t *testing.T) { _, err = DecryptConfigData(encryptionPrefix, []byte("AAAAAAAAAAAAAAAA")) require.ErrorIs(t, err, errAESBlockSize) + + sessionDK, salt, err := makeNewSessionDK([]byte("key")) + require.NoError(t, err, "makeNewSessionDK must not error") + + encData, err := legacyEncrypt(t, salt, []byte(`{"test":123}`), sessionDK) + require.NoError(t, err) + + data, err := DecryptConfigData(encData, []byte("key")) + require.NoError(t, err) + assert.Equal(t, `{"test":123}`, string(data)) + + badVersion := make([]byte, len(encryptionPrefix)+len(encryptionVersionPrefix)+versionSize) + copy(badVersion, encryptionPrefix) + copy(badVersion[len(encryptionPrefix):], encryptionVersionPrefix) + binary.BigEndian.PutUint16(badVersion[len(encryptionPrefix)+len(encryptionVersionPrefix):], 69) + _, err = DecryptConfigData(badVersion, []byte("key")) + require.ErrorIs(t, err, errUnsupportedEncryptionVersion) +} + +func legacyEncrypt(t *testing.T, salt, data, key []byte) ([]byte, error) { + t.Helper() + + ciphertext, err := aesCFBEncrypt(t, data, key) + if err != nil { + return nil, err + } + + encData := append(bytes.Clone(encryptionPrefix), salt...) + encData = append(encData, ciphertext...) + return encData, nil +} + +func aesCFBEncrypt(t *testing.T, data, key []byte) ([]byte, error) { + t.Helper() + + block, err := aes.NewCipher(key) + if err != nil { + return nil, err + } + + ciphertext := make([]byte, aes.BlockSize+len(data)) + iv := ciphertext[:aes.BlockSize] + if _, err := io.ReadFull(rand.Reader, iv); err != nil { + return nil, err + } + + stream := cipher.NewCFBEncrypter(block, iv) //nolint:staticcheck // For testing purposes only + stream.XORKeyStream(ciphertext[aes.BlockSize:], data) + return ciphertext, nil +} + +func TestEncryptAESGCMCiphertext(t *testing.T) { + t.Parallel() + + _, err := decryptAESGCMCiphertext(nil, nil) + require.ErrorIs(t, err, aes.KeySizeError(0)) + + validKey := []byte(strings.Repeat("A", 16)) + block, err := aes.NewCipher(validKey) + require.NoError(t, err) + + aead, err := cipher.NewGCMWithRandomNonce(block) + require.NoError(t, err) + + ciphertext := aead.Seal(nil, nil, []byte("MEOWMEOWMEOWMEOWMEOW"), nil) + + data, err := decryptAESGCMCiphertext(ciphertext, validKey) + require.NoError(t, err) + assert.Equal(t, "MEOWMEOWMEOWMEOWMEOW", string(data)) +} + +func TestDecryptAESCFBCiphertext(t *testing.T) { + t.Parallel() + + _, err := decryptAESCFBCiphertext(nil, nil) + require.ErrorIs(t, err, errAESBlockSize) + + _, err = decryptAESCFBCiphertext([]byte("WOOFWOOFWOOFWOOFWOOF"), []byte("A")) + require.ErrorIs(t, err, aes.KeySizeError(1)) + + validKey := []byte(strings.Repeat("A", 16)) + data, err := aesCFBEncrypt(t, []byte("WOOFWOOFWOOFWOOFWOOF"), validKey) + require.NoError(t, err) + + data, err = decryptAESCFBCiphertext(data, validKey) + require.NoError(t, err) + assert.Equal(t, "WOOFWOOFWOOFWOOFWOOF", string(data)) } func TestIsEncrypted(t *testing.T) { diff --git a/config/config_test.go b/config/config_test.go index 36cf95db176..2c30b2133d8 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -1746,7 +1746,7 @@ func BenchmarkUpdateConfig(b *testing.B) { } newCfg := c - for i := 0; i < b.N; i++ { + for b.Loop() { _ = c.UpdateConfig(TestFile, &newCfg, true) } } diff --git a/config/versions/versions.go b/config/versions/versions.go index cdaa66005c5..1be1c97bfdc 100644 --- a/config/versions/versions.go +++ b/config/versions/versions.go @@ -17,6 +17,7 @@ import ( "errors" "fmt" "log" + "math" "os" "slices" "strconv" @@ -26,17 +27,20 @@ import ( "github.com/thrasher-corp/gocryptotrader/common" ) -// LatestVersion used as version param to Deploy to automatically use the latest version -const LatestVersion = -1 +// UseLatestVersion used as version param to Deploy to automatically use the latest version +const UseLatestVersion = math.MaxUint16 var ( - errMissingVersion = errors.New("missing version") - errVersionIncompatible = errors.New("version does not implement ConfigVersion or ExchangeVersion") - errModifyingExchange = errors.New("error modifying exchange config") - errNoVersions = errors.New("error retrieving latest config version: No config versions are registered") - errApplyingVersion = errors.New("error applying version") - errConfigVersion = errors.New("version in config file is higher than the latest available version") - errTargetVersion = errors.New("target downgrade version is higher than the latest available version") + errMissingVersion = errors.New("missing version") + errVersionIncompatible = errors.New("version does not implement ConfigVersion or ExchangeVersion") + errModifyingExchange = errors.New("error modifying exchange config") + errNoVersions = errors.New("error retrieving latest config version: No config versions are registered") + errApplyingVersion = errors.New("error applying version") + errTargetVersion = errors.New("target downgrade version is higher than the latest available version") + errConfigVersion = errors.New("invalid version in config") + errConfigVersionUnavail = errors.New("version is higher than the latest available version") + errConfigVersionNegative = errors.New("version is negative") + errConfigVersionMax = errors.New("version is above max versions") ) // ConfigVersion is a version that affects the general configuration @@ -62,9 +66,9 @@ type manager struct { var Manager = &manager{} // Deploy upgrades or downgrades the config between versions -// Pass LatestVersion for version to use the latest version automatically +// Pass UseLatestVersion for version to use the latest version automatically // Prints an error an exits if the config file version or version param is not registered -func (m *manager) Deploy(ctx context.Context, j []byte, version int) ([]byte, error) { +func (m *manager) Deploy(ctx context.Context, j []byte, version uint16) ([]byte, error) { if err := m.checkVersions(); err != nil { return j, err } @@ -75,7 +79,7 @@ func (m *manager) Deploy(ctx context.Context, j []byte, version int) ([]byte, er } target := latest - if version != LatestVersion { + if version != UseLatestVersion { target = version } @@ -83,20 +87,25 @@ func (m *manager) Deploy(ctx context.Context, j []byte, version int) ([]byte, er defer m.m.RUnlock() current64, err := jsonparser.GetInt(j, "version") - current := int(current64) switch { case errors.Is(err, jsonparser.KeyPathNotFoundError): - current = -1 + // With no version first upgrade is to Version1; current64 is already 0 case err != nil: - return j, fmt.Errorf("%w `version`: %w", common.ErrGettingField, err) + return j, fmt.Errorf("%w: %w `version`: %w", errConfigVersion, common.ErrGettingField, err) + case current64 < 0: + return j, fmt.Errorf("%w: %w `version`: `%d`", errConfigVersion, errConfigVersionNegative, current64) + case current64 >= UseLatestVersion: + return j, fmt.Errorf("%w: %w `version`: `%d`", errConfigVersion, errConfigVersionMax, current64) } + current := uint16(current64) switch { case target == current: return j, nil case latest < current: - warnVersionNotRegistered(current, latest, errConfigVersion) - return j, errConfigVersion + err := fmt.Errorf("%w: %w", errConfigVersion, errConfigVersionUnavail) + warnVersionNotRegistered(current, latest, err) + return j, err case target > latest: warnVersionNotRegistered(target, latest, errTargetVersion) return j, errTargetVersion @@ -136,7 +145,7 @@ func (m *manager) Deploy(ctx context.Context, j []byte, version int) ([]byte, er current = patchVersion - 1 } - if j, err = jsonparser.Set(j, []byte(strconv.Itoa(current)), "version"); err != nil { + if j, err = jsonparser.Set(j, []byte(strconv.FormatUint(uint64(current), 10)), "version"); err != nil { return j, fmt.Errorf("%w `version` during %s %v: %w", common.ErrSettingField, action, patchVersion, err) } } @@ -202,13 +211,13 @@ func (m *manager) registerVersion(ver int, v any) { } // latest returns the highest version number -func (m *manager) latest() (int, error) { +func (m *manager) latest() (uint16, error) { m.m.RLock() defer m.m.RUnlock() if len(m.versions) == 0 { return 0, errNoVersions } - return len(m.versions) - 1, nil + return uint16(len(m.versions)) - 1, nil //nolint:gosec // Ignore this as we hardcode version numbers } // checkVersions ensures that registered versions are consistent @@ -228,7 +237,7 @@ func (m *manager) checkVersions() error { return nil } -func warnVersionNotRegistered(current, latest int, msg error) { +func warnVersionNotRegistered(current, latest uint16, msg error) { fmt.Fprintf(os.Stderr, ` %s ('%d' > '%d') Switch back to the version of GoCryptoTrader containing config version '%d' and run: diff --git a/config/versions/versions_test.go b/config/versions/versions_test.go index a98eae09473..320fc7553cf 100644 --- a/config/versions/versions_test.go +++ b/config/versions/versions_test.go @@ -13,56 +13,59 @@ import ( func TestDeploy(t *testing.T) { t.Parallel() m := manager{} - _, err := m.Deploy(context.Background(), []byte(``), LatestVersion) + _, err := m.Deploy(context.Background(), []byte(``), UseLatestVersion) assert.ErrorIs(t, err, errNoVersions) m.registerVersion(1, &TestVersion1{}) - _, err = m.Deploy(context.Background(), []byte(``), LatestVersion) + _, err = m.Deploy(context.Background(), []byte(``), UseLatestVersion) require.ErrorIs(t, err, errVersionIncompatible) m = manager{} m.registerVersion(0, &Version0{}) - _, err = m.Deploy(context.Background(), []byte(`not an object`), LatestVersion) + m.registerVersion(1, &Version1{}) + _, err = m.Deploy(context.Background(), []byte(`not an object`), UseLatestVersion) require.ErrorIs(t, err, jsonparser.KeyPathNotFoundError, "Must throw the correct error trying to add version to bad json") require.ErrorIs(t, err, common.ErrSettingField, "Must throw the correct error trying to add version to bad json") require.ErrorContains(t, err, "version", "Must throw the correct error trying to add version to bad json") - _, err = m.Deploy(context.Background(), []byte(`{"version":"not an int"}`), LatestVersion) + _, err = m.Deploy(context.Background(), []byte(`{"version":"not an int"}`), UseLatestVersion) require.ErrorIs(t, err, common.ErrGettingField, "Must throw the correct error trying to get version from bad json") - in := []byte(`{"version":0,"exchanges":[{"name":"Juan"}]}`) - j, err := m.Deploy(context.Background(), in, LatestVersion) - require.NoError(t, err) - assert.Equal(t, string(in), string(j)) + _, err = m.Deploy(context.Background(), []byte(`{"version":65535}`), UseLatestVersion) + require.ErrorIs(t, err, errConfigVersionMax, "Must throw the correct error when version is too high") - m.registerVersion(1, &Version1{}) - j, err = m.Deploy(context.Background(), in, LatestVersion) + _, err = m.Deploy(context.Background(), []byte(`{"version":-1}`), UseLatestVersion) + require.ErrorIs(t, err, errConfigVersionNegative, "Must throw the correct error when version is negative") + + in := []byte(`{"version":0,"exchanges":[{"name":"Juan"}]}`) + j, err := m.Deploy(context.Background(), in, UseLatestVersion) require.NoError(t, err) assert.Contains(t, string(j), `"version": 1`) + j2, err := m.Deploy(context.Background(), j, UseLatestVersion) + require.NoError(t, err, "Deploy the same version again must not error") + require.Equal(t, string(j2), string(j), "Deploy the same version again must not change config") + _, err = m.Deploy(context.Background(), j, 2) assert.ErrorIs(t, err, errTargetVersion, "Downgrade to a unregistered version should not be allowed") m.versions = append(m.versions, &TestVersion2{ConfigErr: true, ExchErr: false}) - _, err = m.Deploy(context.Background(), j, LatestVersion) + _, err = m.Deploy(context.Background(), j, UseLatestVersion) require.ErrorIs(t, err, errUpgrade) m.versions[len(m.versions)-1] = &TestVersion2{ConfigErr: false, ExchErr: true} - _, err = m.Deploy(context.Background(), in, LatestVersion) + _, err = m.Deploy(context.Background(), in, UseLatestVersion) require.Implements(t, (*ExchangeVersion)(nil), m.versions[1]) require.ErrorIs(t, err, errUpgrade) - j2, err := m.Deploy(context.Background(), j, 0) + j2, err = m.Deploy(context.Background(), j, 0) require.NoError(t, err) assert.Contains(t, string(j2), `"version": 0`, "Explicit downgrade should work correctly") m.versions = m.versions[:1] - _, err = m.Deploy(context.Background(), j, LatestVersion) - assert.ErrorIs(t, err, errConfigVersion, "Config version ahead of latest version should error") - - _, err = m.Deploy(context.Background(), j, 0) - assert.ErrorIs(t, err, errConfigVersion, "Config version ahead of latest version should error") + _, err = m.Deploy(context.Background(), j, UseLatestVersion) + assert.ErrorIs(t, err, errConfigVersionUnavail, "Config version ahead of latest version should error") } // TestExchangeDeploy exercises exchangeDeploy @@ -70,7 +73,7 @@ func TestDeploy(t *testing.T) { func TestExchangeDeploy(t *testing.T) { t.Parallel() m := manager{} - _, err := m.Deploy(context.Background(), []byte(``), LatestVersion) + _, err := m.Deploy(context.Background(), []byte(``), UseLatestVersion) assert.ErrorIs(t, err, errNoVersions) v := &TestVersion2{} @@ -113,10 +116,10 @@ func TestLatest(t *testing.T) { m.registerVersion(1, &Version1{}) v, err := m.latest() require.NoError(t, err) - assert.Equal(t, 1, v) + assert.Equal(t, uint16(1), v) m.registerVersion(2, &Version2{}) v, err = m.latest() require.NoError(t, err) - assert.Equal(t, 2, v) + assert.Equal(t, uint16(2), v) } diff --git a/currency/code_test.go b/currency/code_test.go index 714443cc5d6..cdd99232524 100644 --- a/currency/code_test.go +++ b/currency/code_test.go @@ -652,7 +652,7 @@ func TestItemString(t *testing.T) { // 546290 2192 ns/op 8 B/op 1 allocs/op // Previous func BenchmarkNewCode(b *testing.B) { b.ReportAllocs() - for x := 0; x < b.N; x++ { + for b.Loop() { _ = NewCode("someCode") } } diff --git a/currency/pairs_test.go b/currency/pairs_test.go index 3a4ea8b7776..e6a50c91fa2 100644 --- a/currency/pairs_test.go +++ b/currency/pairs_test.go @@ -424,7 +424,7 @@ func BenchmarkGetCrypto(b *testing.B) { NewPair(LTC, USDT), } - for x := 0; x < b.N; x++ { + for b.Loop() { _ = pairs.GetCrypto() } } @@ -524,7 +524,7 @@ func BenchmarkPairsString(b *testing.B) { NewPair(DAI, XRP), } - for x := 0; x < b.N; x++ { + for b.Loop() { _ = pairs.Strings() } } @@ -544,7 +544,7 @@ func BenchmarkPairsFormat(b *testing.B) { formatting := PairFormat{Delimiter: "/", Uppercase: false} - for x := 0; x < b.N; x++ { + for b.Loop() { _ = pairs.Format(formatting) } } @@ -562,7 +562,7 @@ func BenchmarkRemovePairsByFilter(b *testing.B) { NewPair(DAI, XRP), } - for x := 0; x < b.N; x++ { + for b.Loop() { _ = pairs.RemovePairsByFilter(USD) } } @@ -916,7 +916,7 @@ func BenchmarkFindDifferences(b *testing.B) { compare, err := NewPairsFromStrings([]string{"ETH-123", "LTC-123", "MEOW-123"}) require.NoError(b, err) - for i := 0; i < b.N; i++ { + for b.Loop() { _, err = original.FindDifferences(compare, EMPTYFORMAT) require.NoError(b, err) } diff --git a/currency/translation_test.go b/currency/translation_test.go index 728f701eafa..8e16eda7f3b 100644 --- a/currency/translation_test.go +++ b/currency/translation_test.go @@ -146,7 +146,7 @@ func BenchmarkFindMatchingPairsBetween(b *testing.B) { BTCM: BTC, }) - for i := 0; i < b.N; i++ { + for b.Loop() { _ = FindMatchingPairsBetween(PairsWithTranslation{spotPairs, translations}, PairsWithTranslation{futuresPairs, translations}) } } diff --git a/database/drivers/drivers_type.go b/database/drivers/drivers_type.go index 31656167bd0..503bf173df8 100644 --- a/database/drivers/drivers_type.go +++ b/database/drivers/drivers_type.go @@ -3,7 +3,7 @@ package drivers // ConnectionDetails holds DSN information type ConnectionDetails struct { Host string `json:"host"` - Port uint16 `json:"port"` + Port uint32 `json:"port"` Username string `json:"username"` Password string `json:"password"` Database string `json:"database"` diff --git a/database/repository/datahistoryjob/datahistoryjob.go b/database/repository/datahistoryjob/datahistoryjob.go index d5ad00ee6d9..7a1381c9f56 100644 --- a/database/repository/datahistoryjob/datahistoryjob.go +++ b/database/repository/datahistoryjob/datahistoryjob.go @@ -264,7 +264,7 @@ func upsertSqlite(ctx context.Context, tx *sql.Tx, jobs ...*DataHistoryJob) erro Created: time.Now().UTC().Format(time.RFC3339), ConversionInterval: null.Float64{Float64: float64(jobs[i].ConversionInterval), Valid: jobs[i].ConversionInterval > 0}, OverwriteData: null.Int64{Int64: overwrite, Valid: overwrite == 1}, - DecimalPlaceComparison: null.Int64{Int64: jobs[i].DecimalPlaceComparison, Valid: jobs[i].DecimalPlaceComparison > 0}, + DecimalPlaceComparison: null.Int64{Int64: int64(jobs[i].DecimalPlaceComparison), Valid: jobs[i].DecimalPlaceComparison > 0}, //nolint:gosec // TODO: Make uint64 ReplaceOnIssue: null.Int64{Int64: replaceOnIssue, Valid: replaceOnIssue == 1}, IssueTolerancePercentage: null.Float64{Float64: jobs[i].IssueTolerancePercentage, Valid: jobs[i].IssueTolerancePercentage > 0}, } @@ -315,7 +315,7 @@ func upsertPostgres(ctx context.Context, tx *sql.Tx, jobs ...*DataHistoryJob) er Created: time.Now().UTC(), ConversionInterval: null.Float64{Float64: float64(jobs[i].ConversionInterval), Valid: jobs[i].ConversionInterval > 0}, OverwriteData: null.Bool{Bool: jobs[i].OverwriteData, Valid: jobs[i].OverwriteData}, - DecimalPlaceComparison: null.Int{Int: int(jobs[i].DecimalPlaceComparison), Valid: jobs[i].DecimalPlaceComparison > 0}, + DecimalPlaceComparison: null.Int{Int: int(jobs[i].DecimalPlaceComparison), Valid: jobs[i].DecimalPlaceComparison > 0}, //nolint:gosec // TODO: Make uint64 ReplaceOnIssue: null.Bool{Bool: jobs[i].ReplaceOnIssue, Valid: jobs[i].ReplaceOnIssue}, IssueTolerancePercentage: null.Float64{Float64: jobs[i].IssueTolerancePercentage, Valid: jobs[i].IssueTolerancePercentage > 0}, } @@ -711,17 +711,17 @@ func (db *DBService) createSQLiteDataHistoryJobResponse(result *sqlite3.Datahist StartDate: ts, EndDate: tEnd, Interval: int64(result.Interval), - RequestSizeLimit: int64(result.RequestSize), + RequestSizeLimit: uint64(result.RequestSize), DataType: int64(result.DataType), - MaxRetryAttempts: int64(result.MaxRetries), - BatchSize: int64(result.BatchCount), + MaxRetryAttempts: uint64(result.MaxRetries), + BatchSize: uint64(result.BatchCount), Status: int64(result.Status), CreatedDate: c, PrerequisiteJobID: prereqID, PrerequisiteJobNickname: prereqNickname, ConversionInterval: int64(result.ConversionInterval.Float64), OverwriteData: result.OverwriteData.Int64 == 1, - DecimalPlaceComparison: result.DecimalPlaceComparison.Int64, + DecimalPlaceComparison: uint64(result.DecimalPlaceComparison.Int64), //nolint:gosec // TODO: Make uint64 SecondarySourceExchangeName: secondaryExchangeName, IssueTolerancePercentage: result.IssueTolerancePercentage.Float64, ReplaceOnIssue: result.ReplaceOnIssue.Int64 == 1, @@ -789,10 +789,10 @@ func (db *DBService) createPostgresDataHistoryJobResponse(result *postgres.Datah StartDate: result.StartTime, EndDate: result.EndTime, Interval: int64(result.Interval), - RequestSizeLimit: int64(result.RequestSize), + RequestSizeLimit: uint64(result.RequestSize), DataType: int64(result.DataType), - MaxRetryAttempts: int64(result.MaxRetries), - BatchSize: int64(result.BatchCount), + MaxRetryAttempts: uint64(result.MaxRetries), + BatchSize: uint64(result.BatchCount), Status: int64(result.Status), CreatedDate: result.Created, Results: jobResults, @@ -800,7 +800,7 @@ func (db *DBService) createPostgresDataHistoryJobResponse(result *postgres.Datah PrerequisiteJobNickname: prereqNickname, ConversionInterval: int64(result.ConversionInterval.Float64), OverwriteData: result.OverwriteData.Bool, - DecimalPlaceComparison: int64(result.DecimalPlaceComparison.Int), + DecimalPlaceComparison: uint64(result.DecimalPlaceComparison.Int), //nolint:gosec // TODO: Make uint64 SecondarySourceExchangeName: secondaryExchangeName, IssueTolerancePercentage: result.IssueTolerancePercentage.Float64, ReplaceOnIssue: result.ReplaceOnIssue.Bool, diff --git a/database/repository/datahistoryjob/datahistoryjob_types.go b/database/repository/datahistoryjob/datahistoryjob_types.go index b44fb349620..9810951258e 100644 --- a/database/repository/datahistoryjob/datahistoryjob_types.go +++ b/database/repository/datahistoryjob/datahistoryjob_types.go @@ -22,10 +22,10 @@ type DataHistoryJob struct { StartDate time.Time EndDate time.Time Interval int64 - RequestSizeLimit int64 + RequestSizeLimit uint64 DataType int64 - MaxRetryAttempts int64 - BatchSize int64 + MaxRetryAttempts uint64 + BatchSize uint64 Status int64 CreatedDate time.Time Results []*datahistoryjobresult.DataHistoryJobResult @@ -33,7 +33,7 @@ type DataHistoryJob struct { PrerequisiteJobNickname string ConversionInterval int64 OverwriteData bool - DecimalPlaceComparison int64 + DecimalPlaceComparison uint64 SecondarySourceExchangeName string IssueTolerancePercentage float64 ReplaceOnIssue bool diff --git a/dispatch/dispatch_test.go b/dispatch/dispatch_test.go index 14cd04333c2..d3a5c58e4f5 100644 --- a/dispatch/dispatch_test.go +++ b/dispatch/dispatch_test.go @@ -386,7 +386,7 @@ func BenchmarkSubscribe(b *testing.B) { newID, err := mux.GetID() require.NoError(b, err, "GetID should not error") - for n := 0; n < b.N; n++ { + for b.Loop() { _, err := mux.Subscribe(newID) if err != nil { b.Error(err) diff --git a/encoding/json/benchmark_test.go b/encoding/json/benchmark_test.go index 91898556bd4..21164743ee9 100644 --- a/encoding/json/benchmark_test.go +++ b/encoding/json/benchmark_test.go @@ -6,7 +6,7 @@ import "testing" // BenchmarkUnmarshal-16 1859184 653.3 ns/op 900 B/op 18 allocs/op (bytedance/sonic) Usage: go test --tags=sonic -bench=BenchmarkUnmarshal -v func BenchmarkUnmarshal(b *testing.B) { b.ReportAllocs() - for i := 0; i < b.N; i++ { + for b.Loop() { _ = Unmarshal([]byte(`{"Name":"Wednesday","Age":6,"Parents":["Gomez","Morticia"]}`), &map[string]interface{}{}) } } diff --git a/engine/datahistory_manager.go b/engine/datahistory_manager.go index 61a37b2a00f..e36f06f4802 100644 --- a/engine/datahistory_manager.go +++ b/engine/datahistory_manager.go @@ -178,7 +178,7 @@ func (m *DataHistoryManager) compareJobsToData(jobs ...*DataHistoryJob) error { } var err error for i := range jobs { - jobs[i].rangeHolder, err = kline.CalculateCandleDateRanges(jobs[i].StartDate, jobs[i].EndDate, jobs[i].Interval, uint32(jobs[i].RequestSizeLimit)) + jobs[i].rangeHolder, err = kline.CalculateCandleDateRanges(jobs[i].StartDate, jobs[i].EndDate, jobs[i].Interval, jobs[i].RequestSizeLimit) if err != nil { return err } @@ -354,7 +354,7 @@ func (m *DataHistoryManager) runDataJob(job *DataHistoryJob, exch exchange.IBotE if !m.IsRunning() { return ErrSubSystemNotStarted } - var intervalsProcessed int64 + var intervalsProcessed uint64 var err error var result *DataHistoryJobResult ranges: @@ -404,7 +404,7 @@ ranges: job.DataType) } - var failures int64 + var failures uint64 hasDataInRange := false resultLookup, ok := job.Results[job.rangeHolder.Ranges[i].Start.Time.Unix()] if ok { @@ -503,9 +503,9 @@ func (m *DataHistoryManager) runValidationJob(job *DataHistoryJob, exch exchange if !m.IsRunning() { return ErrSubSystemNotStarted } - var intervalsProcessed int64 + var intervalsProcessed uint64 var jobIntervals, intervalsToCheck []time.Time - intervalLength := job.Interval.Duration() * time.Duration(job.RequestSizeLimit) + intervalLength := job.Interval.Duration() * time.Duration(job.RequestSizeLimit) //nolint:gosec // TODO: Ensure size limit can't overflow for i := job.StartDate; i.Before(job.EndDate); i = i.Add(intervalLength) { jobIntervals = append(jobIntervals, i) } @@ -513,7 +513,7 @@ func (m *DataHistoryManager) runValidationJob(job *DataHistoryJob, exch exchange timesToFetch: for t, results := range job.Results { tt := time.Unix(t, 0) - if len(results) < int(job.MaxRetryAttempts) { + if uint64(len(results)) < job.MaxRetryAttempts { for x := range results { if results[x].Status == dataHistoryStatusComplete { continue timesToFetch @@ -1156,7 +1156,7 @@ func (m *DataHistoryManager) UpsertJob(job *DataHistoryJob, insertOnly bool) err if job.DataType == dataHistoryConvertCandlesDataType { interval = job.ConversionInterval } - job.rangeHolder, err = kline.CalculateCandleDateRanges(job.StartDate, job.EndDate, interval, uint32(job.RequestSizeLimit)) + job.rangeHolder, err = kline.CalculateCandleDateRanges(job.StartDate, job.EndDate, interval, job.RequestSizeLimit) if err != nil { return err } @@ -1256,7 +1256,7 @@ func (m *DataHistoryManager) validateJob(job *DataHistoryJob) error { } if job.DataType == dataHistoryCandleValidationDataType { - if job.DecimalPlaceComparison < 0 { + if job.DecimalPlaceComparison == 0 { log.Warnf(log.DataHistory, "job %s decimal place comparison %v invalid. defaulting to %v decimal places when comparing data for validation", job.Nickname, job.DecimalPlaceComparison, defaultDecimalPlaceComparison) job.DecimalPlaceComparison = defaultDecimalPlaceComparison } diff --git a/engine/datahistory_manager_types.go b/engine/datahistory_manager_types.go index 4b17ded0b5a..1ce4ad385ed 100644 --- a/engine/datahistory_manager_types.go +++ b/engine/datahistory_manager_types.go @@ -104,18 +104,20 @@ var ( errNilResult = errors.New("received nil job result") errJobMustBeActiveOrPaused = errors.New("job must be active or paused to be set as a prerequisite") errNilCandles = errors.New("received nil candles") +) +const ( // defaultDataHistoryTradeInterval is the default interval size used to verify whether there is any database data // for a trade job - defaultDataHistoryTradeInterval = kline.FifteenMin - defaultDataHistoryMaxJobsPerCycle int64 = 5 - defaultMaxResultInsertions int64 = 10000 - defaultDataHistoryBatchLimit int64 = 3 - defaultDataHistoryRetryAttempts int64 = 3 - defaultDataHistoryRequestSizeLimit int64 = 500 - defaultDataHistoryTicker = time.Minute - defaultDataHistoryTradeRequestSize int64 = 10 - defaultDecimalPlaceComparison int64 = 3 + defaultDataHistoryTradeInterval = kline.FifteenMin + defaultDataHistoryMaxJobsPerCycle int64 = 5 + defaultMaxResultInsertions int64 = 10000 + defaultDataHistoryBatchLimit uint64 = 3 + defaultDataHistoryRetryAttempts uint64 = 3 + defaultDataHistoryRequestSizeLimit uint64 = 500 + defaultDataHistoryTicker = time.Minute + defaultDataHistoryTradeRequestSize uint64 = 10 + defaultDecimalPlaceComparison uint64 = 3 ) // DataHistoryManager is responsible for synchronising, @@ -149,17 +151,17 @@ type DataHistoryJob struct { StartDate time.Time EndDate time.Time Interval kline.Interval - RunBatchLimit int64 - RequestSizeLimit int64 + RunBatchLimit uint64 + RequestSizeLimit uint64 DataType dataHistoryDataType - MaxRetryAttempts int64 + MaxRetryAttempts uint64 Status dataHistoryStatus CreatedDate time.Time Results map[int64][]DataHistoryJobResult rangeHolder *kline.IntervalRangeHolder OverwriteExistingData bool ConversionInterval kline.Interval - DecimalPlaceComparison int64 + DecimalPlaceComparison uint64 SecondaryExchangeSource string IssueTolerancePercentage float64 ReplaceOnIssue bool diff --git a/engine/engine.go b/engine/engine.go index 8ad14d87ed6..6874cf47ea4 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -202,7 +202,7 @@ func validateSettings(b *Engine, s *Settings, flagSet FlagSet) { flagSet.WithBool("deprecatedrpc", &b.Settings.EnableDeprecatedRPC, b.Config.RemoteControl.DeprecatedRPC.Enabled) if flagSet["maxvirtualmachines"] { - maxMachines := uint8(b.Settings.MaxVirtualMachines) + maxMachines := b.Settings.MaxVirtualMachines b.gctScriptManager.MaxVirtualMachines = &maxMachines } diff --git a/engine/engine_test.go b/engine/engine_test.go index 68864dff219..d508155d863 100644 --- a/engine/engine_test.go +++ b/engine/engine_test.go @@ -369,9 +369,7 @@ func TestGetDefaultConfigurations(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() exch, err := em.NewExchangeByName(name) - if err != nil { - t.Fatal(err) - } + require.NoError(t, err, "NewExchangeByName must not error") if isCITest() && slices.Contains(blockedCIExchanges, name) { t.Skipf("skipping %s due to CI test restrictions", name) @@ -382,40 +380,18 @@ func TestGetDefaultConfigurations(t *testing.T) { } defaultCfg, err := exchange.GetDefaultConfig(context.Background(), exch) - if err != nil { - t.Fatal(err) - } - - if defaultCfg == nil { - t.Fatal("expected config") - } - - if defaultCfg.Name == "" { - t.Error("name unset SetDefaults() not called") - } - - if !defaultCfg.Enabled { - t.Error("expected enabled", defaultCfg.Name) - } + require.NoError(t, err, "GetDefaultConfig must not error") + require.NotNil(t, defaultCfg) + assert.NotEmpty(t, defaultCfg.Name, "Name should not be empty") + assert.True(t, defaultCfg.Enabled, "Enabled should have the correct value") if exch.SupportsWebsocket() { - if defaultCfg.WebsocketResponseCheckTimeout <= 0 { - t.Error("expected websocketResponseCheckTimeout to be greater than 0", defaultCfg.Name) - } - - if defaultCfg.WebsocketResponseMaxLimit <= 0 { - t.Error("expected WebsocketResponseMaxLimit to be greater than 0", defaultCfg.Name) - } - - if defaultCfg.WebsocketTrafficTimeout <= 0 { - t.Error("expected WebsocketTrafficTimeout to be greater than 0", defaultCfg.Name) - } + assert.Positive(t, defaultCfg.WebsocketResponseCheckTimeout, "WebsocketResponseCheckTimeout should be positive") + assert.Positive(t, defaultCfg.WebsocketResponseMaxLimit, "WebsocketResponseMaxLimit should be positive") + assert.Positive(t, defaultCfg.WebsocketTrafficTimeout, "WebsocketTrafficTimeout should be positive") } - // Makes sure the config is valid and can be used to setup the exchange - if err := exch.Setup(defaultCfg); err != nil { - t.Fatal(err) - } + require.NoError(t, exch.Setup(defaultCfg), "Setup must not error") }) } } diff --git a/engine/engine_types.go b/engine/engine_types.go index c831a6620d9..7d482b6aaf7 100644 --- a/engine/engine_types.go +++ b/engine/engine_types.go @@ -107,7 +107,7 @@ type ExchangeTuningSettings struct { // GCTScriptSettings defines settings related to the GCTScript virtual machine type GCTScriptSettings struct { - MaxVirtualMachines uint + MaxVirtualMachines uint64 } // WithdrawSettings defines settings related to Withdrawing cryptocurrency diff --git a/engine/order_manager.go b/engine/order_manager.go index e6a990cb3c8..2aa4a3d5eb9 100644 --- a/engine/order_manager.go +++ b/engine/order_manager.go @@ -404,10 +404,9 @@ func (m *OrderManager) Modify(ctx context.Context, mod *order.Modify) (*order.Mo // Populate additional Modify fields as some of them are required by various // exchange implementations. - mod.Pair = det.Pair // Used by Bithumb. - mod.Side = det.Side // Used by Bithumb. - mod.PostOnly = det.PostOnly // Used by Poloniex. - mod.ImmediateOrCancel = det.ImmediateOrCancel // Used by Poloniex. + mod.Pair = det.Pair // Used by Bithumb. + mod.Side = det.Side // Used by Bithumb. + mod.TimeInForce = det.TimeInForce // PostOnly used by Poloniex. // Following is just a precaution to not modify orders by mistake if exchange // implementations do not check fields of the Modify struct for zero values. diff --git a/engine/rpcserver.go b/engine/rpcserver.go index 333887516a8..a7c40667786 100644 --- a/engine/rpcserver.go +++ b/engine/rpcserver.go @@ -1796,7 +1796,7 @@ func (s *RPCServer) WithdrawalEventByID(_ context.Context, r *gctrpc.WithdrawalE Currency: v.RequestDetails.Currency.String(), Description: v.RequestDetails.Description, Amount: v.RequestDetails.Amount, - Type: int32(v.RequestDetails.Type), + Type: int64(v.RequestDetails.Type), }, }, } @@ -3622,7 +3622,7 @@ func parseMultipleEvents(ret []*withdraw.Response) *gctrpc.WithdrawalEventsByExc Currency: ret[x].RequestDetails.Currency.String(), Description: ret[x].RequestDetails.Description, Amount: ret[x].RequestDetails.Amount, - Type: int32(ret[x].RequestDetails.Type), + Type: int64(ret[x].RequestDetails.Type), }, } @@ -3708,7 +3708,7 @@ func parseSingleEvents(ret *withdraw.Response) *gctrpc.WithdrawalEventsByExchang Currency: ret.RequestDetails.Currency.String(), Description: ret.RequestDetails.Description, Amount: ret.RequestDetails.Amount, - Type: int32(ret.RequestDetails.Type), + Type: int64(ret.RequestDetails.Type), }, } tempEvent.CreatedAt = timestamppb.New(ret.CreatedAt) @@ -5058,7 +5058,7 @@ func (s *RPCServer) GetTechnicalAnalysis(ctx context.Context, r *gctrpc.GetTechn bollinger, err = klines.GetBollingerBands(r.Period, r.StandardDeviationUp, r.StandardDeviationDown, - indicators.MaType(r.MovingAverageType)) + indicators.MaType(r.MovingAverageType)) //nolint:gosec // TODO: Make var types consistent if err != nil { return nil, err } diff --git a/engine/rpcserver_test.go b/engine/rpcserver_test.go index c80a9cdc72a..b99f650750a 100644 --- a/engine/rpcserver_test.go +++ b/engine/rpcserver_test.go @@ -1945,35 +1945,18 @@ func TestGetDataHistoryJobSummary(t *testing.T) { EndDate: time.Now().UTC(), Interval: kline.OneMin, } - - err := m.UpsertJob(dhj, false) - if !errors.Is(err, nil) { - t.Errorf("received %v, expected %v", err, nil) - } - - _, err = s.GetDataHistoryJobSummary(context.Background(), nil) - if !errors.Is(err, errNilRequestData) { - t.Errorf("received %v, expected %v", err, errNilRequestData) - } + assert.NoError(t, m.UpsertJob(dhj, false), "UpsertJob should not error") + _, err := s.GetDataHistoryJobSummary(context.Background(), nil) + assert.ErrorIs(t, err, errNilRequestData) _, err = s.GetDataHistoryJobSummary(context.Background(), &gctrpc.GetDataHistoryJobDetailsRequest{}) - if !errors.Is(err, errNicknameUnset) { - t.Errorf("received %v, expected %v", err, errNicknameUnset) - } + assert.ErrorIs(t, err, errNicknameUnset) resp, err := s.GetDataHistoryJobSummary(context.Background(), &gctrpc.GetDataHistoryJobDetailsRequest{Nickname: "TestGetDataHistoryJobSummary"}) - if !errors.Is(err, nil) { - t.Errorf("received %v, expected %v", err, nil) - } - if resp == nil { //nolint:staticcheck,nolintlint // SA5011 Ignore the nil warnings - t.Fatal("expected job") - } - if resp.Nickname == "" { - t.Fatalf("received %v, expected %v", "", dhj.Nickname) - } - if resp.ResultSummaries == nil { //nolint:staticcheck,nolintlint // SA5011 Ignore the nil warnings - t.Fatalf("received %v, expected %v", nil, "result summaries slice") - } + assert.NoError(t, err, "GetDataHistoryJobSummary should not error") + require.NotNil(t, resp) + assert.NotEmpty(t, resp.Nickname) + assert.NotEmpty(t, resp.ResultSummaries) } func TestGetManagedOrders(t *testing.T) { diff --git a/exchanges/alert/alert_test.go b/exchanges/alert/alert_test.go index 745b768df9e..cee75bd5377 100644 --- a/exchanges/alert/alert_test.go +++ b/exchanges/alert/alert_test.go @@ -96,7 +96,7 @@ func isLeaky(t *testing.T, a *Notice, ch chan struct{}) { // 146173060 9.154 ns/op 0 B/op 0 allocs/op // CURRENT func BenchmarkAlert(b *testing.B) { n := Notice{} - for x := 0; x < b.N; x++ { + for b.Loop() { n.Alert() } } @@ -107,7 +107,7 @@ func BenchmarkAlert(b *testing.B) { // 87436 14724 ns/op 682 B/op 4 allocs/op // CURRENT func BenchmarkWait(b *testing.B) { n := Notice{} - for x := 0; x < b.N; x++ { + for b.Loop() { n.Wait(nil) } } diff --git a/exchanges/binance/binance.go b/exchanges/binance/binance.go index 8a3eee90ff6..cfafbc15233 100644 --- a/exchanges/binance/binance.go +++ b/exchanges/binance/binance.go @@ -396,7 +396,7 @@ func (b *Binance) GetSpotKline(ctx context.Context, arg *KlinesRequestParams) ([ params.Set("symbol", symbol) params.Set("interval", arg.Interval) if arg.Limit != 0 { - params.Set("limit", strconv.Itoa(arg.Limit)) + params.Set("limit", strconv.FormatUint(arg.Limit, 10)) } if !arg.StartTime.IsZero() { params.Set("startTime", timeString(arg.StartTime)) @@ -619,7 +619,7 @@ func (b *Binance) newOrder(ctx context.Context, api string, o *NewOrderRequest, params.Set("price", strconv.FormatFloat(o.Price, 'f', -1, 64)) } if o.TimeInForce != "" { - params.Set("timeInForce", string(o.TimeInForce)) + params.Set("timeInForce", o.TimeInForce) } if o.NewClientOrderID != "" { diff --git a/exchanges/binance/binance_cfutures.go b/exchanges/binance/binance_cfutures.go index 3a66b75bd11..5c820103318 100644 --- a/exchanges/binance/binance_cfutures.go +++ b/exchanges/binance/binance_cfutures.go @@ -243,7 +243,7 @@ func (b *Binance) GetFundingRateInfo(ctx context.Context) ([]FundingRateInfoResp } // GetFuturesKlineData gets futures kline data for CoinMarginedFutures, -func (b *Binance) GetFuturesKlineData(ctx context.Context, symbol currency.Pair, interval string, limit int64, startTime, endTime time.Time) ([]FuturesCandleStick, error) { +func (b *Binance) GetFuturesKlineData(ctx context.Context, symbol currency.Pair, interval string, limit uint64, startTime, endTime time.Time) ([]FuturesCandleStick, error) { params := url.Values{} if !symbol.IsEmpty() { symbolValue, err := b.FormatSymbol(symbol, asset.CoinMarginedFutures) @@ -253,7 +253,7 @@ func (b *Binance) GetFuturesKlineData(ctx context.Context, symbol currency.Pair, params.Set("symbol", symbolValue) } if limit > 0 { - params.Set("limit", strconv.FormatInt(limit, 10)) + params.Set("limit", strconv.FormatUint(limit, 10)) } if !slices.Contains(validFuturesIntervals, interval) { return nil, errors.New("invalid interval parsed") @@ -364,7 +364,7 @@ func (b *Binance) GetFuturesKlineData(ctx context.Context, symbol currency.Pair, } // GetContinuousKlineData gets continuous kline data -func (b *Binance) GetContinuousKlineData(ctx context.Context, pair, contractType, interval string, limit int64, startTime, endTime time.Time) ([]FuturesCandleStick, error) { +func (b *Binance) GetContinuousKlineData(ctx context.Context, pair, contractType, interval string, limit uint64, startTime, endTime time.Time) ([]FuturesCandleStick, error) { params := url.Values{} params.Set("pair", pair) if !slices.Contains(validContractType, contractType) { @@ -372,7 +372,7 @@ func (b *Binance) GetContinuousKlineData(ctx context.Context, pair, contractType } params.Set("contractType", contractType) if limit > 0 { - params.Set("limit", strconv.FormatInt(limit, 10)) + params.Set("limit", strconv.FormatUint(limit, 10)) } if !slices.Contains(validFuturesIntervals, interval) { return nil, errors.New("invalid interval parsed") @@ -483,11 +483,11 @@ func (b *Binance) GetContinuousKlineData(ctx context.Context, pair, contractType } // GetIndexPriceKlines gets continuous kline data -func (b *Binance) GetIndexPriceKlines(ctx context.Context, pair, interval string, limit int64, startTime, endTime time.Time) ([]FuturesCandleStick, error) { +func (b *Binance) GetIndexPriceKlines(ctx context.Context, pair, interval string, limit uint64, startTime, endTime time.Time) ([]FuturesCandleStick, error) { params := url.Values{} params.Set("pair", pair) if limit > 0 { - params.Set("limit", strconv.FormatInt(limit, 10)) + params.Set("limit", strconv.FormatUint(limit, 10)) } if !slices.Contains(validFuturesIntervals, interval) { return nil, errors.New("invalid interval parsed") @@ -598,7 +598,7 @@ func (b *Binance) GetIndexPriceKlines(ctx context.Context, pair, interval string } // GetMarkPriceKline gets mark price kline data -func (b *Binance) GetMarkPriceKline(ctx context.Context, symbol currency.Pair, interval string, limit int64, startTime, endTime time.Time) ([]FuturesCandleStick, error) { +func (b *Binance) GetMarkPriceKline(ctx context.Context, symbol currency.Pair, interval string, limit uint64, startTime, endTime time.Time) ([]FuturesCandleStick, error) { symbolValue, err := b.FormatSymbol(symbol, asset.CoinMarginedFutures) if err != nil { return nil, err @@ -606,7 +606,7 @@ func (b *Binance) GetMarkPriceKline(ctx context.Context, symbol currency.Pair, i params := url.Values{} params.Set("symbol", symbolValue) if limit > 0 { - params.Set("limit", strconv.FormatInt(limit, 10)) + params.Set("limit", strconv.FormatUint(limit, 10)) } if !slices.Contains(validFuturesIntervals, interval) { return nil, errors.New("invalid interval parsed") @@ -716,7 +716,7 @@ func (b *Binance) GetMarkPriceKline(ctx context.Context, symbol currency.Pair, i return resp, nil } -func getKlineRateBudget(limit int64) request.EndpointLimit { +func getKlineRateBudget(limit uint64) request.EndpointLimit { rateBudget := cFuturesDefaultRate switch { case limit > 0 && limit < 100: @@ -990,8 +990,8 @@ func (b *Binance) FuturesNewOrder(ctx context.Context, x *FuturesNewOrderRequest params.Set("positionSide", x.PositionSide) } params.Set("type", x.OrderType) - if string(x.TimeInForce) != "" { - params.Set("timeInForce", string(x.TimeInForce)) + if x.TimeInForce != "" { + params.Set("timeInForce", x.TimeInForce) } if x.ReduceOnly { params.Set("reduceOnly", "true") diff --git a/exchanges/binance/binance_test.go b/exchanges/binance/binance_test.go index 2b42b1a7493..23f1e427c7e 100644 --- a/exchanges/binance/binance_test.go +++ b/exchanges/binance/binance_test.go @@ -866,7 +866,7 @@ func TestFuturesNewOrder(t *testing.T) { Symbol: currency.NewPairWithDelimiter("BTCUSD", "PERP", "_"), Side: "BUY", OrderType: "LIMIT", - TimeInForce: BinanceRequestParamsTimeGTC, + TimeInForce: order.GoodTillCancel.String(), Quantity: 1, Price: 1, }, @@ -1420,7 +1420,7 @@ func TestNewOrderTest(t *testing.T) { TradeType: BinanceRequestParamsOrderLimit, Price: 0.0025, Quantity: 100000, - TimeInForce: BinanceRequestParamsTimeGTC, + TimeInForce: order.GoodTillCancel.String(), } err := b.NewOrderTest(context.Background(), req) diff --git a/exchanges/binance/binance_types.go b/exchanges/binance/binance_types.go index 215d7ece9d8..4b0c9ac7b18 100644 --- a/exchanges/binance/binance_types.go +++ b/exchanges/binance/binance_types.go @@ -375,7 +375,7 @@ type NewOrderRequest struct { TradeType RequestParamsOrderType // TimeInForce specifies how long the order remains in effect. // Examples are (Good Till Cancel (GTC), Immediate or Cancel (IOC) and Fill Or Kill (FOK)) - TimeInForce RequestParamsTimeForceType + TimeInForce string // Quantity is the total base qty spent or received in an order. Quantity float64 // QuoteOrderQty is the total quote qty spent or received in a MARKET order. @@ -486,20 +486,6 @@ type MarginAccountAsset struct { NetAsset float64 `json:"netAsset,string"` } -// RequestParamsTimeForceType Time in force -type RequestParamsTimeForceType string - -var ( - // BinanceRequestParamsTimeGTC GTC - BinanceRequestParamsTimeGTC = RequestParamsTimeForceType("GTC") - - // BinanceRequestParamsTimeIOC IOC - BinanceRequestParamsTimeIOC = RequestParamsTimeForceType("IOC") - - // BinanceRequestParamsTimeFOK FOK - BinanceRequestParamsTimeFOK = RequestParamsTimeForceType("FOK") -) - // RequestParamsOrderType trade order type type RequestParamsOrderType string @@ -530,7 +516,7 @@ var ( type KlinesRequestParams struct { Symbol currency.Pair // Required field; example LTCBTC, BTCUSDT Interval string // Time interval period - Limit int // Default 500; max 500. + Limit uint64 // Default 500; max 500. StartTime time.Time EndTime time.Time } diff --git a/exchanges/binance/binance_ufutures.go b/exchanges/binance/binance_ufutures.go index 77630ee333b..355a3a04b90 100644 --- a/exchanges/binance/binance_ufutures.go +++ b/exchanges/binance/binance_ufutures.go @@ -219,7 +219,7 @@ func (b *Binance) UCompressedTrades(ctx context.Context, symbol currency.Pair, f } // UKlineData gets kline data for usdt margined futures -func (b *Binance) UKlineData(ctx context.Context, symbol currency.Pair, interval string, limit int64, startTime, endTime time.Time) ([]FuturesCandleStick, error) { +func (b *Binance) UKlineData(ctx context.Context, symbol currency.Pair, interval string, limit uint64, startTime, endTime time.Time) ([]FuturesCandleStick, error) { params := url.Values{} symbolValue, err := b.FormatSymbol(symbol, asset.USDTMarginedFutures) if err != nil { @@ -231,7 +231,7 @@ func (b *Binance) UKlineData(ctx context.Context, symbol currency.Pair, interval } params.Set("interval", interval) if limit > 0 { - params.Set("limit", strconv.FormatInt(limit, 10)) + params.Set("limit", strconv.FormatUint(limit, 10)) } if !startTime.IsZero() && !endTime.IsZero() { if startTime.After(endTime) { diff --git a/exchanges/binance/binance_wrapper.go b/exchanges/binance/binance_wrapper.go index 0ef91c7b268..9e283296d8d 100644 --- a/exchanges/binance/binance_wrapper.go +++ b/exchanges/binance/binance_wrapper.go @@ -810,7 +810,7 @@ func (b *Binance) GetRecentTrades(ctx context.Context, p currency.Pair, a asset. } if b.IsSaveTradeDataEnabled() { - err := trade.AddTradesToBuffer(b.Name, resp...) + err := trade.AddTradesToBuffer(resp...) if err != nil { return nil, err } @@ -882,15 +882,15 @@ func (b *Binance) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Subm } else { sideType = order.Sell.String() } - timeInForce := BinanceRequestParamsTimeGTC + timeInForce := order.GoodTillCancel.String() var requestParamsOrderType RequestParamsOrderType switch s.Type { case order.Market: timeInForce = "" requestParamsOrderType = BinanceRequestParamsOrderMarket case order.Limit: - if s.ImmediateOrCancel { - timeInForce = BinanceRequestParamsTimeIOC + if s.TimeInForce.Is(order.ImmediateOrCancel) { + timeInForce = order.ImmediateOrCancel.String() } requestParamsOrderType = BinanceRequestParamsOrderLimit default: @@ -936,15 +936,11 @@ func (b *Binance) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Subm return nil, errors.New("invalid side") } - var ( - oType string - timeInForce RequestParamsTimeForceType - ) - + var oType, timeInForce string switch s.Type { case order.Limit: oType = cfuturesLimit - timeInForce = BinanceRequestParamsTimeGTC + timeInForce = order.GoodTillTime.String() case order.Market: oType = cfuturesMarket case order.Stop: @@ -1668,7 +1664,7 @@ func (b *Binance) GetHistoricCandles(ctx context.Context, pair currency.Pair, a Symbol: req.Pair, StartTime: req.Start, EndTime: req.End, - Limit: int(req.RequestLimit), + Limit: req.RequestLimit, }) if err != nil { return nil, err @@ -1749,7 +1745,7 @@ func (b *Binance) GetHistoricCandlesExtended(ctx context.Context, pair currency. Symbol: req.Pair, StartTime: req.RangeHolder.Ranges[x].Start.Time, EndTime: req.RangeHolder.Ranges[x].End.Time, - Limit: int(req.RequestLimit), + Limit: req.RequestLimit, }) if err != nil { return nil, err @@ -1769,7 +1765,7 @@ func (b *Binance) GetHistoricCandlesExtended(ctx context.Context, pair currency. candles, err = b.UKlineData(ctx, req.RequestFormatted, b.FormatExchangeKlineInterval(interval), - int64(req.RangeHolder.Limit), + req.RangeHolder.Limit, req.RangeHolder.Ranges[x].Start.Time, req.RangeHolder.Ranges[x].End.Time) if err != nil { @@ -1790,7 +1786,7 @@ func (b *Binance) GetHistoricCandlesExtended(ctx context.Context, pair currency. candles, err = b.GetFuturesKlineData(ctx, req.RequestFormatted, b.FormatExchangeKlineInterval(interval), - int64(req.RangeHolder.Limit), + req.RangeHolder.Limit, req.RangeHolder.Ranges[x].Start.Time, req.RangeHolder.Ranges[x].End.Time) if err != nil { diff --git a/exchanges/binance/cfutures_types.go b/exchanges/binance/cfutures_types.go index 6c983f134be..d0431a80153 100644 --- a/exchanges/binance/cfutures_types.go +++ b/exchanges/binance/cfutures_types.go @@ -213,7 +213,7 @@ type FuturesNewOrderRequest struct { Side string PositionSide string OrderType string - TimeInForce RequestParamsTimeForceType + TimeInForce string NewClientOrderID string ClosePosition string WorkingType string diff --git a/exchanges/binanceus/binanceus.go b/exchanges/binanceus/binanceus.go index 34a35299b3a..6d0d5fcf590 100644 --- a/exchanges/binanceus/binanceus.go +++ b/exchanges/binanceus/binanceus.go @@ -451,7 +451,7 @@ func (bi *Binanceus) GetSpotKline(ctx context.Context, arg *KlinesRequestParams) params.Set("symbol", symbol) params.Set("interval", arg.Interval) if arg.Limit != 0 { - params.Set("limit", strconv.FormatInt(arg.Limit, 10)) + params.Set("limit", strconv.FormatUint(arg.Limit, 10)) } if !arg.StartTime.IsZero() && arg.StartTime.Unix() != 0 { params.Set("startTime", strconv.FormatInt((arg.StartTime).UnixMilli(), 10)) @@ -634,16 +634,16 @@ func (bi *Binanceus) GetAccount(ctx context.Context) (*Account, error) { } // GetUserAccountStatus to fetch account status detail. -func (bi *Binanceus) GetUserAccountStatus(ctx context.Context, recvWindow uint) (*AccountStatusResponse, error) { +func (bi *Binanceus) GetUserAccountStatus(ctx context.Context, recvWindow uint64) (*AccountStatusResponse, error) { var resp AccountStatusResponse params := url.Values{} timestamp := time.Now().UnixMilli() - params.Set("timestamp", strconv.Itoa(int(timestamp))) + params.Set("timestamp", strconv.FormatInt(timestamp, 10)) if recvWindow > 0 && recvWindow < 60000 { if recvWindow < 2000 { recvWindow += 1500 } - params.Set("recvWindow", strconv.Itoa(int(recvWindow))) + params.Set("recvWindow", strconv.FormatUint(recvWindow, 10)) } return &resp, @@ -657,7 +657,7 @@ func (bi *Binanceus) GetUserAccountStatus(ctx context.Context, recvWindow uint) } // GetUserAPITradingStatus to fetch account API trading status details. -func (bi *Binanceus) GetUserAPITradingStatus(ctx context.Context, recvWindow uint) (*TradeStatus, error) { +func (bi *Binanceus) GetUserAPITradingStatus(ctx context.Context, recvWindow uint64) (*TradeStatus, error) { type response struct { Success bool `json:"success"` TC TradeStatus `json:"status"` @@ -665,11 +665,11 @@ func (bi *Binanceus) GetUserAPITradingStatus(ctx context.Context, recvWindow uin var resp response params := url.Values{} timestamp := time.Now().UnixMilli() - params.Set("timestamp", strconv.Itoa(int(timestamp))) + params.Set("timestamp", strconv.FormatInt(timestamp, 10)) if recvWindow > 0 && recvWindow < 2000 { recvWindow += 1500 } - params.Set("recvWindow", strconv.Itoa(int(recvWindow))) + params.Set("recvWindow", strconv.FormatUint(recvWindow, 10)) return &resp.TC, bi.SendAuthHTTPRequest(ctx, exchange.RestSpotSupplementary, @@ -743,7 +743,7 @@ func calculateTradingFee(purchasePrice, amount, multiplier float64) float64 { } // GetTradeFee to fetch trading fees. -func (bi *Binanceus) GetTradeFee(ctx context.Context, recvWindow uint, symbol string) (TradeFeeList, error) { +func (bi *Binanceus) GetTradeFee(ctx context.Context, recvWindow uint64, symbol string) (TradeFeeList, error) { timestamp := time.Now().UnixMilli() params := url.Values{} var resp TradeFeeList @@ -754,7 +754,7 @@ func (bi *Binanceus) GetTradeFee(ctx context.Context, recvWindow uint, symbol st } else if recvWindow > 60000 { recvWindow = recvWindowSize5000 } - params.Set("recvWindow", strconv.Itoa(int(recvWindow))) + params.Set("recvWindow", strconv.FormatUint(recvWindow, 10)) } if symbol != "" { params.Set("symbol", symbol) @@ -773,16 +773,16 @@ func (bi *Binanceus) GetTradeFee(ctx context.Context, recvWindow uint, symbol st // // INPUTS: // asset: string , startTime & endTime unix time in Milli seconds, recvWindow(duration in milli seconds > 2000 to < 6000) -func (bi *Binanceus) GetAssetDistributionHistory(ctx context.Context, asset string, startTime, endTime uint64, recvWindow uint) (*AssetDistributionHistories, error) { +func (bi *Binanceus) GetAssetDistributionHistory(ctx context.Context, asset string, startTime, endTime int64, recvWindow uint64) (*AssetDistributionHistories, error) { params := url.Values{} timestamp := time.Now().UnixMilli() var resp AssetDistributionHistories - params.Set("timestamp", strconv.Itoa(int(timestamp))) - if startTime > 0 && time.UnixMilli(int64(startTime)).Before(time.Now()) { - params.Set("startTime", strconv.Itoa(int(startTime))) + params.Set("timestamp", strconv.FormatInt(timestamp, 10)) + if startTime > 0 && time.UnixMilli(startTime).Before(time.Now()) { + params.Set("startTime", strconv.FormatInt(startTime, 10)) } if startTime > 0 { - params.Set("endTime", strconv.Itoa(int(endTime))) + params.Set("endTime", strconv.FormatInt(endTime, 10)) } if recvWindow > 0 && recvWindow < 60000 { if recvWindow < 2000 { @@ -790,7 +790,7 @@ func (bi *Binanceus) GetAssetDistributionHistory(ctx context.Context, asset stri } else if recvWindow > 6000 { recvWindow = recvWindowSize5000 } - params.Set("recvWindow", strconv.Itoa(int(recvWindow))) + params.Set("recvWindow", strconv.FormatUint(recvWindow, 10)) } if asset != "" { @@ -825,7 +825,7 @@ func (bi *Binanceus) QuickDisableCryptoWithdrawal(ctx context.Context) error { } // GetUsersSpotAssetSnapshot retrieves a snapshot of list of assets in the account. -func (bi *Binanceus) GetUsersSpotAssetSnapshot(ctx context.Context, startTime, endTime time.Time, limit, offset uint) (*SpotAssetsSnapshotResponse, error) { +func (bi *Binanceus) GetUsersSpotAssetSnapshot(ctx context.Context, startTime, endTime time.Time, limit, offset uint64) (*SpotAssetsSnapshotResponse, error) { params := url.Values{} params.Set("type", "SPOT") params.Set("timestamp", strconv.FormatInt(time.Now().UnixMilli(), 10)) @@ -838,10 +838,10 @@ func (bi *Binanceus) GetUsersSpotAssetSnapshot(ctx context.Context, startTime, e } } if limit > 0 { - params.Set("limit", strconv.Itoa(int(limit))) + params.Set("limit", strconv.FormatUint(limit, 10)) } if offset > 0 { - params.Set("offset", strconv.Itoa(int(offset))) + params.Set("offset", strconv.FormatUint(offset, 10)) } var resp SpotAssetsSnapshotResponse return &resp, bi.SendAuthHTTPRequest(ctx, exchange.RestSpotSupplementary, @@ -850,7 +850,7 @@ func (bi *Binanceus) GetUsersSpotAssetSnapshot(ctx context.Context, startTime, e } // GetSubaccountInformation to fetch your sub-account list. -func (bi *Binanceus) GetSubaccountInformation(ctx context.Context, page, limit uint, status, email string) ([]SubAccount, error) { +func (bi *Binanceus) GetSubaccountInformation(ctx context.Context, page, limit uint64, status, email string) ([]SubAccount, error) { params := url.Values{} type response struct { Success bool `json:"success"` @@ -865,10 +865,10 @@ func (bi *Binanceus) GetSubaccountInformation(ctx context.Context, page, limit u params.Set("status", status) } if page != 0 { - params.Set("page", strconv.Itoa(int(page))) + params.Set("page", strconv.FormatUint(page, 10)) } if limit != 0 { - params.Set("limit", strconv.Itoa(int(limit))) + params.Set("limit", strconv.FormatUint(limit, 10)) } timestamp := time.Now().UnixMilli() params.Set("timestamp", strconv.FormatInt(timestamp, 10)) @@ -882,38 +882,34 @@ func (bi *Binanceus) GetSubaccountInformation(ctx context.Context, page, limit u } // GetSubaccountTransferHistory to fetch sub-account asset transfer history. -func (bi *Binanceus) GetSubaccountTransferHistory(ctx context.Context, - email string, - startTime uint64, - endTime uint64, - page, limit int) ([]TransferHistory, error) { - timestamp := time.Now().UnixMilli() - params := url.Values{} - type response struct { - Success bool `json:"success"` - Transfers []TransferHistory `json:"transfers"` - } - var resp response +func (bi *Binanceus) GetSubaccountTransferHistory(ctx context.Context, email string, startTime, endTime, page, limit int64) ([]TransferHistory, error) { if !common.MatchesEmailPattern(email) { return nil, errNotValidEmailAddress } + + params := url.Values{} params.Set("email", email) - params.Set("timestamp", strconv.Itoa(int(timestamp))) + params.Set("timestamp", strconv.FormatInt(time.Now().UnixMilli(), 10)) if page != 0 { - params.Set("page", strconv.Itoa(page)) + params.Set("page", strconv.FormatInt(page, 10)) } if limit != 0 { - params.Set("limit", strconv.Itoa(limit)) + params.Set("limit", strconv.FormatInt(limit, 10)) } - startTimeT := time.UnixMilli(int64(startTime)) - endTimeT := time.UnixMilli(int64(endTime)) + startTimeT := time.UnixMilli(startTime) + endTimeT := time.UnixMilli(endTime) hundredDayBefore := time.Now().Add(-time.Hour * 24 * 100).Truncate(time.Hour) if !(startTimeT.Before(hundredDayBefore)) || startTimeT.Before(time.Now()) { - params.Set("startTime", strconv.Itoa(int(startTime))) + params.Set("startTime", strconv.FormatInt(startTime, 10)) } if !(endTimeT.Before(hundredDayBefore)) || endTimeT.Before(time.Now()) { - params.Set("startTime", strconv.Itoa(int(endTime))) + params.Set("endTime", strconv.FormatInt(endTime, 10)) + } + + var resp struct { + Success bool `json:"success"` + Transfers []TransferHistory `json:"transfers"` } return resp.Transfers, bi.SendAuthHTTPRequest(ctx, exchange.RestSpotSupplementary, @@ -1054,7 +1050,7 @@ func (bi *Binanceus) newOrder(ctx context.Context, api string, o *NewOrderReques params.Set("price", strconv.FormatFloat(o.Price, 'f', -1, 64)) } if o.TimeInForce != "" { - params.Set("timeInForce", string(o.TimeInForce)) + params.Set("timeInForce", o.TimeInForce) } if o.NewClientOrderID != "" { params.Set("newClientOrderId", o.NewClientOrderID) @@ -1083,7 +1079,7 @@ func (bi *Binanceus) GetOrder(ctx context.Context, arg *OrderRequestParams) (*Or } params.Set("symbol", strings.ToUpper(arg.Symbol)) if arg.OrderID > 0 { - params.Set("orderId", strconv.Itoa(int(arg.OrderID))) + params.Set("orderId", strconv.FormatUint(arg.OrderID, 10)) } timestamp := time.Now().UnixMilli() params.Set("timestamp", strconv.Itoa(int(timestamp))) @@ -1173,16 +1169,16 @@ func (bi *Binanceus) GetTrades(ctx context.Context, arg *GetTradesParams) ([]Tra params.Set("symbol", arg.Symbol) params.Set("timestamp", strconv.Itoa(int(time.Now().UnixMilli()))) if arg.RecvWindow > 3000 { - params.Set("recvWindow", strconv.Itoa(int(arg.RecvWindow))) + params.Set("recvWindow", strconv.FormatUint(arg.RecvWindow, 10)) } if arg.StartTime != nil { - params.Set("startTime", strconv.Itoa(int(arg.StartTime.UnixMilli()))) + params.Set("startTime", strconv.FormatInt(arg.StartTime.UnixMilli(), 10)) } if arg.EndTime != nil { - params.Set("endTime", strconv.Itoa(int(arg.EndTime.UnixMilli()))) + params.Set("endTime", strconv.FormatInt(arg.EndTime.UnixMilli(), 10)) } if arg.FromID > 0 { - params.Set("fromId", strconv.Itoa(int(arg.FromID))) + params.Set("fromId", strconv.FormatUint(arg.FromID, 10)) } if arg.Limit > 0 && arg.Limit < 1000 { params.Set("limit", strconv.FormatUint(arg.Limit, 10)) @@ -1230,7 +1226,7 @@ func (bi *Binanceus) CreateNewOCOOrder(ctx context.Context, arg *OCOOrderInputPa params.Set("newOrderRespType", arg.NewOrderRespType) } if arg.RecvWindow > 200 { - params.Set("recvWindow", strconv.Itoa(int(arg.RecvWindow))) + params.Set("recvWindow", strconv.FormatUint(arg.RecvWindow, 10)) } else { params.Set("recvWindow", "6000") } @@ -1308,7 +1304,7 @@ func (bi *Binanceus) CancelOCOOrder(ctx context.Context, arg *OCOOrdersDeleteReq params.Set("timestamp", strconv.FormatInt(time.Now().UnixMilli(), 10)) switch { case arg.OrderListID > 0: - params.Set("orderListId", strconv.Itoa(int(arg.OrderListID))) + params.Set("orderListId", strconv.FormatUint(arg.OrderListID, 10)) case arg.ListClientOrderID != "": params.Set("listClientOrderId", arg.ListClientOrderID) default: diff --git a/exchanges/binanceus/binanceus_test.go b/exchanges/binanceus/binanceus_test.go index 6e97d64df3e..938933d5b89 100644 --- a/exchanges/binanceus/binanceus_test.go +++ b/exchanges/binanceus/binanceus_test.go @@ -781,7 +781,7 @@ func TestNewOrderTest(t *testing.T) { TradeType: BinanceRequestParamsOrderLimit, Price: 0.0025, Quantity: 100000, - TimeInForce: BinanceRequestParamsTimeGTC, + TimeInForce: order.GoodTillCancel.String(), } _, err := bi.NewOrderTest(context.Background(), req) if err != nil { @@ -809,7 +809,7 @@ func TestNewOrder(t *testing.T) { TradeType: BinanceRequestParamsOrderLimit, Price: 0.0025, Quantity: 100000, - TimeInForce: BinanceRequestParamsTimeGTC, + TimeInForce: order.GoodTillCancel.String(), } if _, err := bi.NewOrder(context.Background(), req); err != nil && !strings.Contains(err.Error(), "Account has insufficient balance for requested action") { t.Error("Binanceus NewOrder() error", err) diff --git a/exchanges/binanceus/binanceus_types.go b/exchanges/binanceus/binanceus_types.go index 07fb569a262..7c0e60f475c 100644 --- a/exchanges/binanceus/binanceus_types.go +++ b/exchanges/binanceus/binanceus_types.go @@ -192,7 +192,7 @@ type OrderBook struct { type KlinesRequestParams struct { Symbol currency.Pair // Required field; example LTCBTC, BTCUSDT Interval string // Time interval period - Limit int64 // Default 500; max 500. + Limit uint64 // Default 500; max 500. StartTime time.Time EndTime time.Time } @@ -404,26 +404,12 @@ type OrderRateLimit struct { // RequestParamsOrderType trade order type type RequestParamsOrderType string -// RequestParamsTimeForceType Time in force -type RequestParamsTimeForceType string - -var ( - // BinanceRequestParamsTimeGTC GTC - BinanceRequestParamsTimeGTC = RequestParamsTimeForceType("GTC") - - // BinanceRequestParamsTimeIOC IOC - BinanceRequestParamsTimeIOC = RequestParamsTimeForceType("IOC") - - // BinanceRequestParamsTimeFOK FOK - BinanceRequestParamsTimeFOK = RequestParamsTimeForceType("FOK") -) - // NewOrderRequest request type type NewOrderRequest struct { Symbol currency.Pair Side string TradeType RequestParamsOrderType - TimeInForce RequestParamsTimeForceType + TimeInForce string Quantity float64 QuoteOrderQty float64 Price float64 diff --git a/exchanges/binanceus/binanceus_wrapper.go b/exchanges/binanceus/binanceus_wrapper.go index 5092578abcd..aa4640096f8 100644 --- a/exchanges/binanceus/binanceus_wrapper.go +++ b/exchanges/binanceus/binanceus_wrapper.go @@ -326,7 +326,8 @@ func (bi *Binanceus) UpdateOrderbook(ctx context.Context, pair currency.Pair, as orderbookNew, err := bi.GetOrderBookDepth(ctx, &OrderBookDataRequestParams{ Symbol: pair, - Limit: 1000}) + Limit: 1000, + }) if err != nil { return book, err } @@ -450,7 +451,7 @@ func (bi *Binanceus) GetRecentTrades(ctx context.Context, p currency.Pair, asset } if bi.IsSaveTradeDataEnabled() { - err := trade.AddTradesToBuffer(bi.Name, resp...) + err := trade.AddTradesToBuffer(resp...) if err != nil { return nil, err } @@ -488,7 +489,7 @@ func (bi *Binanceus) GetHistoricTrades(ctx context.Context, p currency.Pair, ass // SubmitOrder submits a new order func (bi *Binanceus) SubmitOrder(ctx context.Context, s *order.Submit) (*order.SubmitResponse, error) { var submitOrderResponse order.SubmitResponse - var timeInForce RequestParamsTimeForceType + var timeInForce string var sideType string err := s.Validate(bi.GetTradingRequirements()) if err != nil { @@ -507,7 +508,7 @@ func (bi *Binanceus) SubmitOrder(ctx context.Context, s *order.Submit) (*order.S case order.Market: requestParamOrderType = BinanceRequestParamsOrderMarket case order.Limit: - timeInForce = BinanceRequestParamsTimeGTC + timeInForce = order.GoodTillCancel.String() requestParamOrderType = BinanceRequestParamsOrderLimit default: return nil, fmt.Errorf("%w %v", order.ErrUnsupportedOrderType, s.Type) @@ -617,7 +618,7 @@ func (bi *Binanceus) GetOrderInfo(ctx context.Context, orderID string, pair curr return nil, err } - orderIDInt, err := strconv.ParseInt(orderID, 10, 64) + orderIDInt, err := strconv.ParseUint(orderID, 10, 64) if err != nil { return nil, fmt.Errorf("invalid orderID %w", err) } @@ -631,7 +632,7 @@ func (bi *Binanceus) GetOrderInfo(ctx context.Context, orderID string, pair curr var orderType order.Type resp, err := bi.GetOrder(ctx, &OrderRequestParams{ Symbol: symbolValue, - OrderID: uint64(orderIDInt), + OrderID: orderIDInt, }) if err != nil { return nil, err @@ -652,7 +653,7 @@ func (bi *Binanceus) GetOrderInfo(ctx context.Context, orderID string, pair curr return &order.Detail{ Amount: resp.OrigQty, Exchange: bi.Name, - OrderID: strconv.FormatInt(int64(resp.OrderID), 10), + OrderID: strconv.FormatUint(resp.OrderID, 10), ClientOrderID: resp.ClientOrderID, Side: orderSide, Type: orderType, @@ -763,7 +764,7 @@ func (bi *Binanceus) GetActiveOrders(ctx context.Context, getOrdersRequest *orde Amount: resp[x].OrigQty, Date: resp[x].Time, Exchange: bi.Name, - OrderID: strconv.FormatInt(int64(resp[x].OrderID), 10), + OrderID: strconv.FormatUint(resp[x].OrderID, 10), ClientOrderID: resp[x].ClientOrderID, Side: orderSide, Type: orderType, diff --git a/exchanges/binanceus/type_convert.go b/exchanges/binanceus/type_convert.go index f75d12395f7..aaa45c0f793 100644 --- a/exchanges/binanceus/type_convert.go +++ b/exchanges/binanceus/type_convert.go @@ -159,7 +159,7 @@ func (a *NewOrderResponse) UnmarshalJSON(data []byte) error { func (a *TransferHistory) UnmarshalJSON(data []byte) error { type Alias TransferHistory aux := &struct { - TimeStamp uint64 `json:"time"` + TimeStamp int64 `json:"time"` *Alias }{ Alias: (*Alias)(a), @@ -167,8 +167,8 @@ func (a *TransferHistory) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, aux); err != nil { return err } - if aux.TimeStamp == 0 { - a.TimeStamp = time.UnixMilli(int64(aux.TimeStamp)) + if aux.TimeStamp > 0 { + a.TimeStamp = time.UnixMilli(aux.TimeStamp) } return nil } @@ -177,7 +177,7 @@ func (a *TransferHistory) UnmarshalJSON(data []byte) error { func (a *ExchangeInfo) UnmarshalJSON(data []byte) error { type Alias ExchangeInfo chil := &struct { - Servertime uint64 `json:"serverTime"` + Servertime int64 `json:"serverTime"` *Alias }{ Alias: (*Alias)(a), @@ -186,7 +186,7 @@ func (a *ExchangeInfo) UnmarshalJSON(data []byte) error { return er } if chil.Servertime > 0 { - a.ServerTime = time.UnixMilli(int64(chil.Servertime)) + a.ServerTime = time.UnixMilli(chil.Servertime) } return nil } diff --git a/exchanges/bitfinex/bitfinex.go b/exchanges/bitfinex/bitfinex.go index 2c3fae2327e..e9b11a0b5c5 100644 --- a/exchanges/bitfinex/bitfinex.go +++ b/exchanges/bitfinex/bitfinex.go @@ -994,7 +994,7 @@ func (b *Bitfinex) GetLends(ctx context.Context, symbol string, values url.Value // GetCandles returns candle chart data // timeFrame values: '1m', '5m', '15m', '30m', '1h', '3h', '6h', '12h', '1D', '1W', '14D', '1M' // section values: last or hist -func (b *Bitfinex) GetCandles(ctx context.Context, symbol, timeFrame string, start, end int64, limit uint32, historic bool) ([]Candle, error) { +func (b *Bitfinex) GetCandles(ctx context.Context, symbol, timeFrame string, start, end int64, limit uint64, historic bool) ([]Candle, error) { var fundingPeriod string if symbol[0] == 'f' { fundingPeriod = ":p30" @@ -1019,7 +1019,7 @@ func (b *Bitfinex) GetCandles(ctx context.Context, symbol, timeFrame string, sta } if limit > 0 { - v.Set("limit", strconv.FormatInt(int64(limit), 10)) + v.Set("limit", strconv.FormatUint(limit, 10)) } path += "/hist" diff --git a/exchanges/bitfinex/bitfinex_test.go b/exchanges/bitfinex/bitfinex_test.go index 1340b7cbae9..81b6db8236c 100644 --- a/exchanges/bitfinex/bitfinex_test.go +++ b/exchanges/bitfinex/bitfinex_test.go @@ -1998,7 +1998,7 @@ func TestGetErrResp(t *testing.T) { seen++ switch seen { case 1: // no event - assert.ErrorIs(t, testErr, errParsingWSField, "Message with no event Should get correct error type") + assert.ErrorIs(t, testErr, common.ErrParsingWSField, "Message with no event should get correct error type") assert.ErrorContains(t, testErr, "'event'", "Message with no event error should contain missing field name") assert.ErrorContains(t, testErr, "nightjar", "Message with no event error should contain the message") case 2: // with {} for event diff --git a/exchanges/bitfinex/bitfinex_websocket.go b/exchanges/bitfinex/bitfinex_websocket.go index d5adeed6257..020db54d126 100644 --- a/exchanges/bitfinex/bitfinex_websocket.go +++ b/exchanges/bitfinex/bitfinex_websocket.go @@ -34,10 +34,6 @@ import ( "github.com/thrasher-corp/gocryptotrader/log" ) -var ( - errParsingWSField = errors.New("error parsing WS field") -) - const ( authenticatedBitfinexWebsocketEndpoint = "wss://api.bitfinex.com/ws/2" publicBitfinexWebsocketEndpoint = "wss://api-pub.bitfinex.com/ws/2" @@ -107,13 +103,15 @@ var defaultSubscriptions = subscription.List{ var comms = make(chan stream.Response) type checksum struct { - Token int + Token uint32 Sequence int64 } // checksumStore quick global for now -var checksumStore = make(map[int]*checksum) -var cMtx sync.Mutex +var ( + checksumStore = make(map[int]*checksum) + cMtx sync.Mutex +) var subscriptionNames = map[string]string{ subscription.TickerChannel: wsTickerChannel, @@ -508,7 +506,7 @@ func (b *Bitfinex) wsHandleData(respRaw []byte) error { func (b *Bitfinex) handleWSEvent(respRaw []byte) error { event, err := jsonparser.GetUnsafeString(respRaw, "event") if err != nil { - return fmt.Errorf("%w 'event': %w from message: %s", errParsingWSField, err, respRaw) + return fmt.Errorf("%w 'event': %w from message: %s", common.ErrParsingWSField, err, respRaw) } switch event { case wsEventSubscribed: @@ -516,7 +514,7 @@ func (b *Bitfinex) handleWSEvent(respRaw []byte) error { case wsEventUnsubscribed: chanID, err := jsonparser.GetUnsafeString(respRaw, "chanId") if err != nil { - return fmt.Errorf("%w 'chanId': %w from message: %s", errParsingWSField, err, respRaw) + return fmt.Errorf("%w 'chanId': %w from message: %s", common.ErrParsingWSField, err, respRaw) } err = b.Websocket.Match.RequireMatchWithData("unsubscribe:"+chanID, respRaw) if err != nil { @@ -539,7 +537,7 @@ func (b *Bitfinex) handleWSEvent(respRaw []byte) error { case wsEventAuth: status, err := jsonparser.GetUnsafeString(respRaw, "status") if err != nil { - return fmt.Errorf("%w 'status': %w from message: %s", errParsingWSField, err, respRaw) + return fmt.Errorf("%w 'status': %w from message: %s", common.ErrParsingWSField, err, respRaw) } if status == "OK" { var glob map[string]interface{} @@ -551,7 +549,7 @@ func (b *Bitfinex) handleWSEvent(respRaw []byte) error { } else { errCode, err := jsonparser.GetInt(respRaw, "code") if err != nil { - log.Errorf(log.ExchangeSys, "%s %s 'code': %s from message: %s", b.Name, errParsingWSField, err, respRaw) + log.Errorf(log.ExchangeSys, "%s %s 'code': %s from message: %s", b.Name, common.ErrParsingWSField, err, respRaw) } return fmt.Errorf("WS auth subscription error; Status: %s Error Code: %d", status, errCode) } @@ -561,7 +559,7 @@ func (b *Bitfinex) handleWSEvent(respRaw []byte) error { case wsEventConf: status, err := jsonparser.GetUnsafeString(respRaw, "status") if err != nil { - return fmt.Errorf("%w 'status': %w from message: %s", errParsingWSField, err, respRaw) + return fmt.Errorf("%w 'status': %w from message: %s", common.ErrParsingWSField, err, respRaw) } if status != "OK" { return fmt.Errorf("WS configure channel error; Status: %s", status) @@ -578,7 +576,7 @@ func (b *Bitfinex) handleWSEvent(respRaw []byte) error { func (b *Bitfinex) handleWSSubscribed(respRaw []byte) error { subID, err := jsonparser.GetUnsafeString(respRaw, "subId") if err != nil { - return fmt.Errorf("%w 'subId': %w from message: %s", errParsingWSField, err, respRaw) + return fmt.Errorf("%w 'subId': %w from message: %s", common.ErrParsingWSField, err, respRaw) } c := b.Websocket.GetSubscription(subID) @@ -588,7 +586,7 @@ func (b *Bitfinex) handleWSSubscribed(respRaw []byte) error { chanID, err := jsonparser.GetInt(respRaw, "chanId") if err != nil { - return fmt.Errorf("%w: %w 'chanId': %w; Channel: %s Pair: %s", stream.ErrSubscriptionFailure, errParsingWSField, err, c.Channel, c.Pairs) + return fmt.Errorf("%w: %w 'chanId': %w; Channel: %s Pair: %s", stream.ErrSubscriptionFailure, common.ErrParsingWSField, err, c.Channel, c.Pairs) } // Note: chanID's int type avoids conflicts with the string type subID key because of the type difference @@ -642,11 +640,11 @@ func (b *Bitfinex) handleWSChecksum(c *subscription.Subscription, d []interface{ if c == nil { return fmt.Errorf("%w: Subscription param", common.ErrNilPointer) } - var token int + var token uint32 if f, ok := d[2].(float64); !ok { return common.GetTypeAssertError("float64", d[2], "checksum") } else { //nolint:revive // using lexical variable requires else statement - token = int(f) + token = uint32(f) } if len(d) < 4 { return errNoSeqNo @@ -724,12 +722,14 @@ func (b *Bitfinex) handleWSBookUpdate(c *subscription.Subscription, d []interfac ID: int64(id), Period: int64(pricePeriod), Price: rateAmount, - Amount: amount}) + Amount: amount, + }) } else { newOrderbook = append(newOrderbook, WebsocketBook{ ID: int64(id), Price: pricePeriod, - Amount: rateAmount}) + Amount: rateAmount, + }) } } if err := b.WsInsertSnapshot(c.Pairs[0], c.Asset, newOrderbook, fundingRate); err != nil { @@ -756,12 +756,14 @@ func (b *Bitfinex) handleWSBookUpdate(c *subscription.Subscription, d []interfac ID: int64(id), Period: int64(pricePeriod), Price: amountRate, - Amount: amount}) + Amount: amount, + }) } else { newOrderbook = append(newOrderbook, WebsocketBook{ ID: int64(id), Price: pricePeriod, - Amount: amountRate}) + Amount: amountRate, + }) } if err := b.WsUpdateOrderbook(c, c.Pairs[0], c.Asset, newOrderbook, int64(sequenceNo), fundingRate); err != nil { @@ -945,22 +947,22 @@ func (b *Bitfinex) handleWSAllTrades(s *subscription.Subscription, respRaw []byt } v, valueType, _, err := jsonparser.Get(respRaw, "[1]") if err != nil { - return fmt.Errorf("%w `tradesUpdate[1]`: %w", errParsingWSField, err) + return fmt.Errorf("%w `tradesUpdate[1]`: %w", common.ErrParsingWSField, err) } var wsTrades []*wsTrade switch valueType { case jsonparser.String: - if t, err := b.handleWSPublicTradeUpdate(respRaw); err != nil { - return fmt.Errorf("%w `tradesUpdate[2]`: %w", errParsingWSField, err) - } else { - wsTrades = []*wsTrade{t} + t, err := b.handleWSPublicTradeUpdate(respRaw) + if err != nil { + return fmt.Errorf("%w `tradesUpdate[2]`: %w", common.ErrParsingWSField, err) } + wsTrades = []*wsTrade{t} case jsonparser.Array: if wsTrades, err = b.handleWSPublicTradesSnapshot(v); err != nil { - return fmt.Errorf("%w `tradesSnapshot`: %w", errParsingWSField, err) + return fmt.Errorf("%w `tradesSnapshot`: %w", common.ErrParsingWSField, err) } default: - return fmt.Errorf("%w `tradesUpdate[1]`: %w `%s`", errParsingWSField, jsonparser.UnknownValueTypeError, valueType) + return fmt.Errorf("%w `tradesUpdate[1]`: %w `%s`", common.ErrParsingWSField, jsonparser.UnknownValueTypeError, valueType) } trades := make([]trade.Data, len(wsTrades)) for _, w := range wsTrades { @@ -986,7 +988,7 @@ func (b *Bitfinex) handleWSAllTrades(s *subscription.Subscription, respRaw []byt } } if b.IsSaveTradeDataEnabled() { - err = trade.AddTradesToBuffer(b.GetName(), trades...) + err = trade.AddTradesToBuffer(trades...) } return err } @@ -1814,19 +1816,19 @@ func (b *Bitfinex) unsubscribeFromChan(subs subscription.List) error { func (b *Bitfinex) getErrResp(resp []byte) error { event, err := jsonparser.GetUnsafeString(resp, "event") if err != nil { - return fmt.Errorf("%w 'event': %w from message: %s", errParsingWSField, err, resp) + return fmt.Errorf("%w 'event': %w from message: %s", common.ErrParsingWSField, err, resp) } if event != "error" { return nil } errCode, err := jsonparser.GetInt(resp, "code") if err != nil { - log.Errorf(log.ExchangeSys, "%s %s 'code': %s from message: %s", b.Name, errParsingWSField, err, resp) + log.Errorf(log.ExchangeSys, "%s %s 'code': %s from message: %s", b.Name, common.ErrParsingWSField, err, resp) } var apiErr error if msg, e2 := jsonparser.GetString(resp, "msg"); e2 != nil { - log.Errorf(log.ExchangeSys, "%s %s 'msg': %s from message: %s", b.Name, errParsingWSField, e2, resp) + log.Errorf(log.ExchangeSys, "%s %s 'msg': %s from message: %s", b.Name, common.ErrParsingWSField, e2, resp) apiErr = common.ErrUnknownError } else { apiErr = errors.New(msg) @@ -2080,7 +2082,7 @@ func makeRequestInterface(channelName string, data interface{}) []interface{} { return []interface{}{0, channelName, nil, data} } -func validateCRC32(book *orderbook.Base, token int) error { +func validateCRC32(book *orderbook.Base, token uint32) error { // Order ID's need to be sub-sorted in ascending order, this needs to be // done on the main book to ensure that we do not cut price levels out below reOrderByID(book.Bids) @@ -2128,14 +2130,14 @@ func validateCRC32(book *orderbook.Base, token int) error { checksumStr := strings.TrimSuffix(check.String(), ":") checksum := crc32.ChecksumIEEE([]byte(checksumStr)) - if checksum == uint32(token) { + if checksum == token { return nil } return fmt.Errorf("invalid checksum for %s %s: calculated [%d] does not match [%d]", book.Asset, book.Pair, checksum, - uint32(token)) + token) } // reOrderByID sub sorts orderbook items by its corresponding ID when price @@ -2191,11 +2193,11 @@ func subToMap(s *subscription.Subscription, a asset.Item, p currency.Pair) map[s for k, v := range s.Params { switch k { case CandlesPeriodKey: - if s, ok := v.(string); !ok { + s, ok := v.(string) + if !ok { panic(common.GetTypeAssertError("string", v, "subscription.CandlesPeriodKey")) - } else { - fundingPeriod = ":" + s } + fundingPeriod = ":" + s case "key", "symbol", "len": panic(fmt.Errorf("%w: %s", errParamNotAllowed, k)) // Ensure user's Params aren't silently overwritten default: diff --git a/exchanges/bitfinex/bitfinex_wrapper.go b/exchanges/bitfinex/bitfinex_wrapper.go index ba9be4c306c..9bf392a9ed6 100644 --- a/exchanges/bitfinex/bitfinex_wrapper.go +++ b/exchanges/bitfinex/bitfinex_wrapper.go @@ -1077,7 +1077,7 @@ func (b *Bitfinex) GetHistoricCandles(ctx context.Context, pair currency.Pair, a if err != nil { return nil, err } - candles, err := b.GetCandles(ctx, cf, fInterval, req.Start.UnixMilli(), req.End.UnixMilli(), uint32(req.RequestLimit), true) + candles, err := b.GetCandles(ctx, cf, fInterval, req.Start.UnixMilli(), req.End.UnixMilli(), req.RequestLimit, true) if err != nil { return nil, err } @@ -1114,7 +1114,7 @@ func (b *Bitfinex) GetHistoricCandlesExtended(ctx context.Context, pair currency timeSeries := make([]kline.Candle, 0, req.Size()) for x := range req.RangeHolder.Ranges { var candles []Candle - candles, err = b.GetCandles(ctx, cf, fInterval, req.RangeHolder.Ranges[x].Start.Time.UnixMilli(), req.RangeHolder.Ranges[x].End.Time.UnixMilli(), uint32(req.RequestLimit), true) + candles, err = b.GetCandles(ctx, cf, fInterval, req.RangeHolder.Ranges[x].Start.Time.UnixMilli(), req.RangeHolder.Ranges[x].End.Time.UnixMilli(), req.RequestLimit, true) if err != nil { return nil, err } diff --git a/exchanges/bithumb/bithumb.go b/exchanges/bithumb/bithumb.go index 89bc187211b..614d895d95b 100644 --- a/exchanges/bithumb/bithumb.go +++ b/exchanges/bithumb/bithumb.go @@ -8,7 +8,6 @@ import ( "math" "net/http" "net/url" - "reflect" "strconv" "strings" "time" @@ -227,22 +226,26 @@ func (b *Bithumb) GetAccountBalance(ctx context.Context, c string) (FullBalance, } // Added due to increasing of the usable currencies on exchange, usually - // without notificatation, so we dont need to update structs later on + // without notification, so we dont need to update structs later on for tag, datum := range response.Data { splitTag := strings.Split(tag, "_") + if len(splitTag) < 2 { + return fullBalance, fmt.Errorf("unhandled tag format: %q", splitTag) + } + c := splitTag[len(splitTag)-1] + var val float64 - if reflect.TypeOf(datum).String() != "float64" { - val, err = strconv.ParseFloat(datum.(string), 64) + switch v := datum.(type) { + case float64: + val = v + case string: + val, err = strconv.ParseFloat(v, 64) if err != nil { return fullBalance, err } - } else { - var ok bool - val, ok = datum.(float64) - if !ok { - return fullBalance, common.GetTypeAssertError("float64", datum) - } + default: + return fullBalance, common.GetTypeAssertError("float64|string", datum) } switch splitTag[0] { diff --git a/exchanges/bitmex/bitmex_parameters.go b/exchanges/bitmex/bitmex_parameters.go index 3f945231cc1..004f01acf42 100644 --- a/exchanges/bitmex/bitmex_parameters.go +++ b/exchanges/bitmex/bitmex_parameters.go @@ -822,7 +822,7 @@ type TradeGetBucketedParams struct { Reverse bool `json:"reverse,omitempty"` // Start - Starting point for results. - Start int32 `json:"start,omitempty"` + Start int64 `json:"start,omitempty"` // StartTime - Starting date filter for results. StartTime string `json:"startTime,omitempty"` diff --git a/exchanges/bitmex/bitmex_test.go b/exchanges/bitmex/bitmex_test.go index a2c49edf4ce..af55b477a58 100644 --- a/exchanges/bitmex/bitmex_test.go +++ b/exchanges/bitmex/bitmex_test.go @@ -383,7 +383,7 @@ func TestGetPreviousTrades(t *testing.T) { _, err := b.GetPreviousTrades(context.Background(), &TradeGetBucketedParams{ Symbol: "XBTBTC", - Start: int32(time.Now().Add(-time.Hour).Unix()), + Start: time.Now().Add(-time.Hour).Unix(), Columns: "open,high,low,close,volume", }) require.Error(t, err) diff --git a/exchanges/bitstamp/bitstamp_websocket.go b/exchanges/bitstamp/bitstamp_websocket.go index c833996344c..e79cd142293 100644 --- a/exchanges/bitstamp/bitstamp_websocket.go +++ b/exchanges/bitstamp/bitstamp_websocket.go @@ -33,7 +33,6 @@ const ( ) var ( - errParsingWSField = errors.New("error parsing WS field") errParsingWSPair = errors.New("unable to parse currency pair from wsResponse.Channel") errChannelHyphens = errors.New("channel name does not contain exactly 0 or 2 hyphens") errChannelUnderscores = errors.New("channel name does not contain exactly 2 underscores") @@ -102,7 +101,7 @@ func (b *Bitstamp) wsReadData() { func (b *Bitstamp) wsHandleData(respRaw []byte) error { event, err := jsonparser.GetUnsafeString(respRaw, "event") if err != nil { - return fmt.Errorf("%w `event`: %w", errParsingWSField, err) + return fmt.Errorf("%w `event`: %w", common.ErrParsingWSField, err) } event = strings.TrimPrefix(event, "bts:") @@ -132,7 +131,7 @@ func (b *Bitstamp) wsHandleData(respRaw []byte) error { func (b *Bitstamp) handleWSSubscription(event string, respRaw []byte) error { channel, err := jsonparser.GetUnsafeString(respRaw, "channel") if err != nil { - return fmt.Errorf("%w `channel`: %w", errParsingWSField, err) + return fmt.Errorf("%w `channel`: %w", common.ErrParsingWSField, err) } event = strings.TrimSuffix(event, "scription_succeeded") return b.Websocket.Match.RequireMatchWithData(event+":"+channel, respRaw) @@ -157,7 +156,7 @@ func (b *Bitstamp) handleWSTrade(msg []byte) error { if wsTradeTemp.Data.Type == 1 { side = order.Sell } - return trade.AddTradesToBuffer(b.Name, trade.Data{ + return trade.AddTradesToBuffer(trade.Data{ Timestamp: time.Unix(wsTradeTemp.Data.Timestamp, 0), CurrencyPair: p, AssetType: asset.Spot, @@ -402,7 +401,7 @@ func (b *Bitstamp) FetchWSAuth(ctx context.Context) (*WebsocketAuthResponse, err func (b *Bitstamp) parseChannelName(respRaw []byte) (string, currency.Pair, error) { channel, err := jsonparser.GetUnsafeString(respRaw, "channel") if err != nil { - return "", currency.EMPTYPAIR, fmt.Errorf("%w `channel`: %w", errParsingWSField, err) + return "", currency.EMPTYPAIR, fmt.Errorf("%w `channel`: %w", common.ErrParsingWSField, err) } authParts := strings.Split(channel, "-") diff --git a/exchanges/bitstamp/bitstamp_wrapper.go b/exchanges/bitstamp/bitstamp_wrapper.go index 1d6c6588dfe..2e920b129d6 100644 --- a/exchanges/bitstamp/bitstamp_wrapper.go +++ b/exchanges/bitstamp/bitstamp_wrapper.go @@ -811,7 +811,7 @@ func (b *Bitstamp) GetHistoricCandles(ctx context.Context, pair currency.Pair, a req.Start, req.End, b.FormatExchangeKlineInterval(req.ExchangeInterval), - strconv.FormatInt(req.RequestLimit, 10)) + strconv.FormatUint(req.RequestLimit, 10)) if err != nil { return nil, err } @@ -849,7 +849,7 @@ func (b *Bitstamp) GetHistoricCandlesExtended(ctx context.Context, pair currency req.RangeHolder.Ranges[x].Start.Time, req.RangeHolder.Ranges[x].End.Time, b.FormatExchangeKlineInterval(req.ExchangeInterval), - strconv.FormatInt(req.RequestLimit, 10), + strconv.FormatUint(req.RequestLimit, 10), ) if err != nil { return nil, err diff --git a/exchanges/btcmarkets/btcmarkets.go b/exchanges/btcmarkets/btcmarkets.go index 9f0e466a180..a1da60d4bd1 100644 --- a/exchanges/btcmarkets/btcmarkets.go +++ b/exchanges/btcmarkets/btcmarkets.go @@ -78,10 +78,6 @@ const ( askSide = "Ask" bidSide = "Bid" - // time in force - immediateOrCancel = "IOC" - fillOrKill = "FOK" - subscribe = "subscribe" fundChange = "fundChange" orderChange = "orderChange" @@ -377,11 +373,8 @@ func (b *BTCMarkets) formatOrderSide(o order.Side) (string, error) { // getTimeInForce returns a string depending on the options in order.Submit func (b *BTCMarkets) getTimeInForce(s *order.Submit) string { - if s.ImmediateOrCancel { - return immediateOrCancel - } - if s.FillOrKill { - return fillOrKill + if s.TimeInForce.Is(order.ImmediateOrCancel) || s.TimeInForce.Is(order.FillOrKill) { + return s.TimeInForce.String() } return "" // GTC (good till cancelled, default value) } diff --git a/exchanges/btcmarkets/btcmarkets_test.go b/exchanges/btcmarkets/btcmarkets_test.go index 59734a777bc..f93d188fddf 100644 --- a/exchanges/btcmarkets/btcmarkets_test.go +++ b/exchanges/btcmarkets/btcmarkets_test.go @@ -195,27 +195,27 @@ func TestGetTradeByID(t *testing.T) { func TestSubmitOrder(t *testing.T) { t.Parallel() _, err := b.SubmitOrder(context.Background(), &order.Submit{ - Exchange: b.Name, - Price: 100, - Amount: 1, - Type: order.TrailingStop, - AssetType: asset.Spot, - Side: order.Bid, - Pair: currency.NewPair(currency.BTC, currency.AUD), - PostOnly: true, + Exchange: b.Name, + Price: 100, + Amount: 1, + Type: order.TrailingStop, + AssetType: asset.Spot, + Side: order.Bid, + Pair: currency.NewPair(currency.BTC, currency.AUD), + TimeInForce: order.PostOnly, }) if !errors.Is(err, order.ErrTypeIsInvalid) { t.Fatalf("received: '%v' but expected: '%v'", err, order.ErrTypeIsInvalid) } _, err = b.SubmitOrder(context.Background(), &order.Submit{ - Exchange: b.Name, - Price: 100, - Amount: 1, - Type: order.Limit, - AssetType: asset.Spot, - Side: order.AnySide, - Pair: currency.NewPair(currency.BTC, currency.AUD), - PostOnly: true, + Exchange: b.Name, + Price: 100, + Amount: 1, + Type: order.Limit, + AssetType: asset.Spot, + Side: order.AnySide, + Pair: currency.NewPair(currency.BTC, currency.AUD), + TimeInForce: order.PostOnly, }) if !errors.Is(err, order.ErrSideIsInvalid) { t.Fatalf("received: '%v' but expected: '%v'", err, order.ErrSideIsInvalid) @@ -224,14 +224,14 @@ func TestSubmitOrder(t *testing.T) { sharedtestvalues.SkipTestIfCredentialsUnset(t, b, canManipulateRealOrders) _, err = b.SubmitOrder(context.Background(), &order.Submit{ - Exchange: b.Name, - Price: 100, - Amount: 1, - Type: order.Limit, - AssetType: asset.Spot, - Side: order.Bid, - Pair: currency.NewPair(currency.BTC, currency.AUD), - PostOnly: true, + Exchange: b.Name, + Price: 100, + Amount: 1, + Type: order.Limit, + AssetType: asset.Spot, + Side: order.Bid, + Pair: currency.NewPair(currency.BTC, currency.AUD), + TimeInForce: order.PostOnly, }) if err != nil { t.Error(err) @@ -966,14 +966,14 @@ func TestGetTimeInForce(t *testing.T) { t.Fatal("unexpected value") } - f = b.getTimeInForce(&order.Submit{ImmediateOrCancel: true}) - if f != immediateOrCancel { - t.Fatalf("received: '%v' but expected: '%v'", f, immediateOrCancel) + f = b.getTimeInForce(&order.Submit{TimeInForce: order.ImmediateOrCancel}) + if f != "IOC" { + t.Fatalf("received: '%v' but expected: '%v'", f, "IOC") } - f = b.getTimeInForce(&order.Submit{FillOrKill: true}) - if f != fillOrKill { - t.Fatalf("received: '%v' but expected: '%v'", f, fillOrKill) + f = b.getTimeInForce(&order.Submit{TimeInForce: order.FillOrKill}) + if f != "FOK" { + t.Fatalf("received: '%v' but expected: '%v'", f, "FOK") } } diff --git a/exchanges/btcmarkets/btcmarkets_websocket.go b/exchanges/btcmarkets/btcmarkets_websocket.go index ee615b99c92..9a2cafa8a79 100644 --- a/exchanges/btcmarkets/btcmarkets_websocket.go +++ b/exchanges/btcmarkets/btcmarkets_websocket.go @@ -204,7 +204,7 @@ func (b *BTCMarkets) wsHandleData(respRaw []byte) error { side = order.Sell } - return trade.AddTradesToBuffer(b.Name, trade.Data{ + return trade.AddTradesToBuffer(trade.Data{ Timestamp: t.Timestamp, CurrencyPair: p, AssetType: asset.Spot, @@ -254,7 +254,7 @@ func (b *BTCMarkets) wsHandleData(respRaw []byte) error { originalAmount := orderData.OpenVolume var price float64 var trades []order.TradeHistory - var orderID = strconv.FormatInt(orderData.OrderID, 10) + orderID := strconv.FormatInt(orderData.OrderID, 10) for x := range orderData.Trades { var isMaker bool if orderData.Trades[x].LiquidityType == "Maker" { diff --git a/exchanges/btcmarkets/btcmarkets_wrapper.go b/exchanges/btcmarkets/btcmarkets_wrapper.go index 57ddfa7c0da..a34303f61a9 100644 --- a/exchanges/btcmarkets/btcmarkets_wrapper.go +++ b/exchanges/btcmarkets/btcmarkets_wrapper.go @@ -465,7 +465,7 @@ func (b *BTCMarkets) SubmitOrder(ctx context.Context, s *order.Submit) (*order.S b.getTimeInForce(s), "", s.ClientID, - s.PostOnly) + s.TimeInForce.Is(order.PostOnly)) if err != nil { return nil, err } @@ -635,7 +635,7 @@ func (b *BTCMarkets) GetOrderInfo(ctx context.Context, orderID string, _ currenc case stop: resp.Type = order.Stop case takeProfit: - resp.Type = order.ImmediateOrCancel + resp.Type = order.TakeProfit default: resp.Type = order.UnknownType } diff --git a/exchanges/btse/btse_websocket.go b/exchanges/btse/btse_websocket.go index e372efe661f..df7007d40e3 100644 --- a/exchanges/btse/btse_websocket.go +++ b/exchanges/btse/btse_websocket.go @@ -280,7 +280,7 @@ func (b *BTSE) wsHandleData(respRaw []byte) error { TID: strconv.FormatInt(tradeHistory.Data[x].ID, 10), }) } - return trade.AddTradesToBuffer(b.Name, trades...) + return trade.AddTradesToBuffer(trades...) case strings.Contains(topic, "orderBookL2Api"): // TODO: Fix orderbook updates. var t wsOrderBook err = json.Unmarshal(respRaw, &t) diff --git a/exchanges/bybit/bybit.go b/exchanges/bybit/bybit.go index 708a34da3ab..a0157867aed 100644 --- a/exchanges/bybit/bybit.go +++ b/exchanges/bybit/bybit.go @@ -119,7 +119,7 @@ func (by *Bybit) GetBybitServerTime(ctx context.Context) (*ServerTime, error) { } // GetKlines query for historical klines (also known as candles/candlesticks). Charts are returned in groups based on the requested interval. -func (by *Bybit) GetKlines(ctx context.Context, category, symbol string, interval kline.Interval, startTime, endTime time.Time, limit int64) ([]KlineItem, error) { +func (by *Bybit) GetKlines(ctx context.Context, category, symbol string, interval kline.Interval, startTime, endTime time.Time, limit uint64) ([]KlineItem, error) { switch category { case "": return nil, errCategoryNotSet @@ -145,7 +145,7 @@ func (by *Bybit) GetKlines(ctx context.Context, category, symbol string, interva params.Set("end", strconv.FormatInt(endTime.UnixMilli(), 10)) } if limit > 0 { - params.Set("limit", strconv.FormatInt(limit, 10)) + params.Set("limit", strconv.FormatUint(limit, 10)) } var resp KlineResponse err = by.SendHTTPRequest(ctx, exchange.RestSpot, common.EncodeURLValues("market/kline", params), defaultEPL, &resp) diff --git a/exchanges/bybit/bybit_test.go b/exchanges/bybit/bybit_test.go index caeea790dc5..72f6698cf5a 100644 --- a/exchanges/bybit/bybit_test.go +++ b/exchanges/bybit/bybit_test.go @@ -292,7 +292,6 @@ func TestModifyOrder(t *testing.T) { Side: order.Buy, AssetType: asset.Options, Pair: spotTradablePair, - PostOnly: true, Price: 1234, Amount: 0.15, TriggerPrice: 1145, @@ -3736,6 +3735,11 @@ func TestGenerateSubscriptions(t *testing.T) { } else { s.Pairs = pairs s.QualifiedChannel = channelName(s) + categoryName := getCategoryName(a) + if isCategorisedChannel(s.QualifiedChannel) && categoryName != "" { + s.QualifiedChannel += "." + categoryName + } + exp = append(exp, s) } } diff --git a/exchanges/bybit/bybit_types.go b/exchanges/bybit/bybit_types.go index eaae9e016df..f06c410e297 100644 --- a/exchanges/bybit/bybit_types.go +++ b/exchanges/bybit/bybit_types.go @@ -1303,7 +1303,7 @@ type SubUIDAPIResponse struct { ExpiredAt time.Time `json:"expiredAt"` CreatedAt time.Time `json:"createdAt"` IsMarginUnified int64 `json:"unified"` // Whether the account to which the account upgrade to unified margin account. - IsUnifiedTradeAccount int64 `json:"uta"` // Whether the account to which the account upgrade to unified trade account. + IsUnifiedTradeAccount uint8 `json:"uta"` // Whether the account to which the account upgrade to unified trade account. UserID int64 `json:"userID"` InviterID int64 `json:"inviterID"` VipLevel string `json:"vipLevel"` diff --git a/exchanges/bybit/bybit_websocket.go b/exchanges/bybit/bybit_websocket.go index 59803308158..fbe781d4002 100644 --- a/exchanges/bybit/bybit_websocket.go +++ b/exchanges/bybit/bybit_websocket.go @@ -65,7 +65,6 @@ var defaultSubscriptions = subscription.List{ {Enabled: true, Asset: asset.Spot, Authenticated: true, Channel: subscription.MyOrdersChannel}, {Enabled: true, Asset: asset.Spot, Authenticated: true, Channel: subscription.MyWalletChannel}, {Enabled: true, Asset: asset.Spot, Authenticated: true, Channel: subscription.MyTradesChannel}, - {Enabled: true, Asset: asset.Spot, Authenticated: true, Channel: chanPositions}, } var subscriptionNames = map[string]string{ @@ -242,9 +241,11 @@ func (by *Bybit) generateSubscriptions() (subscription.List, error) { // GetSubscriptionTemplate returns a subscription channel template func (by *Bybit) GetSubscriptionTemplate(_ *subscription.Subscription) (*template.Template, error) { return template.New("master.tmpl").Funcs(template.FuncMap{ - "channelName": channelName, - "isSymbolChannel": isSymbolChannel, - "intervalToString": intervalToString, + "channelName": channelName, + "isSymbolChannel": isSymbolChannel, + "intervalToString": intervalToString, + "getCategoryName": getCategoryName, + "isCategorisedChannel": isCategorisedChannel, }).Parse(subTplText) } @@ -681,7 +682,7 @@ func (by *Bybit) wsProcessPublicTrade(assetType asset.Item, resp *WebsocketRespo TID: result[x].TradeID, } } - return trade.AddTradesToBuffer(by.Name, tradeDatas...) + return trade.AddTradesToBuffer(tradeDatas...) } func (by *Bybit) wsProcessOrderbook(assetType asset.Item, resp *WebsocketResponse) error { @@ -759,6 +760,14 @@ func isSymbolChannel(name string) bool { return true } +func isCategorisedChannel(name string) bool { + switch name { + case chanPositions, chanExecution, chanOrder: + return true + } + return false +} + const subTplText = ` {{ with $name := channelName $.S }} {{- range $asset, $pairs := $.AssetPairs }} @@ -772,6 +781,7 @@ const subTplText = ` {{- end }} {{- else }} {{- $name }} + {{- if and (isCategorisedChannel $name) ($categoryName := getCategoryName $asset) -}} . {{- $categoryName -}} {{- end }} {{- end }} {{- end }} {{- $.AssetSeparator }} diff --git a/exchanges/bybit/bybit_wrapper.go b/exchanges/bybit/bybit_wrapper.go index 4d894741bb7..7a8bece39b2 100644 --- a/exchanges/bybit/bybit_wrapper.go +++ b/exchanges/bybit/bybit_wrapper.go @@ -675,7 +675,7 @@ func (by *Bybit) GetRecentTrades(ctx context.Context, p currency.Pair, assetType } if by.IsSaveTradeDataEnabled() { - err := trade.AddTradesToBuffer(by.Name, resp...) + err := trade.AddTradesToBuffer(resp...) if err != nil { return nil, err } diff --git a/exchanges/coinbasepro/coinbasepro.go b/exchanges/coinbasepro/coinbasepro.go index 446ba29e323..0877bd9bb31 100644 --- a/exchanges/coinbasepro/coinbasepro.go +++ b/exchanges/coinbasepro/coinbasepro.go @@ -335,7 +335,7 @@ func (c *CoinbasePro) GetHolds(ctx context.Context, accountID string) ([]Account // timeInforce - [optional] GTC, GTT, IOC, or FOK (default is GTC) // cancelAfter - [optional] min, hour, day * Requires time_in_force to be GTT // postOnly - [optional] Post only flag Invalid when time_in_force is IOC or FOK -func (c *CoinbasePro) PlaceLimitOrder(ctx context.Context, clientRef string, price, amount float64, side string, timeInforce RequestParamsTimeForceType, cancelAfter, productID, stp string, postOnly bool) (string, error) { +func (c *CoinbasePro) PlaceLimitOrder(ctx context.Context, clientRef, side, timeInforce, cancelAfter, productID, stp string, price, amount float64, postOnly bool) (string, error) { resp := GeneralizedOrderResponse{} req := make(map[string]interface{}) req["type"] = order.Limit.Lower() diff --git a/exchanges/coinbasepro/coinbasepro_test.go b/exchanges/coinbasepro/coinbasepro_test.go index 80d5e95e343..d7476734a9b 100644 --- a/exchanges/coinbasepro/coinbasepro_test.go +++ b/exchanges/coinbasepro/coinbasepro_test.go @@ -163,8 +163,8 @@ func TestAuthRequests(t *testing.T) { t.Error("Expecting error") } orderResponse, err := c.PlaceLimitOrder(context.Background(), - "", 0.001, 0.001, - order.Buy.Lower(), "", "", testPair.String(), "", false) + "", + order.Buy.Lower(), "", "", testPair.String(), "", 0.001, 0.001, false) if orderResponse != "" { t.Error("Expecting no data returned") } diff --git a/exchanges/coinbasepro/coinbasepro_types.go b/exchanges/coinbasepro/coinbasepro_types.go index de2a37284a5..f1623909c0c 100644 --- a/exchanges/coinbasepro/coinbasepro_types.go +++ b/exchanges/coinbasepro/coinbasepro_types.go @@ -489,17 +489,6 @@ type wsStatus struct { Type string `json:"type"` } -// RequestParamsTimeForceType Time in force -type RequestParamsTimeForceType string - -var ( - // CoinbaseRequestParamsTimeGTC GTC - CoinbaseRequestParamsTimeGTC = RequestParamsTimeForceType("GTC") - - // CoinbaseRequestParamsTimeIOC IOC - CoinbaseRequestParamsTimeIOC = RequestParamsTimeForceType("IOC") -) - // TransferHistory returns wallet transfer history type TransferHistory struct { ID string `json:"id"` diff --git a/exchanges/coinbasepro/coinbasepro_websocket.go b/exchanges/coinbasepro/coinbasepro_websocket.go index b6388d57377..c7fb88c4880 100644 --- a/exchanges/coinbasepro/coinbasepro_websocket.go +++ b/exchanges/coinbasepro/coinbasepro_websocket.go @@ -241,7 +241,7 @@ func (c *CoinbasePro) wsHandleData(respRaw []byte) error { if !c.IsSaveTradeDataEnabled() { return nil } - return trade.AddTradesToBuffer(c.Name, trade.Data{ + return trade.AddTradesToBuffer(trade.Data{ Timestamp: wsOrder.Time, Exchange: c.Name, CurrencyPair: p, diff --git a/exchanges/coinbasepro/coinbasepro_wrapper.go b/exchanges/coinbasepro/coinbasepro_wrapper.go index 20f8cf052b4..c3e8fc6b2c5 100644 --- a/exchanges/coinbasepro/coinbasepro_wrapper.go +++ b/exchanges/coinbasepro/coinbasepro_wrapper.go @@ -429,19 +429,19 @@ func (c *CoinbasePro) SubmitOrder(ctx context.Context, s *order.Submit) (*order. fPair.String(), "") case order.Limit: - timeInForce := CoinbaseRequestParamsTimeGTC - if s.ImmediateOrCancel { - timeInForce = CoinbaseRequestParamsTimeIOC + timeInForce := order.GoodTillCancel.String() + if s.TimeInForce.Is(order.ImmediateOrCancel) { + timeInForce = order.ImmediateOrCancel.String() } orderID, err = c.PlaceLimitOrder(ctx, "", - s.Price, - s.Amount, s.Side.Lower(), timeInForce, "", fPair.String(), "", + s.Price, + s.Amount, false) default: err = fmt.Errorf("%w %v", order.ErrUnsupportedOrderType, s.Type) diff --git a/exchanges/coinut/coinut_websocket.go b/exchanges/coinut/coinut_websocket.go index b0d5f66f581..fdc67605d59 100644 --- a/exchanges/coinut/coinut_websocket.go +++ b/exchanges/coinut/coinut_websocket.go @@ -31,9 +31,7 @@ const ( coinutWebsocketRateLimit = 30 ) -var ( - channels map[string]chan []byte -) +var channels map[string]chan []byte // NOTE for speed considerations // wss://wsapi-as.coinut.com @@ -310,7 +308,7 @@ func (c *COINUT) wsHandleData(_ context.Context, respRaw []byte) error { TID: strconv.FormatInt(tradeSnap.Trades[i].TransID, 10), }) } - return trade.AddTradesToBuffer(c.Name, trades...) + return trade.AddTradesToBuffer(trades...) case "inst_trade_update": if !c.IsSaveTradeDataEnabled() { return nil @@ -341,7 +339,7 @@ func (c *COINUT) wsHandleData(_ context.Context, respRaw []byte) error { } } - return trade.AddTradesToBuffer(c.Name, trade.Data{ + return trade.AddTradesToBuffer(trade.Data{ Timestamp: time.Unix(0, tradeUpdate.Timestamp*1000), CurrencyPair: p, AssetType: asset.Spot, @@ -389,7 +387,7 @@ func (c *COINUT) parseOrderContainer(oContainer *wsOrderContainer) (*order.Detai var oSide order.Side var oStatus order.Status var err error - var orderID = strconv.FormatInt(oContainer.OrderID, 10) + orderID := strconv.FormatInt(oContainer.OrderID, 10) if oContainer.Side != "" { oSide, err = order.StringToOrderSide(oContainer.Side) if err != nil { @@ -582,7 +580,7 @@ func (c *COINUT) WsProcessOrderbookUpdate(update *WsOrderbookUpdate) error { // GenerateDefaultSubscriptions Adds default subscriptions to websocket to be handled by ManageSubscriptions() func (c *COINUT) GenerateDefaultSubscriptions() (subscription.List, error) { - var channels = []string{"inst_tick", "inst_order_book", "inst_trade"} + channels := []string{"inst_tick", "inst_order_book", "inst_trade"} var subscriptions subscription.List enabledPairs, err := c.GetEnabledPairs(asset.Spot) if err != nil { diff --git a/exchanges/deribit/deribit_types.go b/exchanges/deribit/deribit_types.go index 3d553278533..059b1e1e0c6 100644 --- a/exchanges/deribit/deribit_types.go +++ b/exchanges/deribit/deribit_types.go @@ -44,7 +44,6 @@ var ( errWebsocketConnectionNotAuthenticated = errors.New("websocket connection is not authenticated") errResolutionNotSet = errors.New("resolution not set") errInvalidDestinationID = errors.New("invalid destination id") - errUnsupportedChannel = errors.New("channels not supported") errUnacceptableAPIKey = errors.New("unacceptable api key name") errInvalidUsername = errors.New("new username has to be specified") errSubAccountNameChangeFailed = errors.New("subaccount name change failed") diff --git a/exchanges/deribit/deribit_websocket.go b/exchanges/deribit/deribit_websocket.go index bff18b7db0f..148dadb7691 100644 --- a/exchanges/deribit/deribit_websocket.go +++ b/exchanges/deribit/deribit_websocket.go @@ -105,8 +105,6 @@ var defaultSubscriptions = subscription.List{ } var ( - indexENUMS = []string{"ada_usd", "algo_usd", "avax_usd", "bch_usd", "bnb_usd", "btc_usd", "doge_usd", "dot_usd", "eth_usd", "link_usd", "ltc_usd", "luna_usd", "matic_usd", "near_usd", "shib_usd", "sol_usd", "trx_usd", "uni_usd", "usdc_usd", "xrp_usd", "ada_usdc", "bch_usdc", "algo_usdc", "avax_usdc", "btc_usdc", "doge_usdc", "dot_usdc", "bch_usdc", "bnb_usdc", "eth_usdc", "link_usdc", "ltc_usdc", "luna_usdc", "matic_usdc", "near_usdc", "shib_usdc", "sol_usdc", "trx_usdc", "uni_usdc", "xrp_usdc", "btcdvol_usdc", "ethdvol_usdc"} - pingMessage = WsSubscriptionInput{ ID: 2, JSONRPCVersion: rpcVersion, @@ -408,7 +406,7 @@ func (d *Deribit) processUserOrderChanges(respRaw []byte, channels []string) err AssetType: a, } } - err = trade.AddTradesToBuffer(d.Name, td...) + err = trade.AddTradesToBuffer(td...) if err != nil { return err } @@ -513,7 +511,7 @@ func (d *Deribit) processTrades(respRaw []byte, channels []string) error { AssetType: a, } } - return trade.AddTradesToBuffer(d.Name, tradeDatas...) + return trade.AddTradesToBuffer(tradeDatas...) } func (d *Deribit) processIncrementalTicker(respRaw []byte, channels []string) error { diff --git a/exchanges/deribit/deribit_wrapper.go b/exchanges/deribit/deribit_wrapper.go index be778757dee..9005967c30c 100644 --- a/exchanges/deribit/deribit_wrapper.go +++ b/exchanges/deribit/deribit_wrapper.go @@ -591,8 +591,15 @@ func (d *Deribit) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Subm if err != nil { return nil, err } - timeInForce := "" - if s.ImmediateOrCancel { + var timeInForce string + switch { + case s.TimeInForce.Is(order.GoodTillCancel): + timeInForce = "good_til_cancelled" + case s.TimeInForce.Is(order.GoodTillDay): + timeInForce = "good_till_day" + case s.TimeInForce.Is(order.FillOrKill): + timeInForce = "fill_or_kill" + case s.TimeInForce.Is(order.ImmediateOrCancel): timeInForce = "immediate_or_cancel" } var data *PrivateTradeData @@ -604,7 +611,7 @@ func (d *Deribit) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Subm Amount: s.Amount, Price: s.Price, TriggerPrice: s.TriggerPrice, - PostOnly: s.PostOnly, + PostOnly: s.TimeInForce.Is(order.PostOnly), ReduceOnly: s.ReduceOnly, } switch { @@ -656,7 +663,7 @@ func (d *Deribit) ModifyOrder(ctx context.Context, action *order.Modify) (*order var err error reqParam := &OrderBuyAndSellParams{ TriggerPrice: action.TriggerPrice, - PostOnly: action.PostOnly, + PostOnly: action.TimeInForce.Is(order.PostOnly), Amount: action.Amount, OrderID: action.OrderID, Price: action.Price, @@ -780,10 +787,18 @@ func (d *Deribit) GetOrderInfo(ctx context.Context, orderID string, _ currency.P return nil, fmt.Errorf("%v: orderStatus %s not supported", d.Name, orderInfo.OrderState) } } + var tif order.TimeInForce + tif, err = order.StringToTimeInForce(orderInfo.TimeInForce) + if err != nil { + tif = order.UnsetTIF + } + if orderInfo.PostOnly { + tif |= order.PostOnly + } return &order.Detail{ AssetType: assetType, Exchange: d.Name, - PostOnly: orderInfo.PostOnly, + TimeInForce: tif, Price: orderInfo.Price, Amount: orderInfo.Amount, ExecutedAmount: orderInfo.FilledAmount, @@ -901,10 +916,19 @@ func (d *Deribit) GetActiveOrders(ctx context.Context, getOrdersRequest *order.M if ordersData[y].OrderState != "open" { continue } + + var tif order.TimeInForce + tif, err = order.StringToTimeInForce(ordersData[y].TimeInForce) + if err != nil { + tif = order.UnsetTIF + } + if ordersData[y].PostOnly { // TODO: Set ordersData[y].TimeInForce values + tif = order.PostOnly + } + resp = append(resp, order.Detail{ AssetType: getOrdersRequest.AssetType, Exchange: d.Name, - PostOnly: ordersData[y].PostOnly, Price: ordersData[y].Price, Amount: ordersData[y].Amount, ExecutedAmount: ordersData[y].FilledAmount, @@ -916,6 +940,7 @@ func (d *Deribit) GetActiveOrders(ctx context.Context, getOrdersRequest *order.M Side: orderSide, Type: orderType, Status: orderStatus, + TimeInForce: tif, }) } } @@ -970,10 +995,18 @@ func (d *Deribit) GetOrderHistory(ctx context.Context, getOrdersRequest *order.M return resp, fmt.Errorf("%v: orderStatus %s not supported", d.Name, ordersData[y].OrderState) } } + + var tif order.TimeInForce + tif, err = order.StringToTimeInForce(ordersData[y].TimeInForce) + if err != nil { + tif = order.UnsetTIF + } + if ordersData[y].PostOnly { // TODO: Set ordersData[y].TimeInForce values + tif |= order.PostOnly + } resp = append(resp, order.Detail{ AssetType: getOrdersRequest.AssetType, Exchange: d.Name, - PostOnly: ordersData[y].PostOnly, Price: ordersData[y].Price, Amount: ordersData[y].Amount, ExecutedAmount: ordersData[y].FilledAmount, @@ -985,6 +1018,7 @@ func (d *Deribit) GetOrderHistory(ctx context.Context, getOrdersRequest *order.M Side: orderSide, Type: orderType, Status: orderStatus, + TimeInForce: tif, }) } } diff --git a/exchanges/exchange.go b/exchanges/exchange.go index bbe8d4c7f46..cf2a0b6aa0e 100644 --- a/exchanges/exchange.go +++ b/exchanges/exchange.go @@ -915,8 +915,8 @@ func (b *Base) SupportsWithdrawPermissions(permissions uint32) bool { // FormatWithdrawPermissions will return each of the exchange's compatible withdrawal methods in readable form func (b *Base) FormatWithdrawPermissions() string { var services []string - for i := range 32 { - var check uint32 = 1 << uint32(i) + for i := range uint(32) { + var check uint32 = 1 << i if b.GetWithdrawPermissions()&check != 0 { switch check { case AutoWithdrawCrypto: @@ -1193,7 +1193,7 @@ func (b *Base) AddTradesToBuffer(trades ...trade.Data) error { if !b.IsSaveTradeDataEnabled() { return nil } - return trade.AddTradesToBuffer(b.Name, trades...) + return trade.AddTradesToBuffer(trades...) } // IsSaveTradeDataEnabled checks the state of @@ -1322,7 +1322,7 @@ func (e *Endpoints) GetURL(key URL) (string, error) { // GetURLMap gets all urls for either running or default map based on the bool value supplied func (e *Endpoints) GetURLMap() map[string]string { e.mu.RLock() - var urlMap = make(map[string]string) + urlMap := make(map[string]string) for k, v := range e.defaults { urlMap[k] = v } @@ -1568,7 +1568,7 @@ func (b *Base) GetKlineRequest(pair currency.Pair, a asset.Item, interval kline. modifiedCount, exchangeInterval) } - boundary := time.Now().Add(-exchangeInterval.Duration() * time.Duration(limit)) + boundary := time.Now().Add(-exchangeInterval.Duration() * time.Duration(limit)) //nolint:gosec // TODO: Ensure limit can't overflow return nil, fmt.Errorf("%w %v, exceeding the limit of %v %v candles up to %v. Please reduce timeframe or use GetHistoricCandlesExtended", kline.ErrRequestExceedsExchangeLimits, errMsg, @@ -1623,7 +1623,7 @@ func (b *Base) GetKlineExtendedRequest(pair currency.Pair, a asset.Item, interva } r.IsExtended = true - dates, err := r.GetRanges(uint32(limit)) + dates, err := r.GetRanges(limit) if err != nil { return nil, err } diff --git a/exchanges/gateio/gateio.go b/exchanges/gateio/gateio.go index 086c1accf65..7dd05b13cce 100644 --- a/exchanges/gateio/gateio.go +++ b/exchanges/gateio/gateio.go @@ -9,6 +9,7 @@ import ( "fmt" "net/http" "net/url" + "slices" "strconv" "strings" "time" @@ -2849,7 +2850,8 @@ func (g *Gateio) PlaceDeliveryOrder(ctx context.Context, arg *OrderCreateParams) if arg.Size == 0 { return nil, fmt.Errorf("%w, specify positive number to make a bid, and negative number to ask", errInvalidOrderSide) } - if arg.TimeInForce != gtcTIF && arg.TimeInForce != iocTIF && arg.TimeInForce != pocTIF && arg.TimeInForce != fokTIF { + arg.TimeInForce = strings.ToLower(arg.TimeInForce) + if !slices.Contains([]string{gtcTIF, iocTIF, pocTIF, fokTIF}, arg.TimeInForce) { return nil, errInvalidTimeInForce } if arg.Price == "" { @@ -3190,10 +3192,10 @@ func (g *Gateio) GetSettlementHistory(ctx context.Context, underlying string, of params := url.Values{} params.Set("underlying", underlying) if offset > 0 { - params.Set("offset", strconv.Itoa(int(offset))) + params.Set("offset", strconv.FormatUint(offset, 10)) } if limit > 0 { - params.Set("limit", strconv.Itoa(int(limit))) + params.Set("limit", strconv.FormatUint(limit, 10)) } if !from.IsZero() { params.Set("from", strconv.FormatInt(from.Unix(), 10)) @@ -3234,10 +3236,10 @@ func (g *Gateio) GetMyOptionsSettlements(ctx context.Context, underlying string, params.Set("to", strconv.FormatInt(to.Unix(), 10)) } if offset > 0 { - params.Set("offset", strconv.Itoa(int(offset))) + params.Set("offset", strconv.FormatUint(offset, 10)) } if limit > 0 { - params.Set("limit", strconv.Itoa(int(limit))) + params.Set("limit", strconv.FormatUint(limit, 10)) } var settlements []MyOptionSettlement return settlements, g.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, optionsSettlementsEPL, http.MethodGet, gateioOptionMySettlements, params, nil, &settlements) diff --git a/exchanges/gateio/gateio_test.go b/exchanges/gateio/gateio_test.go index 49ccf9b53b2..003d3b4656e 100644 --- a/exchanges/gateio/gateio_test.go +++ b/exchanges/gateio/gateio_test.go @@ -3370,21 +3370,30 @@ func TestGetClientOrderIDFromText(t *testing.T) { func TestGetTypeFromTimeInForce(t *testing.T) { t.Parallel() - typeResp, postOnly := getTypeFromTimeInForce("gtc") - assert.Equal(t, order.Limit, typeResp, "should be a limit order") - assert.False(t, postOnly, "should return false") - - typeResp, postOnly = getTypeFromTimeInForce("ioc") - assert.Equal(t, order.Market, typeResp, "should be market order") - assert.False(t, postOnly, "should return false") - - typeResp, postOnly = getTypeFromTimeInForce("poc") - assert.Equal(t, order.Limit, typeResp, "should be limit order") - assert.True(t, postOnly, "should return true") - - typeResp, postOnly = getTypeFromTimeInForce("fok") - assert.Equal(t, order.Market, typeResp, "should be market order") - assert.False(t, postOnly, "should return false") + type tifAndPrice struct { + TIF string + Price float64 + } + tifAndPriceStringToValueMap := map[tifAndPrice]struct { + OType order.Type + TIF order.TimeInForce + }{ + {"gtc", 0}: {order.Limit, order.GoodTillCancel}, + {"gtc", 1.2}: {order.Limit, order.GoodTillCancel}, + {"", 0}: {order.Limit, order.UnsetTIF}, + {"", 1.2}: {order.Limit, order.UnsetTIF}, + {"ioc", 0}: {order.Market, order.ImmediateOrCancel}, + {"ioc", 1.3}: {order.Limit, order.ImmediateOrCancel}, + {"poc", .1}: {order.Limit, order.PostOnly}, + {"poc", 0}: {order.Limit, order.PostOnly}, + {"fok", 0}: {order.Market, order.FillOrKill}, + {"fok", 1}: {order.Limit, order.FillOrKill}, + } + for k, v := range tifAndPriceStringToValueMap { + typeResp, tif := getTypeFromTimeInForceAndPrice(k.TIF, k.Price) + assert.Equal(t, v.OType, typeResp) + assert.Equal(t, v.TIF, tif) + } } func TestGetSideAndAmountFromSize(t *testing.T) { @@ -3417,14 +3426,14 @@ func TestGetFutureOrderSize(t *testing.T) { func TestGetTimeInForce(t *testing.T) { t.Parallel() - _, err := getTimeInForce(&order.Submit{Type: order.Market, PostOnly: true}) - assert.ErrorIs(t, err, errPostOnlyOrderTypeUnsupported) + _, err := getTimeInForce(&order.Submit{Type: order.Market, TimeInForce: order.PostOnly}) + assert.ErrorIs(t, err, order.ErrInvalidTimeInForce) ret, err := getTimeInForce(&order.Submit{Type: order.Market}) require.NoError(t, err) assert.Equal(t, "ioc", ret) - ret, err = getTimeInForce(&order.Submit{Type: order.Limit, PostOnly: true}) + ret, err = getTimeInForce(&order.Submit{Type: order.Limit, TimeInForce: order.PostOnly}) require.NoError(t, err) assert.Equal(t, "poc", ret) @@ -3432,7 +3441,7 @@ func TestGetTimeInForce(t *testing.T) { require.NoError(t, err) assert.Equal(t, "gtc", ret) - ret, err = getTimeInForce(&order.Submit{Type: order.Market, FillOrKill: true}) + ret, err = getTimeInForce(&order.Submit{Type: order.Market, TimeInForce: order.FillOrKill}) require.NoError(t, err) assert.Equal(t, "fok", ret) } diff --git a/exchanges/gateio/gateio_wrapper.go b/exchanges/gateio/gateio_wrapper.go index e8002aff7e6..bf85b6c126e 100644 --- a/exchanges/gateio/gateio_wrapper.go +++ b/exchanges/gateio/gateio_wrapper.go @@ -1488,7 +1488,7 @@ func (g *Gateio) GetOrderInfo(ctx context.Context, orderID string, pair currency side, amount, remaining := getSideAndAmountFromSize(fOrder.Size, fOrder.RemainingAmount) - ordertype, postonly := getTypeFromTimeInForce(fOrder.TimeInForce) + ordertype, tif := getTypeFromTimeInForceAndPrice(fOrder.TimeInForce, fOrder.OrderPrice.Float64()) return &order.Detail{ Amount: amount, ExecutedAmount: amount - remaining, @@ -1504,7 +1504,7 @@ func (g *Gateio) GetOrderInfo(ctx context.Context, orderID string, pair currency Pair: pair, AssetType: a, Type: ordertype, - PostOnly: postonly, + TimeInForce: tif, Side: side, }, nil case asset.Options: @@ -1719,6 +1719,11 @@ func (g *Gateio) GetActiveOrders(ctx context.Context, req *order.MultiOrderReque continue } + var tif order.TimeInForce + if futuresOrders[x].TimeInForce == "poc" { + tif = order.PostOnly + } + side, amount, remaining := getSideAndAmountFromSize(futuresOrders[x].Size, futuresOrders[x].RemainingAmount) orders = append(orders, order.Detail{ Status: order.Open, @@ -1738,7 +1743,7 @@ func (g *Gateio) GetActiveOrders(ctx context.Context, req *order.MultiOrderReque Type: order.Limit, SettlementCurrency: settlement, ReduceOnly: futuresOrders[x].IsReduceOnly, - PostOnly: futuresOrders[x].TimeInForce == "poc", + TimeInForce: tif, AverageExecutedPrice: futuresOrders[x].FillPrice.Float64(), }) } @@ -2505,17 +2510,23 @@ func getClientOrderIDFromText(text string) string { return "" } -// getTypeFromTimeInForce returns the order type and if the order is post only -func getTypeFromTimeInForce(tif string) (orderType order.Type, postOnly bool) { +// getTypeFromTimeInForceAndPrice returns the order type and if the order is post only +func getTypeFromTimeInForceAndPrice(tif string, price float64) (orderType order.Type, postOnly order.TimeInForce) { + oType := order.Market + if price > 0 { + oType = order.Limit + } switch tif { case "ioc": - return order.Market, false + return oType, order.ImmediateOrCancel case "fok": - return order.Market, false + return oType, order.FillOrKill case "poc": - return order.Limit, true + return order.Limit, order.PostOnly + case "gtc": + return order.Limit, order.GoodTillCancel default: - return order.Limit, false + return order.Limit, order.UnsetTIF } } @@ -2539,25 +2550,31 @@ func getFutureOrderSize(s *order.Submit) (float64, error) { } } -var errPostOnlyOrderTypeUnsupported = errors.New("post only is only supported for limit orders") - -// getTimeInForce returns the time in force for a given order. If Market order -// IOC +// getTimeInForce returns the time-in-force for a given order. +// If the time-in-force is unset, it assumes a Market order with an immediate-or-cancel (IOC) time-in-force value. +// If the order type is Limit, it applies a good-til-cancel (GTC) policy. func getTimeInForce(s *order.Submit) (string, error) { - timeInForce := "gtc" // limit order taker/maker - if s.Type == order.Market || s.ImmediateOrCancel { - timeInForce = "ioc" // market taker only - } - if s.PostOnly { - if s.Type != order.Limit { - return "", fmt.Errorf("%w not for %v", errPostOnlyOrderTypeUnsupported, s.Type) + switch { + case s.TimeInForce.Is(order.ImmediateOrCancel): + return "ioc", nil // market taker only + case s.TimeInForce.Is(order.FillOrKill): + return "fok", nil + case s.TimeInForce.Is(order.PostOnly): + return "poc", nil + case s.TimeInForce.Is(order.GoodTillCancel): + return "gtc", nil + case s.TimeInForce.Is(order.UnsetTIF): + switch s.Type { + case order.Market: + return "ioc", nil + case order.Limit: + return "gtc", nil + default: + return "", nil } - timeInForce = "poc" // limit order maker only - } - if s.FillOrKill { - timeInForce = "fok" // market order entire fill or kill + default: + return "", fmt.Errorf("%w: time-in-force value of %s", order.ErrInvalidTimeInForce, s.TimeInForce.String()) } - return timeInForce, nil } // GetCurrencyTradeURL returns the URL to the exchange's trade page for the given asset and currency pair diff --git a/exchanges/gemini/gemini_websocket.go b/exchanges/gemini/gemini_websocket.go index 8c41eb50bb2..b04d319d2e3 100644 --- a/exchanges/gemini/gemini_websocket.go +++ b/exchanges/gemini/gemini_websocket.go @@ -346,7 +346,7 @@ func (g *Gemini) wsHandleData(respRaw []byte) error { TID: strconv.FormatInt(result.EventID, 10), } - return trade.AddTradesToBuffer(g.Name, tradeEvent) + return trade.AddTradesToBuffer(tradeEvent) case "subscription_ack": var result WsSubscriptionAcknowledgementResponse err := json.Unmarshal(respRaw, &result) @@ -563,7 +563,7 @@ func (g *Gemini) wsProcessUpdate(result *wsL2MarketData) error { } } - return trade.AddTradesToBuffer(g.Name, trades...) + return trade.AddTradesToBuffer(trades...) } func channelName(s *subscription.Subscription) string { diff --git a/exchanges/hitbtc/hitbtc.go b/exchanges/hitbtc/hitbtc.go index f7abd43b73b..6116750aea2 100644 --- a/exchanges/hitbtc/hitbtc.go +++ b/exchanges/hitbtc/hitbtc.go @@ -39,11 +39,7 @@ const ( apiV2OrderHistory = "api/2/history/order" apiv2OpenOrders = "api/2/order" apiV2FeeInfo = "api/2/trading/fee" - orders = "order" apiOrder = "api/2/order" - orderMove = "moveOrder" - tradableBalances = "returnTradableBalances" - transferBalance = "transferBalance" ) // HitBTC is the overarching type across the hitbtc package @@ -253,18 +249,6 @@ func (h *HitBTC) GenerateNewAddress(ctx context.Context, currency string) (Depos return resp, err } -// GetActiveorders returns all your active orders -func (h *HitBTC) GetActiveorders(ctx context.Context, currency string) ([]Order, error) { - var resp []Order - err := h.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, - orders+"?symbol="+currency, - url.Values{}, - tradingRequests, - &resp) - - return resp, err -} - // GetTradeHistoryForCurrency returns your trade history func (h *HitBTC) GetTradeHistoryForCurrency(ctx context.Context, currency, start, end string) (AuthenticatedTradeHistoryResponse, error) { values := url.Values{} @@ -398,34 +382,6 @@ func (h *HitBTC) CancelAllExistingOrders(ctx context.Context) ([]Order, error) { &result) } -// MoveOrder generates a new move order -func (h *HitBTC) MoveOrder(ctx context.Context, orderID int64, rate, amount float64) (MoveOrderResponse, error) { - result := MoveOrderResponse{} - values := url.Values{} - values.Set("orderNumber", strconv.FormatInt(orderID, 10)) - values.Set("rate", strconv.FormatFloat(rate, 'f', -1, 64)) - - if amount != 0 { - values.Set("amount", strconv.FormatFloat(amount, 'f', -1, 64)) - } - - err := h.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodPost, - orderMove, - values, - tradingRequests, - &result) - - if err != nil { - return result, err - } - - if result.Success != 1 { - return result, errors.New(result.Error) - } - - return result, nil -} - // Withdraw allows for the withdrawal to a specific address func (h *HitBTC) Withdraw(ctx context.Context, currency, address string, amount float64) (bool, error) { result := Withdraw{} @@ -464,62 +420,6 @@ func (h *HitBTC) GetFeeInfo(ctx context.Context, currencyPair string) (Fee, erro return result, err } -// GetTradableBalances returns current tradable balances -func (h *HitBTC) GetTradableBalances(ctx context.Context) (map[string]map[string]float64, error) { - type Response struct { - Data map[string]map[string]interface{} - } - result := Response{} - - err := h.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodPost, - tradableBalances, - url.Values{}, - tradingRequests, - &result.Data) - - if err != nil { - return nil, err - } - - balances := make(map[string]map[string]float64) - - for x, y := range result.Data { - balances[x] = make(map[string]float64) - for z, w := range y { - balances[x][z], _ = strconv.ParseFloat(w.(string), 64) - } - } - - return balances, nil -} - -// TransferBalance transfers a balance -func (h *HitBTC) TransferBalance(ctx context.Context, currency, from, to string, amount float64) (bool, error) { - values := url.Values{} - result := GenericResponse{} - - values.Set("currency", currency) - values.Set("amount", strconv.FormatFloat(amount, 'f', -1, 64)) - values.Set("fromAccount", from) - values.Set("toAccount", to) - - err := h.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodPost, - transferBalance, - values, - otherRequests, - &result) - - if err != nil { - return false, err - } - - if result.Error != "" && result.Success != 1 { - return false, errors.New(result.Error) - } - - return true, nil -} - // SendHTTPRequest sends an unauthenticated HTTP request func (h *HitBTC) SendHTTPRequest(ctx context.Context, ep exchange.URL, path string, result interface{}) error { endpoint, err := h.API.Endpoints.GetURL(ep) diff --git a/exchanges/hitbtc/hitbtc_websocket.go b/exchanges/hitbtc/hitbtc_websocket.go index a672485f66d..b2dea790da5 100644 --- a/exchanges/hitbtc/hitbtc_websocket.go +++ b/exchanges/hitbtc/hitbtc_websocket.go @@ -250,7 +250,7 @@ func (h *HitBTC) wsHandleData(respRaw []byte) error { TID: strconv.FormatInt(tradeSnapshot.Params.Data[i].ID, 10), }) } - return trade.AddTradesToBuffer(h.Name, trades...) + return trade.AddTradesToBuffer(trades...) case "activeOrders": var o wsActiveOrdersResponse err := json.Unmarshal(respRaw, &o) @@ -292,10 +292,7 @@ func (h *HitBTC) wsHandleData(respRaw []byte) error { return err } } - case - "replaced", - "canceled", - "new": + case "replaced", "canceled", "new": var o wsOrderResponse err := json.Unmarshal(respRaw, &o) if err != nil { diff --git a/exchanges/hitbtc/hitbtc_wrapper.go b/exchanges/hitbtc/hitbtc_wrapper.go index 15b87f03fcc..5bfcdc27a38 100644 --- a/exchanges/hitbtc/hitbtc_wrapper.go +++ b/exchanges/hitbtc/hitbtc_wrapper.go @@ -790,7 +790,7 @@ func (h *HitBTC) GetHistoricCandles(ctx context.Context, pair currency.Pair, a a data, err := h.GetCandles(ctx, req.RequestFormatted.String(), - strconv.FormatInt(req.RequestLimit, 10), + strconv.FormatUint(req.RequestLimit, 10), formattedInterval, req.Start, req.End) @@ -829,7 +829,7 @@ func (h *HitBTC) GetHistoricCandlesExtended(ctx context.Context, pair currency.P var data []ChartData data, err = h.GetCandles(ctx, req.RequestFormatted.String(), - strconv.FormatInt(req.RequestLimit, 10), + strconv.FormatUint(req.RequestLimit, 10), formattedInterval, req.RangeHolder.Ranges[y].Start.Time, req.RangeHolder.Ranges[y].End.Time) diff --git a/exchanges/huobi/huobi.go b/exchanges/huobi/huobi.go index d592496f51c..76e56babbe1 100644 --- a/exchanges/huobi/huobi.go +++ b/exchanges/huobi/huobi.go @@ -110,7 +110,7 @@ func (h *HUOBI) GetSpotKline(ctx context.Context, arg KlinesRequestParams) ([]Kl vals.Set("period", arg.Period) if arg.Size != 0 { - vals.Set("size", strconv.Itoa(arg.Size)) + vals.Set("size", strconv.FormatUint(arg.Size, 10)) } type response struct { diff --git a/exchanges/huobi/huobi_types.go b/exchanges/huobi/huobi_types.go index 80a04aaa1c0..02dbb07bc6f 100644 --- a/exchanges/huobi/huobi_types.go +++ b/exchanges/huobi/huobi_types.go @@ -804,7 +804,7 @@ var ( type KlinesRequestParams struct { Symbol currency.Pair // Symbol to be used; example btcusdt, bccbtc...... Period string // Kline time interval; 1min, 5min, 15min...... - Size int // Size; [1-2000] + Size uint64 // Size; [1-2000] } // wsSubReq is a request to subscribe to or unubscribe from a topic for public channels (private channels use generic wsReq) @@ -980,10 +980,11 @@ type WsTradeUpdate struct { // OrderVars stores side, status and type for any order/trade type OrderVars struct { - Side order.Side - Status order.Status - OrderType order.Type - Fee float64 + Side order.Side + Status order.Status + OrderType order.Type + TimeInForce order.TimeInForce + Fee float64 } // Variables below are used to check api requests being sent out diff --git a/exchanges/huobi/huobi_websocket.go b/exchanges/huobi/huobi_websocket.go index c4efdbdb1ca..ab1dcdfaa95 100644 --- a/exchanges/huobi/huobi_websocket.go +++ b/exchanges/huobi/huobi_websocket.go @@ -118,6 +118,7 @@ func (h *HUOBI) wsReadMsgs(s stream.Connection) { } } } + func (h *HUOBI) wsHandleData(respRaw []byte) error { if id, err := jsonparser.GetString(respRaw, "id"); err == nil { if h.Websocket.Match.IncomingWithData(id, respRaw) { @@ -255,7 +256,7 @@ func (h *HUOBI) wsHandleAllTradesMsg(s *subscription.Subscription, respRaw []byt TID: strconv.FormatFloat(t.Tick.Data[i].TradeID, 'f', -1, 64), }) } - return trade.AddTradesToBuffer(h.Name, trades...) + return trade.AddTradesToBuffer(trades...) } func (h *HUOBI) wsHandleTickerMsg(s *subscription.Subscription, respRaw []byte) error { diff --git a/exchanges/huobi/huobi_wrapper.go b/exchanges/huobi/huobi_wrapper.go index 698766f3b7f..1143cd502d3 100644 --- a/exchanges/huobi/huobi_wrapper.go +++ b/exchanges/huobi/huobi_wrapper.go @@ -1020,10 +1020,10 @@ func (h *HUOBI) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Submit oDirection = "SELL" } var oType string - switch s.Type { - case order.Limit: + switch { + case s.Type == order.Limit: oType = "limit" - case order.PostOnly: + case s.TimeInForce.Is(order.PostOnly): oType = "post_only" } offset := "open" @@ -1052,8 +1052,8 @@ func (h *HUOBI) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Submit oDirection = "SELL" } var oType string - switch s.Type { - case order.Market: + switch { + case s.Type == order.Market: // https://huobiapi.github.io/docs/dm/v1/en/#order-and-trade // At present, Huobi Futures does not support market price when placing an order. // To increase the probability of a transaction, users can choose to place an order based on BBO price (opponent), @@ -1063,13 +1063,14 @@ func (h *HUOBI) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Submit // It is important to note that the above methods will not guarantee the order to be filled in 100%. // The system will obtain the optimal N price at that moment and place the order. oType = "optimal_20" - if s.ImmediateOrCancel { + if s.TimeInForce.Is(order.ImmediateOrCancel) { oType = "optimal_20_ioc" } - case order.Limit: + case s.Type == order.Limit: oType = "limit" - case order.PostOnly: - oType = "post_only" + if s.TimeInForce.Is(order.PostOnly) { + oType = "post_only" + } } offset := "open" if s.ReduceOnly { @@ -1357,7 +1358,7 @@ func (h *HUOBI) GetOrderInfo(ctx context.Context, orderID string, pair currency. return nil, err } maker := true - if orderVars.OrderType == order.Limit || orderVars.OrderType == order.PostOnly { + if orderVars.OrderType == order.Limit || orderVars.TimeInForce.Is(order.PostOnly) { maker = false } orderDetail.Trades = append(orderDetail.Trades, order.TradeHistory{ @@ -1395,7 +1396,7 @@ func (h *HUOBI) GetOrderInfo(ctx context.Context, orderID string, pair currency. TID: orderInfo.Data[x].OrderIDString, Type: orderVars.OrderType, Side: orderVars.Side, - IsMaker: orderVars.OrderType == order.Limit || orderVars.OrderType == order.PostOnly, + IsMaker: orderVars.OrderType == order.Limit || orderVars.TimeInForce.Is(order.PostOnly), }) } default: @@ -1528,9 +1529,8 @@ func (h *HUOBI) GetActiveOrders(ctx context.Context, req *order.MultiOrderReques return orders, err } - var orderVars OrderVars for x := range openOrders.Data.Orders { - orderVars, err = compatibleVars(openOrders.Data.Orders[x].Direction, + orderVars, err := compatibleVars(openOrders.Data.Orders[x].Direction, openOrders.Data.Orders[x].OrderPriceType, openOrders.Data.Orders[x].Status) if err != nil { @@ -1541,7 +1541,7 @@ func (h *HUOBI) GetActiveOrders(ctx context.Context, req *order.MultiOrderReques return orders, err } orders = append(orders, order.Detail{ - PostOnly: orderVars.OrderType == order.PostOnly, + TimeInForce: orderVars.TimeInForce, Leverage: openOrders.Data.Orders[x].LeverageRate, Price: openOrders.Data.Orders[x].Price, Amount: openOrders.Data.Orders[x].Volume, @@ -1583,7 +1583,7 @@ func (h *HUOBI) GetActiveOrders(ctx context.Context, req *order.MultiOrderReques return orders, err } orders = append(orders, order.Detail{ - PostOnly: orderVars.OrderType == order.PostOnly, + TimeInForce: orderVars.TimeInForce, Leverage: openOrders.Data.Orders[x].LeverageRate, Price: openOrders.Data.Orders[x].Price, Amount: openOrders.Data.Orders[x].Volume, @@ -1684,7 +1684,7 @@ func (h *HUOBI) GetOrderHistory(ctx context.Context, req *order.MultiOrderReques return orders, err } orders = append(orders, order.Detail{ - PostOnly: orderVars.OrderType == order.PostOnly, + TimeInForce: orderVars.TimeInForce, Leverage: orderHistory.Data.Orders[x].LeverageRate, Price: orderHistory.Data.Orders[x].Price, Amount: orderHistory.Data.Orders[x].Volume, @@ -1742,7 +1742,7 @@ func (h *HUOBI) GetOrderHistory(ctx context.Context, req *order.MultiOrderReques return orders, err } orders = append(orders, order.Detail{ - PostOnly: orderVars.OrderType == order.PostOnly, + TimeInForce: orderVars.TimeInForce, Leverage: openOrders.Data.Orders[x].LeverageRate, Price: openOrders.Data.Orders[x].Price, Amount: openOrders.Data.Orders[x].Volume, @@ -1835,7 +1835,7 @@ func (h *HUOBI) GetHistoricCandles(ctx context.Context, pair currency.Pair, a as candles, err := h.GetSpotKline(ctx, KlinesRequestParams{ Period: h.FormatExchangeKlineInterval(req.ExchangeInterval), Symbol: req.Pair, - Size: int(req.RequestLimit), + Size: req.RequestLimit, }) if err != nil { return nil, err @@ -1985,7 +1985,8 @@ func compatibleVars(side, orderPriceType string, status int64) (OrderVars, error case "opponent": resp.OrderType = order.Market case "post_only": - resp.OrderType = order.PostOnly + resp.OrderType = order.Limit + resp.TimeInForce = order.PostOnly default: return resp, errors.New("invalid orderPriceType") } diff --git a/exchanges/kline/kline.go b/exchanges/kline/kline.go index a972af3af18..7b4450293f6 100644 --- a/exchanges/kline/kline.go +++ b/exchanges/kline/kline.go @@ -346,12 +346,17 @@ func durationToWord(in Interval) string { } // TotalCandlesPerInterval returns the total number of candle intervals between the start and end date -func TotalCandlesPerInterval(start, end time.Time, interval Interval) int64 { +func TotalCandlesPerInterval(start, end time.Time, interval Interval) uint64 { if interval <= 0 { return 0 } + + if start.After(end) { + return 0 + } + window := end.Sub(start) - return int64(window) / int64(interval) + return uint64(window) / uint64(interval) //nolint:gosec // No overflow risk } // IntervalsPerYear helps determine the number of intervals in a year @@ -461,7 +466,7 @@ func (k *Item) ConvertToNewInterval(newInterval Interval) (*Item, error) { // CalculateCandleDateRanges will calculate the expected candle data in intervals in a date range // If an API is limited in the amount of candles it can make in a request, it will automatically separate // ranges into the limit -func CalculateCandleDateRanges(start, end time.Time, interval Interval, limit uint32) (*IntervalRangeHolder, error) { +func CalculateCandleDateRanges(start, end time.Time, interval Interval, limit uint64) (*IntervalRangeHolder, error) { if err := common.StartEndTimeCheck(start, end); err != nil && !errors.Is(err, common.ErrStartAfterTimeNow) { return nil, err } @@ -471,44 +476,39 @@ func CalculateCandleDateRanges(start, end time.Time, interval Interval, limit ui start = start.Round(interval.Duration()) end = end.Round(interval.Duration()) - window := end.Sub(start) - count := int64(window) / int64(interval) - requests := float64(count) / float64(limit) - - switch { - case requests <= 1: - requests = 1 - case limit == 0: - requests, limit = 1, uint32(count) - case requests-float64(int64(requests)) > 0: - requests++ - } - - potentialRequests := make([]IntervalRange, int(requests)) - requestStart := start - for x := range potentialRequests { - potentialRequests[x].Start = CreateIntervalTime(requestStart) - - count -= int64(limit) - if count < 0 { - potentialRequests[x].Intervals = make([]IntervalData, count+int64(limit)) - } else { - potentialRequests[x].Intervals = make([]IntervalData, limit) - } - for y := range potentialRequests[x].Intervals { - potentialRequests[x].Intervals[y].Start = CreateIntervalTime(requestStart) - requestStart = requestStart.Add(interval.Duration()) - potentialRequests[x].Intervals[y].End = CreateIntervalTime(requestStart) - } - potentialRequests[x].End = CreateIntervalTime(requestStart) + count := uint64(end.Sub(start) / interval.Duration()) //nolint:gosec // No overflow risk + if count == 0 { + return nil, common.ErrStartEqualsEnd } - return &IntervalRangeHolder{ - Start: CreateIntervalTime(start), - End: CreateIntervalTime(requestStart), - Ranges: potentialRequests, - Limit: int(limit), - }, nil + + intervals := make([]IntervalData, 0, count) + for iStart := start; iStart.Before(end); iStart = iStart.Add(interval.Duration()) { + intervals = append(intervals, IntervalData{ + Start: CreateIntervalTime(iStart), + End: CreateIntervalTime(iStart.Add(interval.Duration())), + }) + } + + if limit == 0 { + limit = count + } + + h := &IntervalRangeHolder{ + Start: CreateIntervalTime(start), + End: CreateIntervalTime(end), + Limit: limit, + } + + for _, b := range common.Batch(intervals, int(limit)) { //nolint:gosec // Ignore this warning as Batch requires int + h.Ranges = append(h.Ranges, IntervalRange{ + Start: b[0].Start, + End: b[len(b)-1].End, + Intervals: b, + }) + } + + return h, nil } // HasDataAtDate determines whether a there is any data at a set @@ -653,7 +653,7 @@ func (k *Item) EqualSource(i *Item) error { func DeployExchangeIntervals(enabled ...IntervalCapacity) ExchangeIntervals { sort.Slice(enabled, func(i, j int) bool { return enabled[i].Interval < enabled[j].Interval }) - supported := make(map[Interval]int64) + supported := make(map[Interval]uint64) for x := range enabled { supported[enabled[x].Interval] = enabled[x].Capacity } @@ -693,7 +693,7 @@ func (e *ExchangeIntervals) Construct(required Interval) (Interval, error) { // GetIntervalResultLimit returns the maximum amount of candles that can be // returned for a specific interval. If the individual interval limit is not set, // it will be ignored and the global result limit will be returned. -func (e *ExchangeCapabilitiesEnabled) GetIntervalResultLimit(interval Interval) (int64, error) { +func (e *ExchangeCapabilitiesEnabled) GetIntervalResultLimit(interval Interval) (uint64, error) { if e == nil { return 0, errExchangeCapabilitiesEnabledIsNil } @@ -711,5 +711,5 @@ func (e *ExchangeCapabilitiesEnabled) GetIntervalResultLimit(interval Interval) return 0, fmt.Errorf("%w there is no global result limit set", errCannotFetchIntervalLimit) } - return int64(e.GlobalResultLimit), nil + return e.GlobalResultLimit, nil } diff --git a/exchanges/kline/kline_test.go b/exchanges/kline/kline_test.go index cf29e9bffb1..c3f8ed1e5e2 100644 --- a/exchanges/kline/kline_test.go +++ b/exchanges/kline/kline_test.go @@ -11,6 +11,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/thrasher-corp/gocryptotrader/common" "github.com/thrasher-corp/gocryptotrader/currency" "github.com/thrasher-corp/gocryptotrader/database" @@ -282,13 +283,17 @@ func TestDurationToWord(t *testing.T) { func TestTotalCandlesPerInterval(t *testing.T) { t.Parallel() + + tmNow := time.Now() + assert.Equal(t, uint64(0), TotalCandlesPerInterval(tmNow.AddDate(0, 0, 1), tmNow, OneMin)) + start := time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC) end := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) testCases := []struct { name string interval Interval - expected int64 + expected uint64 }{ { "FifteenSecond", @@ -413,65 +418,41 @@ func TestCalculateCandleDateRanges(t *testing.T) { pt := time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC) ft := time.Date(2222, 1, 1, 0, 0, 0, 0, time.UTC) et := time.Date(2020, 1, 1, 1, 0, 0, 0, time.UTC) - nt := time.Time{} - _, err := CalculateCandleDateRanges(nt, nt, OneMin, 300) - if !errors.Is(err, common.ErrDateUnset) { - t.Errorf("received %v expected %v", err, common.ErrDateUnset) - } + _, err := CalculateCandleDateRanges(time.Time{}, time.Time{}, OneMin, 300) + assert.ErrorIs(t, err, common.ErrDateUnset) _, err = CalculateCandleDateRanges(et, pt, OneMin, 300) - if !errors.Is(err, common.ErrStartAfterEnd) { - t.Errorf("received %v expected %v", err, common.ErrStartAfterEnd) - } + assert.ErrorIs(t, err, common.ErrStartAfterEnd) _, err = CalculateCandleDateRanges(et, ft, 0, 300) - if !errors.Is(err, ErrInvalidInterval) { - t.Errorf("received %v expected %v", err, ErrInvalidInterval) - } + assert.ErrorIs(t, err, ErrInvalidInterval) _, err = CalculateCandleDateRanges(et, et, OneMin, 300) - if !errors.Is(err, common.ErrStartEqualsEnd) { - t.Errorf("received %v expected %v", err, common.ErrStartEqualsEnd) - } + assert.ErrorIs(t, err, common.ErrStartEqualsEnd) v, err := CalculateCandleDateRanges(pt, et, OneWeek, 300) - if !errors.Is(err, nil) { - t.Errorf("received '%v' expected '%v'", err, nil) - } - - if !v.Ranges[0].Start.Time.Equal(time.Unix(1546214400, 0)) { - t.Errorf("expected %v received %v", 1546214400, v.Ranges[0].Start.Ticks) - } + require.NoError(t, err) + assert.Equal(t, int64(1546214400), v.Ranges[0].Start.Ticks) v, err = CalculateCandleDateRanges(pt, et, OneWeek, 100) - if !errors.Is(err, nil) { - t.Errorf("received '%v' expected '%v'", err, nil) - } - if len(v.Ranges) != 1 { - t.Fatalf("expected %v received %v", 1, len(v.Ranges)) - } - if len(v.Ranges[0].Intervals) != 52 { - t.Errorf("expected %v received %v", 52, len(v.Ranges[0].Intervals)) - } + require.NoError(t, err) + assert.Equal(t, 1, len(v.Ranges)) + assert.Equal(t, 52, len(v.Ranges[0].Intervals)) + v, err = CalculateCandleDateRanges(et, ft, OneWeek, 5) - if !errors.Is(err, nil) { - t.Errorf("received '%v' expected '%v'", err, nil) - } - if len(v.Ranges) != 2108 { - t.Errorf("expected %v received %v", 2108, len(v.Ranges)) - } - if len(v.Ranges[0].Intervals) != 5 { - t.Errorf("expected %v received %v", 5, len(v.Ranges[0].Intervals)) - } - if len(v.Ranges[1].Intervals) != 5 { - t.Errorf("expected %v received %v", 5, len(v.Ranges[1].Intervals)) - } + require.NoError(t, err) + assert.Equal(t, 2108, len(v.Ranges)) + assert.Equal(t, 5, len(v.Ranges[0].Intervals)) lenRanges := len(v.Ranges) - 1 lenIntervals := len(v.Ranges[lenRanges].Intervals) - 1 - if !v.Ranges[lenRanges].Intervals[lenIntervals].End.Equal(ft.Round(OneWeek.Duration())) { - t.Errorf("expected %v received %v", ft.Round(OneDay.Duration()), v.Ranges[lenRanges].Intervals[lenIntervals].End) - } + assert.True(t, v.Ranges[lenRanges].Intervals[lenIntervals].End.Equal(ft.Round(OneWeek.Duration()))) + + start := time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC) + end := start.Add(24 * time.Hour) + v, err = CalculateCandleDateRanges(start, end, OneDay, 0) + require.NoError(t, err) + assert.Equal(t, uint64(1), v.Limit) } func TestItem_SortCandlesByTimestamp(t *testing.T) { @@ -901,7 +882,7 @@ func BenchmarkJustifyIntervalTimeStoringUnixValues1(b *testing.B) { tt1 := time.Now() tt2 := time.Now().Add(-time.Hour) tt3 := time.Now().Add(time.Hour) - for i := 0; i < b.N; i++ { + for b.Loop() { if tt1.Unix() == tt2.Unix() || (tt1.Unix() > tt2.Unix() && tt1.Unix() < tt3.Unix()) { continue } @@ -916,7 +897,7 @@ func BenchmarkJustifyIntervalTimeStoringUnixValues2(b *testing.B) { tt1 := time.Now().Unix() tt2 := time.Now().Add(-time.Hour).Unix() tt3 := time.Now().Add(time.Hour).Unix() - for i := 0; i < b.N; i++ { + for b.Loop() { if tt1 >= tt2 && tt1 <= tt3 { continue } @@ -1371,7 +1352,7 @@ func TestGetIntervalResultLimit(t *testing.T) { } e.Intervals = ExchangeIntervals{ - supported: map[Interval]int64{ + supported: map[Interval]uint64{ OneDay: 100000, OneMin: 0, }, diff --git a/exchanges/kline/kline_types.go b/exchanges/kline/kline_types.go index f4a1aedd810..a062ce976b0 100644 --- a/exchanges/kline/kline_types.go +++ b/exchanges/kline/kline_types.go @@ -161,13 +161,13 @@ type ExchangeCapabilitiesEnabled struct { // across all intervals. This is used to determine if a request will exceed // the exchange limits. Indivudal interval limits are stored in the // ExchangeIntervals struct. If this is set to 0, it will be ignored. - GlobalResultLimit uint32 + GlobalResultLimit uint64 } // ExchangeIntervals stores the supported intervals in an optimized lookup table // with a supplementary aligned retrieval list type ExchangeIntervals struct { - supported map[Interval]int64 + supported map[Interval]uint64 aligned []IntervalCapacity } @@ -180,7 +180,7 @@ type IntervalRangeHolder struct { Start IntervalTime End IntervalTime Ranges []IntervalRange - Limit int + Limit uint64 } // IntervalRange is a subset of candles based on exchange API request limits @@ -209,5 +209,5 @@ type IntervalTime struct { // IntervalCapacity is used to store the interval and capacity for a candle return type IntervalCapacity struct { Interval Interval - Capacity int64 + Capacity uint64 } diff --git a/exchanges/kline/request.go b/exchanges/kline/request.go index a7fa877b0c1..02937578f59 100644 --- a/exchanges/kline/request.go +++ b/exchanges/kline/request.go @@ -58,12 +58,12 @@ type Request struct { ProcessedCandles []Candle // RequestLimit is the potential maximum amount of candles that can be // returned - RequestLimit int64 + RequestLimit uint64 } // CreateKlineRequest generates a `Request` type for interval conversions // supported by an exchange. -func CreateKlineRequest(name string, pair, formatted currency.Pair, a asset.Item, clientRequired, exchangeInterval Interval, start, end time.Time, specificEndpointLimit int64) (*Request, error) { +func CreateKlineRequest(name string, pair, formatted currency.Pair, a asset.Item, clientRequired, exchangeInterval Interval, start, end time.Time, specificEndpointLimit uint64) (*Request, error) { if name == "" { return nil, ErrUnsetName } @@ -132,7 +132,7 @@ func CreateKlineRequest(name string, pair, formatted currency.Pair, a asset.Item // GetRanges returns the date ranges for candle intervals broken up over // requests -func (r *Request) GetRanges(limit uint32) (*IntervalRangeHolder, error) { +func (r *Request) GetRanges(limit uint64) (*IntervalRangeHolder, error) { if r == nil { return nil, errNilRequest } @@ -193,12 +193,12 @@ func (r *Request) ProcessResponse(timeSeries []Candle) (*Item, error) { } // Size returns the max length of return for pre-allocation. -func (r *Request) Size() int { +func (r *Request) Size() uint64 { if r == nil { return 0 } - return int(TotalCandlesPerInterval(r.Start, r.End, r.ExchangeInterval)) + return TotalCandlesPerInterval(r.Start, r.End, r.ExchangeInterval) } // ExtendedRequest used in extended functionality for when candles requested @@ -236,12 +236,12 @@ func (r *ExtendedRequest) ProcessResponse(timeSeries []Candle) (*Item, error) { } // Size returns the max length of return for pre-allocation. -func (r *ExtendedRequest) Size() int { +func (r *ExtendedRequest) Size() uint64 { if r == nil || r.RangeHolder == nil { return 0 } if r.RangeHolder.Limit == 0 { log.Warnf(log.ExchangeSys, "%v candle request limit is zero while calling Size()", r.Exchange) } - return r.RangeHolder.Limit * len(r.RangeHolder.Ranges) + return r.RangeHolder.Limit * uint64(len(r.RangeHolder.Ranges)) } diff --git a/exchanges/kraken/futures_types.go b/exchanges/kraken/futures_types.go index b840320acd7..cd3a48b0ccc 100644 --- a/exchanges/kraken/futures_types.go +++ b/exchanges/kraken/futures_types.go @@ -8,12 +8,10 @@ import ( var ( validOrderTypes = map[order.Type]string{ - order.ImmediateOrCancel: "ioc", - order.Limit: "lmt", - order.Stop: "stp", - order.PostOnly: "post", - order.TakeProfit: "take_profit", - order.Market: "mkt", + order.Limit: "lmt", + order.Stop: "stp", + order.TakeProfit: "take_profit", + order.Market: "mkt", } validSide = []string{"buy", "sell"} diff --git a/exchanges/kraken/kraken.go b/exchanges/kraken/kraken.go index e2c4652ffa3..b791ab75d60 100644 --- a/exchanges/kraken/kraken.go +++ b/exchanges/kraken/kraken.go @@ -320,33 +320,43 @@ func (k *Kraken) GetTrades(ctx context.Context, symbol currency.Pair) ([]RecentT return nil, errors.New("unrecognised trade data received") } var r RecentTrades - r.Price, err = strconv.ParseFloat(individualTrade[0].(string), 64) + + price, ok := individualTrade[0].(string) + if !ok { + return nil, common.GetTypeAssertError("string", individualTrade[0], "price") + } + r.Price, err = strconv.ParseFloat(price, 64) if err != nil { return nil, err } - r.Volume, err = strconv.ParseFloat(individualTrade[1].(string), 64) + + volume, ok := individualTrade[1].(string) + if !ok { + return nil, common.GetTypeAssertError("string", individualTrade[1], "volume") + } + r.Volume, err = strconv.ParseFloat(volume, 64) if err != nil { return nil, err } r.Time, ok = individualTrade[2].(float64) if !ok { - return nil, errors.New("unable to parse time for individual trade data") + return nil, common.GetTypeAssertError("float64", individualTrade[2], "time") } r.BuyOrSell, ok = individualTrade[3].(string) if !ok { - return nil, errors.New("unable to parse order side for individual trade data") + return nil, common.GetTypeAssertError("string", individualTrade[3], "buyOrSell") } r.MarketOrLimit, ok = individualTrade[4].(string) if !ok { - return nil, errors.New("unable to parse order type for individual trade data") + return nil, common.GetTypeAssertError("string", individualTrade[4], "marketOrLimit") } r.Miscellaneous, ok = individualTrade[5].(string) if !ok { - return nil, errors.New("unable to parse misc field for individual trade data") + return nil, common.GetTypeAssertError("string", individualTrade[5], "miscellaneous") } tradeID, ok := individualTrade[6].(float64) if !ok { - return nil, errors.New("unable to parse TradeID field for individual trade data") + return nil, common.GetTypeAssertError("float64", individualTrade[6], "tradeID") } r.TradeID = int64(tradeID) recentTrades[x] = r @@ -780,7 +790,7 @@ func (k *Kraken) AddOrder(ctx context.Context, symbol currency.Pair, side, order } if args.TimeInForce != "" { - params.Set("timeinforce", string(args.TimeInForce)) + params.Set("timeinforce", args.TimeInForce) } var result AddOrderResponse diff --git a/exchanges/kraken/kraken_futures.go b/exchanges/kraken/kraken_futures.go index a58d73ceb62..5ad6a2465f3 100644 --- a/exchanges/kraken/kraken_futures.go +++ b/exchanges/kraken/kraken_futures.go @@ -156,19 +156,22 @@ func (k *Kraken) FuturesEditOrder(ctx context.Context, orderID, clientOrderID st } // FuturesSendOrder sends a futures order -func (k *Kraken) FuturesSendOrder(ctx context.Context, orderType order.Type, symbol currency.Pair, side, triggerSignal, clientOrderID, reduceOnly string, - ioc bool, - size, limitPrice, stopPrice float64) (FuturesSendOrderData, error) { +func (k *Kraken) FuturesSendOrder(ctx context.Context, orderType order.Type, symbol currency.Pair, side, triggerSignal, clientOrderID, reduceOnly string, tif order.TimeInForce, size, limitPrice, stopPrice float64) (FuturesSendOrderData, error) { var resp FuturesSendOrderData - if ioc && orderType != order.Market { - orderType = order.ImmediateOrCancel - } - oType, ok := validOrderTypes[orderType] if !ok { return resp, errors.New("invalid orderType") } + + if oType != "mkt" { + if tif.Is(order.PostOnly) { + oType = "post" + } else if tif.Is(order.ImmediateOrCancel) { + oType = "ioc" + } + } + params := url.Values{} params.Set("orderType", oType) symbolValue, err := k.FormatSymbol(symbol, asset.Futures) diff --git a/exchanges/kraken/kraken_test.go b/exchanges/kraken/kraken_test.go index 234ac536347..508c5b2a423 100644 --- a/exchanges/kraken/kraken_test.go +++ b/exchanges/kraken/kraken_test.go @@ -27,6 +27,7 @@ import ( "github.com/thrasher-corp/gocryptotrader/exchanges/sharedtestvalues" "github.com/thrasher-corp/gocryptotrader/exchanges/subscription" "github.com/thrasher-corp/gocryptotrader/exchanges/ticker" + "github.com/thrasher-corp/gocryptotrader/exchanges/trade" testexch "github.com/thrasher-corp/gocryptotrader/internal/testing/exchange" testsubs "github.com/thrasher-corp/gocryptotrader/internal/testing/subscriptions" mockws "github.com/thrasher-corp/gocryptotrader/internal/testing/websocket" @@ -181,7 +182,7 @@ func TestFuturesSendOrder(t *testing.T) { t.Parallel() sharedtestvalues.SkipTestIfCredentialsUnset(t, k, canManipulateRealOrders) - _, err := k.FuturesSendOrder(context.Background(), order.Limit, futuresTestPair, "buy", "", "", "", true, 1, 1, 0.9) + _, err := k.FuturesSendOrder(context.Background(), order.Limit, futuresTestPair, "buy", "", "", "", order.ImmediateOrCancel, 1, 1, 0.9) assert.NoError(t, err, "FuturesSendOrder should not error") } @@ -1221,6 +1222,41 @@ func TestWsHandleData(t *testing.T) { testexch.FixtureToDataHandler(t, "testdata/wsHandleData.json", k.wsHandleData) } +func TestWSProcessTrades(t *testing.T) { + t.Parallel() + + k := new(Kraken) //nolint:govet // Intentional shadow to avoid future copy/paste mistakes + require.NoError(t, testexch.Setup(k), "Test instance Setup must not error") + err := k.Websocket.AddSubscriptions(k.Websocket.Conn, &subscription.Subscription{Asset: asset.Spot, Pairs: currency.Pairs{spotTestPair}, Channel: subscription.AllTradesChannel, Key: 18788}) + require.NoError(t, err, "AddSubscriptions must not error") + testexch.FixtureToDataHandler(t, "testdata/wsAllTrades.json", k.wsHandleData) + close(k.Websocket.DataHandler) + + invalid := []any{"trades", []any{[]interface{}{"95873.80000", "0.00051182", "1708731380.3791859"}}} + pair := currency.NewPair(currency.XBT, currency.USD) + err = k.wsProcessTrades(invalid, pair) + require.ErrorContains(t, err, "unexpected trade data length") + + expJSON := []string{ + `{"AssetType":"spot","CurrencyPair":"XBT/USD","Side":"BUY","Price":95873.80000,"Amount":0.00051182,"Timestamp":"2025-02-23T23:29:40.379185914Z"}`, + `{"AssetType":"spot","CurrencyPair":"XBT/USD","Side":"SELL","Price":95940.90000,"Amount":0.00011069,"Timestamp":"2025-02-24T02:01:12.853682041Z"}`, + } + require.Len(t, k.Websocket.DataHandler, len(expJSON), "Must see correct number of trades") + for resp := range k.Websocket.DataHandler { + switch v := resp.(type) { + case trade.Data: + i := 1 - len(k.Websocket.DataHandler) + exp := trade.Data{Exchange: k.Name, CurrencyPair: spotTestPair} + require.NoErrorf(t, json.Unmarshal([]byte(expJSON[i]), &exp), "Must not error unmarshalling json %d: %s", i, expJSON[i]) + require.Equalf(t, exp, v, "Trade [%d] must be correct", i) + case error: + t.Error(v) + default: + t.Errorf("Unexpected type in DataHandler: %T (%s)", v, v) + } + } +} + func TestWsOpenOrders(t *testing.T) { t.Parallel() k := new(Kraken) //nolint:govet // Intentional shadow to avoid future copy/paste mistakes diff --git a/exchanges/kraken/kraken_types.go b/exchanges/kraken/kraken_types.go index 44aceea7480..edf4353a6c6 100644 --- a/exchanges/kraken/kraken_types.go +++ b/exchanges/kraken/kraken_types.go @@ -431,7 +431,7 @@ type AddOrderOptions struct { ClosePrice float64 ClosePrice2 float64 Validate bool - TimeInForce RequestParamsTimeForceType + TimeInForce string } // CancelOrderResponse type @@ -635,25 +635,25 @@ type WsOpenOrderDescription struct { // WsAddOrderRequest request type for ws adding order type WsAddOrderRequest struct { - Event string `json:"event"` - Token string `json:"token"` - RequestID int64 `json:"reqid,omitempty"` // Optional, client originated ID reflected in response message. - OrderType string `json:"ordertype"` - OrderSide string `json:"type"` - Pair string `json:"pair"` - Price float64 `json:"price,string,omitempty"` // optional - Price2 float64 `json:"price2,string,omitempty"` // optional - Volume float64 `json:"volume,string,omitempty"` - Leverage float64 `json:"leverage,omitempty"` // optional - OFlags string `json:"oflags,omitempty"` // optional - StartTime string `json:"starttm,omitempty"` // optional - ExpireTime string `json:"expiretm,omitempty"` // optional - UserReferenceID string `json:"userref,omitempty"` // optional - Validate string `json:"validate,omitempty"` // optional - CloseOrderType string `json:"close[ordertype],omitempty"` // optional - ClosePrice float64 `json:"close[price],omitempty"` // optional - ClosePrice2 float64 `json:"close[price2],omitempty"` // optional - TimeInForce RequestParamsTimeForceType `json:"timeinforce,omitempty"` // optional + Event string `json:"event"` + Token string `json:"token"` + RequestID int64 `json:"reqid,omitempty"` // Optional, client originated ID reflected in response message. + OrderType string `json:"ordertype"` + OrderSide string `json:"type"` + Pair string `json:"pair"` + Price float64 `json:"price,string,omitempty"` // optional + Price2 float64 `json:"price2,string,omitempty"` // optional + Volume float64 `json:"volume,string,omitempty"` + Leverage float64 `json:"leverage,omitempty"` // optional + OFlags string `json:"oflags,omitempty"` // optional + StartTime string `json:"starttm,omitempty"` // optional + ExpireTime string `json:"expiretm,omitempty"` // optional + UserReferenceID string `json:"userref,omitempty"` // optional + Validate string `json:"validate,omitempty"` // optional + CloseOrderType string `json:"close[ordertype],omitempty"` // optional + ClosePrice float64 `json:"close[price],omitempty"` // optional + ClosePrice2 float64 `json:"close[price2],omitempty"` // optional + TimeInForce string `json:"timeinforce,omitempty"` // optional } // WsAddOrderResponse response data for ws order diff --git a/exchanges/kraken/kraken_websocket.go b/exchanges/kraken/kraken_websocket.go index bb1c37114a3..ea2f3925879 100644 --- a/exchanges/kraken/kraken_websocket.go +++ b/exchanges/kraken/kraken_websocket.go @@ -79,7 +79,6 @@ func init() { var ( authToken string - errParsingWSField = errors.New("error parsing WS field") errCancellingOrder = errors.New("error cancelling order") errSubPairMissing = errors.New("pair missing from subscription response") errInvalidChecksum = errors.New("invalid checksum") @@ -492,23 +491,27 @@ func (k *Kraken) wsProcessSpread(response []any, pair currency.Pair) error { } bestBid, ok := data[0].(string) if !ok { - return errors.New("wsProcessSpread: unable to type assert bestBid") + return common.GetTypeAssertError("string", data[0], "bestBid") } bestAsk, ok := data[1].(string) if !ok { - return errors.New("wsProcessSpread: unable to type assert bestAsk") + return common.GetTypeAssertError("string", data[1], "bestAsk") } - timeData, err := strconv.ParseFloat(data[2].(string), 64) + timeData, ok := data[2].(string) + if !ok { + return common.GetTypeAssertError("string", data[2], "timeData") + } + timestamp, err := strconv.ParseFloat(timeData, 64) if err != nil { - return fmt.Errorf("wsProcessSpread: unable to parse timeData: %w", err) + return err } bidVolume, ok := data[3].(string) if !ok { - return errors.New("wsProcessSpread: unable to type assert bidVolume") + return common.GetTypeAssertError("string", data[3], "bidVolume") } askVolume, ok := data[4].(string) if !ok { - return errors.New("wsProcessSpread: unable to type assert askVolume") + return common.GetTypeAssertError("string", data[4], "askVolume") } if k.Verbose { @@ -518,7 +521,7 @@ func (k *Kraken) wsProcessSpread(response []any, pair currency.Pair) error { pair, bestBid, bestAsk, - convert.TimeFromUnixTimestampDecimal(timeData), + convert.TimeFromUnixTimestampDecimal(timestamp), bidVolume, askVolume) } @@ -531,7 +534,9 @@ func (k *Kraken) wsProcessTrades(response []any, pair currency.Pair) error { if !ok { return errors.New("received invalid trade data") } - if !k.IsSaveTradeDataEnabled() { + saveTradeData := k.IsSaveTradeDataEnabled() + tradeFeed := k.IsTradeFeedEnabled() + if !saveTradeData && !tradeFeed { return nil } trades := make([]trade.Data, len(data)) @@ -540,24 +545,37 @@ func (k *Kraken) wsProcessTrades(response []any, pair currency.Pair) error { if !ok { return errors.New("unidentified trade data received") } - timeData, err := strconv.ParseFloat(t[2].(string), 64) + if len(t) < 4 { + return fmt.Errorf("%w; unexpected trade data length: %d", common.ErrParsingWSField, len(t)) + } + ts, ok := t[2].(string) + if !ok { + return common.GetTypeAssertError("string", t[2], "trade.time") + } + timeData, err := strconv.ParseFloat(ts, 64) if err != nil { return err } - - price, err := strconv.ParseFloat(t[0].(string), 64) + p, ok := t[0].(string) + if !ok { + return common.GetTypeAssertError("string", t[0], "trade.price") + } + price, err := strconv.ParseFloat(p, 64) if err != nil { return err } - - amount, err := strconv.ParseFloat(t[1].(string), 64) + v, ok := t[1].(string) + if !ok { + return common.GetTypeAssertError("string", t[1], "trade.volume") + } + amount, err := strconv.ParseFloat(v, 64) if err != nil { return err } - var tSide = order.Buy + tSide := order.Buy s, ok := t[3].(string) if !ok { - return common.GetTypeAssertError("string", t[3], "side") + return common.GetTypeAssertError("string", t[3], "trade.side") } if s == "s" { tSide = order.Sell @@ -573,7 +591,15 @@ func (k *Kraken) wsProcessTrades(response []any, pair currency.Pair) error { Side: tSide, } } - return trade.AddTradesToBuffer(k.Name, trades...) + if tradeFeed { + for i := range trades { + k.Websocket.DataHandler <- trades[i] + } + } + if saveTradeData { + return trade.AddTradesToBuffer(trades...) + } + return nil } // wsProcessOrderBook handles both partial and full orderbook updates @@ -879,7 +905,7 @@ func (k *Kraken) wsProcessOrderBookUpdate(pair currency.Pair, askData, bidData [ return fmt.Errorf("cannot calculate websocket checksum: book not found for %s %s %w", pair, asset.Spot, err) } - token, err := strconv.ParseInt(checksum, 10, 64) + token, err := strconv.ParseUint(checksum, 10, 32) if err != nil { return err } @@ -1072,7 +1098,6 @@ func (k *Kraken) manageSubs(op string, subs subscription.List) error { // Ignore an overall timeout, because we'll track individual subscriptions in handleSubResps err = common.ExcludeError(err, stream.ErrSignatureTimeout) - if err != nil { return fmt.Errorf("%w; Channel: %s Pair: %s", err, s.Channel, s.Pairs) } @@ -1331,7 +1356,7 @@ func (k *Kraken) wsCancelOrder(orderID string) error { status, err := jsonparser.GetUnsafeString(resp, "status") if err != nil { - return fmt.Errorf("%w 'status': %w from message: %s", errParsingWSField, err, resp) + return fmt.Errorf("%w 'status': %w from message: %s", common.ErrParsingWSField, err, resp) } else if status == "ok" { return nil } diff --git a/exchanges/kraken/kraken_wrapper.go b/exchanges/kraken/kraken_wrapper.go index eba13ac71ad..57689d5825e 100644 --- a/exchanges/kraken/kraken_wrapper.go +++ b/exchanges/kraken/kraken_wrapper.go @@ -716,9 +716,9 @@ func (k *Kraken) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Submi status := order.New switch s.AssetType { case asset.Spot: - timeInForce := RequestParamsTimeGTC - if s.ImmediateOrCancel { - timeInForce = RequestParamsTimeIOC + timeInForce := order.GoodTillCancel.String() + if s.TimeInForce.Is(order.ImmediateOrCancel) { + timeInForce = s.TimeInForce.String() } if k.Websocket.CanUseAuthenticatedWebsocketForWrapper() { orderID, err = k.wsAddOrder(&WsAddOrderRequest{ @@ -764,7 +764,7 @@ func (k *Kraken) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Submi "", s.ClientOrderID, "", - s.ImmediateOrCancel, + s.TimeInForce, s.Amount, s.Price, 0, diff --git a/exchanges/kraken/testdata/wsAllTrades.json b/exchanges/kraken/testdata/wsAllTrades.json new file mode 100644 index 00000000000..db8626061ec --- /dev/null +++ b/exchanges/kraken/testdata/wsAllTrades.json @@ -0,0 +1,2 @@ +[119930881,[["95873.80000","0.00051182","1740353380.379186","b","l",""]],"trade","XBT/USD"] +[119930881,[["95940.90000","0.00011069","1740362472.853682","s","l",""]],"trade","XBT/USD"] diff --git a/exchanges/kucoin/kucoin.go b/exchanges/kucoin/kucoin.go index 78a4c06fcb3..646a78e63da 100644 --- a/exchanges/kucoin/kucoin.go +++ b/exchanges/kucoin/kucoin.go @@ -1125,7 +1125,7 @@ func (ku *Kucoin) PostStopOrder(ctx context.Context, clientOID, side, symbol, or if timeInForce != "" { arg["timeInForce"] = timeInForce } - if cancelAfter > 0 && timeInForce == "GTT" { + if cancelAfter > 0 && timeInForce == order.GoodTillTime.String() { arg["cancelAfter"] = strconv.FormatFloat(cancelAfter, 'f', -1, 64) } arg["postOnly"] = postOnly diff --git a/exchanges/kucoin/kucoin_test.go b/exchanges/kucoin/kucoin_test.go index 88b5820ad1b..ddb2b5a6251 100644 --- a/exchanges/kucoin/kucoin_test.go +++ b/exchanges/kucoin/kucoin_test.go @@ -3178,7 +3178,7 @@ func TestUpdateOrderExecutionLimits(t *testing.T) { } func BenchmarkIntervalToString(b *testing.B) { - for x := 0; x < b.N; x++ { + for b.Loop() { result, err := IntervalToString(kline.OneWeek) assert.NoError(b, err) assert.NotNil(b, result) diff --git a/exchanges/kucoin/kucoin_websocket.go b/exchanges/kucoin/kucoin_websocket.go index 210bf0f4b74..43c34c8e6fe 100644 --- a/exchanges/kucoin/kucoin_websocket.go +++ b/exchanges/kucoin/kucoin_websocket.go @@ -266,9 +266,8 @@ func (ku *Kucoin) wsHandleData(respData []byte) error { if resp.Subject == "order.done" { var response WsMarginTradeOrderDoneEvent return ku.processData(resp.Data, &response) - } else { - return ku.processMarginLendingTradeOrderEvent(resp.Data) } + return ku.processMarginLendingTradeOrderEvent(resp.Data) case spotMarketAdvancedChannel: return ku.processStopOrderEvent(resp.Data) case futuresTickerChannel: diff --git a/exchanges/kucoin/kucoin_wrapper.go b/exchanges/kucoin/kucoin_wrapper.go index eb5d8fed9c3..706c645cc62 100644 --- a/exchanges/kucoin/kucoin_wrapper.go +++ b/exchanges/kucoin/kucoin_wrapper.go @@ -458,7 +458,8 @@ func (ku *Kucoin) UpdateAccountInfo(ctx context.Context, assetType asset.Item) ( Total: accountH[x].Balance.Float64(), Hold: accountH[x].Holds.Float64(), Free: accountH[x].Available.Float64(), - }}, + }, + }, }) } default: @@ -588,7 +589,7 @@ func (ku *Kucoin) GetRecentTrades(ctx context.Context, p currency.Pair, assetTyp return nil, fmt.Errorf("%w %v", asset.ErrNotSupported, assetType) } if ku.IsSaveTradeDataEnabled() { - err := trade.AddTradesToBuffer(ku.Name, resp...) + err := trade.AddTradesToBuffer(resp...) if err != nil { return nil, err } @@ -668,7 +669,7 @@ func (ku *Kucoin) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Subm Leverage: s.Leverage, VisibleSize: 0, ReduceOnly: s.ReduceOnly, - PostOnly: s.PostOnly, + PostOnly: s.TimeInForce.Is(order.PostOnly), Hidden: s.Hidden, Stop: stopOrderBoundary, StopPrice: s.TriggerPrice, @@ -692,13 +693,11 @@ func (ku *Kucoin) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Subm var timeInForce string if oType == order.Limit { switch { - case s.FillOrKill: - timeInForce = "FOK" - case s.ImmediateOrCancel: - timeInForce = "IOC" - case s.PostOnly: + case s.TimeInForce.Is(order.FillOrKill) || + s.TimeInForce.Is(order.ImmediateOrCancel): + timeInForce = s.TimeInForce.String() default: - timeInForce = "GTC" + timeInForce = order.GoodTillCancel.String() } } var stopType string @@ -721,7 +720,7 @@ func (ku *Kucoin) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Subm s.Pair.String(), oType.Lower(), "", stopType, "", SpotTradeType, timeInForce, s.Amount, s.Price, stopPrice, 0, - 0, 0, s.PostOnly, s.Hidden, s.Iceberg) + 0, 0, s.TimeInForce.Is(order.PostOnly), s.Hidden, s.Iceberg) if err != nil { return nil, err } @@ -734,7 +733,7 @@ func (ku *Kucoin) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Subm OrderType: s.Type.Lower(), Size: s.Amount, Price: s.Price, - PostOnly: s.PostOnly, + PostOnly: s.TimeInForce.Is(order.PostOnly), Hidden: s.Hidden, TimeInForce: timeInForce, Iceberg: s.Iceberg, @@ -794,7 +793,7 @@ func (ku *Kucoin) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Subm Price: s.Price, Size: s.Amount, VisibleSize: s.Amount, - PostOnly: s.PostOnly, + PostOnly: s.TimeInForce.Is(order.PostOnly), Hidden: s.Hidden, AutoBorrow: s.AutoBorrow, AutoRepay: s.AutoBorrow, @@ -1033,7 +1032,7 @@ func (ku *Kucoin) GetOrderInfo(ctx context.Context, orderID string, pair currenc Price: orderDetail.Price, Date: orderDetail.CreatedAt.Time(), HiddenOrder: orderDetail.Hidden, - PostOnly: orderDetail.PostOnly, + TimeInForce: StringToTimeInForce(orderDetail.TimeInForce, orderDetail.PostOnly), ReduceOnly: orderDetail.ReduceOnly, Leverage: orderDetail.Leverage, AverageExecutedPrice: orderDetail.Price, @@ -1104,7 +1103,7 @@ func (ku *Kucoin) GetOrderInfo(ctx context.Context, orderID string, pair currenc Price: orderDetail.Price.Float64(), Date: orderDetail.CreatedAt.Time(), HiddenOrder: orderDetail.Hidden, - PostOnly: orderDetail.PostOnly, + TimeInForce: StringToTimeInForce(orderDetail.TimeInForce, orderDetail.PostOnly), AverageExecutedPrice: orderDetail.Price.Float64(), FeeAsset: currency.NewCode(orderDetail.FeeCurrency), ClientOrderID: orderDetail.ClientOID, @@ -1276,7 +1275,7 @@ func (ku *Kucoin) GetActiveOrders(ctx context.Context, getOrdersRequest *order.M Side: side, Type: oType, Pair: dPair, - PostOnly: futuresOrders.Items[x].PostOnly, + TimeInForce: StringToTimeInForce(futuresOrders.Items[x].TimeInForce, futuresOrders.Items[x].PostOnly), ReduceOnly: futuresOrders.Items[x].ReduceOnly, Status: status, SettlementCurrency: currency.NewCode(futuresOrders.Items[x].SettleCurrency), @@ -1372,7 +1371,7 @@ func (ku *Kucoin) GetActiveOrders(ctx context.Context, getOrdersRequest *order.M Side: side, Type: order.Stop, Pair: dPair, - PostOnly: response.Items[a].PostOnly, + TimeInForce: StringToTimeInForce(response.Items[a].TimeInForce, response.Items[a].PostOnly), Status: status, AssetType: getOrdersRequest.AssetType, HiddenOrder: response.Items[a].Hidden, @@ -1610,7 +1609,7 @@ func (ku *Kucoin) GetOrderHistory(ctx context.Context, getOrdersRequest *order.M Side: side, Type: order.Stop, Pair: dPair, - PostOnly: response.Items[a].PostOnly, + TimeInForce: StringToTimeInForce(response.Items[a].TimeInForce, response.Items[a].PostOnly), Status: status, AssetType: getOrdersRequest.AssetType, HiddenOrder: response.Items[a].Hidden, @@ -2455,3 +2454,22 @@ func (ku *Kucoin) GetCurrencyTradeURL(_ context.Context, a asset.Item, cp curren return "", fmt.Errorf("%w %v", asset.ErrNotSupported, a) } } + +// StringToTimeInForce returns an order.TimeInForder instance from string +func StringToTimeInForce(tif string, postOnly bool) order.TimeInForce { + var out order.TimeInForce + switch tif { + case "GTT": + out = order.GoodTillTime + case "IOC": + out = order.ImmediateOrCancel + case "FOK": + out = order.FillOrKill + default: + out = order.GoodTillCancel + } + if postOnly { + out |= order.PostOnly + } + return out +} diff --git a/exchanges/lbank/lbank_wrapper.go b/exchanges/lbank/lbank_wrapper.go index 78555e278da..d1c7f5b5520 100644 --- a/exchanges/lbank/lbank_wrapper.go +++ b/exchanges/lbank/lbank_wrapper.go @@ -850,7 +850,7 @@ func (l *Lbank) GetHistoricCandles(ctx context.Context, pair currency.Pair, a as data, err := l.GetKlines(ctx, req.RequestFormatted.String(), - strconv.FormatInt(req.RequestLimit, 10), + strconv.FormatUint(req.RequestLimit, 10), l.FormatExchangeKlineInterval(req.ExchangeInterval), strconv.FormatInt(req.Start.Unix(), 10)) if err != nil { @@ -883,7 +883,7 @@ func (l *Lbank) GetHistoricCandlesExtended(ctx context.Context, pair currency.Pa var data []KlineResponse data, err = l.GetKlines(ctx, req.RequestFormatted.String(), - strconv.FormatInt(req.RequestLimit, 10), + strconv.FormatUint(req.RequestLimit, 10), l.FormatExchangeKlineInterval(req.ExchangeInterval), strconv.FormatInt(req.RangeHolder.Ranges[x].Start.Ticks, 10)) if err != nil { diff --git a/exchanges/margin/margin.go b/exchanges/margin/margin.go index ce6386e7c6f..d8d5007fd47 100644 --- a/exchanges/margin/margin.go +++ b/exchanges/margin/margin.go @@ -23,6 +23,11 @@ func (t *Type) UnmarshalJSON(d []byte) error { return err } +// MarshalJSON conforms type to the json.Marshaler interface +func (t Type) MarshalJSON() ([]byte, error) { + return json.Marshal(t.String()) +} + // String returns the string representation of the margin type in lowercase // the absence of a lower func should hopefully highlight that String is lower func (t Type) String() string { @@ -37,10 +42,9 @@ func (t Type) String() string { return spotIsolatedStr case NoMargin: return cashStr - case Unknown: + default: return unknownStr } - return "" } // Upper returns the upper case string representation of the margin type diff --git a/exchanges/margin/margin_test.go b/exchanges/margin/margin_test.go index 32fbe561344..f0401b5f179 100644 --- a/exchanges/margin/margin_test.go +++ b/exchanges/margin/margin_test.go @@ -1,6 +1,7 @@ package margin import ( + "fmt" "strings" "testing" @@ -33,6 +34,7 @@ func TestUnmarshalJSON(t *testing.T) { "spotIsolated": {`{"margin":"spot_isolated"}`, SpotIsolated, nil}, "invalid": {`{"margin":"hello moto"}`, Unknown, ErrInvalidMarginType}, "unset": {`{"margin":""}`, Unset, nil}, + "": {`{"margin":""}`, Unset, nil}, } { t.Run(name, func(t *testing.T) { t.Parallel() @@ -46,6 +48,28 @@ func TestUnmarshalJSON(t *testing.T) { } } +func TestMarshalJSON(t *testing.T) { + t.Parallel() + for _, tc := range []struct { + in Type + want string + }{ + {Isolated, fmt.Sprintf(`%q`, isolatedStr)}, + {Multi, fmt.Sprintf(`%q`, multiStr)}, + {NoMargin, fmt.Sprintf(`%q`, cashStr)}, + {SpotIsolated, fmt.Sprintf(`%q`, spotIsolatedStr)}, + {Type(uint8(123)), fmt.Sprintf(`%q`, unknownStr)}, + {Unset, fmt.Sprintf(`%q`, unsetStr)}, + } { + t.Run(tc.want, func(t *testing.T) { + t.Parallel() + resp, err := json.Marshal(tc.in) + require.NoError(t, err) + assert.Equal(t, tc.want, string(resp)) + }) + } +} + func TestString(t *testing.T) { t.Parallel() assert.Equal(t, unknownStr, Unknown.String()) @@ -54,7 +78,8 @@ func TestString(t *testing.T) { assert.Equal(t, unsetStr, Unset.String()) assert.Equal(t, spotIsolatedStr, SpotIsolated.String()) assert.Equal(t, cashStr, NoMargin.String()) - assert.Equal(t, "", Type(30).String()) + assert.Equal(t, unknownStr, Type(30).String()) + assert.Equal(t, "", Unset.String()) } func TestUpper(t *testing.T) { diff --git a/exchanges/okx/helpers.go b/exchanges/okx/helpers.go index 6f79a4ae5f8..1b4c0408da1 100644 --- a/exchanges/okx/helpers.go +++ b/exchanges/okx/helpers.go @@ -12,45 +12,55 @@ import ( ) // orderTypeFromString returns order.Type instance from string -func orderTypeFromString(orderType string) (order.Type, error) { +func orderTypeFromString(orderType string) (order.Type, order.TimeInForce, error) { orderType = strings.ToLower(orderType) switch orderType { case orderMarket: - return order.Market, nil + return order.Market, order.UnsetTIF, nil case orderLimit: - return order.Limit, nil + return order.Limit, order.UnsetTIF, nil case orderPostOnly: - return order.PostOnly, nil + return order.Limit, order.PostOnly, nil case orderFOK: - return order.FillOrKill, nil + return order.Limit, order.FillOrKill, nil case orderIOC: - return order.ImmediateOrCancel, nil + return order.Limit, order.ImmediateOrCancel, nil case orderOptimalLimitIOC: - return order.OptimalLimitIOC, nil + return order.OptimalLimitIOC, order.ImmediateOrCancel, nil case "mmp": - return order.MarketMakerProtection, nil + return order.MarketMakerProtection, order.UnsetTIF, nil case "mmp_and_post_only": - return order.MarketMakerProtectionAndPostOnly, nil + return order.MarketMakerProtectionAndPostOnly, order.PostOnly, nil case "twap": - return order.TWAP, nil + return order.TWAP, order.UnsetTIF, nil case "move_order_stop": - return order.TrailingStop, nil + return order.TrailingStop, 0, nil case "chase": - return order.Chase, nil + return order.Chase, order.UnsetTIF, nil default: - return order.UnknownType, fmt.Errorf("%w %v", order.ErrTypeIsInvalid, orderType) + return order.UnknownType, order.UnsetTIF, fmt.Errorf("%w %v", order.ErrTypeIsInvalid, orderType) } } // orderTypeString returns a string representation of order.Type instance -func orderTypeString(orderType order.Type) (string, error) { - switch orderType { +func orderTypeString(orderType order.Type, tif order.TimeInForce) (string, error) { + switch tif { + case order.PostOnly: + return orderPostOnly, nil + case order.FillOrKill: + return orderFOK, nil case order.ImmediateOrCancel: - return "ioc", nil - case order.Market, order.Limit, order.Trigger, - order.PostOnly, order.FillOrKill, order.OptimalLimitIOC, - order.MarketMakerProtection, order.MarketMakerProtectionAndPostOnly, - order.Chase, order.TWAP, order.OCO: + return orderIOC, nil + } + switch orderType { + case order.Market, order.Limit, + order.Trigger, + order.OptimalLimitIOC, + order.MarketMakerProtection, + order.MarketMakerProtectionAndPostOnly, + order.Chase, + order.TWAP, + order.OCO: return orderType.Lower(), nil case order.ConditionalStop: return "conditional", nil diff --git a/exchanges/okx/okx.go b/exchanges/okx/okx.go index 7fccaaae8f2..b0f9ad62bb1 100644 --- a/exchanges/okx/okx.go +++ b/exchanges/okx/okx.go @@ -5224,7 +5224,7 @@ func (ok *Okx) GetInsuranceFundInformation(ctx context.Context, arg *InsuranceFu } // CurrencyUnitConvert convert currency to contract, or contract to currency -func (ok *Okx) CurrencyUnitConvert(ctx context.Context, instrumentID string, quantity, orderPrice float64, convertType uint, unitOfCcy currency.Code, operationTypeOpen bool) (*UnitConvertResponse, error) { +func (ok *Okx) CurrencyUnitConvert(ctx context.Context, instrumentID string, quantity, orderPrice float64, convertType uint64, unitOfCcy currency.Code, operationTypeOpen bool) (*UnitConvertResponse, error) { if instrumentID == "" { return nil, errMissingInstrumentID } @@ -5238,7 +5238,7 @@ func (ok *Okx) CurrencyUnitConvert(ctx context.Context, instrumentID string, qua params.Set("px", strconv.FormatFloat(orderPrice, 'f', 0, 64)) } if convertType > 0 { - params.Set("type", strconv.Itoa(int(convertType))) + params.Set("type", strconv.FormatUint(convertType, 10)) } switch unitOfCcy { case currency.USDC, currency.USDT: diff --git a/exchanges/okx/okx_test.go b/exchanges/okx/okx_test.go index e3494a29c0a..7c13b92a34d 100644 --- a/exchanges/okx/okx_test.go +++ b/exchanges/okx/okx_test.go @@ -6285,28 +6285,32 @@ func TestGetAccountInstruments(t *testing.T) { func TestOrderTypeString(t *testing.T) { t.Parallel() - var orderTypesToStringMap = map[order.Type]struct { + type OrderTypeWithTIF struct { + OrderType order.Type + TIF order.TimeInForce + } + var orderTypesToStringMap = map[OrderTypeWithTIF]struct { Expected string Error error }{ - order.Market: {Expected: orderMarket}, - order.Limit: {Expected: orderLimit}, - order.PostOnly: {Expected: orderPostOnly}, - order.FillOrKill: {Expected: orderFOK}, - order.ImmediateOrCancel: {Expected: orderIOC}, - order.OptimalLimitIOC: {Expected: orderOptimalLimitIOC}, - order.MarketMakerProtection: {Expected: "mmp"}, - order.MarketMakerProtectionAndPostOnly: {Expected: "mmp_and_post_only"}, - order.Liquidation: {Error: order.ErrUnsupportedOrderType}, - order.OCO: {Expected: "oco"}, - order.TrailingStop: {Expected: "move_order_stop"}, - order.Chase: {Expected: "chase"}, - order.TWAP: {Expected: "twap"}, - order.ConditionalStop: {Expected: "conditional"}, - order.Trigger: {Expected: "trigger"}, + {OrderType: order.Market, TIF: order.UnsetTIF}: {Expected: orderMarket}, + {OrderType: order.Limit, TIF: order.UnsetTIF}: {Expected: orderLimit}, + {OrderType: order.Limit, TIF: order.PostOnly}: {Expected: orderPostOnly}, + {OrderType: order.Limit, TIF: order.FillOrKill}: {Expected: orderFOK}, + {OrderType: order.Limit, TIF: order.ImmediateOrCancel}: {Expected: orderIOC}, + {OrderType: order.OptimalLimitIOC, TIF: order.UnsetTIF}: {Expected: orderOptimalLimitIOC}, + {OrderType: order.MarketMakerProtection, TIF: order.UnsetTIF}: {Expected: "mmp"}, + {OrderType: order.MarketMakerProtectionAndPostOnly, TIF: order.UnsetTIF}: {Expected: "mmp_and_post_only"}, + {OrderType: order.Liquidation, TIF: order.UnsetTIF}: {Error: order.ErrUnsupportedOrderType}, + {OrderType: order.OCO, TIF: order.UnsetTIF}: {Expected: "oco"}, + {OrderType: order.TrailingStop, TIF: order.UnsetTIF}: {Expected: "move_order_stop"}, + {OrderType: order.Chase, TIF: order.UnsetTIF}: {Expected: "chase"}, + {OrderType: order.TWAP, TIF: order.UnsetTIF}: {Expected: "twap"}, + {OrderType: order.ConditionalStop, TIF: order.UnsetTIF}: {Expected: "conditional"}, + {OrderType: order.Trigger, TIF: order.UnsetTIF}: {Expected: "trigger"}, } - for oType, val := range orderTypesToStringMap { - orderTypeString, err := orderTypeString(oType) + for tc, val := range orderTypesToStringMap { + orderTypeString, err := orderTypeString(tc.OrderType, tc.TIF) require.ErrorIs(t, err, val.Error) assert.Equal(t, val.Expected, orderTypeString) } @@ -6571,29 +6575,32 @@ func TestWsProcessSpreadTradesJSON(t *testing.T) { func TestOrderTypeFromString(t *testing.T) { t.Parallel() + orderTypeStrings := map[string]struct { OType order.Type + TIF order.TimeInForce Error error }{ "market": {OType: order.Market}, "LIMIT": {OType: order.Limit}, "limit": {OType: order.Limit}, - "post_only": {OType: order.PostOnly}, - "fok": {OType: order.FillOrKill}, - "ioc": {OType: order.ImmediateOrCancel}, - "optimal_limit_ioc": {OType: order.OptimalLimitIOC}, + "post_only": {OType: order.Limit, TIF: order.PostOnly}, + "fok": {OType: order.Limit, TIF: order.FillOrKill}, + "ioc": {OType: order.Limit, TIF: order.ImmediateOrCancel}, + "optimal_limit_ioc": {OType: order.OptimalLimitIOC, TIF: order.ImmediateOrCancel}, "mmp": {OType: order.MarketMakerProtection}, - "mmp_and_post_only": {OType: order.MarketMakerProtectionAndPostOnly}, + "mmp_and_post_only": {OType: order.MarketMakerProtectionAndPostOnly, TIF: order.PostOnly}, "trigger": {OType: order.UnknownType, Error: order.ErrTypeIsInvalid}, "chase": {OType: order.Chase}, "move_order_stop": {OType: order.TrailingStop}, "twap": {OType: order.TWAP}, "abcd": {OType: order.UnknownType, Error: order.ErrTypeIsInvalid}, } - for a := range orderTypeStrings { - oType, err := orderTypeFromString(a) - assert.ErrorIs(t, err, orderTypeStrings[a].Error) - assert.Equal(t, oType, orderTypeStrings[a].OType) + for s, exp := range orderTypeStrings { + oType, tif, err := orderTypeFromString(s) + require.ErrorIs(t, err, exp.Error) + assert.Equal(t, exp.OType, oType) + assert.Equal(t, exp.TIF.String(), tif.String(), s) } } diff --git a/exchanges/okx/okx_websocket.go b/exchanges/okx/okx_websocket.go index 224203fd080..9df8cc31260 100644 --- a/exchanges/okx/okx_websocket.go +++ b/exchanges/okx/okx_websocket.go @@ -580,14 +580,12 @@ func (ok *Okx) WsHandleData(respRaw []byte) error { case channelOpenInterest: var response WSOpenInterestResponse return ok.wsProcessPushData(respRaw, &response) - case channelTrades, - channelAllTrades: + case channelTrades, channelAllTrades: return ok.wsProcessTrades(respRaw) case channelEstimatedPrice: var response WsDeliveryEstimatedPrice return ok.wsProcessPushData(respRaw, &response) - case channelMarkPrice, - channelPriceLimit: + case channelMarkPrice, channelPriceLimit: var response WsMarkPrice return ok.wsProcessPushData(respRaw, &response) case channelOrderBooks5: @@ -695,7 +693,7 @@ func (ok *Okx) wsProcessSpreadTrades(respRaw []byte) error { Price: resp.Data[x].FillPrice.Float64(), } } - return trade.AddTradesToBuffer(ok.Name, trades...) + return trade.AddTradesToBuffer(trades...) } // wsProcessSpreadOrders retrieve order information from the sprd-order Websocket channel. @@ -874,7 +872,7 @@ func (ok *Okx) wsProcessPublicSpreadTrades(respRaw []byte) error { Timestamp: data[x].Timestamp.Time(), } } - return trade.AddTradesToBuffer(ok.Name, trades...) + return trade.AddTradesToBuffer(trades...) } // wsProcessSpreadOrderbook process spread orderbook data. @@ -900,7 +898,8 @@ func (ok *Okx) wsProcessSpreadOrderbook(respRaw []byte) error { LastUpdated: resp.Data[x].Timestamp.Time(), Pair: pair, Exchange: ok.Name, - VerifyOrderbook: ok.CanVerifyOrderbook}) + VerifyOrderbook: ok.CanVerifyOrderbook, + }) if err != nil { return err } @@ -949,7 +948,8 @@ func (ok *Okx) wsProcessOrderbook5(data []byte) error { LastUpdated: resp.Data[0].Timestamp.Time(), Pair: pair, Exchange: ok.Name, - VerifyOrderbook: ok.CanVerifyOrderbook}) + VerifyOrderbook: ok.CanVerifyOrderbook, + }) if err != nil { return err } @@ -986,7 +986,7 @@ func (ok *Okx) wsProcessOptionTrades(data []byte) error { Price: resp.Data[i].Price.Float64(), } } - return trade.AddTradesToBuffer(ok.Name, trades...) + return trade.AddTradesToBuffer(trades...) } // wsProcessOrderBooks processes "snapshot" and "update" order book @@ -1066,7 +1066,7 @@ func (ok *Okx) WsProcessSnapshotOrderBook(data *WsOrderBookData, pair currency.P pair, err) } - if signedChecksum != data.Checksum { + if signedChecksum != uint32(data.Checksum) { //nolint:gosec // Requires type casting return fmt.Errorf("%w %v", errInvalidChecksum, pair) @@ -1115,7 +1115,7 @@ func (ok *Okx) WsProcessUpdateOrderbook(data *WsOrderBookData, pair currency.Pai if err != nil { return err } - update.Checksum = uint32(data.Checksum) + update.Checksum = uint32(data.Checksum) //nolint:gosec // Requires type casting for i := range assets { ob := update ob.Asset = assets[i] @@ -1163,7 +1163,7 @@ func (ok *Okx) CalculateUpdateOrderbookChecksum(orderbookData *orderbook.Base, c } // CalculateOrderbookChecksum alternates over the first 25 bid and ask entries from websocket data. -func (ok *Okx) CalculateOrderbookChecksum(orderbookData *WsOrderBookData) (int32, error) { +func (ok *Okx) CalculateOrderbookChecksum(orderbookData *WsOrderBookData) (uint32, error) { var checksum strings.Builder for i := range allowableIterations { if len(orderbookData.Bids)-1 >= i { @@ -1185,7 +1185,7 @@ func (ok *Okx) CalculateOrderbookChecksum(orderbookData *WsOrderBookData) (int32 } } checksumStr := strings.TrimSuffix(checksum.String(), wsOrderbookChecksumDelimiter) - return int32(crc32.ChecksumIEEE([]byte(checksumStr))), nil + return crc32.ChecksumIEEE([]byte(checksumStr)), nil } // wsHandleMarkPriceCandles processes candlestick mark price push data as a result of subscription to "mark-price-candle*" channel. @@ -1251,7 +1251,7 @@ func (ok *Okx) wsProcessTrades(data []byte) error { }) } } - return trade.AddTradesToBuffer(ok.Name, trades...) + return trade.AddTradesToBuffer(trades...) } // wsProcessOrders handles websocket order push data responses. @@ -1500,7 +1500,7 @@ func (ok *Okx) wsProcessBlockPublicTrades(data []byte) error { Price: resp.Data[i].Price.Float64(), } } - return trade.AddTradesToBuffer(ok.Name, trades...) + return trade.AddTradesToBuffer(trades...) } // wsProcessPushData processes push data coming through the websocket channel diff --git a/exchanges/okx/okx_wrapper.go b/exchanges/okx/okx_wrapper.go index fe3a3a69249..b4fa54240cd 100644 --- a/exchanges/okx/okx_wrapper.go +++ b/exchanges/okx/okx_wrapper.go @@ -791,7 +791,7 @@ func (ok *Okx) GetRecentTrades(ctx context.Context, p currency.Pair, assetType a return nil, fmt.Errorf("%w %v", asset.ErrNotSupported, assetType) } if ok.IsSaveTradeDataEnabled() { - err = trade.AddTradesToBuffer(ok.Name, resp...) + err = trade.AddTradesToBuffer(resp...) if err != nil { return nil, err } @@ -847,7 +847,7 @@ allTrades: tradeIDEnd = trades[len(trades)-1].TradeID } if ok.IsSaveTradeDataEnabled() { - err = trade.AddTradesToBuffer(ok.Name, resp...) + err = trade.AddTradesToBuffer(resp...) if err != nil { return nil, err } @@ -916,7 +916,7 @@ func (ok *Okx) SubmitOrder(ctx context.Context, s *order.Submit) (*order.SubmitR } return s.DeriveSubmitResponse(placeSpreadOrderResponse.OrderID) } - orderTypeString, err := orderTypeString(s.Type) + orderTypeString, err := orderTypeString(s.Type, s.TimeInForce) if err != nil { return nil, err } @@ -924,7 +924,7 @@ func (ok *Okx) SubmitOrder(ctx context.Context, s *order.Submit) (*order.SubmitR var result *AlgoOrder switch orderTypeString { case orderLimit, orderMarket, orderPostOnly, orderFOK, orderIOC, orderOptimalLimitIOC, "mmp", "mmp_and_post_only": - var orderRequest = &PlaceOrderRequestParam{ + orderRequest := &PlaceOrderRequestParam{ InstrumentID: pairString, TradeMode: tradeMode, Side: sideType, @@ -1149,8 +1149,7 @@ func (ok *Okx) ModifyOrder(ctx context.Context, action *order.Modify) (*order.Mo return nil, currency.ErrCurrencyPairEmpty } switch action.Type { - case order.UnknownType, order.Market, order.Limit, order.PostOnly, order.FillOrKill, order.ImmediateOrCancel, - order.OptimalLimitIOC, order.MarketMakerProtection, order.MarketMakerProtectionAndPostOnly: + case order.UnknownType, order.Market, order.Limit, order.OptimalLimitIOC, order.MarketMakerProtection, order.MarketMakerProtectionAndPostOnly: amendRequest := AmendOrderRequestParams{ InstrumentID: pairFormat.Format(action.Pair), NewQuantity: action.Amount, @@ -1254,8 +1253,7 @@ func (ok *Okx) CancelOrder(ctx context.Context, ord *order.Cancel) error { } instrumentID := pairFormat.Format(ord.Pair) switch ord.Type { - case order.UnknownType, order.Market, order.Limit, order.PostOnly, order.FillOrKill, order.ImmediateOrCancel, - order.OptimalLimitIOC, order.MarketMakerProtection, order.MarketMakerProtectionAndPostOnly: + case order.UnknownType, order.Market, order.Limit, order.OptimalLimitIOC, order.MarketMakerProtection, order.MarketMakerProtectionAndPostOnly: req := CancelOrderRequestParam{ InstrumentID: instrumentID, OrderID: ord.OrderID, @@ -1312,8 +1310,7 @@ func (ok *Okx) CancelBatchOrders(ctx context.Context, o []order.Cancel) (*order. return nil, currency.ErrCurrencyPairsEmpty } switch ord.Type { - case order.UnknownType, order.Market, order.Limit, order.PostOnly, order.FillOrKill, order.ImmediateOrCancel, - order.OptimalLimitIOC, order.MarketMakerProtection, order.MarketMakerProtectionAndPostOnly: + case order.UnknownType, order.Market, order.Limit, order.OptimalLimitIOC, order.MarketMakerProtection, order.MarketMakerProtectionAndPostOnly: if o[x].ClientID == "" && o[x].OrderID == "" { return nil, fmt.Errorf("%w, order ID required for order of type %v", order.ErrOrderIDNotSet, o[x].Type) } @@ -1406,7 +1403,7 @@ func (ok *Okx) CancelAllOrders(ctx context.Context, orderCancellation *order.Can } var oType string if orderCancellation.Type != order.UnknownType && orderCancellation.Type != order.AnyType { - oType, err = orderTypeString(orderCancellation.Type) + oType, err = orderTypeString(orderCancellation.Type, orderCancellation.TimeInForce) if err != nil { return order.CancelAllResponse{}, err } @@ -1562,7 +1559,7 @@ func (ok *Okx) GetOrderInfo(ctx context.Context, orderID string, pair currency.P if err != nil { return nil, err } - orderType, err := orderTypeFromString(orderDetail.OrderType) + orderType, tif, err := orderTypeFromString(orderDetail.OrderType) if err != nil { return nil, err } @@ -1582,6 +1579,7 @@ func (ok *Okx) GetOrderInfo(ctx context.Context, orderID string, pair currency.P ExecutedAmount: orderDetail.RebateAmount.Float64(), Date: orderDetail.CreationTime.Time(), LastUpdated: orderDetail.UpdateTime.Time(), + TimeInForce: tif, }, nil } @@ -1727,7 +1725,7 @@ func (ok *Okx) GetActiveOrders(ctx context.Context, req *order.MultiOrderRequest instrumentType := GetInstrumentTypeFromAssetItem(req.AssetType) var orderType string if req.Type != order.UnknownType && req.Type != order.AnyType { - orderType, err = orderTypeString(req.Type) + orderType, err = orderTypeString(req.Type, req.TimeInForce) if err != nil { return nil, err } @@ -1771,13 +1769,11 @@ allOrders: continue } } - var orderStatus order.Status - orderStatus, err = order.StringToOrderStatus(strings.ToUpper(orderList[i].State)) + orderStatus, err := order.StringToOrderStatus(strings.ToUpper(orderList[i].State)) if err != nil { return nil, err } - var oType order.Type - oType, err = orderTypeFromString(orderList[i].OrderType) + oType, tif, err := orderTypeFromString(orderList[i].OrderType) if err != nil { return nil, err } @@ -1798,6 +1794,7 @@ allOrders: AssetType: req.AssetType, Date: orderList[i].CreationTime.Time(), LastUpdated: orderList[i].UpdateTime.Time(), + TimeInForce: tif, }) } if len(orderList) < 100 { @@ -1825,7 +1822,7 @@ func (ok *Okx) GetOrderHistory(ctx context.Context, req *order.MultiOrderRequest var resp []order.Detail // For Spread orders. if req.AssetType == asset.Spread { - oType, err := orderTypeString(req.Type) + oType, err := orderTypeString(req.Type, req.TimeInForce) if err != nil { return nil, err } @@ -1911,17 +1908,14 @@ allOrders: if !req.Pairs[j].Equal(pair) { continue } - var orderStatus order.Status - orderStatus, err = order.StringToOrderStatus(strings.ToUpper(orderList[i].State)) + orderStatus, err := order.StringToOrderStatus(strings.ToUpper(orderList[i].State)) if err != nil { log.Errorf(log.ExchangeSys, "%s %v", ok.Name, err) } if orderStatus == order.Active { continue } - orderSide := orderList[i].Side - var oType order.Type - oType, err = orderTypeFromString(orderList[i].OrderType) + oType, tif, err := orderTypeFromString(orderList[i].OrderType) if err != nil { return nil, err } @@ -1947,7 +1941,7 @@ allOrders: OrderID: orderList[i].OrderID, ClientOrderID: orderList[i].ClientOrderID, Type: oType, - Side: orderSide, + Side: orderList[i].Side, Status: orderStatus, AssetType: req.AssetType, Date: orderList[i].CreationTime.Time(), @@ -1955,6 +1949,7 @@ allOrders: Pair: pair, Cost: orderList[i].AveragePrice.Float64() * orderList[i].AccumulatedFillSize.Float64(), CostAsset: currency.NewCode(orderList[i].RebateCurrency), + TimeInForce: tif, }) } } @@ -2478,13 +2473,11 @@ func (ok *Okx) GetFuturesPositionSummary(ctx context.Context, req *futures.Posit if len(acc) != 1 { return nil, fmt.Errorf("%w, received '%v'", errOnlyOneResponseExpected, len(acc)) } - var ( - freeCollateral, totalCollateral, equityOfCurrency, frozenBalance, + var freeCollateral, totalCollateral, equityOfCurrency, frozenBalance, availableEquity, cashBalance, discountEquity, equityUSD, totalEquity, isolatedEquity, isolatedLiabilities, isolatedUnrealisedProfit, notionalLeverage, strategyEquity decimal.Decimal - ) for i := range acc[0].Details { if !acc[0].Details[i].Currency.Equal(positionSummary.Currency) { @@ -2622,14 +2615,11 @@ func (ok *Okx) GetFuturesPositionOrders(ctx context.Context, req *futures.Positi if req.Pairs[i].String() != positions[j].InstrumentID { continue } - var orderStatus order.Status - orderStatus, err = order.StringToOrderStatus(strings.ToUpper(positions[j].State)) + orderStatus, err := order.StringToOrderStatus(strings.ToUpper(positions[j].State)) if err != nil { log.Errorf(log.ExchangeSys, "%s %v", ok.Name, err) } - orderSide := positions[j].Side - var oType order.Type - oType, err = orderTypeFromString(positions[j].OrderType) + oType, tif, err := orderTypeFromString(positions[j].OrderType) if err != nil { return nil, err } @@ -2660,7 +2650,7 @@ func (ok *Okx) GetFuturesPositionOrders(ctx context.Context, req *futures.Positi OrderID: positions[j].OrderID, ClientOrderID: positions[j].ClientOrderID, Type: oType, - Side: orderSide, + Side: positions[j].Side, Status: orderStatus, AssetType: req.Asset, Date: positions[j].CreationTime.Time(), @@ -2668,6 +2658,7 @@ func (ok *Okx) GetFuturesPositionOrders(ctx context.Context, req *futures.Positi Pair: req.Pairs[i], Cost: cost, CostAsset: currency.NewCode(positions[j].RebateCurrency), + TimeInForce: tif, }) } } diff --git a/exchanges/order/limits_test.go b/exchanges/order/limits_test.go index 072c9c5ac4c..3b11f2aa2cd 100644 --- a/exchanges/order/limits_test.go +++ b/exchanges/order/limits_test.go @@ -1,10 +1,11 @@ package order import ( - "errors" "testing" "github.com/shopspring/decimal" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/thrasher-corp/gocryptotrader/currency" "github.com/thrasher-corp/gocryptotrader/exchanges/asset" ) @@ -19,9 +20,7 @@ func TestLoadLimits(t *testing.T) { t.Parallel() e := ExecutionLimits{} err := e.LoadLimits(nil) - if !errors.Is(err, errCannotLoadLimit) { - t.Fatalf("expected error %v but received %v", errCannotLoadLimit, err) - } + assert.ErrorIs(t, err, errCannotLoadLimit) invalidAsset := []MinMaxLevel{ { @@ -33,11 +32,7 @@ func TestLoadLimits(t *testing.T) { }, } err = e.LoadLimits(invalidAsset) - if !errors.Is(err, asset.ErrNotSupported) { - t.Fatalf("expected error %v but received %v", - asset.ErrNotSupported, - err) - } + require.ErrorIs(t, err, asset.ErrNotSupported) invalidPairLoading := []MinMaxLevel{ { @@ -50,9 +45,7 @@ func TestLoadLimits(t *testing.T) { } err = e.LoadLimits(invalidPairLoading) - if !errors.Is(err, currency.ErrCurrencyPairEmpty) { - t.Fatalf("expected error %v but received %v", currency.ErrCurrencyPairEmpty, err) - } + assert.ErrorIs(t, err, currency.ErrCurrencyPairEmpty) newLimits := []MinMaxLevel{ { @@ -66,9 +59,7 @@ func TestLoadLimits(t *testing.T) { } err = e.LoadLimits(newLimits) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + require.NoError(t, err) badLimit := []MinMaxLevel{ { @@ -82,9 +73,7 @@ func TestLoadLimits(t *testing.T) { } err = e.LoadLimits(badLimit) - if !errors.Is(err, errInvalidPriceLevels) { - t.Fatalf("expected error %v but received %v", errInvalidPriceLevels, err) - } + require.ErrorIs(t, err, errInvalidPriceLevels) badLimit = []MinMaxLevel{ { @@ -98,9 +87,7 @@ func TestLoadLimits(t *testing.T) { } err = e.LoadLimits(badLimit) - if !errors.Is(err, errInvalidAmountLevels) { - t.Fatalf("expected error %v but received %v", errInvalidPriceLevels, err) - } + require.ErrorIs(t, err, errInvalidAmountLevels) goodLimit := []MinMaxLevel{ { @@ -110,9 +97,7 @@ func TestLoadLimits(t *testing.T) { } err = e.LoadLimits(goodLimit) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + require.NoError(t, err) noCompare := []MinMaxLevel{ { @@ -123,9 +108,7 @@ func TestLoadLimits(t *testing.T) { } err = e.LoadLimits(noCompare) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + require.NoError(t, err) noCompare = []MinMaxLevel{ { @@ -136,18 +119,14 @@ func TestLoadLimits(t *testing.T) { } err = e.LoadLimits(noCompare) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + assert.NoError(t, err) } func TestGetOrderExecutionLimits(t *testing.T) { t.Parallel() e := ExecutionLimits{} _, err := e.GetOrderExecutionLimits(asset.Spot, btcusd) - if !errors.Is(err, ErrExchangeLimitNotLoaded) { - t.Fatalf("expected error %v but received %v", ErrExchangeLimitNotLoaded, err) - } + require.ErrorIs(t, err, ErrExchangeLimitNotLoaded) newLimits := []MinMaxLevel{ { @@ -161,45 +140,31 @@ func TestGetOrderExecutionLimits(t *testing.T) { } err = e.LoadLimits(newLimits) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", errCannotLoadLimit, err) - } + require.NoError(t, err) _, err = e.GetOrderExecutionLimits(asset.Futures, ltcusd) - if !errors.Is(err, ErrCannotValidateAsset) { - t.Fatalf("expected error %v but received %v", ErrCannotValidateAsset, err) - } + require.ErrorIs(t, err, ErrCannotValidateAsset) _, err = e.GetOrderExecutionLimits(asset.Spot, ltcusd) - if !errors.Is(err, errExchangeLimitBase) { - t.Fatalf("expected error %v but received %v", errExchangeLimitBase, err) - } + require.ErrorIs(t, err, errExchangeLimitBase) _, err = e.GetOrderExecutionLimits(asset.Spot, btcltc) - if !errors.Is(err, errExchangeLimitQuote) { - t.Fatalf("expected error %v but received %v", errExchangeLimitQuote, err) - } + require.ErrorIs(t, err, errExchangeLimitQuote) tt, err := e.GetOrderExecutionLimits(asset.Spot, btcusd) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + require.NoError(t, err) - if tt.MaximumBaseAmount != newLimits[0].MaximumBaseAmount || + assert.False(t, tt.MaximumBaseAmount != newLimits[0].MaximumBaseAmount || tt.MinimumBaseAmount != newLimits[0].MinimumBaseAmount || tt.MaxPrice != newLimits[0].MaxPrice || - tt.MinPrice != newLimits[0].MinPrice { - t.Fatal("unexpected values") - } + tt.MinPrice != newLimits[0].MinPrice) } func TestCheckLimit(t *testing.T) { t.Parallel() e := ExecutionLimits{} err := e.CheckOrderExecutionLimits(asset.Spot, btcusd, 1337, 1337, Limit) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + require.NoError(t, err) newLimits := []MinMaxLevel{ { @@ -213,97 +178,63 @@ func TestCheckLimit(t *testing.T) { } err = e.LoadLimits(newLimits) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", errCannotLoadLimit, err) - } + require.NoError(t, err) err = e.CheckOrderExecutionLimits(asset.Futures, ltcusd, 1337, 1337, Limit) - if !errors.Is(err, ErrCannotValidateAsset) { - t.Fatalf("expected error %v but received %v", ErrCannotValidateAsset, err) - } + require.ErrorIs(t, err, ErrCannotValidateAsset) err = e.CheckOrderExecutionLimits(asset.Spot, ltcusd, 1337, 1337, Limit) - if !errors.Is(err, ErrCannotValidateBaseCurrency) { - t.Fatalf("expected error %v but received %v", ErrCannotValidateBaseCurrency, err) - } + require.ErrorIs(t, err, ErrCannotValidateBaseCurrency) err = e.CheckOrderExecutionLimits(asset.Spot, btcltc, 1337, 1337, Limit) - if !errors.Is(err, ErrCannotValidateQuoteCurrency) { - t.Fatalf("expected error %v but received %v", ErrCannotValidateQuoteCurrency, err) - } + require.ErrorIs(t, err, ErrCannotValidateQuoteCurrency) err = e.CheckOrderExecutionLimits(asset.Spot, btcusd, 1337, 9, Limit) - if !errors.Is(err, ErrPriceBelowMin) { - t.Fatalf("expected error %v but received %v", ErrPriceBelowMin, err) - } + require.ErrorIs(t, err, ErrPriceBelowMin) err = e.CheckOrderExecutionLimits(asset.Spot, btcusd, 1000001, 9, Limit) - if !errors.Is(err, ErrPriceExceedsMax) { - t.Fatalf("expected error %v but received %v", ErrPriceExceedsMax, err) - } + require.ErrorIs(t, err, ErrPriceExceedsMax) err = e.CheckOrderExecutionLimits(asset.Spot, btcusd, 999999, .5, Limit) - if !errors.Is(err, ErrAmountBelowMin) { - t.Fatalf("expected error %v but received %v", ErrAmountBelowMin, err) - } + require.ErrorIs(t, err, ErrAmountBelowMin) err = e.CheckOrderExecutionLimits(asset.Spot, btcusd, 999999, 11, Limit) - if !errors.Is(err, ErrAmountExceedsMax) { - t.Fatalf("expected error %v but received %v", ErrAmountExceedsMax, err) - } + require.ErrorIs(t, err, ErrAmountExceedsMax) err = e.CheckOrderExecutionLimits(asset.Spot, btcusd, 999999, 7, Limit) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + require.NoError(t, err) err = e.CheckOrderExecutionLimits(asset.Spot, btcusd, 999999, 7, Market) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + assert.NoError(t, err) } func TestConforms(t *testing.T) { t.Parallel() var tt MinMaxLevel err := tt.Conforms(0, 0, Limit) - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) tt = MinMaxLevel{ MinNotional: 100, } err = tt.Conforms(1, 1, Limit) - if !errors.Is(err, ErrNotionalValue) { - t.Fatalf("expected error %v but received %v", ErrNotionalValue, err) - } + require.ErrorIs(t, err, ErrNotionalValue) err = tt.Conforms(200, .5, Limit) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + require.NoError(t, err) tt.PriceStepIncrementSize = 0.001 err = tt.Conforms(200.0001, .5, Limit) - if !errors.Is(err, ErrPriceExceedsStep) { - t.Fatalf("expected error %v but received %v", ErrPriceExceedsStep, err) - } + require.ErrorIs(t, err, ErrPriceExceedsStep) err = tt.Conforms(200.004, .5, Limit) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + require.NoError(t, err) tt.AmountStepIncrementSize = 0.001 err = tt.Conforms(200, .0002, Limit) - if !errors.Is(err, ErrAmountExceedsStep) { - t.Fatalf("expected error %v but received %v", ErrAmountExceedsStep, err) - } + require.ErrorIs(t, err, ErrAmountExceedsStep) err = tt.Conforms(200000, .003, Limit) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received %v", nil, err) - } + require.NoError(t, err) tt.MinimumBaseAmount = 1 tt.MaximumBaseAmount = 10 @@ -311,115 +242,73 @@ func TestConforms(t *testing.T) { tt.MarketMaxQty = 9.9 err = tt.Conforms(200000, 1, Market) - if !errors.Is(err, ErrMarketAmountBelowMin) { - t.Fatalf("expected error %v but received: %v", ErrMarketAmountBelowMin, err) - } + require.ErrorIs(t, err, ErrMarketAmountBelowMin) err = tt.Conforms(200000, 10, Market) - if !errors.Is(err, ErrMarketAmountExceedsMax) { - t.Fatalf("expected error %v but received: %v", ErrMarketAmountExceedsMax, err) - } + require.ErrorIs(t, err, ErrMarketAmountExceedsMax) tt.MarketStepIncrementSize = 10 err = tt.Conforms(200000, 9.1, Market) - if !errors.Is(err, ErrMarketAmountExceedsStep) { - t.Fatalf("expected error %v but received: %v", ErrMarketAmountExceedsStep, err) - } + require.ErrorIs(t, err, ErrMarketAmountExceedsStep) tt.MarketStepIncrementSize = 1 err = tt.Conforms(200000, 9.1, Market) - if !errors.Is(err, nil) { - t.Fatalf("expected error %v but received: %v", nil, err) - } + assert.NoError(t, err) } func TestConformToDecimalAmount(t *testing.T) { t.Parallel() var tt MinMaxLevel - if !tt.ConformToDecimalAmount(decimal.NewFromFloat(1.001)).Equal(decimal.NewFromFloat(1.001)) { - t.Fatal("value should not be changed") - } + require.True(t, tt.ConformToDecimalAmount(decimal.NewFromFloat(1.001)).Equal(decimal.NewFromFloat(1.001))) tt = MinMaxLevel{} val := tt.ConformToDecimalAmount(decimal.NewFromInt(1)) - if !val.Equal(decimal.NewFromInt(1)) { // If there is no step amount set this should not change - // the inputted amount - t.Fatal("unexpected amount") - } + assert.True(t, val.Equal(decimal.NewFromInt(1))) // If there is no step amount set this should not change tt.AmountStepIncrementSize = 0.001 val = tt.ConformToDecimalAmount(decimal.NewFromFloat(1.001)) - if !val.Equal(decimal.NewFromFloat(1.001)) { - t.Error("unexpected amount", val) - } + assert.True(t, val.Equal(decimal.NewFromFloat(1.001))) val = tt.ConformToDecimalAmount(decimal.NewFromFloat(0.0001)) - if !val.IsZero() { - t.Error("unexpected amount", val) - } + assert.True(t, val.IsZero()) val = tt.ConformToDecimalAmount(decimal.NewFromFloat(0.7777)) - if !val.Equal(decimal.NewFromFloat(0.777)) { - t.Error("unexpected amount", val) - } + assert.True(t, val.Equal(decimal.NewFromFloat(0.777))) tt.AmountStepIncrementSize = 100 val = tt.ConformToDecimalAmount(decimal.NewFromInt(100)) - if !val.Equal(decimal.NewFromInt(100)) { - t.Fatal("unexpected amount", val) - } + assert.True(t, val.Equal(decimal.NewFromInt(100))) val = tt.ConformToDecimalAmount(decimal.NewFromInt(200)) - if !val.Equal(decimal.NewFromInt(200)) { - t.Fatal("unexpected amount", val) - } + assert.True(t, val.Equal(decimal.NewFromInt(200))) val = tt.ConformToDecimalAmount(decimal.NewFromInt(150)) - if !val.Equal(decimal.NewFromInt(100)) { - t.Fatal("unexpected amount", val) - } + assert.True(t, val.Equal(decimal.NewFromInt(100))) } func TestConformToAmount(t *testing.T) { t.Parallel() var tt MinMaxLevel - if tt.ConformToAmount(1.001) != 1.001 { - t.Fatal("value should not be changed") - } + require.Equal(t, 1.001, tt.ConformToAmount(1.001)) tt = MinMaxLevel{} val := tt.ConformToAmount(1) - if val != 1 { // If there is no step amount set this should not change - // the inputted amount - t.Fatal("unexpected amount") - } + assert.Equal(t, 1., val) // If there is no step amount set this should not change tt.AmountStepIncrementSize = 0.001 val = tt.ConformToAmount(1.001) - if val != 1.001 { - t.Error("unexpected amount", val) - } + assert.Equal(t, 1.001, val) val = tt.ConformToAmount(0.0001) - if val != 0 { - t.Error("unexpected amount", val) - } + assert.Zero(t, val) val = tt.ConformToAmount(0.7777) - if val != 0.777 { - t.Error("unexpected amount", val) - } + assert.Equal(t, 0.777, val) tt.AmountStepIncrementSize = 100 val = tt.ConformToAmount(100) - if val != 100 { - t.Fatal("unexpected amount", val) - } + assert.Equal(t, 100., val) val = tt.ConformToAmount(200) - if val != 200 { - t.Fatal("unexpected amount", val) - } + require.Equal(t, 200., val) val = tt.ConformToAmount(150) - if val != 100 { - t.Fatal("unexpected amount", val) - } + assert.Equal(t, 100., val) } diff --git a/exchanges/order/order_test.go b/exchanges/order/order_test.go index 0c49edee207..a2edb10fe67 100644 --- a/exchanges/order/order_test.go +++ b/exchanges/order/order_test.go @@ -16,6 +16,7 @@ import ( "github.com/thrasher-corp/gocryptotrader/currency" "github.com/thrasher-corp/gocryptotrader/encoding/json" "github.com/thrasher-corp/gocryptotrader/exchanges/asset" + "github.com/thrasher-corp/gocryptotrader/exchanges/margin" "github.com/thrasher-corp/gocryptotrader/exchanges/protocol" "github.com/thrasher-corp/gocryptotrader/exchanges/validate" ) @@ -67,15 +68,14 @@ func TestSubmit_Validate(t *testing.T) { }, }, // valid pair but invalid order side { - ExpectedErr: errTimeInForceConflict, + ExpectedErr: ErrInvalidTimeInForce, Submit: &Submit{ - Exchange: "test", - Pair: testPair, - AssetType: asset.Spot, - Side: Ask, - Type: Market, - ImmediateOrCancel: true, - FillOrKill: true, + Exchange: "test", + Pair: testPair, + AssetType: asset.Spot, + Side: Ask, + Type: Market, + TimeInForce: TimeInForce(89), }, }, { @@ -256,107 +256,59 @@ func TestSubmit_DeriveSubmitResponse(t *testing.T) { t.Parallel() var s *Submit _, err := s.DeriveSubmitResponse("") - if !errors.Is(err, errOrderSubmitIsNil) { - t.Fatalf("received: '%v' but expected: '%v'", err, errOrderSubmitIsNil) - } + require.ErrorIs(t, err, errOrderSubmitIsNil) s = &Submit{} _, err = s.DeriveSubmitResponse("") - if !errors.Is(err, ErrOrderIDNotSet) { - t.Fatalf("received: '%v' but expected: '%v'", err, ErrOrderIDNotSet) - } + require.ErrorIs(t, err, ErrOrderIDNotSet) resp, err := s.DeriveSubmitResponse("1337") - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } - - if resp.OrderID != "1337" { - t.Fatal("unexpected value") - } - - if resp.Status != New { - t.Fatal("unexpected value") - } - - if resp.Date.IsZero() { - t.Fatal("unexpected value") - } - - if resp.LastUpdated.IsZero() { - t.Fatal("unexpected value") - } + require.NoError(t, err) + require.Equal(t, "1337", resp.OrderID) + require.Equal(t, New, resp.Status) + require.False(t, resp.Date.IsZero()) + assert.False(t, resp.LastUpdated.IsZero()) } func TestSubmitResponse_DeriveDetail(t *testing.T) { t.Parallel() var s *SubmitResponse _, err := s.DeriveDetail(uuid.Nil) - if !errors.Is(err, errOrderSubmitResponseIsNil) { - t.Fatalf("received: '%v' but expected: '%v'", err, errOrderSubmitResponseIsNil) - } + require.ErrorIs(t, err, errOrderSubmitResponseIsNil) id, err := uuid.NewV4() - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) s = &SubmitResponse{} deets, err := s.DeriveDetail(id) - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } - - if deets.InternalOrderID != id { - t.Fatal("unexpected value") - } + require.NoError(t, err) + assert.Equal(t, id, deets.InternalOrderID) } func TestOrderSides(t *testing.T) { t.Parallel() - var os = Buy - if os.String() != "BUY" { - t.Errorf("unexpected string %s", os.String()) - } - - if os.Lower() != "buy" { - t.Errorf("unexpected string %s", os.Lower()) - } - - if os.Title() != "Buy" { - t.Errorf("unexpected string %s", os.Title()) - } + assert.Equal(t, "BUY", os.String()) + assert.Equal(t, "buy", os.Lower()) + assert.Equal(t, "Buy", os.Title()) } func TestTitle(t *testing.T) { t.Parallel() orderType := Limit - if orderType.Title() != "Limit" { - t.Errorf("received '%v' expected 'Limit'", orderType.Title()) - } + require.Equal(t, "Limit", orderType.Title()) } func TestOrderTypes(t *testing.T) { t.Parallel() - var orderType Type - if orderType.String() != "UNKNOWN" { - t.Errorf("unexpected string %s", orderType.String()) - } - - if orderType.Lower() != "unknown" { - t.Errorf("unexpected string %s", orderType.Lower()) - } - - if orderType.Title() != "Unknown" { - t.Errorf("unexpected string %s", orderType.Title()) - } + assert.Equal(t, "UNKNOWN", orderType.String()) + assert.Equal(t, "unknown", orderType.Lower()) + assert.Equal(t, "Unknown", orderType.Title()) } func TestInferCostsAndTimes(t *testing.T) { t.Parallel() - var detail Detail detail.InferCostsAndTimes() if detail.Amount != detail.ExecutedAmount+detail.RemainingAmount { @@ -400,51 +352,28 @@ func TestInferCostsAndTimes(t *testing.T) { detail.Amount = 1 detail.RemainingAmount = 1 detail.InferCostsAndTimes() - if detail.Amount != detail.ExecutedAmount+detail.RemainingAmount { - t.Errorf( - "Order detail amounts not equals. Expected 0, received %f", - detail.Amount-(detail.ExecutedAmount+detail.RemainingAmount), - ) - } + assert.Equal(t, detail.ExecutedAmount+detail.RemainingAmount, detail.Amount) detail.RemainingAmount = 0 detail.Amount = 1 detail.ExecutedAmount = 1 detail.Price = 2 detail.InferCostsAndTimes() - if detail.AverageExecutedPrice != 2 { - t.Errorf( - "Unexpected AverageExecutedPrice. Expected 2, received %f", - detail.AverageExecutedPrice, - ) - } + assert.Equal(t, 2., detail.AverageExecutedPrice) detail = Detail{Amount: 1, ExecutedAmount: 2, Cost: 3, Price: 0} detail.InferCostsAndTimes() - if detail.AverageExecutedPrice != 1.5 { - t.Errorf( - "Unexpected AverageExecutedPrice. Expected 1.5, received %f", - detail.AverageExecutedPrice, - ) - } + assert.Equal(t, 1.5, detail.AverageExecutedPrice) detail = Detail{Amount: 1, ExecutedAmount: 2, AverageExecutedPrice: 3} detail.InferCostsAndTimes() - if detail.Cost != 6 { - t.Errorf( - "Unexpected Cost. Expected 6, received %f", - detail.Cost, - ) - } + assert.Equal(t, 6., detail.Cost) } func TestFilterOrdersByType(t *testing.T) { t.Parallel() var orders = []Detail{ - { - Type: ImmediateOrCancel, - }, { Type: Limit, }, @@ -452,19 +381,13 @@ func TestFilterOrdersByType(t *testing.T) { } FilterOrdersByType(&orders, AnyType) - if len(orders) != 3 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 2, len(orders)) - } + assert.Lenf(t, orders, 2, "Orders failed to be filtered. Expected %v, received %v", 2, len(orders)) FilterOrdersByType(&orders, Limit) - if len(orders) != 2 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) - } + assert.Lenf(t, orders, 2, "Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) FilterOrdersByType(&orders, Stop) - if len(orders) != 1 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 0, len(orders)) - } + assert.Lenf(t, orders, 1, "Orders failed to be filtered. Expected %v, received %v", 0, len(orders)) } var filterOrdersByTypeBenchmark = &[]Detail{ @@ -485,7 +408,7 @@ var filterOrdersByTypeBenchmark = &[]Detail{ // 392455 3226 ns/op 15840 B/op 5 allocs/op // PREV // 9486490 109.5 ns/op 0 B/op 0 allocs/op // CURRENT func BenchmarkFilterOrdersByType(b *testing.B) { - for x := 0; x < b.N; x++ { + for b.Loop() { FilterOrdersByType(filterOrdersByTypeBenchmark, Limit) } } @@ -504,19 +427,13 @@ func TestFilterOrdersBySide(t *testing.T) { } FilterOrdersBySide(&orders, AnySide) - if len(orders) != 3 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 3, len(orders)) - } + assert.Lenf(t, orders, 3, "Orders failed to be filtered. Expected %v, received %v", 3, len(orders)) FilterOrdersBySide(&orders, Buy) - if len(orders) != 2 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) - } + assert.Lenf(t, orders, 2, "Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) FilterOrdersBySide(&orders, Sell) - if len(orders) != 1 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 0, len(orders)) - } + assert.Lenf(t, orders, 1, "Orders failed to be filtered. Expected %v, received %v", 0, len(orders)) } var filterOrdersBySideBenchmark = &[]Detail{ @@ -537,7 +454,7 @@ var filterOrdersBySideBenchmark = &[]Detail{ // 372594 3049 ns/op 15840 B/op 5 allocs/op // PREV // 7412187 148.8 ns/op 0 B/op 0 allocs/op // CURRENT func BenchmarkFilterOrdersBySide(b *testing.B) { - for x := 0; x < b.N; x++ { + for b.Loop() { FilterOrdersBySide(filterOrdersBySideBenchmark, Ask) } } @@ -558,50 +475,29 @@ func TestFilterOrdersByTimeRange(t *testing.T) { } err := FilterOrdersByTimeRange(&orders, time.Unix(0, 0), time.Unix(0, 0)) - if err != nil { - t.Fatal(err) - } - if len(orders) != 3 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 3, len(orders)) - } + require.NoError(t, err) + assert.Lenf(t, orders, 3, "Orders failed to be filtered. Expected %d, received %d", 3, len(orders)) err = FilterOrdersByTimeRange(&orders, time.Unix(100, 0), time.Unix(111, 0)) - if err != nil { - t.Fatal(err) - } - if len(orders) != 3 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 3, len(orders)) - } + require.NoError(t, err) + assert.Lenf(t, orders, 3, "Orders failed to be filtered. Expected %d, received %d", 3, len(orders)) err = FilterOrdersByTimeRange(&orders, time.Unix(101, 0), time.Unix(111, 0)) - if err != nil { - t.Fatal(err) - } - if len(orders) != 2 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 2, len(orders)) - } + require.NoError(t, err) + assert.Lenf(t, orders, 2, "Orders failed to be filtered. Expected %d, received %d", 2, len(orders)) err = FilterOrdersByTimeRange(&orders, time.Unix(200, 0), time.Unix(300, 0)) - if err != nil { - t.Fatal(err) - } - if len(orders) != 0 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 0, len(orders)) - } + require.NoError(t, err) + assert.Emptyf(t, orders, "Orders failed to be filtered. Expected 0, received %d", len(orders)) + orders = append(orders, Detail{}) // test for event no timestamp is set on an order, best to include it err = FilterOrdersByTimeRange(&orders, time.Unix(200, 0), time.Unix(300, 0)) - if err != nil { - t.Fatal(err) - } - if len(orders) != 1 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) - } + require.NoError(t, err) + assert.Lenf(t, orders, 1, "Orders failed to be filtered. Expected %d, received %d", 1, len(orders)) err = FilterOrdersByTimeRange(&orders, time.Unix(300, 0), time.Unix(50, 0)) - if !errors.Is(err, common.ErrStartAfterEnd) { - t.Fatalf("received: '%v' but expected: '%v'", err, common.ErrStartAfterEnd) - } + require.ErrorIs(t, err, common.ErrStartAfterEnd) } var filterOrdersByTimeRangeBenchmark = &[]Detail{ @@ -622,11 +518,9 @@ var filterOrdersByTimeRangeBenchmark = &[]Detail{ // 390822 3335 ns/op 15840 B/op 5 allocs/op // PREV // 6201034 172.1 ns/op 0 B/op 0 allocs/op // CURRENT func BenchmarkFilterOrdersByTimeRange(b *testing.B) { - for x := 0; x < b.N; x++ { + for b.Loop() { err := FilterOrdersByTimeRange(filterOrdersByTimeRangeBenchmark, time.Unix(50, 0), time.Unix(150, 0)) - if err != nil { - b.Fatal(err) - } + require.NoError(b, err) } } @@ -650,39 +544,28 @@ func TestFilterOrdersByPairs(t *testing.T) { currency.NewPair(currency.LTC, currency.EUR), currency.NewPair(currency.DOGE, currency.RUB)} FilterOrdersByPairs(&orders, currencies) - if len(orders) != 4 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 3, len(orders)) - } + assert.Lenf(t, orders, 4, "Orders failed to be filtered. Expected %v, received %v", 3, len(orders)) currencies = []currency.Pair{currency.NewPair(currency.BTC, currency.USD), currency.NewPair(currency.LTC, currency.EUR)} FilterOrdersByPairs(&orders, currencies) - if len(orders) != 3 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 2, len(orders)) - } + assert.Lenf(t, orders, 3, "Orders failed to be filtered. Expected %v, received %v", 2, len(orders)) currencies = []currency.Pair{currency.NewPair(currency.BTC, currency.USD)} FilterOrdersByPairs(&orders, currencies) - if len(orders) != 2 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) - } + assert.Lenf(t, orders, 2, "Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) currencies = []currency.Pair{currency.NewPair(currency.USD, currency.BTC)} FilterOrdersByPairs(&orders, currencies) - if len(orders) != 2 { - t.Errorf("Reverse Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) - } + assert.Lenf(t, orders, 2, "Reverse Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) currencies = []currency.Pair{} FilterOrdersByPairs(&orders, currencies) - if len(orders) != 2 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) - } + assert.Lenf(t, orders, 2, "Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) + currencies = append(currencies, currency.EMPTYPAIR) FilterOrdersByPairs(&orders, currencies) - if len(orders) != 2 { - t.Errorf("Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) - } + assert.Lenf(t, orders, 2, "Orders failed to be filtered. Expected %v, received %v", 1, len(orders)) } var filterOrdersByPairsBenchmark = &[]Detail{ @@ -704,7 +587,7 @@ var filterOrdersByPairsBenchmark = &[]Detail{ // 6977242 172.8 ns/op 0 B/op 0 allocs/op // CURRENT func BenchmarkFilterOrdersByPairs(b *testing.B) { pairs := []currency.Pair{currency.NewPair(currency.BTC, currency.USD)} - for x := 0; x < b.N; x++ { + for b.Loop() { FilterOrdersByPairs(filterOrdersByPairsBenchmark, pairs) } } @@ -723,14 +606,10 @@ func TestSortOrdersByPrice(t *testing.T) { } SortOrdersByPrice(&orders, false) - if orders[0].Price != 0 { - t.Errorf("Expected: '%v', received: '%v'", 0, orders[0].Price) - } + assert.Equalf(t, 0., orders[0].Price, "Expected: '%v', received: '%v'", 0, orders[0].Price) SortOrdersByPrice(&orders, true) - if orders[0].Price != 100 { - t.Errorf("Expected: '%v', received: '%v'", 100, orders[0].Price) - } + assert.Equalf(t, 100., orders[0].Price, "Expected: '%v', received: '%v'", 100, orders[0].Price) } func TestSortOrdersByDate(t *testing.T) { @@ -747,18 +626,10 @@ func TestSortOrdersByDate(t *testing.T) { } SortOrdersByDate(&orders, false) - if orders[0].Date.Unix() != time.Unix(0, 0).Unix() { - t.Errorf("Expected: '%v', received: '%v'", - time.Unix(0, 0).Unix(), - orders[0].Date.Unix()) - } + assert.Equal(t, orders[0].Date.Unix(), time.Unix(0, 0).Unix()) SortOrdersByDate(&orders, true) - if orders[0].Date.Unix() != time.Unix(2, 0).Unix() { - t.Errorf("Expected: '%v', received: '%v'", - time.Unix(2, 0).Unix(), - orders[0].Date.Unix()) - } + assert.Equal(t, orders[0].Date, time.Unix(2, 0)) } func TestSortOrdersByCurrency(t *testing.T) { @@ -789,18 +660,10 @@ func TestSortOrdersByCurrency(t *testing.T) { } SortOrdersByCurrency(&orders, false) - if orders[0].Pair.String() != currency.BTC.String()+"-"+currency.RUB.String() { - t.Errorf("Expected: '%v', received: '%v'", - currency.BTC.String()+"-"+currency.RUB.String(), - orders[0].Pair.String()) - } + assert.Equal(t, currency.BTC.String()+"-"+currency.RUB.String(), orders[0].Pair.String()) SortOrdersByCurrency(&orders, true) - if orders[0].Pair.String() != currency.LTC.String()+"-"+currency.EUR.String() { - t.Errorf("Expected: '%v', received: '%v'", - currency.LTC.String()+"-"+currency.EUR.String(), - orders[0].Pair.String()) - } + assert.Equal(t, currency.LTC.String()+"-"+currency.EUR.String(), orders[0].Pair.String()) } func TestSortOrdersByOrderSide(t *testing.T) { @@ -819,18 +682,10 @@ func TestSortOrdersByOrderSide(t *testing.T) { } SortOrdersBySide(&orders, false) - if !strings.EqualFold(orders[0].Side.String(), Buy.String()) { - t.Errorf("Expected: '%v', received: '%v'", - Buy, - orders[0].Side) - } + assert.Truef(t, strings.EqualFold(orders[0].Side.String(), Buy.String()), "Expected: '%v', received: '%v'", Buy, orders[0].Side) SortOrdersBySide(&orders, true) - if !strings.EqualFold(orders[0].Side.String(), Sell.String()) { - t.Errorf("Expected: '%v', received: '%v'", - Sell, - orders[0].Side) - } + assert.Truef(t, strings.EqualFold(orders[0].Side.String(), Sell.String()), "Expected: '%v', received: '%v'", Sell, orders[0].Side) } func TestSortOrdersByOrderType(t *testing.T) { @@ -841,26 +696,13 @@ func TestSortOrdersByOrderType(t *testing.T) { Type: Market, }, { Type: Limit, - }, { - Type: ImmediateOrCancel, }, { Type: TrailingStop, }, } - SortOrdersByType(&orders, false) - if !strings.EqualFold(orders[0].Type.String(), ImmediateOrCancel.String()) { - t.Errorf("Expected: '%v', received: '%v'", - ImmediateOrCancel, - orders[0].Type) - } - SortOrdersByType(&orders, true) - if !strings.EqualFold(orders[0].Type.String(), TrailingStop.String()) { - t.Errorf("Expected: '%v', received: '%v'", - TrailingStop, - orders[0].Type) - } + assert.Truef(t, strings.EqualFold(orders[0].Type.String(), TrailingStop.String()), "Expected: '%v', received: '%v'", TrailingStop, orders[0].Type) } func TestStringToOrderSide(t *testing.T) { @@ -892,12 +734,8 @@ func TestStringToOrderSide(t *testing.T) { testData := &cases[i] t.Run(testData.in, func(t *testing.T) { out, err := StringToOrderSide(testData.in) - if !errors.Is(err, testData.err) { - t.Fatalf("received: '%v' but expected: '%v'", err, testData.err) - } - if out != testData.out { - t.Errorf("Unexpected output %v. Expected %v", out, testData.out) - } + require.ErrorIs(t, err, testData.err) + require.Equal(t, out, testData.out) }) } } @@ -907,7 +745,7 @@ var sideBenchmark Side // 9756914 126.7 ns/op 0 B/op 0 allocs/op // PREV // 25200660 57.63 ns/op 3 B/op 1 allocs/op // CURRENT func BenchmarkStringToOrderSide(b *testing.B) { - for x := 0; x < b.N; x++ { + for b.Loop() { sideBenchmark, _ = StringToOrderSide("any") } } @@ -924,10 +762,6 @@ func TestStringToOrderType(t *testing.T) { {"market", Market, nil}, {"MARKET", Market, nil}, {"mArKeT", Market, nil}, - {"immediate_or_cancel", ImmediateOrCancel, nil}, - {"IMMEDIATE_OR_CANCEL", ImmediateOrCancel, nil}, - {"iMmEdIaTe_Or_CaNcEl", ImmediateOrCancel, nil}, - {"iMmEdIaTe Or CaNcEl", ImmediateOrCancel, nil}, {"stop", Stop, nil}, {"STOP", Stop, nil}, {"sToP", Stop, nil}, @@ -941,10 +775,7 @@ func TestStringToOrderType(t *testing.T) { {"TRAILING_STOP_LIMIT", TrailingStopLimit, nil}, {"tRaIlInG_sToP_LimIt", TrailingStopLimit, nil}, {"tRaIlInG sToP LIMIt", TrailingStopLimit, nil}, - {"fOk", FillOrKill, nil}, - {"exchange fOk", FillOrKill, nil}, {"ios", IOS, nil}, - {"post_ONly", PostOnly, nil}, {"any", AnyType, nil}, {"ANY", AnyType, nil}, {"aNy", AnyType, nil}, @@ -975,12 +806,8 @@ func TestStringToOrderType(t *testing.T) { testData := &cases[i] t.Run(testData.in, func(t *testing.T) { out, err := StringToOrderType(testData.in) - if !errors.Is(err, testData.err) { - t.Fatalf("received: '%v' but expected: '%v'", err, testData.err) - } - if out != testData.out { - t.Errorf("Unexpected output %v. Expected %v", out, testData.out) - } + require.ErrorIs(t, err, testData.err) + assert.Equal(t, testData.out, out) }) } } @@ -990,7 +817,7 @@ var typeBenchmark Type // 5703705 299.9 ns/op 0 B/op 0 allocs/op // PREV // 16353608 81.23 ns/op 8 B/op 1 allocs/op // CURRENT func BenchmarkStringToOrderType(b *testing.B) { - for x := 0; x < b.N; x++ { + for b.Loop() { typeBenchmark, _ = StringToOrderType("trigger") } } @@ -1052,12 +879,8 @@ func TestStringToOrderStatus(t *testing.T) { testData := &stringsToOrderStatus[i] t.Run(testData.in, func(t *testing.T) { out, err := StringToOrderStatus(testData.in) - if !errors.Is(err, testData.err) { - t.Fatalf("received: '%v' but expected: '%v'", err, testData.err) - } - if out != testData.out { - t.Errorf("Unexpected output %v. Expected %v", out, testData.out) - } + require.ErrorIs(t, err, testData.err) + assert.Equal(t, testData.out, out) }) } } @@ -1067,7 +890,7 @@ var statusBenchmark Status // 3569052 351.8 ns/op 0 B/op 0 allocs/op // PREV // 11126791 101.9 ns/op 24 B/op 1 allocs/op // CURRENT func BenchmarkStringToOrderStatus(b *testing.B) { - for x := 0; x < b.N; x++ { + for b.Loop() { statusBenchmark, _ = StringToOrderStatus("market_unavailable") } } @@ -1077,72 +900,59 @@ func TestUpdateOrderFromModifyResponse(t *testing.T) { updated := time.Now() pair, err := currency.NewPairFromString("BTCUSD") - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) om := ModifyResponse{ - ImmediateOrCancel: true, - PostOnly: true, - Price: 1, - Amount: 1, - TriggerPrice: 1, - RemainingAmount: 1, - Exchange: "1", - Type: 1, - Side: 1, - Status: 1, - AssetType: 1, - LastUpdated: updated, - Pair: pair, + TimeInForce: PostOnly | GoodTillTime, + Price: 1, + Amount: 1, + TriggerPrice: 1, + RemainingAmount: 1, + Exchange: "1", + Type: 1, + Side: 1, + Status: 1, + AssetType: 1, + LastUpdated: updated, + Pair: pair, } od.UpdateOrderFromModifyResponse(&om) + assert.NotEqual(t, UnknownTIF, od.TimeInForce) + assert.True(t, od.TimeInForce.Is(GoodTillTime)) + assert.True(t, od.TimeInForce.Is(PostOnly)) + assert.Equal(t, 1., od.Price) + assert.Equal(t, 1., od.Amount) + assert.Equal(t, 1., od.TriggerPrice) + assert.Equal(t, 1., od.RemainingAmount) + assert.Equal(t, "", od.Exchange, "Should not be able to update exchange via modify") + assert.Equal(t, "1", od.OrderID) + assert.Equal(t, Type(1), od.Type) + assert.Equal(t, Side(1), od.Side) + assert.Equal(t, Status(1), od.Status) + assert.Equal(t, asset.Item(1), od.AssetType) + assert.Equal(t, od.LastUpdated, updated) + assert.Equal(t, "BTCUSD", od.Pair.String()) + assert.Nil(t, od.Trades) +} - if !od.ImmediateOrCancel { - t.Error("Failed to update") - } - if !od.PostOnly { - t.Error("Failed to update") - } - if od.Price != 1 { - t.Error("Failed to update") - } - if od.Amount != 1 { - t.Error("Failed to update") - } - if od.TriggerPrice != 1 { - t.Error("Failed to update") - } - if od.RemainingAmount != 1 { - t.Error("Failed to update") - } - if od.Exchange != "" { - t.Error("Should not be able to update exchange via modify") - } - if od.OrderID != "1" { - t.Error("Failed to update") - } - if od.Type != 1 { - t.Error("Failed to update") - } - if od.Side != 1 { - t.Error("Failed to update") - } - if od.Status != 1 { - t.Error("Failed to update") - } - if od.AssetType != 1 { - t.Error("Failed to update") - } - if od.LastUpdated != updated { - t.Error("Failed to update") - } - if od.Pair.String() != "BTCUSD" { - t.Error("Failed to update") - } - if od.Trades != nil { - t.Error("Failed to update") +func TestTimeInForceIs(t *testing.T) { + t.Parallel() + tifValuesMap := map[TimeInForce][]TimeInForce{ + GoodTillCancel | PostOnly: {GoodTillCancel, PostOnly}, + GoodTillCancel: {GoodTillCancel}, + GoodTillCrossing | PostOnly: {GoodTillCrossing, PostOnly}, + ImmediateOrCancel | PostOnly: {ImmediateOrCancel, PostOnly}, + GoodTillDay: {GoodTillDay}, + FillOrKill | PostOnly: {FillOrKill, PostOnly}, + FillOrKill: {FillOrKill}, + PostOnly: {PostOnly}, + GoodTillCrossing: {GoodTillCrossing}, + } + for tif := range tifValuesMap { + for _, v := range tifValuesMap[tif] { + require.True(t, tif.Is(v)) + } } } @@ -1152,153 +962,83 @@ func TestUpdateOrderFromDetail(t *testing.T) { updated := time.Now() pair, err := currency.NewPairFromString("BTCUSD") - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) id, err := uuid.NewV4() - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) var od *Detail err = od.UpdateOrderFromDetail(nil) - if !errors.Is(err, ErrOrderDetailIsNil) { - t.Fatalf("received: '%v' but expected: '%v'", err, ErrOrderDetailIsNil) - } + require.ErrorIs(t, err, ErrOrderDetailIsNil) om := &Detail{ - ImmediateOrCancel: true, - HiddenOrder: true, - FillOrKill: true, - PostOnly: true, - Leverage: 1, - Price: 1, - Amount: 1, - LimitPriceUpper: 1, - LimitPriceLower: 1, - TriggerPrice: 1, - QuoteAmount: 1, - ExecutedAmount: 1, - RemainingAmount: 1, - Fee: 1, - Exchange: "1", - InternalOrderID: id, - OrderID: "1", - AccountID: "1", - ClientID: "1", - ClientOrderID: "DukeOfWombleton", - WalletAddress: "1", - Type: 1, - Side: 1, - Status: 1, - AssetType: 1, - LastUpdated: updated, - Pair: pair, - Trades: []TradeHistory{}, + TimeInForce: GoodTillCancel | PostOnly, + HiddenOrder: true, + Leverage: 1, + Price: 1, + Amount: 1, + LimitPriceUpper: 1, + LimitPriceLower: 1, + TriggerPrice: 1, + QuoteAmount: 1, + ExecutedAmount: 1, + RemainingAmount: 1, + Fee: 1, + Exchange: "1", + InternalOrderID: id, + OrderID: "1", + AccountID: "1", + ClientID: "1", + ClientOrderID: "DukeOfWombleton", + WalletAddress: "1", + Type: 1, + Side: 1, + Status: 1, + AssetType: 1, + LastUpdated: updated, + Pair: pair, + Trades: []TradeHistory{}, } od = &Detail{Exchange: "test"} err = od.UpdateOrderFromDetail(nil) - if !errors.Is(err, ErrOrderDetailIsNil) { - t.Fatalf("received: '%v' but expected: '%v'", err, ErrOrderDetailIsNil) - } + require.ErrorIs(t, err, ErrOrderDetailIsNil) err = od.UpdateOrderFromDetail(om) - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } - if od.InternalOrderID != id { - t.Error("Failed to initialize the internal order ID") - } - if !od.ImmediateOrCancel { - t.Error("Failed to update") - } - if !od.HiddenOrder { - t.Error("Failed to update") - } - if !od.FillOrKill { - t.Error("Failed to update") - } - if !od.PostOnly { - t.Error("Failed to update") - } - if od.Leverage != 1 { - t.Error("Failed to update") - } - if od.Price != 1 { - t.Error("Failed to update") - } - if od.Amount != 1 { - t.Error("Failed to update") - } - if od.LimitPriceLower != 1 { - t.Error("Failed to update") - } - if od.LimitPriceUpper != 1 { - t.Error("Failed to update") - } - if od.TriggerPrice != 1 { - t.Error("Failed to update") - } - if od.QuoteAmount != 1 { - t.Error("Failed to update") - } - if od.ExecutedAmount != 1 { - t.Error("Failed to update") - } - if od.RemainingAmount != 1 { - t.Error("Failed to update") - } - if od.Fee != 1 { - t.Error("Failed to update") - } - if od.Exchange != "test" { - t.Error("Should not be able to update exchange via modify") - } - if od.OrderID != "1" { - t.Error("Failed to update") - } - if od.ClientID != "1" { - t.Error("Failed to update") - } - if od.ClientOrderID != "DukeOfWombleton" { - t.Error("Failed to update") - } - if od.WalletAddress != "1" { - t.Error("Failed to update") - } - if od.Type != 1 { - t.Error("Failed to update") - } - if od.Side != 1 { - t.Error("Failed to update") - } - if od.Status != 1 { - t.Error("Failed to update") - } - if od.AssetType != 1 { - t.Error("Failed to update") - } - if od.LastUpdated != updated { - t.Error("Failed to update") - } - if od.Pair.String() != "BTCUSD" { - t.Error("Failed to update") - } - if od.Trades != nil { - t.Error("Failed to update") - } + require.NoError(t, err) + + assert.Equal(t, od.InternalOrderID, id) + assert.True(t, od.TimeInForce.Is(GoodTillCancel)) + assert.True(t, od.TimeInForce.Is(PostOnly)) + require.True(t, od.HiddenOrder) + assert.Equal(t, 1., od.Leverage) + assert.Equal(t, 1., od.Price) + assert.Equal(t, 1., od.Amount) + assert.Equal(t, 1., od.LimitPriceLower) + assert.Equal(t, 1., od.LimitPriceUpper) + assert.Equal(t, 1., od.TriggerPrice) + assert.Equal(t, 1., od.QuoteAmount) + assert.Equal(t, 1., od.ExecutedAmount) + assert.Equal(t, 1., od.RemainingAmount) + assert.Equal(t, 1., od.Fee) + assert.Equal(t, "test", od.Exchange, "Should not be able to update exchange via modify") + assert.Equal(t, "1", od.OrderID) + assert.Equal(t, "1", od.ClientID) + assert.Equal(t, "DukeOfWombleton", od.ClientOrderID) + assert.Equal(t, "1", od.WalletAddress) + assert.Equal(t, Type(1), od.Type) + assert.Equal(t, Side(1), od.Side) + assert.Equal(t, Status(1), od.Status) + assert.Equal(t, asset.Item(1), od.AssetType) + assert.Equal(t, updated, od.LastUpdated) + assert.Equal(t, "BTCUSD", od.Pair.String()) + assert.Nil(t, od.Trades) om.Trades = append(om.Trades, TradeHistory{TID: "1"}, TradeHistory{TID: "2"}) err = od.UpdateOrderFromDetail(om) - if err != nil { - t.Fatal(err) - } - if len(od.Trades) != 2 { - t.Error("Failed to add trades") - } + require.NoError(t, err) + assert.Len(t, od.Trades, 2) om.Trades[0].Exchange = leet om.Trades[0].Price = 1337 om.Trades[0].Fee = 1337 @@ -1309,198 +1049,115 @@ func TestUpdateOrderFromDetail(t *testing.T) { om.Trades[0].Type = UnknownType om.Trades[0].Amount = 1337 err = od.UpdateOrderFromDetail(om) - if err != nil { - t.Fatal(err) - } - if od.Trades[0].Exchange == leet { - t.Error("Should not be able to update exchange from update") - } - if od.Trades[0].Price != 1337 { - t.Error("Failed to update trades") - } - if od.Trades[0].Fee != 1337 { - t.Error("Failed to update trades") - } - if !od.Trades[0].IsMaker { - t.Error("Failed to update trades") - } - if od.Trades[0].Timestamp != updated { - t.Error("Failed to update trades") - } - if od.Trades[0].Description != leet { - t.Error("Failed to update trades") - } - if od.Trades[0].Side != UnknownSide { - t.Error("Failed to update trades") - } - if od.Trades[0].Type != UnknownType { - t.Error("Failed to update trades") - } - if od.Trades[0].Amount != 1337 { - t.Error("Failed to update trades") - } + require.NoError(t, err) + assert.NotEqual(t, leet, od.Trades[0].Exchange, "Should not be able to update exchange from update") + assert.Equal(t, 1337., od.Trades[0].Price) + assert.Equal(t, 1337., od.Trades[0].Fee) + assert.True(t, od.Trades[0].IsMaker) + assert.Equal(t, updated, od.Trades[0].Timestamp) + assert.Equal(t, leet, od.Trades[0].Description) + assert.Equal(t, UnknownSide, od.Trades[0].Side) + assert.Equal(t, UnknownType, od.Trades[0].Type) + assert.Equal(t, 1337., od.Trades[0].Amount) id, err = uuid.NewV4() - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) om = &Detail{ InternalOrderID: id, } err = od.UpdateOrderFromDetail(om) - if err != nil { - t.Fatal(err) - } - if od.InternalOrderID == id { - t.Error("Should not be able to update the internal order ID after initialization") - } + require.NoError(t, err) + assert.NotEqual(t, id, od.InternalOrderID, "Should not be able to update the internal order ID after initialization") } func TestClassificationError_Error(t *testing.T) { class := ClassificationError{OrderID: "1337", Exchange: "test", Err: errors.New("test error")} - if class.Error() != "Exchange test: OrderID: 1337 classification error: test error" { - t.Fatal("unexpected output") - } + require.Equal(t, "Exchange test: OrderID: 1337 classification error: test error", class.Error()) class.OrderID = "" - if class.Error() != "Exchange test: classification error: test error" { - t.Fatal("unexpected output") - } + assert.Equal(t, "Exchange test: classification error: test error", class.Error()) } func TestValidationOnOrderTypes(t *testing.T) { var cancelMe *Cancel - if cancelMe.Validate() != ErrCancelOrderIsNil { - t.Fatal("unexpected error") - } + require.ErrorIs(t, cancelMe.Validate(), ErrCancelOrderIsNil) cancelMe = new(Cancel) err := cancelMe.Validate() - if !errors.Is(err, nil) { - t.Errorf("received '%v' expected '%v'", err, nil) - } + assert.NoError(t, err) err = cancelMe.Validate(cancelMe.PairAssetRequired()) - if err == nil || err.Error() != ErrPairIsEmpty.Error() { - t.Errorf("received '%v' expected '%v'", err, ErrPairIsEmpty) - } + assert.Falsef(t, err == nil || err.Error() != ErrPairIsEmpty.Error(), "received '%v' expected '%v'", err, ErrPairIsEmpty) cancelMe.Pair = currency.NewPair(currency.BTC, currency.USDT) err = cancelMe.Validate(cancelMe.PairAssetRequired()) - if err == nil || err.Error() != ErrAssetNotSet.Error() { - t.Errorf("received '%v' expected '%v'", err, ErrAssetNotSet) - } + assert.Falsef(t, err == nil || err.Error() != ErrAssetNotSet.Error(), "received '%v' expected '%v'", err, ErrAssetNotSet) cancelMe.AssetType = asset.Spot err = cancelMe.Validate(cancelMe.PairAssetRequired()) - if !errors.Is(err, nil) { - t.Errorf("received '%v' expected '%v'", err, nil) - } - - if cancelMe.Validate(cancelMe.StandardCancel()) == nil { - t.Fatal("expected error") - } + assert.NoError(t, err) + require.Error(t, cancelMe.Validate(cancelMe.StandardCancel())) - if cancelMe.Validate(validate.Check(func() error { + require.NoError(t, cancelMe.Validate(validate.Check(func() error { return nil - })) != nil { - t.Fatal("should return nil") - } + }))) cancelMe.OrderID = "1337" - if cancelMe.Validate(cancelMe.StandardCancel()) != nil { - t.Fatal("should return nil") - } + require.NoError(t, cancelMe.Validate(cancelMe.StandardCancel())) var getOrders *MultiOrderRequest err = getOrders.Validate() - if !errors.Is(err, ErrGetOrdersRequestIsNil) { - t.Fatalf("received: '%v' but expected: '%v'", err, ErrGetOrdersRequestIsNil) - } + require.ErrorIs(t, err, ErrGetOrdersRequestIsNil) getOrders = new(MultiOrderRequest) err = getOrders.Validate() - if !errors.Is(err, asset.ErrNotSupported) { - t.Fatalf("received: '%v' but expected: '%v'", err, asset.ErrNotSupported) - } + require.ErrorIs(t, err, asset.ErrNotSupported) getOrders.AssetType = asset.Spot err = getOrders.Validate() - if !errors.Is(err, ErrSideIsInvalid) { - t.Fatalf("received: '%v' but expected: '%v'", err, ErrSideIsInvalid) - } + require.ErrorIs(t, err, ErrSideIsInvalid) getOrders.Side = AnySide err = getOrders.Validate() - if !errors.Is(err, errUnrecognisedOrderType) { - t.Fatalf("received: '%v' but expected: '%v'", err, errUnrecognisedOrderType) - } + require.ErrorIs(t, err, errUnrecognisedOrderType) var errTestError = errors.New("test error") getOrders.Type = AnyType err = getOrders.Validate(validate.Check(func() error { return errTestError })) - if !errors.Is(err, errTestError) { - t.Fatalf("received: '%v' but expected: '%v'", err, errTestError) - } + require.ErrorIs(t, err, errTestError) err = getOrders.Validate(validate.Check(func() error { return nil })) - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } + require.NoError(t, err) var modifyOrder *Modify - if modifyOrder.Validate() != ErrModifyOrderIsNil { - t.Fatal("unexpected error") - } + require.ErrorIs(t, modifyOrder.Validate(), ErrModifyOrderIsNil) modifyOrder = new(Modify) - if modifyOrder.Validate() != ErrPairIsEmpty { - t.Fatal("unexpected error") - } + require.ErrorIs(t, modifyOrder.Validate(), ErrPairIsEmpty) p, err := currency.NewPairFromString("BTC-USD") - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) modifyOrder.Pair = p - if modifyOrder.Validate() != ErrAssetNotSet { - t.Fatal("unexpected error") - } + require.ErrorIs(t, modifyOrder.Validate(), ErrAssetNotSet) modifyOrder.AssetType = asset.Spot - if modifyOrder.Validate() != ErrOrderIDNotSet { - t.Fatal("unexpected error") - } + require.ErrorIs(t, modifyOrder.Validate(), ErrOrderIDNotSet) modifyOrder.ClientOrderID = "1337" - if modifyOrder.Validate() != nil { - t.Fatal("should not error") - } - - if modifyOrder.Validate(validate.Check(func() error { - return errors.New("this should error") - })) == nil { - t.Fatal("expected error") - } - - if modifyOrder.Validate(validate.Check(func() error { - return nil - })) != nil { - t.Fatal("unexpected error") - } + require.NoError(t, modifyOrder.Validate()) + require.Error(t, modifyOrder.Validate(validate.Check(func() error { return errors.New("this should error") }))) + require.NoError(t, modifyOrder.Validate(validate.Check(func() error { return nil }))) } func TestMatchFilter(t *testing.T) { t.Parallel() id, err := uuid.NewV4() - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) filters := map[int]*Filter{ 0: {}, 1: {Exchange: "Binance"}, @@ -1544,9 +1201,7 @@ func TestMatchFilter(t *testing.T) { // empty filter tests emptyFilter := filters[0] for _, o := range orders { - if !o.MatchFilter(emptyFilter) { - t.Error("empty filter should match everything") - } + assert.True(t, o.MatchFilter(emptyFilter), "empty filter should match everything") } tests := map[int]struct { @@ -1597,9 +1252,7 @@ func TestMatchFilter(t *testing.T) { for num, tt := range tests { t.Run(strconv.Itoa(num), func(t *testing.T) { t.Parallel() - if tt.o.MatchFilter(tt.f) != tt.expectedResult { - t.Errorf("tests[%v] failed", num) - } + assert.Equalf(t, tt.expectedResult, tt.o.MatchFilter(tt.f), "tests[%v] failed", num) }) } } @@ -1623,9 +1276,7 @@ func TestIsActive(t *testing.T) { } // specific tests for num, tt := range amountTests { - if tt.o.IsActive() != tt.expectedResult { - t.Errorf("amountTests[%v] failed", num) - } + assert.Equalf(t, tt.expectedResult, tt.o.IsActive(), "amountTests[%v] failed", num) } statusTests := map[int]struct { @@ -1655,9 +1306,7 @@ func TestIsActive(t *testing.T) { } // specific tests for num, tt := range statusTests { - if tt.o.IsActive() != tt.expectedResult { - t.Fatalf("statusTests[%v] failed", num) - } + require.Equalf(t, tt.expectedResult, tt.o.IsActive(), "statusTests[%v] failed", num) } } @@ -1666,7 +1315,7 @@ var activeBenchmark = Detail{Status: Pending, Amount: 1} // 610732089 2.414 ns/op 0 B/op 0 allocs/op // PREV // 1000000000 1.188 ns/op 0 B/op 0 allocs/op // CURRENT func BenchmarkIsActive(b *testing.B) { - for x := 0; x < b.N; x++ { + for b.Loop() { if !activeBenchmark.IsActive() { b.Fatal("expected true") } @@ -1692,9 +1341,7 @@ func TestIsInactive(t *testing.T) { } // specific tests for num, tt := range amountTests { - if tt.o.IsInactive() != tt.expectedResult { - t.Errorf("amountTests[%v] failed", num) - } + assert.Equalf(t, tt.expectedResult, tt.o.IsInactive(), "amountTests[%v] failed", num) } statusTests := map[int]struct { @@ -1724,9 +1371,7 @@ func TestIsInactive(t *testing.T) { } // specific tests for num, tt := range statusTests { - if tt.o.IsInactive() != tt.expectedResult { - t.Errorf("statusTests[%v] failed", num) - } + assert.Equalf(t, tt.expectedResult, tt.o.IsInactive(), "statusTests[%v] failed", num) } } @@ -1734,10 +1379,8 @@ var inactiveBenchmark = Detail{Status: Closed, Amount: 1} // 1000000000 1.043 ns/op 0 B/op 0 allocs/op // CURRENT func BenchmarkIsInactive(b *testing.B) { - for x := 0; x < b.N; x++ { - if !inactiveBenchmark.IsInactive() { - b.Fatal("expected true") - } + for b.Loop() { + require.True(b, inactiveBenchmark.IsInactive()) } } @@ -1770,31 +1413,23 @@ func TestIsOrderPlaced(t *testing.T) { for num, tt := range statusTests { t.Run(fmt.Sprintf("TEST CASE: %d", num), func(t *testing.T) { t.Parallel() - if tt.o.WasOrderPlaced() != tt.expectedResult { - t.Errorf("statusTests[%v] failed", num) - } + assert.Equalf(t, tt.expectedResult, tt.o.WasOrderPlaced(), "statusTests[%v] failed", num) }) } } func TestGenerateInternalOrderID(t *testing.T) { id, err := uuid.NewV4() - if err != nil { - t.Errorf("unable to create uuid: %s", err) - } + assert.NoError(t, err) od := Detail{ InternalOrderID: id, } od.GenerateInternalOrderID() - if od.InternalOrderID != id { - t.Error("Should not be able to generate a new internal order ID") - } + assert.Equal(t, id, od.InternalOrderID, "Should not be able to generate a new internal order ID") od = Detail{} od.GenerateInternalOrderID() - if od.InternalOrderID.IsNil() { - t.Error("unable to generate internal order ID") - } + assert.False(t, od.InternalOrderID.IsNil(), "unable to generate internal order ID") } func TestDetail_Copy(t *testing.T) { @@ -1812,13 +1447,9 @@ func TestDetail_Copy(t *testing.T) { } for i := range d { r := d[i].Copy() - if !reflect.DeepEqual(d[i], r) { - t.Errorf("[%d] Copy does not contain same elements, expected: %v\ngot:%v", i, d[i], r) - } + assert.True(t, reflect.DeepEqual(d[i], r), "[%d] Copy does not contain same elements, expected: %v\ngot:%v", i, d[i], r) if len(d[i].Trades) > 0 { - if &d[i].Trades[0] == &r.Trades[0] { - t.Errorf("[%d]Trades point to the same data elements", i) - } + assert.Equalf(t, &d[i].Trades[0], &r.Trades[0], "[%d]Trades point to the same data elements", i) } } } @@ -1838,13 +1469,9 @@ func TestDetail_CopyToPointer(t *testing.T) { } for i := range d { r := d[i].CopyToPointer() - if !reflect.DeepEqual(d[i], *r) { - t.Errorf("[%d] Copy does not contain same elements, expected: %v\ngot:%v", i, d[i], r) - } + assert.Truef(t, reflect.DeepEqual(d[i], *r), "[%d] Copy does not contain same elements, expected: %v\ngot:%v", i, d[i], r) if len(d[i].Trades) > 0 { - if &d[i].Trades[0] == &r.Trades[0] { - t.Errorf("[%d]Trades point to the same data elements", i) - } + assert.Equalf(t, &d[i].Trades[0], &r.Trades[0], "[%d]Trades point to the same data elements", i) } } } @@ -1865,13 +1492,9 @@ func TestDetail_CopyPointerOrderSlice(t *testing.T) { sliceCopy := CopyPointerOrderSlice(d) for i := range sliceCopy { - if !reflect.DeepEqual(*sliceCopy[i], *d[i]) { - t.Errorf("[%d] Copy does not contain same elements, expected: %v\ngot:%v", i, sliceCopy[i], d[i]) - } + assert.Truef(t, reflect.DeepEqual(*sliceCopy[i], *d[i]), "[%d] Copy does not contain same elements, expected: %v\ngot:%v", i, sliceCopy[i], d[i]) if len(sliceCopy[i].Trades) > 0 { - if &sliceCopy[i].Trades[0] == &d[i].Trades[0] { - t.Errorf("[%d]Trades point to the same data elements", i) - } + assert.Equalf(t, &sliceCopy[i].Trades[0], &d[i].Trades[0], "[%d]Trades point to the same data elements", i) } } } @@ -1879,9 +1502,8 @@ func TestDetail_CopyPointerOrderSlice(t *testing.T) { func TestDeriveModify(t *testing.T) { t.Parallel() var o *Detail - if _, err := o.DeriveModify(); !errors.Is(err, errOrderDetailIsNil) { - t.Fatalf("received: '%v' but expected: '%v'", err, errOrderDetailIsNil) - } + _, err := o.DeriveModify() + require.ErrorIs(t, err, errOrderDetailIsNil) pair := currency.NewPair(currency.BTC, currency.AUD) @@ -1896,31 +1518,26 @@ func TestDeriveModify(t *testing.T) { } mod, err := o.DeriveModify() - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } - - if mod == nil { - t.Fatal("should not be nil") - } + require.NoError(t, err) + require.NotNil(t, mod) - if mod.Exchange != "wow" || - mod.OrderID != "wow2" || - mod.ClientOrderID != "wow3" || - mod.Type != Market || - mod.Side != Long || - mod.AssetType != asset.Futures || - !mod.Pair.Equal(pair) { - t.Fatal("unexpected values") + exp := &Modify{ + Exchange: "wow", + OrderID: "wow2", + ClientOrderID: "wow3", + Type: Market, + Side: Long, + AssetType: asset.Futures, + Pair: pair, } + assert.Equal(t, exp, mod) } func TestDeriveModifyResponse(t *testing.T) { t.Parallel() var mod *Modify - if _, err := mod.DeriveModifyResponse(); !errors.Is(err, errOrderDetailIsNil) { - t.Fatalf("received: '%v' but expected: '%v'", err, errOrderDetailIsNil) - } + _, err := mod.DeriveModifyResponse() + require.ErrorIs(t, err, errOrderDetailIsNil) pair := currency.NewPair(currency.BTC, currency.AUD) @@ -1935,31 +1552,26 @@ func TestDeriveModifyResponse(t *testing.T) { } modresp, err := mod.DeriveModifyResponse() - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } + require.NoError(t, err, "DeriveModifyResponse must not error") + require.NotNil(t, modresp) - if modresp == nil { - t.Fatal("should not be nil") - } - - if modresp.Exchange != "wow" || - modresp.OrderID != "wow2" || - modresp.ClientOrderID != "wow3" || - modresp.Type != Market || - modresp.Side != Long || - modresp.AssetType != asset.Futures || - !modresp.Pair.Equal(pair) { - t.Fatal("unexpected values") + exp := &ModifyResponse{ + Exchange: "wow", + OrderID: "wow2", + ClientOrderID: "wow3", + Type: Market, + Side: Long, + AssetType: asset.Futures, + Pair: pair, } + assert.Equal(t, exp, modresp) } func TestDeriveCancel(t *testing.T) { t.Parallel() var o *Detail - if _, err := o.DeriveCancel(); !errors.Is(err, errOrderDetailIsNil) { - t.Fatalf("received: '%v' but expected: '%v'", err, errOrderDetailIsNil) - } + _, err := o.DeriveCancel() + require.ErrorIs(t, err, errOrderDetailIsNil) pair := currency.NewPair(currency.BTC, currency.AUD) @@ -1976,10 +1588,9 @@ func TestDeriveCancel(t *testing.T) { AssetType: asset.Futures, } cancel, err := o.DeriveCancel() - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } - if cancel.Exchange != "wow" || + require.NoError(t, err) + + assert.False(t, cancel.Exchange != "wow" || cancel.OrderID != "wow1" || cancel.AccountID != "wow2" || cancel.ClientID != "wow3" || @@ -1988,9 +1599,7 @@ func TestDeriveCancel(t *testing.T) { cancel.Type != Market || cancel.Side != Long || !cancel.Pair.Equal(pair) || - cancel.AssetType != asset.Futures { - t.Fatalf("unexpected values %+v", cancel) - } + cancel.AssetType != asset.Futures) } func TestGetOrdersRequest_Filter(t *testing.T) { @@ -2019,14 +1628,10 @@ func TestGetOrdersRequest_Filter(t *testing.T) { } shinyAndClean := request.Filter("test", orders) - if len(shinyAndClean) != 16 { - t.Fatalf("received: '%v' but expected: '%v'", len(shinyAndClean), 16) - } + require.Len(t, shinyAndClean, 16) for x := range shinyAndClean { - if strconv.FormatInt(int64(x), 10) != shinyAndClean[x].OrderID { - t.Fatalf("received: '%v' but expected: '%v'", shinyAndClean[x].OrderID, int64(x)) - } + require.Equal(t, strconv.FormatInt(int64(x), 10), shinyAndClean[x].OrderID) } request.Pairs = []currency.Pair{btcltc} @@ -2036,29 +1641,18 @@ func TestGetOrdersRequest_Filter(t *testing.T) { request.StartTime = time.Unix(1337, 0) shinyAndClean = request.Filter("test", orders) - - if len(shinyAndClean) != 8 { - t.Fatalf("received: '%v' but expected: '%v'", len(shinyAndClean), 8) - } + require.Len(t, shinyAndClean, 8) for x := range shinyAndClean { - if strconv.FormatInt(int64(x)+8, 10) != shinyAndClean[x].OrderID { - t.Fatalf("received: '%v' but expected: '%v'", shinyAndClean[x].OrderID, int64(x)+8) - } + require.Equal(t, strconv.FormatInt(int64(x)+8, 10), shinyAndClean[x].OrderID) } } func TestIsValidOrderSubmissionSide(t *testing.T) { t.Parallel() - if IsValidOrderSubmissionSide(UnknownSide) { - t.Error("expected false") - } - if !IsValidOrderSubmissionSide(Buy) { - t.Error("expected true") - } - if IsValidOrderSubmissionSide(CouldNotBuy) { - t.Error("expected false") - } + assert.False(t, IsValidOrderSubmissionSide(UnknownSide)) + assert.True(t, IsValidOrderSubmissionSide(Buy)) + assert.False(t, IsValidOrderSubmissionSide(CouldNotBuy)) } func TestAdjustBaseAmount(t *testing.T) { @@ -2066,35 +1660,21 @@ func TestAdjustBaseAmount(t *testing.T) { var s *SubmitResponse err := s.AdjustBaseAmount(0) - if !errors.Is(err, errOrderSubmitResponseIsNil) { - t.Fatalf("received: '%v' but expected: '%v'", err, errOrderSubmitResponseIsNil) - } + require.ErrorIs(t, err, errOrderSubmitResponseIsNil) s = &SubmitResponse{} err = s.AdjustBaseAmount(0) - if !errors.Is(err, errAmountIsZero) { - t.Fatalf("received: '%v' but expected: '%v'", err, errAmountIsZero) - } + require.ErrorIs(t, err, errAmountIsZero) s.Amount = 1.7777777777 err = s.AdjustBaseAmount(1.7777777777) - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } - - if s.Amount != 1.7777777777 { - t.Fatalf("received: '%v' but expected: '%v'", s.Amount, 1.7777777777) - } + require.NoError(t, err) + require.Equal(t, 1.7777777777, s.Amount) s.Amount = 1.7777777777 err = s.AdjustBaseAmount(1.777) - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } - - if s.Amount != 1.777 { - t.Fatalf("received: '%v' but expected: '%v'", s.Amount, 1.777) - } + require.NoError(t, err) + assert.Equal(t, 1.777, s.Amount) } func TestAdjustQuoteAmount(t *testing.T) { @@ -2102,35 +1682,21 @@ func TestAdjustQuoteAmount(t *testing.T) { var s *SubmitResponse err := s.AdjustQuoteAmount(0) - if !errors.Is(err, errOrderSubmitResponseIsNil) { - t.Fatalf("received: '%v' but expected: '%v'", err, errOrderSubmitResponseIsNil) - } + require.ErrorIs(t, err, errOrderSubmitResponseIsNil) s = &SubmitResponse{} err = s.AdjustQuoteAmount(0) - if !errors.Is(err, errAmountIsZero) { - t.Fatalf("received: '%v' but expected: '%v'", err, errAmountIsZero) - } + require.ErrorIs(t, err, errAmountIsZero) s.QuoteAmount = 5.222222222222 err = s.AdjustQuoteAmount(5.222222222222) - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } - - if s.QuoteAmount != 5.222222222222 { - t.Fatalf("received: '%v' but expected: '%v'", s.Amount, 5.222222222222) - } + require.NoError(t, err) + require.Equal(t, 5.222222222222, s.QuoteAmount) s.QuoteAmount = 5.222222222222 err = s.AdjustQuoteAmount(5.22222222) - if !errors.Is(err, nil) { - t.Fatalf("received: '%v' but expected: '%v'", err, nil) - } - - if s.QuoteAmount != 5.22222222 { - t.Fatalf("received: '%v' but expected: '%v'", s.Amount, 5.22222222) - } + require.NoError(t, err) + assert.Equal(t, 5.22222222, s.QuoteAmount) } func TestSideUnmarshal(t *testing.T) { @@ -2143,11 +1709,109 @@ func TestSideUnmarshal(t *testing.T) { assert.ErrorAs(t, s.UnmarshalJSON([]byte(`14`)), &jErr, "non-string valid json is rejected") } +func TestIsValid(t *testing.T) { + t.Parallel() + var timeInForceValidityMap = map[TimeInForce]bool{ + TimeInForce(1): false, + ImmediateOrCancel: true, + GoodTillTime: true, + GoodTillCancel: true, + GoodTillDay: true, + FillOrKill: true, + PostOnly: true, + UnsetTIF: true, + UnknownTIF: false, + } + var tif TimeInForce + for tif = range timeInForceValidityMap { + assert.Equalf(t, timeInForceValidityMap[tif], tif.IsValid(), "got %v, expected %v for %v with id %d", tif.IsValid(), timeInForceValidityMap[tif], tif, tif) + } +} + +func TestStringToTimeInForce(t *testing.T) { + t.Parallel() + var timeInForceStringToValueMap = map[string]struct { + TIF TimeInForce + Error error + }{ + "Unknown": {TIF: UnknownTIF, Error: ErrInvalidTimeInForce}, + "GoodTillCancel": {TIF: GoodTillCancel}, + "GOOD_TILL_CANCELED": {TIF: GoodTillCancel}, + "GTT": {TIF: GoodTillTime}, + "GOOD_TIL_TIME": {TIF: GoodTillTime}, + "FILLORKILL": {TIF: FillOrKill}, + "POST_ONLY_GOOD_TIL_CANCELLED": {TIF: GoodTillCancel}, + "immedIate_Or_Cancel": {TIF: ImmediateOrCancel}, + "": {TIF: UnsetTIF}, + "IOC": {TIF: ImmediateOrCancel}, + "immediate_or_cancel": {TIF: ImmediateOrCancel}, + "IMMEDIATE_OR_CANCEL": {TIF: ImmediateOrCancel}, + "IMMEDIATEORCANCEL": {TIF: ImmediateOrCancel}, + "GOOD_TILL_CANCELLED": {TIF: GoodTillCancel}, + "good_till_day": {TIF: GoodTillDay}, + "GOOD_TILL_DAY": {TIF: GoodTillDay}, + "GTD": {TIF: GoodTillDay}, + "GOODtillday": {TIF: GoodTillDay}, + "abcdfeg": {TIF: UnknownTIF, Error: ErrInvalidTimeInForce}, + "PoC": {TIF: PostOnly}, + "PendingORCANCEL": {TIF: PostOnly}, + "GTX": {TIF: GoodTillCrossing}, + "GOOD_TILL_CROSSING": {TIF: GoodTillCrossing}, + "Good Til crossing": {TIF: GoodTillCrossing}, + } + + for tk := range timeInForceStringToValueMap { + result, err := StringToTimeInForce(tk) + assert.ErrorIsf(t, err, timeInForceStringToValueMap[tk].Error, "got %v, expected %v", err, timeInForceStringToValueMap[tk].Error) + assert.Equalf(t, result, timeInForceStringToValueMap[tk].TIF, "got %v, expected %v", result, timeInForceStringToValueMap[tk].TIF) + } +} + +func TestString(t *testing.T) { + t.Parallel() + valMap := map[TimeInForce]string{ + ImmediateOrCancel: "IOC", + GoodTillCancel: "GTC", + GoodTillTime: "GTT", + GoodTillDay: "GTD", + FillOrKill: "FOK", + PostOnly: "POSTONLY", + UnknownTIF: "UNKNOWN", + UnsetTIF: "", + ImmediateOrCancel | PostOnly: "IOC,POSTONLY", + GoodTillCancel | PostOnly: "GTC,POSTONLY", + GoodTillTime | PostOnly: "GTT,POSTONLY", + GoodTillDay | PostOnly: "GTD,POSTONLY", + FillOrKill | PostOnly: "FOK,POSTONLY", + FillOrKill | ImmediateOrCancel: "IOC,FOK", + } + for x := range valMap { + result := x.String() + assert.Equalf(t, valMap[x], result, "expected %v, got %v", x, result) + } +} + +func TestUnmarshalJSON(t *testing.T) { + t.Parallel() + targets := []TimeInForce{ + GoodTillCancel | PostOnly | ImmediateOrCancel, GoodTillCancel | PostOnly, GoodTillCancel, UnsetTIF, PostOnly | ImmediateOrCancel, + GoodTillCancel, GoodTillCancel, PostOnly, PostOnly, ImmediateOrCancel, GoodTillDay, GoodTillDay, GoodTillTime, FillOrKill, FillOrKill, + } + data := `{"tifs": ["GTC,POSTONLY,IOC", "GTC,POSTONLY", "GTC", "", "POSTONLY,IOC", "GoodTilCancel", "GoodTILLCANCEL", "POST_ONLY", "POC","IOC", "GTD", "gtd","gtt", "fok", "fillOrKill"]}` + target := &struct { + TIFs []TimeInForce `json:"tifs"` + }{} + err := json.Unmarshal([]byte(data), &target) + require.NoError(t, err) + require.EqualValues(t, targets, target.TIFs) +} + func TestSideMarshalJSON(t *testing.T) { t.Parallel() b, err := Buy.MarshalJSON() assert.NoError(t, err) assert.Equal(t, `"BUY"`, string(b)) + b, err = UnknownSide.MarshalJSON() assert.NoError(t, err) assert.Equal(t, `"UNKNOWN"`, string(b)) @@ -2197,3 +1861,38 @@ func TestTrackingModeString(t *testing.T) { require.Equal(t, v, k.String()) } } + +func TestMarshalOrder(t *testing.T) { + t.Parallel() + btx := currency.NewBTCUSDT() + btx.Delimiter = "-" + orderSubmit := Submit{ + Exchange: "test", + Pair: btx, + AssetType: asset.Spot, + MarginType: margin.Multi, + Side: Buy, + Type: Market, + Amount: 1, + Price: 1000, + } + j, err := json.Marshal(orderSubmit) + require.NoError(t, err, "json.Marshal must not error") + exp := []byte(`{"Exchange":"test","Type":4,"Side":"BUY","Pair":"BTC-USDT","AssetType":"spot","TimeInForce":"","ReduceOnly":false,"Leverage":0,"Price":1000,"Amount":1,"QuoteAmount":0,"TriggerPrice":0,"TriggerPriceType":0,"ClientID":"","ClientOrderID":"","AutoBorrow":false,"MarginType":"multi","RetrieveFees":false,"RetrieveFeeDelay":0,"RiskManagementModes":{"Mode":"","TakeProfit":{"Enabled":false,"TriggerPriceType":0,"Price":0,"LimitPrice":0,"OrderType":0},"StopLoss":{"Enabled":false,"TriggerPriceType":0,"Price":0,"LimitPrice":0,"OrderType":0},"StopEntry":{"Enabled":false,"TriggerPriceType":0,"Price":0,"LimitPrice":0,"OrderType":0}},"Hidden":false,"Iceberg":false,"TrackingMode":0,"TrackingValue":0}`) + assert.Equal(t, exp, j) +} + +func TestMarshalJSON(t *testing.T) { + t.Parallel() + data, err := json.Marshal(GoodTillCrossing) + require.NoError(t, err) + assert.Equal(t, []byte(`"GTX"`), data) + + data = []byte(`{"tif":"IOC"}`) + target := &struct { + TimeInForce TimeInForce `json:"tif"` + }{} + err = json.Unmarshal(data, &target) + require.NoError(t, err) + assert.Equal(t, "IOC", target.TimeInForce.String()) +} diff --git a/exchanges/order/order_types.go b/exchanges/order/order_types.go index 4c78c0749a5..5c8e4eab892 100644 --- a/exchanges/order/order_types.go +++ b/exchanges/order/order_types.go @@ -46,11 +46,9 @@ type Submit struct { Pair currency.Pair AssetType asset.Item - // Time in force values ------ TODO: Time In Force uint8 - ImmediateOrCancel bool - FillOrKill bool + // TimeInForce holds time in force values + TimeInForce TimeInForce - PostOnly bool // ReduceOnly reduces a position instead of opening an opposing // position; this also equates to closing the position in huobi_wrapper.go // swaps. @@ -109,18 +107,16 @@ type SubmitResponse struct { Pair currency.Pair AssetType asset.Item - ImmediateOrCancel bool - FillOrKill bool - PostOnly bool + TimeInForce TimeInForce ReduceOnly bool Leverage float64 Price float64 - AverageExecutedPrice float64 Amount float64 QuoteAmount float64 TriggerPrice float64 ClientID string ClientOrderID string + AverageExecutedPrice float64 LastUpdated time.Time Date time.Time @@ -161,11 +157,10 @@ type Modify struct { Pair currency.Pair // Change fields - ImmediateOrCancel bool - PostOnly bool - Price float64 - Amount float64 - TriggerPrice float64 + TimeInForce TimeInForce + Price float64 + Amount float64 + TriggerPrice float64 // added to represent a unified trigger price type information such as LastPrice, MarkPrice, and IndexPrice // https://bybit-exchange.github.io/docs/v5/order/create-order @@ -187,11 +182,10 @@ type ModifyResponse struct { AssetType asset.Item // Fields that will be copied over from Modify - ImmediateOrCancel bool - PostOnly bool - Price float64 - Amount float64 - TriggerPrice float64 + TimeInForce TimeInForce + Price float64 + Amount float64 + TriggerPrice float64 // Fields that need to be handled in scope after DeriveModifyResponse() // if applicable @@ -203,10 +197,8 @@ type ModifyResponse struct { // Detail contains all properties of an order // Each exchange has their own requirements, so not all fields are required to be populated type Detail struct { - ImmediateOrCancel bool HiddenOrder bool - FillOrKill bool - PostOnly bool + TimeInForce TimeInForce ReduceOnly bool Leverage float64 Price float64 @@ -276,6 +268,7 @@ type Cancel struct { AssetType asset.Item Pair currency.Pair MarginType margin.Type + TimeInForce TimeInForce } // CancelAllResponse returns the status from attempting to @@ -311,12 +304,13 @@ type TradeHistory struct { type MultiOrderRequest struct { // Currencies Empty array = all currencies. Some endpoints only support // singular currency enquiries - Pairs currency.Pairs - AssetType asset.Item - Type Type - Side Side - StartTime time.Time - EndTime time.Time + Pairs currency.Pairs + AssetType asset.Item + Type Type + Side Side + TimeInForce TimeInForce + StartTime time.Time + EndTime time.Time // FromOrderID for some APIs require order history searching // from a specific orderID rather than via timestamps FromOrderID string @@ -361,8 +355,6 @@ const ( UnknownType Type = 0 Limit Type = 1 << iota Market - PostOnly - ImmediateOrCancel Stop StopLimit StopMarket @@ -370,7 +362,6 @@ const ( TakeProfitMarket TrailingStop TrailingStopLimit - FillOrKill IOS AnyType Liquidation @@ -411,6 +402,29 @@ const ( MissingData ) +// TimeInForce enforces a standard for time-in-force values across the code base. +type TimeInForce uint16 + +// Is checks to see if the enum contains the flag +func (t TimeInForce) Is(in TimeInForce) bool { + return in != 0 && t&in == in +} + +// TimeInForce types +const ( + UnsetTIF TimeInForce = 0 + GoodTillCancel TimeInForce = 1 << iota + GoodTillDay + GoodTillTime + GoodTillCrossing + FillOrKill + ImmediateOrCancel + PostOnly + UnknownTIF + + supportedTimeInForceFlag = GoodTillCancel | GoodTillDay | GoodTillTime | GoodTillCrossing | FillOrKill | ImmediateOrCancel | PostOnly +) + // ByPrice used for sorting orders by price type ByPrice []Detail diff --git a/exchanges/order/orders.go b/exchanges/order/orders.go index dee8be898dd..b09b01d89c7 100644 --- a/exchanges/order/orders.go +++ b/exchanges/order/orders.go @@ -39,10 +39,10 @@ var ( ErrAmountMustBeSet = errors.New("amount must be set") ErrClientOrderIDMustBeSet = errors.New("client order ID must be set") ErrUnknownSubmissionAmountType = errors.New("unknown submission amount type") + ErrInvalidTimeInForce = errors.New("invalid time in force value provided") ) var ( - errTimeInForceConflict = errors.New("multiple time in force options applied") errUnrecognisedOrderType = errors.New("unrecognised order type") errUnrecognisedOrderStatus = errors.New("unrecognised order status") errExchangeNameUnset = errors.New("exchange name unset") @@ -87,8 +87,8 @@ func (s *Submit) Validate(requirements protocol.TradingRequirements, opt ...vali return ErrTypeIsInvalid } - if s.ImmediateOrCancel && s.FillOrKill { - return errTimeInForceConflict + if !s.TimeInForce.IsValid() { + return ErrInvalidTimeInForce } if s.Amount == 0 && s.QuoteAmount == 0 { @@ -158,18 +158,14 @@ func (d *Detail) UpdateOrderFromDetail(m *Detail) error { } var updated bool - if d.ImmediateOrCancel != m.ImmediateOrCancel { - d.ImmediateOrCancel = m.ImmediateOrCancel + if d.TimeInForce != m.TimeInForce { + d.TimeInForce = m.TimeInForce updated = true } if d.HiddenOrder != m.HiddenOrder { d.HiddenOrder = m.HiddenOrder updated = true } - if d.FillOrKill != m.FillOrKill { - d.FillOrKill = m.FillOrKill - updated = true - } if m.Price > 0 && m.Price != d.Price { d.Price = m.Price updated = true @@ -206,10 +202,6 @@ func (d *Detail) UpdateOrderFromDetail(m *Detail) error { d.AccountID = m.AccountID updated = true } - if m.PostOnly != d.PostOnly { - d.PostOnly = m.PostOnly - updated = true - } if !m.Pair.IsEmpty() && !m.Pair.Equal(d.Pair) { // TODO: Add a check to see if the original pair is empty as well, but // error if it is changing from BTC-USD -> LTC-USD. @@ -325,8 +317,8 @@ func (d *Detail) UpdateOrderFromModifyResponse(m *ModifyResponse) { d.OrderID = m.OrderID updated = true } - if d.ImmediateOrCancel != m.ImmediateOrCancel { - d.ImmediateOrCancel = m.ImmediateOrCancel + if d.TimeInForce != m.TimeInForce && m.TimeInForce != UnsetTIF { + d.TimeInForce = m.TimeInForce updated = true } if m.Price > 0 && m.Price != d.Price { @@ -341,10 +333,6 @@ func (d *Detail) UpdateOrderFromModifyResponse(m *ModifyResponse) { d.TriggerPrice = m.TriggerPrice updated = true } - if m.PostOnly != d.PostOnly { - d.PostOnly = m.PostOnly - updated = true - } if !m.Pair.IsEmpty() && !m.Pair.Equal(d.Pair) { // TODO: Add a check to see if the original pair is empty as well, but // error if it is changing from BTC-USD -> LTC-USD. @@ -501,18 +489,16 @@ func (s *Submit) DeriveSubmitResponse(orderID string) (*SubmitResponse, error) { Pair: s.Pair, AssetType: s.AssetType, - ImmediateOrCancel: s.ImmediateOrCancel, - FillOrKill: s.FillOrKill, - PostOnly: s.PostOnly, - ReduceOnly: s.ReduceOnly, - Leverage: s.Leverage, - Price: s.Price, - Amount: s.Amount, - QuoteAmount: s.QuoteAmount, - TriggerPrice: s.TriggerPrice, - ClientID: s.ClientID, - ClientOrderID: s.ClientOrderID, - MarginType: s.MarginType, + TimeInForce: s.TimeInForce, + ReduceOnly: s.ReduceOnly, + Leverage: s.Leverage, + Price: s.Price, + Amount: s.Amount, + QuoteAmount: s.QuoteAmount, + TriggerPrice: s.TriggerPrice, + ClientID: s.ClientID, + ClientOrderID: s.ClientOrderID, + MarginType: s.MarginType, LastUpdated: time.Now(), Date: time.Now(), @@ -594,17 +580,15 @@ func (s *SubmitResponse) DeriveDetail(internal uuid.UUID) (*Detail, error) { Pair: s.Pair, AssetType: s.AssetType, - ImmediateOrCancel: s.ImmediateOrCancel, - FillOrKill: s.FillOrKill, - PostOnly: s.PostOnly, - ReduceOnly: s.ReduceOnly, - Leverage: s.Leverage, - Price: s.Price, - Amount: s.Amount, - QuoteAmount: s.QuoteAmount, - TriggerPrice: s.TriggerPrice, - ClientID: s.ClientID, - ClientOrderID: s.ClientOrderID, + TimeInForce: s.TimeInForce, + ReduceOnly: s.ReduceOnly, + Leverage: s.Leverage, + Price: s.Price, + Amount: s.Amount, + QuoteAmount: s.QuoteAmount, + TriggerPrice: s.TriggerPrice, + ClientID: s.ClientID, + ClientOrderID: s.ClientOrderID, InternalOrderID: internal, @@ -654,18 +638,17 @@ func (m *Modify) DeriveModifyResponse() (*ModifyResponse, error) { return nil, errOrderDetailIsNil } return &ModifyResponse{ - Exchange: m.Exchange, - OrderID: m.OrderID, - ClientOrderID: m.ClientOrderID, - Type: m.Type, - Side: m.Side, - AssetType: m.AssetType, - Pair: m.Pair, - ImmediateOrCancel: m.ImmediateOrCancel, - PostOnly: m.PostOnly, - Price: m.Price, - Amount: m.Amount, - TriggerPrice: m.TriggerPrice, + Exchange: m.Exchange, + OrderID: m.OrderID, + ClientOrderID: m.ClientOrderID, + Type: m.Type, + Side: m.Side, + AssetType: m.AssetType, + Pair: m.Pair, + TimeInForce: m.TimeInForce, + Price: m.Price, + Amount: m.Amount, + TriggerPrice: m.TriggerPrice, }, nil } @@ -699,10 +682,6 @@ func (t Type) String() string { return "LIMIT_MAKER" case Market: return "MARKET" - case PostOnly: - return "POST_ONLY" - case ImmediateOrCancel: - return "IMMEDIATE_OR_CANCEL" case Stop: return "STOP" case ConditionalStop: @@ -727,8 +706,6 @@ func (t Type) String() string { return "TRAILING_STOP" case TrailingStopLimit: return "TRAILING_STOP_LIMIT" - case FillOrKill: - return "FOK" case IOS: return "IOS" case Liquidation: @@ -744,6 +721,57 @@ func (t Type) String() string { } } +// String implements the stringer interface. +func (t TimeInForce) String() string { + var tifStrings []string + if t.Is(ImmediateOrCancel) { + tifStrings = append(tifStrings, "IOC") + } + if t.Is(GoodTillCancel) { + tifStrings = append(tifStrings, "GTC") + } + if t.Is(GoodTillDay) { + tifStrings = append(tifStrings, "GTD") + } + if t.Is(GoodTillTime) { + tifStrings = append(tifStrings, "GTT") + } + if t.Is(GoodTillCrossing) { + tifStrings = append(tifStrings, "GTX") + } + if t.Is(FillOrKill) { + tifStrings = append(tifStrings, "FOK") + } + if t.Is(PostOnly) { + tifStrings = append(tifStrings, "POSTONLY") + } + if t == UnsetTIF { + return "" + } + if len(tifStrings) == 0 { + return "UNKNOWN" + } + return strings.Join(tifStrings, ",") +} + +// UnmarshalJSON deserializes a string data into TimeInForce instance. +func (t *TimeInForce) UnmarshalJSON(data []byte) error { + tifStrings := strings.Split(strings.Trim(string(data), `"`), ",") + for _, val := range tifStrings { + tif, err := StringToTimeInForce(val) + if err != nil { + return err + } + *t |= tif + } + return nil +} + +// MarshalJSON returns the JSON-encoded order time-in-force value +func (t TimeInForce) MarshalJSON() ([]byte, error) { + return []byte(`"` + t.String() + `"`), nil +} + // Lower returns the type lower case string func (t Type) Lower() string { return strings.ToLower(t.String()) @@ -1143,8 +1171,6 @@ func StringToOrderType(oType string) (Type, error) { return LimitMaker, nil case Market.String(), "EXCHANGE MARKET": return Market, nil - case ImmediateOrCancel.String(), "IMMEDIATE OR CANCEL", "IOC", "EXCHANGE IOC": - return ImmediateOrCancel, nil case Stop.String(), "STOP LOSS", "STOP_LOSS", "EXCHANGE STOP": return Stop, nil case StopLimit.String(), "EXCHANGE STOP LIMIT", "STOP_LIMIT": @@ -1155,12 +1181,8 @@ func StringToOrderType(oType string) (Type, error) { return TrailingStop, nil case TrailingStopLimit.String(), "TRAILING STOP LIMIT": return TrailingStopLimit, nil - case FillOrKill.String(), "EXCHANGE FOK": - return FillOrKill, nil case IOS.String(): return IOS, nil - case PostOnly.String(): - return PostOnly, nil case AnyType.String(): return AnyType, nil case Trigger.String(): @@ -1242,6 +1264,37 @@ func StringToOrderStatus(status string) (Status, error) { } } +// StringToTimeInForce converts time in force string value to TimeInForce instance. +func StringToTimeInForce(timeInForce string) (TimeInForce, error) { + timeInForce = strings.ToUpper(timeInForce) + switch timeInForce { + case "IMMEDIATEORCANCEL", "IMMEDIATE_OR_CANCEL", ImmediateOrCancel.String(): + return ImmediateOrCancel, nil + case "GOODTILLCANCEL", "GOODTILCANCEL", "GOOD_TIL_CANCELLED", "GOOD_TILL_CANCELLED", "GOOD_TILL_CANCELED", GoodTillCancel.String(), "POST_ONLY_GOOD_TIL_CANCELLED": + return GoodTillCancel, nil + case "GOODTILLDAY", GoodTillDay.String(), "GOOD_TIL_DAY", "GOOD_TILL_DAY": + return GoodTillDay, nil + case "GOODTILLTIME", "GOOD_TIL_TIME", GoodTillTime.String(): + return GoodTillTime, nil + case "GOODTILLCROSSING", "GOOD_TIL_CROSSING", "GOOD TIL CROSSING", GoodTillCrossing.String(), "GOOD_TILL_CROSSING": + return GoodTillCrossing, nil + case "FILLORKILL", "FILL_OR_KILL", FillOrKill.String(): + return FillOrKill, nil + case "POST_ONLY_GOOD_TILL_CANCELLED", PostOnly.String(), "POC", "POST_ONLY", "PENDINGORCANCEL": + return PostOnly, nil + case "": + return UnsetTIF, nil + default: + return UnknownTIF, fmt.Errorf("%w: tif=%s", ErrInvalidTimeInForce, timeInForce) + } +} + +// IsValid returns whether or not the supplied time in force value is valid or +// not +func (t TimeInForce) IsValid() bool { + return t == UnsetTIF || supportedTimeInForceFlag&t == t +} + func (o *ClassificationError) Error() string { if o.OrderID != "" { return fmt.Sprintf("Exchange %s: OrderID: %s classification error: %v", diff --git a/exchanges/orderbook/orderbook_test.go b/exchanges/orderbook/orderbook_test.go index 029a8f7333c..f1d36701577 100644 --- a/exchanges/orderbook/orderbook_test.go +++ b/exchanges/orderbook/orderbook_test.go @@ -608,7 +608,7 @@ func BenchmarkReverse(b *testing.B) { b.Fatal("incorrect length") } - for i := 0; i < b.N; i++ { + for b.Loop() { s.Reverse() } } @@ -618,7 +618,7 @@ func BenchmarkReverse(b *testing.B) { func BenchmarkSortAsksDecending(b *testing.B) { s := deploySliceOrdered() bucket := make(Tranches, len(s)) - for i := 0; i < b.N; i++ { + for b.Loop() { copy(bucket, s) bucket.SortAsks() } @@ -630,7 +630,7 @@ func BenchmarkSortBidsAscending(b *testing.B) { s := deploySliceOrdered() s.Reverse() bucket := make(Tranches, len(s)) - for i := 0; i < b.N; i++ { + for b.Loop() { copy(bucket, s) bucket.SortBids() } @@ -641,7 +641,7 @@ func BenchmarkSortBidsAscending(b *testing.B) { func BenchmarkSortAsksStandard(b *testing.B) { s := deployUnorderedSlice() bucket := make(Tranches, len(s)) - for i := 0; i < b.N; i++ { + for b.Loop() { copy(bucket, s) bucket.SortAsks() } @@ -652,7 +652,7 @@ func BenchmarkSortAsksStandard(b *testing.B) { func BenchmarkSortBidsStandard(b *testing.B) { s := deployUnorderedSlice() bucket := make(Tranches, len(s)) - for i := 0; i < b.N; i++ { + for b.Loop() { copy(bucket, s) bucket.SortBids() } @@ -663,7 +663,7 @@ func BenchmarkSortBidsStandard(b *testing.B) { func BenchmarkSortAsksAscending(b *testing.B) { s := deploySliceOrdered() bucket := make(Tranches, len(s)) - for i := 0; i < b.N; i++ { + for b.Loop() { copy(bucket, s) bucket.SortAsks() } @@ -675,7 +675,7 @@ func BenchmarkSortBidsDescending(b *testing.B) { s := deploySliceOrdered() s.Reverse() bucket := make(Tranches, len(s)) - for i := 0; i < b.N; i++ { + for b.Loop() { copy(bucket, s) bucket.SortBids() } diff --git a/exchanges/orderbook/tranches_test.go b/exchanges/orderbook/tranches_test.go index 87ab7316032..af3fd92c28c 100644 --- a/exchanges/orderbook/tranches_test.go +++ b/exchanges/orderbook/tranches_test.go @@ -104,7 +104,7 @@ func TestLoad(t *testing.T) { // 84119028 13.87 ns/op 0 B/op 0 allocs/op (new) func BenchmarkLoad(b *testing.B) { ts := Tranches{} - for i := 0; i < b.N; i++ { + for b.Loop() { ts.load(ask) } } @@ -262,7 +262,7 @@ func BenchmarkUpdateInsertByPrice_Amend(b *testing.B) { }, } - for i := 0; i < b.N; i++ { + for b.Loop() { a.updateInsertByPrice(updates, 0) } } @@ -285,7 +285,7 @@ func BenchmarkUpdateInsertByPrice_Insert_Delete(b *testing.B) { }, } - for i := 0; i < b.N; i++ { + for b.Loop() { a.updateInsertByPrice(updates, 0) } } @@ -357,7 +357,7 @@ func BenchmarkUpdateByID(b *testing.B) { } asks.load(asksSnapshot) - for i := 0; i < b.N; i++ { + for b.Loop() { err := asks.updateByID(asksSnapshot) if err != nil { b.Fatal(err) @@ -427,7 +427,7 @@ func BenchmarkDeleteByID(b *testing.B) { } asks.load(asksSnapshot) - for i := 0; i < b.N; i++ { + for b.Loop() { err := asks.deleteByID(asksSnapshot, false) if err != nil { b.Fatal(err) @@ -702,7 +702,7 @@ func BenchmarkUpdateInsertByID_asks(b *testing.B) { } asks.load(asksSnapshot) - for i := 0; i < b.N; i++ { + for b.Loop() { err := asks.updateInsertByID(asksSnapshot, askCompare) if err != nil { b.Fatal(err) @@ -974,7 +974,7 @@ func BenchmarkUpdateInsertByID_bids(b *testing.B) { } bids.load(bidsSnapshot) - for i := 0; i < b.N; i++ { + for b.Loop() { err := bids.updateInsertByID(bidsSnapshot, bidCompare) if err != nil { b.Fatal(err) @@ -1878,7 +1878,7 @@ func BenchmarkRetrieve(b *testing.B) { } asks.load(asksSnapshot) - for i := 0; i < b.N; i++ { + for b.Loop() { _ = asks.retrieve(6) } } diff --git a/exchanges/poloniex/poloniex.go b/exchanges/poloniex/poloniex.go index 5177f6e5fa0..aa23d93ee7a 100644 --- a/exchanges/poloniex/poloniex.go +++ b/exchanges/poloniex/poloniex.go @@ -151,7 +151,7 @@ func (p *Poloniex) GetOrderbook(ctx context.Context, symbol currency.Pair, scale } // GetCandlesticks retrieves OHLC for a symbol at given timeframe (interval). -func (p *Poloniex) GetCandlesticks(ctx context.Context, symbol currency.Pair, interval kline.Interval, startTime, endTime time.Time, limit int64) ([]CandlestickData, error) { +func (p *Poloniex) GetCandlesticks(ctx context.Context, symbol currency.Pair, interval kline.Interval, startTime, endTime time.Time, limit uint64) ([]CandlestickData, error) { if symbol.IsEmpty() { return nil, currency.ErrCurrencyPairEmpty } @@ -164,7 +164,7 @@ func (p *Poloniex) GetCandlesticks(ctx context.Context, symbol currency.Pair, in params := url.Values{} params.Set("interval", intervalString) if limit > 0 { - params.Set("limit", strconv.FormatInt(limit, 10)) + params.Set("limit", strconv.FormatUint(limit, 10)) } if !startTime.IsZero() { params.Set("startTime", strconv.FormatInt(startTime.UnixMilli(), 10)) diff --git a/exchanges/poloniex/poloniex_futures.go b/exchanges/poloniex/poloniex_futures.go index d905ba0726f..a447b658a4a 100644 --- a/exchanges/poloniex/poloniex_futures.go +++ b/exchanges/poloniex/poloniex_futures.go @@ -621,7 +621,7 @@ func IntervalString(interval kline.Interval) (string, error) { } // GetV3FuturesKlineData retrieves K-line data of the designated trading pair -func (p *Poloniex) GetV3FuturesKlineData(ctx context.Context, symbol string, interval kline.Interval, startTime, endTime time.Time, limit int64) ([]V3FuturesCandle, error) { +func (p *Poloniex) GetV3FuturesKlineData(ctx context.Context, symbol string, interval kline.Interval, startTime, endTime time.Time, limit uint64) ([]V3FuturesCandle, error) { if symbol == "" { return nil, currency.ErrSymbolStringEmpty } @@ -641,7 +641,7 @@ func (p *Poloniex) GetV3FuturesKlineData(ctx context.Context, symbol string, int params.Set("eTime", strconv.FormatInt(startTime.UnixMilli(), 10)) } if limit > 0 { - params.Set("limit", strconv.FormatInt(limit, 10)) + params.Set("limit", strconv.FormatUint(limit, 10)) } var resp []V3FuturesCandle return resp, p.SendHTTPRequest(ctx, exchange.RestSpot, request.UnAuth, common.EncodeURLValues("/v3/market/candles", params), &resp, true) diff --git a/exchanges/poloniex/poloniex_websocket.go b/exchanges/poloniex/poloniex_websocket.go index 12915a58363..068285cde43 100644 --- a/exchanges/poloniex/poloniex_websocket.go +++ b/exchanges/poloniex/poloniex_websocket.go @@ -411,7 +411,7 @@ func (p *Poloniex) processTrades(result *SubscriptionResponse) error { Timestamp: resp[x].Timestamp.Time(), } } - return trade.AddTradesToBuffer(p.Name, trades...) + return trade.AddTradesToBuffer(trades...) } func (p *Poloniex) processCandlestickData(result *SubscriptionResponse) error { diff --git a/exchanges/poloniex/poloniex_wrapper.go b/exchanges/poloniex/poloniex_wrapper.go index 4c94a1d6f13..cf725baf225 100644 --- a/exchanges/poloniex/poloniex_wrapper.go +++ b/exchanges/poloniex/poloniex_wrapper.go @@ -758,9 +758,9 @@ func (p *Poloniex) SubmitOrder(ctx context.Context, s *order.Submit) (*order.Sub StopPriceType: stopOrderType, ReduceOnly: s.ReduceOnly, Hidden: s.Hidden, - PostOnly: s.PostOnly, - Price: s.Price, - Size: s.Amount, + // PostOnly: s.PostOnly, + Price: s.Price, + Size: s.Amount, }) if err != nil { return nil, err @@ -803,13 +803,13 @@ func (p *Poloniex) ModifyOrder(ctx context.Context, action *order.Modify) (*orde return modResp, nil case order.Stop, order.StopLimit: oResp, err := p.CancelReplaceSmartOrder(ctx, &CancelReplaceSmartOrderParam{ - orderID: action.OrderID, - ClientOrderID: action.ClientOrderID, - Price: action.Price, - StopPrice: action.TriggerPrice, - Amount: action.Amount, - AmendedType: orderTypeString(action.Type), - ProceedOnFailure: !action.ImmediateOrCancel, + orderID: action.OrderID, + ClientOrderID: action.ClientOrderID, + Price: action.Price, + StopPrice: action.TriggerPrice, + Amount: action.Amount, + AmendedType: orderTypeString(action.Type), + // ProceedOnFailure: !action.ImmediateOrCancel, }) if err != nil { return nil, err @@ -1408,16 +1408,16 @@ func (p *Poloniex) GetActiveOrders(ctx context.Context, req *order.MultiOrderReq } } orders = append(orders, order.Detail{ - Type: oType, - OrderID: fOrders.Items[a].OrderID, - Side: orderSide, - Amount: fOrders.Items[a].Size, - Date: fOrders.Items[a].CreatedAt.Time(), - Price: fOrders.Items[a].Price.Float64(), - Pair: symbol, - Exchange: p.Name, - HiddenOrder: fOrders.Items[a].Hidden, - PostOnly: fOrders.Items[a].PostOnly, + Type: oType, + OrderID: fOrders.Items[a].OrderID, + Side: orderSide, + Amount: fOrders.Items[a].Size, + Date: fOrders.Items[a].CreatedAt.Time(), + Price: fOrders.Items[a].Price.Float64(), + Pair: symbol, + Exchange: p.Name, + HiddenOrder: fOrders.Items[a].Hidden, + // PostOnly: fOrders.Items[a].PostOnly, ReduceOnly: fOrders.Items[a].ReduceOnly, Leverage: fOrders.Items[a].Leverage.Float64(), ExecutedAmount: fOrders.Items[a].FilledSize, diff --git a/exchanges/request/request_test.go b/exchanges/request/request_test.go index 5793ef66324..810ca33ba12 100644 --- a/exchanges/request/request_test.go +++ b/exchanges/request/request_test.go @@ -491,8 +491,7 @@ func TestGetNonce(t *testing.T) { func BenchmarkGetNonce(b *testing.B) { r, err := New("test", new(http.Client), WithLimiter(globalshell)) require.NoError(b, err) - b.ResetTimer() - for i := 0; i < b.N; i++ { + for b.Loop() { r.GetNonce(nonce.UnixNano) r.timedLock.UnlockIfLocked() } diff --git a/exchanges/stream/buffer/buffer_test.go b/exchanges/stream/buffer/buffer_test.go index 4b3b9a8898d..bec279891ec 100644 --- a/exchanges/stream/buffer/buffer_test.go +++ b/exchanges/stream/buffer/buffer_test.go @@ -92,8 +92,7 @@ func BenchmarkUpdateBidsByPrice(b *testing.B) { ob, _, _, err := createSnapshot(cp) require.NoError(b, err) - b.ResetTimer() - for i := 0; i < b.N; i++ { + for b.Loop() { bidAsks := bidAskGenerator() update := &orderbook.Update{ Bids: bidAsks, @@ -114,8 +113,7 @@ func BenchmarkUpdateAsksByPrice(b *testing.B) { ob, _, _, err := createSnapshot(cp) require.NoError(b, err) - b.ResetTimer() - for i := 0; i < b.N; i++ { + for b.Loop() { bidAsks := bidAskGenerator() update := &orderbook.Update{ Bids: bidAsks, @@ -147,8 +145,7 @@ func BenchmarkBufferPerformance(b *testing.B) { UpdateTime: time.Now(), Asset: asset.Spot, } - b.ResetTimer() - for i := 0; i < b.N; i++ { + for b.Loop() { randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypo/rand for testing update.Asks = itemArray[randomIndex] update.Bids = itemArray[randomIndex] @@ -175,8 +172,7 @@ func BenchmarkBufferSortingPerformance(b *testing.B) { UpdateTime: time.Now(), Asset: asset.Spot, } - b.ResetTimer() - for i := 0; i < b.N; i++ { + for b.Loop() { randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypo/rand for testing update.Asks = itemArray[randomIndex] update.Bids = itemArray[randomIndex] @@ -203,8 +199,8 @@ func BenchmarkBufferSortingByIDPerformance(b *testing.B) { UpdateTime: time.Now(), Asset: asset.Spot, } - b.ResetTimer() - for i := 0; i < b.N; i++ { + + for b.Loop() { randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypo/rand for testing update.Asks = itemArray[randomIndex] update.Bids = itemArray[randomIndex] @@ -231,9 +227,8 @@ func BenchmarkNoBufferPerformance(b *testing.B) { UpdateTime: time.Now(), Asset: asset.Spot, } - b.ResetTimer() - for i := 0; i < b.N; i++ { + for b.Loop() { randomIndex := rand.Intn(4) //nolint:gosec // no need to import crypo/rand for testing update.Asks = itemArray[randomIndex] update.Bids = itemArray[randomIndex] diff --git a/exchanges/stream/websocket.go b/exchanges/stream/websocket.go index 5ae6c1e9a56..90ef8e6f1b0 100644 --- a/exchanges/stream/websocket.go +++ b/exchanges/stream/websocket.go @@ -200,7 +200,7 @@ func (w *Websocket) Setup(s *WebsocketSetup) error { return err } - w.Trade.Setup(w.exchangeName, s.TradeFeed, w.DataHandler) + w.Trade.Setup(s.TradeFeed, w.DataHandler) w.Fills.Setup(s.FillsFeed, w.DataHandler) if s.MaxWebsocketSubscriptionsPerConnection < 0 { diff --git a/exchanges/stream/websocket_test.go b/exchanges/stream/websocket_test.go index 3852af8a6ba..9c6621b6e28 100644 --- a/exchanges/stream/websocket_test.go +++ b/exchanges/stream/websocket_test.go @@ -999,7 +999,7 @@ func TestGenerateMessageID(t *testing.T) { // 7002502 166.7 ns/op 48 B/op 3 allocs/op func BenchmarkGenerateMessageID_High(b *testing.B) { wc := WebsocketConnection{} - for i := 0; i < b.N; i++ { + for b.Loop() { _ = wc.GenerateMessageID(true) } } @@ -1007,7 +1007,7 @@ func BenchmarkGenerateMessageID_High(b *testing.B) { // 6536250 186.1 ns/op 48 B/op 3 allocs/op func BenchmarkGenerateMessageID_Low(b *testing.B) { wc := WebsocketConnection{} - for i := 0; i < b.N; i++ { + for b.Loop() { _ = wc.GenerateMessageID(false) } } diff --git a/exchanges/subscription/fixtures_test.go b/exchanges/subscription/fixtures_test.go index 5ed0bfa6b24..e37272a5cc9 100644 --- a/exchanges/subscription/fixtures_test.go +++ b/exchanges/subscription/fixtures_test.go @@ -14,7 +14,7 @@ import ( ) type mockEx struct { - pairs currency.Pairs + pairs assetPairs assets asset.Items tpl string auth bool @@ -23,16 +23,13 @@ type mockEx struct { } func newMockEx() *mockEx { - pairs := currency.Pairs{btcusdtPair, ethusdcPair} - for _, b := range []currency.Code{currency.LTC, currency.XRP, currency.TRX} { - for _, q := range []currency.Code{currency.USDT, currency.USDC} { - pairs = append(pairs, currency.NewPair(b, q)) - } - } - return &mockEx{ assets: asset.Items{asset.Spot, asset.Futures, asset.Index}, - pairs: pairs, + pairs: assetPairs{ + asset.Spot: currency.Pairs{ethusdcPair, btcusdtPair, currency.NewPair(currency.LTC, currency.USDT)}, + asset.Futures: currency.Pairs{ethusdcPair, btcusdtPair}, + asset.Index: currency.Pairs{btcusdtPair}, + }, } } @@ -40,12 +37,12 @@ func (m *mockEx) IsAssetWebsocketSupported(a asset.Item) bool { return a != asset.Index } -func (m *mockEx) GetEnabledPairs(_ asset.Item) (currency.Pairs, error) { - return m.pairs, m.errPairs +func (m *mockEx) GetEnabledPairs(a asset.Item) (currency.Pairs, error) { + return m.pairs[a], m.errPairs } func (m *mockEx) GetPairFormat(_ asset.Item, _ bool) (currency.PairFormat, error) { - return currency.PairFormat{Uppercase: true}, m.errFormat + return currency.PairFormat{Uppercase: true, Delimiter: "-"}, m.errFormat } func (m *mockEx) GetSubscriptionTemplate(s *Subscription) (*template.Template, error) { @@ -65,7 +62,14 @@ func (m *mockEx) GetSubscriptionTemplate(s *Subscription) (*template.Template, e ap[asset.Spot] = ap[asset.Spot][0:1] return "" }, - "batch": common.Batch[currency.Pairs], + "batch": func(pairs currency.Pairs, size int) []string { + s := []string{} + for _, p := range common.Batch(pairs, size) { + p = p.Format(currency.PairFormat{Uppercase: true}) + s = append(s, p.Join()) + } + return s + }, }). ParseFiles("testdata/" + m.tpl) } diff --git a/exchanges/subscription/list.go b/exchanges/subscription/list.go index 5cadd716c4a..8bd71296fcc 100644 --- a/exchanges/subscription/list.go +++ b/exchanges/subscription/list.go @@ -94,19 +94,6 @@ func (l List) SetStates(state State) error { return err } -func fillAssetPairs(ap assetPairs, a asset.Item, e IExchange) error { - p, err := e.GetEnabledPairs(a) - if err != nil { - return err - } - f, err := e.GetPairFormat(a, true) - if err != nil { - return err - } - ap[a] = common.SortStrings(p.Format(f)) - return nil -} - // assetPairs returns a map of enabled pairs for the subscriptions in the list, formatted for the asset func (l List) assetPairs(e IExchange) (assetPairs, error) { at := []asset.Item{} @@ -122,13 +109,13 @@ func (l List) assetPairs(e IExchange) (assetPairs, error) { // Nothing to do case asset.All: for _, a := range at { - if err := fillAssetPairs(ap, a, e); err != nil { + if err := ap.populate(e, a); err != nil { return nil, err } } default: if slices.Contains(at, s.Asset) { - if err := fillAssetPairs(ap, s.Asset, e); err != nil { + if err := ap.populate(e, s.Asset); err != nil { return nil, err } } @@ -169,3 +156,17 @@ func (l List) Public() List { } return n } + +// populate adds all enabled pairs for an asset to the assetPair map +func (ap assetPairs) populate(e IExchange, a asset.Item) error { + p, err := e.GetEnabledPairs(a) + if err != nil || len(p) == 0 { + return err + } + f, err := e.GetPairFormat(a, true) + if err != nil { + return err + } + ap[a] = common.SortStrings(p.Format(f)) + return nil +} diff --git a/exchanges/subscription/list_test.go b/exchanges/subscription/list_test.go index 2de75765674..8983cb068ec 100644 --- a/exchanges/subscription/list_test.go +++ b/exchanges/subscription/list_test.go @@ -114,6 +114,31 @@ func TestAssetPairs(t *testing.T) { } } +// TestAssetPairsPopulate exercises assetPairs Populate +func TestAssetPairsPopulate(t *testing.T) { + e := newMockEx() + ap := assetPairs{} + err := ap.populate(e, asset.Spot) + require.NoError(t, err) + require.NotEmpty(t, ap) + assert.Equal(t, 3, len(ap[asset.Spot]), "populate should return correct number of pairs for spot") + assert.Equal(t, "BTC-USDT", ap[asset.Spot][0].String(), "populate should respect format and sort the pairs") + err = ap.populate(e, asset.Futures) + require.NoError(t, err) + assert.Equal(t, 2, len(ap[asset.Futures]), "populate should return correct number of pairs for futures") + + exp := errors.New("expected error") + e.errFormat = exp + err = ap.populate(e, asset.Spot) + assert.ErrorIs(t, err, exp, "populate should error correctly on format error") + + e.pairs = assetPairs{} + ap = assetPairs{} + err = ap.populate(e, asset.Spot) + require.NoError(t, err, "populate must not error with no pairs enabled") + assert.Empty(t, ap, "populate should return an empty map with no pairs enabled") +} + func TestListClone(t *testing.T) { t.Parallel() l := List{{Channel: TickerChannel}, {Channel: OrderbookChannel}} diff --git a/exchanges/subscription/subscription_test.go b/exchanges/subscription/subscription_test.go index d34cb70efc4..3aac0389da7 100644 --- a/exchanges/subscription/subscription_test.go +++ b/exchanges/subscription/subscription_test.go @@ -75,19 +75,19 @@ func TestSubscriptionMarshaling(t *testing.T) { t.Parallel() j, err := json.Marshal(&Subscription{Key: 42, Channel: CandlesChannel}) assert.NoError(t, err, "Marshalling should not error") - assert.Equal(t, `{"enabled":false,"channel":"candles"}`, string(j), "Marshalling should be clean and concise") + assert.JSONEq(t, `{"enabled":false,"channel":"candles"}`, string(j), "Marshalling should be clean and concise") j, err = json.Marshal(&Subscription{Enabled: true, Channel: OrderbookChannel, Interval: kline.FiveMin, Levels: 4}) assert.NoError(t, err, "Marshalling should not error") - assert.Equal(t, `{"enabled":true,"channel":"orderbook","interval":"5m","levels":4}`, string(j), "Marshalling should be clean and concise") + assert.JSONEq(t, `{"enabled":true,"channel":"orderbook","interval":"5m","levels":4}`, string(j), "Marshalling should be clean and concise") j, err = json.Marshal(&Subscription{Enabled: true, Channel: OrderbookChannel, Interval: kline.FiveMin, Levels: 4, Pairs: currency.Pairs{currency.NewPair(currency.BTC, currency.USDT)}}) assert.NoError(t, err, "Marshalling should not error") - assert.Equal(t, `{"enabled":true,"channel":"orderbook","pairs":"BTCUSDT","interval":"5m","levels":4}`, string(j), "Marshalling should be clean and concise") + assert.JSONEq(t, `{"enabled":true,"channel":"orderbook","pairs":"BTCUSDT","interval":"5m","levels":4}`, string(j), "Marshalling should be clean and concise") j, err = json.Marshal(&Subscription{Enabled: true, Channel: MyTradesChannel, Authenticated: true}) assert.NoError(t, err, "Marshalling should not error") - assert.Equal(t, `{"enabled":true,"channel":"myTrades","authenticated":true}`, string(j), "Marshalling should be clean and concise") + assert.JSONEq(t, `{"enabled":true,"channel":"myTrades","authenticated":true}`, string(j), "Marshalling should be clean and concise") } func TestSubscriptionClone(t *testing.T) { diff --git a/exchanges/subscription/template_test.go b/exchanges/subscription/template_test.go index 6b4885250ff..f6badea5a5f 100644 --- a/exchanges/subscription/template_test.go +++ b/exchanges/subscription/template_test.go @@ -27,7 +27,7 @@ func TestExpandTemplates(t *testing.T) { {Channel: "expand-pairs", Asset: asset.Spot, Levels: 2}, {Channel: "single-channel", QualifiedChannel: "just one sub already processed"}, {Channel: "update-asset-pairs", Asset: asset.All}, - {Channel: "expand-pairs", Asset: asset.Spot, Pairs: e.pairs[0:2], Levels: 3}, + {Channel: "expand-pairs", Asset: asset.Spot, Pairs: e.pairs[asset.Spot][0:2], Levels: 3}, {Channel: "batching", Asset: asset.Spot}, {Channel: "single-channel", Authenticated: true}, } @@ -35,21 +35,32 @@ func TestExpandTemplates(t *testing.T) { require.NoError(t, err, "ExpandTemplates must not error") exp := List{ {Channel: "single-channel", QualifiedChannel: "single-channel"}, - {Channel: "expand-assets", QualifiedChannel: "spot-expand-assets@15m", Asset: asset.Spot, Pairs: e.pairs, Interval: kline.FifteenMin}, - {Channel: "expand-assets", QualifiedChannel: "future-expand-assets@15m", Asset: asset.Futures, Pairs: e.pairs, Interval: kline.FifteenMin}, + {Channel: "expand-assets", QualifiedChannel: "spot-expand-assets@15m", Asset: asset.Spot, Pairs: e.pairs[asset.Spot], Interval: kline.FifteenMin}, + {Channel: "expand-assets", QualifiedChannel: "future-expand-assets@15m", Asset: asset.Futures, Pairs: e.pairs[asset.Futures], Interval: kline.FifteenMin}, {Channel: "single-channel", QualifiedChannel: "just one sub already processed"}, {Channel: "update-asset-pairs", QualifiedChannel: "spot-btcusdt-update-asset-pairs", Asset: asset.Spot, Pairs: currency.Pairs{btcusdtPair}}, - {Channel: "expand-pairs", QualifiedChannel: "spot-USDTBTC-expand-pairs@3", Asset: asset.Spot, Pairs: e.pairs[:1], Levels: 3}, - {Channel: "expand-pairs", QualifiedChannel: "spot-USDCETH-expand-pairs@3", Asset: asset.Spot, Pairs: e.pairs[1:2], Levels: 3}, + {Channel: "expand-pairs", QualifiedChannel: "spot-USDTBTC-expand-pairs@3", Asset: asset.Spot, Pairs: e.pairs[asset.Spot][1:2], Levels: 3}, + {Channel: "expand-pairs", QualifiedChannel: "spot-USDCETH-expand-pairs@3", Asset: asset.Spot, Pairs: e.pairs[asset.Spot][:1], Levels: 3}, } - for _, p := range e.pairs { - exp = append(exp, List{ - {Channel: "expand-pairs", QualifiedChannel: "spot-" + p.Swap().String() + "-expand-pairs@1", Asset: asset.Spot, Pairs: currency.Pairs{p}, Levels: 1}, - {Channel: "expand-pairs", QualifiedChannel: "future-" + p.Swap().String() + "-expand-pairs@1", Asset: asset.Futures, Pairs: currency.Pairs{p}, Levels: 1}, - {Channel: "expand-pairs", QualifiedChannel: "spot-" + p.Swap().String() + "-expand-pairs@2", Asset: asset.Spot, Pairs: currency.Pairs{p}, Levels: 2}, - }...) + for a, pairs := range e.pairs { + if a == asset.Index { // Not IsAssetWebsocketEnabled + continue + } + for _, p := range common.SortStrings(pairs) { + pStr := p.Swap().String() + if a == asset.Spot { + exp = append(exp, List{ + {Channel: "expand-pairs", QualifiedChannel: "spot-" + pStr + "-expand-pairs@1", Asset: a, Pairs: currency.Pairs{p}, Levels: 1}, + &Subscription{Channel: "expand-pairs", QualifiedChannel: "spot-" + pStr + "-expand-pairs@2", Asset: a, Pairs: currency.Pairs{p}, Levels: 2}, + }...) + } else { + exp = append(exp, + &Subscription{Channel: "expand-pairs", QualifiedChannel: "future-" + pStr + "-expand-pairs@1", Asset: a, Pairs: currency.Pairs{p}, Levels: 1}, + ) + } + } } - for _, b := range common.Batch(common.SortStrings(e.pairs), 3) { + for _, b := range common.Batch(common.SortStrings(e.pairs[asset.Spot]), 3) { exp = append(exp, &Subscription{Channel: "batching", QualifiedChannel: "spot-" + b.Join() + "-batching", Asset: asset.Spot, Pairs: b}) } @@ -73,9 +84,9 @@ func TestExpandTemplates(t *testing.T) { got, err = l.ExpandTemplates(e) require.NoError(t, err, "ExpandTemplates must not error") exp = List{ - {Channel: "expand-assets", QualifiedChannel: "spot-expand-assets@1h", Asset: asset.Spot, Pairs: e.pairs, Interval: kline.OneHour}, + {Channel: "expand-assets", QualifiedChannel: "spot-expand-assets@1h", Asset: asset.Spot, Pairs: e.pairs[asset.Spot], Interval: kline.OneHour}, } - for _, p := range e.pairs { + for _, p := range e.pairs[asset.Spot] { exp = append(exp, List{ {Channel: "expand-pairs", QualifiedChannel: "spot-" + p.Swap().String() + "-expand-pairs@4", Asset: asset.Spot, Pairs: currency.Pairs{p}, Levels: 4}, }...) diff --git a/exchanges/subscription/testdata/errors.tmpl b/exchanges/subscription/testdata/errors.tmpl index 3705d6c8215..ed4c792208a 100644 --- a/exchanges/subscription/testdata/errors.tmpl +++ b/exchanges/subscription/testdata/errors.tmpl @@ -10,7 +10,6 @@ {{/* Incorrect number of pair entries */}} {{- .PairSeparator -}} {{- .PairSeparator -}} - {{- .PairSeparator -}} {{- else if eq .S.Channel "error4" }} {{/* Too many BatchSize commands */}} {{- range $asset, $pairs := $.AssetPairs }} diff --git a/exchanges/subscription/testdata/subscriptions.tmpl b/exchanges/subscription/testdata/subscriptions.tmpl index 50a7345d5a4..80cb778b901 100644 --- a/exchanges/subscription/testdata/subscriptions.tmpl +++ b/exchanges/subscription/testdata/subscriptions.tmpl @@ -27,7 +27,7 @@ {{- range $asset, $pairs := $.AssetPairs }} {{- if eq $asset.String "spot" }} {{- range $batch := batch $pairs 3 -}} - {{ assetName $asset }}-{{ $batch.Join -}} -batching + {{ assetName $asset }}-{{ $batch -}} -batching {{- $.PairSeparator -}} {{- end -}} {{- $.BatchSize -}} 3 diff --git a/exchanges/trade/trade.go b/exchanges/trade/trade.go index e6427a50d97..3582e658492 100644 --- a/exchanges/trade/trade.go +++ b/exchanges/trade/trade.go @@ -29,8 +29,7 @@ func (p *Processor) setup(wg *sync.WaitGroup) { // Setup configures necessary fields to the `Trade` structure that govern trade data // processing. -func (t *Trade) Setup(exchangeName string, tradeFeedEnabled bool, c chan interface{}) { - t.exchangeName = exchangeName +func (t *Trade) Setup(tradeFeedEnabled bool, c chan interface{}) { t.dataHandler = c t.tradeFeedEnabled = tradeFeedEnabled } @@ -48,7 +47,7 @@ func (t *Trade) Update(save bool, data ...Data) error { } if save { - if err := AddTradesToBuffer(t.exchangeName, data...); err != nil { + if err := AddTradesToBuffer(data...); err != nil { return err } } @@ -57,7 +56,7 @@ func (t *Trade) Update(save bool, data ...Data) error { } // AddTradesToBuffer will push trade data onto the buffer -func AddTradesToBuffer(exchangeName string, data ...Data) error { +func AddTradesToBuffer(data ...Data) error { cfg := database.DB.GetConfig() if database.DB == nil || cfg == nil || !cfg.Enabled { return nil @@ -79,7 +78,7 @@ func AddTradesToBuffer(exchangeName string, data ...Data) error { data[i].CurrencyPair.IsEmpty() || data[i].Exchange == "" || data[i].Timestamp.IsZero() { - errs = common.AppendError(errs, fmt.Errorf("%v received invalid trade data: %+v", exchangeName, data[i])) + errs = common.AppendError(errs, fmt.Errorf("%v received invalid trade data: %+v", data[i].Exchange, data[i])) continue } @@ -99,7 +98,7 @@ func AddTradesToBuffer(exchangeName string, data ...Data) error { } uu, err := uuid.NewV4() if err != nil { - errs = common.AppendError(errs, fmt.Errorf("%s uuid failed to generate for trade: %+v", exchangeName, data[i])) + errs = common.AppendError(errs, fmt.Errorf("%s uuid failed to generate for trade: %+v", data[i].Exchange, data[i])) } data[i].ID = uu validDatas = append(validDatas, data[i]) diff --git a/exchanges/trade/trade_test.go b/exchanges/trade/trade_test.go index 9944f632647..ef5ced2c057 100644 --- a/exchanges/trade/trade_test.go +++ b/exchanges/trade/trade_test.go @@ -38,7 +38,7 @@ func TestAddTradesToBuffer(t *testing.T) { t.Error(err) } cp, _ := currency.NewPairFromString("BTC-USD") - err = AddTradesToBuffer("test!", []Data{ + err = AddTradesToBuffer([]Data{ { Timestamp: time.Now(), Exchange: "test!", @@ -56,7 +56,7 @@ func TestAddTradesToBuffer(t *testing.T) { t.Error("expected the processor to have started") } - err = AddTradesToBuffer("test!", []Data{ + err = AddTradesToBuffer([]Data{ { Timestamp: time.Now(), Exchange: "test!", @@ -74,7 +74,7 @@ func TestAddTradesToBuffer(t *testing.T) { processor.buffer = nil processor.mutex.Unlock() - err = AddTradesToBuffer("test!", []Data{ + err = AddTradesToBuffer([]Data{ { Timestamp: time.Now(), Exchange: "test!", diff --git a/exchanges/trade/trade_types.go b/exchanges/trade/trade_types.go index 0a7ec8a0b98..c80db297fd7 100644 --- a/exchanges/trade/trade_types.go +++ b/exchanges/trade/trade_types.go @@ -27,7 +27,6 @@ var ( // Trade used to hold data and methods related to trade dissemination and // storage type Trade struct { - exchangeName string dataHandler chan interface{} tradeFeedEnabled bool } diff --git a/gctrpc/rpc.pb.go b/gctrpc/rpc.pb.go index d634a42d9fc..83926e29153 100644 --- a/gctrpc/rpc.pb.go +++ b/gctrpc/rpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 +// protoc-gen-go v1.36.1 // protoc (unknown) // source: rpc.proto @@ -23,18 +23,16 @@ const ( ) type GetInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetInfoRequest) Reset() { *x = GetInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInfoRequest) String() string { @@ -45,7 +43,7 @@ func (*GetInfoRequest) ProtoMessage() {} func (x *GetInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61,26 +59,23 @@ func (*GetInfoRequest) Descriptor() ([]byte, []int) { } type GetInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Uptime string `protobuf:"bytes,1,opt,name=uptime,proto3" json:"uptime,omitempty"` AvailableExchanges int64 `protobuf:"varint,2,opt,name=available_exchanges,json=availableExchanges,proto3" json:"available_exchanges,omitempty"` EnabledExchanges int64 `protobuf:"varint,3,opt,name=enabled_exchanges,json=enabledExchanges,proto3" json:"enabled_exchanges,omitempty"` DefaultForexProvider string `protobuf:"bytes,4,opt,name=default_forex_provider,json=defaultForexProvider,proto3" json:"default_forex_provider,omitempty"` DefaultFiatCurrency string `protobuf:"bytes,5,opt,name=default_fiat_currency,json=defaultFiatCurrency,proto3" json:"default_fiat_currency,omitempty"` - SubsystemStatus map[string]bool `protobuf:"bytes,6,rep,name=subsystem_status,json=subsystemStatus,proto3" json:"subsystem_status,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - RpcEndpoints map[string]*RPCEndpoint `protobuf:"bytes,7,rep,name=rpc_endpoints,json=rpcEndpoints,proto3" json:"rpc_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + SubsystemStatus map[string]bool `protobuf:"bytes,6,rep,name=subsystem_status,json=subsystemStatus,proto3" json:"subsystem_status,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + RpcEndpoints map[string]*RPCEndpoint `protobuf:"bytes,7,rep,name=rpc_endpoints,json=rpcEndpoints,proto3" json:"rpc_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetInfoResponse) Reset() { *x = GetInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInfoResponse) String() string { @@ -91,7 +86,7 @@ func (*GetInfoResponse) ProtoMessage() {} func (x *GetInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,18 +151,16 @@ func (x *GetInfoResponse) GetRpcEndpoints() map[string]*RPCEndpoint { } type GetCommunicationRelayersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetCommunicationRelayersRequest) Reset() { *x = GetCommunicationRelayersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCommunicationRelayersRequest) String() string { @@ -178,7 +171,7 @@ func (*GetCommunicationRelayersRequest) ProtoMessage() {} func (x *GetCommunicationRelayersRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,21 +187,18 @@ func (*GetCommunicationRelayersRequest) Descriptor() ([]byte, []int) { } type CommunicationRelayer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + Connected bool `protobuf:"varint,2,opt,name=connected,proto3" json:"connected,omitempty"` unknownFields protoimpl.UnknownFields - - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - Connected bool `protobuf:"varint,2,opt,name=connected,proto3" json:"connected,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CommunicationRelayer) Reset() { *x = CommunicationRelayer{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommunicationRelayer) String() string { @@ -219,7 +209,7 @@ func (*CommunicationRelayer) ProtoMessage() {} func (x *CommunicationRelayer) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,20 +239,17 @@ func (x *CommunicationRelayer) GetConnected() bool { } type GetCommunicationRelayersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CommunicationRelayers map[string]*CommunicationRelayer `protobuf:"bytes,1,rep,name=communication_relayers,json=communicationRelayers,proto3" json:"communication_relayers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + state protoimpl.MessageState `protogen:"open.v1"` + CommunicationRelayers map[string]*CommunicationRelayer `protobuf:"bytes,1,rep,name=communication_relayers,json=communicationRelayers,proto3" json:"communication_relayers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetCommunicationRelayersResponse) Reset() { *x = GetCommunicationRelayersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCommunicationRelayersResponse) String() string { @@ -273,7 +260,7 @@ func (*GetCommunicationRelayersResponse) ProtoMessage() {} func (x *GetCommunicationRelayersResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,20 +283,17 @@ func (x *GetCommunicationRelayersResponse) GetCommunicationRelayers() map[string } type GenericSubsystemRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Subsystem string `protobuf:"bytes,1,opt,name=subsystem,proto3" json:"subsystem,omitempty"` unknownFields protoimpl.UnknownFields - - Subsystem string `protobuf:"bytes,1,opt,name=subsystem,proto3" json:"subsystem,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GenericSubsystemRequest) Reset() { *x = GenericSubsystemRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenericSubsystemRequest) String() string { @@ -320,7 +304,7 @@ func (*GenericSubsystemRequest) ProtoMessage() {} func (x *GenericSubsystemRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -343,18 +327,16 @@ func (x *GenericSubsystemRequest) GetSubsystem() string { } type GetSubsystemsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetSubsystemsRequest) Reset() { *x = GetSubsystemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSubsystemsRequest) String() string { @@ -365,7 +347,7 @@ func (*GetSubsystemsRequest) ProtoMessage() {} func (x *GetSubsystemsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,20 +363,17 @@ func (*GetSubsystemsRequest) Descriptor() ([]byte, []int) { } type GetSusbsytemsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubsystemsStatus map[string]bool `protobuf:"bytes,1,rep,name=subsystems_status,json=subsystemsStatus,proto3" json:"subsystems_status,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + state protoimpl.MessageState `protogen:"open.v1"` + SubsystemsStatus map[string]bool `protobuf:"bytes,1,rep,name=subsystems_status,json=subsystemsStatus,proto3" json:"subsystems_status,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetSusbsytemsResponse) Reset() { *x = GetSusbsytemsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSusbsytemsResponse) String() string { @@ -405,7 +384,7 @@ func (*GetSusbsytemsResponse) ProtoMessage() {} func (x *GetSusbsytemsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,18 +407,16 @@ func (x *GetSusbsytemsResponse) GetSubsystemsStatus() map[string]bool { } type GetRPCEndpointsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetRPCEndpointsRequest) Reset() { *x = GetRPCEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRPCEndpointsRequest) String() string { @@ -450,7 +427,7 @@ func (*GetRPCEndpointsRequest) ProtoMessage() {} func (x *GetRPCEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,21 +443,18 @@ func (*GetRPCEndpointsRequest) Descriptor() ([]byte, []int) { } type RPCEndpoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Started bool `protobuf:"varint,1,opt,name=started,proto3" json:"started,omitempty"` + ListenAddress string `protobuf:"bytes,2,opt,name=listen_address,json=listenAddress,proto3" json:"listen_address,omitempty"` unknownFields protoimpl.UnknownFields - - Started bool `protobuf:"varint,1,opt,name=started,proto3" json:"started,omitempty"` - ListenAddress string `protobuf:"bytes,2,opt,name=listen_address,json=listenAddress,proto3" json:"listen_address,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RPCEndpoint) Reset() { *x = RPCEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RPCEndpoint) String() string { @@ -491,7 +465,7 @@ func (*RPCEndpoint) ProtoMessage() {} func (x *RPCEndpoint) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,20 +495,17 @@ func (x *RPCEndpoint) GetListenAddress() string { } type GetRPCEndpointsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Endpoints map[string]*RPCEndpoint `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Endpoints map[string]*RPCEndpoint `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *GetRPCEndpointsResponse) Reset() { *x = GetRPCEndpointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRPCEndpointsResponse) String() string { @@ -545,7 +516,7 @@ func (*GetRPCEndpointsResponse) ProtoMessage() {} func (x *GetRPCEndpointsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,20 +539,17 @@ func (x *GetRPCEndpointsResponse) GetEndpoints() map[string]*RPCEndpoint { } type GenericExchangeNameRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GenericExchangeNameRequest) Reset() { *x = GenericExchangeNameRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenericExchangeNameRequest) String() string { @@ -592,7 +560,7 @@ func (*GenericExchangeNameRequest) ProtoMessage() {} func (x *GenericExchangeNameRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,20 +583,17 @@ func (x *GenericExchangeNameRequest) GetExchange() string { } type GetExchangesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` unknownFields protoimpl.UnknownFields - - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetExchangesRequest) Reset() { *x = GetExchangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangesRequest) String() string { @@ -639,7 +604,7 @@ func (*GetExchangesRequest) ProtoMessage() {} func (x *GetExchangesRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -662,20 +627,17 @@ func (x *GetExchangesRequest) GetEnabled() bool { } type GetExchangesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchanges string `protobuf:"bytes,1,opt,name=exchanges,proto3" json:"exchanges,omitempty"` unknownFields protoimpl.UnknownFields - - Exchanges string `protobuf:"bytes,1,opt,name=exchanges,proto3" json:"exchanges,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetExchangesResponse) Reset() { *x = GetExchangesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangesResponse) String() string { @@ -686,7 +648,7 @@ func (*GetExchangesResponse) ProtoMessage() {} func (x *GetExchangesResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,20 +671,17 @@ func (x *GetExchangesResponse) GetExchanges() string { } type GetExchangeOTPResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + OtpCode string `protobuf:"bytes,1,opt,name=otp_code,json=otpCode,proto3" json:"otp_code,omitempty"` unknownFields protoimpl.UnknownFields - - OtpCode string `protobuf:"bytes,1,opt,name=otp_code,json=otpCode,proto3" json:"otp_code,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetExchangeOTPResponse) Reset() { *x = GetExchangeOTPResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangeOTPResponse) String() string { @@ -733,7 +692,7 @@ func (*GetExchangeOTPResponse) ProtoMessage() {} func (x *GetExchangeOTPResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,18 +715,16 @@ func (x *GetExchangeOTPResponse) GetOtpCode() string { } type GetExchangeOTPsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetExchangeOTPsRequest) Reset() { *x = GetExchangeOTPsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangeOTPsRequest) String() string { @@ -778,7 +735,7 @@ func (*GetExchangeOTPsRequest) ProtoMessage() {} func (x *GetExchangeOTPsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -794,20 +751,17 @@ func (*GetExchangeOTPsRequest) Descriptor() ([]byte, []int) { } type GetExchangeOTPsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + OtpCodes map[string]string `protobuf:"bytes,1,rep,name=otp_codes,json=otpCodes,proto3" json:"otp_codes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - OtpCodes map[string]string `protobuf:"bytes,1,rep,name=otp_codes,json=otpCodes,proto3" json:"otp_codes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *GetExchangeOTPsResponse) Reset() { *x = GetExchangeOTPsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangeOTPsResponse) String() string { @@ -818,7 +772,7 @@ func (*GetExchangeOTPsResponse) ProtoMessage() {} func (x *GetExchangeOTPsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,20 +795,17 @@ func (x *GetExchangeOTPsResponse) GetOtpCodes() map[string]string { } type DisableExchangeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DisableExchangeRequest) Reset() { *x = DisableExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableExchangeRequest) String() string { @@ -865,7 +816,7 @@ func (*DisableExchangeRequest) ProtoMessage() {} func (x *DisableExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -888,21 +839,18 @@ func (x *DisableExchangeRequest) GetExchange() string { } type PairsSupported struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AvailablePairs string `protobuf:"bytes,1,opt,name=available_pairs,json=availablePairs,proto3" json:"available_pairs,omitempty"` - EnabledPairs string `protobuf:"bytes,2,opt,name=enabled_pairs,json=enabledPairs,proto3" json:"enabled_pairs,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + AvailablePairs string `protobuf:"bytes,1,opt,name=available_pairs,json=availablePairs,proto3" json:"available_pairs,omitempty"` + EnabledPairs string `protobuf:"bytes,2,opt,name=enabled_pairs,json=enabledPairs,proto3" json:"enabled_pairs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PairsSupported) Reset() { *x = PairsSupported{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairsSupported) String() string { @@ -913,7 +861,7 @@ func (*PairsSupported) ProtoMessage() {} func (x *PairsSupported) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,10 +891,7 @@ func (x *PairsSupported) GetEnabledPairs() string { } type GetExchangeInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` Verbose bool `protobuf:"varint,3,opt,name=verbose,proto3" json:"verbose,omitempty"` @@ -955,17 +900,17 @@ type GetExchangeInfoResponse struct { HttpUseragent string `protobuf:"bytes,6,opt,name=http_useragent,json=httpUseragent,proto3" json:"http_useragent,omitempty"` HttpProxy string `protobuf:"bytes,7,opt,name=http_proxy,json=httpProxy,proto3" json:"http_proxy,omitempty"` BaseCurrencies string `protobuf:"bytes,8,opt,name=base_currencies,json=baseCurrencies,proto3" json:"base_currencies,omitempty"` - SupportedAssets map[string]*PairsSupported `protobuf:"bytes,9,rep,name=supported_assets,json=supportedAssets,proto3" json:"supported_assets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + SupportedAssets map[string]*PairsSupported `protobuf:"bytes,9,rep,name=supported_assets,json=supportedAssets,proto3" json:"supported_assets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` AuthenticatedApi bool `protobuf:"varint,10,opt,name=authenticated_api,json=authenticatedApi,proto3" json:"authenticated_api,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetExchangeInfoResponse) Reset() { *x = GetExchangeInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangeInfoResponse) String() string { @@ -976,7 +921,7 @@ func (*GetExchangeInfoResponse) ProtoMessage() {} func (x *GetExchangeInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1062,22 +1007,19 @@ func (x *GetExchangeInfoResponse) GetAuthenticatedApi() bool { } type GetTickerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetTickerRequest) Reset() { *x = GetTickerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTickerRequest) String() string { @@ -1088,7 +1030,7 @@ func (*GetTickerRequest) ProtoMessage() {} func (x *GetTickerRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1125,22 +1067,19 @@ func (x *GetTickerRequest) GetAssetType() string { } type CurrencyPair struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Delimiter string `protobuf:"bytes,1,opt,name=delimiter,proto3" json:"delimiter,omitempty"` + Base string `protobuf:"bytes,2,opt,name=base,proto3" json:"base,omitempty"` + Quote string `protobuf:"bytes,3,opt,name=quote,proto3" json:"quote,omitempty"` unknownFields protoimpl.UnknownFields - - Delimiter string `protobuf:"bytes,1,opt,name=delimiter,proto3" json:"delimiter,omitempty"` - Base string `protobuf:"bytes,2,opt,name=base,proto3" json:"base,omitempty"` - Quote string `protobuf:"bytes,3,opt,name=quote,proto3" json:"quote,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CurrencyPair) Reset() { *x = CurrencyPair{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CurrencyPair) String() string { @@ -1151,7 +1090,7 @@ func (*CurrencyPair) ProtoMessage() {} func (x *CurrencyPair) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,29 +1127,26 @@ func (x *CurrencyPair) GetQuote() string { } type TickerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Pair *CurrencyPair `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` + LastUpdated int64 `protobuf:"varint,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + CurrencyPair string `protobuf:"bytes,3,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair,omitempty"` + Last float64 `protobuf:"fixed64,4,opt,name=last,proto3" json:"last,omitempty"` + High float64 `protobuf:"fixed64,5,opt,name=high,proto3" json:"high,omitempty"` + Low float64 `protobuf:"fixed64,6,opt,name=low,proto3" json:"low,omitempty"` + Bid float64 `protobuf:"fixed64,7,opt,name=bid,proto3" json:"bid,omitempty"` + Ask float64 `protobuf:"fixed64,8,opt,name=ask,proto3" json:"ask,omitempty"` + Volume float64 `protobuf:"fixed64,9,opt,name=volume,proto3" json:"volume,omitempty"` + PriceAth float64 `protobuf:"fixed64,10,opt,name=price_ath,json=priceAth,proto3" json:"price_ath,omitempty"` unknownFields protoimpl.UnknownFields - - Pair *CurrencyPair `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` - LastUpdated int64 `protobuf:"varint,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` - CurrencyPair string `protobuf:"bytes,3,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair,omitempty"` - Last float64 `protobuf:"fixed64,4,opt,name=last,proto3" json:"last,omitempty"` - High float64 `protobuf:"fixed64,5,opt,name=high,proto3" json:"high,omitempty"` - Low float64 `protobuf:"fixed64,6,opt,name=low,proto3" json:"low,omitempty"` - Bid float64 `protobuf:"fixed64,7,opt,name=bid,proto3" json:"bid,omitempty"` - Ask float64 `protobuf:"fixed64,8,opt,name=ask,proto3" json:"ask,omitempty"` - Volume float64 `protobuf:"fixed64,9,opt,name=volume,proto3" json:"volume,omitempty"` - PriceAth float64 `protobuf:"fixed64,10,opt,name=price_ath,json=priceAth,proto3" json:"price_ath,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TickerResponse) Reset() { *x = TickerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TickerResponse) String() string { @@ -1221,7 +1157,7 @@ func (*TickerResponse) ProtoMessage() {} func (x *TickerResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,18 +1243,16 @@ func (x *TickerResponse) GetPriceAth() float64 { } type GetTickersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetTickersRequest) Reset() { *x = GetTickersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTickersRequest) String() string { @@ -1329,7 +1263,7 @@ func (*GetTickersRequest) ProtoMessage() {} func (x *GetTickersRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1345,21 +1279,18 @@ func (*GetTickersRequest) Descriptor() ([]byte, []int) { } type Tickers struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Tickers []*TickerResponse `protobuf:"bytes,2,rep,name=tickers,proto3" json:"tickers,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Tickers []*TickerResponse `protobuf:"bytes,2,rep,name=tickers,proto3" json:"tickers,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Tickers) Reset() { *x = Tickers{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tickers) String() string { @@ -1370,7 +1301,7 @@ func (*Tickers) ProtoMessage() {} func (x *Tickers) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1400,20 +1331,17 @@ func (x *Tickers) GetTickers() []*TickerResponse { } type GetTickersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Tickers []*Tickers `protobuf:"bytes,1,rep,name=tickers,proto3" json:"tickers,omitempty"` unknownFields protoimpl.UnknownFields - - Tickers []*Tickers `protobuf:"bytes,1,rep,name=tickers,proto3" json:"tickers,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetTickersResponse) Reset() { *x = GetTickersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTickersResponse) String() string { @@ -1424,7 +1352,7 @@ func (*GetTickersResponse) ProtoMessage() {} func (x *GetTickersResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1447,22 +1375,19 @@ func (x *GetTickersResponse) GetTickers() []*Tickers { } type GetOrderbookRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetOrderbookRequest) Reset() { *x = GetOrderbookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderbookRequest) String() string { @@ -1473,7 +1398,7 @@ func (*GetOrderbookRequest) ProtoMessage() {} func (x *GetOrderbookRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1510,22 +1435,19 @@ func (x *GetOrderbookRequest) GetAssetType() string { } type OrderbookItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"` + Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"` + Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"` - Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"` - Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OrderbookItem) Reset() { *x = OrderbookItem{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrderbookItem) String() string { @@ -1536,7 +1458,7 @@ func (*OrderbookItem) ProtoMessage() {} func (x *OrderbookItem) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1573,26 +1495,23 @@ func (x *OrderbookItem) GetId() int64 { } type OrderbookResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Pair *CurrencyPair `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` + CurrencyPair string `protobuf:"bytes,2,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair,omitempty"` + Bids []*OrderbookItem `protobuf:"bytes,3,rep,name=bids,proto3" json:"bids,omitempty"` + Asks []*OrderbookItem `protobuf:"bytes,4,rep,name=asks,proto3" json:"asks,omitempty"` + LastUpdated int64 `protobuf:"varint,5,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + AssetType string `protobuf:"bytes,6,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + Error string `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"` unknownFields protoimpl.UnknownFields - - Pair *CurrencyPair `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` - CurrencyPair string `protobuf:"bytes,2,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair,omitempty"` - Bids []*OrderbookItem `protobuf:"bytes,3,rep,name=bids,proto3" json:"bids,omitempty"` - Asks []*OrderbookItem `protobuf:"bytes,4,rep,name=asks,proto3" json:"asks,omitempty"` - LastUpdated int64 `protobuf:"varint,5,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` - AssetType string `protobuf:"bytes,6,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - Error string `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OrderbookResponse) Reset() { *x = OrderbookResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrderbookResponse) String() string { @@ -1603,7 +1522,7 @@ func (*OrderbookResponse) ProtoMessage() {} func (x *OrderbookResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1668,18 +1587,16 @@ func (x *OrderbookResponse) GetError() string { } type GetOrderbooksRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetOrderbooksRequest) Reset() { *x = GetOrderbooksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderbooksRequest) String() string { @@ -1690,7 +1607,7 @@ func (*GetOrderbooksRequest) ProtoMessage() {} func (x *GetOrderbooksRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1706,21 +1623,18 @@ func (*GetOrderbooksRequest) Descriptor() ([]byte, []int) { } type Orderbooks struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Orderbooks []*OrderbookResponse `protobuf:"bytes,2,rep,name=orderbooks,proto3" json:"orderbooks,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Orderbooks []*OrderbookResponse `protobuf:"bytes,2,rep,name=orderbooks,proto3" json:"orderbooks,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Orderbooks) Reset() { *x = Orderbooks{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Orderbooks) String() string { @@ -1731,7 +1645,7 @@ func (*Orderbooks) ProtoMessage() {} func (x *Orderbooks) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1761,20 +1675,17 @@ func (x *Orderbooks) GetOrderbooks() []*OrderbookResponse { } type GetOrderbooksResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Orderbooks []*Orderbooks `protobuf:"bytes,1,rep,name=orderbooks,proto3" json:"orderbooks,omitempty"` unknownFields protoimpl.UnknownFields - - Orderbooks []*Orderbooks `protobuf:"bytes,1,rep,name=orderbooks,proto3" json:"orderbooks,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetOrderbooksResponse) Reset() { *x = GetOrderbooksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderbooksResponse) String() string { @@ -1785,7 +1696,7 @@ func (*GetOrderbooksResponse) ProtoMessage() {} func (x *GetOrderbooksResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1808,21 +1719,18 @@ func (x *GetOrderbooksResponse) GetOrderbooks() []*Orderbooks { } type GetAccountInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAccountInfoRequest) Reset() { *x = GetAccountInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccountInfoRequest) String() string { @@ -1833,7 +1741,7 @@ func (*GetAccountInfoRequest) ProtoMessage() {} func (x *GetAccountInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1863,21 +1771,18 @@ func (x *GetAccountInfoRequest) GetAssetType() string { } type Account struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Currencies []*AccountCurrencyInfo `protobuf:"bytes,2,rep,name=currencies,proto3" json:"currencies,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Currencies []*AccountCurrencyInfo `protobuf:"bytes,2,rep,name=currencies,proto3" json:"currencies,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Account) Reset() { *x = Account{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Account) String() string { @@ -1888,7 +1793,7 @@ func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1918,25 +1823,22 @@ func (x *Account) GetCurrencies() []*AccountCurrencyInfo { } type AccountCurrencyInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` - TotalValue float64 `protobuf:"fixed64,2,opt,name=total_value,json=totalValue,proto3" json:"total_value,omitempty"` - Hold float64 `protobuf:"fixed64,3,opt,name=hold,proto3" json:"hold,omitempty"` - Free float64 `protobuf:"fixed64,4,opt,name=free,proto3" json:"free,omitempty"` - FreeWithoutBorrow float64 `protobuf:"fixed64,5,opt,name=free_without_borrow,json=freeWithoutBorrow,proto3" json:"free_without_borrow,omitempty"` - Borrowed float64 `protobuf:"fixed64,6,opt,name=borrowed,proto3" json:"borrowed,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` + TotalValue float64 `protobuf:"fixed64,2,opt,name=total_value,json=totalValue,proto3" json:"total_value,omitempty"` + Hold float64 `protobuf:"fixed64,3,opt,name=hold,proto3" json:"hold,omitempty"` + Free float64 `protobuf:"fixed64,4,opt,name=free,proto3" json:"free,omitempty"` + FreeWithoutBorrow float64 `protobuf:"fixed64,5,opt,name=free_without_borrow,json=freeWithoutBorrow,proto3" json:"free_without_borrow,omitempty"` + Borrowed float64 `protobuf:"fixed64,6,opt,name=borrowed,proto3" json:"borrowed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AccountCurrencyInfo) Reset() { *x = AccountCurrencyInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountCurrencyInfo) String() string { @@ -1947,7 +1849,7 @@ func (*AccountCurrencyInfo) ProtoMessage() {} func (x *AccountCurrencyInfo) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2005,21 +1907,18 @@ func (x *AccountCurrencyInfo) GetBorrowed() float64 { } type GetAccountInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Accounts []*Account `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Accounts []*Account `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAccountInfoResponse) Reset() { *x = GetAccountInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccountInfoResponse) String() string { @@ -2030,7 +1929,7 @@ func (*GetAccountInfoResponse) ProtoMessage() {} func (x *GetAccountInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2060,18 +1959,16 @@ func (x *GetAccountInfoResponse) GetAccounts() []*Account { } type GetConfigRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetConfigRequest) Reset() { *x = GetConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConfigRequest) String() string { @@ -2082,7 +1979,7 @@ func (*GetConfigRequest) ProtoMessage() {} func (x *GetConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2098,20 +1995,17 @@ func (*GetConfigRequest) Descriptor() ([]byte, []int) { } type GetConfigResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetConfigResponse) Reset() { *x = GetConfigResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConfigResponse) String() string { @@ -2122,7 +2016,7 @@ func (*GetConfigResponse) ProtoMessage() {} func (x *GetConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2145,23 +2039,20 @@ func (x *GetConfigResponse) GetData() []byte { } type PortfolioAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + CoinType string `protobuf:"bytes,2,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Balance float64 `protobuf:"fixed64,4,opt,name=balance,proto3" json:"balance,omitempty"` unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - CoinType string `protobuf:"bytes,2,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Balance float64 `protobuf:"fixed64,4,opt,name=balance,proto3" json:"balance,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PortfolioAddress) Reset() { *x = PortfolioAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PortfolioAddress) String() string { @@ -2172,7 +2063,7 @@ func (*PortfolioAddress) ProtoMessage() {} func (x *PortfolioAddress) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2216,18 +2107,16 @@ func (x *PortfolioAddress) GetBalance() float64 { } type GetPortfolioRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPortfolioRequest) Reset() { *x = GetPortfolioRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPortfolioRequest) String() string { @@ -2238,7 +2127,7 @@ func (*GetPortfolioRequest) ProtoMessage() {} func (x *GetPortfolioRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2254,20 +2143,17 @@ func (*GetPortfolioRequest) Descriptor() ([]byte, []int) { } type GetPortfolioResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Portfolio []*PortfolioAddress `protobuf:"bytes,1,rep,name=portfolio,proto3" json:"portfolio,omitempty"` unknownFields protoimpl.UnknownFields - - Portfolio []*PortfolioAddress `protobuf:"bytes,1,rep,name=portfolio,proto3" json:"portfolio,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetPortfolioResponse) Reset() { *x = GetPortfolioResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPortfolioResponse) String() string { @@ -2278,7 +2164,7 @@ func (*GetPortfolioResponse) ProtoMessage() {} func (x *GetPortfolioResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2301,18 +2187,16 @@ func (x *GetPortfolioResponse) GetPortfolio() []*PortfolioAddress { } type GetPortfolioSummaryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPortfolioSummaryRequest) Reset() { *x = GetPortfolioSummaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPortfolioSummaryRequest) String() string { @@ -2323,7 +2207,7 @@ func (*GetPortfolioSummaryRequest) ProtoMessage() {} func (x *GetPortfolioSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2339,23 +2223,20 @@ func (*GetPortfolioSummaryRequest) Descriptor() ([]byte, []int) { } type Coin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Coin string `protobuf:"bytes,1,opt,name=coin,proto3" json:"coin,omitempty"` + Balance float64 `protobuf:"fixed64,2,opt,name=balance,proto3" json:"balance,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + Percentage float64 `protobuf:"fixed64,4,opt,name=percentage,proto3" json:"percentage,omitempty"` unknownFields protoimpl.UnknownFields - - Coin string `protobuf:"bytes,1,opt,name=coin,proto3" json:"coin,omitempty"` - Balance float64 `protobuf:"fixed64,2,opt,name=balance,proto3" json:"balance,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - Percentage float64 `protobuf:"fixed64,4,opt,name=percentage,proto3" json:"percentage,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Coin) Reset() { *x = Coin{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Coin) String() string { @@ -2366,7 +2247,7 @@ func (*Coin) ProtoMessage() {} func (x *Coin) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2410,22 +2291,19 @@ func (x *Coin) GetPercentage() float64 { } type OfflineCoinSummary struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Balance float64 `protobuf:"fixed64,2,opt,name=balance,proto3" json:"balance,omitempty"` + Percentage float64 `protobuf:"fixed64,3,opt,name=percentage,proto3" json:"percentage,omitempty"` unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Balance float64 `protobuf:"fixed64,2,opt,name=balance,proto3" json:"balance,omitempty"` - Percentage float64 `protobuf:"fixed64,3,opt,name=percentage,proto3" json:"percentage,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OfflineCoinSummary) Reset() { *x = OfflineCoinSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OfflineCoinSummary) String() string { @@ -2436,7 +2314,7 @@ func (*OfflineCoinSummary) ProtoMessage() {} func (x *OfflineCoinSummary) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2473,21 +2351,18 @@ func (x *OfflineCoinSummary) GetPercentage() float64 { } type OnlineCoinSummary struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Balance float64 `protobuf:"fixed64,1,opt,name=balance,proto3" json:"balance,omitempty"` + Percentage float64 `protobuf:"fixed64,2,opt,name=percentage,proto3" json:"percentage,omitempty"` unknownFields protoimpl.UnknownFields - - Balance float64 `protobuf:"fixed64,1,opt,name=balance,proto3" json:"balance,omitempty"` - Percentage float64 `protobuf:"fixed64,2,opt,name=percentage,proto3" json:"percentage,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OnlineCoinSummary) Reset() { *x = OnlineCoinSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OnlineCoinSummary) String() string { @@ -2498,7 +2373,7 @@ func (*OnlineCoinSummary) ProtoMessage() {} func (x *OnlineCoinSummary) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2528,20 +2403,17 @@ func (x *OnlineCoinSummary) GetPercentage() float64 { } type OfflineCoins struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Addresses []*OfflineCoinSummary `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` unknownFields protoimpl.UnknownFields - - Addresses []*OfflineCoinSummary `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OfflineCoins) Reset() { *x = OfflineCoins{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OfflineCoins) String() string { @@ -2552,7 +2424,7 @@ func (*OfflineCoins) ProtoMessage() {} func (x *OfflineCoins) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2575,20 +2447,17 @@ func (x *OfflineCoins) GetAddresses() []*OfflineCoinSummary { } type OnlineCoins struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Coins map[string]*OnlineCoinSummary `protobuf:"bytes,1,rep,name=coins,proto3" json:"coins,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Coins map[string]*OnlineCoinSummary `protobuf:"bytes,1,rep,name=coins,proto3" json:"coins,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *OnlineCoins) Reset() { *x = OnlineCoins{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OnlineCoins) String() string { @@ -2599,7 +2468,7 @@ func (*OnlineCoins) ProtoMessage() {} func (x *OnlineCoins) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2622,24 +2491,21 @@ func (x *OnlineCoins) GetCoins() map[string]*OnlineCoinSummary { } type GetPortfolioSummaryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` CoinTotals []*Coin `protobuf:"bytes,1,rep,name=coin_totals,json=coinTotals,proto3" json:"coin_totals,omitempty"` CoinsOffline []*Coin `protobuf:"bytes,2,rep,name=coins_offline,json=coinsOffline,proto3" json:"coins_offline,omitempty"` - CoinsOfflineSummary map[string]*OfflineCoins `protobuf:"bytes,3,rep,name=coins_offline_summary,json=coinsOfflineSummary,proto3" json:"coins_offline_summary,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + CoinsOfflineSummary map[string]*OfflineCoins `protobuf:"bytes,3,rep,name=coins_offline_summary,json=coinsOfflineSummary,proto3" json:"coins_offline_summary,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` CoinsOnline []*Coin `protobuf:"bytes,4,rep,name=coins_online,json=coinsOnline,proto3" json:"coins_online,omitempty"` - CoinsOnlineSummary map[string]*OnlineCoins `protobuf:"bytes,5,rep,name=coins_online_summary,json=coinsOnlineSummary,proto3" json:"coins_online_summary,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + CoinsOnlineSummary map[string]*OnlineCoins `protobuf:"bytes,5,rep,name=coins_online_summary,json=coinsOnlineSummary,proto3" json:"coins_online_summary,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPortfolioSummaryResponse) Reset() { *x = GetPortfolioSummaryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPortfolioSummaryResponse) String() string { @@ -2650,7 +2516,7 @@ func (*GetPortfolioSummaryResponse) ProtoMessage() {} func (x *GetPortfolioSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2701,25 +2567,22 @@ func (x *GetPortfolioSummaryResponse) GetCoinsOnlineSummary() map[string]*Online } type AddPortfolioAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - CoinType string `protobuf:"bytes,2,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Balance float64 `protobuf:"fixed64,4,opt,name=balance,proto3" json:"balance,omitempty"` - SupportedExchanges string `protobuf:"bytes,5,opt,name=supported_exchanges,json=supportedExchanges,proto3" json:"supported_exchanges,omitempty"` - ColdStorage bool `protobuf:"varint,6,opt,name=cold_storage,json=coldStorage,proto3" json:"cold_storage,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + CoinType string `protobuf:"bytes,2,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Balance float64 `protobuf:"fixed64,4,opt,name=balance,proto3" json:"balance,omitempty"` + SupportedExchanges string `protobuf:"bytes,5,opt,name=supported_exchanges,json=supportedExchanges,proto3" json:"supported_exchanges,omitempty"` + ColdStorage bool `protobuf:"varint,6,opt,name=cold_storage,json=coldStorage,proto3" json:"cold_storage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AddPortfolioAddressRequest) Reset() { *x = AddPortfolioAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddPortfolioAddressRequest) String() string { @@ -2730,7 +2593,7 @@ func (*AddPortfolioAddressRequest) ProtoMessage() {} func (x *AddPortfolioAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2788,22 +2651,19 @@ func (x *AddPortfolioAddressRequest) GetColdStorage() bool { } type RemovePortfolioAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + CoinType string `protobuf:"bytes,2,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - CoinType string `protobuf:"bytes,2,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RemovePortfolioAddressRequest) Reset() { *x = RemovePortfolioAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemovePortfolioAddressRequest) String() string { @@ -2814,7 +2674,7 @@ func (*RemovePortfolioAddressRequest) ProtoMessage() {} func (x *RemovePortfolioAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2851,18 +2711,16 @@ func (x *RemovePortfolioAddressRequest) GetDescription() string { } type GetForexProvidersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetForexProvidersRequest) Reset() { *x = GetForexProvidersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetForexProvidersRequest) String() string { @@ -2873,7 +2731,7 @@ func (*GetForexProvidersRequest) ProtoMessage() {} func (x *GetForexProvidersRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2889,26 +2747,23 @@ func (*GetForexProvidersRequest) Descriptor() ([]byte, []int) { } type ForexProvider struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` - Verbose bool `protobuf:"varint,3,opt,name=verbose,proto3" json:"verbose,omitempty"` - RestPollingDelay string `protobuf:"bytes,4,opt,name=rest_polling_delay,json=restPollingDelay,proto3" json:"rest_polling_delay,omitempty"` - ApiKey string `protobuf:"bytes,5,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` - ApiKeyLevel int64 `protobuf:"varint,6,opt,name=api_key_level,json=apiKeyLevel,proto3" json:"api_key_level,omitempty"` - PrimaryProvider bool `protobuf:"varint,7,opt,name=primary_provider,json=primaryProvider,proto3" json:"primary_provider,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` + Verbose bool `protobuf:"varint,3,opt,name=verbose,proto3" json:"verbose,omitempty"` + RestPollingDelay string `protobuf:"bytes,4,opt,name=rest_polling_delay,json=restPollingDelay,proto3" json:"rest_polling_delay,omitempty"` + ApiKey string `protobuf:"bytes,5,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` + ApiKeyLevel int64 `protobuf:"varint,6,opt,name=api_key_level,json=apiKeyLevel,proto3" json:"api_key_level,omitempty"` + PrimaryProvider bool `protobuf:"varint,7,opt,name=primary_provider,json=primaryProvider,proto3" json:"primary_provider,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ForexProvider) Reset() { *x = ForexProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForexProvider) String() string { @@ -2919,7 +2774,7 @@ func (*ForexProvider) ProtoMessage() {} func (x *ForexProvider) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2984,20 +2839,17 @@ func (x *ForexProvider) GetPrimaryProvider() bool { } type GetForexProvidersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ForexProviders []*ForexProvider `protobuf:"bytes,1,rep,name=forex_providers,json=forexProviders,proto3" json:"forex_providers,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ForexProviders []*ForexProvider `protobuf:"bytes,1,rep,name=forex_providers,json=forexProviders,proto3" json:"forex_providers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetForexProvidersResponse) Reset() { *x = GetForexProvidersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetForexProvidersResponse) String() string { @@ -3008,7 +2860,7 @@ func (*GetForexProvidersResponse) ProtoMessage() {} func (x *GetForexProvidersResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3031,18 +2883,16 @@ func (x *GetForexProvidersResponse) GetForexProviders() []*ForexProvider { } type GetForexRatesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetForexRatesRequest) Reset() { *x = GetForexRatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetForexRatesRequest) String() string { @@ -3053,7 +2903,7 @@ func (*GetForexRatesRequest) ProtoMessage() {} func (x *GetForexRatesRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3069,23 +2919,20 @@ func (*GetForexRatesRequest) Descriptor() ([]byte, []int) { } type ForexRatesConversion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + Rate float64 `protobuf:"fixed64,3,opt,name=rate,proto3" json:"rate,omitempty"` + InverseRate float64 `protobuf:"fixed64,4,opt,name=inverse_rate,json=inverseRate,proto3" json:"inverse_rate,omitempty"` unknownFields protoimpl.UnknownFields - - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` - Rate float64 `protobuf:"fixed64,3,opt,name=rate,proto3" json:"rate,omitempty"` - InverseRate float64 `protobuf:"fixed64,4,opt,name=inverse_rate,json=inverseRate,proto3" json:"inverse_rate,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ForexRatesConversion) Reset() { *x = ForexRatesConversion{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForexRatesConversion) String() string { @@ -3096,7 +2943,7 @@ func (*ForexRatesConversion) ProtoMessage() {} func (x *ForexRatesConversion) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3140,20 +2987,17 @@ func (x *ForexRatesConversion) GetInverseRate() float64 { } type GetForexRatesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ForexRates []*ForexRatesConversion `protobuf:"bytes,1,rep,name=forex_rates,json=forexRates,proto3" json:"forex_rates,omitempty"` unknownFields protoimpl.UnknownFields - - ForexRates []*ForexRatesConversion `protobuf:"bytes,1,rep,name=forex_rates,json=forexRates,proto3" json:"forex_rates,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetForexRatesResponse) Reset() { *x = GetForexRatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetForexRatesResponse) String() string { @@ -3164,7 +3008,7 @@ func (*GetForexRatesResponse) ProtoMessage() {} func (x *GetForexRatesResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3187,37 +3031,34 @@ func (x *GetForexRatesResponse) GetForexRates() []*ForexRatesConversion { } type OrderDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - ClientOrderId string `protobuf:"bytes,3,opt,name=client_order_id,json=clientOrderId,proto3" json:"client_order_id,omitempty"` - BaseCurrency string `protobuf:"bytes,4,opt,name=base_currency,json=baseCurrency,proto3" json:"base_currency,omitempty"` - QuoteCurrency string `protobuf:"bytes,5,opt,name=quote_currency,json=quoteCurrency,proto3" json:"quote_currency,omitempty"` - AssetType string `protobuf:"bytes,6,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OrderSide string `protobuf:"bytes,7,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` - OrderType string `protobuf:"bytes,8,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"` - CreationTime string `protobuf:"bytes,9,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` - UpdateTime string `protobuf:"bytes,10,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - Status string `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` - Price float64 `protobuf:"fixed64,12,opt,name=price,proto3" json:"price,omitempty"` - Amount float64 `protobuf:"fixed64,13,opt,name=amount,proto3" json:"amount,omitempty"` - OpenVolume float64 `protobuf:"fixed64,14,opt,name=open_volume,json=openVolume,proto3" json:"open_volume,omitempty"` - Fee float64 `protobuf:"fixed64,15,opt,name=fee,proto3" json:"fee,omitempty"` - Cost float64 `protobuf:"fixed64,16,opt,name=cost,proto3" json:"cost,omitempty"` - Trades []*TradeHistory `protobuf:"bytes,17,rep,name=trades,proto3" json:"trades,omitempty"` - ContractAmount float64 `protobuf:"fixed64,18,opt,name=contract_amount,json=contractAmount,proto3" json:"contract_amount,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + ClientOrderId string `protobuf:"bytes,3,opt,name=client_order_id,json=clientOrderId,proto3" json:"client_order_id,omitempty"` + BaseCurrency string `protobuf:"bytes,4,opt,name=base_currency,json=baseCurrency,proto3" json:"base_currency,omitempty"` + QuoteCurrency string `protobuf:"bytes,5,opt,name=quote_currency,json=quoteCurrency,proto3" json:"quote_currency,omitempty"` + AssetType string `protobuf:"bytes,6,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + OrderSide string `protobuf:"bytes,7,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` + OrderType string `protobuf:"bytes,8,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"` + CreationTime string `protobuf:"bytes,9,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` + UpdateTime string `protobuf:"bytes,10,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + Status string `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` + Price float64 `protobuf:"fixed64,12,opt,name=price,proto3" json:"price,omitempty"` + Amount float64 `protobuf:"fixed64,13,opt,name=amount,proto3" json:"amount,omitempty"` + OpenVolume float64 `protobuf:"fixed64,14,opt,name=open_volume,json=openVolume,proto3" json:"open_volume,omitempty"` + Fee float64 `protobuf:"fixed64,15,opt,name=fee,proto3" json:"fee,omitempty"` + Cost float64 `protobuf:"fixed64,16,opt,name=cost,proto3" json:"cost,omitempty"` + Trades []*TradeHistory `protobuf:"bytes,17,rep,name=trades,proto3" json:"trades,omitempty"` + ContractAmount float64 `protobuf:"fixed64,18,opt,name=contract_amount,json=contractAmount,proto3" json:"contract_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *OrderDetails) Reset() { *x = OrderDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrderDetails) String() string { @@ -3228,7 +3069,7 @@ func (*OrderDetails) ProtoMessage() {} func (x *OrderDetails) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3370,28 +3211,25 @@ func (x *OrderDetails) GetContractAmount() float64 { } type TradeHistory struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + CreationTime int64 `protobuf:"varint,1,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"` + Amount float64 `protobuf:"fixed64,4,opt,name=amount,proto3" json:"amount,omitempty"` + Exchange string `protobuf:"bytes,5,opt,name=exchange,proto3" json:"exchange,omitempty"` + AssetType string `protobuf:"bytes,6,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + OrderSide string `protobuf:"bytes,7,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` + Fee float64 `protobuf:"fixed64,8,opt,name=fee,proto3" json:"fee,omitempty"` + Total float64 `protobuf:"fixed64,9,opt,name=total,proto3" json:"total,omitempty"` unknownFields protoimpl.UnknownFields - - CreationTime int64 `protobuf:"varint,1,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"` - Amount float64 `protobuf:"fixed64,4,opt,name=amount,proto3" json:"amount,omitempty"` - Exchange string `protobuf:"bytes,5,opt,name=exchange,proto3" json:"exchange,omitempty"` - AssetType string `protobuf:"bytes,6,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OrderSide string `protobuf:"bytes,7,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` - Fee float64 `protobuf:"fixed64,8,opt,name=fee,proto3" json:"fee,omitempty"` - Total float64 `protobuf:"fixed64,9,opt,name=total,proto3" json:"total,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TradeHistory) Reset() { *x = TradeHistory{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TradeHistory) String() string { @@ -3402,7 +3240,7 @@ func (*TradeHistory) ProtoMessage() {} func (x *TradeHistory) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3481,24 +3319,21 @@ func (x *TradeHistory) GetTotal() float64 { } type GetOrdersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + StartDate string `protobuf:"bytes,4,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + EndDate string `protobuf:"bytes,5,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - StartDate string `protobuf:"bytes,4,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` - EndDate string `protobuf:"bytes,5,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetOrdersRequest) Reset() { *x = GetOrdersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrdersRequest) String() string { @@ -3509,7 +3344,7 @@ func (*GetOrdersRequest) ProtoMessage() {} func (x *GetOrdersRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3560,20 +3395,17 @@ func (x *GetOrdersRequest) GetEndDate() string { } type GetOrdersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Orders []*OrderDetails `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` unknownFields protoimpl.UnknownFields - - Orders []*OrderDetails `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetOrdersResponse) Reset() { *x = GetOrdersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrdersResponse) String() string { @@ -3584,7 +3416,7 @@ func (*GetOrdersResponse) ProtoMessage() {} func (x *GetOrdersResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3607,23 +3439,20 @@ func (x *GetOrdersResponse) GetOrders() []*OrderDetails { } type GetOrderRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Asset string `protobuf:"bytes,4,opt,name=asset,proto3" json:"asset,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Asset string `protobuf:"bytes,4,opt,name=asset,proto3" json:"asset,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetOrderRequest) Reset() { *x = GetOrderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderRequest) String() string { @@ -3634,7 +3463,7 @@ func (*GetOrderRequest) ProtoMessage() {} func (x *GetOrderRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3678,28 +3507,25 @@ func (x *GetOrderRequest) GetAsset() string { } type SubmitOrderRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + Side string `protobuf:"bytes,3,opt,name=side,proto3" json:"side,omitempty"` + OrderType string `protobuf:"bytes,4,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"` + Amount float64 `protobuf:"fixed64,5,opt,name=amount,proto3" json:"amount,omitempty"` + Price float64 `protobuf:"fixed64,6,opt,name=price,proto3" json:"price,omitempty"` + ClientId string `protobuf:"bytes,7,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + AssetType string `protobuf:"bytes,8,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + MarginType string `protobuf:"bytes,9,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - Side string `protobuf:"bytes,3,opt,name=side,proto3" json:"side,omitempty"` - OrderType string `protobuf:"bytes,4,opt,name=order_type,json=orderType,proto3" json:"order_type,omitempty"` - Amount float64 `protobuf:"fixed64,5,opt,name=amount,proto3" json:"amount,omitempty"` - Price float64 `protobuf:"fixed64,6,opt,name=price,proto3" json:"price,omitempty"` - ClientId string `protobuf:"bytes,7,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - AssetType string `protobuf:"bytes,8,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - MarginType string `protobuf:"bytes,9,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SubmitOrderRequest) Reset() { *x = SubmitOrderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitOrderRequest) String() string { @@ -3710,7 +3536,7 @@ func (*SubmitOrderRequest) ProtoMessage() {} func (x *SubmitOrderRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3789,23 +3615,20 @@ func (x *SubmitOrderRequest) GetMarginType() string { } type Trades struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"` + Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"` + Fee float64 `protobuf:"fixed64,3,opt,name=fee,proto3" json:"fee,omitempty"` + FeeAsset string `protobuf:"bytes,4,opt,name=fee_asset,json=feeAsset,proto3" json:"fee_asset,omitempty"` unknownFields protoimpl.UnknownFields - - Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"` - Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"` - Fee float64 `protobuf:"fixed64,3,opt,name=fee,proto3" json:"fee,omitempty"` - FeeAsset string `protobuf:"bytes,4,opt,name=fee_asset,json=feeAsset,proto3" json:"fee_asset,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Trades) Reset() { *x = Trades{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trades) String() string { @@ -3816,7 +3639,7 @@ func (*Trades) ProtoMessage() {} func (x *Trades) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3860,22 +3683,19 @@ func (x *Trades) GetFeeAsset() string { } type SubmitOrderResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + OrderPlaced bool `protobuf:"varint,1,opt,name=order_placed,json=orderPlaced,proto3" json:"order_placed,omitempty"` + OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + Trades []*Trades `protobuf:"bytes,3,rep,name=trades,proto3" json:"trades,omitempty"` unknownFields protoimpl.UnknownFields - - OrderPlaced bool `protobuf:"varint,1,opt,name=order_placed,json=orderPlaced,proto3" json:"order_placed,omitempty"` - OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` - Trades []*Trades `protobuf:"bytes,3,rep,name=trades,proto3" json:"trades,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SubmitOrderResponse) Reset() { *x = SubmitOrderResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitOrderResponse) String() string { @@ -3886,7 +3706,7 @@ func (*SubmitOrderResponse) ProtoMessage() {} func (x *SubmitOrderResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3923,24 +3743,21 @@ func (x *SubmitOrderResponse) GetTrades() []*Trades { } type SimulateOrderRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"` + Side string `protobuf:"bytes,4,opt,name=side,proto3" json:"side,omitempty"` + MarginType string `protobuf:"bytes,5,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"` - Side string `protobuf:"bytes,4,opt,name=side,proto3" json:"side,omitempty"` - MarginType string `protobuf:"bytes,5,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SimulateOrderRequest) Reset() { *x = SimulateOrderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateOrderRequest) String() string { @@ -3951,7 +3768,7 @@ func (*SimulateOrderRequest) ProtoMessage() {} func (x *SimulateOrderRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4002,25 +3819,22 @@ func (x *SimulateOrderRequest) GetMarginType() string { } type SimulateOrderResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Orders []*OrderbookItem `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` - Amount float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"` - MinimumPrice float64 `protobuf:"fixed64,3,opt,name=minimum_price,json=minimumPrice,proto3" json:"minimum_price,omitempty"` - MaximumPrice float64 `protobuf:"fixed64,4,opt,name=maximum_price,json=maximumPrice,proto3" json:"maximum_price,omitempty"` - PercentageGainLoss float64 `protobuf:"fixed64,5,opt,name=percentage_gain_loss,json=percentageGainLoss,proto3" json:"percentage_gain_loss,omitempty"` - Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Orders []*OrderbookItem `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` + Amount float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"` + MinimumPrice float64 `protobuf:"fixed64,3,opt,name=minimum_price,json=minimumPrice,proto3" json:"minimum_price,omitempty"` + MaximumPrice float64 `protobuf:"fixed64,4,opt,name=maximum_price,json=maximumPrice,proto3" json:"maximum_price,omitempty"` + PercentageGainLoss float64 `protobuf:"fixed64,5,opt,name=percentage_gain_loss,json=percentageGainLoss,proto3" json:"percentage_gain_loss,omitempty"` + Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SimulateOrderResponse) Reset() { *x = SimulateOrderResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateOrderResponse) String() string { @@ -4031,7 +3845,7 @@ func (*SimulateOrderResponse) ProtoMessage() {} func (x *SimulateOrderResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4089,24 +3903,21 @@ func (x *SimulateOrderResponse) GetStatus() string { } type WhaleBombRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + PriceTarget float64 `protobuf:"fixed64,3,opt,name=price_target,json=priceTarget,proto3" json:"price_target,omitempty"` + Side string `protobuf:"bytes,4,opt,name=side,proto3" json:"side,omitempty"` + AssetType string `protobuf:"bytes,5,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - PriceTarget float64 `protobuf:"fixed64,3,opt,name=price_target,json=priceTarget,proto3" json:"price_target,omitempty"` - Side string `protobuf:"bytes,4,opt,name=side,proto3" json:"side,omitempty"` - AssetType string `protobuf:"bytes,5,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WhaleBombRequest) Reset() { *x = WhaleBombRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WhaleBombRequest) String() string { @@ -4117,7 +3928,7 @@ func (*WhaleBombRequest) ProtoMessage() {} func (x *WhaleBombRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4168,26 +3979,23 @@ func (x *WhaleBombRequest) GetAssetType() string { } type CancelOrderRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,4,opt,name=pair,proto3" json:"pair,omitempty"` + AssetType string `protobuf:"bytes,5,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + WalletAddress string `protobuf:"bytes,6,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` + Side string `protobuf:"bytes,7,opt,name=side,proto3" json:"side,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` - OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,4,opt,name=pair,proto3" json:"pair,omitempty"` - AssetType string `protobuf:"bytes,5,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - WalletAddress string `protobuf:"bytes,6,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` - Side string `protobuf:"bytes,7,opt,name=side,proto3" json:"side,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CancelOrderRequest) Reset() { *x = CancelOrderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelOrderRequest) String() string { @@ -4198,7 +4006,7 @@ func (*CancelOrderRequest) ProtoMessage() {} func (x *CancelOrderRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4263,26 +4071,23 @@ func (x *CancelOrderRequest) GetSide() string { } type CancelBatchOrdersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + OrdersId string `protobuf:"bytes,3,opt,name=orders_id,json=ordersId,proto3" json:"orders_id,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,4,opt,name=pair,proto3" json:"pair,omitempty"` + AssetType string `protobuf:"bytes,5,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + WalletAddress string `protobuf:"bytes,6,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` + Side string `protobuf:"bytes,7,opt,name=side,proto3" json:"side,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` - OrdersId string `protobuf:"bytes,3,opt,name=orders_id,json=ordersId,proto3" json:"orders_id,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,4,opt,name=pair,proto3" json:"pair,omitempty"` - AssetType string `protobuf:"bytes,5,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - WalletAddress string `protobuf:"bytes,6,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` - Side string `protobuf:"bytes,7,opt,name=side,proto3" json:"side,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CancelBatchOrdersRequest) Reset() { *x = CancelBatchOrdersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelBatchOrdersRequest) String() string { @@ -4293,7 +4098,7 @@ func (*CancelBatchOrdersRequest) ProtoMessage() {} func (x *CancelBatchOrdersRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4358,21 +4163,18 @@ func (x *CancelBatchOrdersRequest) GetSide() string { } type Orders struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + OrderStatus map[string]string `protobuf:"bytes,2,rep,name=order_status,json=orderStatus,proto3" json:"order_status,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - OrderStatus map[string]string `protobuf:"bytes,2,rep,name=order_status,json=orderStatus,proto3" json:"order_status,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *Orders) Reset() { *x = Orders{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Orders) String() string { @@ -4383,7 +4185,7 @@ func (*Orders) ProtoMessage() {} func (x *Orders) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4413,20 +4215,17 @@ func (x *Orders) GetOrderStatus() map[string]string { } type CancelBatchOrdersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Orders []*Orders `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` unknownFields protoimpl.UnknownFields - - Orders []*Orders `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CancelBatchOrdersResponse) Reset() { *x = CancelBatchOrdersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelBatchOrdersResponse) String() string { @@ -4437,7 +4236,7 @@ func (*CancelBatchOrdersResponse) ProtoMessage() {} func (x *CancelBatchOrdersResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4460,20 +4259,17 @@ func (x *CancelBatchOrdersResponse) GetOrders() []*Orders { } type CancelAllOrdersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CancelAllOrdersRequest) Reset() { *x = CancelAllOrdersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelAllOrdersRequest) String() string { @@ -4484,7 +4280,7 @@ func (*CancelAllOrdersRequest) ProtoMessage() {} func (x *CancelAllOrdersRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4507,21 +4303,18 @@ func (x *CancelAllOrdersRequest) GetExchange() string { } type CancelAllOrdersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Orders []*Orders `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` unknownFields protoimpl.UnknownFields - - Orders []*Orders `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` - Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CancelAllOrdersResponse) Reset() { *x = CancelAllOrdersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelAllOrdersResponse) String() string { @@ -4532,7 +4325,7 @@ func (*CancelAllOrdersResponse) ProtoMessage() {} func (x *CancelAllOrdersResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4562,18 +4355,16 @@ func (x *CancelAllOrdersResponse) GetCount() int64 { } type GetEventsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetEventsRequest) Reset() { *x = GetEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEventsRequest) String() string { @@ -4584,7 +4375,7 @@ func (*GetEventsRequest) ProtoMessage() {} func (x *GetEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4600,24 +4391,21 @@ func (*GetEventsRequest) Descriptor() ([]byte, []int) { } type ConditionParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Condition string `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"` - Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"` - CheckBids bool `protobuf:"varint,3,opt,name=check_bids,json=checkBids,proto3" json:"check_bids,omitempty"` - CheckAsks bool `protobuf:"varint,4,opt,name=check_asks,json=checkAsks,proto3" json:"check_asks,omitempty"` - OrderbookAmount float64 `protobuf:"fixed64,5,opt,name=orderbook_amount,json=orderbookAmount,proto3" json:"orderbook_amount,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Condition string `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"` + Price float64 `protobuf:"fixed64,2,opt,name=price,proto3" json:"price,omitempty"` + CheckBids bool `protobuf:"varint,3,opt,name=check_bids,json=checkBids,proto3" json:"check_bids,omitempty"` + CheckAsks bool `protobuf:"varint,4,opt,name=check_asks,json=checkAsks,proto3" json:"check_asks,omitempty"` + OrderbookAmount float64 `protobuf:"fixed64,5,opt,name=orderbook_amount,json=orderbookAmount,proto3" json:"orderbook_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ConditionParams) Reset() { *x = ConditionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionParams) String() string { @@ -4628,7 +4416,7 @@ func (*ConditionParams) ProtoMessage() {} func (x *ConditionParams) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4679,26 +4467,23 @@ func (x *ConditionParams) GetOrderbookAmount() float64 { } type GetEventsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Exchange string `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"` - Item string `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"` - ConditionParams *ConditionParams `protobuf:"bytes,4,opt,name=condition_params,json=conditionParams,proto3" json:"condition_params,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,5,opt,name=pair,proto3" json:"pair,omitempty"` - Action string `protobuf:"bytes,6,opt,name=action,proto3" json:"action,omitempty"` - Executed bool `protobuf:"varint,7,opt,name=executed,proto3" json:"executed,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Exchange string `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"` + Item string `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"` + ConditionParams *ConditionParams `protobuf:"bytes,4,opt,name=condition_params,json=conditionParams,proto3" json:"condition_params,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,5,opt,name=pair,proto3" json:"pair,omitempty"` + Action string `protobuf:"bytes,6,opt,name=action,proto3" json:"action,omitempty"` + Executed bool `protobuf:"varint,7,opt,name=executed,proto3" json:"executed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetEventsResponse) Reset() { *x = GetEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEventsResponse) String() string { @@ -4709,7 +4494,7 @@ func (*GetEventsResponse) ProtoMessage() {} func (x *GetEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4773,26 +4558,23 @@ func (x *GetEventsResponse) GetExecuted() bool { return false } -type AddEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Item string `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` - ConditionParams *ConditionParams `protobuf:"bytes,3,opt,name=condition_params,json=conditionParams,proto3" json:"condition_params,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,4,opt,name=pair,proto3" json:"pair,omitempty"` - AssetType string `protobuf:"bytes,5,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - Action string `protobuf:"bytes,6,opt,name=action,proto3" json:"action,omitempty"` +type AddEventRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Item string `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` + ConditionParams *ConditionParams `protobuf:"bytes,3,opt,name=condition_params,json=conditionParams,proto3" json:"condition_params,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,4,opt,name=pair,proto3" json:"pair,omitempty"` + AssetType string `protobuf:"bytes,5,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + Action string `protobuf:"bytes,6,opt,name=action,proto3" json:"action,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AddEventRequest) Reset() { *x = AddEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddEventRequest) String() string { @@ -4803,7 +4585,7 @@ func (*AddEventRequest) ProtoMessage() {} func (x *AddEventRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4861,20 +4643,17 @@ func (x *AddEventRequest) GetAction() string { } type AddEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddEventResponse) Reset() { *x = AddEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddEventResponse) String() string { @@ -4885,7 +4664,7 @@ func (*AddEventResponse) ProtoMessage() {} func (x *AddEventResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4908,20 +4687,17 @@ func (x *AddEventResponse) GetId() int64 { } type RemoveEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RemoveEventRequest) Reset() { *x = RemoveEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveEventRequest) String() string { @@ -4932,7 +4708,7 @@ func (*RemoveEventRequest) ProtoMessage() {} func (x *RemoveEventRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4955,20 +4731,17 @@ func (x *RemoveEventRequest) GetId() int64 { } type GetCryptocurrencyDepositAddressesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetCryptocurrencyDepositAddressesRequest) Reset() { *x = GetCryptocurrencyDepositAddressesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCryptocurrencyDepositAddressesRequest) String() string { @@ -4979,7 +4752,7 @@ func (*GetCryptocurrencyDepositAddressesRequest) ProtoMessage() {} func (x *GetCryptocurrencyDepositAddressesRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5002,22 +4775,19 @@ func (x *GetCryptocurrencyDepositAddressesRequest) GetExchange() string { } type DepositAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` + Chain string `protobuf:"bytes,3,opt,name=chain,proto3" json:"chain,omitempty"` unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` - Chain string `protobuf:"bytes,3,opt,name=chain,proto3" json:"chain,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DepositAddress) Reset() { *x = DepositAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DepositAddress) String() string { @@ -5028,7 +4798,7 @@ func (*DepositAddress) ProtoMessage() {} func (x *DepositAddress) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5065,20 +4835,17 @@ func (x *DepositAddress) GetChain() string { } type DepositAddresses struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Addresses []*DepositAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` unknownFields protoimpl.UnknownFields - - Addresses []*DepositAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DepositAddresses) Reset() { *x = DepositAddresses{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DepositAddresses) String() string { @@ -5089,7 +4856,7 @@ func (*DepositAddresses) ProtoMessage() {} func (x *DepositAddresses) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5112,20 +4879,17 @@ func (x *DepositAddresses) GetAddresses() []*DepositAddress { } type GetCryptocurrencyDepositAddressesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Addresses map[string]*DepositAddresses `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Addresses map[string]*DepositAddresses `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *GetCryptocurrencyDepositAddressesResponse) Reset() { *x = GetCryptocurrencyDepositAddressesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCryptocurrencyDepositAddressesResponse) String() string { @@ -5136,7 +4900,7 @@ func (*GetCryptocurrencyDepositAddressesResponse) ProtoMessage() {} func (x *GetCryptocurrencyDepositAddressesResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5159,23 +4923,20 @@ func (x *GetCryptocurrencyDepositAddressesResponse) GetAddresses() map[string]*D } type GetCryptocurrencyDepositAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Cryptocurrency string `protobuf:"bytes,2,opt,name=cryptocurrency,proto3" json:"cryptocurrency,omitempty"` - Chain string `protobuf:"bytes,3,opt,name=chain,proto3" json:"chain,omitempty"` - Bypass bool `protobuf:"varint,4,opt,name=bypass,proto3" json:"bypass,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Cryptocurrency string `protobuf:"bytes,2,opt,name=cryptocurrency,proto3" json:"cryptocurrency,omitempty"` + Chain string `protobuf:"bytes,3,opt,name=chain,proto3" json:"chain,omitempty"` + Bypass bool `protobuf:"varint,4,opt,name=bypass,proto3" json:"bypass,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetCryptocurrencyDepositAddressRequest) Reset() { *x = GetCryptocurrencyDepositAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCryptocurrencyDepositAddressRequest) String() string { @@ -5186,7 +4947,7 @@ func (*GetCryptocurrencyDepositAddressRequest) ProtoMessage() {} func (x *GetCryptocurrencyDepositAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5230,21 +4991,18 @@ func (x *GetCryptocurrencyDepositAddressRequest) GetBypass() bool { } type GetCryptocurrencyDepositAddressResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetCryptocurrencyDepositAddressResponse) Reset() { *x = GetCryptocurrencyDepositAddressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCryptocurrencyDepositAddressResponse) String() string { @@ -5255,7 +5013,7 @@ func (*GetCryptocurrencyDepositAddressResponse) ProtoMessage() {} func (x *GetCryptocurrencyDepositAddressResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5285,21 +5043,18 @@ func (x *GetCryptocurrencyDepositAddressResponse) GetTag() string { } type GetAvailableTransferChainsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Cryptocurrency string `protobuf:"bytes,2,opt,name=cryptocurrency,proto3" json:"cryptocurrency,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Cryptocurrency string `protobuf:"bytes,2,opt,name=cryptocurrency,proto3" json:"cryptocurrency,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetAvailableTransferChainsRequest) Reset() { *x = GetAvailableTransferChainsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAvailableTransferChainsRequest) String() string { @@ -5310,7 +5065,7 @@ func (*GetAvailableTransferChainsRequest) ProtoMessage() {} func (x *GetAvailableTransferChainsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5340,20 +5095,17 @@ func (x *GetAvailableTransferChainsRequest) GetCryptocurrency() string { } type GetAvailableTransferChainsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chains []string `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains,omitempty"` unknownFields protoimpl.UnknownFields - - Chains []string `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAvailableTransferChainsResponse) Reset() { *x = GetAvailableTransferChainsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAvailableTransferChainsResponse) String() string { @@ -5364,7 +5116,7 @@ func (*GetAvailableTransferChainsResponse) ProtoMessage() {} func (x *GetAvailableTransferChainsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5387,24 +5139,21 @@ func (x *GetAvailableTransferChainsResponse) GetChains() []string { } type WithdrawFiatRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` + Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + BankAccountId string `protobuf:"bytes,5,opt,name=bank_account_id,json=bankAccountId,proto3" json:"bank_account_id,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` - Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - BankAccountId string `protobuf:"bytes,5,opt,name=bank_account_id,json=bankAccountId,proto3" json:"bank_account_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawFiatRequest) Reset() { *x = WithdrawFiatRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawFiatRequest) String() string { @@ -5415,7 +5164,7 @@ func (*WithdrawFiatRequest) ProtoMessage() {} func (x *WithdrawFiatRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5466,27 +5215,24 @@ func (x *WithdrawFiatRequest) GetBankAccountId() string { } type WithdrawCryptoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + AddressTag string `protobuf:"bytes,3,opt,name=address_tag,json=addressTag,proto3" json:"address_tag,omitempty"` + Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"` + Amount float64 `protobuf:"fixed64,5,opt,name=amount,proto3" json:"amount,omitempty"` + Fee float64 `protobuf:"fixed64,6,opt,name=fee,proto3" json:"fee,omitempty"` + Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` + Chain string `protobuf:"bytes,8,opt,name=chain,proto3" json:"chain,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - AddressTag string `protobuf:"bytes,3,opt,name=address_tag,json=addressTag,proto3" json:"address_tag,omitempty"` - Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"` - Amount float64 `protobuf:"fixed64,5,opt,name=amount,proto3" json:"amount,omitempty"` - Fee float64 `protobuf:"fixed64,6,opt,name=fee,proto3" json:"fee,omitempty"` - Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` - Chain string `protobuf:"bytes,8,opt,name=chain,proto3" json:"chain,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawCryptoRequest) Reset() { *x = WithdrawCryptoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawCryptoRequest) String() string { @@ -5497,7 +5243,7 @@ func (*WithdrawCryptoRequest) ProtoMessage() {} func (x *WithdrawCryptoRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5569,21 +5315,18 @@ func (x *WithdrawCryptoRequest) GetChain() string { } type WithdrawResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawResponse) Reset() { *x = WithdrawResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawResponse) String() string { @@ -5594,7 +5337,7 @@ func (*WithdrawResponse) ProtoMessage() {} func (x *WithdrawResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5624,20 +5367,17 @@ func (x *WithdrawResponse) GetStatus() string { } type WithdrawalEventByIDRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawalEventByIDRequest) Reset() { *x = WithdrawalEventByIDRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawalEventByIDRequest) String() string { @@ -5648,7 +5388,7 @@ func (*WithdrawalEventByIDRequest) ProtoMessage() {} func (x *WithdrawalEventByIDRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5671,20 +5411,17 @@ func (x *WithdrawalEventByIDRequest) GetId() string { } type WithdrawalEventByIDResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Event *WithdrawalEventResponse `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` unknownFields protoimpl.UnknownFields - - Event *WithdrawalEventResponse `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawalEventByIDResponse) Reset() { *x = WithdrawalEventByIDResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawalEventByIDResponse) String() string { @@ -5695,7 +5432,7 @@ func (*WithdrawalEventByIDResponse) ProtoMessage() {} func (x *WithdrawalEventByIDResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5718,24 +5455,21 @@ func (x *WithdrawalEventByIDResponse) GetEvent() *WithdrawalEventResponse { } type WithdrawalEventsByExchangeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` + Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"` + AssetType string `protobuf:"bytes,5,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` - Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"` - AssetType string `protobuf:"bytes,5,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawalEventsByExchangeRequest) Reset() { *x = WithdrawalEventsByExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawalEventsByExchangeRequest) String() string { @@ -5746,7 +5480,7 @@ func (*WithdrawalEventsByExchangeRequest) ProtoMessage() {} func (x *WithdrawalEventsByExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5797,23 +5531,20 @@ func (x *WithdrawalEventsByExchangeRequest) GetAssetType() string { } type WithdrawalEventsByDateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Start string `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` + End string `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` + Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Start string `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` - End string `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` - Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawalEventsByDateRequest) Reset() { *x = WithdrawalEventsByDateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawalEventsByDateRequest) String() string { @@ -5824,7 +5555,7 @@ func (*WithdrawalEventsByDateRequest) ProtoMessage() {} func (x *WithdrawalEventsByDateRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5868,20 +5599,17 @@ func (x *WithdrawalEventsByDateRequest) GetLimit() int32 { } type WithdrawalEventsByExchangeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Event []*WithdrawalEventResponse `protobuf:"bytes,2,rep,name=event,proto3" json:"event,omitempty"` unknownFields protoimpl.UnknownFields - - Event []*WithdrawalEventResponse `protobuf:"bytes,2,rep,name=event,proto3" json:"event,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawalEventsByExchangeResponse) Reset() { *x = WithdrawalEventsByExchangeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawalEventsByExchangeResponse) String() string { @@ -5892,7 +5620,7 @@ func (*WithdrawalEventsByExchangeResponse) ProtoMessage() {} func (x *WithdrawalEventsByExchangeResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5915,24 +5643,21 @@ func (x *WithdrawalEventsByExchangeResponse) GetEvent() []*WithdrawalEventRespon } type WithdrawalEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Exchange *WithdrawlExchangeEvent `protobuf:"bytes,3,opt,name=exchange,proto3" json:"exchange,omitempty"` + Request *WithdrawalRequestEvent `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Exchange *WithdrawlExchangeEvent `protobuf:"bytes,3,opt,name=exchange,proto3" json:"exchange,omitempty"` - Request *WithdrawalRequestEvent `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawalEventResponse) Reset() { *x = WithdrawalEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawalEventResponse) String() string { @@ -5943,7 +5668,7 @@ func (*WithdrawalEventResponse) ProtoMessage() {} func (x *WithdrawalEventResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5994,22 +5719,19 @@ func (x *WithdrawalEventResponse) GetUpdatedAt() *timestamppb.Timestamp { } type WithdrawlExchangeEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawlExchangeEvent) Reset() { *x = WithdrawlExchangeEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawlExchangeEvent) String() string { @@ -6020,7 +5742,7 @@ func (*WithdrawlExchangeEvent) ProtoMessage() {} func (x *WithdrawlExchangeEvent) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6057,25 +5779,22 @@ func (x *WithdrawlExchangeEvent) GetStatus() string { } type WithdrawalRequestEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Amount float64 `protobuf:"fixed64,4,opt,name=amount,proto3" json:"amount,omitempty"` + Type int64 `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"` + Fiat *FiatWithdrawalEvent `protobuf:"bytes,6,opt,name=fiat,proto3" json:"fiat,omitempty"` + Crypto *CryptoWithdrawalEvent `protobuf:"bytes,7,opt,name=crypto,proto3" json:"crypto,omitempty"` unknownFields protoimpl.UnknownFields - - Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Amount float64 `protobuf:"fixed64,4,opt,name=amount,proto3" json:"amount,omitempty"` - Type int32 `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"` - Fiat *FiatWithdrawalEvent `protobuf:"bytes,6,opt,name=fiat,proto3" json:"fiat,omitempty"` - Crypto *CryptoWithdrawalEvent `protobuf:"bytes,7,opt,name=crypto,proto3" json:"crypto,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WithdrawalRequestEvent) Reset() { *x = WithdrawalRequestEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawalRequestEvent) String() string { @@ -6086,7 +5805,7 @@ func (*WithdrawalRequestEvent) ProtoMessage() {} func (x *WithdrawalRequestEvent) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6122,7 +5841,7 @@ func (x *WithdrawalRequestEvent) GetAmount() float64 { return 0 } -func (x *WithdrawalRequestEvent) GetType() int32 { +func (x *WithdrawalRequestEvent) GetType() int64 { if x != nil { return x.Type } @@ -6144,25 +5863,22 @@ func (x *WithdrawalRequestEvent) GetCrypto() *CryptoWithdrawalEvent { } type FiatWithdrawalEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + BankName string `protobuf:"bytes,1,opt,name=bank_name,json=bankName,proto3" json:"bank_name,omitempty"` + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + AccountNumber string `protobuf:"bytes,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + Bsb string `protobuf:"bytes,4,opt,name=bsb,proto3" json:"bsb,omitempty"` + Swift string `protobuf:"bytes,5,opt,name=swift,proto3" json:"swift,omitempty"` + Iban string `protobuf:"bytes,6,opt,name=iban,proto3" json:"iban,omitempty"` unknownFields protoimpl.UnknownFields - - BankName string `protobuf:"bytes,1,opt,name=bank_name,json=bankName,proto3" json:"bank_name,omitempty"` - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - AccountNumber string `protobuf:"bytes,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - Bsb string `protobuf:"bytes,4,opt,name=bsb,proto3" json:"bsb,omitempty"` - Swift string `protobuf:"bytes,5,opt,name=swift,proto3" json:"swift,omitempty"` - Iban string `protobuf:"bytes,6,opt,name=iban,proto3" json:"iban,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FiatWithdrawalEvent) Reset() { *x = FiatWithdrawalEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FiatWithdrawalEvent) String() string { @@ -6173,7 +5889,7 @@ func (*FiatWithdrawalEvent) ProtoMessage() {} func (x *FiatWithdrawalEvent) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6231,23 +5947,20 @@ func (x *FiatWithdrawalEvent) GetIban() string { } type CryptoWithdrawalEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + AddressTag string `protobuf:"bytes,2,opt,name=address_tag,json=addressTag,proto3" json:"address_tag,omitempty"` + Fee float64 `protobuf:"fixed64,3,opt,name=fee,proto3" json:"fee,omitempty"` + TxId string `protobuf:"bytes,4,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - AddressTag string `protobuf:"bytes,2,opt,name=address_tag,json=addressTag,proto3" json:"address_tag,omitempty"` - Fee float64 `protobuf:"fixed64,3,opt,name=fee,proto3" json:"fee,omitempty"` - TxId string `protobuf:"bytes,4,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CryptoWithdrawalEvent) Reset() { *x = CryptoWithdrawalEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CryptoWithdrawalEvent) String() string { @@ -6258,7 +5971,7 @@ func (*CryptoWithdrawalEvent) ProtoMessage() {} func (x *CryptoWithdrawalEvent) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6302,20 +6015,17 @@ func (x *CryptoWithdrawalEvent) GetTxId() string { } type GetLoggerDetailsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Logger string `protobuf:"bytes,1,opt,name=logger,proto3" json:"logger,omitempty"` unknownFields protoimpl.UnknownFields - - Logger string `protobuf:"bytes,1,opt,name=logger,proto3" json:"logger,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetLoggerDetailsRequest) Reset() { *x = GetLoggerDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLoggerDetailsRequest) String() string { @@ -6326,7 +6036,7 @@ func (*GetLoggerDetailsRequest) ProtoMessage() {} func (x *GetLoggerDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6349,23 +6059,20 @@ func (x *GetLoggerDetailsRequest) GetLogger() string { } type GetLoggerDetailsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Info bool `protobuf:"varint,1,opt,name=info,proto3" json:"info,omitempty"` + Debug bool `protobuf:"varint,2,opt,name=debug,proto3" json:"debug,omitempty"` + Warn bool `protobuf:"varint,3,opt,name=warn,proto3" json:"warn,omitempty"` + Error bool `protobuf:"varint,4,opt,name=error,proto3" json:"error,omitempty"` unknownFields protoimpl.UnknownFields - - Info bool `protobuf:"varint,1,opt,name=info,proto3" json:"info,omitempty"` - Debug bool `protobuf:"varint,2,opt,name=debug,proto3" json:"debug,omitempty"` - Warn bool `protobuf:"varint,3,opt,name=warn,proto3" json:"warn,omitempty"` - Error bool `protobuf:"varint,4,opt,name=error,proto3" json:"error,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetLoggerDetailsResponse) Reset() { *x = GetLoggerDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLoggerDetailsResponse) String() string { @@ -6376,7 +6083,7 @@ func (*GetLoggerDetailsResponse) ProtoMessage() {} func (x *GetLoggerDetailsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6420,21 +6127,18 @@ func (x *GetLoggerDetailsResponse) GetError() bool { } type SetLoggerDetailsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Logger string `protobuf:"bytes,1,opt,name=logger,proto3" json:"logger,omitempty"` + Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` unknownFields protoimpl.UnknownFields - - Logger string `protobuf:"bytes,1,opt,name=logger,proto3" json:"logger,omitempty"` - Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetLoggerDetailsRequest) Reset() { *x = SetLoggerDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLoggerDetailsRequest) String() string { @@ -6445,7 +6149,7 @@ func (*SetLoggerDetailsRequest) ProtoMessage() {} func (x *SetLoggerDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6475,21 +6179,18 @@ func (x *SetLoggerDetailsRequest) GetLevel() string { } type GetExchangePairsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetExchangePairsRequest) Reset() { *x = GetExchangePairsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangePairsRequest) String() string { @@ -6500,7 +6201,7 @@ func (*GetExchangePairsRequest) ProtoMessage() {} func (x *GetExchangePairsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6530,20 +6231,17 @@ func (x *GetExchangePairsRequest) GetAsset() string { } type GetExchangePairsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SupportedAssets map[string]*PairsSupported `protobuf:"bytes,1,rep,name=supported_assets,json=supportedAssets,proto3" json:"supported_assets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + state protoimpl.MessageState `protogen:"open.v1"` + SupportedAssets map[string]*PairsSupported `protobuf:"bytes,1,rep,name=supported_assets,json=supportedAssets,proto3" json:"supported_assets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetExchangePairsResponse) Reset() { *x = GetExchangePairsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangePairsResponse) String() string { @@ -6554,7 +6252,7 @@ func (*GetExchangePairsResponse) ProtoMessage() {} func (x *GetExchangePairsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6577,23 +6275,20 @@ func (x *GetExchangePairsResponse) GetSupportedAssets() map[string]*PairsSupport } type SetExchangePairRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + Pairs []*CurrencyPair `protobuf:"bytes,3,rep,name=pairs,proto3" json:"pairs,omitempty"` + Enable bool `protobuf:"varint,4,opt,name=enable,proto3" json:"enable,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - Pairs []*CurrencyPair `protobuf:"bytes,3,rep,name=pairs,proto3" json:"pairs,omitempty"` - Enable bool `protobuf:"varint,4,opt,name=enable,proto3" json:"enable,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetExchangePairRequest) Reset() { *x = SetExchangePairRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetExchangePairRequest) String() string { @@ -6604,7 +6299,7 @@ func (*SetExchangePairRequest) ProtoMessage() {} func (x *SetExchangePairRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6648,22 +6343,19 @@ func (x *SetExchangePairRequest) GetEnable() bool { } type GetOrderbookStreamRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetOrderbookStreamRequest) Reset() { *x = GetOrderbookStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderbookStreamRequest) String() string { @@ -6674,7 +6366,7 @@ func (*GetOrderbookStreamRequest) ProtoMessage() {} func (x *GetOrderbookStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6711,20 +6403,17 @@ func (x *GetOrderbookStreamRequest) GetAssetType() string { } type GetExchangeOrderbookStreamRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetExchangeOrderbookStreamRequest) Reset() { *x = GetExchangeOrderbookStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangeOrderbookStreamRequest) String() string { @@ -6735,7 +6424,7 @@ func (*GetExchangeOrderbookStreamRequest) ProtoMessage() {} func (x *GetExchangeOrderbookStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6758,22 +6447,19 @@ func (x *GetExchangeOrderbookStreamRequest) GetExchange() string { } type GetTickerStreamRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetTickerStreamRequest) Reset() { *x = GetTickerStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTickerStreamRequest) String() string { @@ -6784,7 +6470,7 @@ func (*GetTickerStreamRequest) ProtoMessage() {} func (x *GetTickerStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6821,20 +6507,17 @@ func (x *GetTickerStreamRequest) GetAssetType() string { } type GetExchangeTickerStreamRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetExchangeTickerStreamRequest) Reset() { *x = GetExchangeTickerStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangeTickerStreamRequest) String() string { @@ -6845,7 +6528,7 @@ func (*GetExchangeTickerStreamRequest) ProtoMessage() {} func (x *GetExchangeTickerStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6868,24 +6551,21 @@ func (x *GetExchangeTickerStreamRequest) GetExchange() string { } type GetAuditEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + StartDate string `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + EndDate string `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` + OrderBy string `protobuf:"bytes,3,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` + Offset int32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` unknownFields protoimpl.UnknownFields - - StartDate string `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` - EndDate string `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` - OrderBy string `protobuf:"bytes,3,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` - Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - Offset int32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAuditEventRequest) Reset() { *x = GetAuditEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAuditEventRequest) String() string { @@ -6896,7 +6576,7 @@ func (*GetAuditEventRequest) ProtoMessage() {} func (x *GetAuditEventRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6947,20 +6627,17 @@ func (x *GetAuditEventRequest) GetOffset() int32 { } type GetAuditEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Events []*AuditEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` unknownFields protoimpl.UnknownFields - - Events []*AuditEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAuditEventResponse) Reset() { *x = GetAuditEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAuditEventResponse) String() string { @@ -6971,7 +6648,7 @@ func (*GetAuditEventResponse) ProtoMessage() {} func (x *GetAuditEventResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6994,24 +6671,21 @@ func (x *GetAuditEventResponse) GetEvents() []*AuditEvent { } type GetSavedTradesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + Start string `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"` + End string `protobuf:"bytes,5,opt,name=end,proto3" json:"end,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - Start string `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"` - End string `protobuf:"bytes,5,opt,name=end,proto3" json:"end,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetSavedTradesRequest) Reset() { - *x = GetSavedTradesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + *x = GetSavedTradesRequest{} + mi := &file_rpc_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSavedTradesRequest) String() string { @@ -7022,7 +6696,7 @@ func (*GetSavedTradesRequest) ProtoMessage() {} func (x *GetSavedTradesRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7073,24 +6747,21 @@ func (x *GetSavedTradesRequest) GetEnd() string { } type SavedTrades struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Price float64 `protobuf:"fixed64,1,opt,name=price,proto3" json:"price,omitempty"` + Amount float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"` + Side string `protobuf:"bytes,3,opt,name=side,proto3" json:"side,omitempty"` + Timestamp string `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TradeId string `protobuf:"bytes,5,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` unknownFields protoimpl.UnknownFields - - Price float64 `protobuf:"fixed64,1,opt,name=price,proto3" json:"price,omitempty"` - Amount float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"` - Side string `protobuf:"bytes,3,opt,name=side,proto3" json:"side,omitempty"` - Timestamp string `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - TradeId string `protobuf:"bytes,5,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SavedTrades) Reset() { *x = SavedTrades{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SavedTrades) String() string { @@ -7101,7 +6772,7 @@ func (*SavedTrades) ProtoMessage() {} func (x *SavedTrades) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7152,23 +6823,20 @@ func (x *SavedTrades) GetTradeId() string { } type SavedTradesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Trades []*SavedTrades `protobuf:"bytes,4,rep,name=trades,proto3" json:"trades,omitempty"` unknownFields protoimpl.UnknownFields - - ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Trades []*SavedTrades `protobuf:"bytes,4,rep,name=trades,proto3" json:"trades,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SavedTradesResponse) Reset() { *x = SavedTradesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SavedTradesResponse) String() string { @@ -7179,7 +6847,7 @@ func (*SavedTradesResponse) ProtoMessage() {} func (x *SavedTradesResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7223,27 +6891,24 @@ func (x *SavedTradesResponse) GetTrades() []*SavedTrades { } type ConvertTradesToCandlesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + Start string `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"` + End string `protobuf:"bytes,5,opt,name=end,proto3" json:"end,omitempty"` + TimeInterval int64 `protobuf:"varint,6,opt,name=time_interval,json=timeInterval,proto3" json:"time_interval,omitempty"` + Sync bool `protobuf:"varint,7,opt,name=sync,proto3" json:"sync,omitempty"` + Force bool `protobuf:"varint,8,opt,name=force,proto3" json:"force,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - Start string `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"` - End string `protobuf:"bytes,5,opt,name=end,proto3" json:"end,omitempty"` - TimeInterval int64 `protobuf:"varint,6,opt,name=time_interval,json=timeInterval,proto3" json:"time_interval,omitempty"` - Sync bool `protobuf:"varint,7,opt,name=sync,proto3" json:"sync,omitempty"` - Force bool `protobuf:"varint,8,opt,name=force,proto3" json:"force,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ConvertTradesToCandlesRequest) Reset() { *x = ConvertTradesToCandlesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConvertTradesToCandlesRequest) String() string { @@ -7254,7 +6919,7 @@ func (*ConvertTradesToCandlesRequest) ProtoMessage() {} func (x *ConvertTradesToCandlesRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7326,30 +6991,27 @@ func (x *ConvertTradesToCandlesRequest) GetForce() bool { } type GetHistoricCandlesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - Start string `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"` - End string `protobuf:"bytes,5,opt,name=end,proto3" json:"end,omitempty"` - TimeInterval int64 `protobuf:"varint,6,opt,name=time_interval,json=timeInterval,proto3" json:"time_interval,omitempty"` - ExRequest bool `protobuf:"varint,7,opt,name=ex_request,json=exRequest,proto3" json:"ex_request,omitempty"` - Sync bool `protobuf:"varint,8,opt,name=sync,proto3" json:"sync,omitempty"` - UseDb bool `protobuf:"varint,9,opt,name=use_db,json=useDb,proto3" json:"use_db,omitempty"` - FillMissingWithTrades bool `protobuf:"varint,10,opt,name=fill_missing_with_trades,json=fillMissingWithTrades,proto3" json:"fill_missing_with_trades,omitempty"` - Force bool `protobuf:"varint,11,opt,name=force,proto3" json:"force,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + Start string `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"` + End string `protobuf:"bytes,5,opt,name=end,proto3" json:"end,omitempty"` + TimeInterval int64 `protobuf:"varint,6,opt,name=time_interval,json=timeInterval,proto3" json:"time_interval,omitempty"` + ExRequest bool `protobuf:"varint,7,opt,name=ex_request,json=exRequest,proto3" json:"ex_request,omitempty"` + Sync bool `protobuf:"varint,8,opt,name=sync,proto3" json:"sync,omitempty"` + UseDb bool `protobuf:"varint,9,opt,name=use_db,json=useDb,proto3" json:"use_db,omitempty"` + FillMissingWithTrades bool `protobuf:"varint,10,opt,name=fill_missing_with_trades,json=fillMissingWithTrades,proto3" json:"fill_missing_with_trades,omitempty"` + Force bool `protobuf:"varint,11,opt,name=force,proto3" json:"force,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetHistoricCandlesRequest) Reset() { *x = GetHistoricCandlesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHistoricCandlesRequest) String() string { @@ -7360,7 +7022,7 @@ func (*GetHistoricCandlesRequest) ProtoMessage() {} func (x *GetHistoricCandlesRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7453,25 +7115,22 @@ func (x *GetHistoricCandlesRequest) GetForce() bool { } type GetHistoricCandlesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + Start string `protobuf:"bytes,3,opt,name=start,proto3" json:"start,omitempty"` + End string `protobuf:"bytes,4,opt,name=end,proto3" json:"end,omitempty"` + Interval string `protobuf:"bytes,6,opt,name=interval,proto3" json:"interval,omitempty"` + Candle []*Candle `protobuf:"bytes,5,rep,name=candle,proto3" json:"candle,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - Start string `protobuf:"bytes,3,opt,name=start,proto3" json:"start,omitempty"` - End string `protobuf:"bytes,4,opt,name=end,proto3" json:"end,omitempty"` - Interval string `protobuf:"bytes,6,opt,name=interval,proto3" json:"interval,omitempty"` - Candle []*Candle `protobuf:"bytes,5,rep,name=candle,proto3" json:"candle,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetHistoricCandlesResponse) Reset() { *x = GetHistoricCandlesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHistoricCandlesResponse) String() string { @@ -7482,7 +7141,7 @@ func (*GetHistoricCandlesResponse) ProtoMessage() {} func (x *GetHistoricCandlesResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7540,26 +7199,23 @@ func (x *GetHistoricCandlesResponse) GetCandle() []*Candle { } type Candle struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Time string `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + Low float64 `protobuf:"fixed64,2,opt,name=low,proto3" json:"low,omitempty"` + High float64 `protobuf:"fixed64,3,opt,name=high,proto3" json:"high,omitempty"` + Open float64 `protobuf:"fixed64,4,opt,name=open,proto3" json:"open,omitempty"` + Close float64 `protobuf:"fixed64,5,opt,name=close,proto3" json:"close,omitempty"` + Volume float64 `protobuf:"fixed64,6,opt,name=volume,proto3" json:"volume,omitempty"` + IsPartial bool `protobuf:"varint,7,opt,name=is_partial,json=isPartial,proto3" json:"is_partial,omitempty"` unknownFields protoimpl.UnknownFields - - Time string `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` - Low float64 `protobuf:"fixed64,2,opt,name=low,proto3" json:"low,omitempty"` - High float64 `protobuf:"fixed64,3,opt,name=high,proto3" json:"high,omitempty"` - Open float64 `protobuf:"fixed64,4,opt,name=open,proto3" json:"open,omitempty"` - Close float64 `protobuf:"fixed64,5,opt,name=close,proto3" json:"close,omitempty"` - Volume float64 `protobuf:"fixed64,6,opt,name=volume,proto3" json:"volume,omitempty"` - IsPartial bool `protobuf:"varint,7,opt,name=is_partial,json=isPartial,proto3" json:"is_partial,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Candle) Reset() { *x = Candle{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Candle) String() string { @@ -7570,7 +7226,7 @@ func (*Candle) ProtoMessage() {} func (x *Candle) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7635,23 +7291,20 @@ func (x *Candle) GetIsPartial() bool { } type AuditEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Identifier string `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + Timestamp string `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Identifier string `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"` - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - Timestamp string `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AuditEvent) Reset() { *x = AuditEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuditEvent) String() string { @@ -7662,7 +7315,7 @@ func (*AuditEvent) ProtoMessage() {} func (x *AuditEvent) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7706,23 +7359,20 @@ func (x *AuditEvent) GetTimestamp() string { } type GCTScript struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` + NextRun string `protobuf:"bytes,4,opt,name=next_run,json=nextRun,proto3" json:"next_run,omitempty"` unknownFields protoimpl.UnknownFields - - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - NextRun string `protobuf:"bytes,4,opt,name=next_run,json=nextRun,proto3" json:"next_run,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GCTScript) Reset() { *x = GCTScript{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScript) String() string { @@ -7733,7 +7383,7 @@ func (*GCTScript) ProtoMessage() {} func (x *GCTScript) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[120] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7777,20 +7427,17 @@ func (x *GCTScript) GetNextRun() string { } type GCTScriptExecuteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Script *GCTScript `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` unknownFields protoimpl.UnknownFields - - Script *GCTScript `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GCTScriptExecuteRequest) Reset() { *x = GCTScriptExecuteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptExecuteRequest) String() string { @@ -7801,7 +7448,7 @@ func (*GCTScriptExecuteRequest) ProtoMessage() {} func (x *GCTScriptExecuteRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[121] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7824,20 +7471,17 @@ func (x *GCTScriptExecuteRequest) GetScript() *GCTScript { } type GCTScriptStopRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Script *GCTScript `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` unknownFields protoimpl.UnknownFields - - Script *GCTScript `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GCTScriptStopRequest) Reset() { *x = GCTScriptStopRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptStopRequest) String() string { @@ -7848,7 +7492,7 @@ func (*GCTScriptStopRequest) ProtoMessage() {} func (x *GCTScriptStopRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[122] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7871,18 +7515,16 @@ func (x *GCTScriptStopRequest) GetScript() *GCTScript { } type GCTScriptStopAllRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GCTScriptStopAllRequest) Reset() { *x = GCTScriptStopAllRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptStopAllRequest) String() string { @@ -7893,7 +7535,7 @@ func (*GCTScriptStopAllRequest) ProtoMessage() {} func (x *GCTScriptStopAllRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[123] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7909,18 +7551,16 @@ func (*GCTScriptStopAllRequest) Descriptor() ([]byte, []int) { } type GCTScriptStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GCTScriptStatusRequest) Reset() { *x = GCTScriptStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptStatusRequest) String() string { @@ -7931,7 +7571,7 @@ func (*GCTScriptStatusRequest) ProtoMessage() {} func (x *GCTScriptStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7947,18 +7587,16 @@ func (*GCTScriptStatusRequest) Descriptor() ([]byte, []int) { } type GCTScriptListAllRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GCTScriptListAllRequest) Reset() { *x = GCTScriptListAllRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptListAllRequest) String() string { @@ -7969,7 +7607,7 @@ func (*GCTScriptListAllRequest) ProtoMessage() {} func (x *GCTScriptListAllRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7985,24 +7623,21 @@ func (*GCTScriptListAllRequest) Descriptor() ([]byte, []int) { } type GCTScriptUploadRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ScriptName string `protobuf:"bytes,1,opt,name=script_name,json=scriptName,proto3" json:"script_name,omitempty"` + ScriptData string `protobuf:"bytes,2,opt,name=script_data,json=scriptData,proto3" json:"script_data,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Archived bool `protobuf:"varint,4,opt,name=archived,proto3" json:"archived,omitempty"` + Overwrite bool `protobuf:"varint,5,opt,name=overwrite,proto3" json:"overwrite,omitempty"` unknownFields protoimpl.UnknownFields - - ScriptName string `protobuf:"bytes,1,opt,name=script_name,json=scriptName,proto3" json:"script_name,omitempty"` - ScriptData string `protobuf:"bytes,2,opt,name=script_data,json=scriptData,proto3" json:"script_data,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Archived bool `protobuf:"varint,4,opt,name=archived,proto3" json:"archived,omitempty"` - Overwrite bool `protobuf:"varint,5,opt,name=overwrite,proto3" json:"overwrite,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GCTScriptUploadRequest) Reset() { *x = GCTScriptUploadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptUploadRequest) String() string { @@ -8013,7 +7648,7 @@ func (*GCTScriptUploadRequest) ProtoMessage() {} func (x *GCTScriptUploadRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8064,20 +7699,17 @@ func (x *GCTScriptUploadRequest) GetOverwrite() bool { } type GCTScriptReadScriptRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Script *GCTScript `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` unknownFields protoimpl.UnknownFields - - Script *GCTScript `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GCTScriptReadScriptRequest) Reset() { *x = GCTScriptReadScriptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptReadScriptRequest) String() string { @@ -8088,7 +7720,7 @@ func (*GCTScriptReadScriptRequest) ProtoMessage() {} func (x *GCTScriptReadScriptRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8111,20 +7743,17 @@ func (x *GCTScriptReadScriptRequest) GetScript() *GCTScript { } type GCTScriptQueryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Script *GCTScript `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` unknownFields protoimpl.UnknownFields - - Script *GCTScript `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GCTScriptQueryRequest) Reset() { *x = GCTScriptQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptQueryRequest) String() string { @@ -8135,7 +7764,7 @@ func (*GCTScriptQueryRequest) ProtoMessage() {} func (x *GCTScriptQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8158,21 +7787,18 @@ func (x *GCTScriptQueryRequest) GetScript() *GCTScript { } type GCTScriptAutoLoadRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Script string `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` + Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields - - Script string `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` - Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GCTScriptAutoLoadRequest) Reset() { *x = GCTScriptAutoLoadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptAutoLoadRequest) String() string { @@ -8183,7 +7809,7 @@ func (*GCTScriptAutoLoadRequest) ProtoMessage() {} func (x *GCTScriptAutoLoadRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8213,21 +7839,18 @@ func (x *GCTScriptAutoLoadRequest) GetStatus() bool { } type GCTScriptStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Scripts []*GCTScript `protobuf:"bytes,2,rep,name=scripts,proto3" json:"scripts,omitempty"` unknownFields protoimpl.UnknownFields - - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Scripts []*GCTScript `protobuf:"bytes,2,rep,name=scripts,proto3" json:"scripts,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GCTScriptStatusResponse) Reset() { *x = GCTScriptStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptStatusResponse) String() string { @@ -8238,7 +7861,7 @@ func (*GCTScriptStatusResponse) ProtoMessage() {} func (x *GCTScriptStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8268,22 +7891,19 @@ func (x *GCTScriptStatusResponse) GetScripts() []*GCTScript { } type GCTScriptQueryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Script *GCTScript `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"` + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields - - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Script *GCTScript `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"` - Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GCTScriptQueryResponse) Reset() { *x = GCTScriptQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCTScriptQueryResponse) String() string { @@ -8294,7 +7914,7 @@ func (*GCTScriptQueryResponse) ProtoMessage() {} func (x *GCTScriptQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8331,21 +7951,18 @@ func (x *GCTScriptQueryResponse) GetData() string { } type GenericResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields - - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GenericResponse) Reset() { *x = GenericResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenericResponse) String() string { @@ -8356,7 +7973,7 @@ func (*GenericResponse) ProtoMessage() {} func (x *GenericResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8386,22 +8003,19 @@ func (x *GenericResponse) GetData() string { } type SetExchangeAssetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Enable bool `protobuf:"varint,3,opt,name=enable,proto3" json:"enable,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Enable bool `protobuf:"varint,3,opt,name=enable,proto3" json:"enable,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetExchangeAssetRequest) Reset() { *x = SetExchangeAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetExchangeAssetRequest) String() string { @@ -8412,7 +8026,7 @@ func (*SetExchangeAssetRequest) ProtoMessage() {} func (x *SetExchangeAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[133] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8449,21 +8063,18 @@ func (x *SetExchangeAssetRequest) GetEnable() bool { } type SetExchangeAllPairsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Enable bool `protobuf:"varint,2,opt,name=enable,proto3" json:"enable,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Enable bool `protobuf:"varint,2,opt,name=enable,proto3" json:"enable,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetExchangeAllPairsRequest) Reset() { *x = SetExchangeAllPairsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetExchangeAllPairsRequest) String() string { @@ -8474,7 +8085,7 @@ func (*SetExchangeAllPairsRequest) ProtoMessage() {} func (x *SetExchangeAllPairsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[134] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8504,20 +8115,17 @@ func (x *SetExchangeAllPairsRequest) GetEnable() bool { } type UpdateExchangeSupportedPairsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateExchangeSupportedPairsRequest) Reset() { *x = UpdateExchangeSupportedPairsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExchangeSupportedPairsRequest) String() string { @@ -8528,7 +8136,7 @@ func (*UpdateExchangeSupportedPairsRequest) ProtoMessage() {} func (x *UpdateExchangeSupportedPairsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[135] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8551,20 +8159,17 @@ func (x *UpdateExchangeSupportedPairsRequest) GetExchange() string { } type GetExchangeAssetsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetExchangeAssetsRequest) Reset() { *x = GetExchangeAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangeAssetsRequest) String() string { @@ -8575,7 +8180,7 @@ func (*GetExchangeAssetsRequest) ProtoMessage() {} func (x *GetExchangeAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[136] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8598,20 +8203,17 @@ func (x *GetExchangeAssetsRequest) GetExchange() string { } type GetExchangeAssetsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Assets string `protobuf:"bytes,1,opt,name=assets,proto3" json:"assets,omitempty"` unknownFields protoimpl.UnknownFields - - Assets string `protobuf:"bytes,1,opt,name=assets,proto3" json:"assets,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetExchangeAssetsResponse) Reset() { *x = GetExchangeAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExchangeAssetsResponse) String() string { @@ -8622,7 +8224,7 @@ func (*GetExchangeAssetsResponse) ProtoMessage() {} func (x *GetExchangeAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[137] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8645,20 +8247,17 @@ func (x *GetExchangeAssetsResponse) GetAssets() string { } type WebsocketGetInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WebsocketGetInfoRequest) Reset() { *x = WebsocketGetInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebsocketGetInfoRequest) String() string { @@ -8669,7 +8268,7 @@ func (*WebsocketGetInfoRequest) ProtoMessage() {} func (x *WebsocketGetInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[138] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8692,26 +8291,23 @@ func (x *WebsocketGetInfoRequest) GetExchange() string { } type WebsocketGetInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Supported bool `protobuf:"varint,2,opt,name=supported,proto3" json:"supported,omitempty"` - Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` - AuthenticatedSupported bool `protobuf:"varint,4,opt,name=authenticated_supported,json=authenticatedSupported,proto3" json:"authenticated_supported,omitempty"` - Authenticated bool `protobuf:"varint,5,opt,name=authenticated,proto3" json:"authenticated,omitempty"` - RunningUrl string `protobuf:"bytes,6,opt,name=running_url,json=runningUrl,proto3" json:"running_url,omitempty"` - ProxyAddress string `protobuf:"bytes,7,opt,name=proxy_address,json=proxyAddress,proto3" json:"proxy_address,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Supported bool `protobuf:"varint,2,opt,name=supported,proto3" json:"supported,omitempty"` + Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` + AuthenticatedSupported bool `protobuf:"varint,4,opt,name=authenticated_supported,json=authenticatedSupported,proto3" json:"authenticated_supported,omitempty"` + Authenticated bool `protobuf:"varint,5,opt,name=authenticated,proto3" json:"authenticated,omitempty"` + RunningUrl string `protobuf:"bytes,6,opt,name=running_url,json=runningUrl,proto3" json:"running_url,omitempty"` + ProxyAddress string `protobuf:"bytes,7,opt,name=proxy_address,json=proxyAddress,proto3" json:"proxy_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *WebsocketGetInfoResponse) Reset() { *x = WebsocketGetInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebsocketGetInfoResponse) String() string { @@ -8722,7 +8318,7 @@ func (*WebsocketGetInfoResponse) ProtoMessage() {} func (x *WebsocketGetInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[139] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8787,21 +8383,18 @@ func (x *WebsocketGetInfoResponse) GetProxyAddress() string { } type WebsocketSetEnabledRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Enable bool `protobuf:"varint,2,opt,name=enable,proto3" json:"enable,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Enable bool `protobuf:"varint,2,opt,name=enable,proto3" json:"enable,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WebsocketSetEnabledRequest) Reset() { *x = WebsocketSetEnabledRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebsocketSetEnabledRequest) String() string { @@ -8812,7 +8405,7 @@ func (*WebsocketSetEnabledRequest) ProtoMessage() {} func (x *WebsocketSetEnabledRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[140] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8842,20 +8435,17 @@ func (x *WebsocketSetEnabledRequest) GetEnable() bool { } type WebsocketGetSubscriptionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WebsocketGetSubscriptionsRequest) Reset() { *x = WebsocketGetSubscriptionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebsocketGetSubscriptionsRequest) String() string { @@ -8866,7 +8456,7 @@ func (*WebsocketGetSubscriptionsRequest) ProtoMessage() {} func (x *WebsocketGetSubscriptionsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[141] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8889,23 +8479,20 @@ func (x *WebsocketGetSubscriptionsRequest) GetExchange() string { } type WebsocketSubscription struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` + Pairs string `protobuf:"bytes,2,opt,name=pairs,proto3" json:"pairs,omitempty"` + Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` + Params string `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"` unknownFields protoimpl.UnknownFields - - Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` - Pairs string `protobuf:"bytes,2,opt,name=pairs,proto3" json:"pairs,omitempty"` - Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` - Params string `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WebsocketSubscription) Reset() { *x = WebsocketSubscription{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebsocketSubscription) String() string { @@ -8916,7 +8503,7 @@ func (*WebsocketSubscription) ProtoMessage() {} func (x *WebsocketSubscription) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[142] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8960,21 +8547,18 @@ func (x *WebsocketSubscription) GetParams() string { } type WebsocketGetSubscriptionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` Subscriptions []*WebsocketSubscription `protobuf:"bytes,2,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *WebsocketGetSubscriptionsResponse) Reset() { *x = WebsocketGetSubscriptionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebsocketGetSubscriptionsResponse) String() string { @@ -8985,7 +8569,7 @@ func (*WebsocketGetSubscriptionsResponse) ProtoMessage() {} func (x *WebsocketGetSubscriptionsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[143] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9015,21 +8599,18 @@ func (x *WebsocketGetSubscriptionsResponse) GetSubscriptions() []*WebsocketSubsc } type WebsocketSetProxyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Proxy string `protobuf:"bytes,2,opt,name=proxy,proto3" json:"proxy,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Proxy string `protobuf:"bytes,2,opt,name=proxy,proto3" json:"proxy,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WebsocketSetProxyRequest) Reset() { *x = WebsocketSetProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebsocketSetProxyRequest) String() string { @@ -9040,7 +8621,7 @@ func (*WebsocketSetProxyRequest) ProtoMessage() {} func (x *WebsocketSetProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[144] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9070,21 +8651,18 @@ func (x *WebsocketSetProxyRequest) GetProxy() string { } type WebsocketSetURLRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + sizeCache protoimpl.SizeCache } func (x *WebsocketSetURLRequest) Reset() { *x = WebsocketSetURLRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebsocketSetURLRequest) String() string { @@ -9095,7 +8673,7 @@ func (*WebsocketSetURLRequest) ProtoMessage() {} func (x *WebsocketSetURLRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[145] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9125,25 +8703,22 @@ func (x *WebsocketSetURLRequest) GetUrl() string { } type FindMissingCandlePeriodsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` + AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Interval int64 `protobuf:"varint,4,opt,name=interval,proto3" json:"interval,omitempty"` + Start string `protobuf:"bytes,5,opt,name=start,proto3" json:"start,omitempty"` + End string `protobuf:"bytes,6,opt,name=end,proto3" json:"end,omitempty"` unknownFields protoimpl.UnknownFields - - ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` - AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Interval int64 `protobuf:"varint,4,opt,name=interval,proto3" json:"interval,omitempty"` - Start string `protobuf:"bytes,5,opt,name=start,proto3" json:"start,omitempty"` - End string `protobuf:"bytes,6,opt,name=end,proto3" json:"end,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FindMissingCandlePeriodsRequest) Reset() { *x = FindMissingCandlePeriodsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindMissingCandlePeriodsRequest) String() string { @@ -9154,7 +8729,7 @@ func (*FindMissingCandlePeriodsRequest) ProtoMessage() {} func (x *FindMissingCandlePeriodsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[146] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9212,24 +8787,21 @@ func (x *FindMissingCandlePeriodsRequest) GetEnd() string { } type FindMissingTradePeriodsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` + AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Start string `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"` + End string `protobuf:"bytes,5,opt,name=end,proto3" json:"end,omitempty"` unknownFields protoimpl.UnknownFields - - ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` - AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Start string `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"` - End string `protobuf:"bytes,5,opt,name=end,proto3" json:"end,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FindMissingTradePeriodsRequest) Reset() { *x = FindMissingTradePeriodsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindMissingTradePeriodsRequest) String() string { @@ -9240,7 +8812,7 @@ func (*FindMissingTradePeriodsRequest) ProtoMessage() {} func (x *FindMissingTradePeriodsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[147] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9291,24 +8863,21 @@ func (x *FindMissingTradePeriodsRequest) GetEnd() string { } type FindMissingIntervalsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` - AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - MissingPeriods []string `protobuf:"bytes,4,rep,name=missing_periods,json=missingPeriods,proto3" json:"missing_periods,omitempty"` - Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ExchangeName string `protobuf:"bytes,1,opt,name=exchange_name,json=exchangeName,proto3" json:"exchange_name,omitempty"` + AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + MissingPeriods []string `protobuf:"bytes,4,rep,name=missing_periods,json=missingPeriods,proto3" json:"missing_periods,omitempty"` + Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FindMissingIntervalsResponse) Reset() { *x = FindMissingIntervalsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[148] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[148] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindMissingIntervalsResponse) String() string { @@ -9319,7 +8888,7 @@ func (*FindMissingIntervalsResponse) ProtoMessage() {} func (x *FindMissingIntervalsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[148] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9370,21 +8939,18 @@ func (x *FindMissingIntervalsResponse) GetStatus() string { } type SetExchangeTradeProcessingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetExchangeTradeProcessingRequest) Reset() { *x = SetExchangeTradeProcessingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[149] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetExchangeTradeProcessingRequest) String() string { @@ -9395,7 +8961,7 @@ func (*SetExchangeTradeProcessingRequest) ProtoMessage() {} func (x *SetExchangeTradeProcessingRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[149] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9425,38 +8991,35 @@ func (x *SetExchangeTradeProcessingRequest) GetStatus() bool { } type UpsertDataHistoryJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` - Exchange string `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,4,opt,name=pair,proto3" json:"pair,omitempty"` - StartDate string `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` - EndDate string `protobuf:"bytes,6,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` - Interval int64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` - RequestSizeLimit int64 `protobuf:"varint,8,opt,name=request_size_limit,json=requestSizeLimit,proto3" json:"request_size_limit,omitempty"` - DataType int64 `protobuf:"varint,9,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` - MaxRetryAttempts int64 `protobuf:"varint,10,opt,name=max_retry_attempts,json=maxRetryAttempts,proto3" json:"max_retry_attempts,omitempty"` - BatchSize int64 `protobuf:"varint,11,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"` - InsertOnly bool `protobuf:"varint,12,opt,name=insert_only,json=insertOnly,proto3" json:"insert_only,omitempty"` - ConversionInterval int64 `protobuf:"varint,13,opt,name=conversion_interval,json=conversionInterval,proto3" json:"conversion_interval,omitempty"` - OverwriteExistingData bool `protobuf:"varint,14,opt,name=overwrite_existing_data,json=overwriteExistingData,proto3" json:"overwrite_existing_data,omitempty"` - PrerequisiteJobNickname string `protobuf:"bytes,15,opt,name=prerequisite_job_nickname,json=prerequisiteJobNickname,proto3" json:"prerequisite_job_nickname,omitempty"` - DecimalPlaceComparison int64 `protobuf:"varint,16,opt,name=decimal_place_comparison,json=decimalPlaceComparison,proto3" json:"decimal_place_comparison,omitempty"` - SecondaryExchangeName string `protobuf:"bytes,17,opt,name=secondary_exchange_name,json=secondaryExchangeName,proto3" json:"secondary_exchange_name,omitempty"` - IssueTolerancePercentage float64 `protobuf:"fixed64,18,opt,name=issue_tolerance_percentage,json=issueTolerancePercentage,proto3" json:"issue_tolerance_percentage,omitempty"` - ReplaceOnIssue bool `protobuf:"varint,19,opt,name=replace_on_issue,json=replaceOnIssue,proto3" json:"replace_on_issue,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` + Exchange string `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,4,opt,name=pair,proto3" json:"pair,omitempty"` + StartDate string `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + EndDate string `protobuf:"bytes,6,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` + Interval int64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` + RequestSizeLimit uint64 `protobuf:"varint,8,opt,name=request_size_limit,json=requestSizeLimit,proto3" json:"request_size_limit,omitempty"` + DataType int64 `protobuf:"varint,9,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` + MaxRetryAttempts uint64 `protobuf:"varint,10,opt,name=max_retry_attempts,json=maxRetryAttempts,proto3" json:"max_retry_attempts,omitempty"` + BatchSize uint64 `protobuf:"varint,11,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"` + InsertOnly bool `protobuf:"varint,12,opt,name=insert_only,json=insertOnly,proto3" json:"insert_only,omitempty"` + ConversionInterval int64 `protobuf:"varint,13,opt,name=conversion_interval,json=conversionInterval,proto3" json:"conversion_interval,omitempty"` + OverwriteExistingData bool `protobuf:"varint,14,opt,name=overwrite_existing_data,json=overwriteExistingData,proto3" json:"overwrite_existing_data,omitempty"` + PrerequisiteJobNickname string `protobuf:"bytes,15,opt,name=prerequisite_job_nickname,json=prerequisiteJobNickname,proto3" json:"prerequisite_job_nickname,omitempty"` + DecimalPlaceComparison uint64 `protobuf:"varint,16,opt,name=decimal_place_comparison,json=decimalPlaceComparison,proto3" json:"decimal_place_comparison,omitempty"` + SecondaryExchangeName string `protobuf:"bytes,17,opt,name=secondary_exchange_name,json=secondaryExchangeName,proto3" json:"secondary_exchange_name,omitempty"` + IssueTolerancePercentage float64 `protobuf:"fixed64,18,opt,name=issue_tolerance_percentage,json=issueTolerancePercentage,proto3" json:"issue_tolerance_percentage,omitempty"` + ReplaceOnIssue bool `protobuf:"varint,19,opt,name=replace_on_issue,json=replaceOnIssue,proto3" json:"replace_on_issue,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpsertDataHistoryJobRequest) Reset() { *x = UpsertDataHistoryJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[150] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[150] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpsertDataHistoryJobRequest) String() string { @@ -9467,7 +9030,7 @@ func (*UpsertDataHistoryJobRequest) ProtoMessage() {} func (x *UpsertDataHistoryJobRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[150] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9531,7 +9094,7 @@ func (x *UpsertDataHistoryJobRequest) GetInterval() int64 { return 0 } -func (x *UpsertDataHistoryJobRequest) GetRequestSizeLimit() int64 { +func (x *UpsertDataHistoryJobRequest) GetRequestSizeLimit() uint64 { if x != nil { return x.RequestSizeLimit } @@ -9545,14 +9108,14 @@ func (x *UpsertDataHistoryJobRequest) GetDataType() int64 { return 0 } -func (x *UpsertDataHistoryJobRequest) GetMaxRetryAttempts() int64 { +func (x *UpsertDataHistoryJobRequest) GetMaxRetryAttempts() uint64 { if x != nil { return x.MaxRetryAttempts } return 0 } -func (x *UpsertDataHistoryJobRequest) GetBatchSize() int64 { +func (x *UpsertDataHistoryJobRequest) GetBatchSize() uint64 { if x != nil { return x.BatchSize } @@ -9587,7 +9150,7 @@ func (x *UpsertDataHistoryJobRequest) GetPrerequisiteJobNickname() string { return "" } -func (x *UpsertDataHistoryJobRequest) GetDecimalPlaceComparison() int64 { +func (x *UpsertDataHistoryJobRequest) GetDecimalPlaceComparison() uint64 { if x != nil { return x.DecimalPlaceComparison } @@ -9616,20 +9179,17 @@ func (x *UpsertDataHistoryJobRequest) GetReplaceOnIssue() bool { } type InsertSequentialJobsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Jobs []*UpsertDataHistoryJobRequest `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` unknownFields protoimpl.UnknownFields - - Jobs []*UpsertDataHistoryJobRequest `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` + sizeCache protoimpl.SizeCache } func (x *InsertSequentialJobsRequest) Reset() { *x = InsertSequentialJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[151] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertSequentialJobsRequest) String() string { @@ -9640,7 +9200,7 @@ func (*InsertSequentialJobsRequest) ProtoMessage() {} func (x *InsertSequentialJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[151] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9663,20 +9223,17 @@ func (x *InsertSequentialJobsRequest) GetJobs() []*UpsertDataHistoryJobRequest { } type InsertSequentialJobsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Jobs []*UpsertDataHistoryJobResponse `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` unknownFields protoimpl.UnknownFields - - Jobs []*UpsertDataHistoryJobResponse `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` + sizeCache protoimpl.SizeCache } func (x *InsertSequentialJobsResponse) Reset() { *x = InsertSequentialJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[152] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertSequentialJobsResponse) String() string { @@ -9687,7 +9244,7 @@ func (*InsertSequentialJobsResponse) ProtoMessage() {} func (x *InsertSequentialJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[152] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9710,21 +9267,18 @@ func (x *InsertSequentialJobsResponse) GetJobs() []*UpsertDataHistoryJobResponse } type UpsertDataHistoryJobResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpsertDataHistoryJobResponse) Reset() { *x = UpsertDataHistoryJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[153] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[153] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpsertDataHistoryJobResponse) String() string { @@ -9735,7 +9289,7 @@ func (*UpsertDataHistoryJobResponse) ProtoMessage() {} func (x *UpsertDataHistoryJobResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[153] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9765,22 +9319,19 @@ func (x *UpsertDataHistoryJobResponse) GetJobId() string { } type GetDataHistoryJobDetailsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` + FullDetails bool `protobuf:"varint,3,opt,name=full_details,json=fullDetails,proto3" json:"full_details,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` - FullDetails bool `protobuf:"varint,3,opt,name=full_details,json=fullDetails,proto3" json:"full_details,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetDataHistoryJobDetailsRequest) Reset() { *x = GetDataHistoryJobDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[154] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[154] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataHistoryJobDetailsRequest) String() string { @@ -9791,7 +9342,7 @@ func (*GetDataHistoryJobDetailsRequest) ProtoMessage() {} func (x *GetDataHistoryJobDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[154] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9828,10 +9379,7 @@ func (x *GetDataHistoryJobDetailsRequest) GetFullDetails() bool { } type DataHistoryJob struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` Exchange string `protobuf:"bytes,3,opt,name=exchange,proto3" json:"exchange,omitempty"` @@ -9840,29 +9388,29 @@ type DataHistoryJob struct { StartDate string `protobuf:"bytes,6,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` EndDate string `protobuf:"bytes,7,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` Interval int64 `protobuf:"varint,8,opt,name=interval,proto3" json:"interval,omitempty"` - RequestSizeLimit int64 `protobuf:"varint,9,opt,name=request_size_limit,json=requestSizeLimit,proto3" json:"request_size_limit,omitempty"` - MaxRetryAttempts int64 `protobuf:"varint,10,opt,name=max_retry_attempts,json=maxRetryAttempts,proto3" json:"max_retry_attempts,omitempty"` - BatchSize int64 `protobuf:"varint,11,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"` + RequestSizeLimit uint64 `protobuf:"varint,9,opt,name=request_size_limit,json=requestSizeLimit,proto3" json:"request_size_limit,omitempty"` + MaxRetryAttempts uint64 `protobuf:"varint,10,opt,name=max_retry_attempts,json=maxRetryAttempts,proto3" json:"max_retry_attempts,omitempty"` + BatchSize uint64 `protobuf:"varint,11,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"` Status string `protobuf:"bytes,12,opt,name=status,proto3" json:"status,omitempty"` DataType string `protobuf:"bytes,13,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` ConversionInterval int64 `protobuf:"varint,14,opt,name=conversion_interval,json=conversionInterval,proto3" json:"conversion_interval,omitempty"` OverwriteExistingData bool `protobuf:"varint,15,opt,name=overwrite_existing_data,json=overwriteExistingData,proto3" json:"overwrite_existing_data,omitempty"` PrerequisiteJobNickname string `protobuf:"bytes,16,opt,name=prerequisite_job_nickname,json=prerequisiteJobNickname,proto3" json:"prerequisite_job_nickname,omitempty"` - DecimalPlaceComparison int64 `protobuf:"varint,17,opt,name=decimal_place_comparison,json=decimalPlaceComparison,proto3" json:"decimal_place_comparison,omitempty"` + DecimalPlaceComparison uint64 `protobuf:"varint,17,opt,name=decimal_place_comparison,json=decimalPlaceComparison,proto3" json:"decimal_place_comparison,omitempty"` SecondaryExchangeName string `protobuf:"bytes,18,opt,name=secondary_exchange_name,json=secondaryExchangeName,proto3" json:"secondary_exchange_name,omitempty"` IssueTolerancePercentage float64 `protobuf:"fixed64,19,opt,name=issue_tolerance_percentage,json=issueTolerancePercentage,proto3" json:"issue_tolerance_percentage,omitempty"` ReplaceOnIssue bool `protobuf:"varint,20,opt,name=replace_on_issue,json=replaceOnIssue,proto3" json:"replace_on_issue,omitempty"` JobResults []*DataHistoryJobResult `protobuf:"bytes,21,rep,name=job_results,json=jobResults,proto3" json:"job_results,omitempty"` ResultSummaries []string `protobuf:"bytes,22,rep,name=result_summaries,json=resultSummaries,proto3" json:"result_summaries,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DataHistoryJob) Reset() { *x = DataHistoryJob{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[155] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataHistoryJob) String() string { @@ -9873,7 +9421,7 @@ func (*DataHistoryJob) ProtoMessage() {} func (x *DataHistoryJob) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[155] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9944,21 +9492,21 @@ func (x *DataHistoryJob) GetInterval() int64 { return 0 } -func (x *DataHistoryJob) GetRequestSizeLimit() int64 { +func (x *DataHistoryJob) GetRequestSizeLimit() uint64 { if x != nil { return x.RequestSizeLimit } return 0 } -func (x *DataHistoryJob) GetMaxRetryAttempts() int64 { +func (x *DataHistoryJob) GetMaxRetryAttempts() uint64 { if x != nil { return x.MaxRetryAttempts } return 0 } -func (x *DataHistoryJob) GetBatchSize() int64 { +func (x *DataHistoryJob) GetBatchSize() uint64 { if x != nil { return x.BatchSize } @@ -10000,7 +9548,7 @@ func (x *DataHistoryJob) GetPrerequisiteJobNickname() string { return "" } -func (x *DataHistoryJob) GetDecimalPlaceComparison() int64 { +func (x *DataHistoryJob) GetDecimalPlaceComparison() uint64 { if x != nil { return x.DecimalPlaceComparison } @@ -10043,24 +9591,21 @@ func (x *DataHistoryJob) GetResultSummaries() []string { } type DataHistoryJobResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + StartDate string `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + EndDate string `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` + HasData bool `protobuf:"varint,3,opt,name=has_data,json=hasData,proto3" json:"has_data,omitempty"` + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` + RunDate string `protobuf:"bytes,5,opt,name=run_date,json=runDate,proto3" json:"run_date,omitempty"` unknownFields protoimpl.UnknownFields - - StartDate string `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` - EndDate string `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` - HasData bool `protobuf:"varint,3,opt,name=has_data,json=hasData,proto3" json:"has_data,omitempty"` - Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` - RunDate string `protobuf:"bytes,5,opt,name=run_date,json=runDate,proto3" json:"run_date,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DataHistoryJobResult) Reset() { *x = DataHistoryJobResult{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[156] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataHistoryJobResult) String() string { @@ -10071,7 +9616,7 @@ func (*DataHistoryJobResult) ProtoMessage() {} func (x *DataHistoryJobResult) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[156] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10122,20 +9667,17 @@ func (x *DataHistoryJobResult) GetRunDate() string { } type DataHistoryJobs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Results []*DataHistoryJob `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` unknownFields protoimpl.UnknownFields - - Results []*DataHistoryJob `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DataHistoryJobs) Reset() { *x = DataHistoryJobs{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[157] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataHistoryJobs) String() string { @@ -10146,7 +9688,7 @@ func (*DataHistoryJobs) ProtoMessage() {} func (x *DataHistoryJobs) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[157] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10169,21 +9711,18 @@ func (x *DataHistoryJobs) GetResults() []*DataHistoryJob { } type GetDataHistoryJobsBetweenRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + StartDate string `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + EndDate string `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` unknownFields protoimpl.UnknownFields - - StartDate string `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` - EndDate string `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetDataHistoryJobsBetweenRequest) Reset() { *x = GetDataHistoryJobsBetweenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[158] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataHistoryJobsBetweenRequest) String() string { @@ -10194,7 +9733,7 @@ func (*GetDataHistoryJobsBetweenRequest) ProtoMessage() {} func (x *GetDataHistoryJobsBetweenRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[158] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10224,22 +9763,19 @@ func (x *GetDataHistoryJobsBetweenRequest) GetEndDate() string { } type SetDataHistoryJobStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` + Status int64 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` - Status int64 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetDataHistoryJobStatusRequest) Reset() { *x = SetDataHistoryJobStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[159] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDataHistoryJobStatusRequest) String() string { @@ -10250,7 +9786,7 @@ func (*SetDataHistoryJobStatusRequest) ProtoMessage() {} func (x *SetDataHistoryJobStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[159] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10287,21 +9823,18 @@ func (x *SetDataHistoryJobStatusRequest) GetStatus() int64 { } type UpdateDataHistoryJobPrerequisiteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` - PrerequisiteJobNickname string `protobuf:"bytes,2,opt,name=prerequisite_job_nickname,json=prerequisiteJobNickname,proto3" json:"prerequisite_job_nickname,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` + PrerequisiteJobNickname string `protobuf:"bytes,2,opt,name=prerequisite_job_nickname,json=prerequisiteJobNickname,proto3" json:"prerequisite_job_nickname,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateDataHistoryJobPrerequisiteRequest) Reset() { *x = UpdateDataHistoryJobPrerequisiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[160] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[160] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataHistoryJobPrerequisiteRequest) String() string { @@ -10312,7 +9845,7 @@ func (*UpdateDataHistoryJobPrerequisiteRequest) ProtoMessage() {} func (x *UpdateDataHistoryJobPrerequisiteRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[160] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10342,25 +9875,22 @@ func (x *UpdateDataHistoryJobPrerequisiteRequest) GetPrerequisiteJobNickname() s } type ModifyOrderRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Asset string `protobuf:"bytes,4,opt,name=asset,proto3" json:"asset,omitempty"` + Amount float64 `protobuf:"fixed64,5,opt,name=amount,proto3" json:"amount,omitempty"` + Price float64 `protobuf:"fixed64,6,opt,name=price,proto3" json:"price,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Asset string `protobuf:"bytes,4,opt,name=asset,proto3" json:"asset,omitempty"` - Amount float64 `protobuf:"fixed64,5,opt,name=amount,proto3" json:"amount,omitempty"` - Price float64 `protobuf:"fixed64,6,opt,name=price,proto3" json:"price,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ModifyOrderRequest) Reset() { *x = ModifyOrderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[161] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[161] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyOrderRequest) String() string { @@ -10371,7 +9901,7 @@ func (*ModifyOrderRequest) ProtoMessage() {} func (x *ModifyOrderRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[161] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10429,20 +9959,17 @@ func (x *ModifyOrderRequest) GetPrice() float64 { } type ModifyOrderResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ModifiedOrderId string `protobuf:"bytes,1,opt,name=modified_order_id,json=modifiedOrderId,proto3" json:"modified_order_id,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ModifiedOrderId string `protobuf:"bytes,1,opt,name=modified_order_id,json=modifiedOrderId,proto3" json:"modified_order_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ModifyOrderResponse) Reset() { *x = ModifyOrderResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[162] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[162] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyOrderResponse) String() string { @@ -10453,7 +9980,7 @@ func (*ModifyOrderResponse) ProtoMessage() {} func (x *ModifyOrderResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[162] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10476,20 +10003,17 @@ func (x *ModifyOrderResponse) GetModifiedOrderId() string { } type CurrencyStateGetAllRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CurrencyStateGetAllRequest) Reset() { *x = CurrencyStateGetAllRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[163] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[163] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CurrencyStateGetAllRequest) String() string { @@ -10500,7 +10024,7 @@ func (*CurrencyStateGetAllRequest) ProtoMessage() {} func (x *CurrencyStateGetAllRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[163] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10523,22 +10047,19 @@ func (x *CurrencyStateGetAllRequest) GetExchange() string { } type CurrencyStateTradingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CurrencyStateTradingRequest) Reset() { *x = CurrencyStateTradingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CurrencyStateTradingRequest) String() string { @@ -10549,7 +10070,7 @@ func (*CurrencyStateTradingRequest) ProtoMessage() {} func (x *CurrencyStateTradingRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[164] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10586,22 +10107,19 @@ func (x *CurrencyStateTradingRequest) GetAsset() string { } type CurrencyStateTradingPairRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Pair string `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Pair string `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` - Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CurrencyStateTradingPairRequest) Reset() { *x = CurrencyStateTradingPairRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[165] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CurrencyStateTradingPairRequest) String() string { @@ -10612,7 +10130,7 @@ func (*CurrencyStateTradingPairRequest) ProtoMessage() {} func (x *CurrencyStateTradingPairRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[165] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10649,22 +10167,19 @@ func (x *CurrencyStateTradingPairRequest) GetAsset() string { } type CurrencyStateWithdrawRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CurrencyStateWithdrawRequest) Reset() { *x = CurrencyStateWithdrawRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[166] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CurrencyStateWithdrawRequest) String() string { @@ -10675,7 +10190,7 @@ func (*CurrencyStateWithdrawRequest) ProtoMessage() {} func (x *CurrencyStateWithdrawRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[166] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10712,22 +10227,19 @@ func (x *CurrencyStateWithdrawRequest) GetAsset() string { } type CurrencyStateDepositRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CurrencyStateDepositRequest) Reset() { *x = CurrencyStateDepositRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[167] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CurrencyStateDepositRequest) String() string { @@ -10738,7 +10250,7 @@ func (*CurrencyStateDepositRequest) ProtoMessage() {} func (x *CurrencyStateDepositRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[167] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10775,20 +10287,17 @@ func (x *CurrencyStateDepositRequest) GetAsset() string { } type CurrencyStateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CurrencyStates []*CurrencyState `protobuf:"bytes,1,rep,name=currency_states,json=currencyStates,proto3" json:"currency_states,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + CurrencyStates []*CurrencyState `protobuf:"bytes,1,rep,name=currency_states,json=currencyStates,proto3" json:"currency_states,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CurrencyStateResponse) Reset() { *x = CurrencyStateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[168] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[168] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CurrencyStateResponse) String() string { @@ -10799,7 +10308,7 @@ func (*CurrencyStateResponse) ProtoMessage() {} func (x *CurrencyStateResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[168] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10822,24 +10331,21 @@ func (x *CurrencyStateResponse) GetCurrencyStates() []*CurrencyState { } type CurrencyState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - WithdrawEnabled bool `protobuf:"varint,3,opt,name=withdraw_enabled,json=withdrawEnabled,proto3" json:"withdraw_enabled,omitempty"` - DepositEnabled bool `protobuf:"varint,4,opt,name=deposit_enabled,json=depositEnabled,proto3" json:"deposit_enabled,omitempty"` - TradingEnabled bool `protobuf:"varint,5,opt,name=trading_enabled,json=tradingEnabled,proto3" json:"trading_enabled,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + WithdrawEnabled bool `protobuf:"varint,3,opt,name=withdraw_enabled,json=withdrawEnabled,proto3" json:"withdraw_enabled,omitempty"` + DepositEnabled bool `protobuf:"varint,4,opt,name=deposit_enabled,json=depositEnabled,proto3" json:"deposit_enabled,omitempty"` + TradingEnabled bool `protobuf:"varint,5,opt,name=trading_enabled,json=tradingEnabled,proto3" json:"trading_enabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CurrencyState) Reset() { *x = CurrencyState{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[169] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[169] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CurrencyState) String() string { @@ -10850,7 +10356,7 @@ func (*CurrencyState) ProtoMessage() {} func (x *CurrencyState) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[169] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10901,22 +10407,19 @@ func (x *CurrencyState) GetTradingEnabled() bool { } type FundingRate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Date string `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"` + Rate string `protobuf:"bytes,2,opt,name=rate,proto3" json:"rate,omitempty"` + Payment string `protobuf:"bytes,3,opt,name=payment,proto3" json:"payment,omitempty"` unknownFields protoimpl.UnknownFields - - Date string `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"` - Rate string `protobuf:"bytes,2,opt,name=rate,proto3" json:"rate,omitempty"` - Payment string `protobuf:"bytes,3,opt,name=payment,proto3" json:"payment,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FundingRate) Reset() { *x = FundingRate{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[170] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[170] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FundingRate) String() string { @@ -10927,7 +10430,7 @@ func (*FundingRate) ProtoMessage() {} func (x *FundingRate) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[170] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10964,31 +10467,28 @@ func (x *FundingRate) GetPayment() string { } type FundingData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - PaymentCurrency string `protobuf:"bytes,4,opt,name=payment_currency,json=paymentCurrency,proto3" json:"payment_currency,omitempty"` - StartDate string `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` - EndDate string `protobuf:"bytes,6,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` - Rates []*FundingRate `protobuf:"bytes,7,rep,name=rates,proto3" json:"rates,omitempty"` - LatestRate *FundingRate `protobuf:"bytes,8,opt,name=latest_rate,json=latestRate,proto3" json:"latest_rate,omitempty"` - UpcomingRate *FundingRate `protobuf:"bytes,9,opt,name=upcoming_rate,json=upcomingRate,proto3" json:"upcoming_rate,omitempty"` - PaymentSum string `protobuf:"bytes,10,opt,name=payment_sum,json=paymentSum,proto3" json:"payment_sum,omitempty"` - PaymentMessage string `protobuf:"bytes,11,opt,name=payment_message,json=paymentMessage,proto3" json:"payment_message,omitempty"` - TimeOfNextRate string `protobuf:"bytes,12,opt,name=time_of_next_rate,json=timeOfNextRate,proto3" json:"time_of_next_rate,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + PaymentCurrency string `protobuf:"bytes,4,opt,name=payment_currency,json=paymentCurrency,proto3" json:"payment_currency,omitempty"` + StartDate string `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + EndDate string `protobuf:"bytes,6,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` + Rates []*FundingRate `protobuf:"bytes,7,rep,name=rates,proto3" json:"rates,omitempty"` + LatestRate *FundingRate `protobuf:"bytes,8,opt,name=latest_rate,json=latestRate,proto3" json:"latest_rate,omitempty"` + UpcomingRate *FundingRate `protobuf:"bytes,9,opt,name=upcoming_rate,json=upcomingRate,proto3" json:"upcoming_rate,omitempty"` + PaymentSum string `protobuf:"bytes,10,opt,name=payment_sum,json=paymentSum,proto3" json:"payment_sum,omitempty"` + PaymentMessage string `protobuf:"bytes,11,opt,name=payment_message,json=paymentMessage,proto3" json:"payment_message,omitempty"` + TimeOfNextRate string `protobuf:"bytes,12,opt,name=time_of_next_rate,json=timeOfNextRate,proto3" json:"time_of_next_rate,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FundingData) Reset() { *x = FundingData{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[171] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[171] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FundingData) String() string { @@ -10999,7 +10499,7 @@ func (*FundingData) ProtoMessage() {} func (x *FundingData) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[171] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11099,46 +10599,43 @@ func (x *FundingData) GetTimeOfNextRate() string { } type FuturesPositionStats struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MaintenanceMarginRequirement string `protobuf:"bytes,1,opt,name=maintenance_margin_requirement,json=maintenanceMarginRequirement,proto3" json:"maintenance_margin_requirement,omitempty"` - InitialMarginRequirement string `protobuf:"bytes,2,opt,name=initial_margin_requirement,json=initialMarginRequirement,proto3" json:"initial_margin_requirement,omitempty"` - EstimatedLiquidationPrice string `protobuf:"bytes,3,opt,name=estimated_liquidation_price,json=estimatedLiquidationPrice,proto3" json:"estimated_liquidation_price,omitempty"` - CollateralUsed string `protobuf:"bytes,4,opt,name=collateral_used,json=collateralUsed,proto3" json:"collateral_used,omitempty"` - MarkPrice string `protobuf:"bytes,5,opt,name=mark_price,json=markPrice,proto3" json:"mark_price,omitempty"` - CurrentSize string `protobuf:"bytes,6,opt,name=current_size,json=currentSize,proto3" json:"current_size,omitempty"` - ContractSize string `protobuf:"bytes,7,opt,name=contract_size,json=contractSize,proto3" json:"contract_size,omitempty"` - ContractMultiplier string `protobuf:"bytes,8,opt,name=contract_multiplier,json=contractMultiplier,proto3" json:"contract_multiplier,omitempty"` - ContractSettlementType string `protobuf:"bytes,9,opt,name=contract_settlement_type,json=contractSettlementType,proto3" json:"contract_settlement_type,omitempty"` - BreakEvenPrice string `protobuf:"bytes,10,opt,name=break_even_price,json=breakEvenPrice,proto3" json:"break_even_price,omitempty"` - AverageOpenPrice string `protobuf:"bytes,11,opt,name=average_open_price,json=averageOpenPrice,proto3" json:"average_open_price,omitempty"` - RecentPnl string `protobuf:"bytes,12,opt,name=recent_pnl,json=recentPnl,proto3" json:"recent_pnl,omitempty"` - MarginFraction string `protobuf:"bytes,13,opt,name=margin_fraction,json=marginFraction,proto3" json:"margin_fraction,omitempty"` - FreeCollateral string `protobuf:"bytes,14,opt,name=free_collateral,json=freeCollateral,proto3" json:"free_collateral,omitempty"` - TotalCollateral string `protobuf:"bytes,15,opt,name=total_collateral,json=totalCollateral,proto3" json:"total_collateral,omitempty"` - FrozenBalance string `protobuf:"bytes,16,opt,name=frozen_balance,json=frozenBalance,proto3" json:"frozen_balance,omitempty"` - EquityOfCurrency string `protobuf:"bytes,17,opt,name=equity_of_currency,json=equityOfCurrency,proto3" json:"equity_of_currency,omitempty"` - AvailableEquity string `protobuf:"bytes,18,opt,name=available_equity,json=availableEquity,proto3" json:"available_equity,omitempty"` - CashBalance string `protobuf:"bytes,19,opt,name=cash_balance,json=cashBalance,proto3" json:"cash_balance,omitempty"` - DiscountEquity string `protobuf:"bytes,20,opt,name=discount_equity,json=discountEquity,proto3" json:"discount_equity,omitempty"` - EquityUsd string `protobuf:"bytes,21,opt,name=equity_usd,json=equityUsd,proto3" json:"equity_usd,omitempty"` - IsolatedEquity string `protobuf:"bytes,22,opt,name=isolated_equity,json=isolatedEquity,proto3" json:"isolated_equity,omitempty"` - IsolatedLiabilities string `protobuf:"bytes,23,opt,name=isolated_liabilities,json=isolatedLiabilities,proto3" json:"isolated_liabilities,omitempty"` - IsolatedUpl string `protobuf:"bytes,24,opt,name=isolated_upl,json=isolatedUpl,proto3" json:"isolated_upl,omitempty"` - NotionalLeverage string `protobuf:"bytes,25,opt,name=notional_leverage,json=notionalLeverage,proto3" json:"notional_leverage,omitempty"` - TotalEquity string `protobuf:"bytes,26,opt,name=total_equity,json=totalEquity,proto3" json:"total_equity,omitempty"` - StrategyEquity string `protobuf:"bytes,27,opt,name=strategy_equity,json=strategyEquity,proto3" json:"strategy_equity,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + MaintenanceMarginRequirement string `protobuf:"bytes,1,opt,name=maintenance_margin_requirement,json=maintenanceMarginRequirement,proto3" json:"maintenance_margin_requirement,omitempty"` + InitialMarginRequirement string `protobuf:"bytes,2,opt,name=initial_margin_requirement,json=initialMarginRequirement,proto3" json:"initial_margin_requirement,omitempty"` + EstimatedLiquidationPrice string `protobuf:"bytes,3,opt,name=estimated_liquidation_price,json=estimatedLiquidationPrice,proto3" json:"estimated_liquidation_price,omitempty"` + CollateralUsed string `protobuf:"bytes,4,opt,name=collateral_used,json=collateralUsed,proto3" json:"collateral_used,omitempty"` + MarkPrice string `protobuf:"bytes,5,opt,name=mark_price,json=markPrice,proto3" json:"mark_price,omitempty"` + CurrentSize string `protobuf:"bytes,6,opt,name=current_size,json=currentSize,proto3" json:"current_size,omitempty"` + ContractSize string `protobuf:"bytes,7,opt,name=contract_size,json=contractSize,proto3" json:"contract_size,omitempty"` + ContractMultiplier string `protobuf:"bytes,8,opt,name=contract_multiplier,json=contractMultiplier,proto3" json:"contract_multiplier,omitempty"` + ContractSettlementType string `protobuf:"bytes,9,opt,name=contract_settlement_type,json=contractSettlementType,proto3" json:"contract_settlement_type,omitempty"` + BreakEvenPrice string `protobuf:"bytes,10,opt,name=break_even_price,json=breakEvenPrice,proto3" json:"break_even_price,omitempty"` + AverageOpenPrice string `protobuf:"bytes,11,opt,name=average_open_price,json=averageOpenPrice,proto3" json:"average_open_price,omitempty"` + RecentPnl string `protobuf:"bytes,12,opt,name=recent_pnl,json=recentPnl,proto3" json:"recent_pnl,omitempty"` + MarginFraction string `protobuf:"bytes,13,opt,name=margin_fraction,json=marginFraction,proto3" json:"margin_fraction,omitempty"` + FreeCollateral string `protobuf:"bytes,14,opt,name=free_collateral,json=freeCollateral,proto3" json:"free_collateral,omitempty"` + TotalCollateral string `protobuf:"bytes,15,opt,name=total_collateral,json=totalCollateral,proto3" json:"total_collateral,omitempty"` + FrozenBalance string `protobuf:"bytes,16,opt,name=frozen_balance,json=frozenBalance,proto3" json:"frozen_balance,omitempty"` + EquityOfCurrency string `protobuf:"bytes,17,opt,name=equity_of_currency,json=equityOfCurrency,proto3" json:"equity_of_currency,omitempty"` + AvailableEquity string `protobuf:"bytes,18,opt,name=available_equity,json=availableEquity,proto3" json:"available_equity,omitempty"` + CashBalance string `protobuf:"bytes,19,opt,name=cash_balance,json=cashBalance,proto3" json:"cash_balance,omitempty"` + DiscountEquity string `protobuf:"bytes,20,opt,name=discount_equity,json=discountEquity,proto3" json:"discount_equity,omitempty"` + EquityUsd string `protobuf:"bytes,21,opt,name=equity_usd,json=equityUsd,proto3" json:"equity_usd,omitempty"` + IsolatedEquity string `protobuf:"bytes,22,opt,name=isolated_equity,json=isolatedEquity,proto3" json:"isolated_equity,omitempty"` + IsolatedLiabilities string `protobuf:"bytes,23,opt,name=isolated_liabilities,json=isolatedLiabilities,proto3" json:"isolated_liabilities,omitempty"` + IsolatedUpl string `protobuf:"bytes,24,opt,name=isolated_upl,json=isolatedUpl,proto3" json:"isolated_upl,omitempty"` + NotionalLeverage string `protobuf:"bytes,25,opt,name=notional_leverage,json=notionalLeverage,proto3" json:"notional_leverage,omitempty"` + TotalEquity string `protobuf:"bytes,26,opt,name=total_equity,json=totalEquity,proto3" json:"total_equity,omitempty"` + StrategyEquity string `protobuf:"bytes,27,opt,name=strategy_equity,json=strategyEquity,proto3" json:"strategy_equity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FuturesPositionStats) Reset() { *x = FuturesPositionStats{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[172] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FuturesPositionStats) String() string { @@ -11149,7 +10646,7 @@ func (*FuturesPositionStats) ProtoMessage() {} func (x *FuturesPositionStats) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[172] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11354,38 +10851,35 @@ func (x *FuturesPositionStats) GetStrategyEquity() string { } type FuturePosition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` - OpeningDate string `protobuf:"bytes,5,opt,name=opening_date,json=openingDate,proto3" json:"opening_date,omitempty"` - OpeningDirection string `protobuf:"bytes,6,opt,name=opening_direction,json=openingDirection,proto3" json:"opening_direction,omitempty"` - OpeningPrice string `protobuf:"bytes,7,opt,name=opening_price,json=openingPrice,proto3" json:"opening_price,omitempty"` - OpeningSize string `protobuf:"bytes,8,opt,name=opening_size,json=openingSize,proto3" json:"opening_size,omitempty"` - CurrentDirection string `protobuf:"bytes,9,opt,name=current_direction,json=currentDirection,proto3" json:"current_direction,omitempty"` - CurrentPrice string `protobuf:"bytes,10,opt,name=current_price,json=currentPrice,proto3" json:"current_price,omitempty"` - CurrentSize string `protobuf:"bytes,11,opt,name=current_size,json=currentSize,proto3" json:"current_size,omitempty"` - UnrealisedPnl string `protobuf:"bytes,12,opt,name=unrealised_pnl,json=unrealisedPnl,proto3" json:"unrealised_pnl,omitempty"` - RealisedPnl string `protobuf:"bytes,13,opt,name=realised_pnl,json=realisedPnl,proto3" json:"realised_pnl,omitempty"` - ClosingDate string `protobuf:"bytes,14,opt,name=closing_date,json=closingDate,proto3" json:"closing_date,omitempty"` - OrderCount int64 `protobuf:"varint,15,opt,name=order_count,json=orderCount,proto3" json:"order_count,omitempty"` - ContractSettlementType string `protobuf:"bytes,16,opt,name=contract_settlement_type,json=contractSettlementType,proto3" json:"contract_settlement_type,omitempty"` - Orders []*OrderDetails `protobuf:"bytes,17,rep,name=orders,proto3" json:"orders,omitempty"` - PositionStats *FuturesPositionStats `protobuf:"bytes,18,opt,name=position_stats,json=positionStats,proto3" json:"position_stats,omitempty"` - FundingData *FundingData `protobuf:"bytes,19,opt,name=funding_data,json=fundingData,proto3" json:"funding_data,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` + OpeningDate string `protobuf:"bytes,5,opt,name=opening_date,json=openingDate,proto3" json:"opening_date,omitempty"` + OpeningDirection string `protobuf:"bytes,6,opt,name=opening_direction,json=openingDirection,proto3" json:"opening_direction,omitempty"` + OpeningPrice string `protobuf:"bytes,7,opt,name=opening_price,json=openingPrice,proto3" json:"opening_price,omitempty"` + OpeningSize string `protobuf:"bytes,8,opt,name=opening_size,json=openingSize,proto3" json:"opening_size,omitempty"` + CurrentDirection string `protobuf:"bytes,9,opt,name=current_direction,json=currentDirection,proto3" json:"current_direction,omitempty"` + CurrentPrice string `protobuf:"bytes,10,opt,name=current_price,json=currentPrice,proto3" json:"current_price,omitempty"` + CurrentSize string `protobuf:"bytes,11,opt,name=current_size,json=currentSize,proto3" json:"current_size,omitempty"` + UnrealisedPnl string `protobuf:"bytes,12,opt,name=unrealised_pnl,json=unrealisedPnl,proto3" json:"unrealised_pnl,omitempty"` + RealisedPnl string `protobuf:"bytes,13,opt,name=realised_pnl,json=realisedPnl,proto3" json:"realised_pnl,omitempty"` + ClosingDate string `protobuf:"bytes,14,opt,name=closing_date,json=closingDate,proto3" json:"closing_date,omitempty"` + OrderCount int64 `protobuf:"varint,15,opt,name=order_count,json=orderCount,proto3" json:"order_count,omitempty"` + ContractSettlementType string `protobuf:"bytes,16,opt,name=contract_settlement_type,json=contractSettlementType,proto3" json:"contract_settlement_type,omitempty"` + Orders []*OrderDetails `protobuf:"bytes,17,rep,name=orders,proto3" json:"orders,omitempty"` + PositionStats *FuturesPositionStats `protobuf:"bytes,18,opt,name=position_stats,json=positionStats,proto3" json:"position_stats,omitempty"` + FundingData *FundingData `protobuf:"bytes,19,opt,name=funding_data,json=fundingData,proto3" json:"funding_data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FuturePosition) Reset() { *x = FuturePosition{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[173] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[173] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FuturePosition) String() string { @@ -11396,7 +10890,7 @@ func (*FuturePosition) ProtoMessage() {} func (x *FuturePosition) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[173] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11545,26 +11039,23 @@ func (x *FuturePosition) GetFundingData() *FundingData { } type GetManagedPositionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - IncludeFullOrderData bool `protobuf:"varint,4,opt,name=include_full_order_data,json=includeFullOrderData,proto3" json:"include_full_order_data,omitempty"` - GetFundingPayments bool `protobuf:"varint,5,opt,name=get_funding_payments,json=getFundingPayments,proto3" json:"get_funding_payments,omitempty"` - IncludeFullFundingRates bool `protobuf:"varint,6,opt,name=include_full_funding_rates,json=includeFullFundingRates,proto3" json:"include_full_funding_rates,omitempty"` - IncludePredictedRate bool `protobuf:"varint,7,opt,name=include_predicted_rate,json=includePredictedRate,proto3" json:"include_predicted_rate,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + IncludeFullOrderData bool `protobuf:"varint,4,opt,name=include_full_order_data,json=includeFullOrderData,proto3" json:"include_full_order_data,omitempty"` + GetFundingPayments bool `protobuf:"varint,5,opt,name=get_funding_payments,json=getFundingPayments,proto3" json:"get_funding_payments,omitempty"` + IncludeFullFundingRates bool `protobuf:"varint,6,opt,name=include_full_funding_rates,json=includeFullFundingRates,proto3" json:"include_full_funding_rates,omitempty"` + IncludePredictedRate bool `protobuf:"varint,7,opt,name=include_predicted_rate,json=includePredictedRate,proto3" json:"include_predicted_rate,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetManagedPositionRequest) Reset() { *x = GetManagedPositionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[174] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[174] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetManagedPositionRequest) String() string { @@ -11575,7 +11066,7 @@ func (*GetManagedPositionRequest) ProtoMessage() {} func (x *GetManagedPositionRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[174] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11640,23 +11131,20 @@ func (x *GetManagedPositionRequest) GetIncludePredictedRate() bool { } type GetAllManagedPositionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IncludeFullOrderData bool `protobuf:"varint,1,opt,name=include_full_order_data,json=includeFullOrderData,proto3" json:"include_full_order_data,omitempty"` - GetFundingPayments bool `protobuf:"varint,2,opt,name=get_funding_payments,json=getFundingPayments,proto3" json:"get_funding_payments,omitempty"` - IncludeFullFundingRates bool `protobuf:"varint,3,opt,name=include_full_funding_rates,json=includeFullFundingRates,proto3" json:"include_full_funding_rates,omitempty"` - IncludePredictedRate bool `protobuf:"varint,4,opt,name=include_predicted_rate,json=includePredictedRate,proto3" json:"include_predicted_rate,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + IncludeFullOrderData bool `protobuf:"varint,1,opt,name=include_full_order_data,json=includeFullOrderData,proto3" json:"include_full_order_data,omitempty"` + GetFundingPayments bool `protobuf:"varint,2,opt,name=get_funding_payments,json=getFundingPayments,proto3" json:"get_funding_payments,omitempty"` + IncludeFullFundingRates bool `protobuf:"varint,3,opt,name=include_full_funding_rates,json=includeFullFundingRates,proto3" json:"include_full_funding_rates,omitempty"` + IncludePredictedRate bool `protobuf:"varint,4,opt,name=include_predicted_rate,json=includePredictedRate,proto3" json:"include_predicted_rate,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetAllManagedPositionsRequest) Reset() { *x = GetAllManagedPositionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[175] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAllManagedPositionsRequest) String() string { @@ -11667,7 +11155,7 @@ func (*GetAllManagedPositionsRequest) ProtoMessage() {} func (x *GetAllManagedPositionsRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[175] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11711,20 +11199,17 @@ func (x *GetAllManagedPositionsRequest) GetIncludePredictedRate() bool { } type GetManagedPositionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Positions []*FuturePosition `protobuf:"bytes,1,rep,name=positions,proto3" json:"positions,omitempty"` unknownFields protoimpl.UnknownFields - - Positions []*FuturePosition `protobuf:"bytes,1,rep,name=positions,proto3" json:"positions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetManagedPositionsResponse) Reset() { *x = GetManagedPositionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[176] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[176] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetManagedPositionsResponse) String() string { @@ -11735,7 +11220,7 @@ func (*GetManagedPositionsResponse) ProtoMessage() {} func (x *GetManagedPositionsResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[176] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11758,23 +11243,20 @@ func (x *GetManagedPositionsResponse) GetPositions() []*FuturePosition { } type GetFuturesPositionsSummaryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetFuturesPositionsSummaryRequest) Reset() { *x = GetFuturesPositionsSummaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[177] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[177] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFuturesPositionsSummaryRequest) String() string { @@ -11785,7 +11267,7 @@ func (*GetFuturesPositionsSummaryRequest) ProtoMessage() {} func (x *GetFuturesPositionsSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[177] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11829,23 +11311,20 @@ func (x *GetFuturesPositionsSummaryRequest) GetUnderlyingPair() *CurrencyPair { } type GetFuturesPositionsSummaryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + PositionStats *FuturesPositionStats `protobuf:"bytes,4,opt,name=position_stats,json=positionStats,proto3" json:"position_stats,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - PositionStats *FuturesPositionStats `protobuf:"bytes,4,opt,name=position_stats,json=positionStats,proto3" json:"position_stats,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetFuturesPositionsSummaryResponse) Reset() { *x = GetFuturesPositionsSummaryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[178] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[178] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFuturesPositionsSummaryResponse) String() string { @@ -11856,7 +11335,7 @@ func (*GetFuturesPositionsSummaryResponse) ProtoMessage() {} func (x *GetFuturesPositionsSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[178] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11900,27 +11379,24 @@ func (x *GetFuturesPositionsSummaryResponse) GetPositionStats() *FuturesPosition } type GetFuturesPositionsOrdersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` - StartDate string `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` - EndDate string `protobuf:"bytes,6,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` - RespectOrderHistoryLimits bool `protobuf:"varint,7,opt,name=respect_order_history_limits,json=respectOrderHistoryLimits,proto3" json:"respect_order_history_limits,omitempty"` - SyncWithOrderManager bool `protobuf:"varint,8,opt,name=sync_with_order_manager,json=syncWithOrderManager,proto3" json:"sync_with_order_manager,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` + StartDate string `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + EndDate string `protobuf:"bytes,6,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` + RespectOrderHistoryLimits bool `protobuf:"varint,7,opt,name=respect_order_history_limits,json=respectOrderHistoryLimits,proto3" json:"respect_order_history_limits,omitempty"` + SyncWithOrderManager bool `protobuf:"varint,8,opt,name=sync_with_order_manager,json=syncWithOrderManager,proto3" json:"sync_with_order_manager,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetFuturesPositionsOrdersRequest) Reset() { *x = GetFuturesPositionsOrdersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[179] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[179] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFuturesPositionsOrdersRequest) String() string { @@ -11931,7 +11407,7 @@ func (*GetFuturesPositionsOrdersRequest) ProtoMessage() {} func (x *GetFuturesPositionsOrdersRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[179] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12003,20 +11479,17 @@ func (x *GetFuturesPositionsOrdersRequest) GetSyncWithOrderManager() bool { } type GetFuturesPositionsOrdersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Positions []*FuturePosition `protobuf:"bytes,6,rep,name=positions,proto3" json:"positions,omitempty"` unknownFields protoimpl.UnknownFields - - Positions []*FuturePosition `protobuf:"bytes,6,rep,name=positions,proto3" json:"positions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetFuturesPositionsOrdersResponse) Reset() { *x = GetFuturesPositionsOrdersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[180] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[180] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFuturesPositionsOrdersResponse) String() string { @@ -12027,7 +11500,7 @@ func (*GetFuturesPositionsOrdersResponse) ProtoMessage() {} func (x *GetFuturesPositionsOrdersResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[180] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12050,21 +11523,18 @@ func (x *GetFuturesPositionsOrdersResponse) GetPositions() []*FuturePosition { } type GetCollateralModeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetCollateralModeRequest) Reset() { *x = GetCollateralModeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[181] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[181] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCollateralModeRequest) String() string { @@ -12075,7 +11545,7 @@ func (*GetCollateralModeRequest) ProtoMessage() {} func (x *GetCollateralModeRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[181] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12105,22 +11575,19 @@ func (x *GetCollateralModeRequest) GetAsset() string { } type GetCollateralModeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - CollateralMode string `protobuf:"bytes,3,opt,name=collateral_mode,json=collateralMode,proto3" json:"collateral_mode,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + CollateralMode string `protobuf:"bytes,3,opt,name=collateral_mode,json=collateralMode,proto3" json:"collateral_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetCollateralModeResponse) Reset() { *x = GetCollateralModeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[182] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[182] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCollateralModeResponse) String() string { @@ -12131,7 +11598,7 @@ func (*GetCollateralModeResponse) ProtoMessage() {} func (x *GetCollateralModeResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[182] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12168,22 +11635,19 @@ func (x *GetCollateralModeResponse) GetCollateralMode() string { } type SetCollateralModeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - CollateralMode string `protobuf:"bytes,3,opt,name=collateral_mode,json=collateralMode,proto3" json:"collateral_mode,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + CollateralMode string `protobuf:"bytes,3,opt,name=collateral_mode,json=collateralMode,proto3" json:"collateral_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetCollateralModeRequest) Reset() { *x = SetCollateralModeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[183] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[183] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetCollateralModeRequest) String() string { @@ -12194,7 +11658,7 @@ func (*SetCollateralModeRequest) ProtoMessage() {} func (x *SetCollateralModeRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[183] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12231,22 +11695,19 @@ func (x *SetCollateralModeRequest) GetCollateralMode() string { } type SetCollateralModeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Success bool `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Success bool `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetCollateralModeResponse) Reset() { *x = SetCollateralModeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[184] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[184] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetCollateralModeResponse) String() string { @@ -12257,7 +11718,7 @@ func (*SetCollateralModeResponse) ProtoMessage() {} func (x *SetCollateralModeResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[184] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12294,22 +11755,19 @@ func (x *SetCollateralModeResponse) GetSuccess() bool { } type GetMarginTypeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetMarginTypeRequest) Reset() { *x = GetMarginTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[185] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[185] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMarginTypeRequest) String() string { @@ -12320,7 +11778,7 @@ func (*GetMarginTypeRequest) ProtoMessage() {} func (x *GetMarginTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[185] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12357,23 +11815,20 @@ func (x *GetMarginTypeRequest) GetPair() *CurrencyPair { } type GetMarginTypeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + MarginType string `protobuf:"bytes,4,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - MarginType string `protobuf:"bytes,4,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetMarginTypeResponse) Reset() { *x = GetMarginTypeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[186] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[186] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMarginTypeResponse) String() string { @@ -12384,7 +11839,7 @@ func (*GetMarginTypeResponse) ProtoMessage() {} func (x *GetMarginTypeResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[186] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12428,26 +11883,23 @@ func (x *GetMarginTypeResponse) GetMarginType() string { } type ChangePositionMarginRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - MarginType string `protobuf:"bytes,4,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` - OriginalAllocatedMargin float64 `protobuf:"fixed64,5,opt,name=original_allocated_margin,json=originalAllocatedMargin,proto3" json:"original_allocated_margin,omitempty"` - NewAllocatedMargin float64 `protobuf:"fixed64,6,opt,name=new_allocated_margin,json=newAllocatedMargin,proto3" json:"new_allocated_margin,omitempty"` - MarginSide string `protobuf:"bytes,7,opt,name=margin_side,json=marginSide,proto3" json:"margin_side,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + MarginType string `protobuf:"bytes,4,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` + OriginalAllocatedMargin float64 `protobuf:"fixed64,5,opt,name=original_allocated_margin,json=originalAllocatedMargin,proto3" json:"original_allocated_margin,omitempty"` + NewAllocatedMargin float64 `protobuf:"fixed64,6,opt,name=new_allocated_margin,json=newAllocatedMargin,proto3" json:"new_allocated_margin,omitempty"` + MarginSide string `protobuf:"bytes,7,opt,name=margin_side,json=marginSide,proto3" json:"margin_side,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ChangePositionMarginRequest) Reset() { *x = ChangePositionMarginRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[187] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[187] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangePositionMarginRequest) String() string { @@ -12458,7 +11910,7 @@ func (*ChangePositionMarginRequest) ProtoMessage() {} func (x *ChangePositionMarginRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[187] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12523,25 +11975,22 @@ func (x *ChangePositionMarginRequest) GetMarginSide() string { } type ChangePositionMarginResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - MarginType string `protobuf:"bytes,4,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` - NewAllocatedMargin float64 `protobuf:"fixed64,5,opt,name=new_allocated_margin,json=newAllocatedMargin,proto3" json:"new_allocated_margin,omitempty"` - MarginSide string `protobuf:"bytes,6,opt,name=margin_side,json=marginSide,proto3" json:"margin_side,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + MarginType string `protobuf:"bytes,4,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` + NewAllocatedMargin float64 `protobuf:"fixed64,5,opt,name=new_allocated_margin,json=newAllocatedMargin,proto3" json:"new_allocated_margin,omitempty"` + MarginSide string `protobuf:"bytes,6,opt,name=margin_side,json=marginSide,proto3" json:"margin_side,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ChangePositionMarginResponse) Reset() { *x = ChangePositionMarginResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[188] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[188] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangePositionMarginResponse) String() string { @@ -12552,7 +12001,7 @@ func (*ChangePositionMarginResponse) ProtoMessage() {} func (x *ChangePositionMarginResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[188] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12610,23 +12059,20 @@ func (x *ChangePositionMarginResponse) GetMarginSide() string { } type SetMarginTypeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + MarginType string `protobuf:"bytes,4,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - MarginType string `protobuf:"bytes,4,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetMarginTypeRequest) Reset() { *x = SetMarginTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[189] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[189] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMarginTypeRequest) String() string { @@ -12637,7 +12083,7 @@ func (*SetMarginTypeRequest) ProtoMessage() {} func (x *SetMarginTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[189] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12681,23 +12127,20 @@ func (x *SetMarginTypeRequest) GetMarginType() string { } type SetMarginTypeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Success bool `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Success bool `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetMarginTypeResponse) Reset() { *x = SetMarginTypeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[190] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[190] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMarginTypeResponse) String() string { @@ -12708,7 +12151,7 @@ func (*SetMarginTypeResponse) ProtoMessage() {} func (x *SetMarginTypeResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[190] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12752,25 +12195,22 @@ func (x *SetMarginTypeResponse) GetSuccess() bool { } type GetLeverageRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` - MarginType string `protobuf:"bytes,5,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` - OrderSide string `protobuf:"bytes,6,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` + MarginType string `protobuf:"bytes,5,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` + OrderSide string `protobuf:"bytes,6,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetLeverageRequest) Reset() { *x = GetLeverageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[191] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[191] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLeverageRequest) String() string { @@ -12781,7 +12221,7 @@ func (*GetLeverageRequest) ProtoMessage() {} func (x *GetLeverageRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[191] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12839,26 +12279,23 @@ func (x *GetLeverageRequest) GetOrderSide() string { } type GetLeverageResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` - MarginType string `protobuf:"bytes,5,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` - Leverage float64 `protobuf:"fixed64,6,opt,name=leverage,proto3" json:"leverage,omitempty"` - OrderSide string `protobuf:"bytes,7,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` + MarginType string `protobuf:"bytes,5,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` + Leverage float64 `protobuf:"fixed64,6,opt,name=leverage,proto3" json:"leverage,omitempty"` + OrderSide string `protobuf:"bytes,7,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetLeverageResponse) Reset() { *x = GetLeverageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[192] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[192] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLeverageResponse) String() string { @@ -12869,7 +12306,7 @@ func (*GetLeverageResponse) ProtoMessage() {} func (x *GetLeverageResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[192] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12934,26 +12371,23 @@ func (x *GetLeverageResponse) GetOrderSide() string { } type SetLeverageRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` - MarginType string `protobuf:"bytes,5,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` - Leverage float64 `protobuf:"fixed64,6,opt,name=leverage,proto3" json:"leverage,omitempty"` - OrderSide string `protobuf:"bytes,7,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` + MarginType string `protobuf:"bytes,5,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` + Leverage float64 `protobuf:"fixed64,6,opt,name=leverage,proto3" json:"leverage,omitempty"` + OrderSide string `protobuf:"bytes,7,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetLeverageRequest) Reset() { *x = SetLeverageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[193] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[193] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLeverageRequest) String() string { @@ -12964,7 +12398,7 @@ func (*SetLeverageRequest) ProtoMessage() {} func (x *SetLeverageRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[193] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13029,26 +12463,23 @@ func (x *SetLeverageRequest) GetOrderSide() string { } type SetLeverageResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` - MarginType string `protobuf:"bytes,5,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` - OrderSide string `protobuf:"bytes,6,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` - Success bool `protobuf:"varint,7,opt,name=success,proto3" json:"success,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + UnderlyingPair *CurrencyPair `protobuf:"bytes,4,opt,name=underlying_pair,json=underlyingPair,proto3" json:"underlying_pair,omitempty"` + MarginType string `protobuf:"bytes,5,opt,name=margin_type,json=marginType,proto3" json:"margin_type,omitempty"` + OrderSide string `protobuf:"bytes,6,opt,name=order_side,json=orderSide,proto3" json:"order_side,omitempty"` + Success bool `protobuf:"varint,7,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetLeverageResponse) Reset() { *x = SetLeverageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[194] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[194] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLeverageResponse) String() string { @@ -13059,7 +12490,7 @@ func (*SetLeverageResponse) ProtoMessage() {} func (x *SetLeverageResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[194] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13124,24 +12555,21 @@ func (x *SetLeverageResponse) GetSuccess() bool { } type GetCollateralRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - IncludeBreakdown bool `protobuf:"varint,3,opt,name=include_breakdown,json=includeBreakdown,proto3" json:"include_breakdown,omitempty"` - CalculateOffline bool `protobuf:"varint,4,opt,name=calculate_offline,json=calculateOffline,proto3" json:"calculate_offline,omitempty"` - IncludeZeroValues bool `protobuf:"varint,5,opt,name=include_zero_values,json=includeZeroValues,proto3" json:"include_zero_values,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + IncludeBreakdown bool `protobuf:"varint,3,opt,name=include_breakdown,json=includeBreakdown,proto3" json:"include_breakdown,omitempty"` + CalculateOffline bool `protobuf:"varint,4,opt,name=calculate_offline,json=calculateOffline,proto3" json:"calculate_offline,omitempty"` + IncludeZeroValues bool `protobuf:"varint,5,opt,name=include_zero_values,json=includeZeroValues,proto3" json:"include_zero_values,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetCollateralRequest) Reset() { *x = GetCollateralRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[195] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[195] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCollateralRequest) String() string { @@ -13152,7 +12580,7 @@ func (*GetCollateralRequest) ProtoMessage() {} func (x *GetCollateralRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[195] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13203,10 +12631,7 @@ func (x *GetCollateralRequest) GetIncludeZeroValues() bool { } type GetCollateralResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` SubAccount string `protobuf:"bytes,1,opt,name=sub_account,json=subAccount,proto3" json:"sub_account,omitempty"` CollateralCurrency string `protobuf:"bytes,2,opt,name=collateral_currency,json=collateralCurrency,proto3" json:"collateral_currency,omitempty"` TotalValueOfPositiveSpotBalances string `protobuf:"bytes,3,opt,name=total_value_of_positive_spot_balances,json=totalValueOfPositiveSpotBalances,proto3" json:"total_value_of_positive_spot_balances,omitempty"` @@ -13218,15 +12643,15 @@ type GetCollateralResponse struct { UnrealisedPnl string `protobuf:"bytes,9,opt,name=unrealised_pnl,json=unrealisedPnl,proto3" json:"unrealised_pnl,omitempty"` CurrencyBreakdown []*CollateralForCurrency `protobuf:"bytes,10,rep,name=currency_breakdown,json=currencyBreakdown,proto3" json:"currency_breakdown,omitempty"` PositionBreakdown []*CollateralByPosition `protobuf:"bytes,11,rep,name=position_breakdown,json=positionBreakdown,proto3" json:"position_breakdown,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetCollateralResponse) Reset() { *x = GetCollateralResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[196] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[196] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCollateralResponse) String() string { @@ -13237,7 +12662,7 @@ func (*GetCollateralResponse) ProtoMessage() {} func (x *GetCollateralResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[196] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13330,10 +12755,7 @@ func (x *GetCollateralResponse) GetPositionBreakdown() []*CollateralByPosition { } type CollateralForCurrency struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` ExcludedFromCollateral bool `protobuf:"varint,2,opt,name=excluded_from_collateral,json=excludedFromCollateral,proto3" json:"excluded_from_collateral,omitempty"` TotalFunds string `protobuf:"bytes,3,opt,name=total_funds,json=totalFunds,proto3" json:"total_funds,omitempty"` @@ -13347,15 +12769,15 @@ type CollateralForCurrency struct { AdditionalCollateralUsed string `protobuf:"bytes,11,opt,name=additional_collateral_used,json=additionalCollateralUsed,proto3" json:"additional_collateral_used,omitempty"` UsedBreakdown *CollateralUsedBreakdown `protobuf:"bytes,12,opt,name=used_breakdown,json=usedBreakdown,proto3" json:"used_breakdown,omitempty"` Error string `protobuf:"bytes,13,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CollateralForCurrency) Reset() { *x = CollateralForCurrency{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[197] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[197] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollateralForCurrency) String() string { @@ -13366,7 +12788,7 @@ func (*CollateralForCurrency) ProtoMessage() {} func (x *CollateralForCurrency) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[197] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13473,26 +12895,23 @@ func (x *CollateralForCurrency) GetError() string { } type CollateralByPosition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` - Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` - OpenOrderSize string `protobuf:"bytes,3,opt,name=open_order_size,json=openOrderSize,proto3" json:"open_order_size,omitempty"` - PositionSize string `protobuf:"bytes,4,opt,name=position_size,json=positionSize,proto3" json:"position_size,omitempty"` - MarkPrice string `protobuf:"bytes,5,opt,name=mark_price,json=markPrice,proto3" json:"mark_price,omitempty"` - RequiredMargin string `protobuf:"bytes,6,opt,name=required_margin,json=requiredMargin,proto3" json:"required_margin,omitempty"` - TotalCollateralUsed string `protobuf:"bytes,7,opt,name=total_collateral_used,json=totalCollateralUsed,proto3" json:"total_collateral_used,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` + Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` + OpenOrderSize string `protobuf:"bytes,3,opt,name=open_order_size,json=openOrderSize,proto3" json:"open_order_size,omitempty"` + PositionSize string `protobuf:"bytes,4,opt,name=position_size,json=positionSize,proto3" json:"position_size,omitempty"` + MarkPrice string `protobuf:"bytes,5,opt,name=mark_price,json=markPrice,proto3" json:"mark_price,omitempty"` + RequiredMargin string `protobuf:"bytes,6,opt,name=required_margin,json=requiredMargin,proto3" json:"required_margin,omitempty"` + TotalCollateralUsed string `protobuf:"bytes,7,opt,name=total_collateral_used,json=totalCollateralUsed,proto3" json:"total_collateral_used,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CollateralByPosition) Reset() { *x = CollateralByPosition{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[198] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[198] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollateralByPosition) String() string { @@ -13503,7 +12922,7 @@ func (*CollateralByPosition) ProtoMessage() {} func (x *CollateralByPosition) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[198] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13568,27 +12987,24 @@ func (x *CollateralByPosition) GetTotalCollateralUsed() string { } type CollateralUsedBreakdown struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - LockedInStakes string `protobuf:"bytes,1,opt,name=locked_in_stakes,json=lockedInStakes,proto3" json:"locked_in_stakes,omitempty"` - LockedInNftBids string `protobuf:"bytes,2,opt,name=locked_in_nft_bids,json=lockedInNftBids,proto3" json:"locked_in_nft_bids,omitempty"` - LockedInFeeVoucher string `protobuf:"bytes,3,opt,name=locked_in_fee_voucher,json=lockedInFeeVoucher,proto3" json:"locked_in_fee_voucher,omitempty"` - LockedInSpotMarginFundingOffers string `protobuf:"bytes,4,opt,name=locked_in_spot_margin_funding_offers,json=lockedInSpotMarginFundingOffers,proto3" json:"locked_in_spot_margin_funding_offers,omitempty"` - LockedInSpotOrders string `protobuf:"bytes,5,opt,name=locked_in_spot_orders,json=lockedInSpotOrders,proto3" json:"locked_in_spot_orders,omitempty"` - LockedAsCollateral string `protobuf:"bytes,6,opt,name=locked_as_collateral,json=lockedAsCollateral,proto3" json:"locked_as_collateral,omitempty"` - UsedInFutures string `protobuf:"bytes,7,opt,name=used_in_futures,json=usedInFutures,proto3" json:"used_in_futures,omitempty"` - UsedInSpotMargin string `protobuf:"bytes,8,opt,name=used_in_spot_margin,json=usedInSpotMargin,proto3" json:"used_in_spot_margin,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + LockedInStakes string `protobuf:"bytes,1,opt,name=locked_in_stakes,json=lockedInStakes,proto3" json:"locked_in_stakes,omitempty"` + LockedInNftBids string `protobuf:"bytes,2,opt,name=locked_in_nft_bids,json=lockedInNftBids,proto3" json:"locked_in_nft_bids,omitempty"` + LockedInFeeVoucher string `protobuf:"bytes,3,opt,name=locked_in_fee_voucher,json=lockedInFeeVoucher,proto3" json:"locked_in_fee_voucher,omitempty"` + LockedInSpotMarginFundingOffers string `protobuf:"bytes,4,opt,name=locked_in_spot_margin_funding_offers,json=lockedInSpotMarginFundingOffers,proto3" json:"locked_in_spot_margin_funding_offers,omitempty"` + LockedInSpotOrders string `protobuf:"bytes,5,opt,name=locked_in_spot_orders,json=lockedInSpotOrders,proto3" json:"locked_in_spot_orders,omitempty"` + LockedAsCollateral string `protobuf:"bytes,6,opt,name=locked_as_collateral,json=lockedAsCollateral,proto3" json:"locked_as_collateral,omitempty"` + UsedInFutures string `protobuf:"bytes,7,opt,name=used_in_futures,json=usedInFutures,proto3" json:"used_in_futures,omitempty"` + UsedInSpotMargin string `protobuf:"bytes,8,opt,name=used_in_spot_margin,json=usedInSpotMargin,proto3" json:"used_in_spot_margin,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CollateralUsedBreakdown) Reset() { *x = CollateralUsedBreakdown{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[199] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[199] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollateralUsedBreakdown) String() string { @@ -13599,7 +13015,7 @@ func (*CollateralUsedBreakdown) ProtoMessage() {} func (x *CollateralUsedBreakdown) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[199] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13671,28 +13087,25 @@ func (x *CollateralUsedBreakdown) GetUsedInSpotMargin() string { } type GetFundingRatesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - StartDate string `protobuf:"bytes,4,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` - EndDate string `protobuf:"bytes,5,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` - PaymentCurrency string `protobuf:"bytes,6,opt,name=payment_currency,json=paymentCurrency,proto3" json:"payment_currency,omitempty"` - IncludePredicted bool `protobuf:"varint,7,opt,name=include_predicted,json=includePredicted,proto3" json:"include_predicted,omitempty"` - IncludePayments bool `protobuf:"varint,8,opt,name=include_payments,json=includePayments,proto3" json:"include_payments,omitempty"` - RespectHistoryLimits bool `protobuf:"varint,9,opt,name=respect_history_limits,json=respectHistoryLimits,proto3" json:"respect_history_limits,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + StartDate string `protobuf:"bytes,4,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + EndDate string `protobuf:"bytes,5,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` + PaymentCurrency string `protobuf:"bytes,6,opt,name=payment_currency,json=paymentCurrency,proto3" json:"payment_currency,omitempty"` + IncludePredicted bool `protobuf:"varint,7,opt,name=include_predicted,json=includePredicted,proto3" json:"include_predicted,omitempty"` + IncludePayments bool `protobuf:"varint,8,opt,name=include_payments,json=includePayments,proto3" json:"include_payments,omitempty"` + RespectHistoryLimits bool `protobuf:"varint,9,opt,name=respect_history_limits,json=respectHistoryLimits,proto3" json:"respect_history_limits,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetFundingRatesRequest) Reset() { *x = GetFundingRatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[200] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[200] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFundingRatesRequest) String() string { @@ -13703,7 +13116,7 @@ func (*GetFundingRatesRequest) ProtoMessage() {} func (x *GetFundingRatesRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[200] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13782,20 +13195,17 @@ func (x *GetFundingRatesRequest) GetRespectHistoryLimits() bool { } type GetFundingRatesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Rates *FundingData `protobuf:"bytes,1,opt,name=rates,proto3" json:"rates,omitempty"` unknownFields protoimpl.UnknownFields - - Rates *FundingData `protobuf:"bytes,1,opt,name=rates,proto3" json:"rates,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetFundingRatesResponse) Reset() { *x = GetFundingRatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[201] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[201] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFundingRatesResponse) String() string { @@ -13806,7 +13216,7 @@ func (*GetFundingRatesResponse) ProtoMessage() {} func (x *GetFundingRatesResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[201] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13829,23 +13239,20 @@ func (x *GetFundingRatesResponse) GetRates() *FundingData { } type GetLatestFundingRateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - IncludePredicted bool `protobuf:"varint,4,opt,name=include_predicted,json=includePredicted,proto3" json:"include_predicted,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + IncludePredicted bool `protobuf:"varint,4,opt,name=include_predicted,json=includePredicted,proto3" json:"include_predicted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetLatestFundingRateRequest) Reset() { *x = GetLatestFundingRateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[202] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[202] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLatestFundingRateRequest) String() string { @@ -13856,7 +13263,7 @@ func (*GetLatestFundingRateRequest) ProtoMessage() {} func (x *GetLatestFundingRateRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[202] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13900,20 +13307,17 @@ func (x *GetLatestFundingRateRequest) GetIncludePredicted() bool { } type GetLatestFundingRateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Rate *FundingData `protobuf:"bytes,1,opt,name=rate,proto3" json:"rate,omitempty"` unknownFields protoimpl.UnknownFields - - Rate *FundingData `protobuf:"bytes,1,opt,name=rate,proto3" json:"rate,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetLatestFundingRateResponse) Reset() { *x = GetLatestFundingRateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[203] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[203] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLatestFundingRateResponse) String() string { @@ -13924,7 +13328,7 @@ func (*GetLatestFundingRateResponse) ProtoMessage() {} func (x *GetLatestFundingRateResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[203] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13947,18 +13351,16 @@ func (x *GetLatestFundingRateResponse) GetRate() *FundingData { } type ShutdownRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ShutdownRequest) Reset() { *x = ShutdownRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[204] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[204] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShutdownRequest) String() string { @@ -13969,7 +13371,7 @@ func (*ShutdownRequest) ProtoMessage() {} func (x *ShutdownRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[204] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13985,18 +13387,16 @@ func (*ShutdownRequest) Descriptor() ([]byte, []int) { } type ShutdownResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ShutdownResponse) Reset() { *x = ShutdownResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[205] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[205] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShutdownResponse) String() string { @@ -14007,7 +13407,7 @@ func (*ShutdownResponse) ProtoMessage() {} func (x *ShutdownResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[205] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14023,10 +13423,7 @@ func (*ShutdownResponse) Descriptor() ([]byte, []int) { } type GetTechnicalAnalysisRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` AssetType string `protobuf:"bytes,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` @@ -14043,15 +13440,15 @@ type GetTechnicalAnalysisRequest struct { OtherExchange string `protobuf:"bytes,14,opt,name=other_exchange,json=otherExchange,proto3" json:"other_exchange,omitempty"` OtherPair *CurrencyPair `protobuf:"bytes,15,opt,name=other_pair,json=otherPair,proto3" json:"other_pair,omitempty"` OtherAssetType string `protobuf:"bytes,16,opt,name=other_asset_type,json=otherAssetType,proto3" json:"other_asset_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetTechnicalAnalysisRequest) Reset() { *x = GetTechnicalAnalysisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[206] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[206] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTechnicalAnalysisRequest) String() string { @@ -14062,7 +13459,7 @@ func (*GetTechnicalAnalysisRequest) ProtoMessage() {} func (x *GetTechnicalAnalysisRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[206] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14190,20 +13587,17 @@ func (x *GetTechnicalAnalysisRequest) GetOtherAssetType() string { } type ListOfSignals struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Signals []float64 `protobuf:"fixed64,1,rep,packed,name=signals,proto3" json:"signals,omitempty"` unknownFields protoimpl.UnknownFields - - Signals []float64 `protobuf:"fixed64,1,rep,packed,name=signals,proto3" json:"signals,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ListOfSignals) Reset() { *x = ListOfSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[207] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[207] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOfSignals) String() string { @@ -14214,7 +13608,7 @@ func (*ListOfSignals) ProtoMessage() {} func (x *ListOfSignals) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[207] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14237,20 +13631,17 @@ func (x *ListOfSignals) GetSignals() []float64 { } type GetTechnicalAnalysisResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Signals map[string]*ListOfSignals `protobuf:"bytes,1,rep,name=signals,proto3" json:"signals,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Signals map[string]*ListOfSignals `protobuf:"bytes,1,rep,name=signals,proto3" json:"signals,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *GetTechnicalAnalysisResponse) Reset() { *x = GetTechnicalAnalysisResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[208] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[208] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTechnicalAnalysisResponse) String() string { @@ -14261,7 +13652,7 @@ func (*GetTechnicalAnalysisResponse) ProtoMessage() {} func (x *GetTechnicalAnalysisResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[208] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14284,32 +13675,29 @@ func (x *GetTechnicalAnalysisResponse) GetSignals() map[string]*ListOfSignals { } type GetMarginRatesHistoryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` - StartDate string `protobuf:"bytes,4,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` - EndDate string `protobuf:"bytes,5,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` - GetPredictedRate bool `protobuf:"varint,6,opt,name=get_predicted_rate,json=getPredictedRate,proto3" json:"get_predicted_rate,omitempty"` - GetLendingPayments bool `protobuf:"varint,7,opt,name=get_lending_payments,json=getLendingPayments,proto3" json:"get_lending_payments,omitempty"` - GetBorrowRates bool `protobuf:"varint,8,opt,name=get_borrow_rates,json=getBorrowRates,proto3" json:"get_borrow_rates,omitempty"` - GetBorrowCosts bool `protobuf:"varint,9,opt,name=get_borrow_costs,json=getBorrowCosts,proto3" json:"get_borrow_costs,omitempty"` - IncludeAllRates bool `protobuf:"varint,10,opt,name=include_all_rates,json=includeAllRates,proto3" json:"include_all_rates,omitempty"` - CalculateOffline bool `protobuf:"varint,11,opt,name=calculate_offline,json=calculateOffline,proto3" json:"calculate_offline,omitempty"` - TakerFeeRate string `protobuf:"bytes,12,opt,name=taker_fee_rate,json=takerFeeRate,proto3" json:"taker_fee_rate,omitempty"` - Rates []*MarginRate `protobuf:"bytes,13,rep,name=rates,proto3" json:"rates,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` + StartDate string `protobuf:"bytes,4,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + EndDate string `protobuf:"bytes,5,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` + GetPredictedRate bool `protobuf:"varint,6,opt,name=get_predicted_rate,json=getPredictedRate,proto3" json:"get_predicted_rate,omitempty"` + GetLendingPayments bool `protobuf:"varint,7,opt,name=get_lending_payments,json=getLendingPayments,proto3" json:"get_lending_payments,omitempty"` + GetBorrowRates bool `protobuf:"varint,8,opt,name=get_borrow_rates,json=getBorrowRates,proto3" json:"get_borrow_rates,omitempty"` + GetBorrowCosts bool `protobuf:"varint,9,opt,name=get_borrow_costs,json=getBorrowCosts,proto3" json:"get_borrow_costs,omitempty"` + IncludeAllRates bool `protobuf:"varint,10,opt,name=include_all_rates,json=includeAllRates,proto3" json:"include_all_rates,omitempty"` + CalculateOffline bool `protobuf:"varint,11,opt,name=calculate_offline,json=calculateOffline,proto3" json:"calculate_offline,omitempty"` + TakerFeeRate string `protobuf:"bytes,12,opt,name=taker_fee_rate,json=takerFeeRate,proto3" json:"taker_fee_rate,omitempty"` + Rates []*MarginRate `protobuf:"bytes,13,rep,name=rates,proto3" json:"rates,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetMarginRatesHistoryRequest) Reset() { *x = GetMarginRatesHistoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[209] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[209] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMarginRatesHistoryRequest) String() string { @@ -14320,7 +13708,7 @@ func (*GetMarginRatesHistoryRequest) ProtoMessage() {} func (x *GetMarginRatesHistoryRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[209] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14427,21 +13815,18 @@ func (x *GetMarginRatesHistoryRequest) GetRates() []*MarginRate { } type LendingPayment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Payment string `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"` + Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` unknownFields protoimpl.UnknownFields - - Payment string `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"` - Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LendingPayment) Reset() { *x = LendingPayment{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[210] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[210] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LendingPayment) String() string { @@ -14452,7 +13837,7 @@ func (*LendingPayment) ProtoMessage() {} func (x *LendingPayment) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[210] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14482,21 +13867,18 @@ func (x *LendingPayment) GetSize() string { } type BorrowCost struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Cost string `protobuf:"bytes,1,opt,name=cost,proto3" json:"cost,omitempty"` + Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` unknownFields protoimpl.UnknownFields - - Cost string `protobuf:"bytes,1,opt,name=cost,proto3" json:"cost,omitempty"` - Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` + sizeCache protoimpl.SizeCache } func (x *BorrowCost) Reset() { *x = BorrowCost{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[211] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[211] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BorrowCost) String() string { @@ -14507,7 +13889,7 @@ func (*BorrowCost) ProtoMessage() {} func (x *BorrowCost) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[211] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14537,27 +13919,24 @@ func (x *BorrowCost) GetSize() string { } type MarginRate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Time string `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` - MarketBorrowSize string `protobuf:"bytes,2,opt,name=market_borrow_size,json=marketBorrowSize,proto3" json:"market_borrow_size,omitempty"` - HourlyRate string `protobuf:"bytes,3,opt,name=hourly_rate,json=hourlyRate,proto3" json:"hourly_rate,omitempty"` - YearlyRate string `protobuf:"bytes,4,opt,name=yearly_rate,json=yearlyRate,proto3" json:"yearly_rate,omitempty"` - HourlyBorrowRate string `protobuf:"bytes,5,opt,name=hourly_borrow_rate,json=hourlyBorrowRate,proto3" json:"hourly_borrow_rate,omitempty"` - YearlyBorrowRate string `protobuf:"bytes,6,opt,name=yearly_borrow_rate,json=yearlyBorrowRate,proto3" json:"yearly_borrow_rate,omitempty"` - LendingPayment *LendingPayment `protobuf:"bytes,7,opt,name=lending_payment,json=lendingPayment,proto3" json:"lending_payment,omitempty"` - BorrowCost *BorrowCost `protobuf:"bytes,8,opt,name=borrow_cost,json=borrowCost,proto3" json:"borrow_cost,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Time string `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + MarketBorrowSize string `protobuf:"bytes,2,opt,name=market_borrow_size,json=marketBorrowSize,proto3" json:"market_borrow_size,omitempty"` + HourlyRate string `protobuf:"bytes,3,opt,name=hourly_rate,json=hourlyRate,proto3" json:"hourly_rate,omitempty"` + YearlyRate string `protobuf:"bytes,4,opt,name=yearly_rate,json=yearlyRate,proto3" json:"yearly_rate,omitempty"` + HourlyBorrowRate string `protobuf:"bytes,5,opt,name=hourly_borrow_rate,json=hourlyBorrowRate,proto3" json:"hourly_borrow_rate,omitempty"` + YearlyBorrowRate string `protobuf:"bytes,6,opt,name=yearly_borrow_rate,json=yearlyBorrowRate,proto3" json:"yearly_borrow_rate,omitempty"` + LendingPayment *LendingPayment `protobuf:"bytes,7,opt,name=lending_payment,json=lendingPayment,proto3" json:"lending_payment,omitempty"` + BorrowCost *BorrowCost `protobuf:"bytes,8,opt,name=borrow_cost,json=borrowCost,proto3" json:"borrow_cost,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MarginRate) Reset() { *x = MarginRate{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[212] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[212] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarginRate) String() string { @@ -14568,7 +13947,7 @@ func (*MarginRate) ProtoMessage() {} func (x *MarginRate) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[212] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14640,28 +14019,25 @@ func (x *MarginRate) GetBorrowCost() *BorrowCost { } type GetMarginRatesHistoryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rates []*MarginRate `protobuf:"bytes,1,rep,name=rates,proto3" json:"rates,omitempty"` - TotalRates int64 `protobuf:"varint,2,opt,name=total_rates,json=totalRates,proto3" json:"total_rates,omitempty"` - SumBorrowCosts string `protobuf:"bytes,3,opt,name=sum_borrow_costs,json=sumBorrowCosts,proto3" json:"sum_borrow_costs,omitempty"` - AvgBorrowSize string `protobuf:"bytes,4,opt,name=avg_borrow_size,json=avgBorrowSize,proto3" json:"avg_borrow_size,omitempty"` - SumLendingPayments string `protobuf:"bytes,5,opt,name=sum_lending_payments,json=sumLendingPayments,proto3" json:"sum_lending_payments,omitempty"` - AvgLendingSize string `protobuf:"bytes,6,opt,name=avg_lending_size,json=avgLendingSize,proto3" json:"avg_lending_size,omitempty"` - LatestRate *MarginRate `protobuf:"bytes,7,opt,name=latest_rate,json=latestRate,proto3" json:"latest_rate,omitempty"` - PredictedRate *MarginRate `protobuf:"bytes,8,opt,name=predicted_rate,json=predictedRate,proto3" json:"predicted_rate,omitempty"` - TakerFeeRate string `protobuf:"bytes,9,opt,name=taker_fee_rate,json=takerFeeRate,proto3" json:"taker_fee_rate,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Rates []*MarginRate `protobuf:"bytes,1,rep,name=rates,proto3" json:"rates,omitempty"` + TotalRates int64 `protobuf:"varint,2,opt,name=total_rates,json=totalRates,proto3" json:"total_rates,omitempty"` + SumBorrowCosts string `protobuf:"bytes,3,opt,name=sum_borrow_costs,json=sumBorrowCosts,proto3" json:"sum_borrow_costs,omitempty"` + AvgBorrowSize string `protobuf:"bytes,4,opt,name=avg_borrow_size,json=avgBorrowSize,proto3" json:"avg_borrow_size,omitempty"` + SumLendingPayments string `protobuf:"bytes,5,opt,name=sum_lending_payments,json=sumLendingPayments,proto3" json:"sum_lending_payments,omitempty"` + AvgLendingSize string `protobuf:"bytes,6,opt,name=avg_lending_size,json=avgLendingSize,proto3" json:"avg_lending_size,omitempty"` + LatestRate *MarginRate `protobuf:"bytes,7,opt,name=latest_rate,json=latestRate,proto3" json:"latest_rate,omitempty"` + PredictedRate *MarginRate `protobuf:"bytes,8,opt,name=predicted_rate,json=predictedRate,proto3" json:"predicted_rate,omitempty"` + TakerFeeRate string `protobuf:"bytes,9,opt,name=taker_fee_rate,json=takerFeeRate,proto3" json:"taker_fee_rate,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetMarginRatesHistoryResponse) Reset() { *x = GetMarginRatesHistoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[213] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[213] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMarginRatesHistoryResponse) String() string { @@ -14672,7 +14048,7 @@ func (*GetMarginRatesHistoryResponse) ProtoMessage() {} func (x *GetMarginRatesHistoryResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[213] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14751,26 +14127,23 @@ func (x *GetMarginRatesHistoryResponse) GetTakerFeeRate() string { } type GetOrderbookMovementRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Amount float64 `protobuf:"fixed64,6,opt,name=amount,proto3" json:"amount,omitempty"` - Sell bool `protobuf:"varint,7,opt,name=sell,proto3" json:"sell,omitempty"` - RequiresRestOrderbook bool `protobuf:"varint,8,opt,name=requires_rest_orderbook,json=requiresRestOrderbook,proto3" json:"requires_rest_orderbook,omitempty"` - Purchase bool `protobuf:"varint,9,opt,name=purchase,proto3" json:"purchase,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Amount float64 `protobuf:"fixed64,6,opt,name=amount,proto3" json:"amount,omitempty"` + Sell bool `protobuf:"varint,7,opt,name=sell,proto3" json:"sell,omitempty"` + RequiresRestOrderbook bool `protobuf:"varint,8,opt,name=requires_rest_orderbook,json=requiresRestOrderbook,proto3" json:"requires_rest_orderbook,omitempty"` + Purchase bool `protobuf:"varint,9,opt,name=purchase,proto3" json:"purchase,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetOrderbookMovementRequest) Reset() { *x = GetOrderbookMovementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[214] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[214] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderbookMovementRequest) String() string { @@ -14781,7 +14154,7 @@ func (*GetOrderbookMovementRequest) ProtoMessage() {} func (x *GetOrderbookMovementRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[214] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14846,33 +14219,30 @@ func (x *GetOrderbookMovementRequest) GetPurchase() bool { } type GetOrderbookMovementResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NominalPercentage float64 `protobuf:"fixed64,1,opt,name=nominal_percentage,json=nominalPercentage,proto3" json:"nominal_percentage,omitempty"` - ImpactPercentage float64 `protobuf:"fixed64,2,opt,name=impact_percentage,json=impactPercentage,proto3" json:"impact_percentage,omitempty"` - SlippageCost float64 `protobuf:"fixed64,3,opt,name=slippage_cost,json=slippageCost,proto3" json:"slippage_cost,omitempty"` - CurrencyBought string `protobuf:"bytes,4,opt,name=currency_bought,json=currencyBought,proto3" json:"currency_bought,omitempty"` - Bought float64 `protobuf:"fixed64,5,opt,name=bought,proto3" json:"bought,omitempty"` - CurrencySold string `protobuf:"bytes,6,opt,name=currency_sold,json=currencySold,proto3" json:"currency_sold,omitempty"` - Sold float64 `protobuf:"fixed64,7,opt,name=sold,proto3" json:"sold,omitempty"` - SideAffected string `protobuf:"bytes,8,opt,name=side_affected,json=sideAffected,proto3" json:"side_affected,omitempty"` - UpdateProtocol string `protobuf:"bytes,9,opt,name=update_protocol,json=updateProtocol,proto3" json:"update_protocol,omitempty"` - FullOrderbookSideConsumed bool `protobuf:"varint,10,opt,name=full_orderbook_side_consumed,json=fullOrderbookSideConsumed,proto3" json:"full_orderbook_side_consumed,omitempty"` - StartPrice float64 `protobuf:"fixed64,11,opt,name=start_price,json=startPrice,proto3" json:"start_price,omitempty"` - EndPrice float64 `protobuf:"fixed64,12,opt,name=end_price,json=endPrice,proto3" json:"end_price,omitempty"` - NoSlippageOccurred bool `protobuf:"varint,13,opt,name=no_slippage_occurred,json=noSlippageOccurred,proto3" json:"no_slippage_occurred,omitempty"` - AverageOrderCost float64 `protobuf:"fixed64,14,opt,name=average_order_cost,json=averageOrderCost,proto3" json:"average_order_cost,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + NominalPercentage float64 `protobuf:"fixed64,1,opt,name=nominal_percentage,json=nominalPercentage,proto3" json:"nominal_percentage,omitempty"` + ImpactPercentage float64 `protobuf:"fixed64,2,opt,name=impact_percentage,json=impactPercentage,proto3" json:"impact_percentage,omitempty"` + SlippageCost float64 `protobuf:"fixed64,3,opt,name=slippage_cost,json=slippageCost,proto3" json:"slippage_cost,omitempty"` + CurrencyBought string `protobuf:"bytes,4,opt,name=currency_bought,json=currencyBought,proto3" json:"currency_bought,omitempty"` + Bought float64 `protobuf:"fixed64,5,opt,name=bought,proto3" json:"bought,omitempty"` + CurrencySold string `protobuf:"bytes,6,opt,name=currency_sold,json=currencySold,proto3" json:"currency_sold,omitempty"` + Sold float64 `protobuf:"fixed64,7,opt,name=sold,proto3" json:"sold,omitempty"` + SideAffected string `protobuf:"bytes,8,opt,name=side_affected,json=sideAffected,proto3" json:"side_affected,omitempty"` + UpdateProtocol string `protobuf:"bytes,9,opt,name=update_protocol,json=updateProtocol,proto3" json:"update_protocol,omitempty"` + FullOrderbookSideConsumed bool `protobuf:"varint,10,opt,name=full_orderbook_side_consumed,json=fullOrderbookSideConsumed,proto3" json:"full_orderbook_side_consumed,omitempty"` + StartPrice float64 `protobuf:"fixed64,11,opt,name=start_price,json=startPrice,proto3" json:"start_price,omitempty"` + EndPrice float64 `protobuf:"fixed64,12,opt,name=end_price,json=endPrice,proto3" json:"end_price,omitempty"` + NoSlippageOccurred bool `protobuf:"varint,13,opt,name=no_slippage_occurred,json=noSlippageOccurred,proto3" json:"no_slippage_occurred,omitempty"` + AverageOrderCost float64 `protobuf:"fixed64,14,opt,name=average_order_cost,json=averageOrderCost,proto3" json:"average_order_cost,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetOrderbookMovementResponse) Reset() { *x = GetOrderbookMovementResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[215] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[215] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderbookMovementResponse) String() string { @@ -14883,7 +14253,7 @@ func (*GetOrderbookMovementResponse) ProtoMessage() {} func (x *GetOrderbookMovementResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[215] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14997,25 +14367,22 @@ func (x *GetOrderbookMovementResponse) GetAverageOrderCost() float64 { } type GetOrderbookAmountByNominalRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - NominalPercentage float64 `protobuf:"fixed64,6,opt,name=nominal_percentage,json=nominalPercentage,proto3" json:"nominal_percentage,omitempty"` - Sell bool `protobuf:"varint,7,opt,name=sell,proto3" json:"sell,omitempty"` - RequiresRestOrderbook bool `protobuf:"varint,8,opt,name=requires_rest_orderbook,json=requiresRestOrderbook,proto3" json:"requires_rest_orderbook,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + NominalPercentage float64 `protobuf:"fixed64,6,opt,name=nominal_percentage,json=nominalPercentage,proto3" json:"nominal_percentage,omitempty"` + Sell bool `protobuf:"varint,7,opt,name=sell,proto3" json:"sell,omitempty"` + RequiresRestOrderbook bool `protobuf:"varint,8,opt,name=requires_rest_orderbook,json=requiresRestOrderbook,proto3" json:"requires_rest_orderbook,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetOrderbookAmountByNominalRequest) Reset() { *x = GetOrderbookAmountByNominalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[216] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[216] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderbookAmountByNominalRequest) String() string { @@ -15026,7 +14393,7 @@ func (*GetOrderbookAmountByNominalRequest) ProtoMessage() {} func (x *GetOrderbookAmountByNominalRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[216] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15084,30 +14451,27 @@ func (x *GetOrderbookAmountByNominalRequest) GetRequiresRestOrderbook() bool { } type GetOrderbookAmountByNominalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AmountRequired float64 `protobuf:"fixed64,1,opt,name=amount_required,json=amountRequired,proto3" json:"amount_required,omitempty"` - CurrencySelling string `protobuf:"bytes,2,opt,name=currency_selling,json=currencySelling,proto3" json:"currency_selling,omitempty"` - AmountReceived float64 `protobuf:"fixed64,3,opt,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` - CurrencyBuying string `protobuf:"bytes,4,opt,name=currency_buying,json=currencyBuying,proto3" json:"currency_buying,omitempty"` - StartPrice float64 `protobuf:"fixed64,5,opt,name=start_price,json=startPrice,proto3" json:"start_price,omitempty"` - EndPrice float64 `protobuf:"fixed64,6,opt,name=end_price,json=endPrice,proto3" json:"end_price,omitempty"` - AverageOrderCost float64 `protobuf:"fixed64,7,opt,name=average_order_cost,json=averageOrderCost,proto3" json:"average_order_cost,omitempty"` - SideAffected string `protobuf:"bytes,8,opt,name=side_affected,json=sideAffected,proto3" json:"side_affected,omitempty"` - ApproximateNominalSlippagePercentage float64 `protobuf:"fixed64,9,opt,name=approximate_nominal_slippage_percentage,json=approximateNominalSlippagePercentage,proto3" json:"approximate_nominal_slippage_percentage,omitempty"` - UpdateProtocol string `protobuf:"bytes,10,opt,name=update_protocol,json=updateProtocol,proto3" json:"update_protocol,omitempty"` - FullOrderbookSideConsumed bool `protobuf:"varint,11,opt,name=full_orderbook_side_consumed,json=fullOrderbookSideConsumed,proto3" json:"full_orderbook_side_consumed,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + AmountRequired float64 `protobuf:"fixed64,1,opt,name=amount_required,json=amountRequired,proto3" json:"amount_required,omitempty"` + CurrencySelling string `protobuf:"bytes,2,opt,name=currency_selling,json=currencySelling,proto3" json:"currency_selling,omitempty"` + AmountReceived float64 `protobuf:"fixed64,3,opt,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` + CurrencyBuying string `protobuf:"bytes,4,opt,name=currency_buying,json=currencyBuying,proto3" json:"currency_buying,omitempty"` + StartPrice float64 `protobuf:"fixed64,5,opt,name=start_price,json=startPrice,proto3" json:"start_price,omitempty"` + EndPrice float64 `protobuf:"fixed64,6,opt,name=end_price,json=endPrice,proto3" json:"end_price,omitempty"` + AverageOrderCost float64 `protobuf:"fixed64,7,opt,name=average_order_cost,json=averageOrderCost,proto3" json:"average_order_cost,omitempty"` + SideAffected string `protobuf:"bytes,8,opt,name=side_affected,json=sideAffected,proto3" json:"side_affected,omitempty"` + ApproximateNominalSlippagePercentage float64 `protobuf:"fixed64,9,opt,name=approximate_nominal_slippage_percentage,json=approximateNominalSlippagePercentage,proto3" json:"approximate_nominal_slippage_percentage,omitempty"` + UpdateProtocol string `protobuf:"bytes,10,opt,name=update_protocol,json=updateProtocol,proto3" json:"update_protocol,omitempty"` + FullOrderbookSideConsumed bool `protobuf:"varint,11,opt,name=full_orderbook_side_consumed,json=fullOrderbookSideConsumed,proto3" json:"full_orderbook_side_consumed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetOrderbookAmountByNominalResponse) Reset() { *x = GetOrderbookAmountByNominalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[217] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[217] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderbookAmountByNominalResponse) String() string { @@ -15118,7 +14482,7 @@ func (*GetOrderbookAmountByNominalResponse) ProtoMessage() {} func (x *GetOrderbookAmountByNominalResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[217] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15211,25 +14575,22 @@ func (x *GetOrderbookAmountByNominalResponse) GetFullOrderbookSideConsumed() boo } type GetOrderbookAmountByImpactRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - ImpactPercentage float64 `protobuf:"fixed64,6,opt,name=impact_percentage,json=impactPercentage,proto3" json:"impact_percentage,omitempty"` - Sell bool `protobuf:"varint,7,opt,name=sell,proto3" json:"sell,omitempty"` - RequiresRestOrderbook bool `protobuf:"varint,8,opt,name=requires_rest_orderbook,json=requiresRestOrderbook,proto3" json:"requires_rest_orderbook,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + ImpactPercentage float64 `protobuf:"fixed64,6,opt,name=impact_percentage,json=impactPercentage,proto3" json:"impact_percentage,omitempty"` + Sell bool `protobuf:"varint,7,opt,name=sell,proto3" json:"sell,omitempty"` + RequiresRestOrderbook bool `protobuf:"varint,8,opt,name=requires_rest_orderbook,json=requiresRestOrderbook,proto3" json:"requires_rest_orderbook,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetOrderbookAmountByImpactRequest) Reset() { *x = GetOrderbookAmountByImpactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[218] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[218] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderbookAmountByImpactRequest) String() string { @@ -15240,7 +14601,7 @@ func (*GetOrderbookAmountByImpactRequest) ProtoMessage() {} func (x *GetOrderbookAmountByImpactRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[218] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15298,30 +14659,27 @@ func (x *GetOrderbookAmountByImpactRequest) GetRequiresRestOrderbook() bool { } type GetOrderbookAmountByImpactResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AmountRequired float64 `protobuf:"fixed64,1,opt,name=amount_required,json=amountRequired,proto3" json:"amount_required,omitempty"` - CurrencySelling string `protobuf:"bytes,2,opt,name=currency_selling,json=currencySelling,proto3" json:"currency_selling,omitempty"` - AmountReceived float64 `protobuf:"fixed64,3,opt,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` - CurrencyBuying string `protobuf:"bytes,4,opt,name=currency_buying,json=currencyBuying,proto3" json:"currency_buying,omitempty"` - StartPrice float64 `protobuf:"fixed64,5,opt,name=start_price,json=startPrice,proto3" json:"start_price,omitempty"` - EndPrice float64 `protobuf:"fixed64,6,opt,name=end_price,json=endPrice,proto3" json:"end_price,omitempty"` - AverageOrderCost float64 `protobuf:"fixed64,7,opt,name=average_order_cost,json=averageOrderCost,proto3" json:"average_order_cost,omitempty"` - SideAffected string `protobuf:"bytes,8,opt,name=side_affected,json=sideAffected,proto3" json:"side_affected,omitempty"` - ApproximateImpactSlippagePercentage float64 `protobuf:"fixed64,9,opt,name=approximate_impact_slippage_percentage,json=approximateImpactSlippagePercentage,proto3" json:"approximate_impact_slippage_percentage,omitempty"` - UpdateProtocol string `protobuf:"bytes,10,opt,name=update_protocol,json=updateProtocol,proto3" json:"update_protocol,omitempty"` - FullOrderbookSideConsumed bool `protobuf:"varint,11,opt,name=full_orderbook_side_consumed,json=fullOrderbookSideConsumed,proto3" json:"full_orderbook_side_consumed,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + AmountRequired float64 `protobuf:"fixed64,1,opt,name=amount_required,json=amountRequired,proto3" json:"amount_required,omitempty"` + CurrencySelling string `protobuf:"bytes,2,opt,name=currency_selling,json=currencySelling,proto3" json:"currency_selling,omitempty"` + AmountReceived float64 `protobuf:"fixed64,3,opt,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` + CurrencyBuying string `protobuf:"bytes,4,opt,name=currency_buying,json=currencyBuying,proto3" json:"currency_buying,omitempty"` + StartPrice float64 `protobuf:"fixed64,5,opt,name=start_price,json=startPrice,proto3" json:"start_price,omitempty"` + EndPrice float64 `protobuf:"fixed64,6,opt,name=end_price,json=endPrice,proto3" json:"end_price,omitempty"` + AverageOrderCost float64 `protobuf:"fixed64,7,opt,name=average_order_cost,json=averageOrderCost,proto3" json:"average_order_cost,omitempty"` + SideAffected string `protobuf:"bytes,8,opt,name=side_affected,json=sideAffected,proto3" json:"side_affected,omitempty"` + ApproximateImpactSlippagePercentage float64 `protobuf:"fixed64,9,opt,name=approximate_impact_slippage_percentage,json=approximateImpactSlippagePercentage,proto3" json:"approximate_impact_slippage_percentage,omitempty"` + UpdateProtocol string `protobuf:"bytes,10,opt,name=update_protocol,json=updateProtocol,proto3" json:"update_protocol,omitempty"` + FullOrderbookSideConsumed bool `protobuf:"varint,11,opt,name=full_orderbook_side_consumed,json=fullOrderbookSideConsumed,proto3" json:"full_orderbook_side_consumed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetOrderbookAmountByImpactResponse) Reset() { *x = GetOrderbookAmountByImpactResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[219] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[219] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderbookAmountByImpactResponse) String() string { @@ -15332,7 +14690,7 @@ func (*GetOrderbookAmountByImpactResponse) ProtoMessage() {} func (x *GetOrderbookAmountByImpactResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[219] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15425,21 +14783,18 @@ func (x *GetOrderbookAmountByImpactResponse) GetFullOrderbookSideConsumed() bool } type GetOpenInterestRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Data []*OpenInterestDataRequest `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Data []*OpenInterestDataRequest `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetOpenInterestRequest) Reset() { *x = GetOpenInterestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[220] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[220] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOpenInterestRequest) String() string { @@ -15450,7 +14805,7 @@ func (*GetOpenInterestRequest) ProtoMessage() {} func (x *GetOpenInterestRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[220] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15480,21 +14835,18 @@ func (x *GetOpenInterestRequest) GetData() []*OpenInterestDataRequest { } type OpenInterestDataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` unknownFields protoimpl.UnknownFields - - Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OpenInterestDataRequest) Reset() { *x = OpenInterestDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[221] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[221] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OpenInterestDataRequest) String() string { @@ -15505,7 +14857,7 @@ func (*OpenInterestDataRequest) ProtoMessage() {} func (x *OpenInterestDataRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[221] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15535,20 +14887,17 @@ func (x *OpenInterestDataRequest) GetPair() *CurrencyPair { } type GetOpenInterestResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Data []*OpenInterestDataResponse `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields - - Data []*OpenInterestDataResponse `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetOpenInterestResponse) Reset() { *x = GetOpenInterestResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[222] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[222] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOpenInterestResponse) String() string { @@ -15559,7 +14908,7 @@ func (*GetOpenInterestResponse) ProtoMessage() {} func (x *GetOpenInterestResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[222] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15582,23 +14931,20 @@ func (x *GetOpenInterestResponse) GetData() []*OpenInterestDataResponse { } type OpenInterestDataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + OpenInterest float64 `protobuf:"fixed64,4,opt,name=open_interest,json=openInterest,proto3" json:"open_interest,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - OpenInterest float64 `protobuf:"fixed64,4,opt,name=open_interest,json=openInterest,proto3" json:"open_interest,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OpenInterestDataResponse) Reset() { *x = OpenInterestDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[223] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[223] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OpenInterestDataResponse) String() string { @@ -15609,7 +14955,7 @@ func (*OpenInterestDataResponse) ProtoMessage() {} func (x *OpenInterestDataResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[223] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15653,22 +14999,19 @@ func (x *OpenInterestDataResponse) GetOpenInterest() float64 { } type GetCurrencyTradeURLRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` - Pair *CurrencyPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetCurrencyTradeURLRequest) Reset() { *x = GetCurrencyTradeURLRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[224] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[224] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCurrencyTradeURLRequest) String() string { @@ -15679,7 +15022,7 @@ func (*GetCurrencyTradeURLRequest) ProtoMessage() {} func (x *GetCurrencyTradeURLRequest) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[224] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15716,20 +15059,17 @@ func (x *GetCurrencyTradeURLRequest) GetPair() *CurrencyPair { } type GetCurrencyTradeURLResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetCurrencyTradeURLResponse) Reset() { *x = GetCurrencyTradeURLResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[225] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_rpc_proto_msgTypes[225] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCurrencyTradeURLResponse) String() string { @@ -15740,7 +15080,7 @@ func (*GetCurrencyTradeURLResponse) ProtoMessage() {} func (x *GetCurrencyTradeURLResponse) ProtoReflect() protoreflect.Message { mi := &file_rpc_proto_msgTypes[225] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16588,7 +15928,7 @@ var file_rpc_proto_rawDesc = []byte{ 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x66, 0x69, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x66, 0x69, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x61, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x66, 0x69, 0x61, 0x74, 0x12, 0x35, 0x0a, 0x06, 0x63, @@ -16993,14 +16333,14 @@ var file_rpc_proto_rawDesc = []byte{ 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x41, 0x74, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, @@ -17015,7 +16355,7 @@ var file_rpc_proto_rawDesc = []byte{ 0x28, 0x09, 0x52, 0x17, 0x70, 0x72, 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x64, + 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, @@ -17067,12 +16407,12 @@ var file_rpc_proto_rawDesc = []byte{ 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x41, + 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x61, 0x74, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, @@ -17089,7 +16429,7 @@ var file_rpc_proto_rawDesc = []byte{ 0x69, 0x73, 0x69, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x16, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, + 0x28, 0x04, 0x52, 0x16, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x65, 0x63, @@ -19027,7 +18367,7 @@ func file_rpc_proto_rawDescGZIP() []byte { } var file_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 240) -var file_rpc_proto_goTypes = []interface{}{ +var file_rpc_proto_goTypes = []any{ (*GetInfoRequest)(nil), // 0: gctrpc.GetInfoRequest (*GetInfoResponse)(nil), // 1: gctrpc.GetInfoResponse (*GetCommunicationRelayersRequest)(nil), // 2: gctrpc.GetCommunicationRelayersRequest @@ -19668,2720 +19008,6 @@ func file_rpc_proto_init() { if File_rpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_rpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCommunicationRelayersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommunicationRelayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCommunicationRelayersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenericSubsystemRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSubsystemsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSusbsytemsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRPCEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRPCEndpointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenericExchangeNameRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangeOTPResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangeOTPsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangeOTPsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisableExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PairsSupported); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangeInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTickerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrencyPair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TickerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTickersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tickers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTickersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderbookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderbookItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderbookResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderbooksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Orderbooks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderbooksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAccountInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Account); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountCurrencyInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAccountInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PortfolioAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPortfolioRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPortfolioResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPortfolioSummaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Coin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OfflineCoinSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnlineCoinSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OfflineCoins); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnlineCoins); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPortfolioSummaryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddPortfolioAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemovePortfolioAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetForexProvidersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ForexProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetForexProvidersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetForexRatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ForexRatesConversion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetForexRatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TradeHistory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrdersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrdersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubmitOrderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Trades); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubmitOrderResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimulateOrderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimulateOrderResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WhaleBombRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelOrderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelBatchOrdersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Orders); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelBatchOrdersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelAllOrdersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelAllOrdersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConditionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCryptocurrencyDepositAddressesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DepositAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DepositAddresses); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCryptocurrencyDepositAddressesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCryptocurrencyDepositAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCryptocurrencyDepositAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAvailableTransferChainsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAvailableTransferChainsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawFiatRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawCryptoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawalEventByIDRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawalEventByIDResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawalEventsByExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawalEventsByDateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawalEventsByExchangeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawalEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawlExchangeEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawalRequestEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FiatWithdrawalEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CryptoWithdrawalEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLoggerDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLoggerDetailsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetLoggerDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangePairsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangePairsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetExchangePairRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderbookStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangeOrderbookStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTickerStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangeTickerStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAuditEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAuditEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSavedTradesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SavedTrades); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SavedTradesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConvertTradesToCandlesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHistoricCandlesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHistoricCandlesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Candle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuditEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScript); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptExecuteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptStopRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptStopAllRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptListAllRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptUploadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptReadScriptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptAutoLoadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GCTScriptQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenericResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetExchangeAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetExchangeAllPairsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateExchangeSupportedPairsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangeAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExchangeAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebsocketGetInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebsocketGetInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebsocketSetEnabledRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebsocketGetSubscriptionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebsocketSubscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebsocketGetSubscriptionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebsocketSetProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebsocketSetURLRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindMissingCandlePeriodsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindMissingTradePeriodsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindMissingIntervalsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetExchangeTradeProcessingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpsertDataHistoryJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InsertSequentialJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InsertSequentialJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpsertDataHistoryJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDataHistoryJobDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataHistoryJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataHistoryJobResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataHistoryJobs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDataHistoryJobsBetweenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetDataHistoryJobStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateDataHistoryJobPrerequisiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModifyOrderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModifyOrderResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrencyStateGetAllRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrencyStateTradingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrencyStateTradingPairRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrencyStateWithdrawRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrencyStateDepositRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrencyStateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrencyState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FundingRate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FundingData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FuturesPositionStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FuturePosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetManagedPositionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAllManagedPositionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetManagedPositionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFuturesPositionsSummaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFuturesPositionsSummaryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFuturesPositionsOrdersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFuturesPositionsOrdersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCollateralModeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCollateralModeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetCollateralModeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetCollateralModeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[185].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMarginTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[186].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMarginTypeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[187].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangePositionMarginRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[188].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangePositionMarginResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[189].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMarginTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[190].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMarginTypeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[191].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLeverageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[192].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLeverageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[193].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetLeverageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[194].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetLeverageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[195].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCollateralRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[196].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCollateralResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[197].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CollateralForCurrency); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[198].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CollateralByPosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[199].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CollateralUsedBreakdown); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[200].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFundingRatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[201].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFundingRatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[202].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestFundingRateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[203].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestFundingRateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[204].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShutdownRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[205].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShutdownResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[206].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTechnicalAnalysisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[207].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOfSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[208].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTechnicalAnalysisResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[209].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMarginRatesHistoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[210].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LendingPayment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[211].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BorrowCost); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[212].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarginRate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[213].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMarginRatesHistoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[214].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderbookMovementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[215].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderbookMovementResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[216].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderbookAmountByNominalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[217].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderbookAmountByNominalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[218].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderbookAmountByImpactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[219].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderbookAmountByImpactResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[220].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOpenInterestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[221].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenInterestDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[222].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOpenInterestResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[223].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenInterestDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[224].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCurrencyTradeURLRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rpc_proto_msgTypes[225].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCurrencyTradeURLResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gctrpc/rpc.pb.gw.go b/gctrpc/rpc.pb.gw.go index d2d8d5f1b76..921daddce72 100644 --- a/gctrpc/rpc.pb.gw.go +++ b/gctrpc/rpc.pb.gw.go @@ -3766,21 +3766,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetInfo_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3791,21 +3790,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSubsystems", runtime.WithHTTPPathPattern("/v1/getsubsystems")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSubsystems", runtime.WithHTTPPathPattern("/v1/getsubsystems")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetSubsystems_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetSubsystems_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSubsystems_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetSubsystems_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3816,21 +3814,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableSubsystem", runtime.WithHTTPPathPattern("/v1/enablesubsystem")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableSubsystem", runtime.WithHTTPPathPattern("/v1/enablesubsystem")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_EnableSubsystem_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_EnableSubsystem_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_EnableSubsystem_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3841,21 +3838,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableSubsystem", runtime.WithHTTPPathPattern("/v1/disablesubsystem")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableSubsystem", runtime.WithHTTPPathPattern("/v1/disablesubsystem")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_DisableSubsystem_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_DisableSubsystem_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_DisableSubsystem_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3866,21 +3862,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRPCEndpoints", runtime.WithHTTPPathPattern("/v1/getrpcendpoints")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRPCEndpoints", runtime.WithHTTPPathPattern("/v1/getrpcendpoints")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetRPCEndpoints_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetRPCEndpoints_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRPCEndpoints_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetRPCEndpoints_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3891,21 +3886,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCommunicationRelayers", runtime.WithHTTPPathPattern("/v1/getcommunicationrelayers")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCommunicationRelayers", runtime.WithHTTPPathPattern("/v1/getcommunicationrelayers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetCommunicationRelayers_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetCommunicationRelayers_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCommunicationRelayers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCommunicationRelayers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3916,21 +3910,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchanges", runtime.WithHTTPPathPattern("/v1/getexchanges")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchanges", runtime.WithHTTPPathPattern("/v1/getexchanges")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetExchanges_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchanges_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchanges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchanges_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3941,21 +3934,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableExchange", runtime.WithHTTPPathPattern("/v1/disableexchange")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableExchange", runtime.WithHTTPPathPattern("/v1/disableexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_DisableExchange_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_DisableExchange_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_DisableExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3966,21 +3958,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeInfo", runtime.WithHTTPPathPattern("/v1/getexchangeinfo")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeInfo", runtime.WithHTTPPathPattern("/v1/getexchangeinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetExchangeInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchangeInfo_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3991,21 +3982,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCode", runtime.WithHTTPPathPattern("/v1/getexchangeotp")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCode", runtime.WithHTTPPathPattern("/v1/getexchangeotp")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetExchangeOTPCode_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchangeOTPCode_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeOTPCode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4016,21 +4006,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCodes", runtime.WithHTTPPathPattern("/v1/getexchangeotps")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCodes", runtime.WithHTTPPathPattern("/v1/getexchangeotps")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetExchangeOTPCodes_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchangeOTPCodes_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeOTPCodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4041,21 +4030,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableExchange", runtime.WithHTTPPathPattern("/v1/enableexchange")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableExchange", runtime.WithHTTPPathPattern("/v1/enableexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_EnableExchange_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_EnableExchange_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_EnableExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4066,21 +4054,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTicker", runtime.WithHTTPPathPattern("/v1/getticker")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTicker", runtime.WithHTTPPathPattern("/v1/getticker")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetTicker_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetTicker_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTicker_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTicker_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4091,21 +4078,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickers", runtime.WithHTTPPathPattern("/v1/gettickers")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickers", runtime.WithHTTPPathPattern("/v1/gettickers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetTickers_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetTickers_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTickers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTickers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4116,21 +4102,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbook", runtime.WithHTTPPathPattern("/v1/getorderbook")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbook", runtime.WithHTTPPathPattern("/v1/getorderbook")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetOrderbook_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrderbook_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4141,21 +4126,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbooks", runtime.WithHTTPPathPattern("/v1/getorderbooks")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbooks", runtime.WithHTTPPathPattern("/v1/getorderbooks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetOrderbooks_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrderbooks_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbooks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbooks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4166,21 +4150,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountInfo", runtime.WithHTTPPathPattern("/v1/getaccountinfo")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountInfo", runtime.WithHTTPPathPattern("/v1/getaccountinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetAccountInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetAccountInfo_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4191,21 +4174,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateAccountInfo", runtime.WithHTTPPathPattern("/v1/updateaccountinfo")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateAccountInfo", runtime.WithHTTPPathPattern("/v1/updateaccountinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_UpdateAccountInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_UpdateAccountInfo_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4223,21 +4205,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetConfig", runtime.WithHTTPPathPattern("/v1/getconfig")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetConfig", runtime.WithHTTPPathPattern("/v1/getconfig")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetConfig_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetConfig_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4248,21 +4229,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolio", runtime.WithHTTPPathPattern("/v1/getportfolio")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolio", runtime.WithHTTPPathPattern("/v1/getportfolio")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetPortfolio_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetPortfolio_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolio_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetPortfolio_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4273,21 +4253,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolioSummary", runtime.WithHTTPPathPattern("/v1/getportfoliosummary")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolioSummary", runtime.WithHTTPPathPattern("/v1/getportfoliosummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetPortfolioSummary_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetPortfolioSummary_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolioSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetPortfolioSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4298,21 +4277,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddPortfolioAddress", runtime.WithHTTPPathPattern("/v1/addportfolioaddress")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddPortfolioAddress", runtime.WithHTTPPathPattern("/v1/addportfolioaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_AddPortfolioAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_AddPortfolioAddress_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddPortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_AddPortfolioAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4323,21 +4301,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemovePortfolioAddress", runtime.WithHTTPPathPattern("/v1/removeportfolioaddress")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemovePortfolioAddress", runtime.WithHTTPPathPattern("/v1/removeportfolioaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_RemovePortfolioAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_RemovePortfolioAddress_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemovePortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_RemovePortfolioAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4348,21 +4325,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexProviders", runtime.WithHTTPPathPattern("/v1/getforexproviders")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexProviders", runtime.WithHTTPPathPattern("/v1/getforexproviders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetForexProviders_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetForexProviders_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexProviders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetForexProviders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4373,21 +4349,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexRates", runtime.WithHTTPPathPattern("/v1/getforexrates")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexRates", runtime.WithHTTPPathPattern("/v1/getforexrates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetForexRates_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetForexRates_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetForexRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4398,21 +4373,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrders", runtime.WithHTTPPathPattern("/v1/getorders")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrders", runtime.WithHTTPPathPattern("/v1/getorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetOrders_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrders_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4423,21 +4397,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrder", runtime.WithHTTPPathPattern("/v1/getorder")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrder", runtime.WithHTTPPathPattern("/v1/getorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetOrder_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrder_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4448,21 +4421,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SubmitOrder", runtime.WithHTTPPathPattern("/v1/submitorder")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SubmitOrder", runtime.WithHTTPPathPattern("/v1/submitorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SubmitOrder_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SubmitOrder_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SubmitOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SubmitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4473,21 +4445,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SimulateOrder", runtime.WithHTTPPathPattern("/v1/simulateorder")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SimulateOrder", runtime.WithHTTPPathPattern("/v1/simulateorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SimulateOrder_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SimulateOrder_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SimulateOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SimulateOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4498,21 +4469,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WhaleBomb", runtime.WithHTTPPathPattern("/v1/whalebomb")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WhaleBomb", runtime.WithHTTPPathPattern("/v1/whalebomb")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WhaleBomb_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WhaleBomb_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WhaleBomb_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WhaleBomb_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4523,21 +4493,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelOrder", runtime.WithHTTPPathPattern("/v1/cancelorder")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelOrder", runtime.WithHTTPPathPattern("/v1/cancelorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_CancelOrder_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CancelOrder_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4548,21 +4517,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelBatchOrders", runtime.WithHTTPPathPattern("/v1/cancelbatchorders")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelBatchOrders", runtime.WithHTTPPathPattern("/v1/cancelbatchorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_CancelBatchOrders_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CancelBatchOrders_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelBatchOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelBatchOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4573,21 +4541,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelAllOrders", runtime.WithHTTPPathPattern("/v1/cancelallorders")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelAllOrders", runtime.WithHTTPPathPattern("/v1/cancelallorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_CancelAllOrders_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CancelAllOrders_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelAllOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelAllOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4598,21 +4565,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetEvents", runtime.WithHTTPPathPattern("/v1/getevents")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetEvents", runtime.WithHTTPPathPattern("/v1/getevents")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetEvents_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetEvents_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetEvents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetEvents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4623,21 +4589,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddEvent", runtime.WithHTTPPathPattern("/v1/addevent")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddEvent", runtime.WithHTTPPathPattern("/v1/addevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_AddEvent_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_AddEvent_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_AddEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4648,21 +4613,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemoveEvent", runtime.WithHTTPPathPattern("/v1/removeevent")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemoveEvent", runtime.WithHTTPPathPattern("/v1/removeevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_RemoveEvent_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_RemoveEvent_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemoveEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_RemoveEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4673,21 +4637,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddresses", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddresses")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddresses", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddresses")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4698,21 +4661,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddress", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddress")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddress", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4723,21 +4685,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAvailableTransferChains", runtime.WithHTTPPathPattern("/v1/getavailabletransferchains")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAvailableTransferChains", runtime.WithHTTPPathPattern("/v1/getavailabletransferchains")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetAvailableTransferChains_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetAvailableTransferChains_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAvailableTransferChains_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAvailableTransferChains_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4748,21 +4709,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawFiatFunds", runtime.WithHTTPPathPattern("/v1/withdrawfiatfunds")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawFiatFunds", runtime.WithHTTPPathPattern("/v1/withdrawfiatfunds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WithdrawFiatFunds_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WithdrawFiatFunds_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawFiatFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawFiatFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4773,21 +4733,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawCryptocurrencyFunds", runtime.WithHTTPPathPattern("/v1/withdrawithdrawcryptofundswfiatfunds")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawCryptocurrencyFunds", runtime.WithHTTPPathPattern("/v1/withdrawithdrawcryptofundswfiatfunds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4798,21 +4757,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventByID", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyid")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventByID", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyid")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WithdrawalEventByID_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WithdrawalEventByID_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventByID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4823,21 +4781,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByExchange", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyexchange")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByExchange", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WithdrawalEventsByExchange_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WithdrawalEventsByExchange_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventsByExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4848,21 +4805,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByDate", runtime.WithHTTPPathPattern("/v1/withdrawaleventbydate")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByDate", runtime.WithHTTPPathPattern("/v1/withdrawaleventbydate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WithdrawalEventsByDate_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WithdrawalEventsByDate_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByDate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventsByDate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4873,21 +4829,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLoggerDetails", runtime.WithHTTPPathPattern("/v1/getloggerdetails")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLoggerDetails", runtime.WithHTTPPathPattern("/v1/getloggerdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetLoggerDetails_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetLoggerDetails_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetLoggerDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4898,21 +4853,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLoggerDetails", runtime.WithHTTPPathPattern("/v1/setloggerdetails")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLoggerDetails", runtime.WithHTTPPathPattern("/v1/setloggerdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SetLoggerDetails_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetLoggerDetails_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetLoggerDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4923,21 +4877,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangePairs", runtime.WithHTTPPathPattern("/v1/getexchangepairs")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangePairs", runtime.WithHTTPPathPattern("/v1/getexchangepairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetExchangePairs_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchangePairs_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangePairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4948,21 +4901,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangePair", runtime.WithHTTPPathPattern("/v1/setexchangepair")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangePair", runtime.WithHTTPPathPattern("/v1/setexchangepair")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SetExchangePair_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetExchangePair_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangePair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangePair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5001,21 +4953,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAuditEvent", runtime.WithHTTPPathPattern("/v1/getauditevent")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAuditEvent", runtime.WithHTTPPathPattern("/v1/getauditevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetAuditEvent_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetAuditEvent_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAuditEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAuditEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5026,21 +4977,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptExecute", runtime.WithHTTPPathPattern("/v1/gctscript/execute")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptExecute", runtime.WithHTTPPathPattern("/v1/gctscript/execute")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GCTScriptExecute_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptExecute_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptExecute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptExecute_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5051,21 +5001,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptUpload", runtime.WithHTTPPathPattern("/v1/gctscript/upload")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptUpload", runtime.WithHTTPPathPattern("/v1/gctscript/upload")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GCTScriptUpload_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptUpload_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptUpload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptUpload_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5076,21 +5025,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptReadScript", runtime.WithHTTPPathPattern("/v1/gctscript/read")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptReadScript", runtime.WithHTTPPathPattern("/v1/gctscript/read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GCTScriptReadScript_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptReadScript_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptReadScript_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptReadScript_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5101,21 +5049,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStatus", runtime.WithHTTPPathPattern("/v1/gctscript/status")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStatus", runtime.WithHTTPPathPattern("/v1/gctscript/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GCTScriptStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptStatus_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5126,21 +5073,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptQuery", runtime.WithHTTPPathPattern("/v1/gctscript/query")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptQuery", runtime.WithHTTPPathPattern("/v1/gctscript/query")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GCTScriptQuery_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptQuery_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5151,21 +5097,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStop", runtime.WithHTTPPathPattern("/v1/gctscript/stop")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStop", runtime.WithHTTPPathPattern("/v1/gctscript/stop")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GCTScriptStop_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptStop_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStop_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5176,21 +5121,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStopAll", runtime.WithHTTPPathPattern("/v1/gctscript/stopall")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStopAll", runtime.WithHTTPPathPattern("/v1/gctscript/stopall")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GCTScriptStopAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptStopAll_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStopAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStopAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5201,21 +5145,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptListAll", runtime.WithHTTPPathPattern("/v1/gctscript/list")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptListAll", runtime.WithHTTPPathPattern("/v1/gctscript/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GCTScriptListAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptListAll_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptListAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptListAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5226,21 +5169,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptAutoLoadToggle", runtime.WithHTTPPathPattern("/v1/gctscript/autoload")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptAutoLoadToggle", runtime.WithHTTPPathPattern("/v1/gctscript/autoload")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5251,21 +5193,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricCandles", runtime.WithHTTPPathPattern("/v1/gethistoriccandles")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricCandles", runtime.WithHTTPPathPattern("/v1/gethistoriccandles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetHistoricCandles_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetHistoricCandles_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetHistoricCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetHistoricCandles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5276,21 +5217,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeAsset", runtime.WithHTTPPathPattern("/v1/setexchangeasset")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeAsset", runtime.WithHTTPPathPattern("/v1/setexchangeasset")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SetExchangeAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetExchangeAsset_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangeAsset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5301,21 +5241,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetAllExchangePairs", runtime.WithHTTPPathPattern("/v1/setallexchangepairs")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetAllExchangePairs", runtime.WithHTTPPathPattern("/v1/setallexchangepairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SetAllExchangePairs_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetAllExchangePairs_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetAllExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetAllExchangePairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5326,21 +5265,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateExchangeSupportedPairs", runtime.WithHTTPPathPattern("/v1/updateexchangesupportedpairs")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateExchangeSupportedPairs", runtime.WithHTTPPathPattern("/v1/updateexchangesupportedpairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5351,21 +5289,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeAssets", runtime.WithHTTPPathPattern("/v1/getexchangeassets")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeAssets", runtime.WithHTTPPathPattern("/v1/getexchangeassets")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetExchangeAssets_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchangeAssets_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeAssets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5376,21 +5313,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetInfo", runtime.WithHTTPPathPattern("/v1/websocketgetinfo")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetInfo", runtime.WithHTTPPathPattern("/v1/websocketgetinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WebsocketGetInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WebsocketGetInfo_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketGetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5401,21 +5337,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetEnabled", runtime.WithHTTPPathPattern("/v1/websocketsetenabled")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetEnabled", runtime.WithHTTPPathPattern("/v1/websocketsetenabled")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WebsocketSetEnabled_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WebsocketSetEnabled_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetEnabled_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetEnabled_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5426,21 +5361,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetSubscriptions", runtime.WithHTTPPathPattern("/v1/websocketgetsubscriptions")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetSubscriptions", runtime.WithHTTPPathPattern("/v1/websocketgetsubscriptions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WebsocketGetSubscriptions_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WebsocketGetSubscriptions_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetSubscriptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketGetSubscriptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5451,21 +5385,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetProxy", runtime.WithHTTPPathPattern("/v1/websocketsetproxy")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetProxy", runtime.WithHTTPPathPattern("/v1/websocketsetproxy")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WebsocketSetProxy_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WebsocketSetProxy_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetProxy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5476,21 +5409,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetURL", runtime.WithHTTPPathPattern("/v1/websocketseturl")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetURL", runtime.WithHTTPPathPattern("/v1/websocketseturl")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_WebsocketSetURL_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WebsocketSetURL_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetURL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetURL_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5501,21 +5433,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRecentTrades", runtime.WithHTTPPathPattern("/v1/getrecenttrades")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRecentTrades", runtime.WithHTTPPathPattern("/v1/getrecenttrades")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetRecentTrades_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetRecentTrades_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRecentTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetRecentTrades_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5533,21 +5464,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSavedTrades", runtime.WithHTTPPathPattern("/v1/getsavedtrades")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSavedTrades", runtime.WithHTTPPathPattern("/v1/getsavedtrades")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetSavedTrades_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetSavedTrades_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSavedTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetSavedTrades_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5558,21 +5488,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ConvertTradesToCandles", runtime.WithHTTPPathPattern("/v1/converttradestocandles")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ConvertTradesToCandles", runtime.WithHTTPPathPattern("/v1/converttradestocandles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_ConvertTradesToCandles_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_ConvertTradesToCandles_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ConvertTradesToCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_ConvertTradesToCandles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5583,21 +5512,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedCandleIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedcandleintervals")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedCandleIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedcandleintervals")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5608,21 +5536,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedTradeIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedtradeintervals")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedTradeIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedtradeintervals")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5633,21 +5560,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeTradeProcessing", runtime.WithHTTPPathPattern("/v1/setexchangetradeprocessing")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeTradeProcessing", runtime.WithHTTPPathPattern("/v1/setexchangetradeprocessing")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SetExchangeTradeProcessing_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetExchangeTradeProcessing_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeTradeProcessing_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangeTradeProcessing_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5658,21 +5584,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpsertDataHistoryJob", runtime.WithHTTPPathPattern("/v1/upsertdatahistoryjob")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpsertDataHistoryJob", runtime.WithHTTPPathPattern("/v1/upsertdatahistoryjob")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_UpsertDataHistoryJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_UpsertDataHistoryJob_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpsertDataHistoryJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpsertDataHistoryJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5683,21 +5608,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobDetails", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobdetails")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobDetails", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetDataHistoryJobDetails_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetDataHistoryJobDetails_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5708,21 +5632,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetActiveDataHistoryJobs", runtime.WithHTTPPathPattern("/v1/getactivedatahistoryjobs")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetActiveDataHistoryJobs", runtime.WithHTTPPathPattern("/v1/getactivedatahistoryjobs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetActiveDataHistoryJobs_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetActiveDataHistoryJobs_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5733,21 +5656,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobsBetween", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsbetween")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobsBetween", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsbetween")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetDataHistoryJobsBetween_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetDataHistoryJobsBetween_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5758,21 +5680,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobSummary", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsummary")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobSummary", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetDataHistoryJobSummary_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetDataHistoryJobSummary_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5783,21 +5704,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetDataHistoryJobStatus", runtime.WithHTTPPathPattern("/v1/setdatahistoryjobstatus")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetDataHistoryJobStatus", runtime.WithHTTPPathPattern("/v1/setdatahistoryjobstatus")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SetDataHistoryJobStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetDataHistoryJobStatus_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetDataHistoryJobStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetDataHistoryJobStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5808,21 +5728,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateDataHistoryJobPrerequisite", runtime.WithHTTPPathPattern("/v1/updatedatahistoryjobprerequisite")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateDataHistoryJobPrerequisite", runtime.WithHTTPPathPattern("/v1/updatedatahistoryjobprerequisite")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5833,21 +5752,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedOrders", runtime.WithHTTPPathPattern("/v1/getmanagedorders")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedOrders", runtime.WithHTTPPathPattern("/v1/getmanagedorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetManagedOrders_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetManagedOrders_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetManagedOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetManagedOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5858,21 +5776,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ModifyOrder", runtime.WithHTTPPathPattern("/v1/modifyorder")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ModifyOrder", runtime.WithHTTPPathPattern("/v1/modifyorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_ModifyOrder_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_ModifyOrder_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ModifyOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_ModifyOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5883,21 +5800,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateGetAll", runtime.WithHTTPPathPattern("/v1/currencystategetall")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateGetAll", runtime.WithHTTPPathPattern("/v1/currencystategetall")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_CurrencyStateGetAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CurrencyStateGetAll_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateGetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateGetAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5908,21 +5824,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTrading", runtime.WithHTTPPathPattern("/v1/currencystatetrading")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTrading", runtime.WithHTTPPathPattern("/v1/currencystatetrading")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_CurrencyStateTrading_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CurrencyStateTrading_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTrading_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateTrading_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5933,21 +5848,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateDeposit", runtime.WithHTTPPathPattern("/v1/currencystatedeposit")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateDeposit", runtime.WithHTTPPathPattern("/v1/currencystatedeposit")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_CurrencyStateDeposit_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CurrencyStateDeposit_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateDeposit_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5958,21 +5872,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateWithdraw", runtime.WithHTTPPathPattern("/v1/currencystatewithdraw")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateWithdraw", runtime.WithHTTPPathPattern("/v1/currencystatewithdraw")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_CurrencyStateWithdraw_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CurrencyStateWithdraw_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateWithdraw_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateWithdraw_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5983,21 +5896,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTradingPair", runtime.WithHTTPPathPattern("/v1/currencystatetradingpair")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTradingPair", runtime.WithHTTPPathPattern("/v1/currencystatetradingpair")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_CurrencyStateTradingPair_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CurrencyStateTradingPair_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTradingPair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateTradingPair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6008,21 +5920,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsSummary", runtime.WithHTTPPathPattern("/v1/getfuturespositionssummary")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsSummary", runtime.WithHTTPPathPattern("/v1/getfuturespositionssummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetFuturesPositionsSummary_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetFuturesPositionsSummary_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFuturesPositionsSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetFuturesPositionsSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6033,21 +5944,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsOrders", runtime.WithHTTPPathPattern("/v1/getfuturespositionsorders")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsOrders", runtime.WithHTTPPathPattern("/v1/getfuturespositionsorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetFuturesPositionsOrders_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetFuturesPositionsOrders_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFuturesPositionsOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetFuturesPositionsOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6058,21 +5968,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateral", runtime.WithHTTPPathPattern("/v1/getcollateral")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateral", runtime.WithHTTPPathPattern("/v1/getcollateral")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetCollateral_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetCollateral_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCollateral_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCollateral_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6083,21 +5992,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/Shutdown", runtime.WithHTTPPathPattern("/v1/shutdown")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/Shutdown", runtime.WithHTTPPathPattern("/v1/shutdown")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_Shutdown_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_Shutdown_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_Shutdown_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_Shutdown_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6108,21 +6016,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTechnicalAnalysis", runtime.WithHTTPPathPattern("/v1/gettechnicalanalysis")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTechnicalAnalysis", runtime.WithHTTPPathPattern("/v1/gettechnicalanalysis")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetTechnicalAnalysis_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetTechnicalAnalysis_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTechnicalAnalysis_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTechnicalAnalysis_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6133,21 +6040,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetMarginRatesHistory", runtime.WithHTTPPathPattern("/v1/getmarginrateshistory")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetMarginRatesHistory", runtime.WithHTTPPathPattern("/v1/getmarginrateshistory")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetMarginRatesHistory_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetMarginRatesHistory_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetMarginRatesHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetMarginRatesHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6158,21 +6064,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedPosition", runtime.WithHTTPPathPattern("/v1/getmanagedposition")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedPosition", runtime.WithHTTPPathPattern("/v1/getmanagedposition")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetManagedPosition_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetManagedPosition_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetManagedPosition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetManagedPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6183,21 +6088,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAllManagedPositions", runtime.WithHTTPPathPattern("/v1/getallmanagedpositions")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAllManagedPositions", runtime.WithHTTPPathPattern("/v1/getallmanagedpositions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetAllManagedPositions_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetAllManagedPositions_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAllManagedPositions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAllManagedPositions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6208,21 +6112,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFundingRates", runtime.WithHTTPPathPattern("/v1/getfundingrates")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFundingRates", runtime.WithHTTPPathPattern("/v1/getfundingrates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetFundingRates_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetFundingRates_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFundingRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetFundingRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6233,21 +6136,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLatestFundingRate", runtime.WithHTTPPathPattern("/v1/getlatestfundingrate")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLatestFundingRate", runtime.WithHTTPPathPattern("/v1/getlatestfundingrate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetLatestFundingRate_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetLatestFundingRate_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLatestFundingRate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetLatestFundingRate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6258,21 +6160,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookMovement", runtime.WithHTTPPathPattern("/v1/getorderbookmovement")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookMovement", runtime.WithHTTPPathPattern("/v1/getorderbookmovement")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetOrderbookMovement_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrderbookMovement_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookMovement_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbookMovement_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6283,21 +6184,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByNominal", runtime.WithHTTPPathPattern("/v1/getorderbookamountbynominal")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByNominal", runtime.WithHTTPPathPattern("/v1/getorderbookamountbynominal")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetOrderbookAmountByNominal_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrderbookAmountByNominal_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookAmountByNominal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbookAmountByNominal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6308,21 +6208,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByImpact", runtime.WithHTTPPathPattern("/v1/getorderbookamountbyimpact")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByImpact", runtime.WithHTTPPathPattern("/v1/getorderbookamountbyimpact")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetOrderbookAmountByImpact_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrderbookAmountByImpact_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookAmountByImpact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbookAmountByImpact_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6333,21 +6232,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetCollateralMode_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetCollateralMode_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCollateralMode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCollateralMode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6358,21 +6256,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetLeverage_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetLeverage_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLeverage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetLeverage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6383,21 +6280,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SetCollateralMode_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetCollateralMode_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetCollateralMode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetCollateralMode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6408,21 +6304,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetMarginType", runtime.WithHTTPPathPattern("/v1/getmargintype")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetMarginType", runtime.WithHTTPPathPattern("/v1/getmargintype")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SetMarginType_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetMarginType_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetMarginType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetMarginType_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6433,21 +6328,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_SetLeverage_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetLeverage_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetLeverage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetLeverage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6458,21 +6352,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ChangePositionMargin", runtime.WithHTTPPathPattern("/v1/changepositionmargin")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ChangePositionMargin", runtime.WithHTTPPathPattern("/v1/changepositionmargin")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_ChangePositionMargin_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_ChangePositionMargin_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ChangePositionMargin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_ChangePositionMargin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6483,21 +6376,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOpenInterest", runtime.WithHTTPPathPattern("/v1/getopeninterest")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOpenInterest", runtime.WithHTTPPathPattern("/v1/getopeninterest")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetOpenInterest_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOpenInterest_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOpenInterest_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOpenInterest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6508,21 +6400,20 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCurrencyTradeURL", runtime.WithHTTPPathPattern("/v1/getcurrencytradeurl")) + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCurrencyTradeURL", runtime.WithHTTPPathPattern("/v1/getcurrencytradeurl")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetCurrencyTradeURL_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetCurrencyTradeURL_0(ctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCurrencyTradeURL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCurrencyTradeURL_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6532,7 +6423,7 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim // RegisterGoCryptoTraderServiceHandlerFromEndpoint is same as RegisterGoCryptoTraderServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterGoCryptoTraderServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err } @@ -6572,20 +6463,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetInfo_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6594,20 +6484,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSubsystems", runtime.WithHTTPPathPattern("/v1/getsubsystems")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSubsystems", runtime.WithHTTPPathPattern("/v1/getsubsystems")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetSubsystems_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetSubsystems_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSubsystems_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetSubsystems_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6616,20 +6505,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableSubsystem", runtime.WithHTTPPathPattern("/v1/enablesubsystem")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableSubsystem", runtime.WithHTTPPathPattern("/v1/enablesubsystem")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_EnableSubsystem_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_EnableSubsystem_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_EnableSubsystem_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6638,20 +6526,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableSubsystem", runtime.WithHTTPPathPattern("/v1/disablesubsystem")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableSubsystem", runtime.WithHTTPPathPattern("/v1/disablesubsystem")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_DisableSubsystem_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_DisableSubsystem_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_DisableSubsystem_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6660,20 +6547,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRPCEndpoints", runtime.WithHTTPPathPattern("/v1/getrpcendpoints")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRPCEndpoints", runtime.WithHTTPPathPattern("/v1/getrpcendpoints")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetRPCEndpoints_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetRPCEndpoints_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRPCEndpoints_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetRPCEndpoints_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6682,20 +6568,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCommunicationRelayers", runtime.WithHTTPPathPattern("/v1/getcommunicationrelayers")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCommunicationRelayers", runtime.WithHTTPPathPattern("/v1/getcommunicationrelayers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetCommunicationRelayers_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetCommunicationRelayers_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCommunicationRelayers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCommunicationRelayers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6704,20 +6589,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchanges", runtime.WithHTTPPathPattern("/v1/getexchanges")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchanges", runtime.WithHTTPPathPattern("/v1/getexchanges")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetExchanges_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetExchanges_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchanges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchanges_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6726,20 +6610,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableExchange", runtime.WithHTTPPathPattern("/v1/disableexchange")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableExchange", runtime.WithHTTPPathPattern("/v1/disableexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_DisableExchange_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_DisableExchange_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_DisableExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6748,20 +6631,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeInfo", runtime.WithHTTPPathPattern("/v1/getexchangeinfo")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeInfo", runtime.WithHTTPPathPattern("/v1/getexchangeinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetExchangeInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeInfo_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6770,20 +6652,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCode", runtime.WithHTTPPathPattern("/v1/getexchangeotp")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCode", runtime.WithHTTPPathPattern("/v1/getexchangeotp")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetExchangeOTPCode_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeOTPCode_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeOTPCode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6792,20 +6673,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCodes", runtime.WithHTTPPathPattern("/v1/getexchangeotps")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCodes", runtime.WithHTTPPathPattern("/v1/getexchangeotps")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetExchangeOTPCodes_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeOTPCodes_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeOTPCodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6814,20 +6694,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableExchange", runtime.WithHTTPPathPattern("/v1/enableexchange")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableExchange", runtime.WithHTTPPathPattern("/v1/enableexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_EnableExchange_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_EnableExchange_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_EnableExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6836,20 +6715,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTicker", runtime.WithHTTPPathPattern("/v1/getticker")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTicker", runtime.WithHTTPPathPattern("/v1/getticker")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetTicker_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetTicker_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTicker_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTicker_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6858,20 +6736,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickers", runtime.WithHTTPPathPattern("/v1/gettickers")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickers", runtime.WithHTTPPathPattern("/v1/gettickers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetTickers_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetTickers_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTickers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTickers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6880,20 +6757,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbook", runtime.WithHTTPPathPattern("/v1/getorderbook")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbook", runtime.WithHTTPPathPattern("/v1/getorderbook")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetOrderbook_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetOrderbook_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6902,20 +6778,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbooks", runtime.WithHTTPPathPattern("/v1/getorderbooks")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbooks", runtime.WithHTTPPathPattern("/v1/getorderbooks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetOrderbooks_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetOrderbooks_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbooks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbooks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6924,20 +6799,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountInfo", runtime.WithHTTPPathPattern("/v1/getaccountinfo")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountInfo", runtime.WithHTTPPathPattern("/v1/getaccountinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetAccountInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetAccountInfo_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6946,20 +6820,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateAccountInfo", runtime.WithHTTPPathPattern("/v1/updateaccountinfo")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateAccountInfo", runtime.WithHTTPPathPattern("/v1/updateaccountinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_UpdateAccountInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_UpdateAccountInfo_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6968,20 +6841,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountInfoStream", runtime.WithHTTPPathPattern("/v1/getaccountinfostream")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountInfoStream", runtime.WithHTTPPathPattern("/v1/getaccountinfostream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetAccountInfoStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetAccountInfoStream_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAccountInfoStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAccountInfoStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -6990,20 +6862,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetConfig", runtime.WithHTTPPathPattern("/v1/getconfig")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetConfig", runtime.WithHTTPPathPattern("/v1/getconfig")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetConfig_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetConfig_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7012,20 +6883,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolio", runtime.WithHTTPPathPattern("/v1/getportfolio")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolio", runtime.WithHTTPPathPattern("/v1/getportfolio")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetPortfolio_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetPortfolio_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolio_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetPortfolio_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7034,20 +6904,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolioSummary", runtime.WithHTTPPathPattern("/v1/getportfoliosummary")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolioSummary", runtime.WithHTTPPathPattern("/v1/getportfoliosummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetPortfolioSummary_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetPortfolioSummary_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolioSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetPortfolioSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7056,20 +6925,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddPortfolioAddress", runtime.WithHTTPPathPattern("/v1/addportfolioaddress")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddPortfolioAddress", runtime.WithHTTPPathPattern("/v1/addportfolioaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_AddPortfolioAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_AddPortfolioAddress_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddPortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_AddPortfolioAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7078,20 +6946,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemovePortfolioAddress", runtime.WithHTTPPathPattern("/v1/removeportfolioaddress")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemovePortfolioAddress", runtime.WithHTTPPathPattern("/v1/removeportfolioaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_RemovePortfolioAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_RemovePortfolioAddress_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemovePortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_RemovePortfolioAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7100,20 +6967,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexProviders", runtime.WithHTTPPathPattern("/v1/getforexproviders")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexProviders", runtime.WithHTTPPathPattern("/v1/getforexproviders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetForexProviders_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetForexProviders_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexProviders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetForexProviders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7122,20 +6988,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexRates", runtime.WithHTTPPathPattern("/v1/getforexrates")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexRates", runtime.WithHTTPPathPattern("/v1/getforexrates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetForexRates_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetForexRates_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetForexRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7144,20 +7009,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrders", runtime.WithHTTPPathPattern("/v1/getorders")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrders", runtime.WithHTTPPathPattern("/v1/getorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetOrders_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetOrders_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7166,20 +7030,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrder", runtime.WithHTTPPathPattern("/v1/getorder")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrder", runtime.WithHTTPPathPattern("/v1/getorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetOrder_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetOrder_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7188,20 +7051,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SubmitOrder", runtime.WithHTTPPathPattern("/v1/submitorder")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SubmitOrder", runtime.WithHTTPPathPattern("/v1/submitorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SubmitOrder_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SubmitOrder_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SubmitOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SubmitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7210,20 +7072,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SimulateOrder", runtime.WithHTTPPathPattern("/v1/simulateorder")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SimulateOrder", runtime.WithHTTPPathPattern("/v1/simulateorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SimulateOrder_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SimulateOrder_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SimulateOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SimulateOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7232,20 +7093,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WhaleBomb", runtime.WithHTTPPathPattern("/v1/whalebomb")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WhaleBomb", runtime.WithHTTPPathPattern("/v1/whalebomb")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WhaleBomb_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WhaleBomb_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WhaleBomb_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WhaleBomb_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7254,20 +7114,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelOrder", runtime.WithHTTPPathPattern("/v1/cancelorder")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelOrder", runtime.WithHTTPPathPattern("/v1/cancelorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_CancelOrder_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_CancelOrder_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7276,20 +7135,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelBatchOrders", runtime.WithHTTPPathPattern("/v1/cancelbatchorders")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelBatchOrders", runtime.WithHTTPPathPattern("/v1/cancelbatchorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_CancelBatchOrders_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_CancelBatchOrders_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelBatchOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelBatchOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7298,20 +7156,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelAllOrders", runtime.WithHTTPPathPattern("/v1/cancelallorders")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelAllOrders", runtime.WithHTTPPathPattern("/v1/cancelallorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_CancelAllOrders_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_CancelAllOrders_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelAllOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelAllOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7320,20 +7177,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetEvents", runtime.WithHTTPPathPattern("/v1/getevents")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetEvents", runtime.WithHTTPPathPattern("/v1/getevents")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetEvents_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetEvents_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetEvents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetEvents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7342,20 +7198,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddEvent", runtime.WithHTTPPathPattern("/v1/addevent")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddEvent", runtime.WithHTTPPathPattern("/v1/addevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_AddEvent_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_AddEvent_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_AddEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7364,20 +7219,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemoveEvent", runtime.WithHTTPPathPattern("/v1/removeevent")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemoveEvent", runtime.WithHTTPPathPattern("/v1/removeevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_RemoveEvent_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_RemoveEvent_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemoveEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_RemoveEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7386,20 +7240,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddresses", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddresses")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddresses", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddresses")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7408,20 +7261,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddress", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddress")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddress", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddress")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7430,20 +7282,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAvailableTransferChains", runtime.WithHTTPPathPattern("/v1/getavailabletransferchains")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAvailableTransferChains", runtime.WithHTTPPathPattern("/v1/getavailabletransferchains")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetAvailableTransferChains_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetAvailableTransferChains_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAvailableTransferChains_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAvailableTransferChains_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7452,20 +7303,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawFiatFunds", runtime.WithHTTPPathPattern("/v1/withdrawfiatfunds")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawFiatFunds", runtime.WithHTTPPathPattern("/v1/withdrawfiatfunds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WithdrawFiatFunds_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WithdrawFiatFunds_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawFiatFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawFiatFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7474,20 +7324,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawCryptocurrencyFunds", runtime.WithHTTPPathPattern("/v1/withdrawithdrawcryptofundswfiatfunds")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawCryptocurrencyFunds", runtime.WithHTTPPathPattern("/v1/withdrawithdrawcryptofundswfiatfunds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7496,20 +7345,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventByID", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyid")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventByID", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyid")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WithdrawalEventByID_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WithdrawalEventByID_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventByID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7518,20 +7366,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByExchange", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyexchange")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByExchange", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyexchange")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WithdrawalEventsByExchange_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WithdrawalEventsByExchange_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventsByExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7540,20 +7387,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByDate", runtime.WithHTTPPathPattern("/v1/withdrawaleventbydate")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByDate", runtime.WithHTTPPathPattern("/v1/withdrawaleventbydate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WithdrawalEventsByDate_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WithdrawalEventsByDate_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByDate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventsByDate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7562,20 +7408,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLoggerDetails", runtime.WithHTTPPathPattern("/v1/getloggerdetails")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLoggerDetails", runtime.WithHTTPPathPattern("/v1/getloggerdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetLoggerDetails_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetLoggerDetails_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetLoggerDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7584,20 +7429,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLoggerDetails", runtime.WithHTTPPathPattern("/v1/setloggerdetails")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLoggerDetails", runtime.WithHTTPPathPattern("/v1/setloggerdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SetLoggerDetails_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SetLoggerDetails_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetLoggerDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7606,20 +7450,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangePairs", runtime.WithHTTPPathPattern("/v1/getexchangepairs")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangePairs", runtime.WithHTTPPathPattern("/v1/getexchangepairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetExchangePairs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetExchangePairs_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangePairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7628,20 +7471,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangePair", runtime.WithHTTPPathPattern("/v1/setexchangepair")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangePair", runtime.WithHTTPPathPattern("/v1/setexchangepair")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SetExchangePair_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SetExchangePair_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangePair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangePair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7650,20 +7492,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookStream", runtime.WithHTTPPathPattern("/v1/getorderbookstream")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookStream", runtime.WithHTTPPathPattern("/v1/getorderbookstream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetOrderbookStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetOrderbookStream_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbookStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -7672,20 +7513,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOrderbookStream", runtime.WithHTTPPathPattern("/v1/getexchangeorderbookstream")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOrderbookStream", runtime.WithHTTPPathPattern("/v1/getexchangeorderbookstream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetExchangeOrderbookStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeOrderbookStream_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOrderbookStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeOrderbookStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -7694,20 +7534,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickerStream", runtime.WithHTTPPathPattern("/v1/gettickerstream")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickerStream", runtime.WithHTTPPathPattern("/v1/gettickerstream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetTickerStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetTickerStream_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTickerStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTickerStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -7716,20 +7555,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeTickerStream", runtime.WithHTTPPathPattern("/v1/getexchangetickerstream")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeTickerStream", runtime.WithHTTPPathPattern("/v1/getexchangetickerstream")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetExchangeTickerStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeTickerStream_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeTickerStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeTickerStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -7738,20 +7576,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAuditEvent", runtime.WithHTTPPathPattern("/v1/getauditevent")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAuditEvent", runtime.WithHTTPPathPattern("/v1/getauditevent")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetAuditEvent_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetAuditEvent_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAuditEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAuditEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7760,20 +7597,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptExecute", runtime.WithHTTPPathPattern("/v1/gctscript/execute")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptExecute", runtime.WithHTTPPathPattern("/v1/gctscript/execute")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GCTScriptExecute_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptExecute_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptExecute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptExecute_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7782,20 +7618,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptUpload", runtime.WithHTTPPathPattern("/v1/gctscript/upload")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptUpload", runtime.WithHTTPPathPattern("/v1/gctscript/upload")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GCTScriptUpload_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptUpload_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptUpload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptUpload_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7804,20 +7639,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptReadScript", runtime.WithHTTPPathPattern("/v1/gctscript/read")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptReadScript", runtime.WithHTTPPathPattern("/v1/gctscript/read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GCTScriptReadScript_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptReadScript_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptReadScript_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptReadScript_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7826,20 +7660,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStatus", runtime.WithHTTPPathPattern("/v1/gctscript/status")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStatus", runtime.WithHTTPPathPattern("/v1/gctscript/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GCTScriptStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptStatus_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7848,20 +7681,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptQuery", runtime.WithHTTPPathPattern("/v1/gctscript/query")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptQuery", runtime.WithHTTPPathPattern("/v1/gctscript/query")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GCTScriptQuery_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptQuery_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7870,20 +7702,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStop", runtime.WithHTTPPathPattern("/v1/gctscript/stop")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStop", runtime.WithHTTPPathPattern("/v1/gctscript/stop")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GCTScriptStop_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptStop_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStop_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7892,20 +7723,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStopAll", runtime.WithHTTPPathPattern("/v1/gctscript/stopall")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStopAll", runtime.WithHTTPPathPattern("/v1/gctscript/stopall")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GCTScriptStopAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptStopAll_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStopAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStopAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7914,20 +7744,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptListAll", runtime.WithHTTPPathPattern("/v1/gctscript/list")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptListAll", runtime.WithHTTPPathPattern("/v1/gctscript/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GCTScriptListAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptListAll_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptListAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptListAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7936,20 +7765,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptAutoLoadToggle", runtime.WithHTTPPathPattern("/v1/gctscript/autoload")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptAutoLoadToggle", runtime.WithHTTPPathPattern("/v1/gctscript/autoload")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7958,20 +7786,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricCandles", runtime.WithHTTPPathPattern("/v1/gethistoriccandles")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricCandles", runtime.WithHTTPPathPattern("/v1/gethistoriccandles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetHistoricCandles_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetHistoricCandles_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetHistoricCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetHistoricCandles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7980,20 +7807,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeAsset", runtime.WithHTTPPathPattern("/v1/setexchangeasset")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeAsset", runtime.WithHTTPPathPattern("/v1/setexchangeasset")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SetExchangeAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SetExchangeAsset_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangeAsset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8002,20 +7828,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetAllExchangePairs", runtime.WithHTTPPathPattern("/v1/setallexchangepairs")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetAllExchangePairs", runtime.WithHTTPPathPattern("/v1/setallexchangepairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SetAllExchangePairs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SetAllExchangePairs_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetAllExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetAllExchangePairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8024,20 +7849,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateExchangeSupportedPairs", runtime.WithHTTPPathPattern("/v1/updateexchangesupportedpairs")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateExchangeSupportedPairs", runtime.WithHTTPPathPattern("/v1/updateexchangesupportedpairs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8046,20 +7870,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeAssets", runtime.WithHTTPPathPattern("/v1/getexchangeassets")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeAssets", runtime.WithHTTPPathPattern("/v1/getexchangeassets")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetExchangeAssets_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeAssets_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeAssets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8068,20 +7891,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetInfo", runtime.WithHTTPPathPattern("/v1/websocketgetinfo")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetInfo", runtime.WithHTTPPathPattern("/v1/websocketgetinfo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WebsocketGetInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WebsocketGetInfo_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketGetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8090,20 +7912,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetEnabled", runtime.WithHTTPPathPattern("/v1/websocketsetenabled")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetEnabled", runtime.WithHTTPPathPattern("/v1/websocketsetenabled")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WebsocketSetEnabled_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WebsocketSetEnabled_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetEnabled_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetEnabled_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8112,20 +7933,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetSubscriptions", runtime.WithHTTPPathPattern("/v1/websocketgetsubscriptions")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetSubscriptions", runtime.WithHTTPPathPattern("/v1/websocketgetsubscriptions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WebsocketGetSubscriptions_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WebsocketGetSubscriptions_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetSubscriptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketGetSubscriptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8134,20 +7954,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetProxy", runtime.WithHTTPPathPattern("/v1/websocketsetproxy")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetProxy", runtime.WithHTTPPathPattern("/v1/websocketsetproxy")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WebsocketSetProxy_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WebsocketSetProxy_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetProxy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8156,20 +7975,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetURL", runtime.WithHTTPPathPattern("/v1/websocketseturl")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetURL", runtime.WithHTTPPathPattern("/v1/websocketseturl")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_WebsocketSetURL_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_WebsocketSetURL_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetURL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetURL_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8178,20 +7996,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRecentTrades", runtime.WithHTTPPathPattern("/v1/getrecenttrades")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRecentTrades", runtime.WithHTTPPathPattern("/v1/getrecenttrades")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetRecentTrades_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetRecentTrades_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRecentTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetRecentTrades_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8200,20 +8017,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricTrades", runtime.WithHTTPPathPattern("/v1/gethistorictrades")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricTrades", runtime.WithHTTPPathPattern("/v1/gethistorictrades")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetHistoricTrades_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetHistoricTrades_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetHistoricTrades_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetHistoricTrades_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -8222,20 +8038,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSavedTrades", runtime.WithHTTPPathPattern("/v1/getsavedtrades")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSavedTrades", runtime.WithHTTPPathPattern("/v1/getsavedtrades")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetSavedTrades_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetSavedTrades_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSavedTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetSavedTrades_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8244,20 +8059,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ConvertTradesToCandles", runtime.WithHTTPPathPattern("/v1/converttradestocandles")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ConvertTradesToCandles", runtime.WithHTTPPathPattern("/v1/converttradestocandles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_ConvertTradesToCandles_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_ConvertTradesToCandles_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ConvertTradesToCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_ConvertTradesToCandles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8266,20 +8080,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedCandleIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedcandleintervals")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedCandleIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedcandleintervals")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8288,20 +8101,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedTradeIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedtradeintervals")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedTradeIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedtradeintervals")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8310,20 +8122,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeTradeProcessing", runtime.WithHTTPPathPattern("/v1/setexchangetradeprocessing")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeTradeProcessing", runtime.WithHTTPPathPattern("/v1/setexchangetradeprocessing")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SetExchangeTradeProcessing_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SetExchangeTradeProcessing_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeTradeProcessing_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangeTradeProcessing_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8332,20 +8143,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpsertDataHistoryJob", runtime.WithHTTPPathPattern("/v1/upsertdatahistoryjob")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpsertDataHistoryJob", runtime.WithHTTPPathPattern("/v1/upsertdatahistoryjob")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_UpsertDataHistoryJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_UpsertDataHistoryJob_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpsertDataHistoryJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpsertDataHistoryJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8354,20 +8164,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobDetails", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobdetails")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobDetails", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobdetails")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetDataHistoryJobDetails_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetDataHistoryJobDetails_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8376,20 +8185,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetActiveDataHistoryJobs", runtime.WithHTTPPathPattern("/v1/getactivedatahistoryjobs")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetActiveDataHistoryJobs", runtime.WithHTTPPathPattern("/v1/getactivedatahistoryjobs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetActiveDataHistoryJobs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetActiveDataHistoryJobs_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8398,20 +8206,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobsBetween", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsbetween")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobsBetween", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsbetween")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetDataHistoryJobsBetween_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetDataHistoryJobsBetween_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8420,20 +8227,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobSummary", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsummary")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobSummary", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetDataHistoryJobSummary_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetDataHistoryJobSummary_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8442,20 +8248,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetDataHistoryJobStatus", runtime.WithHTTPPathPattern("/v1/setdatahistoryjobstatus")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetDataHistoryJobStatus", runtime.WithHTTPPathPattern("/v1/setdatahistoryjobstatus")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SetDataHistoryJobStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SetDataHistoryJobStatus_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetDataHistoryJobStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetDataHistoryJobStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8464,20 +8269,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateDataHistoryJobPrerequisite", runtime.WithHTTPPathPattern("/v1/updatedatahistoryjobprerequisite")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateDataHistoryJobPrerequisite", runtime.WithHTTPPathPattern("/v1/updatedatahistoryjobprerequisite")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8486,20 +8290,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedOrders", runtime.WithHTTPPathPattern("/v1/getmanagedorders")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedOrders", runtime.WithHTTPPathPattern("/v1/getmanagedorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetManagedOrders_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetManagedOrders_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetManagedOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetManagedOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8508,20 +8311,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ModifyOrder", runtime.WithHTTPPathPattern("/v1/modifyorder")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ModifyOrder", runtime.WithHTTPPathPattern("/v1/modifyorder")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_ModifyOrder_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_ModifyOrder_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ModifyOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_ModifyOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8530,20 +8332,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateGetAll", runtime.WithHTTPPathPattern("/v1/currencystategetall")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateGetAll", runtime.WithHTTPPathPattern("/v1/currencystategetall")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_CurrencyStateGetAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_CurrencyStateGetAll_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateGetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateGetAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8552,20 +8353,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTrading", runtime.WithHTTPPathPattern("/v1/currencystatetrading")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTrading", runtime.WithHTTPPathPattern("/v1/currencystatetrading")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_CurrencyStateTrading_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_CurrencyStateTrading_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTrading_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateTrading_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8574,20 +8374,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateDeposit", runtime.WithHTTPPathPattern("/v1/currencystatedeposit")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateDeposit", runtime.WithHTTPPathPattern("/v1/currencystatedeposit")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_CurrencyStateDeposit_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_CurrencyStateDeposit_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateDeposit_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8596,20 +8395,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateWithdraw", runtime.WithHTTPPathPattern("/v1/currencystatewithdraw")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateWithdraw", runtime.WithHTTPPathPattern("/v1/currencystatewithdraw")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_CurrencyStateWithdraw_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_CurrencyStateWithdraw_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateWithdraw_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateWithdraw_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8618,20 +8416,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTradingPair", runtime.WithHTTPPathPattern("/v1/currencystatetradingpair")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTradingPair", runtime.WithHTTPPathPattern("/v1/currencystatetradingpair")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_CurrencyStateTradingPair_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_CurrencyStateTradingPair_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTradingPair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateTradingPair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8640,20 +8437,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsSummary", runtime.WithHTTPPathPattern("/v1/getfuturespositionssummary")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsSummary", runtime.WithHTTPPathPattern("/v1/getfuturespositionssummary")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetFuturesPositionsSummary_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetFuturesPositionsSummary_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFuturesPositionsSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetFuturesPositionsSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8662,20 +8458,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsOrders", runtime.WithHTTPPathPattern("/v1/getfuturespositionsorders")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositionsOrders", runtime.WithHTTPPathPattern("/v1/getfuturespositionsorders")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetFuturesPositionsOrders_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetFuturesPositionsOrders_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFuturesPositionsOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetFuturesPositionsOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8684,20 +8479,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateral", runtime.WithHTTPPathPattern("/v1/getcollateral")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateral", runtime.WithHTTPPathPattern("/v1/getcollateral")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetCollateral_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetCollateral_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCollateral_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCollateral_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8706,20 +8500,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/Shutdown", runtime.WithHTTPPathPattern("/v1/shutdown")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/Shutdown", runtime.WithHTTPPathPattern("/v1/shutdown")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_Shutdown_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_Shutdown_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_Shutdown_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_Shutdown_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8728,20 +8521,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTechnicalAnalysis", runtime.WithHTTPPathPattern("/v1/gettechnicalanalysis")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTechnicalAnalysis", runtime.WithHTTPPathPattern("/v1/gettechnicalanalysis")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetTechnicalAnalysis_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetTechnicalAnalysis_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTechnicalAnalysis_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTechnicalAnalysis_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8750,20 +8542,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetMarginRatesHistory", runtime.WithHTTPPathPattern("/v1/getmarginrateshistory")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetMarginRatesHistory", runtime.WithHTTPPathPattern("/v1/getmarginrateshistory")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetMarginRatesHistory_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetMarginRatesHistory_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetMarginRatesHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetMarginRatesHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8772,20 +8563,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedPosition", runtime.WithHTTPPathPattern("/v1/getmanagedposition")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedPosition", runtime.WithHTTPPathPattern("/v1/getmanagedposition")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetManagedPosition_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetManagedPosition_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetManagedPosition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetManagedPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8794,20 +8584,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAllManagedPositions", runtime.WithHTTPPathPattern("/v1/getallmanagedpositions")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAllManagedPositions", runtime.WithHTTPPathPattern("/v1/getallmanagedpositions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetAllManagedPositions_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetAllManagedPositions_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAllManagedPositions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAllManagedPositions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8816,20 +8605,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFundingRates", runtime.WithHTTPPathPattern("/v1/getfundingrates")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFundingRates", runtime.WithHTTPPathPattern("/v1/getfundingrates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetFundingRates_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetFundingRates_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFundingRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetFundingRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8838,20 +8626,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLatestFundingRate", runtime.WithHTTPPathPattern("/v1/getlatestfundingrate")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLatestFundingRate", runtime.WithHTTPPathPattern("/v1/getlatestfundingrate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetLatestFundingRate_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetLatestFundingRate_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLatestFundingRate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetLatestFundingRate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8860,20 +8647,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookMovement", runtime.WithHTTPPathPattern("/v1/getorderbookmovement")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookMovement", runtime.WithHTTPPathPattern("/v1/getorderbookmovement")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetOrderbookMovement_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetOrderbookMovement_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookMovement_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbookMovement_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8882,20 +8668,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByNominal", runtime.WithHTTPPathPattern("/v1/getorderbookamountbynominal")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByNominal", runtime.WithHTTPPathPattern("/v1/getorderbookamountbynominal")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetOrderbookAmountByNominal_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetOrderbookAmountByNominal_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookAmountByNominal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbookAmountByNominal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8904,20 +8689,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByImpact", runtime.WithHTTPPathPattern("/v1/getorderbookamountbyimpact")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookAmountByImpact", runtime.WithHTTPPathPattern("/v1/getorderbookamountbyimpact")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetOrderbookAmountByImpact_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetOrderbookAmountByImpact_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookAmountByImpact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbookAmountByImpact_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8926,20 +8710,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetCollateralMode_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetCollateralMode_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCollateralMode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCollateralMode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8948,20 +8731,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetLeverage_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetLeverage_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLeverage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetLeverage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8970,20 +8752,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetCollateralMode", runtime.WithHTTPPathPattern("/v1/getcollateralmode")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SetCollateralMode_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SetCollateralMode_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetCollateralMode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetCollateralMode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -8992,20 +8773,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetMarginType", runtime.WithHTTPPathPattern("/v1/getmargintype")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetMarginType", runtime.WithHTTPPathPattern("/v1/getmargintype")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SetMarginType_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SetMarginType_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetMarginType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetMarginType_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -9014,20 +8794,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLeverage", runtime.WithHTTPPathPattern("/v1/getleverage")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_SetLeverage_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_SetLeverage_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetLeverage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetLeverage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -9036,20 +8815,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ChangePositionMargin", runtime.WithHTTPPathPattern("/v1/changepositionmargin")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ChangePositionMargin", runtime.WithHTTPPathPattern("/v1/changepositionmargin")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_ChangePositionMargin_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_ChangePositionMargin_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ChangePositionMargin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_ChangePositionMargin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -9058,20 +8836,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOpenInterest", runtime.WithHTTPPathPattern("/v1/getopeninterest")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOpenInterest", runtime.WithHTTPPathPattern("/v1/getopeninterest")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetOpenInterest_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetOpenInterest_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOpenInterest_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOpenInterest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -9080,20 +8857,19 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCurrencyTradeURL", runtime.WithHTTPPathPattern("/v1/getcurrencytradeurl")) + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCurrencyTradeURL", runtime.WithHTTPPathPattern("/v1/getcurrencytradeurl")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetCurrencyTradeURL_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_GoCryptoTraderService_GetCurrencyTradeURL_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCurrencyTradeURL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCurrencyTradeURL_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/gctrpc/rpc.proto b/gctrpc/rpc.proto index da69835d008..cd7035444ff 100644 --- a/gctrpc/rpc.proto +++ b/gctrpc/rpc.proto @@ -571,7 +571,7 @@ message WithdrawalRequestEvent { string currency = 2; string description = 3; double amount = 4; - int32 type = 5; + int64 type = 5; FiatWithdrawalEvent fiat = 6; CryptoWithdrawalEvent crypto = 7; } @@ -892,15 +892,15 @@ message UpsertDataHistoryJobRequest { string start_date = 5; string end_date = 6; int64 interval = 7; - int64 request_size_limit = 8; + uint64 request_size_limit = 8; int64 data_type = 9; - int64 max_retry_attempts = 10; - int64 batch_size = 11; + uint64 max_retry_attempts = 10; + uint64 batch_size = 11; bool insert_only = 12; int64 conversion_interval = 13; bool overwrite_existing_data = 14; string prerequisite_job_nickname = 15; - int64 decimal_place_comparison = 16; + uint64 decimal_place_comparison = 16; string secondary_exchange_name = 17; double issue_tolerance_percentage = 18; bool replace_on_issue = 19; @@ -934,15 +934,15 @@ message DataHistoryJob { string start_date = 6; string end_date = 7; int64 interval = 8; - int64 request_size_limit = 9; - int64 max_retry_attempts = 10; - int64 batch_size = 11; + uint64 request_size_limit = 9; + uint64 max_retry_attempts = 10; + uint64 batch_size = 11; string status = 12; string data_type = 13; int64 conversion_interval = 14; bool overwrite_existing_data = 15; string prerequisite_job_nickname = 16; - int64 decimal_place_comparison = 17; + uint64 decimal_place_comparison = 17; string secondary_exchange_name = 18; double issue_tolerance_percentage = 19; bool replace_on_issue = 20; diff --git a/gctrpc/rpc.swagger.json b/gctrpc/rpc.swagger.json index c9c4c46fa10..d1919a29e47 100644 --- a/gctrpc/rpc.swagger.json +++ b/gctrpc/rpc.swagger.json @@ -4784,7 +4784,6 @@ "currencies": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcAccountCurrencyInfo" } } @@ -4916,7 +4915,6 @@ "orders": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOrders" } }, @@ -4958,7 +4956,6 @@ "orders": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOrders" } } @@ -5282,7 +5279,6 @@ "currencyStates": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcCurrencyState" } } @@ -5318,15 +5314,15 @@ }, "requestSizeLimit": { "type": "string", - "format": "int64" + "format": "uint64" }, "maxRetryAttempts": { "type": "string", - "format": "int64" + "format": "uint64" }, "batchSize": { "type": "string", - "format": "int64" + "format": "uint64" }, "status": { "type": "string" @@ -5346,7 +5342,7 @@ }, "decimalPlaceComparison": { "type": "string", - "format": "int64" + "format": "uint64" }, "secondaryExchangeName": { "type": "string" @@ -5361,7 +5357,6 @@ "jobResults": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcDataHistoryJobResult" } }, @@ -5399,7 +5394,6 @@ "results": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcDataHistoryJob" } } @@ -5425,7 +5419,6 @@ "addresses": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcDepositAddress" } } @@ -5547,7 +5540,6 @@ "rates": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcFundingRate" } }, @@ -5637,7 +5629,6 @@ "orders": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOrderDetails" } }, @@ -5797,7 +5788,6 @@ "scripts": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcGCTScript" } } @@ -5863,7 +5853,6 @@ "accounts": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcAccount" } } @@ -5875,7 +5864,6 @@ "events": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcAuditEvent" } } @@ -5950,14 +5938,12 @@ "currencyBreakdown": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcCollateralForCurrency" } }, "positionBreakdown": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcCollateralByPosition" } } @@ -6166,7 +6152,6 @@ "forexProviders": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcForexProvider" } } @@ -6178,7 +6163,6 @@ "forexRates": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcForexRatesConversion" } } @@ -6198,7 +6182,6 @@ "positions": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcFuturePosition" } } @@ -6242,7 +6225,6 @@ "candle": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcCandle" } } @@ -6340,7 +6322,6 @@ "positions": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcFuturePosition" } } @@ -6352,7 +6333,6 @@ "rates": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcMarginRate" } }, @@ -6389,7 +6369,6 @@ "data": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOpenInterestDataResponse" } } @@ -6575,7 +6554,6 @@ "orderbooks": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOrderbooks" } } @@ -6607,7 +6585,6 @@ "orders": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOrderDetails" } } @@ -6619,7 +6596,6 @@ "portfolio": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcPortfolioAddress" } } @@ -6631,14 +6607,12 @@ "coinTotals": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcCoin" } }, "coinsOffline": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcCoin" } }, @@ -6651,7 +6625,6 @@ "coinsOnline": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcCoin" } }, @@ -6716,7 +6689,6 @@ "tickers": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcTickers" } } @@ -6804,7 +6776,6 @@ "addresses": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOfflineCoinSummary" } } @@ -6922,7 +6893,6 @@ "trades": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcTradeHistory" } }, @@ -6961,14 +6931,12 @@ "bids": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOrderbookItem" } }, "asks": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOrderbookItem" } }, @@ -6993,7 +6961,6 @@ "orderbooks": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOrderbookResponse" } } @@ -7113,7 +7080,6 @@ "trades": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcSavedTrades" } } @@ -7174,7 +7140,6 @@ "pairs": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcCurrencyPair" } }, @@ -7311,7 +7276,6 @@ "orders": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcOrderbookItem" } }, @@ -7382,7 +7346,6 @@ "trades": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcTrades" } } @@ -7440,7 +7403,6 @@ "tickers": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcTickerResponse" } } @@ -7541,7 +7503,7 @@ }, "requestSizeLimit": { "type": "string", - "format": "int64" + "format": "uint64" }, "dataType": { "type": "string", @@ -7549,11 +7511,11 @@ }, "maxRetryAttempts": { "type": "string", - "format": "int64" + "format": "uint64" }, "batchSize": { "type": "string", - "format": "int64" + "format": "uint64" }, "insertOnly": { "type": "boolean" @@ -7570,7 +7532,7 @@ }, "decimalPlaceComparison": { "type": "string", - "format": "int64" + "format": "uint64" }, "secondaryExchangeName": { "type": "string" @@ -7630,7 +7592,6 @@ "subscriptions": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcWebsocketSubscription" } } @@ -7820,7 +7781,6 @@ "event": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/gctrpcWithdrawalEventResponse" } } @@ -7840,8 +7800,8 @@ "format": "double" }, "type": { - "type": "integer", - "format": "int32" + "type": "string", + "format": "int64" }, "fiat": { "$ref": "#/definitions/gctrpcFiatWithdrawalEvent" @@ -7887,7 +7847,6 @@ "details": { "type": "array", "items": { - "type": "object", "$ref": "#/definitions/protobufAny" } } diff --git a/gctrpc/rpc_grpc.pb.go b/gctrpc/rpc_grpc.pb.go index 460dd36e3b6..7a0e4394251 100644 --- a/gctrpc/rpc_grpc.pb.go +++ b/gctrpc/rpc_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.4.0 // - protoc (unknown) // source: rpc.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( GoCryptoTraderService_GetInfo_FullMethodName = "/gctrpc.GoCryptoTraderService/GetInfo" @@ -266,8 +266,9 @@ func NewGoCryptoTraderServiceClient(cc grpc.ClientConnInterface) GoCryptoTraderS } func (c *goCryptoTraderServiceClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetInfoResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -275,8 +276,9 @@ func (c *goCryptoTraderServiceClient) GetInfo(ctx context.Context, in *GetInfoRe } func (c *goCryptoTraderServiceClient) GetSubsystems(ctx context.Context, in *GetSubsystemsRequest, opts ...grpc.CallOption) (*GetSusbsytemsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetSusbsytemsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetSubsystems_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetSubsystems_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -284,8 +286,9 @@ func (c *goCryptoTraderServiceClient) GetSubsystems(ctx context.Context, in *Get } func (c *goCryptoTraderServiceClient) EnableSubsystem(ctx context.Context, in *GenericSubsystemRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_EnableSubsystem_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_EnableSubsystem_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -293,8 +296,9 @@ func (c *goCryptoTraderServiceClient) EnableSubsystem(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) DisableSubsystem(ctx context.Context, in *GenericSubsystemRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_DisableSubsystem_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_DisableSubsystem_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -302,8 +306,9 @@ func (c *goCryptoTraderServiceClient) DisableSubsystem(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) GetRPCEndpoints(ctx context.Context, in *GetRPCEndpointsRequest, opts ...grpc.CallOption) (*GetRPCEndpointsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetRPCEndpointsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetRPCEndpoints_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetRPCEndpoints_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -311,8 +316,9 @@ func (c *goCryptoTraderServiceClient) GetRPCEndpoints(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetCommunicationRelayers(ctx context.Context, in *GetCommunicationRelayersRequest, opts ...grpc.CallOption) (*GetCommunicationRelayersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCommunicationRelayersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCommunicationRelayers_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCommunicationRelayers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -320,8 +326,9 @@ func (c *goCryptoTraderServiceClient) GetCommunicationRelayers(ctx context.Conte } func (c *goCryptoTraderServiceClient) GetExchanges(ctx context.Context, in *GetExchangesRequest, opts ...grpc.CallOption) (*GetExchangesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchanges_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchanges_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -329,8 +336,9 @@ func (c *goCryptoTraderServiceClient) GetExchanges(ctx context.Context, in *GetE } func (c *goCryptoTraderServiceClient) DisableExchange(ctx context.Context, in *GenericExchangeNameRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_DisableExchange_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_DisableExchange_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -338,8 +346,9 @@ func (c *goCryptoTraderServiceClient) DisableExchange(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetExchangeInfo(ctx context.Context, in *GenericExchangeNameRequest, opts ...grpc.CallOption) (*GetExchangeInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangeInfoResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -347,8 +356,9 @@ func (c *goCryptoTraderServiceClient) GetExchangeInfo(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetExchangeOTPCode(ctx context.Context, in *GenericExchangeNameRequest, opts ...grpc.CallOption) (*GetExchangeOTPResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangeOTPResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeOTPCode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeOTPCode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -356,8 +366,9 @@ func (c *goCryptoTraderServiceClient) GetExchangeOTPCode(ctx context.Context, in } func (c *goCryptoTraderServiceClient) GetExchangeOTPCodes(ctx context.Context, in *GetExchangeOTPsRequest, opts ...grpc.CallOption) (*GetExchangeOTPsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangeOTPsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeOTPCodes_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeOTPCodes_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -365,8 +376,9 @@ func (c *goCryptoTraderServiceClient) GetExchangeOTPCodes(ctx context.Context, i } func (c *goCryptoTraderServiceClient) EnableExchange(ctx context.Context, in *GenericExchangeNameRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_EnableExchange_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_EnableExchange_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -374,8 +386,9 @@ func (c *goCryptoTraderServiceClient) EnableExchange(ctx context.Context, in *Ge } func (c *goCryptoTraderServiceClient) GetTicker(ctx context.Context, in *GetTickerRequest, opts ...grpc.CallOption) (*TickerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(TickerResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTicker_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTicker_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -383,8 +396,9 @@ func (c *goCryptoTraderServiceClient) GetTicker(ctx context.Context, in *GetTick } func (c *goCryptoTraderServiceClient) GetTickers(ctx context.Context, in *GetTickersRequest, opts ...grpc.CallOption) (*GetTickersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetTickersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTickers_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTickers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -392,8 +406,9 @@ func (c *goCryptoTraderServiceClient) GetTickers(ctx context.Context, in *GetTic } func (c *goCryptoTraderServiceClient) GetOrderbook(ctx context.Context, in *GetOrderbookRequest, opts ...grpc.CallOption) (*OrderbookResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OrderbookResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbook_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbook_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -401,8 +416,9 @@ func (c *goCryptoTraderServiceClient) GetOrderbook(ctx context.Context, in *GetO } func (c *goCryptoTraderServiceClient) GetOrderbooks(ctx context.Context, in *GetOrderbooksRequest, opts ...grpc.CallOption) (*GetOrderbooksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrderbooksResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbooks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbooks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -410,8 +426,9 @@ func (c *goCryptoTraderServiceClient) GetOrderbooks(ctx context.Context, in *Get } func (c *goCryptoTraderServiceClient) GetAccountInfo(ctx context.Context, in *GetAccountInfoRequest, opts ...grpc.CallOption) (*GetAccountInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAccountInfoResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAccountInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAccountInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -419,8 +436,9 @@ func (c *goCryptoTraderServiceClient) GetAccountInfo(ctx context.Context, in *Ge } func (c *goCryptoTraderServiceClient) UpdateAccountInfo(ctx context.Context, in *GetAccountInfoRequest, opts ...grpc.CallOption) (*GetAccountInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAccountInfoResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateAccountInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateAccountInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -428,11 +446,12 @@ func (c *goCryptoTraderServiceClient) UpdateAccountInfo(ctx context.Context, in } func (c *goCryptoTraderServiceClient) GetAccountInfoStream(ctx context.Context, in *GetAccountInfoRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetAccountInfoStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[0], GoCryptoTraderService_GetAccountInfoStream_FullMethodName, opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[0], GoCryptoTraderService_GetAccountInfoStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetAccountInfoStreamClient{stream} + x := &goCryptoTraderServiceGetAccountInfoStreamClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -460,8 +479,9 @@ func (x *goCryptoTraderServiceGetAccountInfoStreamClient) Recv() (*GetAccountInf } func (c *goCryptoTraderServiceClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetConfigResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetConfig_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetConfig_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -469,8 +489,9 @@ func (c *goCryptoTraderServiceClient) GetConfig(ctx context.Context, in *GetConf } func (c *goCryptoTraderServiceClient) GetPortfolio(ctx context.Context, in *GetPortfolioRequest, opts ...grpc.CallOption) (*GetPortfolioResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPortfolioResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetPortfolio_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetPortfolio_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -478,8 +499,9 @@ func (c *goCryptoTraderServiceClient) GetPortfolio(ctx context.Context, in *GetP } func (c *goCryptoTraderServiceClient) GetPortfolioSummary(ctx context.Context, in *GetPortfolioSummaryRequest, opts ...grpc.CallOption) (*GetPortfolioSummaryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPortfolioSummaryResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetPortfolioSummary_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetPortfolioSummary_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -487,8 +509,9 @@ func (c *goCryptoTraderServiceClient) GetPortfolioSummary(ctx context.Context, i } func (c *goCryptoTraderServiceClient) AddPortfolioAddress(ctx context.Context, in *AddPortfolioAddressRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_AddPortfolioAddress_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_AddPortfolioAddress_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -496,8 +519,9 @@ func (c *goCryptoTraderServiceClient) AddPortfolioAddress(ctx context.Context, i } func (c *goCryptoTraderServiceClient) RemovePortfolioAddress(ctx context.Context, in *RemovePortfolioAddressRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_RemovePortfolioAddress_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_RemovePortfolioAddress_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -505,8 +529,9 @@ func (c *goCryptoTraderServiceClient) RemovePortfolioAddress(ctx context.Context } func (c *goCryptoTraderServiceClient) GetForexProviders(ctx context.Context, in *GetForexProvidersRequest, opts ...grpc.CallOption) (*GetForexProvidersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetForexProvidersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetForexProviders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetForexProviders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -514,8 +539,9 @@ func (c *goCryptoTraderServiceClient) GetForexProviders(ctx context.Context, in } func (c *goCryptoTraderServiceClient) GetForexRates(ctx context.Context, in *GetForexRatesRequest, opts ...grpc.CallOption) (*GetForexRatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetForexRatesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetForexRates_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetForexRates_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -523,8 +549,9 @@ func (c *goCryptoTraderServiceClient) GetForexRates(ctx context.Context, in *Get } func (c *goCryptoTraderServiceClient) GetOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (*GetOrdersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrdersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -532,8 +559,9 @@ func (c *goCryptoTraderServiceClient) GetOrders(ctx context.Context, in *GetOrde } func (c *goCryptoTraderServiceClient) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*OrderDetails, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OrderDetails) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -541,8 +569,9 @@ func (c *goCryptoTraderServiceClient) GetOrder(ctx context.Context, in *GetOrder } func (c *goCryptoTraderServiceClient) SubmitOrder(ctx context.Context, in *SubmitOrderRequest, opts ...grpc.CallOption) (*SubmitOrderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SubmitOrderResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SubmitOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SubmitOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -550,8 +579,9 @@ func (c *goCryptoTraderServiceClient) SubmitOrder(ctx context.Context, in *Submi } func (c *goCryptoTraderServiceClient) SimulateOrder(ctx context.Context, in *SimulateOrderRequest, opts ...grpc.CallOption) (*SimulateOrderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SimulateOrderResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SimulateOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SimulateOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -559,8 +589,9 @@ func (c *goCryptoTraderServiceClient) SimulateOrder(ctx context.Context, in *Sim } func (c *goCryptoTraderServiceClient) WhaleBomb(ctx context.Context, in *WhaleBombRequest, opts ...grpc.CallOption) (*SimulateOrderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SimulateOrderResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WhaleBomb_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WhaleBomb_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -568,8 +599,9 @@ func (c *goCryptoTraderServiceClient) WhaleBomb(ctx context.Context, in *WhaleBo } func (c *goCryptoTraderServiceClient) CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -577,8 +609,9 @@ func (c *goCryptoTraderServiceClient) CancelOrder(ctx context.Context, in *Cance } func (c *goCryptoTraderServiceClient) CancelBatchOrders(ctx context.Context, in *CancelBatchOrdersRequest, opts ...grpc.CallOption) (*CancelBatchOrdersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CancelBatchOrdersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelBatchOrders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelBatchOrders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -586,8 +619,9 @@ func (c *goCryptoTraderServiceClient) CancelBatchOrders(ctx context.Context, in } func (c *goCryptoTraderServiceClient) CancelAllOrders(ctx context.Context, in *CancelAllOrdersRequest, opts ...grpc.CallOption) (*CancelAllOrdersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CancelAllOrdersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelAllOrders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CancelAllOrders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -595,8 +629,9 @@ func (c *goCryptoTraderServiceClient) CancelAllOrders(ctx context.Context, in *C } func (c *goCryptoTraderServiceClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetEventsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetEvents_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetEvents_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -604,8 +639,9 @@ func (c *goCryptoTraderServiceClient) GetEvents(ctx context.Context, in *GetEven } func (c *goCryptoTraderServiceClient) AddEvent(ctx context.Context, in *AddEventRequest, opts ...grpc.CallOption) (*AddEventResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddEventResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_AddEvent_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_AddEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -613,8 +649,9 @@ func (c *goCryptoTraderServiceClient) AddEvent(ctx context.Context, in *AddEvent } func (c *goCryptoTraderServiceClient) RemoveEvent(ctx context.Context, in *RemoveEventRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_RemoveEvent_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_RemoveEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -622,8 +659,9 @@ func (c *goCryptoTraderServiceClient) RemoveEvent(ctx context.Context, in *Remov } func (c *goCryptoTraderServiceClient) GetCryptocurrencyDepositAddresses(ctx context.Context, in *GetCryptocurrencyDepositAddressesRequest, opts ...grpc.CallOption) (*GetCryptocurrencyDepositAddressesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCryptocurrencyDepositAddressesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCryptocurrencyDepositAddresses_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCryptocurrencyDepositAddresses_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -631,8 +669,9 @@ func (c *goCryptoTraderServiceClient) GetCryptocurrencyDepositAddresses(ctx cont } func (c *goCryptoTraderServiceClient) GetCryptocurrencyDepositAddress(ctx context.Context, in *GetCryptocurrencyDepositAddressRequest, opts ...grpc.CallOption) (*GetCryptocurrencyDepositAddressResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCryptocurrencyDepositAddressResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCryptocurrencyDepositAddress_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCryptocurrencyDepositAddress_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -640,8 +679,9 @@ func (c *goCryptoTraderServiceClient) GetCryptocurrencyDepositAddress(ctx contex } func (c *goCryptoTraderServiceClient) GetAvailableTransferChains(ctx context.Context, in *GetAvailableTransferChainsRequest, opts ...grpc.CallOption) (*GetAvailableTransferChainsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAvailableTransferChainsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAvailableTransferChains_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAvailableTransferChains_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -649,8 +689,9 @@ func (c *goCryptoTraderServiceClient) GetAvailableTransferChains(ctx context.Con } func (c *goCryptoTraderServiceClient) WithdrawFiatFunds(ctx context.Context, in *WithdrawFiatRequest, opts ...grpc.CallOption) (*WithdrawResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WithdrawResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawFiatFunds_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawFiatFunds_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -658,8 +699,9 @@ func (c *goCryptoTraderServiceClient) WithdrawFiatFunds(ctx context.Context, in } func (c *goCryptoTraderServiceClient) WithdrawCryptocurrencyFunds(ctx context.Context, in *WithdrawCryptoRequest, opts ...grpc.CallOption) (*WithdrawResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WithdrawResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawCryptocurrencyFunds_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawCryptocurrencyFunds_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -667,8 +709,9 @@ func (c *goCryptoTraderServiceClient) WithdrawCryptocurrencyFunds(ctx context.Co } func (c *goCryptoTraderServiceClient) WithdrawalEventByID(ctx context.Context, in *WithdrawalEventByIDRequest, opts ...grpc.CallOption) (*WithdrawalEventByIDResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WithdrawalEventByIDResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventByID_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventByID_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -676,8 +719,9 @@ func (c *goCryptoTraderServiceClient) WithdrawalEventByID(ctx context.Context, i } func (c *goCryptoTraderServiceClient) WithdrawalEventsByExchange(ctx context.Context, in *WithdrawalEventsByExchangeRequest, opts ...grpc.CallOption) (*WithdrawalEventsByExchangeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WithdrawalEventsByExchangeResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventsByExchange_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventsByExchange_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -685,8 +729,9 @@ func (c *goCryptoTraderServiceClient) WithdrawalEventsByExchange(ctx context.Con } func (c *goCryptoTraderServiceClient) WithdrawalEventsByDate(ctx context.Context, in *WithdrawalEventsByDateRequest, opts ...grpc.CallOption) (*WithdrawalEventsByExchangeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WithdrawalEventsByExchangeResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventsByDate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WithdrawalEventsByDate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -694,8 +739,9 @@ func (c *goCryptoTraderServiceClient) WithdrawalEventsByDate(ctx context.Context } func (c *goCryptoTraderServiceClient) GetLoggerDetails(ctx context.Context, in *GetLoggerDetailsRequest, opts ...grpc.CallOption) (*GetLoggerDetailsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLoggerDetailsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLoggerDetails_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLoggerDetails_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -703,8 +749,9 @@ func (c *goCryptoTraderServiceClient) GetLoggerDetails(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) SetLoggerDetails(ctx context.Context, in *SetLoggerDetailsRequest, opts ...grpc.CallOption) (*GetLoggerDetailsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLoggerDetailsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetLoggerDetails_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetLoggerDetails_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -712,8 +759,9 @@ func (c *goCryptoTraderServiceClient) SetLoggerDetails(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) GetExchangePairs(ctx context.Context, in *GetExchangePairsRequest, opts ...grpc.CallOption) (*GetExchangePairsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangePairsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangePairs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangePairs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -721,8 +769,9 @@ func (c *goCryptoTraderServiceClient) GetExchangePairs(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) SetExchangePair(ctx context.Context, in *SetExchangePairRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangePair_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangePair_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -730,11 +779,12 @@ func (c *goCryptoTraderServiceClient) SetExchangePair(ctx context.Context, in *S } func (c *goCryptoTraderServiceClient) GetOrderbookStream(ctx context.Context, in *GetOrderbookStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetOrderbookStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[1], GoCryptoTraderService_GetOrderbookStream_FullMethodName, opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[1], GoCryptoTraderService_GetOrderbookStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetOrderbookStreamClient{stream} + x := &goCryptoTraderServiceGetOrderbookStreamClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -762,11 +812,12 @@ func (x *goCryptoTraderServiceGetOrderbookStreamClient) Recv() (*OrderbookRespon } func (c *goCryptoTraderServiceClient) GetExchangeOrderbookStream(ctx context.Context, in *GetExchangeOrderbookStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetExchangeOrderbookStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[2], GoCryptoTraderService_GetExchangeOrderbookStream_FullMethodName, opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[2], GoCryptoTraderService_GetExchangeOrderbookStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetExchangeOrderbookStreamClient{stream} + x := &goCryptoTraderServiceGetExchangeOrderbookStreamClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -794,11 +845,12 @@ func (x *goCryptoTraderServiceGetExchangeOrderbookStreamClient) Recv() (*Orderbo } func (c *goCryptoTraderServiceClient) GetTickerStream(ctx context.Context, in *GetTickerStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetTickerStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[3], GoCryptoTraderService_GetTickerStream_FullMethodName, opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[3], GoCryptoTraderService_GetTickerStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetTickerStreamClient{stream} + x := &goCryptoTraderServiceGetTickerStreamClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -826,11 +878,12 @@ func (x *goCryptoTraderServiceGetTickerStreamClient) Recv() (*TickerResponse, er } func (c *goCryptoTraderServiceClient) GetExchangeTickerStream(ctx context.Context, in *GetExchangeTickerStreamRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetExchangeTickerStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[4], GoCryptoTraderService_GetExchangeTickerStream_FullMethodName, opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[4], GoCryptoTraderService_GetExchangeTickerStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetExchangeTickerStreamClient{stream} + x := &goCryptoTraderServiceGetExchangeTickerStreamClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -858,8 +911,9 @@ func (x *goCryptoTraderServiceGetExchangeTickerStreamClient) Recv() (*TickerResp } func (c *goCryptoTraderServiceClient) GetAuditEvent(ctx context.Context, in *GetAuditEventRequest, opts ...grpc.CallOption) (*GetAuditEventResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAuditEventResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAuditEvent_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAuditEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -867,8 +921,9 @@ func (c *goCryptoTraderServiceClient) GetAuditEvent(ctx context.Context, in *Get } func (c *goCryptoTraderServiceClient) GCTScriptExecute(ctx context.Context, in *GCTScriptExecuteRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptExecute_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptExecute_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -876,8 +931,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptExecute(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) GCTScriptUpload(ctx context.Context, in *GCTScriptUploadRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptUpload_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptUpload_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -885,8 +941,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptUpload(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GCTScriptReadScript(ctx context.Context, in *GCTScriptReadScriptRequest, opts ...grpc.CallOption) (*GCTScriptQueryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GCTScriptQueryResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptReadScript_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptReadScript_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -894,8 +951,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptReadScript(ctx context.Context, i } func (c *goCryptoTraderServiceClient) GCTScriptStatus(ctx context.Context, in *GCTScriptStatusRequest, opts ...grpc.CallOption) (*GCTScriptStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GCTScriptStatusResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -903,8 +961,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptStatus(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GCTScriptQuery(ctx context.Context, in *GCTScriptQueryRequest, opts ...grpc.CallOption) (*GCTScriptQueryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GCTScriptQueryResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptQuery_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptQuery_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -912,8 +971,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptQuery(ctx context.Context, in *GC } func (c *goCryptoTraderServiceClient) GCTScriptStop(ctx context.Context, in *GCTScriptStopRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStop_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStop_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -921,8 +981,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptStop(ctx context.Context, in *GCT } func (c *goCryptoTraderServiceClient) GCTScriptStopAll(ctx context.Context, in *GCTScriptStopAllRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStopAll_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptStopAll_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -930,8 +991,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptStopAll(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) GCTScriptListAll(ctx context.Context, in *GCTScriptListAllRequest, opts ...grpc.CallOption) (*GCTScriptStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GCTScriptStatusResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptListAll_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptListAll_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -939,8 +1001,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptListAll(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) GCTScriptAutoLoadToggle(ctx context.Context, in *GCTScriptAutoLoadRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptAutoLoadToggle_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GCTScriptAutoLoadToggle_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -948,8 +1011,9 @@ func (c *goCryptoTraderServiceClient) GCTScriptAutoLoadToggle(ctx context.Contex } func (c *goCryptoTraderServiceClient) GetHistoricCandles(ctx context.Context, in *GetHistoricCandlesRequest, opts ...grpc.CallOption) (*GetHistoricCandlesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetHistoricCandlesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetHistoricCandles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetHistoricCandles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -957,8 +1021,9 @@ func (c *goCryptoTraderServiceClient) GetHistoricCandles(ctx context.Context, in } func (c *goCryptoTraderServiceClient) SetExchangeAsset(ctx context.Context, in *SetExchangeAssetRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangeAsset_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangeAsset_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -966,8 +1031,9 @@ func (c *goCryptoTraderServiceClient) SetExchangeAsset(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) SetAllExchangePairs(ctx context.Context, in *SetExchangeAllPairsRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetAllExchangePairs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetAllExchangePairs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -975,8 +1041,9 @@ func (c *goCryptoTraderServiceClient) SetAllExchangePairs(ctx context.Context, i } func (c *goCryptoTraderServiceClient) UpdateExchangeSupportedPairs(ctx context.Context, in *UpdateExchangeSupportedPairsRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateExchangeSupportedPairs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateExchangeSupportedPairs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -984,8 +1051,9 @@ func (c *goCryptoTraderServiceClient) UpdateExchangeSupportedPairs(ctx context.C } func (c *goCryptoTraderServiceClient) GetExchangeAssets(ctx context.Context, in *GetExchangeAssetsRequest, opts ...grpc.CallOption) (*GetExchangeAssetsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetExchangeAssetsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeAssets_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetExchangeAssets_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -993,8 +1061,9 @@ func (c *goCryptoTraderServiceClient) GetExchangeAssets(ctx context.Context, in } func (c *goCryptoTraderServiceClient) WebsocketGetInfo(ctx context.Context, in *WebsocketGetInfoRequest, opts ...grpc.CallOption) (*WebsocketGetInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WebsocketGetInfoResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketGetInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketGetInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1002,8 +1071,9 @@ func (c *goCryptoTraderServiceClient) WebsocketGetInfo(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) WebsocketSetEnabled(ctx context.Context, in *WebsocketSetEnabledRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetEnabled_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetEnabled_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1011,8 +1081,9 @@ func (c *goCryptoTraderServiceClient) WebsocketSetEnabled(ctx context.Context, i } func (c *goCryptoTraderServiceClient) WebsocketGetSubscriptions(ctx context.Context, in *WebsocketGetSubscriptionsRequest, opts ...grpc.CallOption) (*WebsocketGetSubscriptionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WebsocketGetSubscriptionsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketGetSubscriptions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketGetSubscriptions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1020,8 +1091,9 @@ func (c *goCryptoTraderServiceClient) WebsocketGetSubscriptions(ctx context.Cont } func (c *goCryptoTraderServiceClient) WebsocketSetProxy(ctx context.Context, in *WebsocketSetProxyRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetProxy_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetProxy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1029,8 +1101,9 @@ func (c *goCryptoTraderServiceClient) WebsocketSetProxy(ctx context.Context, in } func (c *goCryptoTraderServiceClient) WebsocketSetURL(ctx context.Context, in *WebsocketSetURLRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetURL_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_WebsocketSetURL_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1038,8 +1111,9 @@ func (c *goCryptoTraderServiceClient) WebsocketSetURL(ctx context.Context, in *W } func (c *goCryptoTraderServiceClient) GetRecentTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (*SavedTradesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SavedTradesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetRecentTrades_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetRecentTrades_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1047,11 +1121,12 @@ func (c *goCryptoTraderServiceClient) GetRecentTrades(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetHistoricTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (GoCryptoTraderService_GetHistoricTradesClient, error) { - stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[5], GoCryptoTraderService_GetHistoricTrades_FullMethodName, opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GoCryptoTraderService_ServiceDesc.Streams[5], GoCryptoTraderService_GetHistoricTrades_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &goCryptoTraderServiceGetHistoricTradesClient{stream} + x := &goCryptoTraderServiceGetHistoricTradesClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -1079,8 +1154,9 @@ func (x *goCryptoTraderServiceGetHistoricTradesClient) Recv() (*SavedTradesRespo } func (c *goCryptoTraderServiceClient) GetSavedTrades(ctx context.Context, in *GetSavedTradesRequest, opts ...grpc.CallOption) (*SavedTradesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SavedTradesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetSavedTrades_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetSavedTrades_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1088,8 +1164,9 @@ func (c *goCryptoTraderServiceClient) GetSavedTrades(ctx context.Context, in *Ge } func (c *goCryptoTraderServiceClient) ConvertTradesToCandles(ctx context.Context, in *ConvertTradesToCandlesRequest, opts ...grpc.CallOption) (*GetHistoricCandlesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetHistoricCandlesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_ConvertTradesToCandles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_ConvertTradesToCandles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1097,8 +1174,9 @@ func (c *goCryptoTraderServiceClient) ConvertTradesToCandles(ctx context.Context } func (c *goCryptoTraderServiceClient) FindMissingSavedCandleIntervals(ctx context.Context, in *FindMissingCandlePeriodsRequest, opts ...grpc.CallOption) (*FindMissingIntervalsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FindMissingIntervalsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_FindMissingSavedCandleIntervals_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_FindMissingSavedCandleIntervals_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1106,8 +1184,9 @@ func (c *goCryptoTraderServiceClient) FindMissingSavedCandleIntervals(ctx contex } func (c *goCryptoTraderServiceClient) FindMissingSavedTradeIntervals(ctx context.Context, in *FindMissingTradePeriodsRequest, opts ...grpc.CallOption) (*FindMissingIntervalsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FindMissingIntervalsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_FindMissingSavedTradeIntervals_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_FindMissingSavedTradeIntervals_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1115,8 +1194,9 @@ func (c *goCryptoTraderServiceClient) FindMissingSavedTradeIntervals(ctx context } func (c *goCryptoTraderServiceClient) SetExchangeTradeProcessing(ctx context.Context, in *SetExchangeTradeProcessingRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangeTradeProcessing_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetExchangeTradeProcessing_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1124,8 +1204,9 @@ func (c *goCryptoTraderServiceClient) SetExchangeTradeProcessing(ctx context.Con } func (c *goCryptoTraderServiceClient) UpsertDataHistoryJob(ctx context.Context, in *UpsertDataHistoryJobRequest, opts ...grpc.CallOption) (*UpsertDataHistoryJobResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpsertDataHistoryJobResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_UpsertDataHistoryJob_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_UpsertDataHistoryJob_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1133,8 +1214,9 @@ func (c *goCryptoTraderServiceClient) UpsertDataHistoryJob(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetDataHistoryJobDetails(ctx context.Context, in *GetDataHistoryJobDetailsRequest, opts ...grpc.CallOption) (*DataHistoryJob, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DataHistoryJob) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobDetails_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobDetails_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1142,8 +1224,9 @@ func (c *goCryptoTraderServiceClient) GetDataHistoryJobDetails(ctx context.Conte } func (c *goCryptoTraderServiceClient) GetActiveDataHistoryJobs(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*DataHistoryJobs, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DataHistoryJobs) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetActiveDataHistoryJobs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetActiveDataHistoryJobs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1151,8 +1234,9 @@ func (c *goCryptoTraderServiceClient) GetActiveDataHistoryJobs(ctx context.Conte } func (c *goCryptoTraderServiceClient) GetDataHistoryJobsBetween(ctx context.Context, in *GetDataHistoryJobsBetweenRequest, opts ...grpc.CallOption) (*DataHistoryJobs, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DataHistoryJobs) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobsBetween_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobsBetween_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1160,8 +1244,9 @@ func (c *goCryptoTraderServiceClient) GetDataHistoryJobsBetween(ctx context.Cont } func (c *goCryptoTraderServiceClient) GetDataHistoryJobSummary(ctx context.Context, in *GetDataHistoryJobDetailsRequest, opts ...grpc.CallOption) (*DataHistoryJob, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DataHistoryJob) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobSummary_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetDataHistoryJobSummary_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1169,8 +1254,9 @@ func (c *goCryptoTraderServiceClient) GetDataHistoryJobSummary(ctx context.Conte } func (c *goCryptoTraderServiceClient) SetDataHistoryJobStatus(ctx context.Context, in *SetDataHistoryJobStatusRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetDataHistoryJobStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetDataHistoryJobStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1178,8 +1264,9 @@ func (c *goCryptoTraderServiceClient) SetDataHistoryJobStatus(ctx context.Contex } func (c *goCryptoTraderServiceClient) UpdateDataHistoryJobPrerequisite(ctx context.Context, in *UpdateDataHistoryJobPrerequisiteRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1187,8 +1274,9 @@ func (c *goCryptoTraderServiceClient) UpdateDataHistoryJobPrerequisite(ctx conte } func (c *goCryptoTraderServiceClient) GetManagedOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (*GetOrdersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrdersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetManagedOrders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetManagedOrders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1196,8 +1284,9 @@ func (c *goCryptoTraderServiceClient) GetManagedOrders(ctx context.Context, in * } func (c *goCryptoTraderServiceClient) ModifyOrder(ctx context.Context, in *ModifyOrderRequest, opts ...grpc.CallOption) (*ModifyOrderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ModifyOrderResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_ModifyOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_ModifyOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1205,8 +1294,9 @@ func (c *goCryptoTraderServiceClient) ModifyOrder(ctx context.Context, in *Modif } func (c *goCryptoTraderServiceClient) CurrencyStateGetAll(ctx context.Context, in *CurrencyStateGetAllRequest, opts ...grpc.CallOption) (*CurrencyStateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CurrencyStateResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateGetAll_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateGetAll_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1214,8 +1304,9 @@ func (c *goCryptoTraderServiceClient) CurrencyStateGetAll(ctx context.Context, i } func (c *goCryptoTraderServiceClient) CurrencyStateTrading(ctx context.Context, in *CurrencyStateTradingRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateTrading_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateTrading_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1223,8 +1314,9 @@ func (c *goCryptoTraderServiceClient) CurrencyStateTrading(ctx context.Context, } func (c *goCryptoTraderServiceClient) CurrencyStateDeposit(ctx context.Context, in *CurrencyStateDepositRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateDeposit_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateDeposit_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1232,8 +1324,9 @@ func (c *goCryptoTraderServiceClient) CurrencyStateDeposit(ctx context.Context, } func (c *goCryptoTraderServiceClient) CurrencyStateWithdraw(ctx context.Context, in *CurrencyStateWithdrawRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateWithdraw_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateWithdraw_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1241,8 +1334,9 @@ func (c *goCryptoTraderServiceClient) CurrencyStateWithdraw(ctx context.Context, } func (c *goCryptoTraderServiceClient) CurrencyStateTradingPair(ctx context.Context, in *CurrencyStateTradingPairRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenericResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateTradingPair_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_CurrencyStateTradingPair_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1250,8 +1344,9 @@ func (c *goCryptoTraderServiceClient) CurrencyStateTradingPair(ctx context.Conte } func (c *goCryptoTraderServiceClient) GetFuturesPositionsSummary(ctx context.Context, in *GetFuturesPositionsSummaryRequest, opts ...grpc.CallOption) (*GetFuturesPositionsSummaryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFuturesPositionsSummaryResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFuturesPositionsSummary_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFuturesPositionsSummary_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1259,8 +1354,9 @@ func (c *goCryptoTraderServiceClient) GetFuturesPositionsSummary(ctx context.Con } func (c *goCryptoTraderServiceClient) GetFuturesPositionsOrders(ctx context.Context, in *GetFuturesPositionsOrdersRequest, opts ...grpc.CallOption) (*GetFuturesPositionsOrdersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFuturesPositionsOrdersResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFuturesPositionsOrders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFuturesPositionsOrders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1268,8 +1364,9 @@ func (c *goCryptoTraderServiceClient) GetFuturesPositionsOrders(ctx context.Cont } func (c *goCryptoTraderServiceClient) GetCollateral(ctx context.Context, in *GetCollateralRequest, opts ...grpc.CallOption) (*GetCollateralResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCollateralResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCollateral_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCollateral_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1277,8 +1374,9 @@ func (c *goCryptoTraderServiceClient) GetCollateral(ctx context.Context, in *Get } func (c *goCryptoTraderServiceClient) Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ShutdownResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_Shutdown_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_Shutdown_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1286,8 +1384,9 @@ func (c *goCryptoTraderServiceClient) Shutdown(ctx context.Context, in *Shutdown } func (c *goCryptoTraderServiceClient) GetTechnicalAnalysis(ctx context.Context, in *GetTechnicalAnalysisRequest, opts ...grpc.CallOption) (*GetTechnicalAnalysisResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetTechnicalAnalysisResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTechnicalAnalysis_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetTechnicalAnalysis_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1295,8 +1394,9 @@ func (c *goCryptoTraderServiceClient) GetTechnicalAnalysis(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetMarginRatesHistory(ctx context.Context, in *GetMarginRatesHistoryRequest, opts ...grpc.CallOption) (*GetMarginRatesHistoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetMarginRatesHistoryResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetMarginRatesHistory_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetMarginRatesHistory_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1304,8 +1404,9 @@ func (c *goCryptoTraderServiceClient) GetMarginRatesHistory(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetManagedPosition(ctx context.Context, in *GetManagedPositionRequest, opts ...grpc.CallOption) (*GetManagedPositionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetManagedPositionsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetManagedPosition_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetManagedPosition_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1313,8 +1414,9 @@ func (c *goCryptoTraderServiceClient) GetManagedPosition(ctx context.Context, in } func (c *goCryptoTraderServiceClient) GetAllManagedPositions(ctx context.Context, in *GetAllManagedPositionsRequest, opts ...grpc.CallOption) (*GetManagedPositionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetManagedPositionsResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAllManagedPositions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetAllManagedPositions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1322,8 +1424,9 @@ func (c *goCryptoTraderServiceClient) GetAllManagedPositions(ctx context.Context } func (c *goCryptoTraderServiceClient) GetFundingRates(ctx context.Context, in *GetFundingRatesRequest, opts ...grpc.CallOption) (*GetFundingRatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFundingRatesResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFundingRates_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetFundingRates_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1331,8 +1434,9 @@ func (c *goCryptoTraderServiceClient) GetFundingRates(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetLatestFundingRate(ctx context.Context, in *GetLatestFundingRateRequest, opts ...grpc.CallOption) (*GetLatestFundingRateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLatestFundingRateResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLatestFundingRate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLatestFundingRate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1340,8 +1444,9 @@ func (c *goCryptoTraderServiceClient) GetLatestFundingRate(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetOrderbookMovement(ctx context.Context, in *GetOrderbookMovementRequest, opts ...grpc.CallOption) (*GetOrderbookMovementResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrderbookMovementResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookMovement_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookMovement_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1349,8 +1454,9 @@ func (c *goCryptoTraderServiceClient) GetOrderbookMovement(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetOrderbookAmountByNominal(ctx context.Context, in *GetOrderbookAmountByNominalRequest, opts ...grpc.CallOption) (*GetOrderbookAmountByNominalResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrderbookAmountByNominalResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookAmountByNominal_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookAmountByNominal_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1358,8 +1464,9 @@ func (c *goCryptoTraderServiceClient) GetOrderbookAmountByNominal(ctx context.Co } func (c *goCryptoTraderServiceClient) GetOrderbookAmountByImpact(ctx context.Context, in *GetOrderbookAmountByImpactRequest, opts ...grpc.CallOption) (*GetOrderbookAmountByImpactResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOrderbookAmountByImpactResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookAmountByImpact_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOrderbookAmountByImpact_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1367,8 +1474,9 @@ func (c *goCryptoTraderServiceClient) GetOrderbookAmountByImpact(ctx context.Con } func (c *goCryptoTraderServiceClient) GetCollateralMode(ctx context.Context, in *GetCollateralModeRequest, opts ...grpc.CallOption) (*GetCollateralModeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCollateralModeResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCollateralMode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCollateralMode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1376,8 +1484,9 @@ func (c *goCryptoTraderServiceClient) GetCollateralMode(ctx context.Context, in } func (c *goCryptoTraderServiceClient) GetLeverage(ctx context.Context, in *GetLeverageRequest, opts ...grpc.CallOption) (*GetLeverageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetLeverageResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLeverage_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetLeverage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1385,8 +1494,9 @@ func (c *goCryptoTraderServiceClient) GetLeverage(ctx context.Context, in *GetLe } func (c *goCryptoTraderServiceClient) SetCollateralMode(ctx context.Context, in *SetCollateralModeRequest, opts ...grpc.CallOption) (*SetCollateralModeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetCollateralModeResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetCollateralMode_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetCollateralMode_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1394,8 +1504,9 @@ func (c *goCryptoTraderServiceClient) SetCollateralMode(ctx context.Context, in } func (c *goCryptoTraderServiceClient) SetMarginType(ctx context.Context, in *SetMarginTypeRequest, opts ...grpc.CallOption) (*SetMarginTypeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetMarginTypeResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetMarginType_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetMarginType_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1403,8 +1514,9 @@ func (c *goCryptoTraderServiceClient) SetMarginType(ctx context.Context, in *Set } func (c *goCryptoTraderServiceClient) SetLeverage(ctx context.Context, in *SetLeverageRequest, opts ...grpc.CallOption) (*SetLeverageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetLeverageResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_SetLeverage_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_SetLeverage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1412,8 +1524,9 @@ func (c *goCryptoTraderServiceClient) SetLeverage(ctx context.Context, in *SetLe } func (c *goCryptoTraderServiceClient) ChangePositionMargin(ctx context.Context, in *ChangePositionMarginRequest, opts ...grpc.CallOption) (*ChangePositionMarginResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChangePositionMarginResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_ChangePositionMargin_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_ChangePositionMargin_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1421,8 +1534,9 @@ func (c *goCryptoTraderServiceClient) ChangePositionMargin(ctx context.Context, } func (c *goCryptoTraderServiceClient) GetOpenInterest(ctx context.Context, in *GetOpenInterestRequest, opts ...grpc.CallOption) (*GetOpenInterestResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOpenInterestResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOpenInterest_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetOpenInterest_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1430,8 +1544,9 @@ func (c *goCryptoTraderServiceClient) GetOpenInterest(ctx context.Context, in *G } func (c *goCryptoTraderServiceClient) GetCurrencyTradeURL(ctx context.Context, in *GetCurrencyTradeURLRequest, opts ...grpc.CallOption) (*GetCurrencyTradeURLResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCurrencyTradeURLResponse) - err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCurrencyTradeURL_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, GoCryptoTraderService_GetCurrencyTradeURL_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -2251,7 +2366,7 @@ func _GoCryptoTraderService_GetAccountInfoStream_Handler(srv interface{}, stream if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetAccountInfoStream(m, &goCryptoTraderServiceGetAccountInfoStreamServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetAccountInfoStream(m, &goCryptoTraderServiceGetAccountInfoStreamServer{ServerStream: stream}) } type GoCryptoTraderService_GetAccountInfoStreamServer interface { @@ -2812,7 +2927,7 @@ func _GoCryptoTraderService_GetOrderbookStream_Handler(srv interface{}, stream g if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetOrderbookStream(m, &goCryptoTraderServiceGetOrderbookStreamServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetOrderbookStream(m, &goCryptoTraderServiceGetOrderbookStreamServer{ServerStream: stream}) } type GoCryptoTraderService_GetOrderbookStreamServer interface { @@ -2833,7 +2948,7 @@ func _GoCryptoTraderService_GetExchangeOrderbookStream_Handler(srv interface{}, if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetExchangeOrderbookStream(m, &goCryptoTraderServiceGetExchangeOrderbookStreamServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetExchangeOrderbookStream(m, &goCryptoTraderServiceGetExchangeOrderbookStreamServer{ServerStream: stream}) } type GoCryptoTraderService_GetExchangeOrderbookStreamServer interface { @@ -2854,7 +2969,7 @@ func _GoCryptoTraderService_GetTickerStream_Handler(srv interface{}, stream grpc if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetTickerStream(m, &goCryptoTraderServiceGetTickerStreamServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetTickerStream(m, &goCryptoTraderServiceGetTickerStreamServer{ServerStream: stream}) } type GoCryptoTraderService_GetTickerStreamServer interface { @@ -2875,7 +2990,7 @@ func _GoCryptoTraderService_GetExchangeTickerStream_Handler(srv interface{}, str if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetExchangeTickerStream(m, &goCryptoTraderServiceGetExchangeTickerStreamServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetExchangeTickerStream(m, &goCryptoTraderServiceGetExchangeTickerStreamServer{ServerStream: stream}) } type GoCryptoTraderService_GetExchangeTickerStreamServer interface { @@ -3274,7 +3389,7 @@ func _GoCryptoTraderService_GetHistoricTrades_Handler(srv interface{}, stream gr if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GoCryptoTraderServiceServer).GetHistoricTrades(m, &goCryptoTraderServiceGetHistoricTradesServer{stream}) + return srv.(GoCryptoTraderServiceServer).GetHistoricTrades(m, &goCryptoTraderServiceGetHistoricTradesServer{ServerStream: stream}) } type GoCryptoTraderService_GetHistoricTradesServer interface { diff --git a/gctscript/vm/autoload_test.go b/gctscript/vm/autoload_test.go index 5baa89d5a34..2978c79ebd2 100644 --- a/gctscript/vm/autoload_test.go +++ b/gctscript/vm/autoload_test.go @@ -1,9 +1,11 @@ package vm -import "testing" +import ( + "testing" +) func TestGctScriptManagerAutoLoadNonExisting(t *testing.T) { - var vms uint8 = 1 + var vms uint64 = 1 g := &GctScriptManager{ config: &Config{ AutoLoad: []string{"non-existing"}, diff --git a/gctscript/vm/gctscript.go b/gctscript/vm/gctscript.go index 30b6d9db29c..4f66d974ff1 100644 --- a/gctscript/vm/gctscript.go +++ b/gctscript/vm/gctscript.go @@ -11,7 +11,7 @@ import ( // New returns a new instance of VM func (g *GctScriptManager) New() *VM { - if VMSCount.Len() >= int32(g.GetMaxVirtualMachines()) { + if VMSCount.Len() >= g.GetMaxVirtualMachines() { if g.config.Verbose { log.Warnf(log.GCTScriptMgr, "GCTScript MaxVirtualMachines (%v) hit, unable to start further instances", g.GetMaxVirtualMachines()) diff --git a/gctscript/vm/gctscript_types.go b/gctscript/vm/gctscript_types.go index ebf3f05d235..4f3f4b17d13 100644 --- a/gctscript/vm/gctscript_types.go +++ b/gctscript/vm/gctscript_types.go @@ -15,7 +15,7 @@ const ( type Config struct { Enabled bool `json:"enabled"` ScriptTimeout time.Duration `json:"timeout"` - MaxVirtualMachines uint8 `json:"max_virtual_machines"` + MaxVirtualMachines uint64 `json:"max_virtual_machines"` AllowImports bool `json:"allow_imports"` AutoLoad []string `json:"auto_load"` Verbose bool `json:"verbose"` diff --git a/gctscript/vm/manager.go b/gctscript/vm/manager.go index 074dea1a35b..cfbcd3a42c4 100644 --- a/gctscript/vm/manager.go +++ b/gctscript/vm/manager.go @@ -25,7 +25,7 @@ type GctScriptManager struct { started int32 shutdown chan struct{} // Optional values to override stored config ('nil' if not overridden) - MaxVirtualMachines *uint8 + MaxVirtualMachines *uint64 } // NewManager creates a new instance of script manager @@ -83,7 +83,7 @@ func (g *GctScriptManager) run(wg *sync.WaitGroup) { } // GetMaxVirtualMachines returns the max number of VMs to create -func (g *GctScriptManager) GetMaxVirtualMachines() uint8 { +func (g *GctScriptManager) GetMaxVirtualMachines() uint64 { if g.MaxVirtualMachines != nil { return *g.MaxVirtualMachines } diff --git a/gctscript/vm/manager_test.go b/gctscript/vm/manager_test.go index c803ff82f47..3a70dbee7df 100644 --- a/gctscript/vm/manager_test.go +++ b/gctscript/vm/manager_test.go @@ -78,13 +78,13 @@ func TestGctScriptManagerGetMaxVirtualMachines(t *testing.T) { config *Config started int32 shutdown chan struct{} - MaxVirtualMachines *uint8 + MaxVirtualMachines *uint64 } - var value uint8 = 6 + var value uint64 = 6 tests := []struct { name string fields fields - want uint8 + want uint64 }{ { name: "get from config", diff --git a/gctscript/vm/vm.go b/gctscript/vm/vm.go index 5a8adaa88f2..de671e6f7ca 100644 --- a/gctscript/vm/vm.go +++ b/gctscript/vm/vm.go @@ -276,14 +276,14 @@ func (vm *VM) getHash() string { } func (vmc *vmscount) add() { - atomic.AddInt32((*int32)(vmc), 1) + atomic.AddUint64((*uint64)(vmc), 1) } func (vmc *vmscount) remove() { - atomic.AddInt32((*int32)(vmc), -1) + atomic.AddUint64((*uint64)(vmc), ^uint64(0)) } // Len() returns current length vmscount -func (vmc *vmscount) Len() int32 { - return atomic.LoadInt32((*int32)(vmc)) +func (vmc *vmscount) Len() uint64 { + return atomic.LoadUint64((*uint64)(vmc)) } diff --git a/gctscript/vm/vm_test.go b/gctscript/vm/vm_test.go index c92d3028644..772d21b4f88 100644 --- a/gctscript/vm/vm_test.go +++ b/gctscript/vm/vm_test.go @@ -12,9 +12,9 @@ import ( ) const ( - maxTestVirtualMachines uint8 = 30 - testVirtualMachineTimeout = time.Minute - scriptName = "1D01TH0RS3.gct" + maxTestVirtualMachines uint64 = 30 + testVirtualMachineTimeout = time.Minute + scriptName = "1D01TH0RS3.gct" ) var ( @@ -569,7 +569,7 @@ func TestVMCount(t *testing.T) { } } -func configHelper(enabled, imports bool, maxVMs uint8) *Config { +func configHelper(enabled, imports bool, maxVMs uint64) *Config { return &Config{ Enabled: enabled, AllowImports: imports, diff --git a/gctscript/vm/vm_types.go b/gctscript/vm/vm_types.go index 1f3cf3ec68f..14113eb42d0 100644 --- a/gctscript/vm/vm_types.go +++ b/gctscript/vm/vm_types.go @@ -12,7 +12,7 @@ const ( // DefaultTimeoutValue default timeout value for virtual machines DefaultTimeoutValue = 30 * time.Second // DefaultMaxVirtualMachines max number of virtual machines that can be loaded at one time - DefaultMaxVirtualMachines uint8 = 10 + DefaultMaxVirtualMachines uint64 = 10 // TypeLoad text to display in script_event table when a VM is loaded TypeLoad = "load" @@ -31,7 +31,7 @@ const ( StatusFailure = "failure" ) -type vmscount int32 +type vmscount uint64 var ( pool = &sync.Pool{New: func() interface{} { return new(tengo.Script) }} diff --git a/go.mod b/go.mod index f4741a3de9d..ff8762b483b 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ module github.com/thrasher-corp/gocryptotrader -go 1.23.0 +go 1.24.0 require ( github.com/Masterminds/sprig/v3 v3.3.0 github.com/buger/jsonparser v1.1.1 - github.com/bytedance/sonic v1.12.9 + github.com/bytedance/sonic v1.13.1 github.com/d5/tengo/v2 v2.17.0 github.com/gofrs/uuid v4.4.0+incompatible github.com/gorilla/mux v1.8.1 @@ -23,12 +23,12 @@ 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.5 + github.com/urfave/cli/v2 v2.27.6 github.com/volatiletech/null v8.0.0+incompatible - golang.org/x/crypto v0.34.0 - golang.org/x/net v0.35.0 - golang.org/x/term v0.29.0 - golang.org/x/text v0.22.0 + golang.org/x/crypto v0.36.0 + golang.org/x/net v0.37.0 + golang.org/x/term v0.30.0 + golang.org/x/text v0.23.0 golang.org/x/time v0.10.0 google.golang.org/genproto/googleapis/api v0.0.0-20250204164813-702378808489 google.golang.org/grpc v1.70.0 @@ -40,7 +40,7 @@ require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.3.0 // indirect github.com/boombuler/barcode v1.0.1 // indirect - github.com/bytedance/sonic/loader v0.2.2 // indirect + github.com/bytedance/sonic/loader v0.2.4 // indirect github.com/cloudwego/base64x v0.1.5 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect @@ -72,7 +72,7 @@ require ( go.uber.org/multierr v1.9.0 // indirect golang.org/x/arch v0.13.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/sys v0.30.0 // indirect + golang.org/x/sys v0.31.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250204164813-702378808489 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 9dcc77490f2..8bf6167d686 100644 --- a/go.sum +++ b/go.sum @@ -28,11 +28,11 @@ github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyX github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bytedance/sonic v1.12.9 h1:Od1BvK55NnewtGaJsTDeAOSnLVO2BTSLOe0+ooKokmQ= -github.com/bytedance/sonic v1.12.9/go.mod h1:uVvFidNmlt9+wa31S1urfwwthTWteBgG0hWuoKAXTx8= +github.com/bytedance/sonic v1.13.1 h1:Jyd5CIvdFnkOWuKXr+wm4Nyk2h0yAFsr8ucJgEasO3g= +github.com/bytedance/sonic v1.13.1/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.2 h1:jxAJuN9fOot/cyz5Q6dUuMJF5OqQ6+5GfA8FjjQ0R4o= -github.com/bytedance/sonic/loader v0.2.2/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY= +github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -252,8 +252,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= 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.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w= -github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= +github.com/urfave/cli/v2 v2.27.6 h1:VdRdS98FNhKZ8/Az8B7MTyGQmpIr36O1EHybx/LaZ4g= +github.com/urfave/cli/v2 v2.27.6/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= @@ -298,8 +298,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.34.0 h1:+/C6tk6rf/+t5DhUketUbD1aNGqiSX3j15Z6xuIDlBA= -golang.org/x/crypto v0.34.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= @@ -320,8 +320,8 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= -golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= +golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= +golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= @@ -342,15 +342,15 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190927073244-c990c680b611/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= +golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= diff --git a/log/logger_test.go b/log/logger_test.go index f0cae757062..eefce8333d9 100644 --- a/log/logger_test.go +++ b/log/logger_test.go @@ -688,15 +688,14 @@ func newTestBuffer() *testBuffer { // 2140294 770.0 ns/op 0 B/op 0 allocs/op func BenchmarkNewLogEvent(b *testing.B) { mw := &multiWriterHolder{writers: []io.Writer{io.Discard}} - for i := 0; i < b.N; i++ { + for b.Loop() { mw.StageLogEvent(func() string { return "somedata" }, "header", "sublog", "||", "", "", time.RFC3339, true, false, false, nil) } } // BenchmarkInfo-8 1000000 64971 ns/op 47 B/op 1 allocs/op func BenchmarkInfo(b *testing.B) { - b.ResetTimer() - for n := 0; n < b.N; n++ { + for b.Loop() { Infoln(Global, "Hello this is an info benchmark") } } @@ -707,24 +706,21 @@ func BenchmarkInfoDisabled(b *testing.B) { b.Fatal(err) } - b.ResetTimer() - for n := 0; n < b.N; n++ { + for b.Loop() { Infoln(Global, "Hello this is an info benchmark") } } // BenchmarkInfof-8 1000000 72641 ns/op 178 B/op 4 allocs/op func BenchmarkInfof(b *testing.B) { - b.ResetTimer() - for n := 0; n < b.N; n++ { + for n := range b.N { Infof(Global, "Hello this is an infof benchmark %v %v %v\n", n, 1, 2) } } // BenchmarkInfoln-8 1000000 68152 ns/op 121 B/op 3 allocs/op func BenchmarkInfoln(b *testing.B) { - b.ResetTimer() - for n := 0; n < b.N; n++ { + for b.Loop() { Infoln(Global, "Hello this is an infoln benchmark") } } diff --git a/main.go b/main.go index 1811dee4b42..5b4b54c5355 100644 --- a/main.go +++ b/main.go @@ -105,7 +105,7 @@ func main() { flag.StringVar(&settings.GlobalHTTPProxy, "globalhttpproxy", "", "sets the common HTTP client's proxy server") // GCTScript tuning settings - flag.UintVar(&settings.MaxVirtualMachines, "maxvirtualmachines", uint(gctscriptVM.DefaultMaxVirtualMachines), "set max virtual machines that can load") + flag.Uint64Var(&settings.MaxVirtualMachines, "maxvirtualmachines", gctscriptVM.DefaultMaxVirtualMachines, "set max virtual machines that can load") // Withdraw Cache tuning settings flag.Uint64Var(&settings.WithdrawCacheSize, "withdrawcachesize", withdraw.CacheSize, "set cache size for withdrawal requests") diff --git a/portfolio/withdraw/withdraw_types.go b/portfolio/withdraw/withdraw_types.go index cc65fe41950..8cd98029b87 100644 --- a/portfolio/withdraw/withdraw_types.go +++ b/portfolio/withdraw/withdraw_types.go @@ -11,7 +11,7 @@ import ( ) // RequestType used for easy matching of int type to Word -type RequestType uint8 +type RequestType int64 const ( // Crypto request type diff --git a/testdata/configtest.json b/testdata/configtest.json index 41dec7ad630..97f86320420 100644 --- a/testdata/configtest.json +++ b/testdata/configtest.json @@ -1968,7 +1968,9 @@ }, "enabled": { "autoPairUpdates": true, - "websocketAPI": true + "websocketAPI": true, + "saveTradeData": false, + "tradeFeed": true } }, "bankAccounts": [ diff --git a/types/number_test.go b/types/number_test.go index aba61bf0e76..aa5499e9b3c 100644 --- a/types/number_test.go +++ b/types/number_test.go @@ -69,7 +69,7 @@ func TestNumberInt64(t *testing.T) { // Ballpark: 42.78 ns/op 16 B/op 1 allocs/op func BenchmarkNumberUnmarshalJSON(b *testing.B) { var n Number - for i := 0; i < b.N; i++ { + for b.Loop() { _ = n.UnmarshalJSON([]byte(`"0.04200074"`)) } } @@ -77,7 +77,7 @@ func BenchmarkNumberUnmarshalJSON(b *testing.B) { // BenchmarkNumberMarshalJSON provides a barebones benchmark of Marshaling a string value // Ballpark: 118.2 ns/op 56 B/op 3 allocs/op func BenchmarkNumberMarshalJSON(b *testing.B) { - for i := 0; i < b.N; i++ { + for b.Loop() { _, _ = Number(1337.1337).MarshalJSON() } } diff --git a/types/time_test.go b/types/time_test.go index c5dc5a73a54..72a53c7e71f 100644 --- a/types/time_test.go +++ b/types/time_test.go @@ -67,7 +67,7 @@ func TestUnmarshalJSON(t *testing.T) { // 2716176 441.9 ns/op 352 B/op 6 allocs/op (previous) func BenchmarkUnmarshalJSON(b *testing.B) { var testTime Time - for i := 0; i < b.N; i++ { + for b.Loop() { err := json.Unmarshal([]byte(`"1691122380942.173000"`), &testTime) require.NoError(b, err) }