diff --git a/backtester/engine/backtest.go b/backtester/engine/backtest.go index 92b910d1..27defa48 100644 --- a/backtester/engine/backtest.go +++ b/backtester/engine/backtest.go @@ -242,7 +242,7 @@ func (bt *BackTest) updateStatsForDataEvent(ev common.DataEventHandler, funds fu err = bt.Portfolio.UpdatePNL(ev, ev.GetClosePrice()) if err != nil { - if errors.Is(err, gctorder.ErrPositionsNotLoadedForPair) { + if errors.Is(err, gctorder.ErrPositionNotFound) { // if there is no position yet, there's nothing to update return nil } diff --git a/backtester/engine/backtest_test.go b/backtester/engine/backtest_test.go index 5c35faff..7f74eb53 100644 --- a/backtester/engine/backtest_test.go +++ b/backtester/engine/backtest_test.go @@ -1255,6 +1255,7 @@ func TestProcessFuturesFillEvent(t *testing.T) { if err != nil { t.Fatal(err) } + em.Add(exch) f, err := funding.SetupFundingManager(em, false, true) if !errors.Is(err, expectedError) { @@ -1300,6 +1301,7 @@ func TestProcessFuturesFillEvent(t *testing.T) { } bt.exchangeManager = em bt.Funding = f + err = pt.SetupCurrencySettingsMap(&exchange.Settings{ Exchange: exch, Pair: cp, diff --git a/backtester/engine/setup.go b/backtester/engine/setup.go index 74b9c233..e0f8791b 100644 --- a/backtester/engine/setup.go +++ b/backtester/engine/setup.go @@ -50,7 +50,7 @@ func NewFromConfig(cfg *config.Config, templatePath, output string, verbose bool var err error bt := New() bt.exchangeManager = engine.SetupExchangeManager() - bt.orderManager, err = engine.SetupOrderManager(bt.exchangeManager, &engine.CommunicationManager{}, &sync.WaitGroup{}, false, false) + bt.orderManager, err = engine.SetupOrderManager(bt.exchangeManager, &engine.CommunicationManager{}, &sync.WaitGroup{}, false, false, 0) if err != nil { return nil, err } diff --git a/backtester/eventhandlers/exchange/exchange.go b/backtester/eventhandlers/exchange/exchange.go index a4db12b8..4881e42b 100644 --- a/backtester/eventhandlers/exchange/exchange.go +++ b/backtester/eventhandlers/exchange/exchange.go @@ -415,7 +415,7 @@ func applySlippageToPrice(direction gctorder.Side, price, slippageRate decimal.D case gctorder.Sell, gctorder.Ask, gctorder.Short: adjustedPrice = price.Mul(slippageRate) default: - return decimal.Decimal{}, fmt.Errorf("%v %w", direction, gctorder.ErrSideIsInvalid) + return decimal.Zero, fmt.Errorf("%v %w", direction, gctorder.ErrSideIsInvalid) } if adjustedPrice.IsZero() { adjustedPrice = price diff --git a/backtester/eventhandlers/exchange/exchange_test.go b/backtester/eventhandlers/exchange/exchange_test.go index 41d9fe4d..83edfa0b 100644 --- a/backtester/eventhandlers/exchange/exchange_test.go +++ b/backtester/eventhandlers/exchange/exchange_test.go @@ -158,7 +158,7 @@ func TestPlaceOrder(t *testing.T) { } em.Add(exch) bot.ExchangeManager = em - bot.OrderManager, err = engine.SetupOrderManager(em, &engine.CommunicationManager{}, &bot.ServicesWG, false, false) + bot.OrderManager, err = engine.SetupOrderManager(em, &engine.CommunicationManager{}, &bot.ServicesWG, false, false, 0) if err != nil { t.Error(err) } @@ -218,7 +218,7 @@ func TestExecuteOrder(t *testing.T) { } em.Add(exch) bot.ExchangeManager = em - bot.OrderManager, err = engine.SetupOrderManager(em, &engine.CommunicationManager{}, &bot.ServicesWG, false, false) + bot.OrderManager, err = engine.SetupOrderManager(em, &engine.CommunicationManager{}, &bot.ServicesWG, false, false, 0) if err != nil { t.Error(err) } @@ -318,7 +318,7 @@ func TestExecuteOrderBuySellSizeLimit(t *testing.T) { em.Add(exch) bot.ExchangeManager = em - bot.OrderManager, err = engine.SetupOrderManager(em, &engine.CommunicationManager{}, &bot.ServicesWG, false, false) + bot.OrderManager, err = engine.SetupOrderManager(em, &engine.CommunicationManager{}, &bot.ServicesWG, false, false, 0) if err != nil { t.Error(err) } diff --git a/backtester/eventhandlers/portfolio/portfolio.go b/backtester/eventhandlers/portfolio/portfolio.go index 6c0d3c03..39f184b2 100644 --- a/backtester/eventhandlers/portfolio/portfolio.go +++ b/backtester/eventhandlers/portfolio/portfolio.go @@ -97,7 +97,7 @@ func (p *Portfolio) OnSignal(ev signal.Event, cs *exchange.Settings, funds fundi // cannot close a non existent position return nil, errNoHoldings } - sizingFunds = positions[len(positions)-1].Exposure + sizingFunds = positions[len(positions)-1].LatestSize d := positions[len(positions)-1].OpeningDirection switch d { case gctorder.Short: @@ -452,7 +452,7 @@ func (s *Settings) GetHoldingsForTime(t time.Time) holdings.Holding { } // GetPositions returns all futures positions for an event's exchange, asset, pair -func (p *Portfolio) GetPositions(e common.EventHandler) ([]gctorder.PositionStats, error) { +func (p *Portfolio) GetPositions(e common.EventHandler) ([]gctorder.Position, error) { settings, err := p.getFuturesSettingsFromEvent(e) if err != nil { return nil, err @@ -461,14 +461,14 @@ func (p *Portfolio) GetPositions(e common.EventHandler) ([]gctorder.PositionStat } // GetLatestPosition returns all futures positions for an event's exchange, asset, pair -func (p *Portfolio) GetLatestPosition(e common.EventHandler) (*gctorder.PositionStats, error) { +func (p *Portfolio) GetLatestPosition(e common.EventHandler) (*gctorder.Position, error) { settings, err := p.getFuturesSettingsFromEvent(e) if err != nil { return nil, err } positions := settings.FuturesTracker.GetPositions() if len(positions) == 0 { - return nil, fmt.Errorf("%w %v %v %v", gctorder.ErrPositionsNotLoadedForPair, e.GetExchange(), e.GetAssetType(), e.Pair()) + return nil, fmt.Errorf("%w %v %v %v", gctorder.ErrPositionNotFound, e.GetExchange(), e.GetAssetType(), e.Pair()) } return &positions[len(positions)-1], nil } @@ -623,7 +623,7 @@ func (p *Portfolio) CreateLiquidationOrdersForExchange(ev common.DataEventHandle continue } pos := positions[len(positions)-1] - if !pos.Exposure.IsPositive() { + if !pos.LatestSize.IsPositive() { continue } direction := gctorder.Short @@ -644,8 +644,8 @@ func (p *Portfolio) CreateLiquidationOrdersForExchange(ev common.DataEventHandle Direction: direction, Status: gctorder.Liquidated, ClosePrice: ev.GetClosePrice(), - Amount: pos.Exposure, - AllocatedFunds: pos.Exposure, + Amount: pos.LatestSize, + AllocatedFunds: pos.LatestSize, OrderType: gctorder.Market, LiquidatingPosition: true, }) diff --git a/backtester/eventhandlers/portfolio/portfolio_test.go b/backtester/eventhandlers/portfolio/portfolio_test.go index 7c8c3b8d..657dedb8 100644 --- a/backtester/eventhandlers/portfolio/portfolio_test.go +++ b/backtester/eventhandlers/portfolio/portfolio_test.go @@ -730,8 +730,8 @@ func TestCalculatePNL(t *testing.T) { ev.Time = tt0 err = p.UpdatePNL(ev, decimal.Zero) - if !errors.Is(err, gctorder.ErrPositionsNotLoadedForPair) { - t.Errorf("received: %v, expected: %v", err, gctorder.ErrPositionsNotLoadedForPair) + if !errors.Is(err, gctorder.ErrPositionNotFound) { + t.Errorf("received: %v, expected: %v", err, gctorder.ErrPositionNotFound) } od := &gctorder.Detail{ @@ -964,7 +964,7 @@ func TestGetLatestPNLForEvent(t *testing.T) { if !errors.Is(err, nil) { t.Errorf("received: %v, expected: %v", err, nil) } - expectedError = gctorder.ErrPositionsNotLoadedForPair + expectedError = gctorder.ErrPositionNotFound _, err = p.GetLatestPNLForEvent(ev) if !errors.Is(err, expectedError) { t.Fatalf("received '%v' expected '%v'", err, expectedError) diff --git a/backtester/eventhandlers/portfolio/portfolio_types.go b/backtester/eventhandlers/portfolio/portfolio_types.go index 64973407..62212cff 100644 --- a/backtester/eventhandlers/portfolio/portfolio_types.go +++ b/backtester/eventhandlers/portfolio/portfolio_types.go @@ -56,7 +56,7 @@ type Handler interface { setHoldingsForOffset(*holdings.Holding, bool) error UpdateHoldings(common.DataEventHandler, funding.IFundReleaser) error GetComplianceManager(string, asset.Item, currency.Pair) (*compliance.Manager, error) - GetPositions(common.EventHandler) ([]gctorder.PositionStats, error) + GetPositions(common.EventHandler) ([]gctorder.Position, error) TrackFuturesOrder(fill.Event, funding.IFundReleaser) (*PNLSummary, error) UpdatePNL(common.EventHandler, decimal.Decimal) error GetLatestPNLForEvent(common.EventHandler) (*PNLSummary, error) diff --git a/backtester/eventhandlers/portfolio/size/size.go b/backtester/eventhandlers/portfolio/size/size.go index 092b3be2..b5c13ef7 100644 --- a/backtester/eventhandlers/portfolio/size/size.go +++ b/backtester/eventhandlers/portfolio/size/size.go @@ -14,14 +14,14 @@ import ( // SizeOrder is responsible for ensuring that the order size is within config limits func (s *Size) SizeOrder(o order.Event, amountAvailable decimal.Decimal, cs *exchange.Settings) (*order.Order, decimal.Decimal, error) { if o == nil || cs == nil { - return nil, decimal.Decimal{}, common.ErrNilArguments + return nil, decimal.Zero, common.ErrNilArguments } if amountAvailable.LessThanOrEqual(decimal.Zero) { - return nil, decimal.Decimal{}, errNoFunds + return nil, decimal.Zero, errNoFunds } retOrder, ok := o.(*order.Order) if !ok { - return nil, decimal.Decimal{}, fmt.Errorf("%w expected order event", common.ErrInvalidDataType) + return nil, decimal.Zero, fmt.Errorf("%w expected order event", common.ErrInvalidDataType) } if fde := o.GetFillDependentEvent(); fde != nil && fde.MatchOrderAmount() { @@ -35,18 +35,18 @@ func (s *Size) SizeOrder(o order.Event, amountAvailable decimal.Decimal, cs *exc FreeCollateral: amountAvailable, }) if err != nil { - return nil, decimal.Decimal{}, err + return nil, decimal.Zero, err } initialAmount := amountAvailable.Mul(scalingInfo.Weighting).Div(fde.GetClosePrice()) oNotionalPosition := initialAmount.Mul(o.GetClosePrice()) sizedAmount, estFee, err := s.calculateAmount(o.GetDirection(), o.GetClosePrice(), oNotionalPosition, cs, o) if err != nil { - return nil, decimal.Decimal{}, err + return nil, decimal.Zero, err } scaledCollateralFromAmount := sizedAmount.Mul(scalingInfo.Weighting) excess := amountAvailable.Sub(sizedAmount).Add(scaledCollateralFromAmount) if excess.IsNegative() { - return nil, decimal.Decimal{}, fmt.Errorf("%w not enough funding for position", errCannotAllocate) + return nil, decimal.Zero, fmt.Errorf("%w not enough funding for position", errCannotAllocate) } retOrder.SetAmount(sizedAmount) fde.SetAmount(sizedAmount) @@ -56,7 +56,7 @@ func (s *Size) SizeOrder(o order.Event, amountAvailable decimal.Decimal, cs *exc amount, estFee, err := s.calculateAmount(retOrder.Direction, retOrder.ClosePrice, amountAvailable, cs, o) if err != nil { - return nil, decimal.Decimal{}, err + return nil, decimal.Zero, err } retOrder.SetAmount(amount) @@ -73,12 +73,12 @@ func (s *Size) calculateAmount(direction gctorder.Side, price, amountAvailable d // check size against currency specific settings amount, fee, err = s.calculateBuySize(price, amountAvailable, cs.TakerFee, o.GetBuyLimit(), cs.BuySide) if err != nil { - return decimal.Decimal{}, decimal.Decimal{}, err + return decimal.Zero, decimal.Zero, err } // check size against portfolio specific settings portfolioAmount, portfolioFee, err = s.calculateBuySize(price, amountAvailable, cs.TakerFee, o.GetBuyLimit(), s.BuySide) if err != nil { - return decimal.Decimal{}, decimal.Decimal{}, err + return decimal.Zero, decimal.Zero, err } // global settings overrule individual currency settings if amount.GreaterThan(portfolioAmount) { @@ -89,12 +89,12 @@ func (s *Size) calculateAmount(direction gctorder.Side, price, amountAvailable d // check size against currency specific settings amount, fee, err = s.calculateSellSize(price, amountAvailable, cs.TakerFee, o.GetSellLimit(), cs.SellSide) if err != nil { - return decimal.Decimal{}, decimal.Decimal{}, err + return decimal.Zero, decimal.Zero, err } // check size against portfolio specific settings portfolioAmount, portfolioFee, err = s.calculateSellSize(price, amountAvailable, cs.TakerFee, o.GetSellLimit(), s.SellSide) if err != nil { - return decimal.Decimal{}, decimal.Decimal{}, err + return decimal.Zero, decimal.Zero, err } // global settings overrule individual currency settings if amount.GreaterThan(portfolioAmount) { @@ -102,11 +102,11 @@ func (s *Size) calculateAmount(direction gctorder.Side, price, amountAvailable d fee = portfolioFee } default: - return decimal.Decimal{}, decimal.Decimal{}, fmt.Errorf("%w at %v for %v %v %v", errCannotAllocate, o.GetTime(), o.GetExchange(), o.GetAssetType(), o.Pair()) + return decimal.Zero, decimal.Zero, fmt.Errorf("%w at %v for %v %v %v", errCannotAllocate, o.GetTime(), o.GetExchange(), o.GetAssetType(), o.Pair()) } if amount.LessThanOrEqual(decimal.Zero) { - return decimal.Decimal{}, decimal.Decimal{}, fmt.Errorf("%w at %v for %v %v %v, no amount sized", errCannotAllocate, o.GetTime(), o.GetExchange(), o.GetAssetType(), o.Pair()) + return decimal.Zero, decimal.Zero, fmt.Errorf("%w at %v for %v %v %v, no amount sized", errCannotAllocate, o.GetTime(), o.GetExchange(), o.GetAssetType(), o.Pair()) } if o.GetAmount().IsPositive() && o.GetAmount().LessThanOrEqual(amount) { @@ -125,10 +125,10 @@ func (s *Size) calculateAmount(direction gctorder.Side, price, amountAvailable d // this can only attempt to factor the potential fee to remain under the max rules func (s *Size) calculateBuySize(price, availableFunds, feeRate, buyLimit decimal.Decimal, minMaxSettings exchange.MinMax) (amount, fee decimal.Decimal, err error) { if availableFunds.LessThanOrEqual(decimal.Zero) { - return decimal.Decimal{}, decimal.Decimal{}, errNoFunds + return decimal.Zero, decimal.Zero, errNoFunds } if price.IsZero() { - return decimal.Decimal{}, decimal.Decimal{}, nil + return decimal.Zero, decimal.Zero, nil } amount = availableFunds.Mul(decimal.NewFromInt(1).Sub(feeRate)).Div(price) if !buyLimit.IsZero() && @@ -144,7 +144,7 @@ func (s *Size) calculateBuySize(price, availableFunds, feeRate, buyLimit decimal amount = minMaxSettings.MaximumTotal.Mul(decimal.NewFromInt(1).Sub(feeRate)).Div(price) } if amount.LessThan(minMaxSettings.MinimumSize) && minMaxSettings.MinimumSize.GreaterThan(decimal.Zero) { - return decimal.Decimal{}, decimal.Decimal{}, fmt.Errorf("%w. Sized: '%v' Minimum: '%v'", errLessThanMinimum, amount, minMaxSettings.MinimumSize) + return decimal.Zero, decimal.Zero, fmt.Errorf("%w. Sized: '%v' Minimum: '%v'", errLessThanMinimum, amount, minMaxSettings.MinimumSize) } fee = amount.Mul(price).Mul(feeRate) return amount, fee, nil @@ -158,10 +158,10 @@ func (s *Size) calculateBuySize(price, availableFunds, feeRate, buyLimit decimal // this can only attempt to factor the potential fee to remain under the max rules func (s *Size) calculateSellSize(price, baseAmount, feeRate, sellLimit decimal.Decimal, minMaxSettings exchange.MinMax) (amount, fee decimal.Decimal, err error) { if baseAmount.LessThanOrEqual(decimal.Zero) { - return decimal.Decimal{}, decimal.Decimal{}, errNoFunds + return decimal.Zero, decimal.Zero, errNoFunds } if price.IsZero() { - return decimal.Decimal{}, decimal.Decimal{}, nil + return decimal.Zero, decimal.Zero, nil } oneMFeeRate := decimal.NewFromInt(1).Sub(feeRate) amount = baseAmount.Mul(oneMFeeRate) @@ -178,7 +178,7 @@ func (s *Size) calculateSellSize(price, baseAmount, feeRate, sellLimit decimal.D amount = minMaxSettings.MaximumTotal.Mul(oneMFeeRate).Div(price) } if amount.LessThan(minMaxSettings.MinimumSize) && minMaxSettings.MinimumSize.GreaterThan(decimal.Zero) { - return decimal.Decimal{}, decimal.Decimal{}, fmt.Errorf("%w. Sized: '%v' Minimum: '%v'", errLessThanMinimum, amount, minMaxSettings.MinimumSize) + return decimal.Zero, decimal.Zero, fmt.Errorf("%w. Sized: '%v' Minimum: '%v'", errLessThanMinimum, amount, minMaxSettings.MinimumSize) } fee = amount.Mul(price).Mul(feeRate) return amount, fee, nil diff --git a/backtester/eventhandlers/strategies/ftxcashandcarry/ftxcashandcarry.go b/backtester/eventhandlers/strategies/ftxcashandcarry/ftxcashandcarry.go index cd1ed9ed..a21af9ee 100644 --- a/backtester/eventhandlers/strategies/ftxcashandcarry/ftxcashandcarry.go +++ b/backtester/eventhandlers/strategies/ftxcashandcarry/ftxcashandcarry.go @@ -104,7 +104,7 @@ func (s *Strategy) OnSimultaneousSignals(d []data.Handler, f funding.IFundingTra // createSignals creates signals based on the relationships between // futures and spot signals -func (s *Strategy) createSignals(pos []order.PositionStats, spotSignal, futuresSignal *signal.Signal, diffBetweenFuturesSpot decimal.Decimal, isLastEvent bool) ([]signal.Event, error) { +func (s *Strategy) createSignals(pos []order.Position, spotSignal, futuresSignal *signal.Signal, diffBetweenFuturesSpot decimal.Decimal, isLastEvent bool) ([]signal.Event, error) { if spotSignal == nil { return nil, fmt.Errorf("%w missing spot signal", common.ErrNilArguments) } @@ -135,14 +135,6 @@ func (s *Strategy) createSignals(pos []order.PositionStats, spotSignal, futuresS spotSignal.FillDependentEvent = futuresSignal // only appending spotSignal as futuresSignal will be raised later response = append(response, spotSignal) - case pos[len(pos)-1].Status == order.Open && - isLastEvent: - // closing positions on last event - spotSignal.SetDirection(order.ClosePosition) - spotSignal.AppendReason("Selling asset on last event") - futuresSignal.SetDirection(order.ClosePosition) - futuresSignal.AppendReason("Closing position on last event") - response = append(response, futuresSignal, spotSignal) case pos[len(pos)-1].Status == order.Open && diffBetweenFuturesSpot.LessThanOrEqual(s.closeShortDistancePercentage): // closing positions when custom threshold met @@ -151,6 +143,14 @@ func (s *Strategy) createSignals(pos []order.PositionStats, spotSignal, futuresS futuresSignal.SetDirection(order.ClosePosition) futuresSignal.AppendReasonf("Closing position. Met threshold %v", s.closeShortDistancePercentage) response = append(response, futuresSignal, spotSignal) + case pos[len(pos)-1].Status == order.Open && + isLastEvent: + // closing positions on last event + spotSignal.SetDirection(order.ClosePosition) + spotSignal.AppendReason("Selling asset on last event") + futuresSignal.SetDirection(order.ClosePosition) + futuresSignal.AppendReason("Closing position on last event") + response = append(response, futuresSignal, spotSignal) default: response = append(response, spotSignal, futuresSignal) } diff --git a/backtester/eventhandlers/strategies/ftxcashandcarry/ftxcashandcarry_test.go b/backtester/eventhandlers/strategies/ftxcashandcarry/ftxcashandcarry_test.go index 16df5018..21436a71 100644 --- a/backtester/eventhandlers/strategies/ftxcashandcarry/ftxcashandcarry_test.go +++ b/backtester/eventhandlers/strategies/ftxcashandcarry/ftxcashandcarry_test.go @@ -183,7 +183,7 @@ func TestCreateSignals(t *testing.T) { t.Errorf("received '%v' expected '%v", err, expectedError) } - // case len(pos) == 0: + // targeting first case expectedError = nil futuresSignal := &signal.Signal{ Base: &event.Base{AssetType: asset.Futures}, @@ -199,9 +199,8 @@ func TestCreateSignals(t *testing.T) { t.Errorf("received '%v' expected '%v", resp[0].GetAssetType(), asset.Spot) } - // case len(pos) > 0 && pos[len(pos)-1].Status == order.Open && - // diffBetweenFuturesSpot.LessThanOrEqual(s.closeShortDistancePercentage): - pos := []gctorder.PositionStats{ + // targeting second case: + pos := []gctorder.Position{ { Status: gctorder.Open, }, @@ -226,9 +225,7 @@ func TestCreateSignals(t *testing.T) { t.Fatal("unhandled issue in test scenario") } - // case len(pos) > 0 && - // pos[len(pos)-1].Status == order.Open && - // isLastEvent: + // targeting third case resp, err = s.createSignals(pos, spotSignal, futuresSignal, decimal.Zero, true) if !errors.Is(err, expectedError) { t.Errorf("received '%v' expected '%v", err, expectedError) @@ -248,9 +245,8 @@ func TestCreateSignals(t *testing.T) { if !caseTested { t.Fatal("unhandled issue in test scenario") } - // case len(pos) > 0 && - // pos[len(pos)-1].Status == order.Closed && - // diffBetweenFuturesSpot.GreaterThan(s.openShortDistancePercentage): + + // targeting first case after a cash and carry is completed, have a new one opened pos[0].Status = gctorder.Closed resp, err = s.createSignals(pos, spotSignal, futuresSignal, decimal.NewFromInt(1337), true) if !errors.Is(err, expectedError) { @@ -275,7 +271,7 @@ func TestCreateSignals(t *testing.T) { t.Fatal("unhandled issue in test scenario") } - // default: + // targeting default case pos[0].Status = gctorder.UnknownStatus resp, err = s.createSignals(pos, spotSignal, futuresSignal, decimal.NewFromInt(1337), true) if !errors.Is(err, expectedError) { @@ -303,8 +299,8 @@ type portfolerino struct { } // GetPositions overrides default implementation -func (p portfolerino) GetPositions(common.EventHandler) ([]gctorder.PositionStats, error) { - return []gctorder.PositionStats{ +func (p portfolerino) GetPositions(common.EventHandler) ([]gctorder.Position, error) { + return []gctorder.Position{ { Exchange: exchangeName, Asset: asset.Spot, diff --git a/cmd/exchange_wrapper_issues/main.go b/cmd/exchange_wrapper_issues/main.go index 4a035688..9fb9b5d2 100644 --- a/cmd/exchange_wrapper_issues/main.go +++ b/cmd/exchange_wrapper_issues/main.go @@ -15,6 +15,7 @@ import ( "text/template" "time" + "github.com/shopspring/decimal" "github.com/thrasher-corp/gocryptotrader/common/file" "github.com/thrasher-corp/gocryptotrader/config" "github.com/thrasher-corp/gocryptotrader/currency" @@ -508,6 +509,41 @@ func testWrappers(e exchange.IBotExchange, base *exchange.Base, config *Config) Error: msg, Response: jsonifyInterface([]interface{}{""}), }) + + fundingRateRequest := &order.FundingRatesRequest{ + Asset: assetTypes[i], + Pairs: currency.Pairs{p}, + StartDate: time.Now().Add(-time.Hour), + EndDate: time.Now(), + } + var fundingRateResponse []order.FundingRates + fundingRateResponse, err = e.GetFundingRates(context.TODO(), fundingRateRequest) + msg = "" + if err != nil { + msg = err.Error() + responseContainer.ErrorCount++ + } + + responseContainer.EndpointResponses = append(responseContainer.EndpointResponses, EndpointResponse{ + SentParams: jsonifyInterface([]interface{}{fundingRateRequest}), + Function: "GetFundingRates", + Error: msg, + Response: jsonifyInterface([]interface{}{fundingRateResponse}), + }) + + var isPerpetualFutures bool + isPerpetualFutures, err = e.IsPerpetualFutureCurrency(assetTypes[i], p) + msg = "" + if err != nil { + msg = err.Error() + responseContainer.ErrorCount++ + } + responseContainer.EndpointResponses = append(responseContainer.EndpointResponses, EndpointResponse{ + SentParams: jsonifyInterface([]interface{}{assetTypes[i], p}), + Function: "IsPerpetualFutureCurrency", + Error: msg, + Response: jsonifyInterface([]interface{}{isPerpetualFutures}), + }) } var fetchAccountInfoResponse account.Holdings @@ -665,7 +701,7 @@ func testWrappers(e exchange.IBotExchange, base *exchange.Base, config *Config) responseContainer.ErrorCount++ } responseContainer.EndpointResponses = append(responseContainer.EndpointResponses, EndpointResponse{ - SentParams: jsonifyInterface([]interface{}{config.OrderSubmission.OrderID}), + SentParams: jsonifyInterface([]interface{}{config.OrderSubmission.OrderID, p, assetTypes[i]}), Function: "GetOrderInfo", Error: msg, Response: jsonifyInterface([]interface{}{r15}), @@ -676,6 +712,8 @@ func testWrappers(e exchange.IBotExchange, base *exchange.Base, config *Config) Side: testOrderSide, Pairs: []currency.Pair{p}, AssetType: assetTypes[i], + StartTime: time.Now().Add(-time.Hour), + EndTime: time.Now(), } var getOrderHistoryResponse []order.Detail getOrderHistoryResponse, err = e.GetOrderHistory(context.TODO(), &historyRequest) @@ -696,6 +734,8 @@ func testWrappers(e exchange.IBotExchange, base *exchange.Base, config *Config) Side: testOrderSide, Pairs: []currency.Pair{p}, AssetType: assetTypes[i], + StartTime: time.Now().Add(-time.Hour), + EndTime: time.Now(), } var getActiveOrdersResponse []order.Detail getActiveOrdersResponse, err = e.GetActiveOrders(context.TODO(), &orderRequest) @@ -872,6 +912,109 @@ func testWrappers(e exchange.IBotExchange, base *exchange.Base, config *Config) Response: marginRateHistoryResponse, }) + positionSummaryRequest := &order.PositionSummaryRequest{ + Asset: assetTypes[i], + Pair: p, + } + var positionSummaryResponse *order.PositionSummary + positionSummaryResponse, err = e.GetPositionSummary(context.TODO(), positionSummaryRequest) + msg = "" + if err != nil { + msg = err.Error() + responseContainer.ErrorCount++ + } + responseContainer.EndpointResponses = append(responseContainer.EndpointResponses, EndpointResponse{ + SentParams: jsonifyInterface([]interface{}{positionSummaryRequest}), + Function: "GetPositionSummary", + Error: msg, + Response: jsonifyInterface([]interface{}{positionSummaryResponse}), + }) + + calculatePNLRequest := &order.PNLCalculatorRequest{ + Pair: p, + Underlying: p.Base, + Asset: assetTypes[i], + EntryPrice: decimal.NewFromInt(1337), + OpeningDirection: testOrderSide, + OrderDirection: testOrderSide, + Time: time.Now(), + Exposure: decimal.NewFromInt(1337), + EntryAmount: decimal.NewFromInt(1337), + PreviousPrice: decimal.NewFromInt(1337), + } + var calculatePNLResponse *order.PNLResult + calculatePNLResponse, err = e.CalculatePNL(context.TODO(), calculatePNLRequest) + msg = "" + if err != nil { + msg = err.Error() + responseContainer.ErrorCount++ + } + responseContainer.EndpointResponses = append(responseContainer.EndpointResponses, EndpointResponse{ + SentParams: jsonifyInterface([]interface{}{calculatePNLRequest}), + Function: "CalculatePNL", + Error: msg, + Response: jsonifyInterface([]interface{}{calculatePNLResponse}), + }) + + collateralCalculator := &order.CollateralCalculator{ + CollateralCurrency: p.Quote, + Asset: assetTypes[i], + Side: testOrderSide, + USDPrice: decimal.NewFromInt(1337), + FreeCollateral: decimal.NewFromInt(1337), + LockedCollateral: decimal.NewFromInt(1337), + UnrealisedPNL: decimal.NewFromInt(1337), + } + var scaleCollateralResponse *order.CollateralByCurrency + scaleCollateralResponse, err = e.ScaleCollateral(context.TODO(), collateralCalculator) + msg = "" + if err != nil { + msg = err.Error() + responseContainer.ErrorCount++ + } + responseContainer.EndpointResponses = append(responseContainer.EndpointResponses, EndpointResponse{ + SentParams: jsonifyInterface([]interface{}{collateralCalculator}), + Function: "ScaleCollateral", + Error: msg, + Response: jsonifyInterface([]interface{}{scaleCollateralResponse}), + }) + + totalCollateralCalculator := &order.TotalCollateralCalculator{ + CollateralAssets: []order.CollateralCalculator{*collateralCalculator}, + } + var calculateTotalCollateralResponse *order.TotalCollateralResponse + calculateTotalCollateralResponse, err = e.CalculateTotalCollateral(context.TODO(), totalCollateralCalculator) + msg = "" + if err != nil { + msg = err.Error() + responseContainer.ErrorCount++ + } + responseContainer.EndpointResponses = append(responseContainer.EndpointResponses, EndpointResponse{ + SentParams: jsonifyInterface([]interface{}{totalCollateralCalculator}), + Function: "CalculateTotalCollateral", + Error: msg, + Response: jsonifyInterface([]interface{}{calculateTotalCollateralResponse}), + }) + + var futuresPositionsResponse []order.PositionDetails + futuresPositionsRequest := &order.PositionsRequest{ + Asset: assetTypes[i], + Pairs: currency.Pairs{p}, + StartDate: time.Now().Add(-time.Hour), + } + futuresPositionsResponse, err = e.GetFuturesPositions(context.TODO(), futuresPositionsRequest) + msg = "" + if err != nil { + msg = err.Error() + responseContainer.ErrorCount++ + } + responseContainer.EndpointResponses = append(responseContainer.EndpointResponses, EndpointResponse{ + SentParams: jsonifyInterface([]interface{}{futuresPositionsRequest}), + Function: "GetFuturesPositions", + Error: msg, + Response: jsonifyInterface([]interface{}{futuresPositionsResponse}), + }) + response = append(response, responseContainer) } return response diff --git a/cmd/gctcli/commands.go b/cmd/gctcli/commands.go index af3bbaa5..2d26831c 100644 --- a/cmd/gctcli/commands.go +++ b/cmd/gctcli/commands.go @@ -4742,316 +4742,6 @@ func findMissingSavedCandleIntervals(c *cli.Context) error { return nil } -var getFuturesPositionsCommand = &cli.Command{ - Name: "getfuturesposition", - Usage: "will retrieve all futures positions in a timeframe, then calculate PNL based on that. Note, the dates have an impact on PNL calculations, ensure your start date is not after a new position is opened", - ArgsUsage: " ", - Action: getFuturesPositions, - Flags: []cli.Flag{ - &cli.StringFlag{ - Name: "exchange", - Aliases: []string{"e"}, - Usage: "the exchange to retrieve futures positions from", - }, - &cli.StringFlag{ - Name: "asset", - Aliases: []string{"a"}, - Usage: "the asset type of the currency pair, must be a futures type", - }, - &cli.StringFlag{ - Name: "pair", - Aliases: []string{"p"}, - Usage: "the currency pair", - }, - &cli.StringFlag{ - Name: "start", - Aliases: []string{"sd"}, - Usage: " rounded down to the nearest hour, ensure your starting position is within this window for accurate calculations", - Value: time.Now().AddDate(-1, 0, 0).Truncate(time.Hour).Format(common.SimpleTimeFormat), - Destination: &startTime, - }, - &cli.StringFlag{ - Name: "end", - Aliases: []string{"ed"}, - Usage: " rounded down to the nearest hour, ensure your last position is within this window for accurate calculations", - Value: time.Now().Format(common.SimpleTimeFormat), - Destination: &endTime, - }, - &cli.IntFlag{ - Name: "limit", - Aliases: []string{"l"}, - Usage: "the number of positions (not orders) to return", - Value: 86400, - Destination: &limit, - }, - &cli.StringFlag{ - Name: "status", - Aliases: []string{"s"}, - Usage: "limit return to position statuses - open, closed, any", - Value: "ANY", - }, - &cli.BoolFlag{ - Name: "verbose", - Aliases: []string{"v"}, - Usage: "includes all orders that make up a position in the response", - }, - &cli.BoolFlag{ - Name: "overwrite", - Aliases: []string{"o"}, - Usage: "if true, will overwrite futures results for the provided exchange, asset, pair", - }, - }, -} - -func getFuturesPositions(c *cli.Context) error { - if c.NArg() == 0 && c.NumFlags() == 0 { - return cli.ShowCommandHelp(c, "getfuturesposition") - } - - var exchangeName string - if c.IsSet("exchange") { - exchangeName = c.String("exchange") - } else { - exchangeName = c.Args().First() - } - - var assetType string - if c.IsSet("asset") { - assetType = c.String("asset") - } else { - assetType = c.Args().Get(1) - } - - if !validAsset(assetType) { - return errInvalidAsset - } - - var currencyPair string - if c.IsSet("pair") { - currencyPair = c.String("pair") - } else { - currencyPair = c.Args().Get(2) - } - if !validPair(currencyPair) { - return errInvalidPair - } - - p, err := currency.NewPairDelimiter(currencyPair, pairDelimiter) - if err != nil { - return err - } - - if !c.IsSet("start") { - if c.Args().Get(3) != "" { - startTime = c.Args().Get(3) - } - } - - if !c.IsSet("end") { - if c.Args().Get(4) != "" { - endTime = c.Args().Get(4) - } - } - if c.IsSet("limit") { - limit = c.Int("limit") - } else if c.Args().Get(5) != "" { - var limit64 int64 - limit64, err = strconv.ParseInt(c.Args().Get(5), 10, 64) - if err != nil { - return err - } - limit = int(limit64) - } - - var status string - if c.IsSet("status") { - status = c.String("status") - } else if c.Args().Get(6) != "" { - status = c.Args().Get(6) - } - if !strings.EqualFold(status, "any") && - !strings.EqualFold(status, "open") && - !strings.EqualFold(status, "closed") && - status != "" { - return errors.New("unrecognised status") - } - - var verbose bool - if c.IsSet("verbose") { - verbose = c.Bool("verbose") - } else if c.Args().Get(7) != "" { - verbose, err = strconv.ParseBool(c.Args().Get(7)) - if err != nil { - return err - } - } - - var overwrite bool - if c.IsSet("overwrite") { - overwrite = c.Bool("overwrite") - } else if c.Args().Get(8) != "" { - overwrite, err = strconv.ParseBool(c.Args().Get(8)) - if err != nil { - return err - } - } - - var s, e time.Time - s, err = time.Parse(common.SimpleTimeFormat, startTime) - if err != nil { - return fmt.Errorf("invalid time format for start: %v", err) - } - e, err = time.Parse(common.SimpleTimeFormat, endTime) - if err != nil { - return fmt.Errorf("invalid time format for end: %v", err) - } - - if e.Before(s) { - return errors.New("start cannot be after end") - } - - conn, cancel, err := setupClient(c) - if err != nil { - return err - } - defer closeConn(conn, cancel) - - client := gctrpc.NewGoCryptoTraderServiceClient(conn) - result, err := client.GetFuturesPositions(c.Context, - &gctrpc.GetFuturesPositionsRequest{ - Exchange: exchangeName, - Asset: assetType, - Pair: &gctrpc.CurrencyPair{ - Delimiter: p.Delimiter, - Base: p.Base.String(), - Quote: p.Quote.String(), - }, - StartDate: negateLocalOffset(s), - EndDate: negateLocalOffset(e), - Status: status, - PositionLimit: int64(limit), - Verbose: verbose, - Overwrite: overwrite, - }) - if err != nil { - return err - } - - jsonOutput(result) - return nil -} - -var getCollateralCommand = &cli.Command{ - Name: "getcollateral", - Usage: "returns total collateral for an exchange asset, with optional per currency breakdown", - ArgsUsage: " ", - Action: getCollateral, - Flags: []cli.Flag{ - &cli.StringFlag{ - Name: "exchange", - Aliases: []string{"e"}, - Usage: "the exchange to retrieve futures positions from", - }, - &cli.StringFlag{ - Name: "asset", - Aliases: []string{"a"}, - Usage: "the asset type of the currency pair, must be a futures type", - }, - &cli.BoolFlag{ - Name: "calculateoffline", - Aliases: []string{"c"}, - Usage: "use local scaling calculations instead of requesting the collateral values directly, depending on individual exchange support", - }, - &cli.BoolFlag{ - Name: "includebreakdown", - Aliases: []string{"i"}, - Usage: "include a list of each held currency and its contribution to the overall collateral value", - }, - &cli.BoolFlag{ - Name: "includezerovalues", - Aliases: []string{"z"}, - Usage: "include collateral values that are zero", - }, - }, -} - -func getCollateral(c *cli.Context) error { - if c.NArg() == 0 && c.NumFlags() == 0 { - return cli.ShowCommandHelp(c, c.Command.Name) - } - - var exchangeName string - if c.IsSet("exchange") { - exchangeName = c.String("exchange") - } else { - exchangeName = c.Args().First() - } - - var assetType string - if c.IsSet("asset") { - assetType = c.String("asset") - } else { - assetType = c.Args().Get(1) - } - - if !validAsset(assetType) { - return errInvalidAsset - } - - var err error - var calculateOffline bool - if c.IsSet("calculateoffline") { - calculateOffline = c.Bool("calculateoffline") - } else if c.Args().Get(2) != "" { - calculateOffline, err = strconv.ParseBool(c.Args().Get(2)) - if err != nil { - return err - } - } - - var includeBreakdown bool - if c.IsSet("includebreakdown") { - includeBreakdown = c.Bool("includebreakdown") - } else if c.Args().Get(3) != "" { - includeBreakdown, err = strconv.ParseBool(c.Args().Get(3)) - if err != nil { - return err - } - } - - var includeZeroValues bool - if c.IsSet("includezerovalues") { - includeZeroValues = c.Bool("includezerovalues") - } else if c.Args().Get(4) != "" { - includeZeroValues, err = strconv.ParseBool(c.Args().Get(4)) - if err != nil { - return err - } - } - - conn, cancel, err := setupClient(c) - if err != nil { - return err - } - defer closeConn(conn, cancel) - - client := gctrpc.NewGoCryptoTraderServiceClient(conn) - result, err := client.GetCollateral(c.Context, - &gctrpc.GetCollateralRequest{ - Exchange: exchangeName, - Asset: assetType, - IncludeBreakdown: includeBreakdown, - CalculateOffline: calculateOffline, - IncludeZeroValues: includeZeroValues, - }) - if err != nil { - return err - } - - jsonOutput(result) - return nil -} - var shutdownCommand = &cli.Command{ Name: "shutdown", Usage: "shuts down bot instance", diff --git a/cmd/gctcli/futures.go b/cmd/gctcli/futures.go new file mode 100644 index 00000000..575cd846 --- /dev/null +++ b/cmd/gctcli/futures.go @@ -0,0 +1,813 @@ +package main + +import ( + "errors" + "fmt" + "strconv" + "strings" + "time" + + "github.com/thrasher-corp/gocryptotrader/common" + "github.com/thrasher-corp/gocryptotrader/currency" + "github.com/thrasher-corp/gocryptotrader/exchanges/order" + "github.com/thrasher-corp/gocryptotrader/gctrpc" + "github.com/urfave/cli/v2" +) + +// futuresCommands contains all commands related to futures +// position data, funding rates, collateral, pnl etc +var futuresCommands = &cli.Command{ + Name: "futures", + Aliases: []string{"f"}, + Usage: "contains all futures based rpc commands", + ArgsUsage: " ", + Subcommands: []*cli.Command{ + { + Name: "getmanagedposition", + Aliases: []string{"managedposition", "mp"}, + Usage: "retrieves an open position monitored by the order manager", + ArgsUsage: " ", + Action: getManagedPosition, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "exchange", + Aliases: []string{"e"}, + Usage: "the exchange to retrieve futures positions from", + }, + &cli.StringFlag{ + Name: "asset", + Aliases: []string{"a"}, + Usage: "the asset type of the currency pair, must be a futures type", + }, + &cli.StringFlag{ + Name: "pair", + Aliases: []string{"p"}, + Usage: "the currency pair of the position", + }, + &cli.BoolFlag{ + Name: "includeorderdetails", + Aliases: []string{"orders"}, + Usage: "includes all orders that make up a position in the response", + }, + &cli.BoolFlag{ + Name: "getfundingdata", + Aliases: []string{"funding", "fd"}, + Usage: "if true, will return funding rate summary", + }, + &cli.BoolFlag{ + Name: "includefundingentries", + Aliases: []string{"allfunding", "af"}, + Usage: "if true, will return all funding rate entries - requires --getfundingdata", + }, + &cli.BoolFlag{ + Name: "includepredictedrate", + Aliases: []string{"predicted", "pr"}, + Usage: "if true, will return the predicted funding rate - requires --getfundingdata", + }, + }, + }, + { + Name: "getallmanagedpositions", + Aliases: []string{"managedpositions", "mps"}, + Usage: "retrieves all open positions monitored by the order manager", + ArgsUsage: " ", + Action: getAllManagedPositions, + Flags: []cli.Flag{ + &cli.BoolFlag{ + Name: "includeorderdetails", + Aliases: []string{"orders"}, + Usage: "includes all orders that make up a position in the response", + }, + &cli.BoolFlag{ + Name: "getfundingdata", + Aliases: []string{"funding", "fd"}, + Usage: "if true, will return funding rate summary", + }, + &cli.BoolFlag{ + Name: "includefundingentries", + Aliases: []string{"allfunding", "af"}, + Usage: "if true, will return all funding rate entries - requires --getfundingdata", + }, + &cli.BoolFlag{ + Name: "includepredictedrate", + Aliases: []string{"predicted", "pr"}, + Usage: "if true, will return the predicted funding rate - requires --getfundingdata", + }, + }, + }, + + { + Name: "getfuturespositions", + Aliases: []string{"positions", "p"}, + Usage: "will retrieve all futures positions in a timeframe, then calculate PNL based on that. Note, the dates have an impact on PNL calculations, ensure your start date is not after a new position is opened", + ArgsUsage: " ", + Action: getFuturesPositions, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "exchange", + Aliases: []string{"e"}, + Usage: "the exchange to retrieve futures positions from", + }, + &cli.StringFlag{ + Name: "asset", + Aliases: []string{"a"}, + Usage: "the asset type of the currency pair, must be a futures type", + }, + &cli.StringFlag{ + Name: "pair", + Aliases: []string{"p"}, + Usage: "the currency pair", + }, + &cli.StringFlag{ + Name: "start", + Aliases: []string{"sd"}, + Usage: " rounded down to the nearest hour, ensure your starting position is within this window for accurate calculations", + Value: time.Now().AddDate(-1, 0, 0).Truncate(time.Hour).Format(common.SimpleTimeFormat), + Destination: &startTime, + }, + &cli.StringFlag{ + Name: "end", + Aliases: []string{"ed"}, + Usage: " rounded down to the nearest hour, ensure your last position is within this window for accurate calculations", + Value: time.Now().Format(common.SimpleTimeFormat), + Destination: &endTime, + }, + &cli.IntFlag{ + Name: "limit", + Aliases: []string{"l"}, + Usage: "the number of positions (not orders) to return", + Value: 86400, + Destination: &limit, + }, + &cli.StringFlag{ + Name: "status", + Aliases: []string{"s"}, + Usage: "limit return to position statuses - open, closed, any", + Value: "ANY", + }, + &cli.BoolFlag{ + Name: "overwrite", + Aliases: []string{"o"}, + Usage: "if true, will overwrite futures results for the provided exchange, asset, pair", + }, + &cli.BoolFlag{ + Name: "includeorderdetails", + Aliases: []string{"orders"}, + Usage: "includes all orders that make up a position in the response", + }, + &cli.BoolFlag{ + Name: "getpositionstats", + Aliases: []string{"stats"}, + Usage: "if true, will return extra stats on the position from the exchange", + }, + &cli.BoolFlag{ + Name: "getfundingdata", + Aliases: []string{"funding", "fd"}, + Usage: "if true, will return funding rate summary", + }, + &cli.BoolFlag{ + Name: "includefundingentries", + Aliases: []string{"allfunding", "af"}, + Usage: "if true, will return all funding rate entries - requires --getfundingdata", + }, + &cli.BoolFlag{ + Name: "includepredictedrate", + Aliases: []string{"predicted", "pr"}, + Usage: "if true, will return the predicted funding rate - requires --getfundingdata", + }, + }, + }, + { + Name: "getcollateral", + Aliases: []string{"collateral", "c"}, + Usage: "returns total collateral for an exchange asset, with optional per currency breakdown", + ArgsUsage: " ", + Action: getCollateral, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "exchange", + Aliases: []string{"e"}, + Usage: "the exchange to retrieve futures positions from", + }, + &cli.StringFlag{ + Name: "asset", + Aliases: []string{"a"}, + Usage: "the asset type of the currency pair, must be a futures type", + }, + &cli.BoolFlag{ + Name: "calculateoffline", + Aliases: []string{"c"}, + Usage: "use local scaling calculations instead of requesting the collateral values directly, depending on individual exchange support", + }, + &cli.BoolFlag{ + Name: "includebreakdown", + Aliases: []string{"i"}, + Usage: "include a list of each held currency and its contribution to the overall collateral value", + }, + &cli.BoolFlag{ + Name: "includezerovalues", + Aliases: []string{"z"}, + Usage: "include collateral values that are zero", + }, + }, + }, + { + Name: "getfundingrates", + Aliases: []string{"funding", "f"}, + Usage: "returns funding rate data between two dates", + ArgsUsage: " ", + Action: getFundingRates, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "exchange", + Aliases: []string{"e"}, + Usage: "the exchange to retrieve futures positions from", + }, + &cli.StringFlag{ + Name: "asset", + Aliases: []string{"a"}, + Usage: "the asset type of the currency pair, must be a futures type", + }, + &cli.StringSliceFlag{ + Name: "pairs", + Aliases: []string{"p"}, + Usage: "comma delimited list of pairs you wish to get funding rate data for", + }, + &cli.StringFlag{ + Name: "start", + Aliases: []string{"sd"}, + Usage: " rounded down to the nearest hour, ensure your starting position is within this window for accurate calculations", + Value: time.Now().AddDate(-1, 0, 0).Truncate(time.Hour).Format(common.SimpleTimeFormat), + Destination: &startTime, + }, + &cli.StringFlag{ + Name: "end", + Aliases: []string{"ed"}, + Usage: " rounded down to the nearest hour, ensure your last position is within this window for accurate calculations", + Value: time.Now().Format(common.SimpleTimeFormat), + Destination: &endTime, + }, + &cli.BoolFlag{ + Name: "includepredicted", + Aliases: []string{"ip", "predicted"}, + Usage: "include the predicted next funding rate", + }, + &cli.BoolFlag{ + Name: "includepayments", + Aliases: []string{"pay"}, + Usage: "include funding rate payments", + }, + }, + }, + }, +} + +func getManagedPosition(c *cli.Context) error { + if c.NArg() == 0 && c.NumFlags() == 0 { + return cli.ShowCommandHelp(c, "getmanagedposition") + } + + var exchangeName string + if c.IsSet("exchange") { + exchangeName = c.String("exchange") + } else { + exchangeName = c.Args().First() + } + + var assetType string + if c.IsSet("asset") { + assetType = c.String("asset") + } else { + assetType = c.Args().Get(1) + } + err := isFuturesAsset(assetType) + if err != nil { + return err + } + var currencyPair string + if c.IsSet("pair") { + currencyPair = c.String("pair") + } else { + currencyPair = c.Args().Get(2) + } + if !validPair(currencyPair) { + return errInvalidPair + } + + p, err := currency.NewPairDelimiter(currencyPair, pairDelimiter) + if err != nil { + return err + } + + var includeOrderDetails bool + if c.IsSet("includeorderdetails") { + includeOrderDetails = c.Bool("includeorderdetails") + } else if c.Args().Get(3) != "" { + includeOrderDetails, err = strconv.ParseBool(c.Args().Get(3)) + if err != nil { + return err + } + } + + var getFundingData bool + if c.IsSet("getfundingdata") { + getFundingData = c.Bool("getfundingdata") + } else if c.Args().Get(4) != "" { + getFundingData, err = strconv.ParseBool(c.Args().Get(4)) + if err != nil { + return err + } + } + + var includeFundingEntries bool + if c.IsSet("includefundingentries") { + includeFundingEntries = c.Bool("includefundingentries") + } else if c.Args().Get(5) != "" { + includeFundingEntries, err = strconv.ParseBool(c.Args().Get(5)) + if err != nil { + return err + } + } + + var includePredictedRate bool + if c.IsSet("includepredictedrate") { + includePredictedRate = c.Bool("includepredictedrate") + } else if c.Args().Get(6) != "" { + includePredictedRate, err = strconv.ParseBool(c.Args().Get(6)) + if err != nil { + return err + } + } + + err = order.CheckFundingRatePrerequisites(getFundingData, includePredictedRate, includeFundingEntries) + if err != nil { + return err + } + + conn, cancel, err := setupClient(c) + if err != nil { + return err + } + defer closeConn(conn, cancel) + + client := gctrpc.NewGoCryptoTraderServiceClient(conn) + result, err := client.GetManagedPosition(c.Context, + &gctrpc.GetManagedPositionRequest{ + Exchange: exchangeName, + Asset: assetType, + Pair: &gctrpc.CurrencyPair{ + Delimiter: p.Delimiter, + Base: p.Base.String(), + Quote: p.Quote.String(), + }, + IncludeFullOrderData: includeOrderDetails, + GetFundingPayments: getFundingData, + IncludeFullFundingRates: includeFundingEntries, + IncludePredictedRate: includePredictedRate, + }) + if err != nil { + return err + } + + jsonOutput(result) + return nil +} + +func getAllManagedPositions(c *cli.Context) error { + var ( + err error + includeOrderDetails bool + getFundingData bool + includeFundingEntries bool + includePredictedRate bool + ) + if c.IsSet("includeorderdetails") { + includeOrderDetails = c.Bool("includeorderdetails") + } else if c.Args().Get(0) != "" { + includeOrderDetails, err = strconv.ParseBool(c.Args().Get(0)) + if err != nil { + return err + } + } + + if c.IsSet("getfundingdata") { + getFundingData = c.Bool("getfundingdata") + } else if c.Args().Get(1) != "" { + getFundingData, err = strconv.ParseBool(c.Args().Get(1)) + if err != nil { + return err + } + } + + if c.IsSet("includefundingentries") { + includeFundingEntries = c.Bool("includefundingentries") + } else if c.Args().Get(2) != "" { + includeFundingEntries, err = strconv.ParseBool(c.Args().Get(2)) + if err != nil { + return err + } + } + + if c.IsSet("includepredictedrate") { + includePredictedRate = c.Bool("includepredictedrate") + } else if c.Args().Get(2) != "" { + includePredictedRate, err = strconv.ParseBool(c.Args().Get(3)) + if err != nil { + return err + } + } + + err = order.CheckFundingRatePrerequisites(getFundingData, includePredictedRate, includeFundingEntries) + if err != nil { + return err + } + + conn, cancel, err := setupClient(c) + if err != nil { + return err + } + defer closeConn(conn, cancel) + + client := gctrpc.NewGoCryptoTraderServiceClient(conn) + result, err := client.GetAllManagedPositions(c.Context, + &gctrpc.GetAllManagedPositionsRequest{ + IncludeFullOrderData: includeOrderDetails, + GetFundingPayments: getFundingData, + IncludeFullFundingRates: includeFundingEntries, + IncludePredictedRate: includePredictedRate, + }) + if err != nil { + return err + } + + jsonOutput(result) + return nil +} + +func getFuturesPositions(c *cli.Context) error { + if c.NArg() == 0 && c.NumFlags() == 0 { + return cli.ShowCommandHelp(c, "getfuturespositions") + } + var ( + exchangeName string + assetType string + currencyPair string + err error + includeOrderDetails bool + status string + overwrite bool + getFundingData bool + includeFundingEntries bool + getPositionsStats bool + includePredicted bool + s, e time.Time + ) + if c.IsSet("exchange") { + exchangeName = c.String("exchange") + } else { + exchangeName = c.Args().First() + } + + if c.IsSet("asset") { + assetType = c.String("asset") + } else { + assetType = c.Args().Get(1) + } + + err = isFuturesAsset(assetType) + if err != nil { + return err + } + if c.IsSet("pair") { + currencyPair = c.String("pair") + } else { + currencyPair = c.Args().Get(2) + } + if !validPair(currencyPair) { + return errInvalidPair + } + + p, err := currency.NewPairDelimiter(currencyPair, pairDelimiter) + if err != nil { + return err + } + + if !c.IsSet("start") { + if c.Args().Get(3) != "" { + startTime = c.Args().Get(3) + } + } + + if !c.IsSet("end") { + if c.Args().Get(4) != "" { + endTime = c.Args().Get(4) + } + } + if c.IsSet("limit") { + limit = c.Int("limit") + } else if c.Args().Get(5) != "" { + var limit64 int64 + limit64, err = strconv.ParseInt(c.Args().Get(5), 10, 64) + if err != nil { + return err + } + limit = int(limit64) + } + if limit <= 0 { + return errors.New("limit must be greater than 0") + } + + if c.IsSet("status") { + status = c.String("status") + } else if c.Args().Get(6) != "" { + status = c.Args().Get(6) + } + if !strings.EqualFold(status, "any") && + !strings.EqualFold(status, "open") && + !strings.EqualFold(status, "closed") && + status != "" { + return errors.New("unrecognised status") + } + + if c.IsSet("overwrite") { + overwrite = c.Bool("overwrite") + } else if c.Args().Get(7) != "" { + overwrite, err = strconv.ParseBool(c.Args().Get(7)) + if err != nil { + return err + } + } + + if c.IsSet("includeorderdetails") { + includeOrderDetails = c.Bool("includeorderdetails") + } else if c.Args().Get(8) != "" { + includeOrderDetails, err = strconv.ParseBool(c.Args().Get(8)) + if err != nil { + return err + } + } + if c.IsSet("getpositionstats") { + getPositionsStats = c.Bool("getpositionstats") + } else if c.Args().Get(9) != "" { + getPositionsStats, err = strconv.ParseBool(c.Args().Get(9)) + if err != nil { + return err + } + } + if c.IsSet("getfundingdata") { + getFundingData = c.Bool("getfundingdata") + } else if c.Args().Get(10) != "" { + getFundingData, err = strconv.ParseBool(c.Args().Get(10)) + if err != nil { + return err + } + } + if c.IsSet("includefundingentries") { + includeFundingEntries = c.Bool("includefundingentries") + } else if c.Args().Get(11) != "" { + includeFundingEntries, err = strconv.ParseBool(c.Args().Get(11)) + if err != nil { + return err + } + } + if c.IsSet("includepredictedrate") { + includePredicted = c.Bool("includepredictedrate") + } else if c.Args().Get(12) != "" { + includePredicted, err = strconv.ParseBool(c.Args().Get(12)) + if err != nil { + return err + } + } + err = order.CheckFundingRatePrerequisites(getFundingData, includePredicted, includeFundingEntries) + if err != nil { + return err + } + + s, err = time.Parse(common.SimpleTimeFormat, startTime) + if err != nil { + return fmt.Errorf("invalid time format for start: %v", err) + } + e, err = time.Parse(common.SimpleTimeFormat, endTime) + if err != nil { + return fmt.Errorf("invalid time format for end: %v", err) + } + + if e.Before(s) { + return errors.New("start cannot be after end") + } + + conn, cancel, err := setupClient(c) + if err != nil { + return err + } + defer closeConn(conn, cancel) + + client := gctrpc.NewGoCryptoTraderServiceClient(conn) + result, err := client.GetFuturesPositions(c.Context, + &gctrpc.GetFuturesPositionsRequest{ + Exchange: exchangeName, + Asset: assetType, + Pair: &gctrpc.CurrencyPair{ + Delimiter: p.Delimiter, + Base: p.Base.String(), + Quote: p.Quote.String(), + }, + StartDate: negateLocalOffset(s), + EndDate: negateLocalOffset(e), + Status: status, + PositionLimit: int64(limit), + Overwrite: overwrite, + GetPositionStats: getPositionsStats, + IncludeFullOrderData: includeOrderDetails, + GetFundingPayments: getFundingData, + IncludeFullFundingRates: includeFundingEntries, + IncludePredictedRate: includePredicted, + }) + if err != nil { + return err + } + + jsonOutput(result) + return nil +} + +func getCollateral(c *cli.Context) error { + if c.NArg() == 0 && c.NumFlags() == 0 { + return cli.ShowCommandHelp(c, c.Command.Name) + } + var ( + exchangeName, assetType string + calculateOffline, includeBreakdown, includeZeroValues bool + err error + ) + if c.IsSet("exchange") { + exchangeName = c.String("exchange") + } else { + exchangeName = c.Args().First() + } + if c.IsSet("asset") { + assetType = c.String("asset") + } else { + assetType = c.Args().Get(1) + } + + err = isFuturesAsset(assetType) + if err != nil { + return err + } + if c.IsSet("calculateoffline") { + calculateOffline = c.Bool("calculateoffline") + } else if c.Args().Get(2) != "" { + calculateOffline, err = strconv.ParseBool(c.Args().Get(2)) + if err != nil { + return err + } + } + + if c.IsSet("includebreakdown") { + includeBreakdown = c.Bool("includebreakdown") + } else if c.Args().Get(3) != "" { + includeBreakdown, err = strconv.ParseBool(c.Args().Get(3)) + if err != nil { + return err + } + } + + if c.IsSet("includezerovalues") { + includeZeroValues = c.Bool("includezerovalues") + } else if c.Args().Get(4) != "" { + includeZeroValues, err = strconv.ParseBool(c.Args().Get(4)) + if err != nil { + return err + } + } + + conn, cancel, err := setupClient(c) + if err != nil { + return err + } + defer closeConn(conn, cancel) + + client := gctrpc.NewGoCryptoTraderServiceClient(conn) + result, err := client.GetCollateral(c.Context, + &gctrpc.GetCollateralRequest{ + Exchange: exchangeName, + Asset: assetType, + IncludeBreakdown: includeBreakdown, + CalculateOffline: calculateOffline, + IncludeZeroValues: includeZeroValues, + }) + if err != nil { + return err + } + + jsonOutput(result) + return nil +} + +func getFundingRates(c *cli.Context) error { + if c.NArg() == 0 && c.NumFlags() == 0 { + return cli.ShowCommandHelp(c, "getfundingrates") + } + var ( + exchangeName, assetType string + currencyPairs []string + includePredicted, includePayments bool + p currency.Pair + s, e time.Time + err error + ) + if c.IsSet("exchange") { + exchangeName = c.String("exchange") + } else { + exchangeName = c.Args().First() + } + + if c.IsSet("asset") { + assetType = c.String("asset") + } else { + assetType = c.Args().Get(1) + } + + err = isFuturesAsset(assetType) + if err != nil { + return err + } + if c.IsSet("pairs") { + currencyPairs = c.StringSlice("pairs") + } else { + currencyPairs = strings.Split(c.Args().Get(2), ",") + } + for i := range currencyPairs { + if !validPair(currencyPairs[i]) { + return errInvalidPair + } + p, err = currency.NewPairDelimiter(currencyPairs[i], pairDelimiter) + if err != nil { + return err + } + currencyPairs[i] = p.String() + } + if !c.IsSet("start") { + if c.Args().Get(3) != "" { + startTime = c.Args().Get(3) + } + } + if !c.IsSet("end") { + if c.Args().Get(4) != "" { + endTime = c.Args().Get(4) + } + } + if c.IsSet("includepredicted") { + includePredicted = c.Bool("includepredicted") + } else if c.Args().Get(5) != "" { + includePredicted, err = strconv.ParseBool(c.Args().Get(5)) + if err != nil { + return err + } + } + if c.IsSet("includepayments") { + includePayments = c.Bool("includepayments") + } else if c.Args().Get(6) != "" { + includePayments, err = strconv.ParseBool(c.Args().Get(6)) + if err != nil { + return err + } + } + s, err = time.Parse(common.SimpleTimeFormat, startTime) + if err != nil { + return fmt.Errorf("invalid time format for start: %v", err) + } + e, err = time.Parse(common.SimpleTimeFormat, endTime) + if err != nil { + return fmt.Errorf("invalid time format for end: %v", err) + } + + if e.Before(s) { + return errors.New("start cannot be after end") + } + + conn, cancel, err := setupClient(c) + if err != nil { + return err + } + defer closeConn(conn, cancel) + + client := gctrpc.NewGoCryptoTraderServiceClient(conn) + result, err := client.GetFundingRates(c.Context, + &gctrpc.GetFundingRatesRequest{ + Exchange: exchangeName, + Asset: assetType, + Pairs: currencyPairs, + StartDate: negateLocalOffset(s), + EndDate: negateLocalOffset(e), + IncludePredicted: includePredicted, + IncludePayments: includePayments, + }) + if err != nil { + return err + } + + jsonOutput(result) + return nil +} diff --git a/cmd/gctcli/main.go b/cmd/gctcli/main.go index 60dab27c..626d5187 100644 --- a/cmd/gctcli/main.go +++ b/cmd/gctcli/main.go @@ -209,8 +209,7 @@ func main() { tradeCommand, dataHistoryCommands, currencyStateManagementCommand, - getFuturesPositionsCommand, - getCollateralCommand, + futuresCommands, shutdownCommand, technicalAnalysisCommand, getMarginRatesHistoryCommand, diff --git a/cmd/gctcli/validation.go b/cmd/gctcli/validation.go index 25e187a2..cb0d1cb5 100644 --- a/cmd/gctcli/validation.go +++ b/cmd/gctcli/validation.go @@ -2,9 +2,11 @@ package main import ( "errors" + "fmt" "strings" "github.com/thrasher-corp/gocryptotrader/exchanges/asset" + "github.com/thrasher-corp/gocryptotrader/exchanges/order" ) var ( @@ -20,3 +22,14 @@ func validAsset(i string) bool { _, err := asset.New(i) return err == nil } + +func isFuturesAsset(a string) error { + i, err := asset.New(a) + if err != nil { + return err + } + if !i.IsFutures() { + return fmt.Errorf("%w '%s'", order.ErrNotFuturesAsset, a) + } + return nil +} diff --git a/config/config.go b/config/config.go index c9a07f64..8025f137 100644 --- a/config/config.go +++ b/config/config.go @@ -1336,6 +1336,21 @@ func (c *Config) CheckCurrencyStateManager() { } } +// CheckOrderManagerConfig ensures the order manager is setup correctly +func (c *Config) CheckOrderManagerConfig() { + m.Lock() + defer m.Unlock() + if c.OrderManager.Enabled == nil { + c.OrderManager.Enabled = convert.BoolPtr(true) + c.OrderManager.ActivelyTrackFuturesPositions = true + } + if c.OrderManager.ActivelyTrackFuturesPositions && c.OrderManager.FuturesTrackingSeekDuration >= 0 { + // one isn't likely to have a perpetual futures order open + // for longer than a year + c.OrderManager.FuturesTrackingSeekDuration = -time.Hour * 24 * 365 + } +} + // CheckConnectionMonitorConfig checks and if zero value assigns default values func (c *Config) CheckConnectionMonitorConfig() { m.Lock() @@ -1684,6 +1699,7 @@ func (c *Config) CheckConfig() error { c.CheckConnectionMonitorConfig() c.CheckDataHistoryMonitorConfig() c.CheckCurrencyStateManager() + c.CheckOrderManagerConfig() c.CheckCommunicationsConfig() c.CheckClientBankAccounts() c.CheckBankAccountConfig() diff --git a/config/config_types.go b/config/config_types.go index c8f583b7..74f71c0e 100644 --- a/config/config_types.go +++ b/config/config_types.go @@ -81,6 +81,7 @@ type Config struct { Database database.Config `json:"database"` Logging log.Config `json:"logging"` ConnectionMonitor ConnectionMonitorConfig `json:"connectionMonitor"` + OrderManager OrderManager `json:"orderManager"` DataHistoryManager DataHistoryManager `json:"dataHistoryManager"` CurrencyStateManager CurrencyStateManager `json:"currencyStateManager"` Profiler Profiler `json:"profiler"` @@ -104,6 +105,14 @@ type Config struct { sessionDK []byte } +// OrderManager holds settings used for the order manager +type OrderManager struct { + Enabled *bool `json:"enabled"` + Verbose bool `json:"verbose"` + ActivelyTrackFuturesPositions bool `json:"activelyTrackFuturesPositions"` + FuturesTrackingSeekDuration time.Duration `json:"futuresTrackingSeekDuration"` +} + // DataHistoryManager holds all information required for the data history manager type DataHistoryManager struct { Enabled bool `json:"enabled"` diff --git a/currency/code.go b/currency/code.go index b917881b..fa7e1534 100644 --- a/currency/code.go +++ b/currency/code.go @@ -15,6 +15,8 @@ var ( ErrCurrencyNotFound = errors.New("currency code not found in list") // ErrCurrencyPairEmpty defines an error if the currency pair is empty ErrCurrencyPairEmpty = errors.New("currency pair is empty") + // ErrCurrencyPairsEmpty returns when a currency.Pairs has len == 0 + ErrCurrencyPairsEmpty = errors.New("currency pairs is empty") // EMPTYCODE is an empty currency code EMPTYCODE = Code{} // EMPTYPAIR is an empty currency pair diff --git a/engine/engine.go b/engine/engine.go index 5579bf0c..e15f7c09 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -163,6 +163,7 @@ func validateSettings(b *Engine, s *Settings, flagSet FlagSet) { b.Settings = *s flagSet.WithBool("coinmarketcap", &b.Settings.EnableCoinmarketcapAnalysis, b.Config.Currency.CryptocurrencyProvider.Enabled) + flagSet.WithBool("ordermanager", &b.Settings.EnableOrderManager, b.Config.OrderManager.Enabled != nil && *b.Config.OrderManager.Enabled) flagSet.WithBool("currencyconverter", &b.Settings.EnableCurrencyConverter, b.Config.Currency.ForexProviders.IsEnabled("currencyconverter")) @@ -525,8 +526,9 @@ func (bot *Engine) Start() error { bot.ExchangeManager, bot.CommunicationsManager, &bot.ServicesWG, - bot.Settings.EnableFuturesTracking, - bot.Settings.Verbose) + bot.Config.OrderManager.Verbose, + bot.Config.OrderManager.ActivelyTrackFuturesPositions, + bot.Config.OrderManager.FuturesTrackingSeekDuration) if err != nil { gctlog.Errorf(gctlog.Global, "Order manager unable to setup: %s", err) } else { diff --git a/engine/helpers.go b/engine/helpers.go index 5eb3e086..76766da1 100644 --- a/engine/helpers.go +++ b/engine/helpers.go @@ -137,8 +137,9 @@ func (bot *Engine) SetSubsystem(subSystemName string, enable bool) error { bot.ExchangeManager, bot.CommunicationsManager, &bot.ServicesWG, - bot.Settings.EnableFuturesTracking, - bot.Settings.Verbose) + bot.Config.OrderManager.Verbose, + bot.Config.OrderManager.ActivelyTrackFuturesPositions, + bot.Config.OrderManager.FuturesTrackingSeekDuration) if err != nil { return err } diff --git a/engine/order_manager.go b/engine/order_manager.go index aa55c31e..37d44a13 100644 --- a/engine/order_manager.go +++ b/engine/order_manager.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "sort" "strings" "sync" "sync/atomic" @@ -21,7 +22,7 @@ import ( ) // SetupOrderManager will boot up the OrderManager -func SetupOrderManager(exchangeManager iExchangeManager, communicationsManager iCommsManager, wg *sync.WaitGroup, enabledFuturesTracking, verbose bool) (*OrderManager, error) { +func SetupOrderManager(exchangeManager iExchangeManager, communicationsManager iCommsManager, wg *sync.WaitGroup, verbose, activelyTrackFuturesPositions bool, futuresTrackingSeekDuration time.Duration) (*OrderManager, error) { if exchangeManager == nil { return nil, errNilExchangeManager } @@ -32,18 +33,28 @@ func SetupOrderManager(exchangeManager iExchangeManager, communicationsManager i return nil, errNilWaitGroup } - return &OrderManager{ - shutdown: make(chan struct{}), + om := &OrderManager{ + shutdown: make(chan struct{}), + activelyTrackFuturesPositions: activelyTrackFuturesPositions, orderStore: store{ Orders: make(map[string][]*order.Detail), exchangeManager: exchangeManager, commsManager: communicationsManager, wg: wg, futuresPositionController: order.SetupPositionController(), - trackFuturesPositions: enabledFuturesTracking, }, verbose: verbose, - }, nil + } + if activelyTrackFuturesPositions { + if futuresTrackingSeekDuration > 0 { + futuresTrackingSeekDuration = -futuresTrackingSeekDuration + } + if futuresTrackingSeekDuration == 0 { + futuresTrackingSeekDuration = defaultOrderSeekTime + } + om.futuresPositionSeekDuration = futuresTrackingSeekDuration + } + return om, nil } // IsRunning safely checks whether the subsystem is running @@ -85,7 +96,7 @@ func (m *OrderManager) gracefulShutdown() { if !m.cfg.CancelOrdersOnShutdown { return } - log.Debugln(log.OrderMgr, "Order manager: Cancelling any open orders...") + log.Debugln(log.OrderMgr, "Cancelling any open orders...") exchanges, err := m.orderStore.exchangeManager.GetExchanges() if err != nil { log.Errorf(log.OrderMgr, "Order manager cannot get exchanges: %v", err) @@ -133,7 +144,7 @@ func (m *OrderManager) CancelAllOrders(ctx context.Context, exchanges []exchange continue } for j := range orders { - log.Debugf(log.OrderMgr, "Order manager: Cancelling order(s) for exchange %s.", exchanges[i].GetName()) + log.Debugf(log.OrderMgr, "Cancelling order(s) for exchange %s.", exchanges[i].GetName()) cancel, err := orders[j].DeriveCancel() if err != nil { log.Error(log.OrderMgr, err) @@ -189,7 +200,7 @@ func (m *OrderManager) Cancel(ctx context.Context, cancel *order.Cancel) error { return err } - log.Debugf(log.OrderMgr, "Order manager: Cancelling order ID %v [%+v]", + log.Debugf(log.OrderMgr, "Cancelling order ID %v [%+v]", cancel.OrderID, cancel) err = exch.CancelOrder(ctx, cancel) @@ -210,7 +221,7 @@ func (m *OrderManager) Cancel(ctx context.Context, cancel *order.Cancel) error { return err } - msg := fmt.Sprintf("Order manager: Exchange %s order ID=%v cancelled.", + msg := fmt.Sprintf("Exchange %s order ID=%v cancelled.", od.Exchange, od.OrderID) log.Debugln(log.OrderMgr, msg) m.orderStore.commsManager.PushEvent(base.Event{Type: "order", Message: msg}) @@ -219,16 +230,13 @@ func (m *OrderManager) Cancel(ctx context.Context, cancel *order.Cancel) error { // GetFuturesPositionsForExchange returns futures positions stored within // the order manager's futures position tracker that match the provided params -func (m *OrderManager) GetFuturesPositionsForExchange(exch string, item asset.Item, pair currency.Pair) ([]order.PositionStats, error) { +func (m *OrderManager) GetFuturesPositionsForExchange(exch string, item asset.Item, pair currency.Pair) ([]order.Position, error) { if m == nil { return nil, fmt.Errorf("order manager %w", ErrNilSubsystem) } if atomic.LoadInt32(&m.started) == 0 { return nil, fmt.Errorf("order manager %w", ErrSubSystemNotStarted) } - if m.orderStore.futuresPositionController == nil { - return nil, errFuturesTrackerNotSetup - } if !item.IsFutures() { return nil, fmt.Errorf("%v %w", item, order.ErrNotFuturesAsset) } @@ -236,6 +244,39 @@ func (m *OrderManager) GetFuturesPositionsForExchange(exch string, item asset.It return m.orderStore.futuresPositionController.GetPositionsForExchange(exch, item, pair) } +// GetOpenFuturesPosition returns an open futures position stored within +// the order manager's futures position tracker that match the provided params +func (m *OrderManager) GetOpenFuturesPosition(exch string, item asset.Item, pair currency.Pair) (*order.Position, error) { + if m == nil { + return nil, fmt.Errorf("order manager %w", ErrNilSubsystem) + } + if atomic.LoadInt32(&m.started) == 0 { + return nil, fmt.Errorf("order manager %w", ErrSubSystemNotStarted) + } + if !item.IsFutures() { + return nil, fmt.Errorf("%v %w", item, order.ErrNotFuturesAsset) + } + if !m.activelyTrackFuturesPositions { + return nil, errFuturesTrackingDisabled + } + return m.orderStore.futuresPositionController.GetOpenPosition(exch, item, pair) +} + +// GetAllOpenFuturesPositions returns all open futures positions stored within +// the order manager's futures position tracker that match the provided params +func (m *OrderManager) GetAllOpenFuturesPositions() ([]order.Position, error) { + if m == nil { + return nil, fmt.Errorf("order manager %w", ErrNilSubsystem) + } + if atomic.LoadInt32(&m.started) == 0 { + return nil, fmt.Errorf("order manager %w", ErrSubSystemNotStarted) + } + if !m.activelyTrackFuturesPositions { + return nil, errFuturesTrackingDisabled + } + return m.orderStore.futuresPositionController.GetAllOpenPositions() +} + // ClearFuturesTracking will clear existing futures positions for a given exchange, // asset, pair for the event that positions have not been tracked accurately func (m *OrderManager) ClearFuturesTracking(exch string, item asset.Item, pair currency.Pair) error { @@ -245,9 +286,6 @@ func (m *OrderManager) ClearFuturesTracking(exch string, item asset.Item, pair c if atomic.LoadInt32(&m.started) == 0 { return fmt.Errorf("order manager %w", ErrSubSystemNotStarted) } - if m.orderStore.futuresPositionController == nil { - return errFuturesTrackerNotSetup - } if !item.IsFutures() { return fmt.Errorf("%v %w", item, order.ErrNotFuturesAsset) } @@ -265,9 +303,6 @@ func (m *OrderManager) UpdateOpenPositionUnrealisedPNL(e string, item asset.Item if atomic.LoadInt32(&m.started) == 0 { return decimal.Zero, fmt.Errorf("order manager %w", ErrSubSystemNotStarted) } - if m.orderStore.futuresPositionController == nil { - return decimal.Zero, errFuturesTrackerNotSetup - } if !item.IsFutures() { return decimal.Zero, fmt.Errorf("%v %w", item, order.ErrNotFuturesAsset) } @@ -381,7 +416,7 @@ func (m *OrderManager) Modify(ctx context.Context, mod *order.Modify) (*order.Mo res, err := exch.ModifyOrder(ctx, mod) if err != nil { message := fmt.Sprintf( - "Order manager: Exchange %s order ID=%v: failed to modify", + "Exchange %s order ID=%v: failed to modify", mod.Exchange, mod.OrderID, ) @@ -401,9 +436,9 @@ func (m *OrderManager) Modify(ctx context.Context, mod *order.Modify) (*order.Mo // Notify observers. var message string if err != nil { - message = "Order manager: Exchange %s order ID=%v: modified on exchange, but failed to modify locally" + message = "Exchange %s order ID=%v: modified on exchange, but failed to modify locally" } else { - message = "Order manager: Exchange %s order ID=%v: modified successfully" + message = "Exchange %s order ID=%v: modified successfully" } m.orderStore.commsManager.PushEvent(base.Event{ Type: "order", @@ -551,7 +586,7 @@ func (m *OrderManager) processSubmittedOrder(newOrderResp *order.SubmitResponse) id, err := uuid.NewV4() if err != nil { - log.Warnf(log.OrderMgr, "Order manager: Unable to generate UUID. Err: %s", err) + log.Warnf(log.OrderMgr, "Unable to generate UUID. Err: %s", err) } detail, err := newOrderResp.DeriveDetail(id) @@ -559,7 +594,7 @@ func (m *OrderManager) processSubmittedOrder(newOrderResp *order.SubmitResponse) return nil, err } - msg := fmt.Sprintf("Order manager: Exchange %s submitted order ID=%v [Ours: %v] pair=%v price=%v amount=%v quoteAmount=%v side=%v type=%v for time %v.", + msg := fmt.Sprintf("Exchange %s submitted order ID=%v [Ours: %v] pair=%v price=%v amount=%v quoteAmount=%v side=%v type=%v for time %v.", detail.Exchange, detail.OrderID, detail.InternalOrderID.String(), @@ -592,28 +627,29 @@ func (m *OrderManager) processOrders() { return } defer atomic.StoreInt32(&m.processingOrders, 0) - exchanges, err := m.orderStore.exchangeManager.GetExchanges() if err != nil { - log.Errorf(log.OrderMgr, "Order manager cannot get exchanges: %v", err) + log.Errorf(log.OrderMgr, "order manager cannot get exchanges: %v", err) return } var wg sync.WaitGroup - for i := range exchanges { - if !exchanges[i].IsRESTAuthenticationSupported() { + for x := range exchanges { + if !exchanges[x].IsRESTAuthenticationSupported() { continue } - log.Debugf(log.OrderMgr, - "Order manager: Processing orders for exchange %v.", - exchanges[i].GetName()) - - enabledAssets := exchanges[i].GetAssetTypes(true) + if m.verbose { + log.Debugf(log.OrderMgr, + "Processing orders for exchange %v", + exchanges[x].GetName()) + } + enabledAssets := exchanges[x].GetAssetTypes(true) for y := range enabledAssets { - pairs, err := exchanges[i].GetEnabledPairs(enabledAssets[y]) + var pairs currency.Pairs + pairs, err = exchanges[x].GetEnabledPairs(enabledAssets[y]) if err != nil { log.Errorf(log.OrderMgr, - "Order manager: Unable to get enabled pairs for %s and asset type %s: %s", - exchanges[i].GetName(), + "Unable to get enabled pairs for %s and asset type %s: %s", + exchanges[x].GetName(), enabledAssets[y], err) continue @@ -622,18 +658,18 @@ func (m *OrderManager) processOrders() { if len(pairs) == 0 { if m.verbose { log.Debugf(log.OrderMgr, - "Order manager: No pairs enabled for %s and asset type %s, skipping...", - exchanges[i].GetName(), + "No pairs enabled for %s and asset type %s, skipping...", + exchanges[x].GetName(), enabledAssets[y]) } continue } - filter := &order.Filter{Exchange: exchanges[i].GetName()} + filter := &order.Filter{Exchange: exchanges[x].GetName()} orders := m.orderStore.getActiveOrders(filter) order.FilterOrdersByPairs(&orders, pairs) - - result, err := exchanges[i].GetActiveOrders(context.TODO(), &order.GetOrdersRequest{ + var result []order.Detail + result, err = exchanges[x].GetActiveOrders(context.TODO(), &order.GetOrdersRequest{ Side: order.AnySide, Type: order.AnyType, Pairs: pairs, @@ -641,38 +677,141 @@ func (m *OrderManager) processOrders() { }) if err != nil { log.Errorf(log.OrderMgr, - "Order manager: Unable to get active orders for %s and asset type %s: %s", - exchanges[i].GetName(), + "Unable to get active orders for %s and asset type %s: %s", + exchanges[x].GetName(), enabledAssets[y], err) continue } - if len(orders) == 0 && len(result) == 0 { - continue - } - - for z := range result { - upsertResponse, err := m.UpsertOrder(&result[z]) - if err != nil { - log.Error(log.OrderMgr, err) - } else { - for i := range orders { - if orders[i].InternalOrderID != upsertResponse.OrderDetails.InternalOrderID { - continue + if len(orders) > 0 && len(result) > 0 { + for z := range result { + var upsertResponse *OrderUpsertResponse + upsertResponse, err = m.UpsertOrder(&result[z]) + if err != nil { + log.Error(log.OrderMgr, err) + } else { + for i := range orders { + if orders[i].InternalOrderID != upsertResponse.OrderDetails.InternalOrderID { + continue + } + orders[i] = orders[len(orders)-1] + orders = orders[:len(orders)-1] + break } - orders[i] = orders[len(orders)-1] - orders = orders[:len(orders)-1] } } } - if !exchanges[i].GetBase().GetSupportedFeatures().RESTCapabilities.GetOrder { - continue + + if exchanges[x].GetBase().GetSupportedFeatures().RESTCapabilities.GetOrder { + wg.Add(1) + go m.processMatchingOrders(exchanges[x], orders, &wg) + } + + if m.activelyTrackFuturesPositions && enabledAssets[y].IsFutures() { + var positions []order.PositionDetails + var sd time.Time + sd, err = m.orderStore.futuresPositionController.LastUpdated() + if err != nil { + log.Error(log.OrderMgr, err) + return + } + if sd.IsZero() { + sd = time.Now().Add(m.futuresPositionSeekDuration) + } + positions, err = exchanges[x].GetFuturesPositions(context.TODO(), &order.PositionsRequest{ + Asset: enabledAssets[y], + Pairs: pairs, + StartDate: sd, + }) + if err != nil { + if !errors.Is(err, common.ErrNotYetImplemented) { + log.Error(log.OrderMgr, err) + } + return + } + for z := range positions { + if len(positions[z].Orders) == 0 { + continue + } + err = m.processFuturesPositions(exchanges[x], &positions[z]) + if err != nil { + log.Errorf(log.OrderMgr, "unable to process future positions for %v %v %v. err: %v", positions[z].Exchange, positions[z].Asset, positions[z].Pair, err) + } + } } - wg.Add(1) - go m.processMatchingOrders(exchanges[i], orders, &wg) } } wg.Wait() + if m.verbose { + log.Debugf(log.OrderMgr, "Finished processing orders") + } +} + +// processFuturesPositions ensures any open position found is kept up to date in the order manager +func (m *OrderManager) processFuturesPositions(exch exchange.IBotExchange, position *order.PositionDetails) error { + if !m.activelyTrackFuturesPositions { + return errFuturesTrackingDisabled + } + if exch == nil { + return fmt.Errorf("%w IBotExchange", common.ErrNilPointer) + } + if position == nil { + return fmt.Errorf("%w PositionDetails", common.ErrNilPointer) + } + if len(position.Orders) == 0 { + return fmt.Errorf("%w position for '%v' '%v' '%v' has no orders", errNilOrder, position.Exchange, position.Asset, position.Pair) + } + sort.Slice(position.Orders, func(i, j int) bool { + return position.Orders[i].Date.Before(position.Orders[j].Date) + }) + var err error + for i := range position.Orders { + err = m.orderStore.futuresPositionController.TrackNewOrder(&position.Orders[i]) + if err != nil { + return err + } + } + _, err = m.orderStore.futuresPositionController.GetOpenPosition(position.Exchange, position.Asset, position.Pair) + if err != nil { + if errors.Is(err, order.ErrPositionNotFound) { + return nil + } + return err + } + tick, err := exch.FetchTicker(context.TODO(), position.Pair, position.Asset) + if err != nil { + return fmt.Errorf("%w when fetching ticker data for %v %v %v", err, position.Exchange, position.Asset, position.Pair) + } + _, err = m.UpdateOpenPositionUnrealisedPNL(position.Exchange, position.Asset, position.Pair, tick.Last, tick.LastUpdated) + if err != nil { + return fmt.Errorf("%w when updating unrealised PNL for %v %v %v", err, position.Exchange, position.Asset, position.Pair) + } + isPerp, err := exch.IsPerpetualFutureCurrency(position.Asset, position.Pair) + if err != nil { + return err + } + if !isPerp { + return nil + } + frp, err := exch.GetFundingRates(context.TODO(), &order.FundingRatesRequest{ + Asset: position.Asset, + Pairs: currency.Pairs{position.Pair}, + StartDate: position.Orders[0].Date, + EndDate: time.Now(), + IncludePayments: true, + IncludePredictedRate: true, + }) + if err != nil { + return err + } + for i := range frp { + err = m.orderStore.futuresPositionController.TrackFundingDetails(&frp[i]) + if err != nil { + return err + } + } + + return nil } func (m *OrderManager) processMatchingOrders(exch exchange.IBotExchange, orders []order.Detail, wg *sync.WaitGroup) { @@ -770,7 +909,7 @@ func (m *OrderManager) UpsertOrder(od *order.Detail) (resp *OrderUpsertResponse, upsertResponse, err := m.orderStore.upsert(od) if err != nil { msg = fmt.Sprintf( - "Order manager: Exchange %s unable to upsert order ID=%v internal ID=%v pair=%v price=%.8f amount=%.8f side=%v type=%v status=%v: %s", + "Exchange %s unable to upsert order ID=%v internal ID=%v pair=%v price=%.8f amount=%.8f side=%v type=%v status=%v: %s", od.Exchange, od.OrderID, od.InternalOrderID, od.Pair, od.Price, od.Amount, od.Side, od.Type, od.Status, err) return nil, err } @@ -779,7 +918,7 @@ func (m *OrderManager) UpsertOrder(od *order.Detail) (resp *OrderUpsertResponse, if upsertResponse.IsNewOrder { status = "added" } - msg = fmt.Sprintf("Order manager: Exchange %s %s order ID=%v internal ID=%v pair=%v price=%.8f amount=%.8f side=%v type=%v status=%v.", + msg = fmt.Sprintf("Exchange %s %s order ID=%v internal ID=%v pair=%v price=%.8f amount=%.8f side=%v type=%v status=%v.", upsertResponse.OrderDetails.Exchange, status, upsertResponse.OrderDetails.OrderID, upsertResponse.OrderDetails.InternalOrderID, upsertResponse.OrderDetails.Pair, upsertResponse.OrderDetails.Price, upsertResponse.OrderDetails.Amount, upsertResponse.OrderDetails.Side, upsertResponse.OrderDetails.Type, upsertResponse.OrderDetails.Status) @@ -890,7 +1029,7 @@ func (s *store) upsert(od *order.Detail) (*OrderUpsertResponse, error) { } s.m.Lock() defer s.m.Unlock() - if s.trackFuturesPositions && od.AssetType.IsFutures() { + if od.AssetType.IsFutures() { err = s.futuresPositionController.TrackNewOrder(od) if err != nil && !errors.Is(err, order.ErrPositionClosed) { return nil, err diff --git a/engine/order_manager_test.go b/engine/order_manager_test.go index a368a6c4..d1e19417 100644 --- a/engine/order_manager_test.go +++ b/engine/order_manager_test.go @@ -8,7 +8,9 @@ import ( "testing" "time" + "github.com/gofrs/uuid" "github.com/shopspring/decimal" + "github.com/thrasher-corp/gocryptotrader/common" "github.com/thrasher-corp/gocryptotrader/common/convert" "github.com/thrasher-corp/gocryptotrader/config" "github.com/thrasher-corp/gocryptotrader/currency" @@ -16,9 +18,10 @@ import ( "github.com/thrasher-corp/gocryptotrader/exchanges/asset" "github.com/thrasher-corp/gocryptotrader/exchanges/order" "github.com/thrasher-corp/gocryptotrader/exchanges/protocol" + "github.com/thrasher-corp/gocryptotrader/exchanges/ticker" ) -// omfExchange aka ordermanager fake exchange overrides exchange functions +// omfExchange aka order manager fake exchange overrides exchange functions // we're not testing an actual exchange's implemented functions type omfExchange struct { exchange.IBotExchange @@ -30,6 +33,31 @@ func (f omfExchange) CancelOrder(ctx context.Context, o *order.Cancel) error { return nil } +func (f omfExchange) FetchTicker(ctx context.Context, p currency.Pair, a asset.Item) (*ticker.Price, error) { + return &ticker.Price{ + Last: 1337, + High: 1337, + Low: 1337, + Bid: 1337, + Ask: 1337, + Volume: 1337, + QuoteVolume: 1337, + PriceATH: 1337, + Open: 1337, + Close: 1337, + Pair: p, + ExchangeName: f.GetName(), + AssetType: a, + LastUpdated: time.Now(), + FlashReturnRate: 1337, + BidPeriod: 1337, + BidSize: 1337, + AskPeriod: 1337, + AskSize: 1337, + FlashReturnRateAmount: 1337, + }, nil +} + // GetOrderInfo overrides testExchange's get order function // to do the bare minimum required with no API calls or credentials required func (f omfExchange) GetOrderInfo(ctx context.Context, orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) { @@ -92,22 +120,64 @@ func (f omfExchange) ModifyOrder(ctx context.Context, action *order.Modify) (*or return ans, nil } +func (f omfExchange) GetFuturesPositions(ctx context.Context, req *order.PositionsRequest) ([]order.PositionDetails, error) { + id, err := uuid.NewV4() + if err != nil { + return nil, err + } + resp := make([]order.PositionDetails, len(req.Pairs)) + tt := time.Now() + for i := range req.Pairs { + resp[i] = order.PositionDetails{ + Exchange: f.GetName(), + Asset: req.Asset, + Pair: req.Pairs[i], + Orders: []order.Detail{ + { + Exchange: f.GetName(), + Price: 1337, + Amount: 1337, + InternalOrderID: id, + OrderID: "1337", + ClientOrderID: "1337", + Type: order.Market, + Side: order.Short, + Status: order.Open, + AssetType: req.Asset, + Date: tt, + CloseTime: tt, + LastUpdated: tt, + Pair: req.Pairs[i], + }, + }, + } + } + return resp, nil +} + func TestSetupOrderManager(t *testing.T) { - _, err := SetupOrderManager(nil, nil, nil, false, false) + _, err := SetupOrderManager(nil, nil, nil, false, false, 0) if !errors.Is(err, errNilExchangeManager) { t.Errorf("error '%v', expected '%v'", err, errNilExchangeManager) } - - _, err = SetupOrderManager(SetupExchangeManager(), nil, nil, false, false) + _, err = SetupOrderManager(SetupExchangeManager(), nil, nil, false, false, 0) if !errors.Is(err, errNilCommunicationsManager) { t.Errorf("error '%v', expected '%v'", err, errNilCommunicationsManager) } - _, err = SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, nil, false, false) + _, err = SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, nil, false, false, 0) if !errors.Is(err, errNilWaitGroup) { t.Errorf("error '%v', expected '%v'", err, errNilWaitGroup) } var wg sync.WaitGroup - _, err = SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, &wg, false, false) + _, err = SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, &wg, false, false, 0) + if !errors.Is(err, nil) { + t.Errorf("error '%v', expected '%v'", err, nil) + } + _, err = SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, &wg, false, true, 0) + if !errors.Is(err, nil) { + t.Errorf("error '%v', expected '%v'", err, nil) + } + _, err = SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, &wg, false, true, 1337) if !errors.Is(err, nil) { t.Errorf("error '%v', expected '%v'", err, nil) } @@ -120,7 +190,7 @@ func TestOrderManagerStart(t *testing.T) { t.Errorf("error '%v', expected '%v'", err, ErrNilSubsystem) } var wg sync.WaitGroup - m, err = SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, &wg, false, false) + m, err = SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, &wg, false, false, 0) if !errors.Is(err, nil) { t.Errorf("error '%v', expected '%v'", err, nil) } @@ -141,7 +211,7 @@ func TestOrderManagerIsRunning(t *testing.T) { } var wg sync.WaitGroup - m, err := SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, &wg, false, false) + m, err := SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, &wg, false, false, 0) if !errors.Is(err, nil) { t.Errorf("error '%v', expected '%v'", err, nil) } @@ -166,7 +236,7 @@ func TestOrderManagerStop(t *testing.T) { } var wg sync.WaitGroup - m, err = SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, &wg, false, false) + m, err = SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, &wg, false, false, 0) if !errors.Is(err, nil) { t.Errorf("error '%v', expected '%v'", err, nil) } @@ -204,12 +274,11 @@ func OrdersSetup(t *testing.T) *OrderManager { if err != nil { t.Fatal(err) } - fakeExchange := omfExchange{ IBotExchange: exch, } em.Add(fakeExchange) - m, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false) + m, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false, 0) if !errors.Is(err, nil) { t.Errorf("error '%v', expected '%v'", err, nil) } @@ -674,7 +743,7 @@ func TestProcessOrders(t *testing.T) { IBotExchange: exch, } em.Add(fakeExchange) - m, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false) + m, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false, 0) if !errors.Is(err, nil) { t.Errorf("error '%v', expected '%v'", err, nil) } @@ -712,6 +781,11 @@ func TestProcessOrders(t *testing.T) { Enabled: pairs, Available: pairs, }, + asset.Futures: { + AssetEnabled: convert.BoolPtr(true), + Enabled: pairs, + Available: pairs, + }, }, } exch.GetBase().Config = &config.Exchange{ @@ -731,6 +805,11 @@ func TestProcessOrders(t *testing.T) { Enabled: pairs, Available: pairs, }, + asset.Futures: { + AssetEnabled: convert.BoolPtr(true), + Enabled: pairs, + Available: pairs, + }, }, }, } @@ -773,6 +852,21 @@ func TestProcessOrders(t *testing.T) { } } + m.orderStore.futuresPositionController = order.SetupPositionController() + if err = m.orderStore.add(&order.Detail{ + Exchange: testExchange, + Pair: pairs[0], + AssetType: asset.Futures, + Amount: 2.0, + Side: order.Short, + Status: order.Open, + LastUpdated: time.Now().Add(-time.Hour), + OrderID: "4", + Date: time.Now(), + }); err != nil { + t.Error(err) + } + m.processOrders() // Order1 is not returned by exch.GetActiveOrders() @@ -1050,10 +1144,6 @@ func TestGetFuturesPositionsForExchange(t *testing.T) { t.Errorf("received '%v', expected '%v'", err, ErrSubSystemNotStarted) } o.started = 1 - _, err = o.GetFuturesPositionsForExchange("test", asset.Spot, cp) - if !errors.Is(err, errFuturesTrackerNotSetup) { - t.Errorf("received '%v', expected '%v'", err, errFuturesTrackerNotSetup) - } o.orderStore.futuresPositionController = order.SetupPositionController() _, err = o.GetFuturesPositionsForExchange("test", asset.Spot, cp) if !errors.Is(err, order.ErrNotFuturesAsset) { @@ -1061,8 +1151,8 @@ func TestGetFuturesPositionsForExchange(t *testing.T) { } _, err = o.GetFuturesPositionsForExchange("test", asset.Futures, cp) - if !errors.Is(err, order.ErrPositionsNotLoadedForExchange) { - t.Errorf("received '%v', expected '%v'", err, order.ErrPositionsNotLoadedForExchange) + if !errors.Is(err, order.ErrPositionNotFound) { + t.Errorf("received '%v', expected '%v'", err, order.ErrPositionNotFound) } err = o.orderStore.futuresPositionController.TrackNewOrder(&order.Detail{ @@ -1101,10 +1191,6 @@ func TestClearFuturesPositionsForExchange(t *testing.T) { t.Errorf("received '%v', expected '%v'", err, ErrSubSystemNotStarted) } o.started = 1 - err = o.ClearFuturesTracking("test", asset.Spot, cp) - if !errors.Is(err, errFuturesTrackerNotSetup) { - t.Errorf("received '%v', expected '%v'", err, errFuturesTrackerNotSetup) - } o.orderStore.futuresPositionController = order.SetupPositionController() err = o.ClearFuturesTracking("test", asset.Spot, cp) if !errors.Is(err, order.ErrNotFuturesAsset) { @@ -1112,8 +1198,8 @@ func TestClearFuturesPositionsForExchange(t *testing.T) { } err = o.ClearFuturesTracking("test", asset.Futures, cp) - if !errors.Is(err, order.ErrPositionsNotLoadedForExchange) { - t.Errorf("received '%v', expected '%v'", err, order.ErrPositionsNotLoadedForExchange) + if !errors.Is(err, order.ErrPositionNotFound) { + t.Errorf("received '%v', expected '%v'", err, order.ErrPositionNotFound) } err = o.orderStore.futuresPositionController.TrackNewOrder(&order.Detail{ @@ -1156,10 +1242,6 @@ func TestUpdateOpenPositionUnrealisedPNL(t *testing.T) { t.Errorf("received '%v', expected '%v'", err, ErrSubSystemNotStarted) } o.started = 1 - _, err = o.UpdateOpenPositionUnrealisedPNL("test", asset.Spot, cp, 1, time.Now()) - if !errors.Is(err, errFuturesTrackerNotSetup) { - t.Errorf("received '%v', expected '%v'", err, errFuturesTrackerNotSetup) - } o.orderStore.futuresPositionController = order.SetupPositionController() _, err = o.UpdateOpenPositionUnrealisedPNL("test", asset.Spot, cp, 1, time.Now()) if !errors.Is(err, order.ErrNotFuturesAsset) { @@ -1167,8 +1249,8 @@ func TestUpdateOpenPositionUnrealisedPNL(t *testing.T) { } _, err = o.UpdateOpenPositionUnrealisedPNL("test", asset.Futures, cp, 1, time.Now()) - if !errors.Is(err, order.ErrPositionsNotLoadedForExchange) { - t.Errorf("received '%v', expected '%v'", err, order.ErrPositionsNotLoadedForExchange) + if !errors.Is(err, order.ErrPositionNotFound) { + t.Errorf("received '%v', expected '%v'", err, order.ErrPositionNotFound) } err = o.orderStore.futuresPositionController.TrackNewOrder(&order.Detail{ @@ -1350,3 +1432,214 @@ func TestOrderManagerAdd(t *testing.T) { t.Errorf("received '%v', expected '%v'", err, ErrNilSubsystem) } } + +func TestGetAllOpenFuturesPositions(t *testing.T) { + t.Parallel() + wg := &sync.WaitGroup{} + o, err := SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, wg, false, false, time.Hour) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + o.started = 0 + _, err = o.GetAllOpenFuturesPositions() + if !errors.Is(err, ErrSubSystemNotStarted) { + t.Errorf("received '%v', expected '%v'", err, ErrSubSystemNotStarted) + } + + o.started = 1 + o.activelyTrackFuturesPositions = true + o.orderStore.futuresPositionController = order.SetupPositionController() + _, err = o.GetAllOpenFuturesPositions() + if !errors.Is(err, order.ErrNoPositionsFound) { + t.Errorf("received '%v', expected '%v'", err, order.ErrNoPositionsFound) + } + + o = nil + _, err = o.GetAllOpenFuturesPositions() + if !errors.Is(err, ErrNilSubsystem) { + t.Errorf("received '%v', expected '%v'", err, ErrNilSubsystem) + } +} + +func TestGetOpenFuturesPosition(t *testing.T) { + t.Parallel() + wg := &sync.WaitGroup{} + o, err := SetupOrderManager(SetupExchangeManager(), &CommunicationManager{}, wg, false, false, time.Hour) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + o.started = 0 + cp := currency.NewPair(currency.BTC, currency.PERP) + _, err = o.GetOpenFuturesPosition(testExchange, asset.Spot, cp) + if !errors.Is(err, ErrSubSystemNotStarted) { + t.Errorf("received '%v', expected '%v'", err, ErrSubSystemNotStarted) + } + + o.started = 1 + _, err = o.GetOpenFuturesPosition(testExchange, asset.Spot, cp) + if !errors.Is(err, order.ErrNotFuturesAsset) { + t.Errorf("received '%v', expected '%v'", err, order.ErrNotFuturesAsset) + } + + em := SetupExchangeManager() + exch, err := em.NewExchangeByName("ftx") + if err != nil { + t.Fatal(err) + } + exch.SetDefaults() + b := exch.GetBase() + b.Name = fakeExchangeName + b.Enabled = true + b.CurrencyPairs.Pairs = make(map[asset.Item]*currency.PairStore) + b.CurrencyPairs.Pairs[asset.Futures] = ¤cy.PairStore{ + AssetEnabled: convert.BoolPtr(true), + RequestFormat: ¤cy.PairFormat{Delimiter: "-"}, + ConfigFormat: ¤cy.PairFormat{Delimiter: "-"}, + Available: currency.Pairs{cp}, + Enabled: currency.Pairs{cp}, + } + b.CurrencyPairs.Pairs[asset.Spot] = ¤cy.PairStore{ + AssetEnabled: convert.BoolPtr(true), + ConfigFormat: ¤cy.PairFormat{Delimiter: "/"}, + RequestFormat: ¤cy.PairFormat{Delimiter: "/"}, + Available: currency.Pairs{cp}, + Enabled: currency.Pairs{cp}, + } + fakeExchange := fExchange{ + IBotExchange: exch, + } + em.Add(fakeExchange) + o, err = SetupOrderManager(em, &CommunicationManager{}, wg, false, true, time.Hour) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + o.started = 1 + + _, err = o.GetOpenFuturesPosition(testExchange, asset.Spot, cp) + if !errors.Is(err, order.ErrNotFuturesAsset) { + t.Errorf("received '%v', expected '%v'", err, order.ErrNotFuturesAsset) + } + + _, err = o.GetOpenFuturesPosition(testExchange, asset.Futures, cp) + if !errors.Is(err, order.ErrPositionNotFound) { + t.Errorf("received '%v', expected '%v'", err, order.ErrPositionNotFound) + } + + err = o.orderStore.futuresPositionController.TrackNewOrder(&order.Detail{ + AssetType: asset.Futures, + OrderID: "123", + Pair: cp, + Side: order.Buy, + Type: order.Market, + Date: time.Now(), + Amount: 1337, + Exchange: testExchange, + }) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + _, err = o.GetOpenFuturesPosition(testExchange, asset.Futures, cp) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + + o = nil + _, err = o.GetOpenFuturesPosition(testExchange, asset.Spot, cp) + if !errors.Is(err, ErrNilSubsystem) { + t.Errorf("received '%v', expected '%v'", err, ErrNilSubsystem) + } +} + +func TestProcessFuturesPositions(t *testing.T) { + t.Parallel() + o := &OrderManager{} + err := o.processFuturesPositions(nil, nil) + if !errors.Is(err, errFuturesTrackingDisabled) { + t.Errorf("received '%v', expected '%v'", err, errFuturesTrackingDisabled) + } + em := SetupExchangeManager() + exch, err := em.NewExchangeByName("ftx") + if err != nil { + t.Fatal(err) + } + exch.SetDefaults() + b := exch.GetBase() + b.Name = fakeExchangeName + b.Enabled = true + + cp, err := currency.NewPairFromString("btc-perp") + if err != nil { + t.Fatal(err) + } + cp2, err := currency.NewPairFromString("btc-usd") + if err != nil { + t.Fatal(err) + } + + b.CurrencyPairs.Pairs = make(map[asset.Item]*currency.PairStore) + b.CurrencyPairs.Pairs[asset.Futures] = ¤cy.PairStore{ + AssetEnabled: convert.BoolPtr(true), + RequestFormat: ¤cy.PairFormat{Delimiter: "-"}, + ConfigFormat: ¤cy.PairFormat{Delimiter: "-"}, + Available: currency.Pairs{cp, cp2}, + Enabled: currency.Pairs{cp, cp2}, + } + b.CurrencyPairs.Pairs[asset.Spot] = ¤cy.PairStore{ + AssetEnabled: convert.BoolPtr(true), + ConfigFormat: ¤cy.PairFormat{Delimiter: "/"}, + RequestFormat: ¤cy.PairFormat{Delimiter: "/"}, + Available: currency.Pairs{cp, cp2}, + Enabled: currency.Pairs{cp, cp2}, + } + fakeExchange := fExchange{ + IBotExchange: exch, + } + em.Add(fakeExchange) + var wg sync.WaitGroup + o, err = SetupOrderManager(em, &CommunicationManager{}, &wg, false, true, time.Hour) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + o.started = 1 + + err = o.processFuturesPositions(fakeExchange, nil) + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received '%v', expected '%v'", err, common.ErrNilPointer) + } + + position := &order.PositionDetails{ + Exchange: b.Name, + Asset: asset.Spot, + Pair: cp, + Orders: nil, + } + err = o.processFuturesPositions(fakeExchange, position) + if !errors.Is(err, errNilOrder) { + t.Errorf("received '%v', expected '%v'", err, errNilOrder) + } + + od := &order.Detail{ + AssetType: asset.Spot, + OrderID: "123", + Pair: cp, + Side: order.Buy, + Type: order.Market, + Date: time.Now().Add(-time.Hour), + Amount: 1337, + Exchange: b.Name, + } + position.Orders = []order.Detail{ + *od, + } + err = o.processFuturesPositions(fakeExchange, position) + if !errors.Is(err, order.ErrNotFuturesAsset) { + t.Errorf("received '%v', expected '%v'", err, order.ErrNotFuturesAsset) + } + + position.Orders[0].AssetType = asset.Futures + position.Asset = asset.Futures + err = o.processFuturesPositions(fakeExchange, position) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } +} diff --git a/engine/order_manager_types.go b/engine/order_manager_types.go index 63489f0a..dd2029d5 100644 --- a/engine/order_manager_types.go +++ b/engine/order_manager_types.go @@ -23,9 +23,9 @@ var ( errNilCommunicationsManager = errors.New("cannot start with nil communications manager") errNilOrder = errors.New("nil order received") - errFuturesTrackerNotSetup = errors.New("futures position tracker not setup") - - orderManagerDelay = time.Second * 10 + errFuturesTrackingDisabled = errors.New("tracking futures positions disabled. enable it via config under orderManager activelyTrackFuturesPositions") + orderManagerDelay = time.Second * 10 + defaultOrderSeekTime = -time.Hour * 24 * 365 ) type orderManagerConfig struct { @@ -38,6 +38,18 @@ type orderManagerConfig struct { OrderSubmissionRetries int64 } +// OrderManager processes and stores orders across enabled exchanges +type OrderManager struct { + started int32 + processingOrders int32 + shutdown chan struct{} + orderStore store + cfg orderManagerConfig + verbose bool + activelyTrackFuturesPositions bool + futuresPositionSeekDuration time.Duration +} + // store holds all orders by exchange type store struct { m sync.RWMutex @@ -45,18 +57,7 @@ type store struct { commsManager iCommsManager exchangeManager iExchangeManager wg *sync.WaitGroup - futuresPositionController *order.PositionController - trackFuturesPositions bool -} - -// OrderManager processes and stores orders across enabled exchanges -type OrderManager struct { - started int32 - processingOrders int32 - shutdown chan struct{} - orderStore store - cfg orderManagerConfig - verbose bool + futuresPositionController order.PositionController } // OrderSubmitResponse contains the order response along with an internal order ID diff --git a/engine/rpcserver.go b/engine/rpcserver.go index 3d4b555b..01bf7cb9 100644 --- a/engine/rpcserver.go +++ b/engine/rpcserver.go @@ -70,6 +70,7 @@ var ( errCurrencyNotSpecified = errors.New("a currency must be specified") errCurrencyPairInvalid = errors.New("currency provided is not found in the available pairs list") errNoTrades = errors.New("no trades returned from supplied params") + errUnexpectedResponseSize = errors.New("unexpected slice size") errNilRequestData = errors.New("nil request data received, cannot continue") errNoAccountInformation = errors.New("account information does not exist") errShutdownNotAllowed = errors.New("shutting down this bot instance is not allowed via gRPC, please enable by command line flag --grpcshutdown or config.json field grpcAllowBotShutdown") @@ -998,10 +999,10 @@ func (s *RPCServer) GetOrders(ctx context.Context, r *gctrpc.GetOrdersRequest) ( Trades: trades, } if !resp[x].Date.IsZero() { - o.CreationTime = s.unixTimestamp(resp[x].Date) + o.CreationTime = resp[x].Date.Format(common.SimpleTimeFormatWithTimezone) } if !resp[x].LastUpdated.IsZero() { - o.UpdateTime = s.unixTimestamp(resp[x].LastUpdated) + o.UpdateTime = resp[x].LastUpdated.Format(common.SimpleTimeFormatWithTimezone) } orders[x] = o } @@ -1087,10 +1088,10 @@ func (s *RPCServer) GetManagedOrders(_ context.Context, r *gctrpc.GetOrdersReque Trades: trades, } if !resp[x].Date.IsZero() { - o.CreationTime = s.unixTimestamp(resp[x].Date) + o.CreationTime = resp[x].Date.Format(common.SimpleTimeFormatWithTimezone) } if !resp[x].LastUpdated.IsZero() { - o.UpdateTime = s.unixTimestamp(resp[x].LastUpdated) + o.UpdateTime = resp[x].LastUpdated.Format(common.SimpleTimeFormatWithTimezone) } orders[x] = o } @@ -1152,12 +1153,12 @@ func (s *RPCServer) GetOrder(ctx context.Context, r *gctrpc.GetOrderRequest) (*g } } - var creationTime, updateTime int64 + var creationTime, updateTime string if !result.Date.IsZero() { - creationTime = s.unixTimestamp(result.Date) + creationTime = result.Date.Format(common.SimpleTimeFormatWithTimezone) } if !result.LastUpdated.IsZero() { - updateTime = s.unixTimestamp(result.LastUpdated) + updateTime = result.LastUpdated.Format(common.SimpleTimeFormatWithTimezone) } return &gctrpc.OrderDetails{ @@ -4179,8 +4180,171 @@ func (s *RPCServer) CurrencyStateTradingPair(_ context.Context, r *gctrpc.Curren ai) } +func (s *RPCServer) buildFuturePosition(position *order.Position, getFundingPayments, includeFundingRates, includeOrders, includePredictedRate bool) *gctrpc.FuturePosition { + response := &gctrpc.FuturePosition{ + Exchange: position.Exchange, + Asset: position.Asset.String(), + Pair: &gctrpc.CurrencyPair{ + Delimiter: position.Pair.Delimiter, + Base: position.Pair.Base.String(), + Quote: position.Pair.Quote.String(), + }, + Status: position.Status.String(), + OpeningDate: position.OpeningDate.Format(common.SimpleTimeFormatWithTimezone), + OpeningDirection: position.OpeningDirection.String(), + OpeningPrice: position.OpeningPrice.String(), + OpeningSize: position.OpeningSize.String(), + CurrentDirection: position.LatestDirection.String(), + CurrentPrice: position.LatestPrice.String(), + CurrentSize: position.LatestSize.String(), + UnrealisedPnl: position.UnrealisedPNL.String(), + RealisedPnl: position.RealisedPNL.String(), + OrderCount: int64(len(position.Orders)), + } + if getFundingPayments { + var sum decimal.Decimal + fundingData := &gctrpc.FundingData{} + for i := range position.FundingRates.FundingRates { + if includeFundingRates { + fundingData.Rates = append(fundingData.Rates, &gctrpc.FundingRate{ + Date: position.FundingRates.FundingRates[i].Time.Format(common.SimpleTimeFormatWithTimezone), + Rate: position.FundingRates.FundingRates[i].Rate.String(), + Payment: position.FundingRates.FundingRates[i].Payment.String(), + }) + } + sum = sum.Add(position.FundingRates.FundingRates[i].Payment) + } + fundingData.PaymentSum = sum.String() + response.FundingData = fundingData + if includePredictedRate && !position.FundingRates.PredictedUpcomingRate.Time.IsZero() { + fundingData.UpcomingRate = &gctrpc.FundingRate{ + Date: position.FundingRates.PredictedUpcomingRate.Time.Format(common.SimpleTimeFormatWithTimezone), + Rate: position.FundingRates.PredictedUpcomingRate.Rate.String(), + } + } + } + + if includeOrders { + for i := range position.Orders { + od := &gctrpc.OrderDetails{ + Exchange: position.Orders[i].Exchange, + Id: position.Orders[i].OrderID, + ClientOrderId: position.Orders[i].ClientOrderID, + BaseCurrency: position.Orders[i].Pair.Base.String(), + QuoteCurrency: position.Orders[i].Pair.Quote.String(), + AssetType: position.Orders[i].AssetType.String(), + OrderSide: position.Orders[i].Side.String(), + OrderType: position.Orders[i].Type.String(), + CreationTime: position.Orders[i].Date.Format(common.SimpleTimeFormatWithTimezone), + Status: position.Orders[i].Status.String(), + Price: position.Orders[i].Price, + Amount: position.Orders[i].Cost, + OpenVolume: position.Orders[i].RemainingAmount, + Fee: position.Orders[i].Fee, + Cost: position.Orders[i].Cost, + } + if !position.Orders[i].LastUpdated.IsZero() { + od.UpdateTime = position.Orders[i].LastUpdated.Format(common.SimpleTimeFormatWithTimezone) + } + for j := range position.Orders[i].Trades { + od.Trades = append(od.Trades, &gctrpc.TradeHistory{ + CreationTime: position.Orders[i].Trades[j].Timestamp.Unix(), + Id: position.Orders[i].Trades[j].TID, + Price: position.Orders[i].Trades[j].Price, + Amount: position.Orders[i].Trades[j].Amount, + Exchange: position.Orders[i].Trades[j].Exchange, + AssetType: position.Orders[i].AssetType.String(), + OrderSide: position.Orders[i].Trades[j].Side.String(), + Fee: position.Orders[i].Trades[j].Fee, + Total: position.Orders[i].Trades[j].Total, + }) + } + response.Orders = append(response.Orders, od) + } + } + return response +} + +// GetManagedPosition returns an open positions from the order manager, no calling any API endpoints to return this information +func (s *RPCServer) GetManagedPosition(_ context.Context, r *gctrpc.GetManagedPositionRequest) (*gctrpc.GetManagedPositionsResponse, error) { + if r == nil { + return nil, fmt.Errorf("%w GetManagedPositionRequest", common.ErrNilPointer) + } + if err := order.CheckFundingRatePrerequisites(r.GetFundingPayments, r.IncludePredictedRate, r.GetFundingPayments); err != nil { + return nil, err + } + if r.Pair == nil { + return nil, fmt.Errorf("%w request pair", common.ErrNilPointer) + } + var ( + exch exchange.IBotExchange + ai asset.Item + cp currency.Pair + err error + ) + exch, err = s.GetExchangeByName(r.Exchange) + if err != nil { + return nil, err + } + if !exch.IsEnabled() { + return nil, fmt.Errorf("%w '%v'", errExchangeDisabled, exch.GetName()) + } + ai, err = asset.New(r.Asset) + if err != nil { + return nil, err + } + if !ai.IsFutures() { + return nil, fmt.Errorf("%w '%v'", order.ErrNotFuturesAsset, ai) + } + cp, err = currency.NewPairFromStrings(r.Pair.Base, r.Pair.Quote) + if err != nil { + return nil, err + } + err = checkParams(r.Exchange, exch, ai, cp) + if err != nil { + return nil, err + } + position, err := s.OrderManager.GetOpenFuturesPosition(r.Exchange, ai, cp) + if err != nil { + return nil, err + } + + return &gctrpc.GetManagedPositionsResponse{Positions: []*gctrpc.FuturePosition{ + s.buildFuturePosition(position, r.GetFundingPayments, r.IncludeFullFundingRates, r.IncludeFullOrderData, r.IncludePredictedRate), + }}, nil +} + +// GetAllManagedPositions returns all open positions from the order manager, no calling any API endpoints to return this information +func (s *RPCServer) GetAllManagedPositions(_ context.Context, r *gctrpc.GetAllManagedPositionsRequest) (*gctrpc.GetManagedPositionsResponse, error) { + if r == nil { + return nil, fmt.Errorf("%w GetAllManagedPositions", common.ErrNilPointer) + } + if err := order.CheckFundingRatePrerequisites(r.GetFundingPayments, r.IncludePredictedRate, r.GetFundingPayments); err != nil { + return nil, err + } + positions, err := s.OrderManager.GetAllOpenFuturesPositions() + if err != nil { + return nil, err + } + sort.Slice(positions, func(i, j int) bool { + return positions[i].OpeningDate.Before(positions[j].OpeningDate) + }) + response := make([]*gctrpc.FuturePosition, len(positions)) + for i := range positions { + response[i] = s.buildFuturePosition(&positions[i], r.GetFundingPayments, r.IncludeFullFundingRates, r.IncludeFullOrderData, r.IncludePredictedRate) + } + + return &gctrpc.GetManagedPositionsResponse{Positions: response}, nil +} + // GetFuturesPositions returns pnl positions for an exchange asset pair func (s *RPCServer) GetFuturesPositions(ctx context.Context, r *gctrpc.GetFuturesPositionsRequest) (*gctrpc.GetFuturesPositionsResponse, error) { + if r == nil { + return nil, fmt.Errorf("%w GetFuturesPositions", common.ErrNilPointer) + } + if err := order.CheckFundingRatePrerequisites(r.GetFundingPayments, r.IncludePredictedRate, r.GetFundingPayments); err != nil { + return nil, err + } exch, err := s.GetExchangeByName(r.Exchange) if err != nil { return nil, err @@ -4225,25 +4389,29 @@ func (s *RPCServer) GetFuturesPositions(ctx context.Context, r *gctrpc.GetFuture if err != nil { return nil, err } - var subErr string + var subAccount string if creds.SubAccount != "" { - subErr = "for subaccount: " + creds.SubAccount + subAccount = "for subaccount: " + creds.SubAccount } - orders, err := exch.GetFuturesPositions(ctx, ai, cp, start, end) - if err != nil { - return nil, fmt.Errorf("%w %v", err, subErr) - } - sort.Slice(orders, func(i, j int) bool { - return orders[i].Date.Before(orders[j].Date) + positionDetails, err := exch.GetFuturesPositions(ctx, &order.PositionsRequest{ + Asset: ai, + Pairs: currency.Pairs{cp}, + StartDate: start, }) + if err != nil { + return nil, fmt.Errorf("%w %v", err, subAccount) + } + if len(positionDetails) != 1 { + return nil, errUnexpectedResponseSize + } if r.Overwrite { err = s.OrderManager.ClearFuturesTracking(r.Exchange, ai, cp) if err != nil { - return nil, fmt.Errorf("%w %v", err, subErr) + return nil, fmt.Errorf("cannot overwrite %w %v", err, subAccount) } } - for i := range orders { - _, err = s.OrderManager.UpsertOrder(&orders[i]) + for i := range positionDetails[0].Orders { + err = s.OrderManager.orderStore.futuresPositionController.TrackNewOrder(&positionDetails[0].Orders[i]) if err != nil { if !errors.Is(err, order.ErrPositionClosed) { return nil, err @@ -4252,13 +4420,17 @@ func (s *RPCServer) GetFuturesPositions(ctx context.Context, r *gctrpc.GetFuture } pos, err := s.OrderManager.GetFuturesPositionsForExchange(r.Exchange, ai, cp) if err != nil { - return nil, fmt.Errorf("%w %v", err, subErr) + return nil, fmt.Errorf("cannot GetFuturesPositionsForExchange %w %v", err, subAccount) } + response := &gctrpc.GetFuturesPositionsResponse{ SubAccount: creds.SubAccount, } var totalRealisedPNL, totalUnrealisedPNL decimal.Decimal for i := range pos { + if r.Status != "" && pos[i].Status.String() != strings.ToUpper(r.Status) { + continue + } if r.PositionLimit > 0 && len(response.Positions) >= int(r.PositionLimit) { break } @@ -4266,18 +4438,34 @@ func (s *RPCServer) GetFuturesPositions(ctx context.Context, r *gctrpc.GetFuture var tick *ticker.Price tick, err = exch.FetchTicker(ctx, pos[i].Pair, pos[i].Asset) if err != nil { - return nil, fmt.Errorf("%w when fetching ticker data for %v %v %v", err, pos[i].Exchange, pos[i].Asset, pos[i].Pair) + return nil, fmt.Errorf("%w when fetching ticker data for %v %v %v %v", err, pos[i].Exchange, pos[i].Asset, pos[i].Pair, subAccount) } pos[i].UnrealisedPNL, err = s.OrderManager.UpdateOpenPositionUnrealisedPNL(pos[i].Exchange, pos[i].Asset, pos[i].Pair, tick.Last, tick.LastUpdated) if err != nil { - return nil, fmt.Errorf("%w when updating unrealised PNL for %v %v %v", err, pos[i].Exchange, pos[i].Asset, pos[i].Pair) + return nil, fmt.Errorf("%w when updating unrealised PNL for %v %v %v %v", err, pos[i].Exchange, pos[i].Asset, pos[i].Pair, subAccount) } + pos[i].LatestPrice = decimal.NewFromFloat(tick.Last) } response.TotalOrders += int64(len(pos[i].Orders)) details := &gctrpc.FuturePosition{ - Status: pos[i].Status.String(), - UnrealisedPnl: pos[i].UnrealisedPNL.String(), - RealisedPnl: pos[i].RealisedPNL.String(), + Exchange: pos[i].Exchange, + Asset: pos[i].Asset.String(), + Pair: &gctrpc.CurrencyPair{ + Delimiter: pos[i].Pair.Delimiter, + Base: pos[i].Pair.Base.String(), + Quote: pos[i].Pair.Quote.String(), + }, + Status: pos[i].Status.String(), + OpeningDate: pos[i].OpeningDate.Format(common.SimpleTimeFormatWithTimezone), + OpeningDirection: pos[i].OpeningDirection.String(), + OpeningPrice: pos[i].OpeningPrice.String(), + OpeningSize: pos[i].OpeningSize.String(), + CurrentDirection: pos[i].LatestDirection.String(), + CurrentPrice: pos[i].LatestPrice.String(), + CurrentSize: pos[i].LatestSize.String(), + UnrealisedPnl: pos[i].UnrealisedPNL.String(), + RealisedPnl: pos[i].RealisedPNL.String(), + OrderCount: int64(len(pos[i].Orders)), } if !pos[i].UnrealisedPNL.IsZero() { details.UnrealisedPnl = pos[i].UnrealisedPNL.String() @@ -4296,7 +4484,85 @@ func (s *RPCServer) GetFuturesPositions(ctx context.Context, r *gctrpc.GetFuture } totalRealisedPNL = totalRealisedPNL.Add(pos[i].RealisedPNL) totalUnrealisedPNL = totalUnrealisedPNL.Add(pos[i].UnrealisedPNL) - if !r.Verbose { + if r.GetPositionStats { + var stats *order.PositionSummary + stats, err = exch.GetPositionSummary(ctx, &order.PositionSummaryRequest{ + Asset: pos[i].Asset, + Pair: pos[i].Pair, + }) + if err != nil { + return nil, fmt.Errorf("cannot GetPositionSummary %w %v", err, subAccount) + } + details.PositionStats = &gctrpc.FuturesPositionStats{ + MaintenanceMarginRequirement: stats.MaintenanceMarginRequirement.String(), + InitialMarginRequirement: stats.InitialMarginRequirement.String(), + CollateralUsed: stats.CollateralUsed.String(), + MarkPrice: stats.MarkPrice.String(), + CurrentSize: stats.CurrentSize.String(), + BreakEvenPrice: stats.BreakEvenPrice.String(), + AverageOpenPrice: stats.AverageOpenPrice.String(), + RecentPnl: stats.RecentPNL.String(), + MarginFraction: stats.MarginFraction.String(), + FreeCollateral: stats.FreeCollateral.String(), + TotalCollateral: stats.TotalCollateral.String(), + } + if !stats.EstimatedLiquidationPrice.IsZero() { + details.PositionStats.EstimatedLiquidationPrice = stats.EstimatedLiquidationPrice.String() + } + } + if r.GetFundingPayments { + var endDate = time.Now() + if pos[i].Status == order.Closed { + endDate = pos[i].Orders[len(pos[i].Orders)-1].Date + } + var fundingDetails []order.FundingRates + fundingDetails, err = exch.GetFundingRates(ctx, &order.FundingRatesRequest{ + Asset: pos[i].Asset, + Pairs: currency.Pairs{pos[i].Pair}, + StartDate: pos[i].Orders[0].Date, + EndDate: endDate, + IncludePayments: r.GetFundingPayments, + IncludePredictedRate: r.IncludePredictedRate, + }) + if err != nil { + return nil, err + } + switch { + case len(fundingDetails) == 0: + case len(fundingDetails) == 1: + var funding []*gctrpc.FundingRate + if r.IncludeFullFundingRates { + for j := range fundingDetails[0].FundingRates { + funding = append(funding, &gctrpc.FundingRate{ + Date: fundingDetails[0].FundingRates[j].Time.Format(common.SimpleTimeFormatWithTimezone), + Rate: fundingDetails[0].FundingRates[j].Rate.String(), + Payment: fundingDetails[0].FundingRates[j].Payment.String(), + }) + } + } + fundingRates := &gctrpc.FundingData{ + Rates: funding, + PaymentSum: fundingDetails[0].PaymentSum.String(), + } + if r.IncludeFullFundingRates { + fundingRates.LatestRate = funding[len(fundingRates.Rates)-1] + } + if r.IncludePredictedRate && !fundingDetails[0].PredictedUpcomingRate.Time.IsZero() { + fundingRates.UpcomingRate = &gctrpc.FundingRate{ + Date: fundingDetails[0].PredictedUpcomingRate.Time.Format(common.SimpleTimeFormatWithTimezone), + Rate: fundingDetails[0].PredictedUpcomingRate.Rate.String(), + } + } + details.FundingData = fundingRates + err = s.OrderManager.orderStore.futuresPositionController.TrackFundingDetails(&fundingDetails[0]) + if err != nil { + return nil, err + } + default: + return nil, fmt.Errorf("%w expected 1 set of funding rates, got %d %v", errUnexpectedResponseSize, len(fundingDetails), subAccount) + } + } + if !r.IncludeFullOrderData { response.Positions = append(response.Positions, details) continue } @@ -4324,7 +4590,7 @@ func (s *RPCServer) GetFuturesPositions(ctx context.Context, r *gctrpc.GetFuture AssetType: pos[i].Orders[j].AssetType.String(), OrderSide: pos[i].Orders[j].Side.String(), OrderType: pos[i].Orders[j].Type.String(), - CreationTime: pos[i].Orders[j].Date.Unix(), + CreationTime: pos[i].Orders[j].Date.Format(common.SimpleTimeFormatWithTimezone), Status: pos[i].Orders[j].Status.String(), Price: pos[i].Orders[j].Price, Amount: pos[i].Orders[j].Amount, @@ -4333,7 +4599,7 @@ func (s *RPCServer) GetFuturesPositions(ctx context.Context, r *gctrpc.GetFuture Trades: trades, } if pos[i].Orders[j].LastUpdated.After(pos[i].Orders[j].Date) { - od.UpdateTime = pos[i].Orders[j].LastUpdated.Unix() + od.UpdateTime = pos[i].Orders[j].LastUpdated.Format(common.SimpleTimeFormatWithTimezone) } details.Orders = append(details.Orders, od) } @@ -4352,6 +4618,107 @@ func (s *RPCServer) GetFuturesPositions(ctx context.Context, r *gctrpc.GetFuture return response, nil } +// GetFundingRates returns the funding rates for a slice of pairs of an exchange, asset +func (s *RPCServer) GetFundingRates(ctx context.Context, r *gctrpc.GetFundingRatesRequest) (*gctrpc.GetFundingRatesResponse, error) { + if r == nil { + return nil, fmt.Errorf("%w GetFundingRateRequest", common.ErrNilPointer) + } + exch, err := s.GetExchangeByName(r.Exchange) + if err != nil { + return nil, err + } + + a, err := asset.New(r.Asset) + if err != nil { + return nil, err + } + if !a.IsFutures() { + return nil, fmt.Errorf("%s %w", a, order.ErrNotFuturesAsset) + } + start := time.Now().AddDate(-1, 0, 0) + end := time.Now() + if r.StartDate != "" { + start, err = time.Parse(common.SimpleTimeFormat, r.StartDate) + if err != nil { + return nil, err + } + } + if r.EndDate != "" { + end, err = time.Parse(common.SimpleTimeFormat, r.EndDate) + if err != nil { + return nil, err + } + } + err = common.StartEndTimeCheck(start, end) + if err != nil && !errors.Is(err, common.ErrDateUnset) { + return nil, err + } + pairs, err := currency.NewPairsFromStrings(r.Pairs) + if err != nil { + return nil, err + } + for i := range pairs { + err = checkParams(r.Exchange, exch, a, pairs[i]) + if err != nil { + return nil, err + } + } + funding, err := exch.GetFundingRates(ctx, &order.FundingRatesRequest{ + Asset: a, + Pairs: pairs, + StartDate: start, + EndDate: end, + IncludePayments: r.IncludePayments, + IncludePredictedRate: r.IncludePredicted, + }) + if err != nil { + return nil, err + } + var response gctrpc.GetFundingRatesResponse + responses := make([]*gctrpc.FundingData, len(funding)) + for i := range funding { + fundingData := &gctrpc.FundingData{ + Exchange: r.Exchange, + Asset: r.Asset, + Pair: &gctrpc.CurrencyPair{ + Delimiter: funding[i].Pair.Delimiter, + Base: funding[i].Pair.Base.String(), + Quote: funding[i].Pair.Quote.String(), + }, + StartDate: start.Format(common.SimpleTimeFormatWithTimezone), + EndDate: end.Format(common.SimpleTimeFormatWithTimezone), + LatestRate: &gctrpc.FundingRate{ + Date: funding[i].LatestRate.Time.Format(common.SimpleTimeFormatWithTimezone), + Rate: funding[i].LatestRate.Rate.String(), + }, + } + var rates []*gctrpc.FundingRate + for j := range funding[i].FundingRates { + rate := &gctrpc.FundingRate{ + Rate: funding[i].FundingRates[j].Rate.String(), + Date: funding[i].FundingRates[j].Time.Format(common.SimpleTimeFormatWithTimezone), + } + if r.IncludePayments { + rate.Payment = funding[i].FundingRates[j].Payment.String() + } + rates = append(rates, rate) + } + if r.IncludePayments { + fundingData.PaymentSum = funding[i].PaymentSum.String() + } + fundingData.Rates = rates + if r.IncludePredicted { + fundingData.UpcomingRate = &gctrpc.FundingRate{ + Date: funding[i].PredictedUpcomingRate.Time.Format(common.SimpleTimeFormatWithTimezone), + Rate: funding[i].PredictedUpcomingRate.Rate.String(), + } + } + responses[i] = fundingData + } + response.FundingPayments = responses + return &response, nil +} + // GetCollateral returns the total collateral for an exchange's asset // as exchanges can scale collateral and represent it in a singular currency, // a user can opt to include a breakdown by currency diff --git a/engine/rpcserver_test.go b/engine/rpcserver_test.go index a1fde255..1bc4c9d4 100644 --- a/engine/rpcserver_test.go +++ b/engine/rpcserver_test.go @@ -54,6 +54,90 @@ type fExchange struct { exchange.IBotExchange } +func (f fExchange) GetPositionSummary(context.Context, *order.PositionSummaryRequest) (*order.PositionSummary, error) { + leet := decimal.NewFromInt(1337) + return &order.PositionSummary{ + MaintenanceMarginRequirement: leet, + InitialMarginRequirement: leet, + EstimatedLiquidationPrice: leet, + CollateralUsed: leet, + MarkPrice: leet, + CurrentSize: leet, + BreakEvenPrice: leet, + AverageOpenPrice: leet, + RecentPNL: leet, + MarginFraction: leet, + FreeCollateral: leet, + TotalCollateral: leet, + }, nil +} + +func (f fExchange) GetFuturesPositions(ctx context.Context, req *order.PositionsRequest) ([]order.PositionDetails, error) { + id, err := uuid.NewV4() + if err != nil { + return nil, err + } + resp := make([]order.PositionDetails, len(req.Pairs)) + tt := time.Now() + for i := range req.Pairs { + resp[i] = order.PositionDetails{ + Exchange: f.GetName(), + Asset: req.Asset, + Pair: req.Pairs[i], + Orders: []order.Detail{ + { + Exchange: f.GetName(), + Price: 1337, + Amount: 1337, + InternalOrderID: id, + OrderID: "1337", + ClientOrderID: "1337", + Type: order.Market, + Side: order.Short, + Status: order.Open, + AssetType: req.Asset, + Date: tt, + CloseTime: tt, + LastUpdated: tt, + Pair: req.Pairs[i], + }, + }, + } + } + return resp, nil +} + +func (f fExchange) GetFundingRates(ctx context.Context, request *order.FundingRatesRequest) ([]order.FundingRates, error) { + leet := decimal.NewFromInt(1337) + return []order.FundingRates{ + { + Exchange: f.GetName(), + Asset: request.Asset, + Pair: request.Pairs[0], + StartDate: request.StartDate, + EndDate: request.EndDate, + LatestRate: order.FundingRate{ + Time: request.EndDate, + Rate: leet, + Payment: leet, + }, + PredictedUpcomingRate: order.FundingRate{ + Time: request.EndDate, + Rate: leet, + Payment: leet, + }, + FundingRates: []order.FundingRate{ + { + Time: request.EndDate, + Rate: leet, + Payment: leet, + }, + }, + PaymentSum: leet, + }, + }, nil +} + func (f fExchange) GetHistoricCandles(ctx context.Context, p currency.Pair, a asset.Item, timeStart, _ time.Time, interval kline.Interval) (kline.Item, error) { return kline.Item{ Exchange: fakeExchangeName, @@ -173,24 +257,6 @@ func (f fExchange) FetchAccountInfo(_ context.Context, a asset.Item) (account.Ho }, nil } -// GetFuturesPositions overrides testExchange's GetFuturesPositions function -func (f fExchange) GetFuturesPositions(_ context.Context, a asset.Item, cp currency.Pair, _, _ time.Time) ([]order.Detail, error) { - return []order.Detail{ - { - Price: 1337, - Amount: 1337, - Fee: 1.337, - Exchange: f.GetName(), - OrderID: "test", - Side: order.Long, - Status: order.Open, - AssetType: a, - Date: time.Now(), - Pair: cp, - }, - }, nil -} - // CalculateTotalCollateral overrides testExchange's CalculateTotalCollateral function func (f fExchange) CalculateTotalCollateral(context.Context, *order.TotalCollateralCalculator) (*order.TotalCollateralResponse, error) { return &order.TotalCollateralResponse{ @@ -1177,7 +1243,7 @@ func TestGetOrders(t *testing.T) { RequestFormat: ¤cy.PairFormat{Uppercase: true}} em.Add(exch) var wg sync.WaitGroup - om, err := SetupOrderManager(em, engerino.CommunicationsManager, &wg, false, false) + om, err := SetupOrderManager(em, engerino.CommunicationsManager, &wg, false, false, 0) if !errors.Is(err, nil) { t.Errorf("received '%v', expected '%v'", err, nil) } @@ -1284,7 +1350,7 @@ func TestGetOrder(t *testing.T) { RequestFormat: ¤cy.PairFormat{Uppercase: true}} em.Add(exch) var wg sync.WaitGroup - om, err := SetupOrderManager(em, engerino.CommunicationsManager, &wg, false, false) + om, err := SetupOrderManager(em, engerino.CommunicationsManager, &wg, false, false, 0) if !errors.Is(err, nil) { t.Errorf("received '%v', expected '%v'", err, nil) } @@ -1813,7 +1879,7 @@ func TestGetManagedOrders(t *testing.T) { RequestFormat: ¤cy.PairFormat{Uppercase: true}} em.Add(exch) var wg sync.WaitGroup - om, err := SetupOrderManager(em, engerino.CommunicationsManager, &wg, false, false) + om, err := SetupOrderManager(em, engerino.CommunicationsManager, &wg, false, false, 0) if !errors.Is(err, nil) { t.Errorf("received '%v', expected '%v'", err, nil) } @@ -2168,7 +2234,7 @@ func TestGetFuturesPositions(t *testing.T) { } em.Add(fakeExchange) var wg sync.WaitGroup - om, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false) + om, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false, time.Hour) if !errors.Is(err, nil) { t.Errorf("received '%v', expected '%v'", err, nil) } @@ -2192,7 +2258,6 @@ func TestGetFuturesPositions(t *testing.T) { Base: cp.Base.String(), Quote: cp.Quote.String(), }, - Verbose: true, }) if !errors.Is(err, exchange.ErrCredentialsAreEmpty) { t.Fatalf("received '%v', expected '%v'", err, exchange.ErrCredentialsAreEmpty) @@ -2206,17 +2271,21 @@ func TestGetFuturesPositions(t *testing.T) { ) _, err = s.GetFuturesPositions(ctx, &gctrpc.GetFuturesPositionsRequest{ - Exchange: fakeExchangeName, + Exchange: "test", Asset: asset.Futures.String(), Pair: &gctrpc.CurrencyPair{ Delimiter: currency.DashDelimiter, Base: cp.Base.String(), Quote: cp.Quote.String(), }, - Verbose: true, + IncludeFullOrderData: true, + IncludeFullFundingRates: true, + IncludePredictedRate: true, + GetPositionStats: true, + GetFundingPayments: true, }) - if !errors.Is(err, order.ErrPositionsNotLoadedForExchange) { - t.Fatalf("received '%v', expected '%v'", err, order.ErrPositionsNotLoadedForExchange) + if !errors.Is(err, ErrExchangeNotFound) { + t.Errorf("received '%v', expected '%v'", err, ErrExchangeNotFound) } od := &order.Detail{ @@ -2243,7 +2312,7 @@ func TestGetFuturesPositions(t *testing.T) { Base: cp.Base.String(), Quote: cp.Quote.String(), }, - Verbose: true, + IncludeFullOrderData: true, }) if !errors.Is(err, nil) { t.Fatalf("received '%v', expected '%v'", err, nil) @@ -2257,7 +2326,6 @@ func TestGetFuturesPositions(t *testing.T) { Base: cp.Base.String(), Quote: cp.Quote.String(), }, - Verbose: true, }) if !errors.Is(err, order.ErrNotFuturesAsset) { t.Errorf("received '%v', expected '%v'", err, order.ErrNotFuturesAsset) @@ -2793,3 +2861,340 @@ func TestGetMarginRatesHistory(t *testing.T) { t.Errorf("received '%v' expected '%v'", err, nil) } } + +func TestGetFundingRates(t *testing.T) { + t.Parallel() + em := SetupExchangeManager() + exch, err := em.NewExchangeByName("ftx") + if err != nil { + t.Fatal(err) + } + exch.SetDefaults() + b := exch.GetBase() + b.Name = fakeExchangeName + b.Enabled = true + + cp, err := currency.NewPairFromString("btc-perp") + if err != nil { + t.Fatal(err) + } + + b.CurrencyPairs.Pairs = make(map[asset.Item]*currency.PairStore) + b.CurrencyPairs.Pairs[asset.Futures] = ¤cy.PairStore{ + AssetEnabled: convert.BoolPtr(true), + RequestFormat: ¤cy.PairFormat{Delimiter: "-"}, + ConfigFormat: ¤cy.PairFormat{Delimiter: "-"}, + Available: currency.Pairs{cp}, + Enabled: currency.Pairs{cp}, + } + b.CurrencyPairs.Pairs[asset.Spot] = ¤cy.PairStore{ + AssetEnabled: convert.BoolPtr(true), + ConfigFormat: ¤cy.PairFormat{Delimiter: "/"}, + RequestFormat: ¤cy.PairFormat{Delimiter: "/"}, + Available: currency.Pairs{cp}, + Enabled: currency.Pairs{cp}, + } + fakeExchange := fExchange{ + IBotExchange: exch, + } + em.Add(fakeExchange) + var wg sync.WaitGroup + om, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false, time.Hour) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + om.started = 1 + s := RPCServer{ + Engine: &Engine{ + ExchangeManager: em, + currencyStateManager: &CurrencyStateManager{ + started: 1, + iExchangeManager: em, + }, + OrderManager: om, + }, + } + + _, err = s.GetFundingRates(context.Background(), nil) + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received: '%v' but expected: '%v'", err, common.ErrNilPointer) + } + request := &gctrpc.GetFundingRatesRequest{ + Exchange: "", + Asset: "", + Pairs: nil, + StartDate: "", + EndDate: "", + IncludePredicted: false, + IncludePayments: false, + } + _, err = s.GetFundingRates(context.Background(), request) + if !errors.Is(err, ErrExchangeNameIsEmpty) { + t.Errorf("received: '%v' but expected: '%v'", err, ErrExchangeNameIsEmpty) + } + request.Exchange = exch.GetName() + _, err = s.GetFundingRates(context.Background(), request) + if !errors.Is(err, asset.ErrNotSupported) { + t.Errorf("received: '%v' but expected: '%v'", err, asset.ErrNotSupported) + } + + request.Asset = asset.Spot.String() + _, err = s.GetFundingRates(context.Background(), request) + if !errors.Is(err, order.ErrNotFuturesAsset) { + t.Errorf("received: '%v' but expected: '%v'", err, order.ErrNotFuturesAsset) + } + + request.Asset = asset.Futures.String() + request.Pairs = []string{cp.String()} + request.IncludePredicted = true + request.IncludePayments = true + _, err = s.GetFundingRates(context.Background(), request) + if !errors.Is(err, nil) { + t.Errorf("received: '%v' but expected: '%v'", err, nil) + } +} + +func TestGetManagedPosition(t *testing.T) { + t.Parallel() + em := SetupExchangeManager() + exch, err := em.NewExchangeByName("ftx") + if err != nil { + t.Fatal(err) + } + exch.SetDefaults() + b := exch.GetBase() + b.Name = fakeExchangeName + b.Enabled = true + + cp, err := currency.NewPairFromString("btc-perp") + if err != nil { + t.Fatal(err) + } + cp2, err := currency.NewPairFromString("btc-usd") + if err != nil { + t.Fatal(err) + } + + b.CurrencyPairs.Pairs = make(map[asset.Item]*currency.PairStore) + b.CurrencyPairs.Pairs[asset.Futures] = ¤cy.PairStore{ + AssetEnabled: convert.BoolPtr(true), + RequestFormat: ¤cy.PairFormat{Delimiter: "-"}, + ConfigFormat: ¤cy.PairFormat{Delimiter: "-"}, + Available: currency.Pairs{cp, cp2}, + Enabled: currency.Pairs{cp, cp2}, + } + b.CurrencyPairs.Pairs[asset.Spot] = ¤cy.PairStore{ + AssetEnabled: convert.BoolPtr(true), + ConfigFormat: ¤cy.PairFormat{Delimiter: "/"}, + RequestFormat: ¤cy.PairFormat{Delimiter: "/"}, + Available: currency.Pairs{cp, cp2}, + Enabled: currency.Pairs{cp, cp2}, + } + fakeExchange := fExchange{ + IBotExchange: exch, + } + em.Add(fakeExchange) + var wg sync.WaitGroup + om, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false, time.Hour) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + om.started = 1 + s := RPCServer{ + Engine: &Engine{ + ExchangeManager: em, + currencyStateManager: &CurrencyStateManager{ + started: 1, + iExchangeManager: em, + }, + OrderManager: om, + }, + } + _, err = s.GetManagedPosition(context.Background(), nil) + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received '%v', expected '%v'", err, common.ErrNilPointer) + } + + request := &gctrpc.GetManagedPositionRequest{} + _, err = s.GetManagedPosition(context.Background(), request) + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received '%v', expected '%v'", err, common.ErrNilPointer) + } + + request.Pair = &gctrpc.CurrencyPair{ + Delimiter: "-", + Base: "BTC", + Quote: "USD", + } + _, err = s.GetManagedPosition(context.Background(), request) + if !errors.Is(err, ErrExchangeNameIsEmpty) { + t.Errorf("received '%v', expected '%v'", err, ErrExchangeNameIsEmpty) + } + + request.Exchange = fakeExchangeName + _, err = s.GetManagedPosition(context.Background(), request) + if !errors.Is(err, asset.ErrNotSupported) { + t.Errorf("received '%v', expected '%v'", err, asset.ErrNotSupported) + } + + request.Asset = asset.Spot.String() + _, err = s.GetManagedPosition(context.Background(), request) + if !errors.Is(err, order.ErrNotFuturesAsset) { + t.Errorf("received '%v', expected '%v'", err, order.ErrNotFuturesAsset) + } + + request.Asset = asset.Futures.String() + s.OrderManager, err = SetupOrderManager(em, &CommunicationManager{}, &wg, false, false, time.Hour) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + s.OrderManager.started = 1 + s.OrderManager.activelyTrackFuturesPositions = true + _, err = s.GetManagedPosition(context.Background(), request) + if !errors.Is(err, order.ErrPositionNotFound) { + t.Errorf("received '%v', expected '%v'", err, order.ErrPositionNotFound) + } + + err = s.OrderManager.orderStore.futuresPositionController.TrackNewOrder(&order.Detail{ + Leverage: 1337, + Price: 1337, + Amount: 1337, + LimitPriceUpper: 1337, + LimitPriceLower: 1337, + TriggerPrice: 1337, + AverageExecutedPrice: 1337, + QuoteAmount: 1337, + ExecutedAmount: 1337, + RemainingAmount: 1337, + Cost: 1337, + Exchange: fakeExchangeName, + OrderID: "1337", + Type: order.Market, + Side: order.Buy, + Status: order.Filled, + AssetType: asset.Futures, + Date: time.Now(), + LastUpdated: time.Now(), + Pair: cp2, + Trades: []order.TradeHistory{ + { + Timestamp: time.Now(), + Side: order.Buy, + }, + }, + }) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + _, err = s.GetManagedPosition(context.Background(), request) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } +} + +func TestGetAllManagedPositions(t *testing.T) { + t.Parallel() + em := SetupExchangeManager() + exch, err := em.NewExchangeByName("ftx") + if err != nil { + t.Fatal(err) + } + exch.SetDefaults() + b := exch.GetBase() + b.Name = fakeExchangeName + b.Enabled = true + + cp, err := currency.NewPairFromString("btc-perp") + if err != nil { + t.Fatal(err) + } + cp2, err := currency.NewPairFromString("btc-usd") + if err != nil { + t.Fatal(err) + } + + b.CurrencyPairs.Pairs = make(map[asset.Item]*currency.PairStore) + b.CurrencyPairs.Pairs[asset.Futures] = ¤cy.PairStore{ + AssetEnabled: convert.BoolPtr(true), + RequestFormat: ¤cy.PairFormat{Delimiter: "-"}, + ConfigFormat: ¤cy.PairFormat{Delimiter: "-"}, + Available: currency.Pairs{cp, cp2}, + Enabled: currency.Pairs{cp, cp2}, + } + b.CurrencyPairs.Pairs[asset.Spot] = ¤cy.PairStore{ + AssetEnabled: convert.BoolPtr(true), + ConfigFormat: ¤cy.PairFormat{Delimiter: "/"}, + RequestFormat: ¤cy.PairFormat{Delimiter: "/"}, + Available: currency.Pairs{cp, cp2}, + Enabled: currency.Pairs{cp, cp2}, + } + fakeExchange := fExchange{ + IBotExchange: exch, + } + em.Add(fakeExchange) + var wg sync.WaitGroup + om, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false, time.Hour) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + om.started = 1 + s := RPCServer{ + Engine: &Engine{ + ExchangeManager: em, + currencyStateManager: &CurrencyStateManager{ + started: 1, + iExchangeManager: em, + }, + OrderManager: om, + }, + } + _, err = s.GetAllManagedPositions(context.Background(), nil) + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received '%v', expected '%v'", err, common.ErrNilPointer) + } + + request := &gctrpc.GetAllManagedPositionsRequest{} + s.OrderManager, err = SetupOrderManager(em, &CommunicationManager{}, &wg, false, true, time.Hour) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + s.OrderManager.started = 1 + _, err = s.GetAllManagedPositions(context.Background(), request) + if !errors.Is(err, order.ErrNoPositionsFound) { + t.Errorf("received '%v', expected '%v'", err, order.ErrNoPositionsFound) + } + + err = s.OrderManager.orderStore.futuresPositionController.TrackNewOrder(&order.Detail{ + Leverage: 1337, + Price: 1337, + Amount: 1337, + LimitPriceUpper: 1337, + LimitPriceLower: 1337, + TriggerPrice: 1337, + AverageExecutedPrice: 1337, + QuoteAmount: 1337, + ExecutedAmount: 1337, + RemainingAmount: 1337, + Cost: 1337, + Exchange: fakeExchangeName, + OrderID: "1337", + Type: order.Market, + Side: order.Buy, + Status: order.Filled, + AssetType: asset.Futures, + Date: time.Now(), + LastUpdated: time.Now(), + Pair: cp2, + }) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } + request.IncludePredictedRate = true + request.GetFundingPayments = true + request.IncludeFullFundingRates = true + request.IncludeFullOrderData = true + _, err = s.GetAllManagedPositions(context.Background(), request) + if !errors.Is(err, nil) { + t.Errorf("received '%v', expected '%v'", err, nil) + } +} diff --git a/engine/websocketroutine_manager_test.go b/engine/websocketroutine_manager_test.go index edca2638..b23a6f5c 100644 --- a/engine/websocketroutine_manager_test.go +++ b/engine/websocketroutine_manager_test.go @@ -131,7 +131,7 @@ func TestWebsocketRoutineManagerHandleData(t *testing.T) { exch.SetDefaults() em.Add(exch) - om, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false) + om, err := SetupOrderManager(em, &CommunicationManager{}, &wg, false, false, 0) if !errors.Is(err, nil) { t.Errorf("error '%v', expected '%v'", err, nil) } diff --git a/exchanges/binance/binance_test.go b/exchanges/binance/binance_test.go index 99b6fe0c..aae3d509 100644 --- a/exchanges/binance/binance_test.go +++ b/exchanges/binance/binance_test.go @@ -694,11 +694,11 @@ func TestGetCrossMarginInterestHistory(t *testing.T) { func TestGetFundingRates(t *testing.T) { t.Parallel() - _, err := b.GetFundingRates(context.Background(), currency.NewPair(currency.BTC, currency.USDT), "", time.Time{}, time.Time{}) + _, err := b.FundingRates(context.Background(), currency.NewPair(currency.BTC, currency.USDT), "", time.Time{}, time.Time{}) if err != nil { t.Error(err) } - _, err = b.GetFundingRates(context.Background(), currency.NewPair(currency.BTC, currency.USDT), "2", time.Unix(1577836800, 0), time.Unix(1580515200, 0)) + _, err = b.FundingRates(context.Background(), currency.NewPair(currency.BTC, currency.USDT), "2", time.Unix(1577836800, 0), time.Unix(1580515200, 0)) if err != nil { t.Error(err) } diff --git a/exchanges/binance/binance_ufutures.go b/exchanges/binance/binance_ufutures.go index 415f459b..5feef2fe 100644 --- a/exchanges/binance/binance_ufutures.go +++ b/exchanges/binance/binance_ufutures.go @@ -1127,8 +1127,8 @@ func (b *Binance) GetPerpMarkets(ctx context.Context) (PerpsExchangeInfo, error) return resp, b.SendHTTPRequest(ctx, exchange.RestUSDTMargined, perpExchangeInfo, uFuturesDefaultRate, &resp) } -// GetFundingRates gets funding rate history for perpetual contracts -func (b *Binance) GetFundingRates(ctx context.Context, symbol currency.Pair, limit string, startTime, endTime time.Time) ([]FundingRateData, error) { +// FundingRates gets funding rate history for perpetual contracts +func (b *Binance) FundingRates(ctx context.Context, symbol currency.Pair, limit string, startTime, endTime time.Time) ([]FundingRateData, error) { var resp []FundingRateData params := url.Values{} symbolValue, err := b.FormatSymbol(symbol, asset.USDTMarginedFutures) diff --git a/exchanges/coinut/coinut.go b/exchanges/coinut/coinut.go index fff6fd8b..fef7f5ba 100644 --- a/exchanges/coinut/coinut.go +++ b/exchanges/coinut/coinut.go @@ -237,8 +237,8 @@ func (c *COINUT) GetPositionHistory(ctx context.Context, secType string, start, return result, c.SendHTTPRequest(ctx, exchange.RestSpot, coinutPositionHistory, params, true, &result) } -// GetOpenPositions returns all your current opened positions -func (c *COINUT) GetOpenPositions(ctx context.Context, instrumentID int) ([]OpenPosition, error) { +// GetOpenPositionsForInstrument returns all your current opened positions +func (c *COINUT) GetOpenPositionsForInstrument(ctx context.Context, instrumentID int) ([]OpenPosition, error) { type Response struct { Positions []OpenPosition `json:"positions"` } diff --git a/exchanges/exchange.go b/exchanges/exchange.go index 0082d844..a1195dfb 100644 --- a/exchanges/exchange.go +++ b/exchanges/exchange.go @@ -1298,11 +1298,6 @@ func (b *Base) CalculateTotalCollateral(ctx context.Context, calculator *order.T return nil, common.ErrNotYetImplemented } -// GetFuturesPositions returns futures positions according to the provided parameters -func (b *Base) GetFuturesPositions(context.Context, asset.Item, currency.Pair, time.Time, time.Time) ([]order.Detail, error) { - return nil, common.ErrNotYetImplemented -} - // GetCollateralCurrencyForContract returns the collateral currency for an asset and contract pair func (b *Base) GetCollateralCurrencyForContract(asset.Item, currency.Pair) (currency.Code, asset.Item, error) { return currency.Code{}, asset.Empty, common.ErrNotYetImplemented @@ -1322,7 +1317,7 @@ func (b *Base) HasAssetTypeAccountSegregation() bool { } // GetServerTime returns the current exchange server time. -func (b *Base) GetServerTime(_ context.Context, _ asset.Item) (time.Time, error) { +func (b *Base) GetServerTime(context.Context, asset.Item) (time.Time, error) { return time.Time{}, common.ErrNotYetImplemented } @@ -1330,3 +1325,29 @@ func (b *Base) GetServerTime(_ context.Context, _ asset.Item) (time.Time, error) func (b *Base) GetMarginRatesHistory(context.Context, *margin.RateHistoryRequest) (*margin.RateHistoryResponse, error) { return nil, common.ErrNotYetImplemented } + +// GetPositionSummary returns stats for a future position +func (b *Base) GetPositionSummary(context.Context, *order.PositionSummaryRequest) (*order.PositionSummary, error) { + return nil, common.ErrNotYetImplemented +} + +// GetFundingPaymentDetails returns funding payment details for a future for a specific time period +func (b *Base) GetFundingPaymentDetails(context.Context, *order.FundingRatesRequest) (*order.FundingRates, error) { + return nil, common.ErrNotYetImplemented +} + +// GetFuturesPositions returns futures positions for all currencies +func (b *Base) GetFuturesPositions(context.Context, *order.PositionsRequest) ([]order.PositionDetails, error) { + return nil, common.ErrNotYetImplemented +} + +// GetFundingRates returns funding rates based on request data +func (b *Base) GetFundingRates(ctx context.Context, request *order.FundingRatesRequest) ([]order.FundingRates, error) { + return nil, common.ErrNotYetImplemented +} + +// IsPerpetualFutureCurrency ensures a given asset and currency is a perpetual future +// differs by exchange +func (b *Base) IsPerpetualFutureCurrency(asset.Item, currency.Pair) (bool, error) { + return false, common.ErrNotYetImplemented +} diff --git a/exchanges/exchange_test.go b/exchanges/exchange_test.go index 09b4e3e4..f3d144af 100644 --- a/exchanges/exchange_test.go +++ b/exchanges/exchange_test.go @@ -2265,14 +2265,6 @@ func TestCalculateTotalCollateral(t *testing.T) { } } -func TestGetFuturesPositions(t *testing.T) { - t.Parallel() - var b Base - if _, err := b.GetFuturesPositions(context.Background(), asset.Spot, currency.Pair{}, time.Time{}, time.Time{}); !errors.Is(err, common.ErrNotYetImplemented) { - t.Errorf("received: %v, expected: %v", err, common.ErrNotYetImplemented) - } -} - func TestUpdateCurrencyStates(t *testing.T) { t.Parallel() var b Base @@ -2340,3 +2332,43 @@ func TestGetFundingRateHistory(t *testing.T) { t.Errorf("received: %v, expected: %v", err, common.ErrNotYetImplemented) } } + +func TestGetPositionSummary(t *testing.T) { + t.Parallel() + var b Base + if _, err := b.GetPositionSummary(context.Background(), nil); !errors.Is(err, common.ErrNotYetImplemented) { + t.Errorf("received: %v, expected: %v", err, common.ErrNotYetImplemented) + } +} + +func TestGetFuturesPositions(t *testing.T) { + t.Parallel() + var b Base + if _, err := b.GetFuturesPositions(context.Background(), nil); !errors.Is(err, common.ErrNotYetImplemented) { + t.Errorf("received: %v, expected: %v", err, common.ErrNotYetImplemented) + } +} + +func TestGetFundingPaymentDetails(t *testing.T) { + t.Parallel() + var b Base + if _, err := b.GetFundingPaymentDetails(context.Background(), nil); !errors.Is(err, common.ErrNotYetImplemented) { + t.Errorf("received: %v, expected: %v", err, common.ErrNotYetImplemented) + } +} + +func TestGetFundingRates(t *testing.T) { + t.Parallel() + var b Base + if _, err := b.GetFundingRates(context.Background(), nil); !errors.Is(err, common.ErrNotYetImplemented) { + t.Errorf("received: %v, expected: %v", err, common.ErrNotYetImplemented) + } +} + +func TestIsPerpetualFutureCurrency(t *testing.T) { + t.Parallel() + var b Base + if _, err := b.IsPerpetualFutureCurrency(asset.Spot, currency.NewPair(currency.BTC, currency.USD)); !errors.Is(err, common.ErrNotYetImplemented) { + t.Errorf("received: %v, expected: %v", err, common.ErrNotYetImplemented) + } +} diff --git a/exchanges/ftx/ftx.go b/exchanges/ftx/ftx.go index f2710861..3c768d74 100644 --- a/exchanges/ftx/ftx.go +++ b/exchanges/ftx/ftx.go @@ -145,6 +145,7 @@ var ( errInvalidOrderAmounts = errors.New("filled amount should not exceed order amount") errCollateralCurrencyNotFound = errors.New("no collateral scaling information found") errCollateralInitialMarginFractionMissing = errors.New("cannot scale collateral, missing initial margin fraction information") + errDepositAddressDoesNotExist = errors.New("deposit address does not exist") validResolutionData = []int64{15, 60, 300, 900, 3600, 14400, 86400} ) @@ -307,11 +308,15 @@ func (f *FTX) GetFuture(ctx context.Context, futureName string) (FuturesData, er } // GetFutureStats gets data on a given future's stats -func (f *FTX) GetFutureStats(ctx context.Context, futureName string) (FutureStatsData, error) { +func (f *FTX) GetFutureStats(ctx context.Context, pair currency.Pair) (FutureStatsData, error) { resp := struct { Data FutureStatsData `json:"result"` }{} - return resp.Data, f.SendHTTPRequest(ctx, exchange.RestSpot, fmt.Sprintf(getFutureStats, futureName), &resp) + p, err := f.FormatSymbol(pair, asset.Futures) + if err != nil { + return FutureStatsData{}, err + } + return resp.Data, f.SendHTTPRequest(ctx, exchange.RestSpot, fmt.Sprintf(getFutureStats, p), &resp) } // GetExpiredFuture returns information on an expired futures contract @@ -340,21 +345,28 @@ func (f *FTX) GetExpiredFutures(ctx context.Context) ([]FuturesData, error) { return resp.Data, f.SendHTTPRequest(ctx, exchange.RestSpot, getExpiredFutures, &resp) } -// GetFundingRates gets data on funding rates -func (f *FTX) GetFundingRates(ctx context.Context, startTime, endTime time.Time, future string) ([]FundingRatesData, error) { +// FundingRates gets data on funding rates +func (f *FTX) FundingRates(ctx context.Context, startTime, endTime time.Time, pair currency.Pair, limit int64) ([]FundingRatesData, error) { resp := struct { Data []FundingRatesData `json:"result"` }{} params := url.Values{} if !startTime.IsZero() && !endTime.IsZero() { if startTime.After(endTime) { - return resp.Data, errStartTimeCannotBeAfterEndTime + return nil, errStartTimeCannotBeAfterEndTime } params.Set("start_time", strconv.FormatInt(startTime.Unix(), 10)) params.Set("end_time", strconv.FormatInt(endTime.Unix(), 10)) } - if future != "" { - params.Set("future", future) + if !pair.IsEmpty() { + p, err := f.FormatSymbol(pair, asset.Futures) + if err != nil { + return nil, err + } + params.Set("future", p) + } + if limit > 0 { + params.Set("limit", strconv.FormatInt(limit, 10)) } endpoint := common.EncodeURLValues(getFundingRates, params) return resp.Data, f.SendHTTPRequest(ctx, exchange.RestSpot, endpoint, &resp) @@ -521,11 +533,17 @@ func (f *FTX) GetAccountInfo(ctx context.Context) (AccountInfoData, error) { } // GetPositions gets the users positions -func (f *FTX) GetPositions(ctx context.Context) ([]PositionData, error) { +func (f *FTX) GetPositions(ctx context.Context, includeAverages bool) ([]PositionData, error) { resp := struct { Data []PositionData `json:"result"` }{} - return resp.Data, f.SendAuthHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, getPositions, nil, &resp) + requestURL := getPositions + if includeAverages { + vals := url.Values{} + vals.Set("showAvgPrice", "true") + requestURL = common.EncodeURLValues(getPositions, vals) + } + return resp.Data, f.SendAuthHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, requestURL, nil, &resp) } // ChangeAccountLeverage changes default leverage used by account @@ -569,15 +587,31 @@ func (f *FTX) GetAllWalletBalances(ctx context.Context) (AllWalletBalances, erro // FetchDepositAddress gets deposit address for a given coin func (f *FTX) FetchDepositAddress(ctx context.Context, coin currency.Code, chain string) (*DepositData, error) { - resp := struct { - Data DepositData `json:"result"` + var jsonResp json.RawMessage + resp := &struct { + Data *DepositData `json:"result"` + }{} + addressDoesNotExistResponse := &struct { + Data bool `json:"result"` }{} vals := url.Values{} if chain != "" { vals.Set("method", strings.ToLower(chain)) } path := common.EncodeURLValues(getDepositAddress+coin.Upper().String(), vals) - return &resp.Data, f.SendAuthHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, path, nil, &resp) + err := f.SendAuthHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, path, nil, &jsonResp) + if err != nil { + return nil, err + } + err = json.Unmarshal(jsonResp, resp) + if err != nil { + errSecondPass := json.Unmarshal(jsonResp, addressDoesNotExistResponse) + if errSecondPass != nil { + return nil, errSecondPass + } + return nil, fmt.Errorf("%w %v %v", errDepositAddressDoesNotExist, coin, chain) + } + return resp.Data, nil } // FetchDepositHistory gets deposit history @@ -935,8 +969,8 @@ func (f *FTX) GetFills(ctx context.Context, market currency.Pair, item asset.Ite return resp, nil } -// GetFundingPayments gets funding payments -func (f *FTX) GetFundingPayments(ctx context.Context, startTime, endTime time.Time, future string) ([]FundingPaymentsData, error) { +// FundingPayments gets funding payments +func (f *FTX) FundingPayments(ctx context.Context, startTime, endTime time.Time, future currency.Pair, limit int64) ([]FundingPaymentsData, error) { resp := struct { Data []FundingPaymentsData `json:"result"` }{} @@ -948,8 +982,11 @@ func (f *FTX) GetFundingPayments(ctx context.Context, startTime, endTime time.Ti params.Set("start_time", strconv.FormatInt(startTime.Unix(), 10)) params.Set("end_time", strconv.FormatInt(endTime.Unix(), 10)) } - if future != "" { - params.Set("future", future) + if !future.IsEmpty() { + params.Set("future", future.String()) + } + if limit > 0 { + params.Set("limit", strconv.FormatInt(limit, 10)) } endpoint := common.EncodeURLValues(getFundingPayments, params) return resp.Data, f.SendAuthHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, endpoint, nil, &resp) diff --git a/exchanges/ftx/ftx_test.go b/exchanges/ftx/ftx_test.go index e4554712..a068d106 100644 --- a/exchanges/ftx/ftx_test.go +++ b/exchanges/ftx/ftx_test.go @@ -72,8 +72,17 @@ func TestMain(m *testing.M) { if err != nil { log.Fatal(err) } + err = f.CurrencyPairs.EnablePair(asset.Futures, currency.NewPair(currency.BTC, currency.PERP)) + if err != nil { + log.Fatal(err) + } + err = f.CurrencyPairs.EnablePair(asset.Futures, currency.NewPair(currency.OKB, currency.PERP)) + if err != nil { + log.Fatal(err) + } f.Websocket.DataHandler = sharedtestvalues.GetWebsocketInterfaceChannelOverride() f.Websocket.TrafficAlert = sharedtestvalues.GetWebsocketStructChannelOverride() + os.Exit(m.Run()) } @@ -232,11 +241,11 @@ func TestGetFuture(t *testing.T) { func TestGetFutureStats(t *testing.T) { t.Parallel() - _, err := f.GetFutureStats(context.Background(), "BTC-PERP") + _, err := f.GetFutureStats(context.Background(), currency.NewPair(currency.BTC, currency.PERP)) if err != nil { t.Error(err) } - future, err := f.GetFutureStats(context.Background(), "BTC-MOVE-2021Q4") + future, err := f.GetFutureStats(context.Background(), currency.NewPair(currency.BTC, currency.NewCode("MOVE-2021Q4"))) if err != nil { t.Error(err) } @@ -245,15 +254,15 @@ func TestGetFutureStats(t *testing.T) { } } -func TestGetFundingRates(t *testing.T) { +func TestFundingRates(t *testing.T) { t.Parallel() // optional params - _, err := f.GetFundingRates(context.Background(), time.Time{}, time.Time{}, "") + _, err := f.FundingRates(context.Background(), time.Time{}, time.Time{}, currency.EMPTYPAIR, -1) if err != nil { t.Error(err) } - _, err = f.GetFundingRates(context.Background(), - time.Now().Add(-time.Hour), time.Now(), "BTC-PERP") + _, err = f.FundingRates(context.Background(), + time.Now().Add(-time.Hour), time.Now(), currency.NewPair(currency.BTC, currency.PERP), 1) if err != nil { t.Error(err) } @@ -275,7 +284,12 @@ func TestGetPositions(t *testing.T) { if !areTestAPIKeysSet() { t.Skip() } - _, err := f.GetPositions(context.Background()) + _, err := f.GetPositions(context.Background(), false) + if err != nil { + t.Error(err) + } + + _, err = f.GetPositions(context.Background(), true) if err != nil { t.Error(err) } @@ -479,6 +493,11 @@ func TestFetchDepositAddress(t *testing.T) { if r.Method != "trx" { t.Error("expected trx method") } + + _, err = f.FetchDepositAddress(context.Background(), currency.NewCode("SUSHIBEAR"), "") + if !errors.Is(err, errDepositAddressDoesNotExist) { + t.Error(err) + } } func TestFetchDepositHistory(t *testing.T) { @@ -771,24 +790,27 @@ func TestGetFills(t *testing.T) { } } -func TestGetFundingPayments(t *testing.T) { +func TestFundingPayments(t *testing.T) { t.Parallel() if !areTestAPIKeysSet() { t.Skip() } - // optional params - _, err := f.GetFundingPayments(context.Background(), - time.Time{}, time.Time{}, "") + + _, err := f.FundingPayments(context.Background(), time.Time{}, time.Time{}, currency.EMPTYPAIR, -1) if err != nil { t.Error(err) } - _, err = f.GetFundingPayments(context.Background(), - time.Unix(authStartTime, 0), time.Unix(authEndTime, 0), futuresPair) + + cp, err := currency.NewPairFromString("BTC-PERP") + if err != nil { + t.Fatal(err) + } + _, err = f.FundingPayments(context.Background(), time.Unix(authStartTime, 0), time.Unix(authEndTime, 0), cp, 1) if err != nil { t.Error(err) } - _, err = f.GetFundingPayments(context.Background(), - time.Unix(authEndTime, 0), time.Unix(authStartTime, 0), futuresPair) + + _, err = f.FundingPayments(context.Background(), time.Unix(authEndTime, 0), time.Unix(authStartTime, 0), cp, -1) if err != errStartTimeCannotBeAfterEndTime { t.Errorf("should have thrown errStartTimeCannotBeAfterEndTime, got %v", err) } @@ -1237,7 +1259,7 @@ func TestGetDepositAddress(t *testing.T) { if !areTestAPIKeysSet() { t.Skip("API keys required but not set, skipping test") } - _, err := f.GetDepositAddress(context.Background(), currency.NewCode("FTT"), "", "") + _, err := f.GetDepositAddress(context.Background(), currency.NewCode("BTC"), "", "") if err != nil { t.Error(err) } @@ -1785,51 +1807,57 @@ func TestScaleCollateral(t *testing.T) { if err != nil { t.Error(err) } - walletInfo, err := f.GetAllWalletBalances(context.Background()) + walletInfo, err := f.GetBalances(context.Background(), true, true) if err != nil { t.Error(err) } localScaling := 0.0 - providedUSDValue := 0.0 - for _, v := range walletInfo { - for v2 := range v { - coin := v[v2].Coin - if coin.Equal(currency.USD) { - localScaling += v[v2].Total - providedUSDValue += v[v2].USDValue + var coverageTested bool + for i := range walletInfo { + coin := walletInfo[i].Coin + if coin.Equal(currency.USD) { + localScaling += walletInfo[i].Total + continue + } + var tick MarketData + usdPrice := walletInfo[i].USDValue / walletInfo[i].Total + tick, err = f.GetMarket(context.Background(), currency.NewPairWithDelimiter(coin.String(), "usd", "/").String()) + if err != nil { + if walletInfo[i].USDValue == 0 { + // sometimes spot market for currency/USD doesn't exist and has no value, skip continue } - var tick MarketData - tick, err = f.GetMarket(context.Background(), currency.NewPairWithDelimiter(coin.String(), "usd", "/").String()) - if err != nil { - // not all markets exist like this, skip + t.Logf("using wallet USD price for %v - %v", coin, usdPrice) + } else { + usdPrice = tick.Price + } + var offlineScaledCollateral *order.CollateralByCurrency + offlineScaledCollateral, err = f.ScaleCollateral( + context.Background(), + &order.CollateralCalculator{ + CollateralCurrency: coin, + Asset: asset.Spot, + Side: order.Buy, + FreeCollateral: decimal.NewFromFloat(walletInfo[i].Total), + USDPrice: decimal.NewFromFloat(usdPrice), + CalculateOffline: true, + }) + if err != nil { + if errors.Is(err, errCollateralCurrencyNotFound) || + errors.Is(err, order.ErrUSDValueRequired) { continue } - _, err = f.ScaleCollateral( - context.Background(), - &order.CollateralCalculator{ - CollateralCurrency: coin, - Asset: asset.Spot, - Side: order.Buy, - FreeCollateral: decimal.NewFromFloat(v[v2].Total), - USDPrice: decimal.NewFromFloat(tick.Price), - CalculateOffline: true, - }) - if err != nil { - if errors.Is(err, errCollateralCurrencyNotFound) || - errors.Is(err, order.ErrUSDValueRequired) { - continue - } - t.Error(err) - } - providedUSDValue += v[v2].USDValue + t.Error(err) + } + localScaling += offlineScaledCollateral.CollateralContribution.InexactFloat64() + if !coverageTested { _, err = f.ScaleCollateral(context.Background(), &order.CollateralCalculator{ CollateralCurrency: coin, Asset: asset.Spot, Side: order.Buy, - FreeCollateral: decimal.NewFromFloat(v[v2].Total), - USDPrice: decimal.NewFromFloat(tick.Price), + FreeCollateral: decimal.NewFromFloat(walletInfo[i].Total), + USDPrice: decimal.NewFromFloat(usdPrice), IsForNewPosition: true, CalculateOffline: true, }) @@ -1841,7 +1869,7 @@ func TestScaleCollateral(t *testing.T) { CollateralCurrency: coin, Asset: asset.Spot, Side: order.Buy, - FreeCollateral: decimal.NewFromFloat(v[v2].Total), + FreeCollateral: decimal.NewFromFloat(walletInfo[i].Total), IsLiquidating: true, CalculateOffline: true, }) @@ -1859,13 +1887,14 @@ func TestScaleCollateral(t *testing.T) { if err != nil { t.Error(err) } + coverageTested = true } } if accountInfo.Collateral == 0 { return } if (math.Abs((localScaling-accountInfo.Collateral)/accountInfo.Collateral) * 100) > 5 { - t.Errorf("collateral scaling less than 95%% accurate, received '%v' expected roughly '%v'", localScaling, accountInfo.Collateral) + t.Errorf("collateral scaling less than 95%% accurate, received '%v'/%v%% expected roughly '%v'", localScaling, math.Abs((localScaling-accountInfo.Collateral)/accountInfo.Collateral)*100, accountInfo.Collateral) } } @@ -1874,44 +1903,40 @@ func TestCalculateTotalCollateral(t *testing.T) { if !areTestAPIKeysSet() { t.Skip("skipping test, api keys not set") } - walletInfo, err := f.GetAllWalletBalances(context.Background()) + walletInfo, err := f.GetBalances(context.Background(), true, true) if err != nil { t.Error(err) } - var scales []order.CollateralCalculator - for _, v := range walletInfo { - for v2 := range v { - coin := v[v2].Coin - if coin.Equal(currency.USD) { - total := decimal.NewFromFloat(v[v2].Total) - scales = append(scales, order.CollateralCalculator{ - CollateralCurrency: coin, - Asset: asset.Spot, - Side: order.Buy, - FreeCollateral: total, - USDPrice: total, - CalculateOffline: true, - }) - continue - } - var tick MarketData - tick, err = f.GetMarket(context.Background(), currency.NewPairWithDelimiter(coin.String(), "usd", "/").String()) - if err != nil { - // some assumed markets don't exist, just don't process them - t.Log(err) - continue - } - if tick.Price == 0 { - continue - } - scales = append(scales, order.CollateralCalculator{ + scales := make([]order.CollateralCalculator, len(walletInfo)) + for i := range walletInfo { + coin := walletInfo[i].Coin + if coin.Equal(currency.USD) { + total := decimal.NewFromFloat(walletInfo[i].Total) + scales[i] = order.CollateralCalculator{ CollateralCurrency: coin, Asset: asset.Spot, Side: order.Buy, - FreeCollateral: decimal.NewFromFloat(v[v2].Total), - USDPrice: decimal.NewFromFloat(tick.Price), + FreeCollateral: total, CalculateOffline: true, - }) + } + continue + } + var tick MarketData + tick, err = f.GetMarket(context.Background(), currency.NewPairWithDelimiter(coin.String(), "usd", "/").String()) + if err != nil { + // some assumed markets don't exist, just don't process them + continue + } + if tick.Price == 0 { + continue + } + scales[i] = order.CollateralCalculator{ + CollateralCurrency: coin, + Asset: asset.Spot, + Side: order.Buy, + FreeCollateral: decimal.NewFromFloat(walletInfo[i].Total), + USDPrice: decimal.NewFromFloat(tick.Price), + CalculateOffline: true, } } calc := &order.TotalCollateralCalculator{ @@ -2026,22 +2051,29 @@ func TestCalculatePNL(t *testing.T) { t.Skip("skipping test, api keys not set") } pair := currency.NewPair(currency.BTC, currency.NewCode("20211231")) - positions, err := f.GetFuturesPositions(context.Background(), asset.Futures, pair, time.Date(2021, 1, 6, 4, 28, 0, 0, time.UTC), time.Date(2021, 12, 31, 4, 32, 0, 0, time.UTC)) + positions, err := f.GetFuturesPositions(context.Background(), &order.PositionsRequest{ + Asset: asset.Futures, + Pairs: currency.Pairs{pair}, + StartDate: time.Date(2021, 1, 6, 4, 28, 0, 0, time.UTC), + }) if err != nil { t.Error(err) } + if len(positions) != 1 { + t.Fatal("expected 1 position") + } orders := make([]order.Detail, len(positions)) - for i := range positions { + for i := range positions[0].Orders { orders[i] = order.Detail{ - Side: positions[i].Side, + Side: positions[0].Orders[i].Side, Pair: pair, - OrderID: positions[i].OrderID, - Price: positions[i].Price, - Amount: positions[i].Amount, + OrderID: positions[0].Orders[i].OrderID, + Price: positions[0].Orders[i].Price, + Amount: positions[0].Orders[i].Amount, AssetType: asset.Futures, Exchange: f.Name, - Fee: positions[i].Fee, - Date: positions[i].Date, + Fee: positions[0].Orders[i].Fee, + Date: positions[0].Orders[i].Date, } } @@ -2076,14 +2108,25 @@ func TestGetFuturesPositions(t *testing.T) { if !areTestAPIKeysSet() { t.Skip("skipping test, api keys not set") } - cp := currency.NewPair(currency.BTC, currency.NewCode("20211231")) + cp := currency.Pairs{currency.NewPair(currency.BTC, currency.PERP)} start := time.Now().Add(-time.Hour * 24 * 365) - end := time.Now() - a := asset.Futures - _, err := f.GetFuturesPositions(context.Background(), a, cp, start, end) + _, err := f.GetFuturesPositions(context.Background(), &order.PositionsRequest{ + Asset: asset.Futures, + Pairs: cp, + StartDate: start, + }) if err != nil { t.Error(err) } + + _, err = f.GetFuturesPositions(context.Background(), &order.PositionsRequest{ + Asset: asset.Spot, + Pairs: cp, + StartDate: start, + }) + if !errors.Is(err, order.ErrNotFuturesAsset) { + t.Errorf("received '%v' expected '%v'", err, order.ErrNotFuturesAsset) + } } func TestLoadCollateralWeightings(t *testing.T) { @@ -2464,3 +2507,234 @@ func TestGetMarginRatesHistory(t *testing.T) { t.Errorf("expected '%v' received '%v'", online.Rates[0].BorrowCost.Cost, offline.Rates[0].BorrowCost.Cost) } } + +func TestGetPositionSummary(t *testing.T) { + t.Parallel() + if !areTestAPIKeysSet() { + t.Skip() + } + positions, err := f.GetFuturesPositions( + context.Background(), + &order.PositionsRequest{ + Asset: asset.Futures, + Pairs: currency.Pairs{currency.NewPair(currency.BTC, currency.NewCode("PERP"))}, + StartDate: time.Now().Add(-time.Hour * 24 * 365), + }) + if err != nil { + t.Error(err) + } + if len(positions) == 0 { + t.Skip("no positions to get summary") + } + if len(positions) != 1 { + t.Fatal("expected 1 position") + } + if len(positions[0].Orders) == 0 { + t.Skip("no positions to get summary") + } + onlineCalculation, err := f.GetPositionSummary(context.Background(), &order.PositionSummaryRequest{Asset: asset.Futures, Pair: positions[0].Pair}) + if err != nil { + t.Error(err) + } + if onlineCalculation.CurrentSize.IsZero() { + // you have no positions to calculate offline summary for + return + } + acc, err := f.GetAccountInfo(context.Background()) + if err != nil { + t.Error(err) + } + size := decimal.NewFromFloat(positions[0].Orders[0].Amount) + underlyingStr, err := f.FormatSymbol(currency.NewPair(currency.BTC, currency.USD), asset.Spot) + if err != nil { + t.Error(err) + } + underlying, err := f.GetMarket(context.Background(), underlyingStr) + if err != nil { + t.Error(err) + } + + offlineCalculation, err := f.GetPositionSummary(context.Background(), &order.PositionSummaryRequest{ + Asset: asset.Futures, + Pair: positions[0].Pair, + CalculateOffline: true, + Direction: positions[0].Orders[0].Side, + FreeCollateral: decimal.NewFromFloat(acc.FreeCollateral), + TotalCollateral: decimal.NewFromFloat(acc.Collateral), + OpeningPrice: decimal.NewFromFloat(positions[0].Orders[0].Price), + CurrentPrice: onlineCalculation.MarkPrice, + OpeningSize: size, + CurrentSize: size, + CollateralUsed: onlineCalculation.CollateralUsed, + NotionalPrice: decimal.NewFromFloat(underlying.Last), + Leverage: decimal.NewFromFloat(acc.Leverage), + MaxLeverageForAccount: decimal.NewFromFloat(acc.Leverage), + TotalAccountValue: decimal.NewFromFloat(acc.TotalAccountValue), + TotalOpenPositionNotional: decimal.NewFromFloat(acc.TotalPositionSize), + }) + if err != nil { + t.Error(err) + } + if !onlineCalculation.MaintenanceMarginRequirement.Equal(offlineCalculation.MaintenanceMarginRequirement) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.MaintenanceMarginRequirement, offlineCalculation.MaintenanceMarginRequirement) + } + if !onlineCalculation.MarkPrice.Equal(offlineCalculation.MarkPrice) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.MarkPrice, offlineCalculation.MarkPrice) + } + if !onlineCalculation.CurrentSize.Equal(offlineCalculation.CurrentSize) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.CurrentSize, offlineCalculation.CurrentSize) + } + if !onlineCalculation.TotalCollateral.Equal(offlineCalculation.TotalCollateral) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.TotalCollateral, offlineCalculation.TotalCollateral) + } + if !onlineCalculation.FreeCollateral.Equal(offlineCalculation.FreeCollateral) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.FreeCollateral, offlineCalculation.FreeCollateral) + } + if !onlineCalculation.MarginFraction.Equal(offlineCalculation.MarginFraction) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.MarginFraction, offlineCalculation.MarginFraction) + } + if !onlineCalculation.RecentPNL.Equal(offlineCalculation.RecentPNL) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.RecentPNL, offlineCalculation.RecentPNL) + } + if !onlineCalculation.AverageOpenPrice.Equal(offlineCalculation.AverageOpenPrice) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.AverageOpenPrice, offlineCalculation.AverageOpenPrice) + } + if !onlineCalculation.BreakEvenPrice.Equal(offlineCalculation.BreakEvenPrice) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.BreakEvenPrice, offlineCalculation.BreakEvenPrice) + } + if !onlineCalculation.CollateralUsed.Equal(offlineCalculation.CollateralUsed) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.CollateralUsed, offlineCalculation.CollateralUsed) + } + if !onlineCalculation.InitialMarginRequirement.Equal(offlineCalculation.InitialMarginRequirement) { + t.Errorf("expected '%v' received '%v'", onlineCalculation.InitialMarginRequirement, offlineCalculation.InitialMarginRequirement) + } +} + +func TestGetFundingRates(t *testing.T) { + t.Parallel() + _, err := f.GetFundingRates(context.Background(), nil) + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received '%v' expected '%v'", err, common.ErrNilPointer) + } + + request := &order.FundingRatesRequest{} + _, err = f.GetFundingRates(context.Background(), request) + if !errors.Is(err, currency.ErrCurrencyPairsEmpty) { + t.Errorf("received '%v' expected '%v'", err, currency.ErrCurrencyPairsEmpty) + } + + request.Pairs = currency.Pairs{ + currency.NewPair(currency.DOGE, currency.USD), + } + _, err = f.GetFundingRates(context.Background(), request) + if !errors.Is(err, common.ErrDateUnset) { + t.Errorf("received '%v' expected '%v'", err, common.ErrDateUnset) + } + + request.StartDate = time.Now().Add(-time.Hour * 24 * 31) + request.EndDate = time.Now() + request.Asset = asset.Spot + _, err = f.GetFundingRates(context.Background(), request) + if !errors.Is(err, currency.ErrPairNotFound) { + t.Errorf("received '%v' expected '%v'", err, currency.ErrPairNotFound) + } + + request.Pairs = currency.Pairs{ + currency.NewPair(currency.BTC, currency.PERP), + } + request.Asset = asset.Futures + _, err = f.GetFundingRates(context.Background(), request) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v'", err, nil) + } + + if !areTestAPIKeysSet() { + return + } + request.IncludePayments = true + request.IncludePredictedRate = true + resp, err := f.GetFundingRates(context.Background(), request) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v'", err, nil) + } + if len(resp) != 1 { + t.Error("expected one result") + } + if resp[0].PredictedUpcomingRate.Time.IsZero() { + t.Error("expected predicted rates") + } + if resp[0].PaymentSum.IsZero() { + t.Log("expected payments, but you may not have had a position open, so not a failure") + } +} + +func TestIsPerpetualFutureCurrency(t *testing.T) { + t.Parallel() + cp1 := currency.NewPair(currency.BTC, currency.USD) + cp2 := currency.NewPair(currency.BTC, currency.PERP) + result, err := f.IsPerpetualFutureCurrency(asset.Spot, cp1) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v'", err, nil) + } + if result { + t.Error("expected false") + } + + result, err = f.IsPerpetualFutureCurrency(asset.Spot, cp1) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v'", err, nil) + } + if result { + t.Error("expected false") + } + + _, err = f.IsPerpetualFutureCurrency(asset.Spot, cp2) + if !errors.Is(err, currency.ErrPairNotFound) { + t.Errorf("received '%v' expected '%v'", err, currency.ErrPairNotFound) + } + _, err = f.IsPerpetualFutureCurrency(asset.Spot, cp2) + if !errors.Is(err, currency.ErrPairNotFound) { + t.Errorf("received '%v' expected '%v'", err, currency.ErrPairNotFound) + } + + _, err = f.IsPerpetualFutureCurrency(asset.Futures, cp1) + if !errors.Is(err, currency.ErrPairNotFound) { + t.Errorf("received '%v' expected '%v'", err, currency.ErrPairNotFound) + } + + result, err = f.IsPerpetualFutureCurrency(asset.Futures, cp2) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v'", err, nil) + } + if !result { + t.Error("expected true") + } +} + +func TestGetFundingPayments(t *testing.T) { + t.Parallel() + if !areTestAPIKeysSet() { + t.Skip() + } + + _, err := f.getFundingPayments(context.Background(), time.Time{}, time.Time{}, currency.EMPTYPAIR, -1) + if err != nil { + t.Error(err) + } + + cp, err := currency.NewPairFromString("BTC-PERP") + if err != nil { + t.Fatal(err) + } + startDate := time.Now().Add(-time.Hour * 24 * 31) + endDate := time.Now() + _, err = f.getFundingPayments(context.Background(), startDate, endDate, cp, 100) + if err != nil { + t.Error(err) + } + + _, err = f.getFundingPayments(context.Background(), time.Unix(authEndTime, 0), time.Unix(authStartTime, 0), cp, -1) + if err != errStartTimeCannotBeAfterEndTime { + t.Errorf("should have thrown errStartTimeCannotBeAfterEndTime, got %v", err) + } +} diff --git a/exchanges/ftx/ftx_types.go b/exchanges/ftx/ftx_types.go index a95268c5..e87e06c0 100644 --- a/exchanges/ftx/ftx_types.go +++ b/exchanges/ftx/ftx_types.go @@ -187,26 +187,26 @@ type IndexWeights struct { // PositionData stores data of an open position type PositionData struct { - CollateralUsed float64 `json:"collateralUsed"` + Future currency.Pair `json:"future"` + Size float64 `json:"size"` + Side string `json:"side"` + NetSize float64 `json:"netSize"` + LongOrderSize float64 `json:"longOrderSize"` + ShortOrderSize float64 `json:"shortOrderSize"` Cost float64 `json:"cost"` + EntryPrice float64 `json:"entryPrice"` + UnrealizedPNL float64 `json:"unrealizedPnl"` + RealizedPNL float64 `json:"realizedPnl"` + InitialMarginRequirement float64 `json:"initialMarginRequirement"` + MaintenanceMarginRequirement float64 `json:"maintenanceMarginRequirement"` + OpenSize float64 `json:"openSize"` + CollateralUsed float64 `json:"collateralUsed"` + EstimatedLiquidationPrice float64 `json:"estimatedLiquidationPrice"` + RecentAverageOpenPrice float64 `json:"recentAverageOpenPrice"` + RecentPNL float64 `json:"recentPnl"` + RecentBreakEvenPrice float64 `json:"recentBreakEvenPrice"` CumulativeBuySize float64 `json:"cumulativeBuySize"` CumulativeSellSize float64 `json:"cumulativeSellSize"` - EntryPrice float64 `json:"entryPrice"` - EstimatedLiquidationPrice float64 `json:"estimatedLiquidationPrice"` - Future currency.Pair `json:"future"` - InitialMarginRequirement float64 `json:"initialMarginRequirement"` - LongOrderSize float64 `json:"longOrderSize"` - MaintenanceMarginRequirement float64 `json:"maintenanceMarginRequirement"` - NetSize float64 `json:"netSize"` - OpenSize float64 `json:"openSize"` - RealizedPNL float64 `json:"realizedPnl"` - RecentAverageOpenPrice float64 `json:"recentAverageOpenPrice"` - RecentBreakEvenPrice float64 `json:"recentBreakEvenPrice"` - RecentPnl float64 `json:"recentPnl"` - ShortOrderSize float64 `json:"shortOrderSize"` - Side string `json:"side"` - Size float64 `json:"size"` - UnrealizedPNL float64 `json:"unrealizedPnl"` } // AccountInfoData stores account data @@ -331,22 +331,22 @@ type WithdrawItem struct { // OrderData stores open order data type OrderData struct { - CreatedAt time.Time `json:"createdAt"` - FilledSize float64 `json:"filledSize"` - Future string `json:"future"` - ID int64 `json:"id"` - Market string `json:"market"` - Price float64 `json:"price"` - AvgFillPrice float64 `json:"avgFillPrice"` - RemainingSize float64 `json:"remainingSize"` - Side string `json:"side"` - Size float64 `json:"size"` - Status string `json:"status"` - OrderType string `json:"type"` - ReduceOnly bool `json:"reduceOnly"` - IOC bool `json:"ioc"` - PostOnly bool `json:"postOnly"` - ClientID string `json:"clientId"` + AvgFillPrice float64 `json:"avgFillPrice"` + ClientID string `json:"clientId"` + CreatedAt time.Time `json:"createdAt"` + FilledSize float64 `json:"filledSize"` + Future currency.Pair `json:"future"` + ID int64 `json:"id"` + IOC bool `json:"ioc"` + Market currency.Pair `json:"market"` + PostOnly bool `json:"postOnly"` + Price float64 `json:"price"` + ReduceOnly bool `json:"reduceOnly"` + RemainingSize float64 `json:"remainingSize"` + Side string `json:"side"` + Size float64 `json:"size"` + Status string `json:"status"` + Type string `json:"type"` } // TriggerOrderData stores trigger order data @@ -384,22 +384,22 @@ type TriggerData struct { // FillsData stores fills' data type FillsData struct { - Fee float64 `json:"fee"` - FeeCurrency string `json:"feeCurrency"` - FeeRate float64 `json:"feeRate"` - Future string `json:"future"` - ID int64 `json:"id"` - Liquidity string `json:"liquidity"` - Market string `json:"market"` - BaseCurrency string `json:"baseCurrency"` - QuoteCurrency string `json:"quoteCurrency"` - OrderID int64 `json:"orderId"` - TradeID int64 `json:"tradeId"` - Price float64 `json:"price"` - Side string `json:"side"` - Size float64 `json:"size"` - Time time.Time `json:"time"` - OrderType string `json:"type"` + Fee float64 `json:"fee"` + FeeCurrency currency.Code `json:"feeCurrency"` + FeeRate float64 `json:"feeRate"` + Future string `json:"future"` + ID int64 `json:"id"` + Liquidity string `json:"liquidity"` + Market string `json:"market"` + BaseCurrency string `json:"baseCurrency"` + QuoteCurrency string `json:"quoteCurrency"` + OrderID int64 `json:"orderId"` + TradeID int64 `json:"tradeId"` + Price float64 `json:"price"` + Side string `json:"side"` + Size float64 `json:"size"` + Time time.Time `json:"time"` + OrderType string `json:"type"` } // FundingPaymentsData stores funding payments' data diff --git a/exchanges/ftx/ftx_wrapper.go b/exchanges/ftx/ftx_wrapper.go index 324e6910..b12c28e1 100644 --- a/exchanges/ftx/ftx_wrapper.go +++ b/exchanges/ftx/ftx_wrapper.go @@ -820,7 +820,7 @@ func (s *OrderData) GetCompatible(ctx context.Context, f *FTX) (OrderVars, error feeBuilder.PurchasePrice = s.AvgFillPrice feeBuilder.Amount = s.Size resp.OrderType = order.Market - if strings.EqualFold(s.OrderType, order.Limit.String()) { + if strings.EqualFold(s.Type, order.Limit.String()) { resp.OrderType = order.Limit feeBuilder.IsMaker = true } @@ -839,11 +839,7 @@ func (f *FTX) GetOrderInfo(ctx context.Context, orderID string, _ currency.Pair, if err != nil { return resp, err } - p, err := currency.NewPairFromString(orderData.Market) - if err != nil { - return resp, err - } - orderAssetType, err := f.GetPairAssetType(p) + orderAssetType, err := f.GetPairAssetType(orderData.Market) if err != nil { return resp, err } @@ -853,7 +849,7 @@ func (f *FTX) GetOrderInfo(ctx context.Context, orderID string, _ currency.Pair, resp.Date = orderData.CreatedAt resp.Exchange = f.Name resp.ExecutedAmount = orderData.Size - orderData.RemainingSize - resp.Pair = p + resp.Pair = orderData.Market resp.AssetType = orderAssetType resp.Price = orderData.Price resp.RemainingAmount = orderData.RemainingSize @@ -945,12 +941,6 @@ func (f *FTX) GetActiveOrders(ctx context.Context, getOrdersRequest *order.GetOr return resp, err } for y := range orderData { - var p currency.Pair - p, err = currency.NewPairFromString(orderData[y].Market) - if err != nil { - return nil, err - } - tempResp.OrderID = strconv.FormatInt(orderData[y].ID, 10) tempResp.Amount = orderData[y].Size tempResp.AssetType = assetType @@ -958,14 +948,14 @@ func (f *FTX) GetActiveOrders(ctx context.Context, getOrdersRequest *order.GetOr tempResp.Date = orderData[y].CreatedAt tempResp.Exchange = f.Name tempResp.ExecutedAmount = orderData[y].Size - orderData[y].RemainingSize - tempResp.Pair = p + tempResp.Pair = orderData[y].Market tempResp.Price = orderData[y].Price tempResp.RemainingAmount = orderData[y].RemainingSize var orderVars OrderVars orderVars, err = f.compatibleOrderVars(ctx, orderData[y].Side, orderData[y].Status, - orderData[y].OrderType, + orderData[y].Type, orderData[y].Size, orderData[y].FilledSize, orderData[y].AvgFillPrice) @@ -1023,75 +1013,71 @@ func (f *FTX) GetActiveOrders(ctx context.Context, getOrdersRequest *order.GetOr // GetOrderHistory retrieves account order information // Can Limit response to specific order status -func (f *FTX) GetOrderHistory(ctx context.Context, getOrdersRequest *order.GetOrdersRequest) ([]order.Detail, error) { - if err := getOrdersRequest.Validate(); err != nil { +func (f *FTX) GetOrderHistory(ctx context.Context, request *order.GetOrdersRequest) ([]order.Detail, error) { + if err := request.Validate(); err != nil { return nil, err } var resp []order.Detail - for x := range getOrdersRequest.Pairs { - var tempResp order.Detail - assetType, err := f.GetPairAssetType(getOrdersRequest.Pairs[x]) - if err != nil { - return resp, err - } - - formattedPair, err := f.FormatExchangeCurrency(getOrdersRequest.Pairs[x], - assetType) + for x := range request.Pairs { + var d order.Detail + fp, err := f.FormatExchangeCurrency(request.Pairs[x], request.AssetType) if err != nil { return nil, err } - orderData, err := f.FetchOrderHistory(ctx, - formattedPair.String(), - getOrdersRequest.StartTime, - getOrdersRequest.EndTime, + history, err := f.FetchOrderHistory(ctx, + fp.String(), + request.StartTime, + request.EndTime, "") if err != nil { - return resp, err + return nil, err } - for y := range orderData { - var p currency.Pair - p, err = currency.NewPairFromString(orderData[y].Market) - if err != nil { - return nil, err - } - tempResp.OrderID = strconv.FormatInt(orderData[y].ID, 10) - tempResp.Amount = orderData[y].Size - tempResp.AssetType = assetType - tempResp.AverageExecutedPrice = orderData[y].AvgFillPrice - tempResp.ClientOrderID = orderData[y].ClientID - tempResp.Date = orderData[y].CreatedAt - tempResp.Exchange = f.Name - tempResp.ExecutedAmount = orderData[y].Size - orderData[y].RemainingSize - tempResp.Pair = p - tempResp.Price = orderData[y].Price - tempResp.RemainingAmount = orderData[y].RemainingSize + for y := range history { + d.OrderID = strconv.FormatInt(history[y].ID, 10) + d.Amount = history[y].Size + d.AssetType = request.AssetType + d.AverageExecutedPrice = history[y].AvgFillPrice + d.ClientOrderID = history[y].ClientID + d.Date = history[y].CreatedAt + d.Exchange = f.Name + d.ExecutedAmount = history[y].Size - history[y].RemainingSize + d.Pair = history[y].Market + d.Price = history[y].Price + d.RemainingAmount = history[y].RemainingSize var orderVars OrderVars orderVars, err = f.compatibleOrderVars(ctx, - orderData[y].Side, - orderData[y].Status, - orderData[y].OrderType, - orderData[y].Size, - orderData[y].FilledSize, - orderData[y].AvgFillPrice) + history[y].Side, + history[y].Status, + history[y].Type, + history[y].Size, + history[y].FilledSize, + history[y].AvgFillPrice) if err != nil { return resp, err } - tempResp.Status = orderVars.Status - tempResp.Side = orderVars.Side - tempResp.Type = orderVars.OrderType - tempResp.Fee = orderVars.Fee - resp = append(resp, tempResp) + d.Status = orderVars.Status + d.Side = orderVars.Side + d.Type = orderVars.OrderType + d.Fee = orderVars.Fee + resp = append(resp, d) + } + var side, t string + if request.Side != order.UnknownSide { + side = request.Side.Lower() + } + if request.Type != order.UnknownType { + t = request.Type.Lower() } triggerOrderData, err := f.GetTriggerOrderHistory(ctx, - formattedPair.String(), - getOrdersRequest.StartTime, - getOrdersRequest.EndTime, - strings.ToLower(getOrdersRequest.Side.String()), - strings.ToLower(getOrdersRequest.Type.String()), + fp.String(), + request.StartTime, + request.EndTime, + side, + t, "") if err != nil { - return resp, err + return nil, err } for z := range triggerOrderData { var p currency.Pair @@ -1099,17 +1085,18 @@ func (f *FTX) GetOrderHistory(ctx context.Context, getOrdersRequest *order.GetOr if err != nil { return nil, err } - tempResp.OrderID = strconv.FormatInt(triggerOrderData[z].ID, 10) - tempResp.Amount = triggerOrderData[z].Size - tempResp.AssetType = assetType - tempResp.Date = triggerOrderData[z].CreatedAt - tempResp.Exchange = f.Name - tempResp.ExecutedAmount = triggerOrderData[z].FilledSize - tempResp.Pair = p - tempResp.Price = triggerOrderData[z].AvgFillPrice - tempResp.RemainingAmount = triggerOrderData[z].Size - triggerOrderData[z].FilledSize - tempResp.TriggerPrice = triggerOrderData[z].TriggerPrice - orderVars, err := f.compatibleOrderVars(ctx, + d.OrderID = strconv.FormatInt(triggerOrderData[z].ID, 10) + d.Amount = triggerOrderData[z].Size + d.AssetType = request.AssetType + d.Date = triggerOrderData[z].CreatedAt + d.Exchange = f.Name + d.ExecutedAmount = triggerOrderData[z].FilledSize + d.Pair = p + d.Price = triggerOrderData[z].AvgFillPrice + d.RemainingAmount = triggerOrderData[z].Size - triggerOrderData[z].FilledSize + d.TriggerPrice = triggerOrderData[z].TriggerPrice + var orderVars OrderVars + orderVars, err = f.compatibleOrderVars(ctx, triggerOrderData[z].Side, triggerOrderData[z].Status, triggerOrderData[z].OrderType, @@ -1117,14 +1104,14 @@ func (f *FTX) GetOrderHistory(ctx context.Context, getOrdersRequest *order.GetOr triggerOrderData[z].FilledSize, triggerOrderData[z].AvgFillPrice) if err != nil { - return resp, err + return nil, err } - tempResp.Status = orderVars.Status - tempResp.Side = orderVars.Side - tempResp.Type = orderVars.OrderType - tempResp.Fee = orderVars.Fee - tempResp.InferCostsAndTimes() - resp = append(resp, tempResp) + d.Status = orderVars.Status + d.Side = orderVars.Side + d.Type = orderVars.OrderType + d.Fee = orderVars.Fee + d.InferCostsAndTimes() + resp = append(resp, d) } } return resp, nil @@ -1427,7 +1414,7 @@ func (f *FTX) CalculateTotalCollateral(ctx context.Context, calc *order.TotalCol var pos []PositionData var err error if calc.FetchPositions { - pos, err = f.GetPositions(ctx) + pos, err = f.GetPositions(ctx, true) if err != nil { return nil, fmt.Errorf("%v CalculateTotalCollateral GetPositions %w", f.Name, err) } @@ -1651,41 +1638,96 @@ func (f *FTX) calculateTotalCollateralOnline(ctx context.Context, calc *order.To return &result, nil } -// GetFuturesPositions returns all futures positions within provided params -func (f *FTX) GetFuturesPositions(ctx context.Context, a asset.Item, cp currency.Pair, start, end time.Time) ([]order.Detail, error) { - if !a.IsFutures() { - return nil, fmt.Errorf("%w futures asset type only", common.ErrFunctionNotSupported) +// GetFuturesPositions returns futures positions based on supplied request +func (f *FTX) GetFuturesPositions(ctx context.Context, request *order.PositionsRequest) ([]order.PositionDetails, error) { + if request == nil { + return nil, fmt.Errorf("%w position request", common.ErrNilPointer) } - fills, err := f.GetFills(ctx, cp, a, start, end) + if !request.Asset.IsFutures() { + return nil, fmt.Errorf("%w '%s'", order.ErrNotFuturesAsset, request.Asset) + } + if err := f.CurrencyPairs.IsAssetEnabled(request.Asset); err != nil { + return nil, err + } + enabledPairs, err := f.CurrencyPairs.GetPairs(request.Asset, true) if err != nil { return nil, err } - resp := make([]order.Detail, len(fills)) - for i := range fills { - price := fills[i].Price - side, err := order.StringToOrderSide(fills[i].Side) - if err != nil { - return nil, err - } - resp[i] = order.Detail{ - Side: side, - Pair: cp, - OrderID: strconv.FormatInt(fills[i].ID, 10), - Price: price, - Amount: fills[i].Size, - AssetType: a, - Exchange: f.Name, - Fee: fills[i].Fee, - Date: fills[i].Time, + for i := range request.Pairs { + if !enabledPairs.Contains(request.Pairs[i], false) { + return nil, fmt.Errorf("%w %v", currency.ErrPairNotFound, request.Pairs[i]) } } - sort.Slice(resp, func(i, j int) bool { - return resp[i].Date.Before(resp[j].Date) - }) - - return resp, nil + positionsDetails := make([]order.PositionDetails, len(request.Pairs)) + for x := range request.Pairs { + fillsOrders := make(map[string]*order.Detail) + endTime := time.Now() + allPositions: + for { + var fills []FillsData + fills, err = f.GetFills(ctx, request.Pairs[x], request.Asset, request.StartDate, endTime) + if err != nil { + return nil, err + } + if len(fills) == 0 { + break allPositions + } + sort.Slice(fills, func(i, j int) bool { + return fills[i].ID < (fills[j].ID) + }) + for y := range fills { + if request.StartDate.Equal(fills[y].Time) || fills[y].Time.Before(request.StartDate) { + // reached end of trades to crawl + break allPositions + } + if fills[y].Time.After(endTime) { + continue + } + var side order.Side + side, err = order.StringToOrderSide(fills[y].Side) + if err != nil { + return nil, err + } + oID := strconv.FormatInt(fills[y].ID, 10) + _, ok := fillsOrders[oID] + if !ok { + fillsOrders[oID] = &order.Detail{ + Fee: fills[y].Fee, + FeeAsset: fills[y].FeeCurrency, + Pair: request.Pairs[x], + Price: fills[y].Price, + Amount: fills[y].Size, + Exchange: f.Name, + OrderID: oID, + Side: side, + Status: order.Filled, + AssetType: request.Asset, + Date: fills[y].Time, + } + } + } + if endTime.Equal(fills[len(fills)-1].Time) { + break allPositions + } + endTime = fills[len(fills)-1].Time + } + var ods []order.Detail + for _, v := range fillsOrders { + ods = append(ods, *v) + } + sort.Slice(ods, func(i, j int) bool { + return ods[i].OrderID < (ods[j].OrderID) + }) + positionsDetails[x] = order.PositionDetails{ + Exchange: f.Name, + Asset: request.Asset, + Pair: enabledPairs[x], + Orders: ods, + } + } + return positionsDetails, nil } // GetCollateralCurrencyForContract returns the collateral currency for an asset and contract pair @@ -1918,3 +1960,254 @@ func (f *FTX) GetMarginRatesHistory(ctx context.Context, request *margin.RateHis return response, nil } + +// GetPositionSummary returns an overview of a future position +func (f *FTX) GetPositionSummary(ctx context.Context, request *order.PositionSummaryRequest) (*order.PositionSummary, error) { + if request == nil { + return nil, fmt.Errorf("%w PositionSummaryRequest", common.ErrNilPointer) + } + if !request.Asset.IsFutures() { + return nil, fmt.Errorf("%w '%s' is not a futures asset", asset.ErrNotSupported, request.Asset) + } + if err := f.CurrencyPairs.IsAssetEnabled(request.Asset); err != nil { + return nil, err + } + + if request.CalculateOffline { + one := decimal.NewFromInt(1) + positionSize := request.CurrentSize.Mul(request.CurrentPrice) + var marginFraction decimal.Decimal + if positionSize.IsPositive() && request.TotalCollateral.IsPositive() { + marginFraction = request.TotalCollateral.Div(positionSize).Mul(decimal.NewFromFloat(100)) + } + breakEvenPrice := request.OpeningPrice + if !request.OpeningSize.Equal(request.CurrentSize) { + breakEvenPrice = request.OpeningPrice.Mul(request.OpeningSize).Sub(request.CurrentSize.Mul(request.CurrentPrice)).Div(request.OpeningSize.Sub(request.CurrentSize)) + } + var maintenanceMarginRequirement, positionMaintenanceMarginFraction decimal.Decimal + currSize := request.CurrentSize + openSize := request.OpeningSize + if request.Leverage.LessThanOrEqual(decimal.NewFromFloat(20)) { + positionMaintenanceMarginFraction = decimal.NewFromFloat(0.03) + } else { + // leverage can never be above 20, but will remain in event of change in policy + positionMaintenanceMarginFraction = decimal.NewFromFloat(0.006) + } + // baseIMF is always 1/20 as 20 is the max leverage + baseIMF := one.Div(decimal.NewFromInt(20)) + maintenanceMarginRequirement = decimal.Max(positionMaintenanceMarginFraction, decimal.NewFromFloat(0.6).Mul(baseIMF)) + + if request.Direction.IsShort() { + currSize = currSize.Neg() + openSize = openSize.Neg() + } + imf := one.Div(request.Leverage) + // estimated liquidation price is not included in offline summary + // the formula does not match the API output - despite the example matching + // see https://help.ftx.com/hc/en-us/articles/360027668712-Liquidations vs + // https://docs.ftx.com/#get-account-information + return &order.PositionSummary{ + MaintenanceMarginRequirement: maintenanceMarginRequirement, + InitialMarginRequirement: imf, + CollateralUsed: request.CollateralUsed, + MarkPrice: request.CurrentPrice, + CurrentSize: request.CurrentSize.Abs(), + BreakEvenPrice: breakEvenPrice, + AverageOpenPrice: request.OpeningPrice, + RecentPNL: request.CurrentPrice.Mul(currSize).Sub(request.OpeningPrice.Mul(openSize)), + MarginFraction: marginFraction, + FreeCollateral: request.FreeCollateral, + TotalCollateral: request.TotalCollateral, + }, nil + } + positions, err := f.GetPositions(ctx, true) + if err != nil { + return nil, err + } + acc, err := f.GetAccountInfo(ctx) + if err != nil { + return nil, err + } + for i := range positions { + if !positions[i].Future.Equal(request.Pair) { + continue + } + return &order.PositionSummary{ + MaintenanceMarginRequirement: decimal.NewFromFloat(positions[i].MaintenanceMarginRequirement), + InitialMarginRequirement: decimal.NewFromFloat(positions[i].InitialMarginRequirement), + EstimatedLiquidationPrice: decimal.NewFromFloat(positions[i].EstimatedLiquidationPrice), + CollateralUsed: decimal.NewFromFloat(positions[i].CollateralUsed), + MarkPrice: decimal.NewFromFloat(positions[i].EntryPrice), + CurrentSize: decimal.NewFromFloat(positions[i].Size), + BreakEvenPrice: decimal.NewFromFloat(positions[i].RecentBreakEvenPrice), + AverageOpenPrice: decimal.NewFromFloat(positions[i].RecentAverageOpenPrice), + RecentPNL: decimal.NewFromFloat(positions[i].RecentPNL), + MarginFraction: decimal.NewFromFloat(acc.MarginFraction * 100), + FreeCollateral: decimal.NewFromFloat(acc.FreeCollateral), + TotalCollateral: decimal.NewFromFloat(acc.Collateral), + }, nil + } + return nil, fmt.Errorf("unable to calculate position summary %w for %v %v", order.ErrPositionNotFound, request.Asset, request.Pair) +} + +// GetFundingRates returns stats about funding rates for pairs +func (f *FTX) GetFundingRates(ctx context.Context, request *order.FundingRatesRequest) ([]order.FundingRates, error) { + if request == nil { + return nil, fmt.Errorf("%w FundingRatesRequest", common.ErrNilPointer) + } + if len(request.Pairs) == 0 { + return nil, currency.ErrCurrencyPairsEmpty + } + var limit int64 = 1000 + err := common.StartEndTimeCheck(request.StartDate, request.EndDate) + if err != nil { + return nil, err + } + pairFmt, err := f.GetPairFormat(request.Asset, true) + if err != nil { + return nil, err + } + request.Pairs = request.Pairs.Format(pairFmt.Delimiter, pairFmt.Index, pairFmt.Uppercase) + response := make([]order.FundingRates, 0, len(request.Pairs)) + for x := range request.Pairs { + var isPerp bool + isPerp, err = f.IsPerpetualFutureCurrency(request.Asset, request.Pairs[x]) + if err != nil { + return nil, err + } + if !isPerp { + return nil, fmt.Errorf("%w '%v' '%v'", order.ErrNotPerpetualFuture, request.Asset, request.Pairs[x]) + } + var ( + rates []FundingRatesData + fundingDetails []FundingPaymentsData + stats FutureStatsData + ) + pairResponse := order.FundingRates{ + Exchange: f.Name, + Asset: request.Asset, + Pair: request.Pairs[x], + StartDate: request.StartDate, + EndDate: request.EndDate, + } + endTime := request.EndDate + allRates: + for { + rates, err = f.FundingRates(ctx, request.StartDate, endTime, request.Pairs[x], limit) + if err != nil { + return nil, err + } + if len(rates) == 0 { + break allRates + } + responseRates: + for y := range rates { + if rates[y].Time.Before(request.StartDate) { + break allRates + } + if rates[y].Time.After(endTime) { + continue + } + for z := range pairResponse.FundingRates { + if rates[y].Time.Equal(pairResponse.FundingRates[z].Time) { + continue responseRates + } + } + pairResponse.FundingRates = append(pairResponse.FundingRates, order.FundingRate{ + Rate: decimal.NewFromFloat(rates[y].Rate), + Time: rates[y].Time, + }) + } + if endTime.Equal(rates[len(rates)-1].Time) || int64(len(rates)) < limit { + break allRates + } + endTime = rates[len(rates)-1].Time + } + if len(pairResponse.FundingRates) == 0 { + continue + } + if request.IncludePayments { + fundingDetails, err = f.getFundingPayments(ctx, request.StartDate, request.EndDate, request.Pairs[x], limit) + if err != nil { + return nil, err + } + for y := range fundingDetails { + for z := range pairResponse.FundingRates { + if !fundingDetails[y].Time.Equal(pairResponse.FundingRates[z].Time) { + continue + } + pairResponse.FundingRates[z].Payment = decimal.NewFromFloat(fundingDetails[y].Payment) + pairResponse.PaymentSum = pairResponse.PaymentSum.Add(decimal.NewFromFloat(fundingDetails[y].Payment)) + break + } + } + } + if request.IncludePredictedRate { + stats, err = f.GetFutureStats(ctx, request.Pairs[x]) + if err != nil { + return nil, err + } + upcoming := order.FundingRate{ + Rate: decimal.NewFromFloat(stats.NextFundingRate), + Time: stats.NextFundingTime, + } + pairResponse.PredictedUpcomingRate = upcoming + } + sort.Slice(pairResponse.FundingRates, func(i, j int) bool { + return pairResponse.FundingRates[i].Time.Before(pairResponse.FundingRates[j].Time) + }) + pairResponse.LatestRate = pairResponse.FundingRates[len(pairResponse.FundingRates)-1] + response = append(response, pairResponse) + } + return response, nil +} + +func (f *FTX) getFundingPayments(ctx context.Context, startDate, endDate time.Time, future currency.Pair, limit int64) ([]FundingPaymentsData, error) { + requestEndTime := endDate + var payments []FundingPaymentsData +allRates: + for { + fundingDetails, err := f.FundingPayments(ctx, startDate, requestEndTime, future, limit) + if err != nil { + return nil, err + } + if len(fundingDetails) == 0 { + break allRates + } + responseRates: + for x := range fundingDetails { + if fundingDetails[x].Time.Before(startDate) { + break allRates + } + if fundingDetails[x].Time.After(requestEndTime) { + continue + } + for y := range payments { + if fundingDetails[x].Time.Equal(payments[y].Time) { + continue responseRates + } + } + payments = append(payments, fundingDetails[x]) + } + if requestEndTime.Equal(fundingDetails[len(fundingDetails)-1].Time) || int64(len(fundingDetails)) < limit { + break allRates + } + requestEndTime = fundingDetails[len(fundingDetails)-1].Time + } + return payments, nil +} + +// IsPerpetualFutureCurrency returns whether a currency is a perpetual future +func (f *FTX) IsPerpetualFutureCurrency(a asset.Item, cp currency.Pair) (bool, error) { + if err := f.CurrencyPairs.IsAssetEnabled(a); err != nil { + return false, err + } + pairs, err := f.GetEnabledPairs(a) + if err != nil { + return false, err + } + if !pairs.Contains(cp, false) { + return false, fmt.Errorf("%w '%v'", currency.ErrPairNotFound, cp) + } + return cp.Quote.Equal(currency.PERP) && a.IsFutures(), nil +} diff --git a/exchanges/huobi/huobi.go b/exchanges/huobi/huobi.go index c2a6c7cd..f706ac77 100644 --- a/exchanges/huobi/huobi.go +++ b/exchanges/huobi/huobi.go @@ -89,7 +89,7 @@ func (h *HUOBI) GetMarginRates(ctx context.Context, symbol currency.Pair) (Margi // GetSpotKline returns kline data // KlinesRequestParams contains symbol currency.Pair, period and size -func (h *HUOBI) GetSpotKline(ctx context.Context, arg KlinesRequestParams) ([]KlineItem, error) { +func (h *HUOBI) GetSpotKline(ctx context.Context, arg *KlinesRequestParams) ([]KlineItem, error) { vals := url.Values{} symbolValue, err := h.FormatSymbol(arg.Symbol, asset.Spot) if err != nil { diff --git a/exchanges/huobi/huobi_test.go b/exchanges/huobi/huobi_test.go index 326e2416..191e1cac 100644 --- a/exchanges/huobi/huobi_test.go +++ b/exchanges/huobi/huobi_test.go @@ -1587,7 +1587,7 @@ func TestGetSpotKline(t *testing.T) { t.Error(err) } _, err = h.GetSpotKline(context.Background(), - KlinesRequestParams{ + &KlinesRequestParams{ Symbol: cp, Period: "1min", Size: 0, diff --git a/exchanges/huobi/huobi_wrapper.go b/exchanges/huobi/huobi_wrapper.go index 8ffeb51e..1679d792 100644 --- a/exchanges/huobi/huobi_wrapper.go +++ b/exchanges/huobi/huobi_wrapper.go @@ -1772,7 +1772,7 @@ func (h *HUOBI) GetHistoricCandles(ctx context.Context, pair currency.Pair, a as if err := h.ValidateKline(pair, a, interval); err != nil { return kline.Item{}, err } - klineParams := KlinesRequestParams{ + klineParams := &KlinesRequestParams{ Period: h.FormatExchangeKlineInterval(interval), Symbol: pair, } diff --git a/exchanges/interfaces.go b/exchanges/interfaces.go index 291e5a4f..d0ad3d1e 100644 --- a/exchanges/interfaces.go +++ b/exchanges/interfaces.go @@ -47,9 +47,6 @@ type IBotExchange interface { GetWithdrawPermissions() uint32 FormatWithdrawPermissions() string GetFundingHistory(ctx context.Context) ([]FundHistory, error) - - OrderManagement - GetDepositAddress(ctx context.Context, cryptocurrency currency.Code, accountID, chain string) (*deposit.Address, error) GetAvailableTransferChains(ctx context.Context, cryptocurrency currency.Code) ([]string, error) GetWithdrawalsHistory(ctx context.Context, code currency.Code, a asset.Item) ([]WithdrawalHistory, error) @@ -66,29 +63,23 @@ type IBotExchange interface { DisableRateLimiter() error EnableRateLimiter() error GetServerTime(ctx context.Context, ai asset.Item) (time.Time, error) - CurrencyStateManagement - GetMarginRatesHistory(context.Context, *margin.RateHistoryRequest) (*margin.RateHistoryResponse, error) - - order.PNLCalculation - order.CollateralManagement - GetFuturesPositions(context.Context, asset.Item, currency.Pair, time.Time, time.Time) ([]order.Detail, error) - GetWebsocket() (*stream.Websocket, error) SubscribeToWebsocketChannels(channels []stream.ChannelSubscription) error UnsubscribeToWebsocketChannels(channels []stream.ChannelSubscription) error GetSubscriptions() ([]stream.ChannelSubscription, error) FlushWebsocketChannels() error AuthenticateWebsocket(ctx context.Context) error - GetOrderExecutionLimits(a asset.Item, cp currency.Pair) (order.MinMaxLevel, error) CheckOrderExecutionLimits(a asset.Item, cp currency.Pair, price, amount float64, orderType order.Type) error UpdateOrderExecutionLimits(ctx context.Context, a asset.Item) error - - AccountManagement GetCredentials(ctx context.Context) (*account.Credentials, error) ValidateCredentials(ctx context.Context, a asset.Item) error FunctionalityChecker + AccountManagement + OrderManagement + CurrencyStateManagement + FuturesManagement } // OrderManagement defines functionality for order management @@ -135,3 +126,16 @@ type FunctionalityChecker interface { IsWebsocketAuthenticationSupported() bool IsRESTAuthenticationSupported() bool } + +// FuturesManagement manages futures orders, pnl and collateral calculations +type FuturesManagement interface { + GetPositionSummary(context.Context, *order.PositionSummaryRequest) (*order.PositionSummary, error) + ScaleCollateral(ctx context.Context, calculator *order.CollateralCalculator) (*order.CollateralByCurrency, error) + CalculateTotalCollateral(context.Context, *order.TotalCollateralCalculator) (*order.TotalCollateralResponse, error) + GetFuturesPositions(context.Context, *order.PositionsRequest) ([]order.PositionDetails, error) + GetFundingRates(context.Context, *order.FundingRatesRequest) ([]order.FundingRates, error) + IsPerpetualFutureCurrency(asset.Item, currency.Pair) (bool, error) + GetCollateralCurrencyForContract(asset.Item, currency.Pair) (currency.Code, asset.Item, error) + GetMarginRatesHistory(context.Context, *margin.RateHistoryRequest) (*margin.RateHistoryResponse, error) + order.PNLCalculation +} diff --git a/exchanges/order/futures.go b/exchanges/order/futures.go index 86b37e61..6003e90b 100644 --- a/exchanges/order/futures.go +++ b/exchanges/order/futures.go @@ -16,9 +16,9 @@ import ( // SetupPositionController creates a position controller // to track futures orders -func SetupPositionController() *PositionController { - return &PositionController{ - multiPositionTrackers: make(map[string]map[asset.Item]map[currency.Pair]*MultiPositionTracker), +func SetupPositionController() PositionController { + return PositionController{ + multiPositionTrackers: make(map[string]map[asset.Item]map[*currency.Item]map[*currency.Item]*MultiPositionTracker), } } @@ -26,33 +26,38 @@ func SetupPositionController() *PositionController { // multi position tracker which funnels down into the // position tracker, to then track an order's pnl func (c *PositionController) TrackNewOrder(d *Detail) error { - if d == nil { - return errNilOrder - } - if !d.AssetType.IsFutures() { - return fmt.Errorf("order %v %v %v %v %w", - d.Exchange, d.AssetType, d.Pair, d.OrderID, ErrNotFuturesAsset) - } if c == nil { return fmt.Errorf("position controller %w", common.ErrNilPointer) } - c.m.Lock() - defer c.m.Unlock() - exchM, ok := c.multiPositionTrackers[strings.ToLower(d.Exchange)] - if !ok { - exchM = make(map[asset.Item]map[currency.Pair]*MultiPositionTracker) - c.multiPositionTrackers[strings.ToLower(d.Exchange)] = exchM - } - itemM, ok := exchM[d.AssetType] - if !ok { - itemM = make(map[currency.Pair]*MultiPositionTracker) - exchM[d.AssetType] = itemM + if d == nil { + return errNilOrder } var err error - multiPositionTracker, ok := itemM[d.Pair] + d.Exchange, err = checkTrackerPrerequisitesLowerExchange(d.Exchange, d.AssetType, d.Pair) + if err != nil { + return err + } + c.m.Lock() + defer c.m.Unlock() + exchMap, ok := c.multiPositionTrackers[d.Exchange] if !ok { - multiPositionTracker, err = SetupMultiPositionTracker(&MultiPositionTrackerSetup{ - Exchange: strings.ToLower(d.Exchange), + exchMap = make(map[asset.Item]map[*currency.Item]map[*currency.Item]*MultiPositionTracker) + c.multiPositionTrackers[d.Exchange] = exchMap + } + itemMap, ok := exchMap[d.AssetType] + if !ok { + itemMap = make(map[*currency.Item]map[*currency.Item]*MultiPositionTracker) + exchMap[d.AssetType] = itemMap + } + baseMap, ok := itemMap[d.Pair.Base.Item] + if !ok { + baseMap = make(map[*currency.Item]*MultiPositionTracker) + itemMap[d.Pair.Base.Item] = baseMap + } + quoteMap, ok := baseMap[d.Pair.Quote.Item] + if !ok { + quoteMap, err = SetupMultiPositionTracker(&MultiPositionTrackerSetup{ + Exchange: d.Exchange, Asset: d.AssetType, Pair: d.Pair, Underlying: d.Pair.Base, @@ -60,9 +65,14 @@ func (c *PositionController) TrackNewOrder(d *Detail) error { if err != nil { return err } - itemM[d.Pair] = multiPositionTracker + baseMap[d.Pair.Quote.Item] = quoteMap } - return multiPositionTracker.TrackNewOrder(d) + err = quoteMap.TrackNewOrder(d) + if err != nil { + return err + } + c.updated = time.Now() + return nil } // SetCollateralCurrency allows the setting of a collateral currency to all child trackers @@ -71,63 +81,142 @@ func (c *PositionController) SetCollateralCurrency(exch string, item asset.Item, if c == nil { return fmt.Errorf("position controller %w", common.ErrNilPointer) } + var err error + exch, err = checkTrackerPrerequisitesLowerExchange(exch, item, pair) + if err != nil { + return err + } c.m.Lock() defer c.m.Unlock() - if !item.IsFutures() { - return fmt.Errorf("%v %v %v %w", exch, item, pair, ErrNotFuturesAsset) - } - exchM, ok := c.multiPositionTrackers[strings.ToLower(exch)] - if !ok { - return fmt.Errorf("cannot set collateral %v for %v %v %v %w", collateralCurrency, exch, item, pair, ErrPositionsNotLoadedForExchange) + tracker := c.multiPositionTrackers[exch][item][pair.Base.Item][pair.Quote.Item] + if tracker == nil { + return fmt.Errorf("%w no open position for %v %v %v", ErrPositionNotFound, exch, item, pair) } - itemM, ok := exchM[item] - if !ok { - return fmt.Errorf("cannot set collateral %v for %v %v %v %w", collateralCurrency, exch, item, pair, ErrPositionsNotLoadedForAsset) + tracker.m.Lock() + defer tracker.m.Unlock() + tracker.collateralCurrency = collateralCurrency + for i := range tracker.positions { + tracker.positions[i].m.Lock() + tracker.positions[i].collateralCurrency = collateralCurrency + tracker.positions[i].m.Unlock() } - multiPositionTracker, ok := itemM[pair] - if !ok { - return fmt.Errorf("cannot set collateral %v for %v %v %v %w", collateralCurrency, exch, item, pair, ErrPositionsNotLoadedForPair) - } - if multiPositionTracker == nil { - return fmt.Errorf("cannot set collateral %v for %v %v %v %w", collateralCurrency, exch, item, pair, common.ErrNilPointer) - } - multiPositionTracker.m.Lock() - multiPositionTracker.collateralCurrency = collateralCurrency - for i := range multiPositionTracker.positions { - multiPositionTracker.positions[i].m.Lock() - multiPositionTracker.positions[i].collateralCurrency = collateralCurrency - multiPositionTracker.positions[i].m.Unlock() - } - multiPositionTracker.m.Unlock() return nil } // GetPositionsForExchange returns all positions for an // exchange, asset pair that is stored in the position controller -func (c *PositionController) GetPositionsForExchange(exch string, item asset.Item, pair currency.Pair) ([]PositionStats, error) { +func (c *PositionController) GetPositionsForExchange(exch string, item asset.Item, pair currency.Pair) ([]Position, error) { + if c == nil { + return nil, fmt.Errorf("position controller %w", common.ErrNilPointer) + } + var err error + exch, err = checkTrackerPrerequisitesLowerExchange(exch, item, pair) + if err != nil { + return nil, err + } + c.m.Lock() + defer c.m.Unlock() + tracker := c.multiPositionTrackers[exch][item][pair.Base.Item][pair.Quote.Item] + if tracker == nil { + return nil, fmt.Errorf("%w no open position for %v %v %v", ErrPositionNotFound, exch, item, pair) + } + + return tracker.GetPositions(), nil +} + +// TrackFundingDetails applies funding rate details to a tracked position +func (c *PositionController) TrackFundingDetails(d *FundingRates) error { + if c == nil { + return fmt.Errorf("position controller %w", common.ErrNilPointer) + } + if d == nil { + return fmt.Errorf("%w funding rate details", common.ErrNilPointer) + } + var err error + d.Exchange, err = checkTrackerPrerequisitesLowerExchange(d.Exchange, d.Asset, d.Pair) + if err != nil { + return err + } + c.m.Lock() + defer c.m.Unlock() + tracker := c.multiPositionTrackers[d.Exchange][d.Asset][d.Pair.Base.Item][d.Pair.Quote.Item] + if tracker == nil { + return fmt.Errorf("%w no open position for %v %v %v", ErrPositionNotFound, d.Exchange, d.Asset, d.Pair) + } + err = tracker.TrackFundingDetails(d) + if err != nil { + return err + } + c.updated = time.Now() + return nil +} + +// LastUpdated is used for the order manager as a way of knowing +// what span of time to check for orders +func (c *PositionController) LastUpdated() (time.Time, error) { + if c == nil { + return time.Time{}, fmt.Errorf("position controller %w", common.ErrNilPointer) + } + c.m.Lock() + defer c.m.Unlock() + return c.updated, nil +} + +// GetOpenPosition returns an open positions that matches the exchange, asset, pair +func (c *PositionController) GetOpenPosition(exch string, item asset.Item, pair currency.Pair) (*Position, error) { + if c == nil { + return nil, fmt.Errorf("position controller %w", common.ErrNilPointer) + } + var err error + exch, err = checkTrackerPrerequisitesLowerExchange(exch, item, pair) + if err != nil { + return nil, err + } + c.m.Lock() + defer c.m.Unlock() + tracker := c.multiPositionTrackers[exch][item][pair.Base.Item][pair.Quote.Item] + if tracker == nil { + return nil, fmt.Errorf("%w no open position for %v %v %v", ErrPositionNotFound, exch, item, pair) + } + positions := tracker.GetPositions() + for i := range positions { + if positions[i].Status.IsInactive() { + continue + } + return &positions[i], nil + } + + return nil, fmt.Errorf("%w no open position for %v %v %v", ErrPositionNotFound, exch, item, pair) +} + +// GetAllOpenPositions returns all open positions with optional filters +func (c *PositionController) GetAllOpenPositions() ([]Position, error) { if c == nil { return nil, fmt.Errorf("position controller %w", common.ErrNilPointer) } c.m.Lock() defer c.m.Unlock() - if !item.IsFutures() { - return nil, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrNotFuturesAsset) + var openPositions []Position + for _, exchMap := range c.multiPositionTrackers { + for _, itemMap := range exchMap { + for _, baseMap := range itemMap { + for _, multiPositionTracker := range baseMap { + positions := multiPositionTracker.GetPositions() + for i := range positions { + if positions[i].Status.IsInactive() { + continue + } + openPositions = append(openPositions, positions[i]) + } + } + } + } } - exchM, ok := c.multiPositionTrackers[strings.ToLower(exch)] - if !ok { - return nil, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionsNotLoadedForExchange) + if len(openPositions) == 0 { + return nil, ErrNoPositionsFound } - itemM, ok := exchM[item] - if !ok { - return nil, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionsNotLoadedForAsset) - } - multiPositionTracker, ok := itemM[pair] - if !ok { - return nil, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionsNotLoadedForPair) - } - - return multiPositionTracker.GetPositions(), nil + return openPositions, nil } // UpdateOpenPositionUnrealisedPNL finds an open position from @@ -137,36 +226,29 @@ func (c *PositionController) UpdateOpenPositionUnrealisedPNL(exch string, item a if c == nil { return decimal.Zero, fmt.Errorf("position controller %w", common.ErrNilPointer) } - if !item.IsFutures() { - return decimal.Zero, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrNotFuturesAsset) + var err error + exch, err = checkTrackerPrerequisitesLowerExchange(exch, item, pair) + if err != nil { + return decimal.Zero, err } - c.m.Lock() defer c.m.Unlock() - exchM, ok := c.multiPositionTrackers[strings.ToLower(exch)] - if !ok { - return decimal.Zero, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionsNotLoadedForExchange) - } - itemM, ok := exchM[item] - if !ok { - return decimal.Zero, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionsNotLoadedForAsset) - } - multiPositionTracker, ok := itemM[pair] - if !ok { - return decimal.Zero, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionsNotLoadedForPair) + tracker := c.multiPositionTrackers[exch][item][pair.Base.Item][pair.Quote.Item] + if tracker == nil { + return decimal.Zero, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionNotFound) } - multiPositionTracker.m.Lock() - defer multiPositionTracker.m.Unlock() - pos := multiPositionTracker.positions + tracker.m.Lock() + defer tracker.m.Unlock() + pos := tracker.positions if len(pos) == 0 { - return decimal.Zero, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionsNotLoadedForPair) + return decimal.Zero, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionNotFound) } latestPos := pos[len(pos)-1] if latestPos.status != Open { return decimal.Zero, fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionClosed) } - err := latestPos.TrackPNLByTime(updated, last) + err = latestPos.TrackPNLByTime(updated, last) if err != nil { return decimal.Zero, fmt.Errorf("%w for position %v %v %v", err, exch, item, pair) } @@ -183,11 +265,10 @@ func SetupMultiPositionTracker(setup *MultiPositionTrackerSetup) (*MultiPosition if setup.Exchange == "" { return nil, errExchangeNameEmpty } - if !setup.Asset.IsValid() || !setup.Asset.IsFutures() { - return nil, ErrNotFuturesAsset - } - if setup.Pair.IsEmpty() { - return nil, ErrPairIsEmpty + var err error + setup.Exchange, err = checkTrackerPrerequisitesLowerExchange(setup.Exchange, setup.Asset, setup.Pair) + if err != nil { + return nil, err } if setup.Underlying.IsEmpty() { return nil, errEmptyUnderlying @@ -196,7 +277,7 @@ func SetupMultiPositionTracker(setup *MultiPositionTrackerSetup) (*MultiPosition return nil, errMissingPNLCalculationFunctions } return &MultiPositionTracker{ - exchange: strings.ToLower(setup.Exchange), + exchange: setup.Exchange, asset: setup.Asset, pair: setup.Pair, underlying: setup.Underlying, @@ -208,50 +289,6 @@ func SetupMultiPositionTracker(setup *MultiPositionTrackerSetup) (*MultiPosition }, nil } -// SetupPositionTracker creates a new position tracker to track n futures orders -// until the position(s) are closed -func (m *MultiPositionTracker) SetupPositionTracker(setup *PositionTrackerSetup) (*PositionTracker, error) { - if m == nil { - return nil, fmt.Errorf("multi-position tracker %w", common.ErrNilPointer) - } - if m.exchange == "" { - return nil, errExchangeNameEmpty - } - if setup == nil { - return nil, errNilSetup - } - if !setup.Asset.IsValid() || !setup.Asset.IsFutures() { - return nil, ErrNotFuturesAsset - } - if setup.Pair.IsEmpty() { - return nil, ErrPairIsEmpty - } - - resp := &PositionTracker{ - exchange: strings.ToLower(m.exchange), - asset: setup.Asset, - contractPair: setup.Pair, - underlyingAsset: setup.Underlying, - status: Open, - entryPrice: setup.EntryPrice, - currentDirection: setup.Side, - openingDirection: setup.Side, - useExchangePNLCalculation: setup.UseExchangePNLCalculation, - collateralCurrency: setup.CollateralCurrency, - offlinePNLCalculation: m.offlinePNLCalculation, - } - if !setup.UseExchangePNLCalculation { - // use position tracker's pnl calculation by default - resp.PNLCalculation = &PNLCalculator{} - } else { - if m.exchangePNLCalculation == nil { - return nil, ErrNilPNLCalculator - } - resp.PNLCalculation = m.exchangePNLCalculation - } - return resp, nil -} - // UpdateOpenPositionUnrealisedPNL updates the pnl for the latest open position // based on the last price and the time func (m *MultiPositionTracker) UpdateOpenPositionUnrealisedPNL(last float64, updated time.Time) (decimal.Decimal, error) { @@ -259,7 +296,7 @@ func (m *MultiPositionTracker) UpdateOpenPositionUnrealisedPNL(last float64, upd defer m.m.Unlock() pos := m.positions if len(pos) == 0 { - return decimal.Zero, fmt.Errorf("%v %v %v %w", m.exchange, m.asset, m.pair, ErrPositionsNotLoadedForPair) + return decimal.Zero, fmt.Errorf("%v %v %v %w", m.exchange, m.asset, m.pair, ErrPositionNotFound) } latestPos := pos[len(pos)-1] if latestPos.status.IsInactive() { @@ -280,51 +317,50 @@ func (c *PositionController) ClearPositionsForExchange(exch string, item asset.I if c == nil { return fmt.Errorf("position controller %w", common.ErrNilPointer) } + var err error + exch, err = checkTrackerPrerequisitesLowerExchange(exch, item, pair) + if err != nil { + return err + } c.m.Lock() defer c.m.Unlock() - if !item.IsFutures() { - return fmt.Errorf("%v %v %v %w", exch, item, pair, ErrNotFuturesAsset) - } - exchM, ok := c.multiPositionTrackers[strings.ToLower(exch)] - if !ok { - return fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionsNotLoadedForExchange) - } - itemM, ok := exchM[item] - if !ok { - return fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionsNotLoadedForAsset) - } - multiPositionTracker, ok := itemM[pair] - if !ok { - return fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionsNotLoadedForPair) + + tracker := c.multiPositionTrackers[exch][item][pair.Base.Item][pair.Quote.Item] + if tracker == nil { + return fmt.Errorf("%v %v %v %w", exch, item, pair, ErrPositionNotFound) } + newMPT, err := SetupMultiPositionTracker(&MultiPositionTrackerSetup{ Exchange: exch, Asset: item, Pair: pair, - Underlying: multiPositionTracker.underlying, - OfflineCalculation: multiPositionTracker.offlinePNLCalculation, - UseExchangePNLCalculation: multiPositionTracker.useExchangePNLCalculations, - ExchangePNLCalculation: multiPositionTracker.exchangePNLCalculation, - CollateralCurrency: multiPositionTracker.collateralCurrency, + Underlying: tracker.underlying, + OfflineCalculation: tracker.offlinePNLCalculation, + UseExchangePNLCalculation: tracker.useExchangePNLCalculations, + ExchangePNLCalculation: tracker.exchangePNLCalculation, + CollateralCurrency: tracker.collateralCurrency, }) if err != nil { return err } - itemM[pair] = newMPT + c.multiPositionTrackers[exch][item][pair.Base.Item][pair.Quote.Item] = newMPT return nil } // GetPositions returns all positions -func (m *MultiPositionTracker) GetPositions() []PositionStats { +func (m *MultiPositionTracker) GetPositions() []Position { if m == nil { return nil } m.m.Lock() defer m.m.Unlock() - resp := make([]PositionStats, len(m.positions)) + resp := make([]Position, len(m.positions)) for i := range m.positions { - resp[i] = m.positions[i].GetStats() + resp[i] = *m.positions[i].GetStats() } + sort.Slice(resp, func(i, j int) bool { + return resp[i].OpeningDate.Before(resp[j].OpeningDate) + }) return resp } @@ -335,10 +371,18 @@ func (m *MultiPositionTracker) TrackNewOrder(d *Detail) error { return fmt.Errorf("multi-position tracker %w", common.ErrNilPointer) } if d == nil { - return ErrSubmissionIsNil + return fmt.Errorf("order detail %w", common.ErrNilPointer) + } + var err error + d.Exchange, err = checkTrackerPrerequisitesLowerExchange(d.Exchange, d.AssetType, d.Pair) + if err != nil { + return err } m.m.Lock() defer m.m.Unlock() + if m.exchange != d.Exchange { + return fmt.Errorf("%w received %v expected %v", errExchangeNameMismatch, d.Exchange, m.exchange) + } if d.AssetType != m.asset { return errAssetMismatch } @@ -354,8 +398,8 @@ func (m *MultiPositionTracker) TrackNewOrder(d *Detail) error { } } if m.positions[len(m.positions)-1].status == Open { - err := m.positions[len(m.positions)-1].TrackNewOrder(d, false) - if err != nil && !errors.Is(err, ErrPositionClosed) { + err = m.positions[len(m.positions)-1].TrackNewOrder(d, false) + if err != nil { return err } m.orderPositions[d.OrderID] = m.positions[len(m.positions)-1] @@ -366,12 +410,15 @@ func (m *MultiPositionTracker) TrackNewOrder(d *Detail) error { Pair: d.Pair, EntryPrice: decimal.NewFromFloat(d.Price), Underlying: d.Pair.Base, + CollateralCurrency: m.collateralCurrency, Asset: d.AssetType, Side: d.Side, UseExchangePNLCalculation: m.useExchangePNLCalculations, - CollateralCurrency: m.collateralCurrency, + OfflineCalculation: m.offlinePNLCalculation, + PNLCalculator: m.exchangePNLCalculation, + Exchange: m.exchange, } - tracker, err := m.SetupPositionTracker(setup) + tracker, err := SetupPositionTracker(setup) if err != nil { return err } @@ -384,6 +431,75 @@ func (m *MultiPositionTracker) TrackNewOrder(d *Detail) error { return nil } +// TrackFundingDetails applies funding rate details to a tracked position +func (m *MultiPositionTracker) TrackFundingDetails(d *FundingRates) error { + if m == nil { + return fmt.Errorf("multi-position tracker %w", common.ErrNilPointer) + } + if d == nil { + return fmt.Errorf("%w FundingRates", common.ErrNilPointer) + } + var err error + d.Exchange, err = checkTrackerPrerequisitesLowerExchange(d.Exchange, d.Asset, d.Pair) + if err != nil { + return err + } + m.m.Lock() + defer m.m.Unlock() + if m.exchange != d.Exchange { + return fmt.Errorf("%w received '%v' expected '%v'", errExchangeNameMismatch, d.Exchange, m.exchange) + } + if d.Asset != m.asset { + return fmt.Errorf("%w tracker: %v supplied: %v", errAssetMismatch, m.asset, d.Asset) + } + if len(m.positions) == 0 { + return fmt.Errorf("%w %v %v %v", ErrPositionNotFound, d.Exchange, d.Asset, d.Pair) + } + for i := range m.positions { + err = m.positions[i].TrackFundingDetails(d) + if err != nil { + return err + } + } + return nil +} + +// SetupPositionTracker creates a new position tracker to track n futures orders +// until the position(s) are closed +func SetupPositionTracker(setup *PositionTrackerSetup) (*PositionTracker, error) { + if setup == nil { + return nil, errNilSetup + } + var err error + setup.Exchange, err = checkTrackerPrerequisitesLowerExchange(setup.Exchange, setup.Asset, setup.Pair) + if err != nil { + return nil, err + } + resp := &PositionTracker{ + exchange: setup.Exchange, + asset: setup.Asset, + contractPair: setup.Pair, + underlying: setup.Underlying, + status: Open, + openingPrice: setup.EntryPrice, + latestDirection: setup.Side, + openingDirection: setup.Side, + useExchangePNLCalculation: setup.UseExchangePNLCalculation, + offlinePNLCalculation: setup.OfflineCalculation, + lastUpdated: time.Now(), + } + if !setup.UseExchangePNLCalculation { + // use position tracker's pnl calculation by default + resp.PNLCalculation = &PNLCalculator{} + } else { + if setup.PNLCalculator == nil { + return nil, ErrNilPNLCalculator + } + resp.PNLCalculation = setup.PNLCalculator + } + return resp, nil +} + // Liquidate will update the latest open position's // to reflect its liquidated status func (m *MultiPositionTracker) Liquidate(price decimal.Decimal, t time.Time) error { @@ -393,39 +509,63 @@ func (m *MultiPositionTracker) Liquidate(price decimal.Decimal, t time.Time) err m.m.Lock() defer m.m.Unlock() if len(m.positions) == 0 { - return fmt.Errorf("%v %v %v %w", m.exchange, m.asset, m.pair, ErrPositionsNotLoadedForPair) + return fmt.Errorf("%v %v %v %w", m.exchange, m.asset, m.pair, ErrPositionNotFound) } return m.positions[len(m.positions)-1].Liquidate(price, t) } // GetStats returns a summary of a future position -func (p *PositionTracker) GetStats() PositionStats { +func (p *PositionTracker) GetStats() *Position { if p == nil { - return PositionStats{} + return nil } p.m.Lock() defer p.m.Unlock() var orders []Detail orders = append(orders, p.longPositions...) orders = append(orders, p.shortPositions...) + sort.Slice(orders, func(i, j int) bool { + return orders[i].Date.Before(orders[j].Date) + }) - return PositionStats{ - Exchange: p.exchange, - Asset: p.asset, - Pair: p.contractPair, - Underlying: p.underlyingAsset, - CollateralCurrency: p.collateralCurrency, - Status: p.status, - Orders: orders, - RealisedPNL: p.realisedPNL, - UnrealisedPNL: p.unrealisedPNL, - LatestDirection: p.currentDirection, - OpeningDirection: p.openingDirection, - OpeningPrice: p.entryPrice, - LatestPrice: p.latestPrice, - PNLHistory: p.pnlHistory, - Exposure: p.exposure, + pos := &Position{ + Exchange: p.exchange, + Asset: p.asset, + Pair: p.contractPair, + Underlying: p.underlying, + RealisedPNL: p.realisedPNL, + UnrealisedPNL: p.unrealisedPNL, + Status: p.status, + OpeningDate: p.openingDate, + OpeningPrice: p.openingPrice, + OpeningSize: p.openingSize, + OpeningDirection: p.openingDirection, + LatestPrice: p.latestPrice, + LatestSize: p.exposure, + LatestDirection: p.latestDirection, + CloseDate: p.closingDate, + Orders: orders, + PNLHistory: p.pnlHistory, + LastUpdated: p.lastUpdated, } + + if p.fundingRateDetails != nil { + frs := make([]FundingRate, len(p.fundingRateDetails.FundingRates)) + copy(frs, p.fundingRateDetails.FundingRates) + pos.FundingRates = FundingRates{ + Exchange: p.fundingRateDetails.Exchange, + Asset: p.fundingRateDetails.Asset, + Pair: p.fundingRateDetails.Pair, + StartDate: p.fundingRateDetails.StartDate, + EndDate: p.fundingRateDetails.EndDate, + LatestRate: p.fundingRateDetails.LatestRate, + PredictedUpcomingRate: p.fundingRateDetails.PredictedUpcomingRate, + FundingRates: frs, + PaymentSum: p.fundingRateDetails.PaymentSum, + } + } + + return pos } // TrackPNLByTime calculates the PNL based on a position tracker's exposure @@ -445,11 +585,11 @@ func (p *PositionTracker) TrackPNLByTime(t time.Time, currentPrice float64) erro Price: price, Status: p.status, } - if p.currentDirection.IsLong() { - diff := price.Sub(p.entryPrice) + if p.latestDirection.IsLong() { + diff := price.Sub(p.openingPrice) result.UnrealisedPNL = p.exposure.Mul(diff) - } else if p.currentDirection.IsShort() { - diff := p.entryPrice.Sub(price) + } else if p.latestDirection.IsShort() { + diff := p.openingPrice.Sub(price) result.UnrealisedPNL = p.exposure.Mul(diff) } if len(p.pnlHistory) > 0 { @@ -463,6 +603,8 @@ func (p *PositionTracker) TrackPNLByTime(t time.Time, currentPrice float64) erro var err error p.pnlHistory, err = upsertPNLEntry(p.pnlHistory, result) p.unrealisedPNL = result.UnrealisedPNL + p.lastUpdated = time.Now() + return err } @@ -492,7 +634,7 @@ func (p *PositionTracker) Liquidate(price decimal.Decimal, t time.Time) error { return fmt.Errorf("%w cannot liquidate from a different time. PNL snapshot %v. Liquidation request on %v Status: %v", errCannotLiquidate, latest.Time, t, p.status) } p.status = Liquidated - p.currentDirection = ClosePosition + p.latestDirection = ClosePosition p.exposure = decimal.Zero p.realisedPNL = decimal.Zero p.unrealisedPNL = decimal.Zero @@ -517,19 +659,100 @@ func (p *PositionTracker) GetLatestPNLSnapshot() (PNLResult, error) { return p.pnlHistory[len(p.pnlHistory)-1], nil } +// TrackFundingDetails sets funding rates to a position +func (p *PositionTracker) TrackFundingDetails(d *FundingRates) error { + if p == nil { + return fmt.Errorf("position tracker %w", common.ErrNilPointer) + } + if d == nil { + return fmt.Errorf("funding rate details %w", common.ErrNilPointer) + } + var err error + d.Exchange, err = checkTrackerPrerequisitesLowerExchange(d.Exchange, d.Asset, d.Pair) + if err != nil { + return err + } + p.m.Lock() + defer p.m.Unlock() + if p.exchange != d.Exchange || + p.asset != d.Asset || + !p.contractPair.Equal(d.Pair) { + return fmt.Errorf("provided details %v %v %v %w %v %v %v tracker", + d.Exchange, d.Asset, d.Pair, errDoesntMatch, p.exchange, p.asset, p.contractPair) + } + if err := common.StartEndTimeCheck(d.StartDate, d.EndDate); err != nil && !errors.Is(err, common.ErrStartEqualsEnd) { + // start end being equal is valid if only one funding rate is retrieved + return err + } + if len(p.pnlHistory) == 0 { + return fmt.Errorf("%w for timeframe %v %v %v %v-%v", ErrNoPositionsFound, p.exchange, p.asset, p.contractPair, d.StartDate, d.EndDate) + } + if p.fundingRateDetails == nil { + p.fundingRateDetails = &FundingRates{ + Exchange: d.Exchange, + Asset: d.Asset, + Pair: d.Pair, + StartDate: d.StartDate, + EndDate: d.EndDate, + LatestRate: d.LatestRate, + PredictedUpcomingRate: d.PredictedUpcomingRate, + PaymentSum: d.PaymentSum, + } + } + rates := make([]FundingRate, 0, len(d.FundingRates)) +fundingRates: + for i := range d.FundingRates { + if d.FundingRates[i].Time.Before(p.openingDate) || + (!p.closingDate.IsZero() && d.FundingRates[i].Time.After(p.closingDate)) { + continue + } + for j := range p.fundingRateDetails.FundingRates { + if !p.fundingRateDetails.FundingRates[j].Time.Equal(d.FundingRates[i].Time) { + continue + } + p.fundingRateDetails.FundingRates[j] = d.FundingRates[i] + continue fundingRates + } + rates = append(rates, d.FundingRates[i]) + } + + p.fundingRateDetails.FundingRates = append(p.fundingRateDetails.FundingRates, rates...) + p.lastUpdated = time.Now() + return nil +} + // TrackNewOrder knows how things are going for a given // futures contract func (p *PositionTracker) TrackNewOrder(d *Detail, isInitialOrder bool) error { if p == nil { return fmt.Errorf("position tracker %w", common.ErrNilPointer) } + if d == nil { + return fmt.Errorf("order %w", common.ErrNilPointer) + } + var err error + d.Exchange, err = checkTrackerPrerequisitesLowerExchange(d.Exchange, d.AssetType, d.Pair) + if err != nil { + return err + } p.m.Lock() defer p.m.Unlock() if isInitialOrder && len(p.pnlHistory) > 0 { return fmt.Errorf("%w received isInitialOrder = true with existing position", errCannotTrackInvalidParams) } if p.status.IsInactive() { - return ErrPositionClosed + for i := range p.longPositions { + if p.longPositions[i].OrderID == d.OrderID { + return nil + } + } + for i := range p.shortPositions { + if p.shortPositions[i].OrderID == d.OrderID { + return nil + } + } + // adding a new position to something that is already closed + return fmt.Errorf("%w cannot process new order %v", ErrPositionClosed, d.OrderID) } if d == nil { return ErrSubmissionIsNil @@ -538,7 +761,7 @@ func (p *PositionTracker) TrackNewOrder(d *Detail, isInitialOrder bool) error { return fmt.Errorf("%w pair '%v' received: '%v'", errOrderNotEqualToTracker, d.Pair, p.contractPair) } - if !strings.EqualFold(p.exchange, d.Exchange) { + if p.exchange != d.Exchange { return fmt.Errorf("%w exchange '%v' received: '%v'", errOrderNotEqualToTracker, d.Exchange, p.exchange) } @@ -558,7 +781,9 @@ func (p *PositionTracker) TrackNewOrder(d *Detail, isInitialOrder bool) error { errTimeUnset, d.Exchange, d.AssetType, d.Pair, d.OrderID) } if len(p.shortPositions) == 0 && len(p.longPositions) == 0 { - p.entryPrice = decimal.NewFromFloat(d.Price) + p.openingPrice = decimal.NewFromFloat(d.Price) + p.openingSize = decimal.NewFromFloat(d.Amount) + p.openingDate = d.Date } var updated bool @@ -567,12 +792,13 @@ func (p *PositionTracker) TrackNewOrder(d *Detail, isInitialOrder bool) error { continue } ord := p.shortPositions[i].Copy() - err := ord.UpdateOrderFromDetail(d) + err = ord.UpdateOrderFromDetail(d) if err != nil { return err } p.shortPositions[i] = ord updated = true + p.lastUpdated = time.Now() break } for i := range p.longPositions { @@ -580,12 +806,13 @@ func (p *PositionTracker) TrackNewOrder(d *Detail, isInitialOrder bool) error { continue } ord := p.longPositions[i].Copy() - err := ord.UpdateOrderFromDetail(d) + err = ord.UpdateOrderFromDetail(d) if err != nil { return err } p.longPositions[i] = ord updated = true + p.lastUpdated = time.Now() break } @@ -597,7 +824,6 @@ func (p *PositionTracker) TrackNewOrder(d *Detail, isInitialOrder bool) error { } } var shortSide, longSide decimal.Decimal - for i := range p.shortPositions { shortSide = shortSide.Add(decimal.NewFromFloat(p.shortPositions[i].Amount)) } @@ -607,27 +833,26 @@ func (p *PositionTracker) TrackNewOrder(d *Detail, isInitialOrder bool) error { if isInitialOrder { p.openingDirection = d.Side - p.currentDirection = d.Side + p.latestDirection = d.Side } var result *PNLResult - var err error var price, amount, leverage decimal.Decimal price = decimal.NewFromFloat(d.Price) amount = decimal.NewFromFloat(d.Amount) leverage = decimal.NewFromFloat(d.Leverage) cal := &PNLCalculatorRequest{ - Underlying: p.underlyingAsset, + Underlying: p.underlying, Asset: p.asset, OrderDirection: d.Side, Leverage: leverage, - EntryPrice: p.entryPrice, + EntryPrice: p.openingPrice, Amount: amount, CurrentPrice: price, Pair: p.contractPair, Time: d.Date, OpeningDirection: p.openingDirection, - CurrentDirection: p.currentDirection, + CurrentDirection: p.latestDirection, PNLHistory: p.pnlHistory, Exposure: p.exposure, Fee: decimal.NewFromFloat(d.Fee), @@ -690,6 +915,8 @@ func (p *PositionTracker) TrackNewOrder(d *Detail, isInitialOrder bool) error { } result.UnrealisedPNL = decimal.Zero result.RealisedPNLBeforeFees = decimal.Zero + p.closingPrice = result.Price + p.closingDate = result.Time p.status = Closed } result.Status = p.status @@ -701,14 +928,14 @@ func (p *PositionTracker) TrackNewOrder(d *Detail, isInitialOrder bool) error { switch { case longSide.GreaterThan(shortSide): - p.currentDirection = Long + p.latestDirection = Long case shortSide.GreaterThan(longSide): - p.currentDirection = Short + p.latestDirection = Short default: - p.currentDirection = ClosePosition + p.latestDirection = ClosePosition } - if p.currentDirection.IsLong() { + if p.latestDirection.IsLong() { p.exposure = longSide.Sub(shortSide) } else { p.exposure = shortSide.Sub(longSide) @@ -721,12 +948,13 @@ func (p *PositionTracker) TrackNewOrder(d *Detail, isInitialOrder bool) error { p.unrealisedPNL = decimal.Zero p.pnlHistory[len(p.pnlHistory)-1].RealisedPNL = p.realisedPNL p.pnlHistory[len(p.pnlHistory)-1].UnrealisedPNL = p.unrealisedPNL - p.pnlHistory[len(p.pnlHistory)-1].Direction = p.currentDirection + p.pnlHistory[len(p.pnlHistory)-1].Direction = p.latestDirection + p.closingDate = d.Date } else if p.exposure.IsNegative() { - if p.currentDirection.IsLong() { - p.currentDirection = Short + if p.latestDirection.IsLong() { + p.latestDirection = Short } else { - p.currentDirection = Long + p.latestDirection = Long } p.exposure = p.exposure.Abs() } @@ -854,3 +1082,29 @@ func upsertPNLEntry(pnlHistory []PNLResult, entry *PNLResult) ([]PNLResult, erro }) return pnlHistory, nil } + +// CheckFundingRatePrerequisites is a simple check to see if the requested data meets the prerequisite +func CheckFundingRatePrerequisites(getFundingData, includePredicted, includePayments bool) error { + if !getFundingData && includePredicted { + return fmt.Errorf("%w please include in request to get predicted funding rates", ErrGetFundingDataRequired) + } + if !getFundingData && includePayments { + return fmt.Errorf("%w please include in request to get predicted funding rates", ErrGetFundingDataRequired) + } + return nil +} + +// checkTrackerPrerequisitesLowerExchange is a common set of checks for futures position tracking +func checkTrackerPrerequisitesLowerExchange(exch string, item asset.Item, cp currency.Pair) (string, error) { + if exch == "" { + return "", errExchangeNameEmpty + } + exch = strings.ToLower(exch) + if !item.IsFutures() { + return exch, fmt.Errorf("%w %v %v %v", ErrNotFuturesAsset, exch, item, cp) + } + if cp.IsEmpty() { + return exch, fmt.Errorf("%w %v %v", ErrPairIsEmpty, exch, item) + } + return exch, nil +} diff --git a/exchanges/order/futures_test.go b/exchanges/order/futures_test.go index cc458650..c2a13716 100644 --- a/exchanges/order/futures_test.go +++ b/exchanges/order/futures_test.go @@ -76,25 +76,22 @@ func TestTrackNewOrder(t *testing.T) { if !errors.Is(err, nil) { t.Error(err) } - e := MultiPositionTracker{ - exchange: testExchange, - exchangePNLCalculation: &FakePNL{}, - } setup := &PositionTrackerSetup{ - Pair: pair, - Asset: item, + Exchange: exch, + Asset: item, + Pair: pair, } - f, err := e.SetupPositionTracker(setup) + c, err := SetupPositionTracker(setup) if !errors.Is(err, nil) { t.Error(err) } - err = f.TrackNewOrder(nil, false) - if !errors.Is(err, ErrSubmissionIsNil) { + err = c.TrackNewOrder(nil, false) + if !errors.Is(err, common.ErrNilPointer) { t.Error(err) } - err = f.TrackNewOrder(&Detail{}, false) - if !errors.Is(err, errOrderNotEqualToTracker) { + err = c.TrackNewOrder(&Detail{}, false) + if !errors.Is(err, errExchangeNameEmpty) { t.Error(err) } @@ -105,7 +102,7 @@ func TestTrackNewOrder(t *testing.T) { OrderID: "1", Price: 1337, } - err = f.TrackNewOrder(od, false) + err = c.TrackNewOrder(od, false) if !errors.Is(err, ErrSideIsInvalid) { t.Error(err) } @@ -113,26 +110,26 @@ func TestTrackNewOrder(t *testing.T) { od.Side = Long od.Amount = 1 od.OrderID = "2" - err = f.TrackNewOrder(od, false) + err = c.TrackNewOrder(od, false) if !errors.Is(err, errTimeUnset) { t.Error(err) } - f.openingDirection = Long + c.openingDirection = Long od.Date = time.Now() - err = f.TrackNewOrder(od, false) + err = c.TrackNewOrder(od, false) if !errors.Is(err, nil) { t.Error(err) } - if !f.entryPrice.Equal(decimal.NewFromInt(1337)) { - t.Errorf("expected 1337, received %v", f.entryPrice) + if !c.openingPrice.Equal(decimal.NewFromInt(1337)) { + t.Errorf("expected 1337, received %v", c.openingPrice) } - if len(f.longPositions) != 1 { + if len(c.longPositions) != 1 { t.Error("expected a long") } - if f.currentDirection != Long { + if c.latestDirection != Long { t.Error("expected recognition that its long") } - if f.exposure.InexactFloat64() != od.Amount { + if c.exposure.InexactFloat64() != od.Amount { t.Error("expected 1") } @@ -140,17 +137,17 @@ func TestTrackNewOrder(t *testing.T) { od.Amount = 0.4 od.Side = Short od.OrderID = "3" - err = f.TrackNewOrder(od, false) + err = c.TrackNewOrder(od, false) if !errors.Is(err, nil) { t.Error(err) } - if len(f.shortPositions) != 1 { + if len(c.shortPositions) != 1 { t.Error("expected a short") } - if f.currentDirection != Long { + if c.latestDirection != Long { t.Error("expected recognition that its long") } - if f.exposure.InexactFloat64() != 0.6 { + if c.exposure.InexactFloat64() != 0.6 { t.Error("expected 0.6") } @@ -159,56 +156,66 @@ func TestTrackNewOrder(t *testing.T) { od.Side = Short od.OrderID = "4" od.Fee = 0.1 - err = f.TrackNewOrder(od, false) + err = c.TrackNewOrder(od, false) if !errors.Is(err, nil) { t.Error(err) } - if f.currentDirection != Short { + if c.latestDirection != Short { t.Error("expected recognition that its short") } - if !f.exposure.Equal(decimal.NewFromFloat(0.2)) { - t.Errorf("expected %v received %v", 0.2, f.exposure) + if !c.exposure.Equal(decimal.NewFromFloat(0.2)) { + t.Errorf("expected %v received %v", 0.2, c.exposure) } od.Date = od.Date.Add(1) od.OrderID = "5" od.Side = Long od.Amount = 0.2 - err = f.TrackNewOrder(od, false) + err = c.TrackNewOrder(od, false) if !errors.Is(err, nil) { t.Error(err) } - if f.currentDirection != ClosePosition { - t.Errorf("expected recognition that its unknown, received '%v'", f.currentDirection) + if c.latestDirection != ClosePosition { + t.Errorf("expected recognition that its closed, received '%v'", c.latestDirection) } - if f.status != Closed { - t.Errorf("expected recognition that its closed, received '%v'", f.status) + if c.status != Closed { + t.Errorf("expected recognition that its closed, received '%v'", c.status) } - err = f.TrackNewOrder(od, false) + err = c.TrackNewOrder(od, false) + if !errors.Is(err, nil) { + t.Errorf("received %v expected %v", err, nil) + } + od.OrderID = "hellomoto" + err = c.TrackNewOrder(od, false) if !errors.Is(err, ErrPositionClosed) { - t.Error(err) + t.Errorf("received %v expected %v", err, ErrPositionClosed) } - if f.currentDirection != ClosePosition { - t.Errorf("expected recognition that its unknown, received '%v'", f.currentDirection) + if c.latestDirection != ClosePosition { + t.Errorf("expected recognition that its closed, received '%v'", c.latestDirection) } - if f.status != Closed { - t.Errorf("expected recognition that its closed, received '%v'", f.status) + if c.status != Closed { + t.Errorf("expected recognition that its closed, received '%v'", c.status) } - err = f.TrackNewOrder(od, true) + err = c.TrackNewOrder(od, true) if !errors.Is(err, errCannotTrackInvalidParams) { t.Error(err) } - f, err = e.SetupPositionTracker(setup) + c, err = SetupPositionTracker(setup) if !errors.Is(err, nil) { t.Error(err) } - err = f.TrackNewOrder(od, true) + err = c.TrackNewOrder(od, true) if !errors.Is(err, nil) { t.Error(err) } + var ptp *PositionTracker + err = ptp.TrackNewOrder(nil, false) + if !errors.Is(err, common.ErrNilPointer) { + t.Error(err) + } } func TestSetupMultiPositionTracker(t *testing.T) { @@ -263,24 +270,40 @@ func TestSetupMultiPositionTracker(t *testing.T) { } } -func TestExchangeTrackNewOrder(t *testing.T) { +func TestMultiPositionTrackerTrackNewOrder(t *testing.T) { t.Parallel() exch := testExchange item := asset.Futures pair := currency.NewPair(currency.BTC, currency.USDT) setup := &MultiPositionTrackerSetup{ - Exchange: exch, Asset: item, Pair: pair, Underlying: pair.Base, ExchangePNLCalculation: &FakePNL{}, } + _, err := SetupMultiPositionTracker(setup) + if !errors.Is(err, errExchangeNameEmpty) { + t.Error(err) + } + + setup.Exchange = testExchange resp, err := SetupMultiPositionTracker(setup) if !errors.Is(err, nil) { t.Error(err) } tt := time.Now() + err = resp.TrackNewOrder(&Detail{ + Date: tt, + AssetType: item, + Pair: pair, + Side: Short, + OrderID: "1", + Amount: 1, + }) + if !errors.Is(err, errExchangeNameEmpty) { + t.Error(err) + } err = resp.TrackNewOrder(&Detail{ Date: tt, @@ -365,6 +388,22 @@ func TestExchangeTrackNewOrder(t *testing.T) { t.Errorf("expected '2' received %v", len(resp.positions)) } + err = resp.TrackNewOrder(&Detail{ + Date: tt, + Exchange: exch, + AssetType: item, + Pair: pair, + Side: Long, + OrderID: "4", + Amount: 2, + }) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + if len(resp.positions) != 2 { + t.Errorf("expected '2' received %v", len(resp.positions)) + } + resp.positions[0].status = Closed err = resp.TrackNewOrder(&Detail{ Date: tt, @@ -378,6 +417,25 @@ func TestExchangeTrackNewOrder(t *testing.T) { if !errors.Is(err, errAssetMismatch) { t.Error(err) } + + err = resp.TrackNewOrder(nil) + if !errors.Is(err, common.ErrNilPointer) { + t.Error(err) + } + + resp = nil + err = resp.TrackNewOrder(&Detail{ + Date: tt, + Exchange: exch, + Pair: pair, + AssetType: asset.USDTMarginedFutures, + Side: Long, + OrderID: "5", + Amount: 2, + }) + if !errors.Is(err, common.ErrNilPointer) { + t.Error(err) + } } func TestSetupPositionControllerReal(t *testing.T) { @@ -410,7 +468,18 @@ func TestPositionControllerTestTrackNewOrder(t *testing.T) { err = pc.TrackNewOrder(&Detail{ Date: time.Now(), - Exchange: "hi", + Pair: currency.NewPair(currency.BTC, currency.USDT), + AssetType: asset.Futures, + Side: Long, + OrderID: "lol", + }) + if !errors.Is(err, errExchangeNameEmpty) { + t.Error(err) + } + + err = pc.TrackNewOrder(&Detail{ + Exchange: testExchange, + Date: time.Now(), Pair: currency.NewPair(currency.BTC, currency.USDT), AssetType: asset.Futures, Side: Long, @@ -419,6 +488,11 @@ func TestPositionControllerTestTrackNewOrder(t *testing.T) { if !errors.Is(err, nil) { t.Error(err) } + var pcp *PositionController + err = pcp.TrackNewOrder(nil) + if !errors.Is(err, common.ErrNilPointer) { + t.Error(err) + } } func TestGetLatestPNLSnapshot(t *testing.T) { @@ -464,6 +538,12 @@ func TestGetStats(t *testing.T) { } p.exchange = testExchange + p.fundingRateDetails = &FundingRates{ + FundingRates: []FundingRate{ + {}, + }, + } + stats = p.GetStats() if stats.Exchange != p.exchange { t.Errorf("expected '%v' received '%v'", p.exchange, stats.Exchange) @@ -471,8 +551,8 @@ func TestGetStats(t *testing.T) { p = nil stats = p.GetStats() - if len(stats.Orders) != 0 { - t.Error("expected 0") + if stats != nil { + t.Errorf("expected '%v' received '%v'", nil, stats) } } @@ -506,32 +586,39 @@ func TestGetPositionsForExchange(t *testing.T) { t.Parallel() c := &PositionController{} p := currency.NewPair(currency.BTC, currency.USDT) + + _, err := c.GetPositionsForExchange("", asset.Futures, p) + if !errors.Is(err, errExchangeNameEmpty) { + t.Errorf("received '%v' expected '%v", err, errExchangeNameEmpty) + } + pos, err := c.GetPositionsForExchange(testExchange, asset.Futures, p) - if !errors.Is(err, ErrPositionsNotLoadedForExchange) { - t.Errorf("received '%v' expected '%v", err, ErrPositionsNotLoadedForExchange) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) } if len(pos) != 0 { t.Error("expected zero") } - c.multiPositionTrackers = make(map[string]map[asset.Item]map[currency.Pair]*MultiPositionTracker) + c.multiPositionTrackers = make(map[string]map[asset.Item]map[*currency.Item]map[*currency.Item]*MultiPositionTracker) c.multiPositionTrackers[testExchange] = nil _, err = c.GetPositionsForExchange(testExchange, asset.Futures, p) - if !errors.Is(err, ErrPositionsNotLoadedForAsset) { - t.Errorf("received '%v' expected '%v", err, ErrPositionsNotLoadedForExchange) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) } - c.multiPositionTrackers[testExchange] = make(map[asset.Item]map[currency.Pair]*MultiPositionTracker) + c.multiPositionTrackers[testExchange] = make(map[asset.Item]map[*currency.Item]map[*currency.Item]*MultiPositionTracker) c.multiPositionTrackers[testExchange][asset.Futures] = nil _, err = c.GetPositionsForExchange(testExchange, asset.Futures, p) - if !errors.Is(err, ErrPositionsNotLoadedForPair) { - t.Errorf("received '%v' expected '%v", err, ErrPositionsNotLoadedForPair) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) } _, err = c.GetPositionsForExchange(testExchange, asset.Spot, p) if !errors.Is(err, ErrNotFuturesAsset) { t.Errorf("received '%v' expected '%v", err, ErrNotFuturesAsset) } - c.multiPositionTrackers[testExchange][asset.Futures] = make(map[currency.Pair]*MultiPositionTracker) - c.multiPositionTrackers[testExchange][asset.Futures][p] = &MultiPositionTracker{ + c.multiPositionTrackers[testExchange][asset.Futures] = make(map[*currency.Item]map[*currency.Item]*MultiPositionTracker) + c.multiPositionTrackers[testExchange][asset.Futures][p.Base.Item] = make(map[*currency.Item]*MultiPositionTracker) + c.multiPositionTrackers[testExchange][asset.Futures][p.Base.Item][p.Quote.Item] = &MultiPositionTracker{ exchange: testExchange, } @@ -542,7 +629,7 @@ func TestGetPositionsForExchange(t *testing.T) { if len(pos) != 0 { t.Fatal("expected zero") } - c.multiPositionTrackers[testExchange][asset.Futures][p] = &MultiPositionTracker{ + c.multiPositionTrackers[testExchange][asset.Futures][p.Base.Item][p.Quote.Item] = &MultiPositionTracker{ exchange: testExchange, positions: []*PositionTracker{ { @@ -571,32 +658,38 @@ func TestClearPositionsForExchange(t *testing.T) { t.Parallel() c := &PositionController{} p := currency.NewPair(currency.BTC, currency.USDT) - err := c.ClearPositionsForExchange(testExchange, asset.Futures, p) - if !errors.Is(err, ErrPositionsNotLoadedForExchange) { - t.Errorf("received '%v' expected '%v", err, ErrPositionsNotLoadedForExchange) + err := c.ClearPositionsForExchange("", asset.Futures, p) + if !errors.Is(err, errExchangeNameEmpty) { + t.Errorf("received '%v' expected '%v", err, errExchangeNameEmpty) } - c.multiPositionTrackers = make(map[string]map[asset.Item]map[currency.Pair]*MultiPositionTracker) + + err = c.ClearPositionsForExchange(testExchange, asset.Futures, p) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) + } + c.multiPositionTrackers = make(map[string]map[asset.Item]map[*currency.Item]map[*currency.Item]*MultiPositionTracker) c.multiPositionTrackers[testExchange] = nil err = c.ClearPositionsForExchange(testExchange, asset.Futures, p) - if !errors.Is(err, ErrPositionsNotLoadedForAsset) { - t.Errorf("received '%v' expected '%v", err, ErrPositionsNotLoadedForExchange) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) } - c.multiPositionTrackers[testExchange] = make(map[asset.Item]map[currency.Pair]*MultiPositionTracker) + c.multiPositionTrackers[testExchange] = make(map[asset.Item]map[*currency.Item]map[*currency.Item]*MultiPositionTracker) c.multiPositionTrackers[testExchange][asset.Futures] = nil err = c.ClearPositionsForExchange(testExchange, asset.Futures, p) - if !errors.Is(err, ErrPositionsNotLoadedForPair) { - t.Errorf("received '%v' expected '%v", err, ErrPositionsNotLoadedForPair) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) } err = c.ClearPositionsForExchange(testExchange, asset.Spot, p) if !errors.Is(err, ErrNotFuturesAsset) { t.Errorf("received '%v' expected '%v", err, ErrNotFuturesAsset) } - c.multiPositionTrackers[testExchange][asset.Futures] = make(map[currency.Pair]*MultiPositionTracker) - c.multiPositionTrackers[testExchange][asset.Futures][p] = &MultiPositionTracker{ + c.multiPositionTrackers[testExchange][asset.Futures] = make(map[*currency.Item]map[*currency.Item]*MultiPositionTracker) + c.multiPositionTrackers[testExchange][asset.Futures][p.Base.Item] = make(map[*currency.Item]*MultiPositionTracker) + c.multiPositionTrackers[testExchange][asset.Futures][p.Base.Item][p.Quote.Item] = &MultiPositionTracker{ exchange: testExchange, } - c.multiPositionTrackers[testExchange][asset.Futures][p] = &MultiPositionTracker{ + c.multiPositionTrackers[testExchange][asset.Futures][p.Base.Item][p.Quote.Item] = &MultiPositionTracker{ exchange: testExchange, underlying: currency.DOGE, positions: []*PositionTracker{ @@ -609,7 +702,7 @@ func TestClearPositionsForExchange(t *testing.T) { if !errors.Is(err, nil) { t.Errorf("received '%v' expected '%v", err, nil) } - if len(c.multiPositionTrackers[testExchange][asset.Futures][p].positions) != 0 { + if len(c.multiPositionTrackers[testExchange][asset.Futures][p.Base.Item][p.Quote.Item].positions) != 0 { t.Fatal("expected 0") } c = nil @@ -655,25 +748,28 @@ func TestCalculateRealisedPNL(t *testing.T) { func TestSetupPositionTracker(t *testing.T) { t.Parallel() m := &MultiPositionTracker{} - p, err := m.SetupPositionTracker(nil) - if !errors.Is(err, errExchangeNameEmpty) { - t.Errorf("received '%v' expected '%v", err, errExchangeNameEmpty) - } - if p != nil { - t.Error("expected nil") - } - m.exchange = testExchange - p, err = m.SetupPositionTracker(nil) + p, err := SetupPositionTracker(nil) if !errors.Is(err, errNilSetup) { t.Errorf("received '%v' expected '%v", err, errNilSetup) } if p != nil { t.Error("expected nil") } - - p, err = m.SetupPositionTracker(&PositionTrackerSetup{ + m.exchange = testExchange + p, err = SetupPositionTracker(&PositionTrackerSetup{ Asset: asset.Spot, }) + if !errors.Is(err, errExchangeNameEmpty) { + t.Errorf("received '%v' expected '%v", err, errExchangeNameEmpty) + } + if p != nil { + t.Error("expected nil") + } + + p, err = SetupPositionTracker(&PositionTrackerSetup{ + Exchange: testExchange, + Asset: asset.Spot, + }) if !errors.Is(err, ErrNotFuturesAsset) { t.Errorf("received '%v' expected '%v", err, ErrNotFuturesAsset) } @@ -681,8 +777,9 @@ func TestSetupPositionTracker(t *testing.T) { t.Error("expected nil") } - p, err = m.SetupPositionTracker(&PositionTrackerSetup{ - Asset: asset.Futures, + p, err = SetupPositionTracker(&PositionTrackerSetup{ + Exchange: testExchange, + Asset: asset.Futures, }) if !errors.Is(err, ErrPairIsEmpty) { t.Errorf("received '%v' expected '%v", err, ErrPairIsEmpty) @@ -692,9 +789,10 @@ func TestSetupPositionTracker(t *testing.T) { } cp := currency.NewPair(currency.BTC, currency.USDT) - p, err = m.SetupPositionTracker(&PositionTrackerSetup{ - Asset: asset.Futures, - Pair: cp, + p, err = SetupPositionTracker(&PositionTrackerSetup{ + Exchange: testExchange, + Asset: asset.Futures, + Pair: cp, }) if !errors.Is(err, nil) { t.Fatalf("received '%v' expected '%v", err, nil) @@ -706,7 +804,8 @@ func TestSetupPositionTracker(t *testing.T) { t.Error("expected test") } - _, err = m.SetupPositionTracker(&PositionTrackerSetup{ + _, err = SetupPositionTracker(&PositionTrackerSetup{ + Exchange: testExchange, Asset: asset.Futures, Pair: cp, UseExchangePNLCalculation: true, @@ -715,10 +814,12 @@ func TestSetupPositionTracker(t *testing.T) { t.Errorf("received '%v' expected '%v", err, ErrNilPNLCalculator) } m.exchangePNLCalculation = &PNLCalculator{} - p, err = m.SetupPositionTracker(&PositionTrackerSetup{ + p, err = SetupPositionTracker(&PositionTrackerSetup{ + Exchange: testExchange, Asset: asset.Futures, Pair: cp, UseExchangePNLCalculation: true, + PNLCalculator: &PNLCalculator{}, }) if !errors.Is(err, nil) { t.Errorf("received '%v' expected '%v", err, nil) @@ -776,9 +877,14 @@ func TestUpdateOpenPositionUnrealisedPNL(t *testing.T) { t.Parallel() pc := SetupPositionController() - _, err := pc.UpdateOpenPositionUnrealisedPNL("hi", asset.Futures, currency.NewPair(currency.BTC, currency.USDT), 2, time.Now()) - if !errors.Is(err, ErrPositionsNotLoadedForExchange) { - t.Errorf("received '%v' expected '%v", err, ErrPositionsNotLoadedForExchange) + _, err := pc.UpdateOpenPositionUnrealisedPNL("", asset.Futures, currency.NewPair(currency.BTC, currency.USDT), 2, time.Now()) + if !errors.Is(err, errExchangeNameEmpty) { + t.Errorf("received '%v' expected '%v", err, errExchangeNameEmpty) + } + + _, err = pc.UpdateOpenPositionUnrealisedPNL("hi", asset.Futures, currency.NewPair(currency.BTC, currency.USDT), 2, time.Now()) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) } _, err = pc.UpdateOpenPositionUnrealisedPNL("hi", asset.Spot, currency.NewPair(currency.BTC, currency.USDT), 2, time.Now()) @@ -801,18 +907,18 @@ func TestUpdateOpenPositionUnrealisedPNL(t *testing.T) { } _, err = pc.UpdateOpenPositionUnrealisedPNL("hi2", asset.Futures, currency.NewPair(currency.BTC, currency.USDT), 2, time.Now()) - if !errors.Is(err, ErrPositionsNotLoadedForExchange) { - t.Errorf("received '%v' expected '%v", err, ErrPositionsNotLoadedForExchange) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) } _, err = pc.UpdateOpenPositionUnrealisedPNL("hi", asset.PerpetualSwap, currency.NewPair(currency.BTC, currency.USDT), 2, time.Now()) - if !errors.Is(err, ErrPositionsNotLoadedForAsset) { - t.Errorf("received '%v' expected '%v", err, ErrPositionsNotLoadedForAsset) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) } _, err = pc.UpdateOpenPositionUnrealisedPNL("hi", asset.Futures, currency.NewPair(currency.BTC, currency.DOGE), 2, time.Now()) - if !errors.Is(err, ErrPositionsNotLoadedForPair) { - t.Errorf("received '%v' expected '%v", err, ErrPositionsNotLoadedForPair) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) } pnl, err := pc.UpdateOpenPositionUnrealisedPNL("hi", asset.Futures, currency.NewPair(currency.BTC, currency.USDT), 2, time.Now()) @@ -823,8 +929,8 @@ func TestUpdateOpenPositionUnrealisedPNL(t *testing.T) { t.Errorf("received '%v' expected '%v", pnl, 1) } - pc = nil - _, err = pc.UpdateOpenPositionUnrealisedPNL("hi", asset.Futures, currency.NewPair(currency.BTC, currency.USDT), 2, time.Now()) + var nilPC *PositionController + _, err = nilPC.UpdateOpenPositionUnrealisedPNL("hi", asset.Futures, currency.NewPair(currency.BTC, currency.USDT), 2, time.Now()) if !errors.Is(err, common.ErrNilPointer) { t.Errorf("received '%v' expected '%v", err, common.ErrNilPointer) } @@ -832,50 +938,55 @@ func TestUpdateOpenPositionUnrealisedPNL(t *testing.T) { func TestSetCollateralCurrency(t *testing.T) { t.Parallel() - var expectedError = ErrNotFuturesAsset + var expectedError = errExchangeNameEmpty pc := SetupPositionController() - err := pc.SetCollateralCurrency("hi", asset.Spot, currency.Pair{}, currency.Code{}) + err := pc.SetCollateralCurrency("", asset.Spot, currency.Pair{}, currency.Code{}) if !errors.Is(err, expectedError) { t.Errorf("received '%v' expected '%v", err, expectedError) } - cp := currency.NewPair(currency.BTC, currency.USDT) - pc.multiPositionTrackers = make(map[string]map[asset.Item]map[currency.Pair]*MultiPositionTracker) - err = pc.SetCollateralCurrency("hi", asset.Futures, cp, currency.DOGE) - expectedError = ErrPositionsNotLoadedForExchange + + expectedError = ErrNotFuturesAsset + err = pc.SetCollateralCurrency("hi", asset.Spot, currency.Pair{}, currency.Code{}) + if !errors.Is(err, expectedError) { + t.Errorf("received '%v' expected '%v", err, expectedError) + } + p := currency.NewPair(currency.BTC, currency.USDT) + pc.multiPositionTrackers = make(map[string]map[asset.Item]map[*currency.Item]map[*currency.Item]*MultiPositionTracker) + err = pc.SetCollateralCurrency("hi", asset.Futures, p, currency.DOGE) + expectedError = ErrPositionNotFound if !errors.Is(err, expectedError) { t.Fatalf("received '%v' expected '%v", err, expectedError) } - pc.multiPositionTrackers["hi"] = make(map[asset.Item]map[currency.Pair]*MultiPositionTracker) - err = pc.SetCollateralCurrency("hi", asset.Futures, cp, currency.DOGE) - expectedError = ErrPositionsNotLoadedForAsset + pc.multiPositionTrackers["hi"] = make(map[asset.Item]map[*currency.Item]map[*currency.Item]*MultiPositionTracker) + err = pc.SetCollateralCurrency("hi", asset.Futures, p, currency.DOGE) if !errors.Is(err, expectedError) { t.Fatalf("received '%v' expected '%v", err, expectedError) } - pc.multiPositionTrackers["hi"][asset.Futures] = make(map[currency.Pair]*MultiPositionTracker) - err = pc.SetCollateralCurrency("hi", asset.Futures, cp, currency.DOGE) - expectedError = ErrPositionsNotLoadedForPair + pc.multiPositionTrackers["hi"][asset.Futures] = make(map[*currency.Item]map[*currency.Item]*MultiPositionTracker) + err = pc.SetCollateralCurrency("hi", asset.Futures, p, currency.DOGE) if !errors.Is(err, expectedError) { t.Fatalf("received '%v' expected '%v", err, expectedError) } - pc.multiPositionTrackers["hi"][asset.Futures][cp] = nil - err = pc.SetCollateralCurrency("hi", asset.Futures, cp, currency.DOGE) - expectedError = common.ErrNilPointer + expectedError = ErrPositionNotFound + pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item] = make(map[*currency.Item]*MultiPositionTracker) + pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item] = nil + err = pc.SetCollateralCurrency("hi", asset.Futures, p, currency.DOGE) if !errors.Is(err, expectedError) { t.Fatalf("received '%v' expected '%v", err, expectedError) } - pc.multiPositionTrackers["hi"][asset.Futures][cp] = &MultiPositionTracker{ + pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item] = &MultiPositionTracker{ exchange: "hi", asset: asset.Futures, - pair: cp, + pair: p, orderPositions: make(map[string]*PositionTracker), } err = pc.TrackNewOrder(&Detail{ Date: time.Now(), Exchange: "hi", - Pair: cp, + Pair: p, AssetType: asset.Futures, Side: Long, OrderID: "lol", @@ -886,22 +997,22 @@ func TestSetCollateralCurrency(t *testing.T) { t.Fatalf("received '%v' expected '%v", err, nil) } - err = pc.SetCollateralCurrency("hi", asset.Futures, cp, currency.DOGE) + err = pc.SetCollateralCurrency("hi", asset.Futures, p, currency.DOGE) expectedError = nil if !errors.Is(err, expectedError) { t.Fatalf("received '%v' expected '%v", err, expectedError) } - if !pc.multiPositionTrackers["hi"][asset.Futures][cp].collateralCurrency.Equal(currency.DOGE) { - t.Errorf("received '%v' expected '%v'", pc.multiPositionTrackers["hi"][asset.Futures][cp].collateralCurrency, currency.DOGE) + if !pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item].collateralCurrency.Equal(currency.DOGE) { + t.Errorf("received '%v' expected '%v'", pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item].collateralCurrency, currency.DOGE) } - if !pc.multiPositionTrackers["hi"][asset.Futures][cp].positions[0].collateralCurrency.Equal(currency.DOGE) { - t.Errorf("received '%v' expected '%v'", pc.multiPositionTrackers["hi"][asset.Futures][cp].positions[0].collateralCurrency, currency.DOGE) + if !pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item].positions[0].collateralCurrency.Equal(currency.DOGE) { + t.Errorf("received '%v' expected '%v'", pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item].positions[0].collateralCurrency, currency.DOGE) } - pc = nil - err = pc.SetCollateralCurrency("hi", asset.Spot, currency.Pair{}, currency.Code{}) + var nilPC *PositionController + err = nilPC.SetCollateralCurrency("hi", asset.Spot, currency.Pair{}, currency.Code{}) expectedError = common.ErrNilPointer if !errors.Is(err, expectedError) { t.Errorf("received '%v' expected '%v", err, expectedError) @@ -912,12 +1023,12 @@ func TestMPTUpdateOpenPositionUnrealisedPNL(t *testing.T) { t.Parallel() var err, expectedError error expectedError = nil - cp := currency.NewPair(currency.BTC, currency.USDT) + p := currency.NewPair(currency.BTC, currency.USDT) pc := SetupPositionController() err = pc.TrackNewOrder(&Detail{ Date: time.Now(), Exchange: "hi", - Pair: cp, + Pair: p, AssetType: asset.Futures, Side: Long, OrderID: "lol", @@ -927,7 +1038,8 @@ func TestMPTUpdateOpenPositionUnrealisedPNL(t *testing.T) { if !errors.Is(err, expectedError) { t.Fatalf("received '%v' expected '%v", err, expectedError) } - result, err := pc.multiPositionTrackers["hi"][asset.Futures][cp].UpdateOpenPositionUnrealisedPNL(1337, time.Now()) + + result, err := pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item].UpdateOpenPositionUnrealisedPNL(1337, time.Now()) if !errors.Is(err, expectedError) { t.Fatalf("received '%v' expected '%v", err, expectedError) } @@ -936,15 +1048,15 @@ func TestMPTUpdateOpenPositionUnrealisedPNL(t *testing.T) { } expectedError = ErrPositionClosed - pc.multiPositionTrackers["hi"][asset.Futures][cp].positions[0].status = Closed - _, err = pc.multiPositionTrackers["hi"][asset.Futures][cp].UpdateOpenPositionUnrealisedPNL(1337, time.Now()) + pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item].positions[0].status = Closed + _, err = pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item].UpdateOpenPositionUnrealisedPNL(1337, time.Now()) if !errors.Is(err, expectedError) { t.Fatalf("received '%v' expected '%v", err, expectedError) } - expectedError = ErrPositionsNotLoadedForPair - pc.multiPositionTrackers["hi"][asset.Futures][cp].positions = nil - _, err = pc.multiPositionTrackers["hi"][asset.Futures][cp].UpdateOpenPositionUnrealisedPNL(1337, time.Now()) + expectedError = ErrPositionNotFound + pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item].positions = nil + _, err = pc.multiPositionTrackers["hi"][asset.Futures][p.Base.Item][p.Quote.Item].UpdateOpenPositionUnrealisedPNL(1337, time.Now()) if !errors.Is(err, expectedError) { t.Fatalf("received '%v' expected '%v", err, expectedError) } @@ -965,7 +1077,7 @@ func TestMPTLiquidate(t *testing.T) { } err = e.Liquidate(decimal.Zero, time.Time{}) - if !errors.Is(err, ErrPositionsNotLoadedForPair) { + if !errors.Is(err, ErrPositionNotFound) { t.Error(err) } @@ -973,7 +1085,13 @@ func TestMPTLiquidate(t *testing.T) { Pair: pair, Asset: item, } - _, err = e.SetupPositionTracker(setup) + _, err = SetupPositionTracker(setup) + if !errors.Is(err, errExchangeNameEmpty) { + t.Error(err) + } + + setup.Exchange = "exch" + _, err = SetupPositionTracker(setup) if !errors.Is(err, nil) { t.Error(err) } @@ -1071,3 +1189,385 @@ func TestPositionLiquidate(t *testing.T) { t.Error(err) } } + +func TestGetOpenPosition(t *testing.T) { + t.Parallel() + pc := SetupPositionController() + cp := currency.NewPair(currency.BTC, currency.PERP) + tn := time.Now() + + _, err := pc.GetOpenPosition("", asset.Futures, cp) + if !errors.Is(err, errExchangeNameEmpty) { + t.Errorf("received '%v' expected '%v", err, errExchangeNameEmpty) + } + + _, err = pc.GetOpenPosition(testExchange, asset.Futures, cp) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) + } + + err = pc.TrackNewOrder(&Detail{ + Date: tn, + Exchange: testExchange, + Pair: cp, + AssetType: asset.Futures, + Side: Long, + OrderID: "lol", + Price: 1337, + Amount: 1337, + }) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + _, err = pc.GetOpenPosition(testExchange, asset.Futures, cp) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } +} + +func TestGetAllOpenPositions(t *testing.T) { + t.Parallel() + pc := SetupPositionController() + + _, err := pc.GetAllOpenPositions() + if !errors.Is(err, ErrNoPositionsFound) { + t.Errorf("received '%v' expected '%v", err, ErrNoPositionsFound) + } + + cp := currency.NewPair(currency.BTC, currency.PERP) + tn := time.Now() + err = pc.TrackNewOrder(&Detail{ + Date: tn, + Exchange: testExchange, + Pair: cp, + AssetType: asset.Futures, + Side: Long, + OrderID: "lol", + Price: 1337, + Amount: 1337, + }) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + _, err = pc.GetAllOpenPositions() + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } +} + +func TestPCTrackFundingDetails(t *testing.T) { + t.Parallel() + pc := SetupPositionController() + err := pc.TrackFundingDetails(nil) + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received '%v' expected '%v", err, common.ErrNilPointer) + } + + p := currency.NewPair(currency.BTC, currency.PERP) + rates := &FundingRates{ + Asset: asset.Futures, + Pair: p, + } + err = pc.TrackFundingDetails(rates) + if !errors.Is(err, errExchangeNameEmpty) { + t.Errorf("received '%v' expected '%v", err, errExchangeNameEmpty) + } + + rates.Exchange = testExchange + err = pc.TrackFundingDetails(rates) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) + } + + tn := time.Now() + err = pc.TrackNewOrder(&Detail{ + Date: tn, + Exchange: testExchange, + Pair: p, + AssetType: asset.Futures, + Side: Long, + OrderID: "lol", + Price: 1337, + Amount: 1337, + }) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + + rates.StartDate = tn.Add(-time.Hour) + rates.EndDate = tn + rates.FundingRates = []FundingRate{ + { + Time: tn, + Rate: decimal.NewFromInt(1337), + Payment: decimal.NewFromInt(1337), + }, + } + pc.multiPositionTrackers[testExchange][asset.Futures][p.Base.Item][p.Quote.Item].orderPositions["lol"].openingDate = tn.Add(-time.Hour) + pc.multiPositionTrackers[testExchange][asset.Futures][p.Base.Item][p.Quote.Item].orderPositions["lol"].lastUpdated = tn + err = pc.TrackFundingDetails(rates) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } +} + +func TestMPTTrackFundingDetails(t *testing.T) { + t.Parallel() + mpt := &MultiPositionTracker{ + orderPositions: make(map[string]*PositionTracker), + } + + err := mpt.TrackFundingDetails(nil) + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received '%v' expected '%v", err, common.ErrNilPointer) + } + + cp := currency.NewPair(currency.BTC, currency.PERP) + rates := &FundingRates{ + Asset: asset.Futures, + Pair: cp, + } + err = mpt.TrackFundingDetails(rates) + if !errors.Is(err, errExchangeNameEmpty) { + t.Errorf("received '%v' expected '%v", err, errExchangeNameEmpty) + } + + mpt.exchange = testExchange + rates = &FundingRates{ + Exchange: testExchange, + Asset: asset.Futures, + Pair: cp, + } + err = mpt.TrackFundingDetails(rates) + if !errors.Is(err, errAssetMismatch) { + t.Errorf("received '%v' expected '%v", err, errAssetMismatch) + } + + mpt.asset = rates.Asset + mpt.pair = cp + err = mpt.TrackFundingDetails(rates) + if !errors.Is(err, ErrPositionNotFound) { + t.Errorf("received '%v' expected '%v", err, ErrPositionNotFound) + } + + tn := time.Now() + err = mpt.TrackNewOrder(&Detail{ + Date: tn, + Exchange: testExchange, + Pair: cp, + AssetType: asset.Futures, + Side: Long, + OrderID: "lol", + Price: 1337, + Amount: 1337, + }) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + + rates.StartDate = tn.Add(-time.Hour) + rates.EndDate = tn + rates.FundingRates = []FundingRate{ + { + Time: tn, + Rate: decimal.NewFromInt(1337), + Payment: decimal.NewFromInt(1337), + }, + } + mpt.orderPositions["lol"].openingDate = tn.Add(-time.Hour) + mpt.orderPositions["lol"].lastUpdated = tn + rates.Exchange = "lol" + err = mpt.TrackFundingDetails(rates) + if !errors.Is(err, errExchangeNameMismatch) { + t.Errorf("received '%v' expected '%v", err, errExchangeNameMismatch) + } +} + +func TestPTTrackFundingDetails(t *testing.T) { + t.Parallel() + p := &PositionTracker{} + err := p.TrackFundingDetails(nil) + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received '%v' expected '%v", err, common.ErrNilPointer) + } + + cp := currency.NewPair(currency.BTC, currency.PERP) + rates := &FundingRates{ + Exchange: testExchange, + Asset: asset.Futures, + Pair: cp, + } + err = p.TrackFundingDetails(rates) + if !errors.Is(err, errDoesntMatch) { + t.Errorf("received '%v' expected '%v", err, errDoesntMatch) + } + + p.exchange = testExchange + p.asset = asset.Futures + p.contractPair = cp + err = p.TrackFundingDetails(rates) + if !errors.Is(err, common.ErrDateUnset) { + t.Errorf("received '%v' expected '%v", err, common.ErrDateUnset) + } + + rates.StartDate = time.Now().Add(-time.Hour) + rates.EndDate = time.Now() + p.openingDate = rates.StartDate + err = p.TrackFundingDetails(rates) + if !errors.Is(err, ErrNoPositionsFound) { + t.Errorf("received '%v' expected '%v", err, ErrNoPositionsFound) + } + + p.pnlHistory = append(p.pnlHistory, PNLResult{ + Time: rates.EndDate, + UnrealisedPNL: decimal.NewFromInt(1337), + RealisedPNLBeforeFees: decimal.NewFromInt(1337), + Price: decimal.NewFromInt(1337), + Exposure: decimal.NewFromInt(1337), + Fee: decimal.NewFromInt(1337), + }) + err = p.TrackFundingDetails(rates) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + + rates.FundingRates = []FundingRate{ + { + Time: rates.StartDate, + Rate: decimal.NewFromInt(1337), + Payment: decimal.NewFromInt(1337), + }, + } + err = p.TrackFundingDetails(rates) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + err = p.TrackFundingDetails(rates) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + + rates.StartDate = rates.StartDate.Add(-time.Hour) + err = p.TrackFundingDetails(rates) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + + rates.Exchange = "" + err = p.TrackFundingDetails(rates) + if !errors.Is(err, errExchangeNameEmpty) { + t.Errorf("received '%v' expected '%v", err, errExchangeNameEmpty) + } + + p = nil + err = p.TrackFundingDetails(rates) + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received '%v' expected '%v", err, common.ErrNilPointer) + } +} + +func TestAreFundingRatePrerequisitesMet(t *testing.T) { + t.Parallel() + err := CheckFundingRatePrerequisites(false, false, false) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + + err = CheckFundingRatePrerequisites(true, false, false) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + + err = CheckFundingRatePrerequisites(true, true, false) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + + err = CheckFundingRatePrerequisites(true, true, true) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + + err = CheckFundingRatePrerequisites(true, false, true) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + + err = CheckFundingRatePrerequisites(false, false, true) + if !errors.Is(err, ErrGetFundingDataRequired) { + t.Errorf("received '%v' expected '%v", err, ErrGetFundingDataRequired) + } + + err = CheckFundingRatePrerequisites(false, true, true) + if !errors.Is(err, ErrGetFundingDataRequired) { + t.Errorf("received '%v' expected '%v", err, ErrGetFundingDataRequired) + } + + err = CheckFundingRatePrerequisites(false, true, false) + if !errors.Is(err, ErrGetFundingDataRequired) { + t.Errorf("received '%v' expected '%v", err, ErrGetFundingDataRequired) + } +} + +func TestLastUpdated(t *testing.T) { + t.Parallel() + p := &PositionController{} + tm, err := p.LastUpdated() + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + if !tm.IsZero() { + t.Errorf("received '%v' expected '%v", tm, time.Time{}) + } + p.updated = time.Now() + tm, err = p.LastUpdated() + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + if !tm.Equal(p.updated) { + t.Errorf("received '%v' expected '%v", tm, p.updated) + } + p = nil + _, err = p.LastUpdated() + if !errors.Is(err, common.ErrNilPointer) { + t.Errorf("received '%v' expected '%v", err, common.ErrNilPointer) + } +} + +func TestGetCurrencyForRealisedPNL(t *testing.T) { + p := PNLCalculator{} + code, a, err := p.GetCurrencyForRealisedPNL(asset.Spot, currency.NewPair(currency.DOGE, currency.XRP)) + if err != nil { + t.Error(err) + } + if !code.Equal(currency.DOGE) { + t.Errorf("received '%v' expected '%v", code, currency.DOGE) + } + if a != asset.Spot { + t.Errorf("received '%v' expected '%v", a, asset.Spot) + } +} + +func TestCheckTrackerPrerequisitesLowerExchange(t *testing.T) { + t.Parallel() + _, err := checkTrackerPrerequisitesLowerExchange("", asset.Spot, currency.EMPTYPAIR) + if !errors.Is(err, errExchangeNameEmpty) { + t.Errorf("received '%v' expected '%v", err, errExchangeNameEmpty) + } + upperExch := "IM UPPERCASE" + _, err = checkTrackerPrerequisitesLowerExchange(upperExch, asset.Spot, currency.EMPTYPAIR) + if !errors.Is(err, ErrNotFuturesAsset) { + t.Errorf("received '%v' expected '%v", err, ErrNotFuturesAsset) + } + _, err = checkTrackerPrerequisitesLowerExchange(upperExch, asset.Futures, currency.EMPTYPAIR) + if !errors.Is(err, ErrPairIsEmpty) { + t.Errorf("received '%v' expected '%v", err, ErrPairIsEmpty) + } + lowerExch, err := checkTrackerPrerequisitesLowerExchange(upperExch, asset.Futures, currency.NewPair(currency.BTC, currency.USDT)) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expected '%v", err, nil) + } + if lowerExch != "im uppercase" { + t.Error("expected lowercase") + } +} diff --git a/exchanges/order/futures_types.go b/exchanges/order/futures_types.go index 267ef8db..12d6faf7 100644 --- a/exchanges/order/futures_types.go +++ b/exchanges/order/futures_types.go @@ -14,12 +14,6 @@ import ( var ( // ErrPositionClosed returned when attempting to amend a closed position ErrPositionClosed = errors.New("the position is closed") - // ErrPositionsNotLoadedForExchange returned when no position data exists for an exchange - ErrPositionsNotLoadedForExchange = errors.New("no positions loaded for exchange") - // ErrPositionsNotLoadedForAsset returned when no position data exists for an asset - ErrPositionsNotLoadedForAsset = errors.New("no positions loaded for asset") - // ErrPositionsNotLoadedForPair returned when no position data exists for a pair - ErrPositionsNotLoadedForPair = errors.New("no positions loaded for pair") // ErrNilPNLCalculator is raised when pnl calculation is requested for // an exchange, but the fields are not set properly ErrNilPNLCalculator = errors.New("nil pnl calculator received") @@ -32,8 +26,17 @@ var ( ErrUSDValueRequired = errors.New("USD value required") // ErrOfflineCalculationSet is raised when collateral calculation is set to be offline, yet is attempted online ErrOfflineCalculationSet = errors.New("offline calculation set") + // ErrPositionNotFound is raised when a position is not found + ErrPositionNotFound = errors.New("position not found") + // ErrNotPerpetualFuture is returned when a currency is not a perpetual future + ErrNotPerpetualFuture = errors.New("not a perpetual future") + // ErrNoPositionsFound returned when there is no positions returned + ErrNoPositionsFound = errors.New("no positions found") + // ErrGetFundingDataRequired is returned when requesting funding rate data without the prerequisite + ErrGetFundingDataRequired = errors.New("getfundingdata is a prerequisite") errExchangeNameEmpty = errors.New("exchange name empty") + errExchangeNameMismatch = errors.New("exchange name mismatch") errTimeUnset = errors.New("time unset") errMissingPNLCalculationFunctions = errors.New("futures tracker requires exchange PNL calculation functions") errOrderNotEqualToTracker = errors.New("order does not match tracker data") @@ -44,6 +47,7 @@ var ( errNilOrder = errors.New("nil order received") errNoPNLHistory = errors.New("no pnl history") errCannotCalculateUnrealisedPNL = errors.New("cannot calculate unrealised PNL") + errDoesntMatch = errors.New("doesn't match") errCannotTrackInvalidParams = errors.New("parameters set incorrectly, cannot track") ) @@ -54,15 +58,6 @@ type PNLCalculation interface { GetCurrencyForRealisedPNL(realisedAsset asset.Item, realisedPair currency.Pair) (currency.Code, asset.Item, error) } -// CollateralManagement is an interface that allows -// multiple ways of calculating the size of collateral -// on an exchange -type CollateralManagement interface { - GetCollateralCurrencyForContract(asset.Item, currency.Pair) (currency.Code, asset.Item, error) - ScaleCollateral(ctx context.Context, calculator *CollateralCalculator) (*CollateralByCurrency, error) - CalculateTotalCollateral(context.Context, *TotalCollateralCalculator) (*TotalCollateralResponse, error) -} - // TotalCollateralResponse holds all collateral type TotalCollateralResponse struct { CollateralCurrency currency.Code @@ -129,7 +124,8 @@ type UsedCollateralBreakdown struct { // the position controller and its all tracked happily type PositionController struct { m sync.Mutex - multiPositionTrackers map[string]map[asset.Item]map[currency.Pair]*MultiPositionTracker + multiPositionTrackers map[string]map[asset.Item]map[*currency.Item]map[*currency.Item]*MultiPositionTracker + updated time.Time } // MultiPositionTracker will track the performance of @@ -173,39 +169,47 @@ type MultiPositionTrackerSetup struct { // completely within this position tracker, however, can still provide a good // timeline of performance until the position is closed type PositionTracker struct { - m sync.Mutex - exchange string - asset asset.Item - contractPair currency.Pair - underlyingAsset currency.Code - collateralCurrency currency.Code - exposure decimal.Decimal - currentDirection Side - openingDirection Side - status Status - unrealisedPNL decimal.Decimal - realisedPNL decimal.Decimal - shortPositions []Detail - longPositions []Detail - pnlHistory []PNLResult - entryPrice decimal.Decimal - closingPrice decimal.Decimal - offlinePNLCalculation bool - PNLCalculation - latestPrice decimal.Decimal + m sync.Mutex useExchangePNLCalculation bool + collateralCurrency currency.Code + offlinePNLCalculation bool + PNLCalculation + exchange string + asset asset.Item + contractPair currency.Pair + underlying currency.Code + exposure decimal.Decimal + openingDirection Side + openingPrice decimal.Decimal + openingSize decimal.Decimal + openingDate time.Time + latestDirection Side + latestPrice decimal.Decimal + lastUpdated time.Time + unrealisedPNL decimal.Decimal + realisedPNL decimal.Decimal + status Status + closingPrice decimal.Decimal + closingDate time.Time + shortPositions []Detail + longPositions []Detail + pnlHistory []PNLResult + fundingRateDetails *FundingRates } // PositionTrackerSetup contains all required fields to // setup a position tracker type PositionTrackerSetup struct { + Exchange string + Asset asset.Item Pair currency.Pair EntryPrice decimal.Decimal Underlying currency.Code CollateralCurrency currency.Code - Asset asset.Item Side Side UseExchangePNLCalculation bool + OfflineCalculation bool + PNLCalculator PNLCalculation } // TotalCollateralCalculator holds many collateral calculators @@ -277,22 +281,111 @@ type PNLResult struct { IsOrder bool } -// PositionStats is a basic holder -// for position information -type PositionStats struct { +// Position is a basic holder for position information +type Position struct { Exchange string Asset asset.Item Pair currency.Pair Underlying currency.Code CollateralCurrency currency.Code - Orders []Detail RealisedPNL decimal.Decimal UnrealisedPNL decimal.Decimal - Exposure decimal.Decimal - LatestDirection Side Status Status - OpeningDirection Side + OpeningDate time.Time OpeningPrice decimal.Decimal + OpeningSize decimal.Decimal + OpeningDirection Side LatestPrice decimal.Decimal + LatestSize decimal.Decimal + LatestDirection Side + LastUpdated time.Time + CloseDate time.Time + Orders []Detail PNLHistory []PNLResult + FundingRates FundingRates +} + +// PositionSummaryRequest is used to request a summary of an open position +type PositionSummaryRequest struct { + Asset asset.Item + Pair currency.Pair + + // offline calculation requirements below + CalculateOffline bool + Direction Side + FreeCollateral decimal.Decimal + TotalCollateral decimal.Decimal + OpeningPrice decimal.Decimal + CurrentPrice decimal.Decimal + OpeningSize decimal.Decimal + CurrentSize decimal.Decimal + CollateralUsed decimal.Decimal + NotionalPrice decimal.Decimal + Leverage decimal.Decimal + MaxLeverageForAccount decimal.Decimal + TotalAccountValue decimal.Decimal + TotalOpenPositionNotional decimal.Decimal +} + +// PositionSummary returns basic details on an open position +type PositionSummary struct { + MaintenanceMarginRequirement decimal.Decimal + InitialMarginRequirement decimal.Decimal + EstimatedLiquidationPrice decimal.Decimal + CollateralUsed decimal.Decimal + MarkPrice decimal.Decimal + CurrentSize decimal.Decimal + BreakEvenPrice decimal.Decimal + AverageOpenPrice decimal.Decimal + RecentPNL decimal.Decimal + MarginFraction decimal.Decimal + FreeCollateral decimal.Decimal + TotalCollateral decimal.Decimal +} + +// FundingRatesRequest is used to request funding rate details for a position +type FundingRatesRequest struct { + Asset asset.Item + Pairs currency.Pairs + StartDate time.Time + EndDate time.Time + IncludePayments bool + IncludePredictedRate bool +} + +// FundingRates is used to return funding rate details for a position +type FundingRates struct { + Exchange string + Asset asset.Item + Pair currency.Pair + StartDate time.Time + EndDate time.Time + LatestRate FundingRate + PredictedUpcomingRate FundingRate + FundingRates []FundingRate + PaymentSum decimal.Decimal +} + +// FundingRate holds details for an individual funding rate +type FundingRate struct { + Time time.Time + Rate decimal.Decimal + Payment decimal.Decimal +} + +// PositionDetails are used to track open positions +// in the order manager +type PositionDetails struct { + Exchange string + Asset asset.Item + Pair currency.Pair + Orders []Detail +} + +// PositionsRequest defines the request to +// retrieve futures position data +type PositionsRequest struct { + Asset asset.Item + Pairs currency.Pairs + StartDate time.Time } diff --git a/gctrpc/buf.lock b/gctrpc/buf.lock index 80ce3428..97e4a75f 100644 --- a/gctrpc/buf.lock +++ b/gctrpc/buf.lock @@ -4,7 +4,7 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: 2646de1347094058879360e68cb2ccc6 + commit: 80720a488c9a414bb8d4a9f811084989 - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway diff --git a/gctrpc/rpc.pb.go b/gctrpc/rpc.pb.go index 244cd43b..1120662b 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.28.0 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: rpc.proto @@ -3199,8 +3199,8 @@ type OrderDetails struct { 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 int64 `protobuf:"varint,9,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` - UpdateTime int64 `protobuf:"varint,10,opt,name=update_time,json=updateTime,proto3" json:"update_time,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"` @@ -3298,18 +3298,18 @@ func (x *OrderDetails) GetOrderType() string { return "" } -func (x *OrderDetails) GetCreationTime() int64 { +func (x *OrderDetails) GetCreationTime() string { if x != nil { return x.CreationTime } - return 0 + return "" } -func (x *OrderDetails) GetUpdateTime() int64 { +func (x *OrderDetails) GetUpdateTime() string { if x != nil { return x.UpdateTime } - return 0 + return "" } func (x *OrderDetails) GetStatus() string { @@ -10860,26 +10860,735 @@ func (x *CurrencyState) GetTradingEnabled() bool { return false } +type FundingRate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + 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"` +} + +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) + } +} + +func (x *FundingRate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FundingRate) ProtoMessage() {} + +func (x *FundingRate) ProtoReflect() protoreflect.Message { + mi := &file_rpc_proto_msgTypes[170] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FundingRate.ProtoReflect.Descriptor instead. +func (*FundingRate) Descriptor() ([]byte, []int) { + return file_rpc_proto_rawDescGZIP(), []int{170} +} + +func (x *FundingRate) GetDate() string { + if x != nil { + return x.Date + } + return "" +} + +func (x *FundingRate) GetRate() string { + if x != nil { + return x.Rate + } + return "" +} + +func (x *FundingRate) GetPayment() string { + if x != nil { + return x.Payment + } + return "" +} + +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"` + 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"` + Rates []*FundingRate `protobuf:"bytes,6,rep,name=rates,proto3" json:"rates,omitempty"` + LatestRate *FundingRate `protobuf:"bytes,7,opt,name=latest_rate,json=latestRate,proto3" json:"latest_rate,omitempty"` + UpcomingRate *FundingRate `protobuf:"bytes,8,opt,name=upcoming_rate,json=upcomingRate,proto3" json:"upcoming_rate,omitempty"` + PaymentSum string `protobuf:"bytes,9,opt,name=payment_sum,json=paymentSum,proto3" json:"payment_sum,omitempty"` +} + +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) + } +} + +func (x *FundingData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FundingData) ProtoMessage() {} + +func (x *FundingData) ProtoReflect() protoreflect.Message { + mi := &file_rpc_proto_msgTypes[171] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FundingData.ProtoReflect.Descriptor instead. +func (*FundingData) Descriptor() ([]byte, []int) { + return file_rpc_proto_rawDescGZIP(), []int{171} +} + +func (x *FundingData) GetExchange() string { + if x != nil { + return x.Exchange + } + return "" +} + +func (x *FundingData) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *FundingData) GetPair() *CurrencyPair { + if x != nil { + return x.Pair + } + return nil +} + +func (x *FundingData) GetStartDate() string { + if x != nil { + return x.StartDate + } + return "" +} + +func (x *FundingData) GetEndDate() string { + if x != nil { + return x.EndDate + } + return "" +} + +func (x *FundingData) GetRates() []*FundingRate { + if x != nil { + return x.Rates + } + return nil +} + +func (x *FundingData) GetLatestRate() *FundingRate { + if x != nil { + return x.LatestRate + } + return nil +} + +func (x *FundingData) GetUpcomingRate() *FundingRate { + if x != nil { + return x.UpcomingRate + } + return nil +} + +func (x *FundingData) GetPaymentSum() string { + if x != nil { + return x.PaymentSum + } + return "" +} + +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"` + BreakEvenPrice string `protobuf:"bytes,7,opt,name=break_even_price,json=breakEvenPrice,proto3" json:"break_even_price,omitempty"` + AverageOpenPrice string `protobuf:"bytes,8,opt,name=average_open_price,json=averageOpenPrice,proto3" json:"average_open_price,omitempty"` + RecentPnl string `protobuf:"bytes,9,opt,name=recent_pnl,json=recentPnl,proto3" json:"recent_pnl,omitempty"` + MarginFraction string `protobuf:"bytes,10,opt,name=margin_fraction,json=marginFraction,proto3" json:"margin_fraction,omitempty"` + FreeCollateral string `protobuf:"bytes,11,opt,name=free_collateral,json=freeCollateral,proto3" json:"free_collateral,omitempty"` + TotalCollateral string `protobuf:"bytes,12,opt,name=total_collateral,json=totalCollateral,proto3" json:"total_collateral,omitempty"` +} + +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) + } +} + +func (x *FuturesPositionStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FuturesPositionStats) ProtoMessage() {} + +func (x *FuturesPositionStats) ProtoReflect() protoreflect.Message { + mi := &file_rpc_proto_msgTypes[172] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FuturesPositionStats.ProtoReflect.Descriptor instead. +func (*FuturesPositionStats) Descriptor() ([]byte, []int) { + return file_rpc_proto_rawDescGZIP(), []int{172} +} + +func (x *FuturesPositionStats) GetMaintenanceMarginRequirement() string { + if x != nil { + return x.MaintenanceMarginRequirement + } + return "" +} + +func (x *FuturesPositionStats) GetInitialMarginRequirement() string { + if x != nil { + return x.InitialMarginRequirement + } + return "" +} + +func (x *FuturesPositionStats) GetEstimatedLiquidationPrice() string { + if x != nil { + return x.EstimatedLiquidationPrice + } + return "" +} + +func (x *FuturesPositionStats) GetCollateralUsed() string { + if x != nil { + return x.CollateralUsed + } + return "" +} + +func (x *FuturesPositionStats) GetMarkPrice() string { + if x != nil { + return x.MarkPrice + } + return "" +} + +func (x *FuturesPositionStats) GetCurrentSize() string { + if x != nil { + return x.CurrentSize + } + return "" +} + +func (x *FuturesPositionStats) GetBreakEvenPrice() string { + if x != nil { + return x.BreakEvenPrice + } + return "" +} + +func (x *FuturesPositionStats) GetAverageOpenPrice() string { + if x != nil { + return x.AverageOpenPrice + } + return "" +} + +func (x *FuturesPositionStats) GetRecentPnl() string { + if x != nil { + return x.RecentPnl + } + return "" +} + +func (x *FuturesPositionStats) GetMarginFraction() string { + if x != nil { + return x.MarginFraction + } + return "" +} + +func (x *FuturesPositionStats) GetFreeCollateral() string { + if x != nil { + return x.FreeCollateral + } + return "" +} + +func (x *FuturesPositionStats) GetTotalCollateral() string { + if x != nil { + return x.TotalCollateral + } + return "" +} + +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"` + Orders []*OrderDetails `protobuf:"bytes,16,rep,name=orders,proto3" json:"orders,omitempty"` + PositionStats *FuturesPositionStats `protobuf:"bytes,17,opt,name=position_stats,json=positionStats,proto3" json:"position_stats,omitempty"` + FundingData *FundingData `protobuf:"bytes,18,opt,name=funding_data,json=fundingData,proto3" json:"funding_data,omitempty"` +} + +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) + } +} + +func (x *FuturePosition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FuturePosition) ProtoMessage() {} + +func (x *FuturePosition) ProtoReflect() protoreflect.Message { + mi := &file_rpc_proto_msgTypes[173] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FuturePosition.ProtoReflect.Descriptor instead. +func (*FuturePosition) Descriptor() ([]byte, []int) { + return file_rpc_proto_rawDescGZIP(), []int{173} +} + +func (x *FuturePosition) GetExchange() string { + if x != nil { + return x.Exchange + } + return "" +} + +func (x *FuturePosition) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *FuturePosition) GetPair() *CurrencyPair { + if x != nil { + return x.Pair + } + return nil +} + +func (x *FuturePosition) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *FuturePosition) GetOpeningDate() string { + if x != nil { + return x.OpeningDate + } + return "" +} + +func (x *FuturePosition) GetOpeningDirection() string { + if x != nil { + return x.OpeningDirection + } + return "" +} + +func (x *FuturePosition) GetOpeningPrice() string { + if x != nil { + return x.OpeningPrice + } + return "" +} + +func (x *FuturePosition) GetOpeningSize() string { + if x != nil { + return x.OpeningSize + } + return "" +} + +func (x *FuturePosition) GetCurrentDirection() string { + if x != nil { + return x.CurrentDirection + } + return "" +} + +func (x *FuturePosition) GetCurrentPrice() string { + if x != nil { + return x.CurrentPrice + } + return "" +} + +func (x *FuturePosition) GetCurrentSize() string { + if x != nil { + return x.CurrentSize + } + return "" +} + +func (x *FuturePosition) GetUnrealisedPnl() string { + if x != nil { + return x.UnrealisedPnl + } + return "" +} + +func (x *FuturePosition) GetRealisedPnl() string { + if x != nil { + return x.RealisedPnl + } + return "" +} + +func (x *FuturePosition) GetClosingDate() string { + if x != nil { + return x.ClosingDate + } + return "" +} + +func (x *FuturePosition) GetOrderCount() int64 { + if x != nil { + return x.OrderCount + } + return 0 +} + +func (x *FuturePosition) GetOrders() []*OrderDetails { + if x != nil { + return x.Orders + } + return nil +} + +func (x *FuturePosition) GetPositionStats() *FuturesPositionStats { + if x != nil { + return x.PositionStats + } + return nil +} + +func (x *FuturePosition) GetFundingData() *FundingData { + if x != nil { + return x.FundingData + } + return nil +} + +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"` +} + +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) + } +} + +func (x *GetManagedPositionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetManagedPositionRequest) ProtoMessage() {} + +func (x *GetManagedPositionRequest) ProtoReflect() protoreflect.Message { + mi := &file_rpc_proto_msgTypes[174] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetManagedPositionRequest.ProtoReflect.Descriptor instead. +func (*GetManagedPositionRequest) Descriptor() ([]byte, []int) { + return file_rpc_proto_rawDescGZIP(), []int{174} +} + +func (x *GetManagedPositionRequest) GetExchange() string { + if x != nil { + return x.Exchange + } + return "" +} + +func (x *GetManagedPositionRequest) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *GetManagedPositionRequest) GetPair() *CurrencyPair { + if x != nil { + return x.Pair + } + return nil +} + +func (x *GetManagedPositionRequest) GetIncludeFullOrderData() bool { + if x != nil { + return x.IncludeFullOrderData + } + return false +} + +func (x *GetManagedPositionRequest) GetGetFundingPayments() bool { + if x != nil { + return x.GetFundingPayments + } + return false +} + +func (x *GetManagedPositionRequest) GetIncludeFullFundingRates() bool { + if x != nil { + return x.IncludeFullFundingRates + } + return false +} + +func (x *GetManagedPositionRequest) GetIncludePredictedRate() bool { + if x != nil { + return x.IncludePredictedRate + } + return false +} + +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"` +} + +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) + } +} + +func (x *GetAllManagedPositionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllManagedPositionsRequest) ProtoMessage() {} + +func (x *GetAllManagedPositionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_rpc_proto_msgTypes[175] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAllManagedPositionsRequest.ProtoReflect.Descriptor instead. +func (*GetAllManagedPositionsRequest) Descriptor() ([]byte, []int) { + return file_rpc_proto_rawDescGZIP(), []int{175} +} + +func (x *GetAllManagedPositionsRequest) GetIncludeFullOrderData() bool { + if x != nil { + return x.IncludeFullOrderData + } + return false +} + +func (x *GetAllManagedPositionsRequest) GetGetFundingPayments() bool { + if x != nil { + return x.GetFundingPayments + } + return false +} + +func (x *GetAllManagedPositionsRequest) GetIncludeFullFundingRates() bool { + if x != nil { + return x.IncludeFullFundingRates + } + return false +} + +func (x *GetAllManagedPositionsRequest) GetIncludePredictedRate() bool { + if x != nil { + return x.IncludePredictedRate + } + return false +} + +type GetManagedPositionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Positions []*FuturePosition `protobuf:"bytes,1,rep,name=positions,proto3" json:"positions,omitempty"` +} + +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) + } +} + +func (x *GetManagedPositionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetManagedPositionsResponse) ProtoMessage() {} + +func (x *GetManagedPositionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_rpc_proto_msgTypes[176] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetManagedPositionsResponse.ProtoReflect.Descriptor instead. +func (*GetManagedPositionsResponse) Descriptor() ([]byte, []int) { + return file_rpc_proto_rawDescGZIP(), []int{176} +} + +func (x *GetManagedPositionsResponse) GetPositions() []*FuturePosition { + if x != nil { + return x.Positions + } + return nil +} + type GetFuturesPositionsRequest 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"` - Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` - PositionLimit int64 `protobuf:"varint,7,opt,name=position_limit,json=positionLimit,proto3" json:"position_limit,omitempty"` - Verbose bool `protobuf:"varint,8,opt,name=verbose,proto3" json:"verbose,omitempty"` - Overwrite bool `protobuf:"varint,9,opt,name=overwrite,proto3" json:"overwrite,omitempty"` + 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"` + Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` + PositionLimit int64 `protobuf:"varint,7,opt,name=position_limit,json=positionLimit,proto3" json:"position_limit,omitempty"` + Overwrite bool `protobuf:"varint,8,opt,name=overwrite,proto3" json:"overwrite,omitempty"` + GetPositionStats bool `protobuf:"varint,9,opt,name=get_position_stats,json=getPositionStats,proto3" json:"get_position_stats,omitempty"` + IncludeFullOrderData bool `protobuf:"varint,10,opt,name=include_full_order_data,json=includeFullOrderData,proto3" json:"include_full_order_data,omitempty"` + GetFundingPayments bool `protobuf:"varint,11,opt,name=get_funding_payments,json=getFundingPayments,proto3" json:"get_funding_payments,omitempty"` + IncludeFullFundingRates bool `protobuf:"varint,12,opt,name=include_full_funding_rates,json=includeFullFundingRates,proto3" json:"include_full_funding_rates,omitempty"` + IncludePredictedRate bool `protobuf:"varint,13,opt,name=include_predicted_rate,json=includePredictedRate,proto3" json:"include_predicted_rate,omitempty"` } func (x *GetFuturesPositionsRequest) Reset() { *x = GetFuturesPositionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[170] + mi := &file_rpc_proto_msgTypes[177] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10892,7 +11601,7 @@ func (x *GetFuturesPositionsRequest) String() string { func (*GetFuturesPositionsRequest) ProtoMessage() {} func (x *GetFuturesPositionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[170] + mi := &file_rpc_proto_msgTypes[177] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10905,7 +11614,7 @@ func (x *GetFuturesPositionsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFuturesPositionsRequest.ProtoReflect.Descriptor instead. func (*GetFuturesPositionsRequest) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{170} + return file_rpc_proto_rawDescGZIP(), []int{177} } func (x *GetFuturesPositionsRequest) GetExchange() string { @@ -10957,16 +11666,44 @@ func (x *GetFuturesPositionsRequest) GetPositionLimit() int64 { return 0 } -func (x *GetFuturesPositionsRequest) GetVerbose() bool { +func (x *GetFuturesPositionsRequest) GetOverwrite() bool { if x != nil { - return x.Verbose + return x.Overwrite } return false } -func (x *GetFuturesPositionsRequest) GetOverwrite() bool { +func (x *GetFuturesPositionsRequest) GetGetPositionStats() bool { if x != nil { - return x.Overwrite + return x.GetPositionStats + } + return false +} + +func (x *GetFuturesPositionsRequest) GetIncludeFullOrderData() bool { + if x != nil { + return x.IncludeFullOrderData + } + return false +} + +func (x *GetFuturesPositionsRequest) GetGetFundingPayments() bool { + if x != nil { + return x.GetFundingPayments + } + return false +} + +func (x *GetFuturesPositionsRequest) GetIncludeFullFundingRates() bool { + if x != nil { + return x.IncludeFullFundingRates + } + return false +} + +func (x *GetFuturesPositionsRequest) GetIncludePredictedRate() bool { + if x != nil { + return x.IncludePredictedRate } return false } @@ -10987,7 +11724,7 @@ type GetFuturesPositionsResponse struct { func (x *GetFuturesPositionsResponse) Reset() { *x = GetFuturesPositionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[171] + mi := &file_rpc_proto_msgTypes[178] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11000,7 +11737,7 @@ func (x *GetFuturesPositionsResponse) String() string { func (*GetFuturesPositionsResponse) ProtoMessage() {} func (x *GetFuturesPositionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[171] + mi := &file_rpc_proto_msgTypes[178] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11013,7 +11750,7 @@ func (x *GetFuturesPositionsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFuturesPositionsResponse.ProtoReflect.Descriptor instead. func (*GetFuturesPositionsResponse) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{171} + return file_rpc_proto_rawDescGZIP(), []int{178} } func (x *GetFuturesPositionsResponse) GetTotalOrders() int64 { @@ -11058,101 +11795,6 @@ func (x *GetFuturesPositionsResponse) GetPositions() []*FuturePosition { return nil } -type FuturePosition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - CurrentDirection string `protobuf:"bytes,2,opt,name=current_direction,json=currentDirection,proto3" json:"current_direction,omitempty"` - UnrealisedPnl string `protobuf:"bytes,3,opt,name=unrealised_pnl,json=unrealisedPnl,proto3" json:"unrealised_pnl,omitempty"` - RealisedPnl string `protobuf:"bytes,4,opt,name=realised_pnl,json=realisedPnl,proto3" json:"realised_pnl,omitempty"` - OpeningDate string `protobuf:"bytes,5,opt,name=opening_date,json=openingDate,proto3" json:"opening_date,omitempty"` - ClosingDate string `protobuf:"bytes,6,opt,name=closing_date,json=closingDate,proto3" json:"closing_date,omitempty"` - Orders []*OrderDetails `protobuf:"bytes,7,rep,name=orders,proto3" json:"orders,omitempty"` -} - -func (x *FuturePosition) Reset() { - *x = FuturePosition{} - if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FuturePosition) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FuturePosition) ProtoMessage() {} - -func (x *FuturePosition) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[172] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FuturePosition.ProtoReflect.Descriptor instead. -func (*FuturePosition) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{172} -} - -func (x *FuturePosition) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *FuturePosition) GetCurrentDirection() string { - if x != nil { - return x.CurrentDirection - } - return "" -} - -func (x *FuturePosition) GetUnrealisedPnl() string { - if x != nil { - return x.UnrealisedPnl - } - return "" -} - -func (x *FuturePosition) GetRealisedPnl() string { - if x != nil { - return x.RealisedPnl - } - return "" -} - -func (x *FuturePosition) GetOpeningDate() string { - if x != nil { - return x.OpeningDate - } - return "" -} - -func (x *FuturePosition) GetClosingDate() string { - if x != nil { - return x.ClosingDate - } - return "" -} - -func (x *FuturePosition) GetOrders() []*OrderDetails { - if x != nil { - return x.Orders - } - return nil -} - type GetCollateralRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -11168,7 +11810,7 @@ type GetCollateralRequest struct { func (x *GetCollateralRequest) Reset() { *x = GetCollateralRequest{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[173] + mi := &file_rpc_proto_msgTypes[179] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11181,7 +11823,7 @@ func (x *GetCollateralRequest) String() string { func (*GetCollateralRequest) ProtoMessage() {} func (x *GetCollateralRequest) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[173] + mi := &file_rpc_proto_msgTypes[179] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11194,7 +11836,7 @@ func (x *GetCollateralRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCollateralRequest.ProtoReflect.Descriptor instead. func (*GetCollateralRequest) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{173} + return file_rpc_proto_rawDescGZIP(), []int{179} } func (x *GetCollateralRequest) GetExchange() string { @@ -11253,7 +11895,7 @@ type GetCollateralResponse struct { func (x *GetCollateralResponse) Reset() { *x = GetCollateralResponse{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[174] + mi := &file_rpc_proto_msgTypes[180] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11266,7 +11908,7 @@ func (x *GetCollateralResponse) String() string { func (*GetCollateralResponse) ProtoMessage() {} func (x *GetCollateralResponse) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[174] + mi := &file_rpc_proto_msgTypes[180] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11279,7 +11921,7 @@ func (x *GetCollateralResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCollateralResponse.ProtoReflect.Descriptor instead. func (*GetCollateralResponse) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{174} + return file_rpc_proto_rawDescGZIP(), []int{180} } func (x *GetCollateralResponse) GetSubAccount() string { @@ -11382,7 +12024,7 @@ type CollateralForCurrency struct { func (x *CollateralForCurrency) Reset() { *x = CollateralForCurrency{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[175] + mi := &file_rpc_proto_msgTypes[181] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11395,7 +12037,7 @@ func (x *CollateralForCurrency) String() string { func (*CollateralForCurrency) ProtoMessage() {} func (x *CollateralForCurrency) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[175] + mi := &file_rpc_proto_msgTypes[181] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11408,7 +12050,7 @@ func (x *CollateralForCurrency) ProtoReflect() protoreflect.Message { // Deprecated: Use CollateralForCurrency.ProtoReflect.Descriptor instead. func (*CollateralForCurrency) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{175} + return file_rpc_proto_rawDescGZIP(), []int{181} } func (x *CollateralForCurrency) GetCurrency() string { @@ -11519,7 +12161,7 @@ type CollateralByPosition struct { func (x *CollateralByPosition) Reset() { *x = CollateralByPosition{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[176] + mi := &file_rpc_proto_msgTypes[182] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11532,7 +12174,7 @@ func (x *CollateralByPosition) String() string { func (*CollateralByPosition) ProtoMessage() {} func (x *CollateralByPosition) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[176] + mi := &file_rpc_proto_msgTypes[182] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11545,7 +12187,7 @@ func (x *CollateralByPosition) ProtoReflect() protoreflect.Message { // Deprecated: Use CollateralByPosition.ProtoReflect.Descriptor instead. func (*CollateralByPosition) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{176} + return file_rpc_proto_rawDescGZIP(), []int{182} } func (x *CollateralByPosition) GetCurrency() string { @@ -11615,7 +12257,7 @@ type CollateralUsedBreakdown struct { func (x *CollateralUsedBreakdown) Reset() { *x = CollateralUsedBreakdown{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[177] + mi := &file_rpc_proto_msgTypes[183] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11628,7 +12270,7 @@ func (x *CollateralUsedBreakdown) String() string { func (*CollateralUsedBreakdown) ProtoMessage() {} func (x *CollateralUsedBreakdown) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[177] + mi := &file_rpc_proto_msgTypes[183] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11641,7 +12283,7 @@ func (x *CollateralUsedBreakdown) ProtoReflect() protoreflect.Message { // Deprecated: Use CollateralUsedBreakdown.ProtoReflect.Descriptor instead. func (*CollateralUsedBreakdown) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{177} + return file_rpc_proto_rawDescGZIP(), []int{183} } func (x *CollateralUsedBreakdown) GetLockedInStakes() string { @@ -11700,6 +12342,148 @@ func (x *CollateralUsedBreakdown) GetUsedInSpotMargin() string { return "" } +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"` + Pairs []string `protobuf:"bytes,3,rep,name=pairs,proto3" json:"pairs,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"` + IncludePredicted bool `protobuf:"varint,6,opt,name=include_predicted,json=includePredicted,proto3" json:"include_predicted,omitempty"` + IncludePayments bool `protobuf:"varint,7,opt,name=include_payments,json=includePayments,proto3" json:"include_payments,omitempty"` +} + +func (x *GetFundingRatesRequest) Reset() { + *x = GetFundingRatesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_rpc_proto_msgTypes[184] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFundingRatesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFundingRatesRequest) ProtoMessage() {} + +func (x *GetFundingRatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_rpc_proto_msgTypes[184] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFundingRatesRequest.ProtoReflect.Descriptor instead. +func (*GetFundingRatesRequest) Descriptor() ([]byte, []int) { + return file_rpc_proto_rawDescGZIP(), []int{184} +} + +func (x *GetFundingRatesRequest) GetExchange() string { + if x != nil { + return x.Exchange + } + return "" +} + +func (x *GetFundingRatesRequest) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *GetFundingRatesRequest) GetPairs() []string { + if x != nil { + return x.Pairs + } + return nil +} + +func (x *GetFundingRatesRequest) GetStartDate() string { + if x != nil { + return x.StartDate + } + return "" +} + +func (x *GetFundingRatesRequest) GetEndDate() string { + if x != nil { + return x.EndDate + } + return "" +} + +func (x *GetFundingRatesRequest) GetIncludePredicted() bool { + if x != nil { + return x.IncludePredicted + } + return false +} + +func (x *GetFundingRatesRequest) GetIncludePayments() bool { + if x != nil { + return x.IncludePayments + } + return false +} + +type GetFundingRatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FundingPayments []*FundingData `protobuf:"bytes,1,rep,name=funding_payments,json=fundingPayments,proto3" json:"funding_payments,omitempty"` +} + +func (x *GetFundingRatesResponse) Reset() { + *x = GetFundingRatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_rpc_proto_msgTypes[185] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFundingRatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFundingRatesResponse) ProtoMessage() {} + +func (x *GetFundingRatesResponse) ProtoReflect() protoreflect.Message { + mi := &file_rpc_proto_msgTypes[185] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFundingRatesResponse.ProtoReflect.Descriptor instead. +func (*GetFundingRatesResponse) Descriptor() ([]byte, []int) { + return file_rpc_proto_rawDescGZIP(), []int{185} +} + +func (x *GetFundingRatesResponse) GetFundingPayments() []*FundingData { + if x != nil { + return x.FundingPayments + } + return nil +} + type ShutdownRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -11709,7 +12493,7 @@ type ShutdownRequest struct { func (x *ShutdownRequest) Reset() { *x = ShutdownRequest{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[178] + mi := &file_rpc_proto_msgTypes[186] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11722,7 +12506,7 @@ func (x *ShutdownRequest) String() string { func (*ShutdownRequest) ProtoMessage() {} func (x *ShutdownRequest) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[178] + mi := &file_rpc_proto_msgTypes[186] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11735,7 +12519,7 @@ func (x *ShutdownRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ShutdownRequest.ProtoReflect.Descriptor instead. func (*ShutdownRequest) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{178} + return file_rpc_proto_rawDescGZIP(), []int{186} } type ShutdownResponse struct { @@ -11747,7 +12531,7 @@ type ShutdownResponse struct { func (x *ShutdownResponse) Reset() { *x = ShutdownResponse{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[179] + mi := &file_rpc_proto_msgTypes[187] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11760,7 +12544,7 @@ func (x *ShutdownResponse) String() string { func (*ShutdownResponse) ProtoMessage() {} func (x *ShutdownResponse) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[179] + mi := &file_rpc_proto_msgTypes[187] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11773,7 +12557,7 @@ func (x *ShutdownResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ShutdownResponse.ProtoReflect.Descriptor instead. func (*ShutdownResponse) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{179} + return file_rpc_proto_rawDescGZIP(), []int{187} } type GetTechnicalAnalysisRequest struct { @@ -11802,7 +12586,7 @@ type GetTechnicalAnalysisRequest struct { func (x *GetTechnicalAnalysisRequest) Reset() { *x = GetTechnicalAnalysisRequest{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[180] + mi := &file_rpc_proto_msgTypes[188] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11815,7 +12599,7 @@ func (x *GetTechnicalAnalysisRequest) String() string { func (*GetTechnicalAnalysisRequest) ProtoMessage() {} func (x *GetTechnicalAnalysisRequest) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[180] + mi := &file_rpc_proto_msgTypes[188] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11828,7 +12612,7 @@ func (x *GetTechnicalAnalysisRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTechnicalAnalysisRequest.ProtoReflect.Descriptor instead. func (*GetTechnicalAnalysisRequest) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{180} + return file_rpc_proto_rawDescGZIP(), []int{188} } func (x *GetTechnicalAnalysisRequest) GetExchange() string { @@ -11954,7 +12738,7 @@ type ListOfSignals struct { func (x *ListOfSignals) Reset() { *x = ListOfSignals{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[181] + mi := &file_rpc_proto_msgTypes[189] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11967,7 +12751,7 @@ func (x *ListOfSignals) String() string { func (*ListOfSignals) ProtoMessage() {} func (x *ListOfSignals) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[181] + mi := &file_rpc_proto_msgTypes[189] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11980,7 +12764,7 @@ func (x *ListOfSignals) ProtoReflect() protoreflect.Message { // Deprecated: Use ListOfSignals.ProtoReflect.Descriptor instead. func (*ListOfSignals) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{181} + return file_rpc_proto_rawDescGZIP(), []int{189} } func (x *ListOfSignals) GetSignals() []float64 { @@ -12001,7 +12785,7 @@ type GetTechnicalAnalysisResponse struct { func (x *GetTechnicalAnalysisResponse) Reset() { *x = GetTechnicalAnalysisResponse{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[182] + mi := &file_rpc_proto_msgTypes[190] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12014,7 +12798,7 @@ func (x *GetTechnicalAnalysisResponse) String() string { func (*GetTechnicalAnalysisResponse) ProtoMessage() {} func (x *GetTechnicalAnalysisResponse) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[182] + mi := &file_rpc_proto_msgTypes[190] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12027,7 +12811,7 @@ func (x *GetTechnicalAnalysisResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTechnicalAnalysisResponse.ProtoReflect.Descriptor instead. func (*GetTechnicalAnalysisResponse) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{182} + return file_rpc_proto_rawDescGZIP(), []int{190} } func (x *GetTechnicalAnalysisResponse) GetSignals() map[string]*ListOfSignals { @@ -12060,7 +12844,7 @@ type GetMarginRatesHistoryRequest struct { func (x *GetMarginRatesHistoryRequest) Reset() { *x = GetMarginRatesHistoryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[183] + mi := &file_rpc_proto_msgTypes[191] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12073,7 +12857,7 @@ func (x *GetMarginRatesHistoryRequest) String() string { func (*GetMarginRatesHistoryRequest) ProtoMessage() {} func (x *GetMarginRatesHistoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[183] + mi := &file_rpc_proto_msgTypes[191] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12086,7 +12870,7 @@ func (x *GetMarginRatesHistoryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMarginRatesHistoryRequest.ProtoReflect.Descriptor instead. func (*GetMarginRatesHistoryRequest) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{183} + return file_rpc_proto_rawDescGZIP(), []int{191} } func (x *GetMarginRatesHistoryRequest) GetExchange() string { @@ -12192,7 +12976,7 @@ type LendingPayment struct { func (x *LendingPayment) Reset() { *x = LendingPayment{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[184] + mi := &file_rpc_proto_msgTypes[192] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12205,7 +12989,7 @@ func (x *LendingPayment) String() string { func (*LendingPayment) ProtoMessage() {} func (x *LendingPayment) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[184] + mi := &file_rpc_proto_msgTypes[192] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12218,7 +13002,7 @@ func (x *LendingPayment) ProtoReflect() protoreflect.Message { // Deprecated: Use LendingPayment.ProtoReflect.Descriptor instead. func (*LendingPayment) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{184} + return file_rpc_proto_rawDescGZIP(), []int{192} } func (x *LendingPayment) GetPayment() string { @@ -12247,7 +13031,7 @@ type BorrowCost struct { func (x *BorrowCost) Reset() { *x = BorrowCost{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[185] + mi := &file_rpc_proto_msgTypes[193] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12260,7 +13044,7 @@ func (x *BorrowCost) String() string { func (*BorrowCost) ProtoMessage() {} func (x *BorrowCost) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[185] + mi := &file_rpc_proto_msgTypes[193] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12273,7 +13057,7 @@ func (x *BorrowCost) ProtoReflect() protoreflect.Message { // Deprecated: Use BorrowCost.ProtoReflect.Descriptor instead. func (*BorrowCost) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{185} + return file_rpc_proto_rawDescGZIP(), []int{193} } func (x *BorrowCost) GetCost() string { @@ -12308,7 +13092,7 @@ type MarginRate struct { func (x *MarginRate) Reset() { *x = MarginRate{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[186] + mi := &file_rpc_proto_msgTypes[194] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12321,7 +13105,7 @@ func (x *MarginRate) String() string { func (*MarginRate) ProtoMessage() {} func (x *MarginRate) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[186] + mi := &file_rpc_proto_msgTypes[194] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12334,7 +13118,7 @@ func (x *MarginRate) ProtoReflect() protoreflect.Message { // Deprecated: Use MarginRate.ProtoReflect.Descriptor instead. func (*MarginRate) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{186} + return file_rpc_proto_rawDescGZIP(), []int{194} } func (x *MarginRate) GetTime() string { @@ -12412,7 +13196,7 @@ type GetMarginRatesHistoryResponse struct { func (x *GetMarginRatesHistoryResponse) Reset() { *x = GetMarginRatesHistoryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_rpc_proto_msgTypes[187] + mi := &file_rpc_proto_msgTypes[195] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12425,7 +13209,7 @@ func (x *GetMarginRatesHistoryResponse) String() string { func (*GetMarginRatesHistoryResponse) ProtoMessage() {} func (x *GetMarginRatesHistoryResponse) ProtoReflect() protoreflect.Message { - mi := &file_rpc_proto_msgTypes[187] + mi := &file_rpc_proto_msgTypes[195] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12438,7 +13222,7 @@ func (x *GetMarginRatesHistoryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMarginRatesHistoryResponse.ProtoReflect.Descriptor instead. func (*GetMarginRatesHistoryResponse) Descriptor() ([]byte, []int) { - return file_rpc_proto_rawDescGZIP(), []int{187} + return file_rpc_proto_rawDescGZIP(), []int{195} } func (x *GetMarginRatesHistoryResponse) GetRates() []*MarginRate { @@ -12955,10 +13739,10 @@ var file_rpc_proto_rawDesc = []byte{ 0x6f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x69, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, + 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, @@ -13936,1090 +14720,1283 @@ var file_rpc_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, - 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xa9, 0x02, - 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x28, - 0x0a, 0x04, 0x70, 0x61, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, - 0x69, 0x72, 0x52, 0x04, 0x70, 0x61, 0x69, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x64, - 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, - 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6f, - 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, - 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, 0x94, 0x02, 0x0a, 0x1b, 0x47, 0x65, - 0x74, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x75, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, - 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, - 0x70, 0x6e, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x52, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, - 0x70, 0x6e, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x55, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x1b, 0x0a, - 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6e, 0x6c, 0x12, 0x34, 0x0a, 0x09, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x93, 0x02, 0x0a, 0x0e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x44, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, 0x72, 0x65, - 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, - 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, - 0x6e, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x61, - 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, - 0x67, 0x44, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, - 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x6f, - 0x73, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x06, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x4f, 0x0a, + 0x0b, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x72, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xdf, + 0x02, 0x0a, 0x0b, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, + 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, 0x70, 0x61, 0x69, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, + 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, + 0x44, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x52, 0x05, 0x72, 0x61, 0x74, 0x65, 0x73, 0x12, + 0x34, 0x0a, 0x0b, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x0d, 0x75, 0x70, 0x63, 0x6f, 0x6d, 0x69, 0x6e, + 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, + 0x65, 0x52, 0x0c, 0x75, 0x70, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x75, 0x6d, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x6d, + 0x22, 0xb9, 0x04, 0x0a, 0x14, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x1e, 0x6d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x1c, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x3c, 0x0a, 0x1a, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x18, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, + 0x1b, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x19, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x27, 0x0a, + 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, + 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x72, 0x65, 0x61, + 0x6b, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x50, 0x6e, 0x6c, 0x12, + 0x27, 0x0a, 0x0f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x72, 0x65, 0x65, + 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x66, 0x72, 0x65, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, + 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x22, 0xca, 0x05, 0x0a, + 0x0e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x6e, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x2b, - 0x0a, 0x11, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x61, 0x6c, 0x63, 0x75, - 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xbe, 0x05, 0x0a, 0x15, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x25, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x20, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x4f, 0x66, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x53, 0x70, 0x6f, 0x74, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x30, 0x63, 0x6f, 0x6c, 0x6c, - 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, - 0x70, 0x6f, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x2b, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x42, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, - 0x27, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, - 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, - 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x46, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x64, - 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, - 0x6e, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x64, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, - 0x12, 0x31, 0x0a, 0x14, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, - 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, - 0x72, 0x61, 0x6c, 0x12, 0x35, 0x0a, 0x16, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, - 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, - 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, - 0x6c, 0x12, 0x4c, 0x0a, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x62, 0x72, - 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, - 0x6c, 0x46, 0x6f, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x11, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, - 0x4b, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x72, 0x65, 0x61, - 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x42, - 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0xf7, 0x04, 0x0a, - 0x15, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x63, 0x79, 0x12, 0x38, 0x0a, 0x18, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x66, - 0x72, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x46, 0x72, - 0x6f, 0x6d, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x44, 0x0a, - 0x1f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75, - 0x73, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x41, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, - 0x72, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x18, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x5f, 0x66, 0x61, - 0x69, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x46, 0x61, 0x69, - 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x37, 0x0a, 0x17, 0x63, 0x6f, - 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x6f, 0x6c, - 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x6f, - 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, - 0x70, 0x6e, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x6e, 0x72, 0x65, 0x61, - 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x64, - 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x66, 0x75, 0x6e, 0x64, 0x73, 0x49, 0x6e, 0x55, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, - 0x72, 0x61, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, - 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x64, - 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, - 0x6e, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x64, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x8f, 0x02, 0x0a, 0x14, 0x43, 0x6f, 0x6c, 0x6c, 0x61, - 0x74, 0x65, 0x72, 0x61, 0x6c, 0x42, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, - 0x26, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4d, 0x61, - 0x72, 0x67, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, - 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x22, 0xae, 0x03, 0x0a, 0x17, 0x43, 0x6f, 0x6c, - 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x42, 0x72, 0x65, 0x61, 0x6b, - 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, - 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x12, 0x2b, - 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x6e, 0x66, 0x74, 0x5f, - 0x62, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x6b, - 0x65, 0x64, 0x49, 0x6e, 0x4e, 0x66, 0x74, 0x42, 0x69, 0x64, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6c, - 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x76, 0x6f, 0x75, - 0x63, 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x6f, 0x63, 0x6b, - 0x65, 0x64, 0x49, 0x6e, 0x46, 0x65, 0x65, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4d, - 0x0a, 0x24, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x70, 0x6f, 0x74, - 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, - 0x6f, 0x66, 0x66, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x6c, 0x6f, - 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, - 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x73, 0x12, 0x31, 0x0a, - 0x15, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x6f, - 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x70, 0x6f, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x6f, - 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, - 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x75, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, - 0x64, 0x49, 0x6e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x75, 0x73, - 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x73, 0x65, 0x64, 0x49, 0x6e, 0x53, - 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x68, 0x75, - 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x12, 0x0a, 0x10, - 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xa1, 0x05, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, - 0x6c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x04, - 0x70, 0x61, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, - 0x52, 0x04, 0x70, 0x61, 0x69, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, - 0x68, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, - 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x06, 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, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, - 0x64, 0x18, 0x07, 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, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x66, 0x61, 0x73, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x6c, 0x6f, 0x77, 0x50, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, - 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, - 0x72, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x6f, 0x77, - 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x15, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, - 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x77, 0x6e, 0x12, 0x2e, - 0x0a, 0x13, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x6d, 0x6f, 0x76, - 0x69, 0x6e, 0x67, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, - 0x0a, 0x0e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x45, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x70, - 0x61, 0x69, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, - 0x09, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x74, - 0x68, 0x65, 0x72, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x22, 0x29, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x22, - 0xbe, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, - 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, - 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x1a, 0x51, 0x0a, - 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x83, 0x04, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, - 0x74, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, 0x70, 0x61, 0x69, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, + 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x69, + 0x6e, 0x67, 0x44, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, + 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, + 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, + 0x6e, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, + 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x6c, 0x69, + 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, + 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, + 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, + 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x43, 0x0a, 0x0e, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x12, 0x36, 0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x66, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x22, 0xd3, 0x02, 0x0a, 0x19, 0x47, 0x65, + 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, 0x69, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, 0x70, + 0x61, 0x69, 0x72, 0x12, 0x35, 0x0a, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, + 0x75, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x75, 0x6c, + 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x14, 0x67, 0x65, + 0x74, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x67, 0x65, 0x74, 0x46, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x66, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x52, 0x61, 0x74, 0x65, 0x22, + 0xfb, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x35, 0x0a, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x75, 0x6c, + 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x5f, + 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x67, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x52, 0x61, 0x74, 0x65, 0x22, 0x53, 0x0a, + 0x1b, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x99, 0x04, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x19, - 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x67, 0x65, 0x74, - 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x67, 0x65, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x74, 0x65, 0x64, 0x52, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x5f, 0x6c, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x67, 0x65, 0x74, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x67, 0x65, 0x74, - 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x67, 0x65, 0x74, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x52, 0x61, - 0x74, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, - 0x77, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x67, - 0x65, 0x74, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x2a, 0x0a, - 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x61, 0x6c, - 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4f, - 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, - 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x74, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x05, - 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x52, - 0x05, 0x72, 0x61, 0x74, 0x65, 0x73, 0x22, 0x3e, 0x0a, 0x0e, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x34, 0x0a, 0x0a, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, - 0x43, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xe2, 0x02, 0x0a, - 0x0a, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, - 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x52, 0x61, 0x74, 0x65, 0x12, - 0x2c, 0x0a, 0x12, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x68, 0x6f, 0x75, - 0x72, 0x6c, 0x79, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, - 0x12, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x72, - 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x79, 0x65, 0x61, 0x72, 0x6c, - 0x79, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x0f, 0x6c, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x6c, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x0b, - 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x6f, 0x72, 0x72, 0x6f, - 0x77, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x73, - 0x74, 0x22, 0xae, 0x03, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, - 0x61, 0x74, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x67, - 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x52, 0x05, 0x72, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x28, - 0x0a, 0x10, 0x73, 0x75, 0x6d, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x73, - 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x75, 0x6d, 0x42, 0x6f, 0x72, - 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x76, 0x67, 0x5f, - 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x61, 0x76, 0x67, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x30, 0x0a, 0x14, 0x73, 0x75, 0x6d, 0x5f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, - 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x73, 0x75, 0x6d, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x76, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x76, - 0x67, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x33, 0x0a, 0x0b, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x73, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x61, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, 0x70, 0x61, 0x69, 0x72, 0x12, 0x1d, 0x0a, + 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, + 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x10, 0x67, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x75, + 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x75, 0x6c, 0x6c, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x14, 0x67, 0x65, 0x74, + 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x67, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x66, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x52, 0x61, 0x74, 0x65, 0x22, 0x94, + 0x02, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x61, 0x6c, + 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, + 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, + 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, + 0x6e, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6e, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6e, 0x6c, 0x12, + 0x34, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x74, 0x75, + 0x72, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x62, 0x72, 0x65, 0x61, + 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x2b, 0x0a, + 0x11, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x6c, 0x69, + 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, + 0x61, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xbe, 0x05, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x25, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x20, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x4f, 0x66, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x30, 0x63, 0x6f, 0x6c, 0x6c, 0x61, + 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, + 0x6f, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x2b, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x42, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x27, + 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x46, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x5f, + 0x62, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, + 0x52, 0x0d, 0x75, 0x73, 0x65, 0x64, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, + 0x31, 0x0a, 0x14, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, + 0x61, 0x6c, 0x12, 0x35, 0x0a, 0x16, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x15, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x43, + 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, 0x72, + 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, + 0x12, 0x4c, 0x0a, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x62, 0x72, 0x65, + 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, + 0x46, 0x6f, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x11, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x4b, + 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, + 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x42, 0x79, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0xf7, 0x04, 0x0a, 0x15, + 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x12, 0x38, 0x0a, 0x18, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x66, 0x72, + 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x46, 0x72, 0x6f, + 0x6d, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x44, 0x0a, 0x1f, + 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75, 0x73, + 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x41, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, + 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x18, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x5f, 0x66, 0x61, 0x69, + 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x46, 0x61, 0x69, 0x72, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x77, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x37, 0x0a, 0x17, 0x63, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x5f, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x73, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, + 0x6e, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, + 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x73, + 0x5f, 0x69, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, + 0x75, 0x6e, 0x64, 0x73, 0x49, 0x6e, 0x55, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x64, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, + 0x61, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x5f, + 0x62, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, + 0x52, 0x0d, 0x75, 0x73, 0x65, 0x64, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x8f, 0x02, 0x0a, 0x14, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, + 0x65, 0x72, 0x61, 0x6c, 0x42, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, + 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x26, + 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, + 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x22, 0xae, 0x03, 0x0a, 0x17, 0x43, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x64, + 0x6f, 0x77, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, + 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, + 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x12, 0x2b, 0x0a, + 0x12, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x6e, 0x66, 0x74, 0x5f, 0x62, + 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, + 0x64, 0x49, 0x6e, 0x4e, 0x66, 0x74, 0x42, 0x69, 0x64, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6c, 0x6f, + 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x76, 0x6f, 0x75, 0x63, + 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x6f, 0x63, 0x6b, 0x65, + 0x64, 0x49, 0x6e, 0x46, 0x65, 0x65, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4d, 0x0a, + 0x24, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, + 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6f, + 0x66, 0x66, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x6c, 0x6f, 0x63, + 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x46, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x73, 0x12, 0x31, 0x0a, 0x15, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x6f, 0x63, + 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x70, 0x6f, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x30, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, + 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x75, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x64, + 0x49, 0x6e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x75, 0x73, 0x65, + 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x73, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x70, + 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x22, 0xf2, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, + 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, + 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, + 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x59, 0x0a, + 0x17, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x10, 0x66, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x68, 0x75, 0x74, + 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x53, + 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xa1, 0x05, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, + 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x70, + 0x61, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, + 0x04, 0x70, 0x61, 0x69, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, + 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x06, 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, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, + 0x18, 0x07, 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, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x66, 0x61, 0x73, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x6c, 0x6f, 0x77, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x13, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, + 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x6f, 0x77, 0x6e, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x15, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, + 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x77, 0x6e, 0x12, 0x2e, 0x0a, + 0x13, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x6d, 0x6f, 0x76, 0x69, + 0x6e, 0x67, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, + 0x0e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x45, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x70, 0x61, + 0x69, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x09, + 0x6f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x74, 0x68, + 0x65, 0x72, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x29, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x22, 0xbe, + 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x41, + 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4b, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, + 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x1a, 0x51, 0x0a, 0x0c, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x83, 0x04, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, + 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x5f, + 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x67, 0x65, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, + 0x65, 0x64, 0x52, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x67, 0x65, 0x74, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, + 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0e, 0x67, 0x65, 0x74, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x52, 0x61, 0x74, + 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, + 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x67, 0x65, + 0x74, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x11, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x41, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x61, 0x6c, 0x63, + 0x75, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x66, + 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, + 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x72, + 0x61, 0x74, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x52, 0x05, + 0x72, 0x61, 0x74, 0x65, 0x73, 0x22, 0x3e, 0x0a, 0x0e, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x34, 0x0a, 0x0a, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x43, + 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xe2, 0x02, 0x0a, 0x0a, + 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2c, + 0x0a, 0x12, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x52, 0x61, 0x74, 0x65, 0x12, 0x2c, + 0x0a, 0x12, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x68, 0x6f, 0x75, 0x72, + 0x6c, 0x79, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x12, + 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, + 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x0f, 0x6c, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x6c, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x0b, 0x62, + 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, + 0x43, 0x6f, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x73, 0x74, + 0x22, 0xae, 0x03, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, + 0x74, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, - 0x6e, 0x52, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, - 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, - 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x70, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x52, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, - 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x61, - 0x74, 0x65, 0x32, 0xfc, 0x5b, 0x0a, 0x15, 0x47, 0x6f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x07, - 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, - 0x12, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x67, 0x0a, - 0x0d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1c, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x73, 0x62, 0x73, 0x79, 0x74, - 0x65, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x73, 0x75, 0x62, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x68, 0x0a, 0x0f, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x53, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, - 0x2f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x12, 0x6a, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x6f, 0x0a, 0x0f, - 0x47, 0x65, 0x74, 0x52, 0x50, 0x43, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, - 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x50, 0x43, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x50, 0x43, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x93, 0x01, - 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x63, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x73, 0x12, 0x63, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, - 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x45, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, - 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x73, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, - 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x45, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x74, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x54, 0x50, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x69, 0x63, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x54, 0x50, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, - 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x6f, 0x74, 0x70, 0x12, 0x73, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x4f, 0x54, 0x50, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, - 0x54, 0x50, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, - 0x54, 0x50, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x6f, 0x74, 0x70, 0x73, 0x12, 0x6c, 0x0a, 0x0e, 0x45, 0x6e, 0x61, 0x62, + 0x6e, 0x52, 0x61, 0x74, 0x65, 0x52, 0x05, 0x72, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x28, 0x0a, + 0x10, 0x73, 0x75, 0x6d, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x73, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x75, 0x6d, 0x42, 0x6f, 0x72, 0x72, + 0x6f, 0x77, 0x43, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x76, 0x67, 0x5f, 0x62, + 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x61, 0x76, 0x67, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x30, 0x0a, 0x14, 0x73, 0x75, 0x6d, 0x5f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, + 0x75, 0x6d, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x76, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x76, 0x67, + 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x52, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, + 0x12, 0x39, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x70, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x52, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x74, + 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, + 0x65, 0x32, 0xf6, 0x5e, 0x0a, 0x15, 0x47, 0x6f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x54, 0x72, + 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x07, 0x47, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, + 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x67, 0x0a, 0x0d, + 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1c, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x73, 0x62, 0x73, 0x79, 0x74, 0x65, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x73, 0x75, 0x62, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x68, 0x0a, 0x0f, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, + 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, + 0x6a, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x6f, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x52, 0x50, 0x43, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x1e, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x50, 0x43, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x50, 0x43, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x93, 0x01, 0x0a, + 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x63, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x73, 0x12, 0x63, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, - 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x65, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x57, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, - 0x6b, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, - 0x5b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x19, 0x2e, - 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x65, 0x74, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x63, 0x0a, 0x0c, - 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x1b, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, - 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x3a, 0x01, - 0x2a, 0x12, 0x67, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, - 0x6b, 0x73, 0x12, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x6b, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x71, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x79, 0x0a, 0x14, 0x47, 0x65, - 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x12, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x67, - 0x65, 0x74, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0x57, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, - 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x63, - 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x1b, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, - 0x6f, 0x6c, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, - 0x6c, 0x69, 0x6f, 0x12, 0x7f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, - 0x6c, 0x69, 0x6f, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, - 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, - 0x2f, 0x67, 0x65, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x73, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x79, 0x12, 0x76, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x66, - 0x6f, 0x6c, 0x69, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, - 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, - 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, - 0x69, 0x6f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x7f, 0x0a, 0x16, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, + 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x73, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x45, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x74, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x54, 0x50, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x54, 0x50, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, + 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6f, + 0x74, 0x70, 0x12, 0x73, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x4f, 0x54, 0x50, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x54, + 0x50, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x54, + 0x50, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x6f, 0x74, 0x70, 0x73, 0x12, 0x6c, 0x0a, 0x0e, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1a, - 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, - 0x6c, 0x69, 0x6f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x77, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, - 0x6f, 0x72, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x46, 0x6f, 0x72, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, - 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x66, 0x6f, 0x72, 0x65, 0x78, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x67, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, - 0x65, 0x78, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x78, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, - 0x65, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x78, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x65, 0x74, 0x66, 0x6f, 0x72, 0x65, 0x78, 0x72, 0x61, 0x74, 0x65, 0x73, 0x12, - 0x5a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x67, - 0x65, 0x74, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x52, 0x0a, 0x08, 0x47, - 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x14, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x22, 0x0c, - 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, - 0x62, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, - 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x3a, 0x01, 0x2a, 0x12, 0x6a, 0x0a, 0x0d, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, - 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x6d, 0x75, - 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x73, - 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, - 0x5e, 0x0a, 0x09, 0x57, 0x68, 0x61, 0x6c, 0x65, 0x42, 0x6f, 0x6d, 0x62, 0x12, 0x18, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x68, 0x61, 0x6c, 0x65, 0x42, 0x6f, 0x6d, 0x62, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, - 0x76, 0x31, 0x2f, 0x77, 0x68, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x6d, 0x62, 0x3a, 0x01, 0x2a, 0x12, - 0x5e, 0x0a, 0x0b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, + 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x57, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, + 0x65, 0x72, 0x12, 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x65, 0x74, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x5b, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x19, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31, + 0x2f, 0x67, 0x65, 0x74, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x63, 0x0a, 0x0c, 0x47, + 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x1b, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x76, 0x31, + 0x2f, 0x67, 0x65, 0x74, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x3a, 0x01, 0x2a, + 0x12, 0x67, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x12, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x6b, 0x0a, 0x0e, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x71, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x79, 0x0a, 0x14, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x12, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, + 0x74, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x30, 0x01, 0x12, 0x57, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, + 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x63, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x1b, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, + 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, + 0x69, 0x6f, 0x12, 0x7f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, + 0x69, 0x6f, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, + 0x67, 0x65, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x73, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x12, 0x76, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, + 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, + 0x6f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x7f, 0x0a, 0x16, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1a, 0x2f, + 0x76, 0x31, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, + 0x69, 0x6f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x77, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6f, + 0x72, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, + 0x46, 0x6f, 0x72, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, + 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x66, 0x6f, 0x72, 0x65, 0x78, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x67, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x65, + 0x78, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x65, 0x78, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, + 0x74, 0x46, 0x6f, 0x72, 0x65, 0x78, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, + 0x2f, 0x67, 0x65, 0x74, 0x66, 0x6f, 0x72, 0x65, 0x78, 0x72, 0x61, 0x74, 0x65, 0x73, 0x12, 0x5a, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, + 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, + 0x74, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x52, 0x0a, 0x08, 0x47, 0x65, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x14, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x22, 0x0c, 0x2f, + 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x62, + 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, + 0x01, 0x2a, 0x12, 0x6a, 0x0a, 0x0d, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x6d, + 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, + 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, + 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x5e, + 0x0a, 0x09, 0x57, 0x68, 0x61, 0x6c, 0x65, 0x42, 0x6f, 0x6d, 0x62, 0x12, 0x18, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x68, 0x61, 0x6c, 0x65, 0x42, 0x6f, 0x6d, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, + 0x31, 0x2f, 0x77, 0x68, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x6d, 0x62, 0x3a, 0x01, 0x2a, 0x12, 0x5e, + 0x0a, 0x0b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x7a, + 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x12, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, + 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x72, 0x0a, 0x0f, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, 0x6c, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, 0x6c, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x57, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, + 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, + 0x74, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x56, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x22, 0x0c, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x01, 0x2a, 0x12, + 0x5e, 0x0a, 0x0b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x76, 0x31, - 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, - 0x7a, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x62, 0x61, 0x74, - 0x63, 0x68, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x72, 0x0a, 0x0f, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1e, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, - 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, - 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, - 0x57, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x67, - 0x65, 0x74, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x56, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, - 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x22, - 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x01, 0x2a, - 0x12, 0x5e, 0x0a, 0x0b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x1a, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x76, - 0x31, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x01, 0x2a, - 0x12, 0xb2, 0x01, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x01, 0x2a, 0x12, + 0xb2, 0x01, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xaa, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xaa, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, - 0x01, 0x2a, 0x12, 0x9e, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x73, 0x12, 0x29, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x20, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x01, + 0x2a, 0x12, 0x9e, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, - 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, - 0x3a, 0x01, 0x2a, 0x12, 0x6c, 0x0a, 0x11, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, - 0x69, 0x61, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x69, 0x61, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x66, 0x69, 0x61, 0x74, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x3a, 0x01, - 0x2a, 0x12, 0x8b, 0x01, 0x0a, 0x1b, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x43, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x46, 0x75, 0x6e, 0x64, - 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2d, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x66, 0x75, 0x6e, - 0x64, 0x73, 0x77, 0x66, 0x69, 0x61, 0x74, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x3a, 0x01, 0x2a, 0x12, - 0x82, 0x01, 0x0a, 0x13, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x62, 0x79, 0x69, - 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x9d, 0x01, 0x0a, 0x1a, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x29, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x45, - 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x12, 0x29, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, + 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x3a, + 0x01, 0x2a, 0x12, 0x6c, 0x0a, 0x11, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x69, + 0x61, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x69, 0x61, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x66, 0x69, 0x61, 0x74, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x3a, 0x01, 0x2a, + 0x12, 0x8b, 0x01, 0x0a, 0x1b, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x43, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x46, 0x75, 0x6e, 0x64, 0x73, + 0x12, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2d, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x66, 0x75, 0x6e, 0x64, + 0x73, 0x77, 0x66, 0x69, 0x61, 0x74, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x82, + 0x01, 0x0a, 0x13, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, + 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x62, 0x79, 0x69, 0x64, + 0x3a, 0x01, 0x2a, 0x12, 0x9d, 0x01, 0x0a, 0x1a, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x61, 0x6c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x62, 0x79, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x16, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x44, 0x61, 0x74, 0x65, 0x12, - 0x25, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x44, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x42, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, - 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x62, - 0x79, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x73, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4c, - 0x6f, 0x67, 0x67, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1f, 0x2e, 0x67, + 0x67, 0x65, 0x12, 0x29, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, + 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x22, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, + 0x6c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x62, 0x79, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x16, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x44, 0x61, 0x74, 0x65, 0x12, 0x25, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x44, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, + 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x77, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x62, 0x79, + 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x73, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4c, 0x6f, + 0x67, 0x67, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, - 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x76, 0x0a, - 0x10, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x6f, - 0x67, 0x67, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, - 0x6f, 0x67, 0x67, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x65, 0x74, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x76, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6c, + 0x6f, 0x67, 0x67, 0x65, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x76, 0x0a, 0x10, + 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, + 0x67, 0x67, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x65, 0x74, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x76, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x69, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, - 0x69, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, - 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x70, 0x61, 0x69, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x6a, 0x0a, - 0x0f, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x69, 0x72, - 0x12, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, - 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x18, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x70, 0x61, 0x69, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x74, 0x0a, 0x12, 0x47, 0x65, 0x74, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, - 0x21, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, - 0x8c, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x29, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0x68, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x12, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, - 0x63, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0x80, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x70, 0x61, 0x69, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x6a, 0x0a, 0x0f, + 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, + 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x70, 0x61, 0x69, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x74, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x21, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x62, 0x6f, 0x6f, 0x6b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0x8c, + 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x29, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31, + 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0x68, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x12, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, + 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0x80, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x26, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x12, 0x26, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x74, 0x69, 0x63, - 0x6b, 0x65, 0x72, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0x67, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x75, 0x64, 0x69, 0x74, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x6b, 0x0a, 0x10, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x12, 0x6b, 0x0a, 0x0f, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x55, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, - 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, + 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, + 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x74, 0x69, 0x63, 0x6b, + 0x65, 0x72, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0x67, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, + 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x75, 0x64, 0x69, 0x74, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x6b, 0x0a, 0x10, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x67, + 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x12, 0x6b, 0x0a, 0x0f, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x55, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, + 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x78, 0x0a, + 0x13, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, 0x61, 0x64, 0x53, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, + 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, 0x61, 0x64, 0x53, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, + 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2f, + 0x72, 0x65, 0x61, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x70, 0x0a, 0x0f, 0x47, 0x43, 0x54, 0x53, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x6c, 0x0a, 0x0e, 0x47, 0x43, 0x54, + 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x65, 0x0a, 0x0d, 0x47, 0x43, 0x54, 0x53, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x3a, 0x01, 0x2a, 0x12, 0x6e, + 0x0a, 0x10, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x41, + 0x6c, 0x6c, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x6c, 0x6c, 0x3a, 0x01, 0x2a, 0x12, 0x73, + 0x0a, 0x10, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x6c, 0x6c, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, + 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2f, 0x6c, 0x69, 0x73, 0x74, + 0x3a, 0x01, 0x2a, 0x12, 0x77, 0x0a, 0x17, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x41, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x12, 0x20, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x41, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1b, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x61, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x7b, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x43, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, + 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x69, 0x63, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x6a, 0x0a, 0x10, 0x53, 0x65, 0x74, + 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, + 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x73, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x45, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x70, 0x61, 0x69, 0x72, 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x1c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x50, 0x61, 0x69, 0x72, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x70, 0x61, 0x69, 0x72, 0x73, 0x12, 0x77, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x12, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, + 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x12, 0x73, 0x0a, 0x10, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x73, 0x0a, 0x13, 0x57, 0x65, 0x62, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x78, - 0x0a, 0x13, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, 0x61, 0x64, 0x53, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, - 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, 0x61, 0x64, 0x53, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x17, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x2f, 0x72, 0x65, 0x61, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x70, 0x0a, 0x0f, 0x47, 0x43, 0x54, 0x53, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x6c, 0x0a, 0x0e, 0x47, 0x43, - 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x65, 0x0a, 0x0d, 0x47, 0x43, 0x54, 0x53, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x6f, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, - 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x3a, 0x01, 0x2a, 0x12, - 0x6e, 0x0a, 0x10, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x6f, 0x70, - 0x41, 0x6c, 0x6c, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, - 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x6c, 0x6c, 0x3a, 0x01, 0x2a, 0x12, - 0x73, 0x0a, 0x10, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x6c, 0x6c, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, - 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, - 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2f, 0x6c, 0x69, 0x73, - 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x77, 0x0a, 0x17, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x41, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x12, - 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x43, 0x54, 0x53, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1b, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x63, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x61, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x7b, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x43, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x43, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x68, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x69, 0x63, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x6a, 0x0a, 0x10, 0x53, 0x65, - 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x1f, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, - 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x73, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x41, 0x6c, 0x6c, - 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x22, 0x2e, - 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x70, 0x61, 0x69, 0x72, 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x1c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x75, - 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x50, 0x61, 0x69, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x75, - 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x70, 0x61, 0x69, 0x72, 0x73, 0x12, 0x77, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x12, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, - 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x73, 0x0a, 0x10, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x47, 0x65, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x47, 0x65, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x73, 0x0a, 0x13, 0x57, 0x65, - 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x65, 0x74, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, - 0x97, 0x01, 0x0a, 0x19, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x47, 0x65, 0x74, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, + 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x65, 0x74, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x97, + 0x01, 0x0a, 0x19, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x47, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x47, + 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x77, + 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x67, 0x65, 0x74, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6d, 0x0a, 0x11, 0x57, 0x65, 0x62, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x20, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, - 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x67, 0x65, 0x74, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6d, 0x0a, 0x11, 0x57, 0x65, 0x62, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x20, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, - 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x65, 0x74, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x67, 0x0a, 0x0f, 0x57, 0x65, 0x62, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x55, 0x52, 0x4c, 0x12, 0x1e, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, - 0x74, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, - 0x31, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x65, 0x74, 0x75, 0x72, - 0x6c, 0x12, 0x6a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x54, 0x72, - 0x61, 0x64, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x61, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x61, 0x76, - 0x65, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x74, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x70, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x61, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x64, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x68, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x30, 0x01, 0x12, - 0x68, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, + 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x65, 0x74, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x67, 0x0a, 0x0f, 0x57, 0x65, 0x62, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x55, 0x52, 0x4c, 0x12, 0x1e, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, + 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, + 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x65, 0x74, 0x75, 0x72, 0x6c, + 0x12, 0x6a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, + 0x64, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x61, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x61, 0x76, 0x65, + 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, + 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x70, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x64, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x73, 0x61, - 0x76, 0x65, 0x64, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x16, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x54, 0x6f, 0x43, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x54, 0x6f, 0x43, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, - 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x74, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x74, 0x6f, 0x63, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x73, 0x12, 0x9d, 0x01, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, 0x73, - 0x69, 0x6e, 0x67, 0x53, 0x61, 0x76, 0x65, 0x64, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x27, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, - 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x69, 0x6e, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x73, - 0x61, 0x76, 0x65, 0x64, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, 0x73, - 0x69, 0x6e, 0x67, 0x53, 0x61, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x64, 0x65, - 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, 0x73, - 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x76, - 0x31, 0x2f, 0x66, 0x69, 0x6e, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x73, 0x61, 0x76, - 0x65, 0x64, 0x74, 0x72, 0x61, 0x64, 0x65, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, - 0x12, 0x88, 0x01, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x12, - 0x29, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x74, 0x72, 0x61, 0x64, - 0x65, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x86, 0x01, 0x0a, 0x14, - 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x23, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, - 0x73, 0x65, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, - 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x73, - 0x65, 0x72, 0x74, 0x64, 0x61, 0x74, 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, - 0x62, 0x3a, 0x01, 0x2a, 0x12, 0x81, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, - 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x12, 0x27, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, - 0x6f, 0x62, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x65, 0x74, 0x64, 0x61, 0x74, 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, - 0x62, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x71, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, - 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x4a, 0x6f, 0x62, 0x73, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x64, 0x61, 0x74, 0x61, - 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x19, - 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, - 0x62, 0x73, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x12, 0x28, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x4a, 0x6f, 0x62, 0x73, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x73, 0x22, 0x25, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x64, 0x61, 0x74, - 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, 0x62, 0x73, 0x62, 0x65, 0x74, 0x77, - 0x65, 0x65, 0x6e, 0x12, 0x81, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x68, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x30, 0x01, 0x12, 0x68, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, + 0x12, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x61, 0x76, + 0x65, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x64, 0x54, 0x72, + 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x73, 0x61, 0x76, + 0x65, 0x64, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x54, 0x6f, 0x43, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x54, 0x6f, 0x43, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x43, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x74, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x74, 0x6f, 0x63, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x73, 0x12, 0x9d, 0x01, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, 0x73, 0x69, + 0x6e, 0x67, 0x53, 0x61, 0x76, 0x65, 0x64, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x27, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, + 0x73, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, + 0x76, 0x31, 0x2f, 0x66, 0x69, 0x6e, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x73, 0x61, + 0x76, 0x65, 0x64, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, 0x73, 0x69, + 0x6e, 0x67, 0x53, 0x61, 0x76, 0x65, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, + 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x69, 0x73, 0x73, 0x69, + 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x76, 0x31, + 0x2f, 0x66, 0x69, 0x6e, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x73, 0x61, 0x76, 0x65, + 0x64, 0x74, 0x72, 0x61, 0x64, 0x65, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, + 0x88, 0x01, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x29, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x65, 0x74, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x74, 0x72, 0x61, 0x64, 0x65, + 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x86, 0x01, 0x0a, 0x14, 0x55, + 0x70, 0x73, 0x65, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4a, 0x6f, 0x62, 0x12, 0x23, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x73, + 0x65, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x73, 0x65, + 0x72, 0x74, 0x64, 0x61, 0x74, 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, 0x62, + 0x3a, 0x01, 0x2a, 0x12, 0x81, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x27, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x64, 0x61, 0x74, 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, 0x62, - 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x44, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x71, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, + 0x6f, 0x62, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4a, 0x6f, 0x62, 0x73, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x64, 0x61, 0x74, 0x61, 0x68, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x19, 0x47, + 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, + 0x73, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x12, 0x28, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4a, 0x6f, 0x62, 0x73, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x73, 0x22, 0x25, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x64, 0x61, 0x74, 0x61, + 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, 0x62, 0x73, 0x62, 0x65, 0x74, 0x77, 0x65, + 0x65, 0x6e, 0x12, 0x81, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x27, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, + 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, + 0x74, 0x64, 0x61, 0x74, 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, 0x62, 0x73, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x65, 0x74, 0x64, 0x61, 0x74, 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x6a, 0x6f, 0x62, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x9d, 0x01, 0x0a, - 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x50, 0x72, 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, - 0x65, 0x12, 0x2f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x50, - 0x72, 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x61, 0x74, 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, 0x62, 0x70, 0x72, 0x65, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x68, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x12, 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x5f, 0x0a, 0x0b, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4d, - 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, - 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x69, - 0x66, 0x79, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x79, 0x0a, 0x13, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x22, - 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x67, 0x65, 0x74, 0x61, - 0x6c, 0x6c, 0x12, 0x76, 0x0a, 0x14, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, - 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x76, 0x0a, 0x14, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x12, 0x79, 0x0a, 0x15, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x24, 0x2e, 0x67, 0x63, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x65, 0x74, 0x64, 0x61, 0x74, 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, + 0x6f, 0x62, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x9d, 0x01, 0x0a, 0x20, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x4a, 0x6f, 0x62, 0x50, 0x72, 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x65, + 0x12, 0x2f, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x50, 0x72, + 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x82, 0x01, - 0x0a, 0x18, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, - 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x69, 0x72, 0x12, 0x27, 0x2e, 0x67, 0x63, 0x74, + 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x29, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x61, + 0x74, 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x6a, 0x6f, 0x62, 0x70, 0x72, 0x65, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x68, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x5f, 0x0a, 0x0b, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x69, 0x66, + 0x79, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x79, 0x0a, 0x13, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x22, 0x2e, + 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x67, 0x65, 0x74, 0x61, 0x6c, + 0x6c, 0x12, 0x76, 0x0a, 0x14, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, + 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x76, 0x0a, 0x14, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x12, 0x23, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x12, 0x79, 0x0a, 0x15, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x24, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x63, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x61, - 0x69, 0x72, 0x12, 0x7f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x65, 0x74, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x67, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x12, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x67, - 0x65, 0x74, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x53, 0x0a, 0x08, - 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, - 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, - 0x6e, 0x12, 0x83, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, - 0x61, 0x6c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x12, 0x23, 0x2e, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, - 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, 0x68, - 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x61, - 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4d, - 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x12, 0x24, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, + 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x82, 0x01, 0x0a, + 0x18, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, + 0x61, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x69, 0x72, 0x12, 0x27, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x61, 0x69, + 0x72, 0x12, 0x7f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x67, + 0x65, 0x74, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x67, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x12, 0x1c, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, + 0x74, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x53, 0x0a, 0x08, 0x53, + 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x17, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, + 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, + 0x12, 0x83, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, + 0x6c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x12, 0x23, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x41, + 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x63, 0x68, 0x6e, + 0x69, 0x63, 0x61, 0x6c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x65, 0x74, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6d, - 0x61, 0x72, 0x67, 0x69, 0x6e, 0x72, 0x61, 0x74, 0x65, 0x73, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x42, 0x30, 0x5a, 0x2e, 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, 0x67, 0x63, 0x74, - 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x24, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x72, 0x61, 0x74, 0x65, 0x73, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x7c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x88, + 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x63, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, + 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6f, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, + 0x63, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x66, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x72, 0x61, 0x74, 0x65, 0x73, 0x42, 0x30, 0x5a, 0x2e, 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, 0x67, 0x63, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -15034,7 +16011,7 @@ func file_rpc_proto_rawDescGZIP() []byte { return file_rpc_proto_rawDescData } -var file_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 202) +var file_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 210) var file_rpc_proto_goTypes = []interface{}{ (*GetInfoRequest)(nil), // 0: gctrpc.GetInfoRequest (*GetInfoResponse)(nil), // 1: gctrpc.GetInfoResponse @@ -15206,48 +16183,56 @@ var file_rpc_proto_goTypes = []interface{}{ (*CurrencyStateDepositRequest)(nil), // 167: gctrpc.CurrencyStateDepositRequest (*CurrencyStateResponse)(nil), // 168: gctrpc.CurrencyStateResponse (*CurrencyState)(nil), // 169: gctrpc.CurrencyState - (*GetFuturesPositionsRequest)(nil), // 170: gctrpc.GetFuturesPositionsRequest - (*GetFuturesPositionsResponse)(nil), // 171: gctrpc.GetFuturesPositionsResponse - (*FuturePosition)(nil), // 172: gctrpc.FuturePosition - (*GetCollateralRequest)(nil), // 173: gctrpc.GetCollateralRequest - (*GetCollateralResponse)(nil), // 174: gctrpc.GetCollateralResponse - (*CollateralForCurrency)(nil), // 175: gctrpc.CollateralForCurrency - (*CollateralByPosition)(nil), // 176: gctrpc.CollateralByPosition - (*CollateralUsedBreakdown)(nil), // 177: gctrpc.CollateralUsedBreakdown - (*ShutdownRequest)(nil), // 178: gctrpc.ShutdownRequest - (*ShutdownResponse)(nil), // 179: gctrpc.ShutdownResponse - (*GetTechnicalAnalysisRequest)(nil), // 180: gctrpc.GetTechnicalAnalysisRequest - (*ListOfSignals)(nil), // 181: gctrpc.ListOfSignals - (*GetTechnicalAnalysisResponse)(nil), // 182: gctrpc.GetTechnicalAnalysisResponse - (*GetMarginRatesHistoryRequest)(nil), // 183: gctrpc.GetMarginRatesHistoryRequest - (*LendingPayment)(nil), // 184: gctrpc.LendingPayment - (*BorrowCost)(nil), // 185: gctrpc.BorrowCost - (*MarginRate)(nil), // 186: gctrpc.MarginRate - (*GetMarginRatesHistoryResponse)(nil), // 187: gctrpc.GetMarginRatesHistoryResponse - nil, // 188: gctrpc.GetInfoResponse.SubsystemStatusEntry - nil, // 189: gctrpc.GetInfoResponse.RpcEndpointsEntry - nil, // 190: gctrpc.GetCommunicationRelayersResponse.CommunicationRelayersEntry - nil, // 191: gctrpc.GetSusbsytemsResponse.SubsystemsStatusEntry - nil, // 192: gctrpc.GetRPCEndpointsResponse.EndpointsEntry - nil, // 193: gctrpc.GetExchangeOTPsResponse.OtpCodesEntry - nil, // 194: gctrpc.GetExchangeInfoResponse.SupportedAssetsEntry - nil, // 195: gctrpc.OnlineCoins.CoinsEntry - nil, // 196: gctrpc.GetPortfolioSummaryResponse.CoinsOfflineSummaryEntry - nil, // 197: gctrpc.GetPortfolioSummaryResponse.CoinsOnlineSummaryEntry - nil, // 198: gctrpc.Orders.OrderStatusEntry - nil, // 199: gctrpc.GetCryptocurrencyDepositAddressesResponse.AddressesEntry - nil, // 200: gctrpc.GetExchangePairsResponse.SupportedAssetsEntry - nil, // 201: gctrpc.GetTechnicalAnalysisResponse.SignalsEntry - (*timestamppb.Timestamp)(nil), // 202: google.protobuf.Timestamp + (*FundingRate)(nil), // 170: gctrpc.FundingRate + (*FundingData)(nil), // 171: gctrpc.FundingData + (*FuturesPositionStats)(nil), // 172: gctrpc.FuturesPositionStats + (*FuturePosition)(nil), // 173: gctrpc.FuturePosition + (*GetManagedPositionRequest)(nil), // 174: gctrpc.GetManagedPositionRequest + (*GetAllManagedPositionsRequest)(nil), // 175: gctrpc.GetAllManagedPositionsRequest + (*GetManagedPositionsResponse)(nil), // 176: gctrpc.GetManagedPositionsResponse + (*GetFuturesPositionsRequest)(nil), // 177: gctrpc.GetFuturesPositionsRequest + (*GetFuturesPositionsResponse)(nil), // 178: gctrpc.GetFuturesPositionsResponse + (*GetCollateralRequest)(nil), // 179: gctrpc.GetCollateralRequest + (*GetCollateralResponse)(nil), // 180: gctrpc.GetCollateralResponse + (*CollateralForCurrency)(nil), // 181: gctrpc.CollateralForCurrency + (*CollateralByPosition)(nil), // 182: gctrpc.CollateralByPosition + (*CollateralUsedBreakdown)(nil), // 183: gctrpc.CollateralUsedBreakdown + (*GetFundingRatesRequest)(nil), // 184: gctrpc.GetFundingRatesRequest + (*GetFundingRatesResponse)(nil), // 185: gctrpc.GetFundingRatesResponse + (*ShutdownRequest)(nil), // 186: gctrpc.ShutdownRequest + (*ShutdownResponse)(nil), // 187: gctrpc.ShutdownResponse + (*GetTechnicalAnalysisRequest)(nil), // 188: gctrpc.GetTechnicalAnalysisRequest + (*ListOfSignals)(nil), // 189: gctrpc.ListOfSignals + (*GetTechnicalAnalysisResponse)(nil), // 190: gctrpc.GetTechnicalAnalysisResponse + (*GetMarginRatesHistoryRequest)(nil), // 191: gctrpc.GetMarginRatesHistoryRequest + (*LendingPayment)(nil), // 192: gctrpc.LendingPayment + (*BorrowCost)(nil), // 193: gctrpc.BorrowCost + (*MarginRate)(nil), // 194: gctrpc.MarginRate + (*GetMarginRatesHistoryResponse)(nil), // 195: gctrpc.GetMarginRatesHistoryResponse + nil, // 196: gctrpc.GetInfoResponse.SubsystemStatusEntry + nil, // 197: gctrpc.GetInfoResponse.RpcEndpointsEntry + nil, // 198: gctrpc.GetCommunicationRelayersResponse.CommunicationRelayersEntry + nil, // 199: gctrpc.GetSusbsytemsResponse.SubsystemsStatusEntry + nil, // 200: gctrpc.GetRPCEndpointsResponse.EndpointsEntry + nil, // 201: gctrpc.GetExchangeOTPsResponse.OtpCodesEntry + nil, // 202: gctrpc.GetExchangeInfoResponse.SupportedAssetsEntry + nil, // 203: gctrpc.OnlineCoins.CoinsEntry + nil, // 204: gctrpc.GetPortfolioSummaryResponse.CoinsOfflineSummaryEntry + nil, // 205: gctrpc.GetPortfolioSummaryResponse.CoinsOnlineSummaryEntry + nil, // 206: gctrpc.Orders.OrderStatusEntry + nil, // 207: gctrpc.GetCryptocurrencyDepositAddressesResponse.AddressesEntry + nil, // 208: gctrpc.GetExchangePairsResponse.SupportedAssetsEntry + nil, // 209: gctrpc.GetTechnicalAnalysisResponse.SignalsEntry + (*timestamppb.Timestamp)(nil), // 210: google.protobuf.Timestamp } var file_rpc_proto_depIdxs = []int32{ - 188, // 0: gctrpc.GetInfoResponse.subsystem_status:type_name -> gctrpc.GetInfoResponse.SubsystemStatusEntry - 189, // 1: gctrpc.GetInfoResponse.rpc_endpoints:type_name -> gctrpc.GetInfoResponse.RpcEndpointsEntry - 190, // 2: gctrpc.GetCommunicationRelayersResponse.communication_relayers:type_name -> gctrpc.GetCommunicationRelayersResponse.CommunicationRelayersEntry - 191, // 3: gctrpc.GetSusbsytemsResponse.subsystems_status:type_name -> gctrpc.GetSusbsytemsResponse.SubsystemsStatusEntry - 192, // 4: gctrpc.GetRPCEndpointsResponse.endpoints:type_name -> gctrpc.GetRPCEndpointsResponse.EndpointsEntry - 193, // 5: gctrpc.GetExchangeOTPsResponse.otp_codes:type_name -> gctrpc.GetExchangeOTPsResponse.OtpCodesEntry - 194, // 6: gctrpc.GetExchangeInfoResponse.supported_assets:type_name -> gctrpc.GetExchangeInfoResponse.SupportedAssetsEntry + 196, // 0: gctrpc.GetInfoResponse.subsystem_status:type_name -> gctrpc.GetInfoResponse.SubsystemStatusEntry + 197, // 1: gctrpc.GetInfoResponse.rpc_endpoints:type_name -> gctrpc.GetInfoResponse.RpcEndpointsEntry + 198, // 2: gctrpc.GetCommunicationRelayersResponse.communication_relayers:type_name -> gctrpc.GetCommunicationRelayersResponse.CommunicationRelayersEntry + 199, // 3: gctrpc.GetSusbsytemsResponse.subsystems_status:type_name -> gctrpc.GetSusbsytemsResponse.SubsystemsStatusEntry + 200, // 4: gctrpc.GetRPCEndpointsResponse.endpoints:type_name -> gctrpc.GetRPCEndpointsResponse.EndpointsEntry + 201, // 5: gctrpc.GetExchangeOTPsResponse.otp_codes:type_name -> gctrpc.GetExchangeOTPsResponse.OtpCodesEntry + 202, // 6: gctrpc.GetExchangeInfoResponse.supported_assets:type_name -> gctrpc.GetExchangeInfoResponse.SupportedAssetsEntry 21, // 7: gctrpc.GetTickerRequest.pair:type_name -> gctrpc.CurrencyPair 21, // 8: gctrpc.TickerResponse.pair:type_name -> gctrpc.CurrencyPair 22, // 9: gctrpc.Tickers.tickers:type_name -> gctrpc.TickerResponse @@ -15262,12 +16247,12 @@ var file_rpc_proto_depIdxs = []int32{ 33, // 18: gctrpc.GetAccountInfoResponse.accounts:type_name -> gctrpc.Account 38, // 19: gctrpc.GetPortfolioResponse.portfolio:type_name -> gctrpc.PortfolioAddress 43, // 20: gctrpc.OfflineCoins.addresses:type_name -> gctrpc.OfflineCoinSummary - 195, // 21: gctrpc.OnlineCoins.coins:type_name -> gctrpc.OnlineCoins.CoinsEntry + 203, // 21: gctrpc.OnlineCoins.coins:type_name -> gctrpc.OnlineCoins.CoinsEntry 42, // 22: gctrpc.GetPortfolioSummaryResponse.coin_totals:type_name -> gctrpc.Coin 42, // 23: gctrpc.GetPortfolioSummaryResponse.coins_offline:type_name -> gctrpc.Coin - 196, // 24: gctrpc.GetPortfolioSummaryResponse.coins_offline_summary:type_name -> gctrpc.GetPortfolioSummaryResponse.CoinsOfflineSummaryEntry + 204, // 24: gctrpc.GetPortfolioSummaryResponse.coins_offline_summary:type_name -> gctrpc.GetPortfolioSummaryResponse.CoinsOfflineSummaryEntry 42, // 25: gctrpc.GetPortfolioSummaryResponse.coins_online:type_name -> gctrpc.Coin - 197, // 26: gctrpc.GetPortfolioSummaryResponse.coins_online_summary:type_name -> gctrpc.GetPortfolioSummaryResponse.CoinsOnlineSummaryEntry + 205, // 26: gctrpc.GetPortfolioSummaryResponse.coins_online_summary:type_name -> gctrpc.GetPortfolioSummaryResponse.CoinsOnlineSummaryEntry 51, // 27: gctrpc.GetForexProvidersResponse.forex_providers:type_name -> gctrpc.ForexProvider 54, // 28: gctrpc.GetForexRatesResponse.forex_rates:type_name -> gctrpc.ForexRatesConversion 57, // 29: gctrpc.OrderDetails.trades:type_name -> gctrpc.TradeHistory @@ -15281,7 +16266,7 @@ var file_rpc_proto_depIdxs = []int32{ 21, // 37: gctrpc.WhaleBombRequest.pair:type_name -> gctrpc.CurrencyPair 21, // 38: gctrpc.CancelOrderRequest.pair:type_name -> gctrpc.CurrencyPair 21, // 39: gctrpc.CancelBatchOrdersRequest.pair:type_name -> gctrpc.CurrencyPair - 198, // 40: gctrpc.Orders.order_status:type_name -> gctrpc.Orders.OrderStatusEntry + 206, // 40: gctrpc.Orders.order_status:type_name -> gctrpc.Orders.OrderStatusEntry 69, // 41: gctrpc.CancelBatchOrdersResponse.orders:type_name -> gctrpc.Orders 69, // 42: gctrpc.CancelAllOrdersResponse.orders:type_name -> gctrpc.Orders 74, // 43: gctrpc.GetEventsResponse.condition_params:type_name -> gctrpc.ConditionParams @@ -15289,16 +16274,16 @@ var file_rpc_proto_depIdxs = []int32{ 74, // 45: gctrpc.AddEventRequest.condition_params:type_name -> gctrpc.ConditionParams 21, // 46: gctrpc.AddEventRequest.pair:type_name -> gctrpc.CurrencyPair 80, // 47: gctrpc.DepositAddresses.addresses:type_name -> gctrpc.DepositAddress - 199, // 48: gctrpc.GetCryptocurrencyDepositAddressesResponse.addresses:type_name -> gctrpc.GetCryptocurrencyDepositAddressesResponse.AddressesEntry + 207, // 48: gctrpc.GetCryptocurrencyDepositAddressesResponse.addresses:type_name -> gctrpc.GetCryptocurrencyDepositAddressesResponse.AddressesEntry 95, // 49: gctrpc.WithdrawalEventByIDResponse.event:type_name -> gctrpc.WithdrawalEventResponse 95, // 50: gctrpc.WithdrawalEventsByExchangeResponse.event:type_name -> gctrpc.WithdrawalEventResponse 96, // 51: gctrpc.WithdrawalEventResponse.exchange:type_name -> gctrpc.WithdrawlExchangeEvent 97, // 52: gctrpc.WithdrawalEventResponse.request:type_name -> gctrpc.WithdrawalRequestEvent - 202, // 53: gctrpc.WithdrawalEventResponse.created_at:type_name -> google.protobuf.Timestamp - 202, // 54: gctrpc.WithdrawalEventResponse.updated_at:type_name -> google.protobuf.Timestamp + 210, // 53: gctrpc.WithdrawalEventResponse.created_at:type_name -> google.protobuf.Timestamp + 210, // 54: gctrpc.WithdrawalEventResponse.updated_at:type_name -> google.protobuf.Timestamp 98, // 55: gctrpc.WithdrawalRequestEvent.fiat:type_name -> gctrpc.FiatWithdrawalEvent 99, // 56: gctrpc.WithdrawalRequestEvent.crypto:type_name -> gctrpc.CryptoWithdrawalEvent - 200, // 57: gctrpc.GetExchangePairsResponse.supported_assets:type_name -> gctrpc.GetExchangePairsResponse.SupportedAssetsEntry + 208, // 57: gctrpc.GetExchangePairsResponse.supported_assets:type_name -> gctrpc.GetExchangePairsResponse.SupportedAssetsEntry 21, // 58: gctrpc.SetExchangePairRequest.pairs:type_name -> gctrpc.CurrencyPair 21, // 59: gctrpc.GetOrderbookStreamRequest.pair:type_name -> gctrpc.CurrencyPair 21, // 60: gctrpc.GetTickerStreamRequest.pair:type_name -> gctrpc.CurrencyPair @@ -15328,237 +16313,253 @@ var file_rpc_proto_depIdxs = []int32{ 155, // 84: gctrpc.DataHistoryJobs.results:type_name -> gctrpc.DataHistoryJob 21, // 85: gctrpc.ModifyOrderRequest.pair:type_name -> gctrpc.CurrencyPair 169, // 86: gctrpc.CurrencyStateResponse.currency_states:type_name -> gctrpc.CurrencyState - 21, // 87: gctrpc.GetFuturesPositionsRequest.pair:type_name -> gctrpc.CurrencyPair - 172, // 88: gctrpc.GetFuturesPositionsResponse.positions:type_name -> gctrpc.FuturePosition - 56, // 89: gctrpc.FuturePosition.orders:type_name -> gctrpc.OrderDetails - 177, // 90: gctrpc.GetCollateralResponse.used_breakdown:type_name -> gctrpc.CollateralUsedBreakdown - 175, // 91: gctrpc.GetCollateralResponse.currency_breakdown:type_name -> gctrpc.CollateralForCurrency - 176, // 92: gctrpc.GetCollateralResponse.position_breakdown:type_name -> gctrpc.CollateralByPosition - 177, // 93: gctrpc.CollateralForCurrency.used_breakdown:type_name -> gctrpc.CollateralUsedBreakdown - 21, // 94: gctrpc.GetTechnicalAnalysisRequest.pair:type_name -> gctrpc.CurrencyPair - 202, // 95: gctrpc.GetTechnicalAnalysisRequest.start:type_name -> google.protobuf.Timestamp - 202, // 96: gctrpc.GetTechnicalAnalysisRequest.end:type_name -> google.protobuf.Timestamp - 21, // 97: gctrpc.GetTechnicalAnalysisRequest.other_pair:type_name -> gctrpc.CurrencyPair - 201, // 98: gctrpc.GetTechnicalAnalysisResponse.signals:type_name -> gctrpc.GetTechnicalAnalysisResponse.SignalsEntry - 186, // 99: gctrpc.GetMarginRatesHistoryRequest.rates:type_name -> gctrpc.MarginRate - 184, // 100: gctrpc.MarginRate.lending_payment:type_name -> gctrpc.LendingPayment - 185, // 101: gctrpc.MarginRate.borrow_cost:type_name -> gctrpc.BorrowCost - 186, // 102: gctrpc.GetMarginRatesHistoryResponse.rates:type_name -> gctrpc.MarginRate - 186, // 103: gctrpc.GetMarginRatesHistoryResponse.latest_rate:type_name -> gctrpc.MarginRate - 186, // 104: gctrpc.GetMarginRatesHistoryResponse.predicted_rate:type_name -> gctrpc.MarginRate - 9, // 105: gctrpc.GetInfoResponse.RpcEndpointsEntry.value:type_name -> gctrpc.RPCEndpoint - 3, // 106: gctrpc.GetCommunicationRelayersResponse.CommunicationRelayersEntry.value:type_name -> gctrpc.CommunicationRelayer - 9, // 107: gctrpc.GetRPCEndpointsResponse.EndpointsEntry.value:type_name -> gctrpc.RPCEndpoint - 18, // 108: gctrpc.GetExchangeInfoResponse.SupportedAssetsEntry.value:type_name -> gctrpc.PairsSupported - 44, // 109: gctrpc.OnlineCoins.CoinsEntry.value:type_name -> gctrpc.OnlineCoinSummary - 45, // 110: gctrpc.GetPortfolioSummaryResponse.CoinsOfflineSummaryEntry.value:type_name -> gctrpc.OfflineCoins - 46, // 111: gctrpc.GetPortfolioSummaryResponse.CoinsOnlineSummaryEntry.value:type_name -> gctrpc.OnlineCoins - 81, // 112: gctrpc.GetCryptocurrencyDepositAddressesResponse.AddressesEntry.value:type_name -> gctrpc.DepositAddresses - 18, // 113: gctrpc.GetExchangePairsResponse.SupportedAssetsEntry.value:type_name -> gctrpc.PairsSupported - 181, // 114: gctrpc.GetTechnicalAnalysisResponse.SignalsEntry.value:type_name -> gctrpc.ListOfSignals - 0, // 115: gctrpc.GoCryptoTraderService.GetInfo:input_type -> gctrpc.GetInfoRequest - 6, // 116: gctrpc.GoCryptoTraderService.GetSubsystems:input_type -> gctrpc.GetSubsystemsRequest - 5, // 117: gctrpc.GoCryptoTraderService.EnableSubsystem:input_type -> gctrpc.GenericSubsystemRequest - 5, // 118: gctrpc.GoCryptoTraderService.DisableSubsystem:input_type -> gctrpc.GenericSubsystemRequest - 8, // 119: gctrpc.GoCryptoTraderService.GetRPCEndpoints:input_type -> gctrpc.GetRPCEndpointsRequest - 2, // 120: gctrpc.GoCryptoTraderService.GetCommunicationRelayers:input_type -> gctrpc.GetCommunicationRelayersRequest - 12, // 121: gctrpc.GoCryptoTraderService.GetExchanges:input_type -> gctrpc.GetExchangesRequest - 11, // 122: gctrpc.GoCryptoTraderService.DisableExchange:input_type -> gctrpc.GenericExchangeNameRequest - 11, // 123: gctrpc.GoCryptoTraderService.GetExchangeInfo:input_type -> gctrpc.GenericExchangeNameRequest - 11, // 124: gctrpc.GoCryptoTraderService.GetExchangeOTPCode:input_type -> gctrpc.GenericExchangeNameRequest - 15, // 125: gctrpc.GoCryptoTraderService.GetExchangeOTPCodes:input_type -> gctrpc.GetExchangeOTPsRequest - 11, // 126: gctrpc.GoCryptoTraderService.EnableExchange:input_type -> gctrpc.GenericExchangeNameRequest - 20, // 127: gctrpc.GoCryptoTraderService.GetTicker:input_type -> gctrpc.GetTickerRequest - 23, // 128: gctrpc.GoCryptoTraderService.GetTickers:input_type -> gctrpc.GetTickersRequest - 26, // 129: gctrpc.GoCryptoTraderService.GetOrderbook:input_type -> gctrpc.GetOrderbookRequest - 29, // 130: gctrpc.GoCryptoTraderService.GetOrderbooks:input_type -> gctrpc.GetOrderbooksRequest - 32, // 131: gctrpc.GoCryptoTraderService.GetAccountInfo:input_type -> gctrpc.GetAccountInfoRequest - 32, // 132: gctrpc.GoCryptoTraderService.UpdateAccountInfo:input_type -> gctrpc.GetAccountInfoRequest - 32, // 133: gctrpc.GoCryptoTraderService.GetAccountInfoStream:input_type -> gctrpc.GetAccountInfoRequest - 36, // 134: gctrpc.GoCryptoTraderService.GetConfig:input_type -> gctrpc.GetConfigRequest - 39, // 135: gctrpc.GoCryptoTraderService.GetPortfolio:input_type -> gctrpc.GetPortfolioRequest - 41, // 136: gctrpc.GoCryptoTraderService.GetPortfolioSummary:input_type -> gctrpc.GetPortfolioSummaryRequest - 48, // 137: gctrpc.GoCryptoTraderService.AddPortfolioAddress:input_type -> gctrpc.AddPortfolioAddressRequest - 49, // 138: gctrpc.GoCryptoTraderService.RemovePortfolioAddress:input_type -> gctrpc.RemovePortfolioAddressRequest - 50, // 139: gctrpc.GoCryptoTraderService.GetForexProviders:input_type -> gctrpc.GetForexProvidersRequest - 53, // 140: gctrpc.GoCryptoTraderService.GetForexRates:input_type -> gctrpc.GetForexRatesRequest - 58, // 141: gctrpc.GoCryptoTraderService.GetOrders:input_type -> gctrpc.GetOrdersRequest - 60, // 142: gctrpc.GoCryptoTraderService.GetOrder:input_type -> gctrpc.GetOrderRequest - 61, // 143: gctrpc.GoCryptoTraderService.SubmitOrder:input_type -> gctrpc.SubmitOrderRequest - 64, // 144: gctrpc.GoCryptoTraderService.SimulateOrder:input_type -> gctrpc.SimulateOrderRequest - 66, // 145: gctrpc.GoCryptoTraderService.WhaleBomb:input_type -> gctrpc.WhaleBombRequest - 67, // 146: gctrpc.GoCryptoTraderService.CancelOrder:input_type -> gctrpc.CancelOrderRequest - 68, // 147: gctrpc.GoCryptoTraderService.CancelBatchOrders:input_type -> gctrpc.CancelBatchOrdersRequest - 71, // 148: gctrpc.GoCryptoTraderService.CancelAllOrders:input_type -> gctrpc.CancelAllOrdersRequest - 73, // 149: gctrpc.GoCryptoTraderService.GetEvents:input_type -> gctrpc.GetEventsRequest - 76, // 150: gctrpc.GoCryptoTraderService.AddEvent:input_type -> gctrpc.AddEventRequest - 78, // 151: gctrpc.GoCryptoTraderService.RemoveEvent:input_type -> gctrpc.RemoveEventRequest - 79, // 152: gctrpc.GoCryptoTraderService.GetCryptocurrencyDepositAddresses:input_type -> gctrpc.GetCryptocurrencyDepositAddressesRequest - 83, // 153: gctrpc.GoCryptoTraderService.GetCryptocurrencyDepositAddress:input_type -> gctrpc.GetCryptocurrencyDepositAddressRequest - 85, // 154: gctrpc.GoCryptoTraderService.GetAvailableTransferChains:input_type -> gctrpc.GetAvailableTransferChainsRequest - 87, // 155: gctrpc.GoCryptoTraderService.WithdrawFiatFunds:input_type -> gctrpc.WithdrawFiatRequest - 88, // 156: gctrpc.GoCryptoTraderService.WithdrawCryptocurrencyFunds:input_type -> gctrpc.WithdrawCryptoRequest - 90, // 157: gctrpc.GoCryptoTraderService.WithdrawalEventByID:input_type -> gctrpc.WithdrawalEventByIDRequest - 92, // 158: gctrpc.GoCryptoTraderService.WithdrawalEventsByExchange:input_type -> gctrpc.WithdrawalEventsByExchangeRequest - 93, // 159: gctrpc.GoCryptoTraderService.WithdrawalEventsByDate:input_type -> gctrpc.WithdrawalEventsByDateRequest - 100, // 160: gctrpc.GoCryptoTraderService.GetLoggerDetails:input_type -> gctrpc.GetLoggerDetailsRequest - 102, // 161: gctrpc.GoCryptoTraderService.SetLoggerDetails:input_type -> gctrpc.SetLoggerDetailsRequest - 103, // 162: gctrpc.GoCryptoTraderService.GetExchangePairs:input_type -> gctrpc.GetExchangePairsRequest - 105, // 163: gctrpc.GoCryptoTraderService.SetExchangePair:input_type -> gctrpc.SetExchangePairRequest - 106, // 164: gctrpc.GoCryptoTraderService.GetOrderbookStream:input_type -> gctrpc.GetOrderbookStreamRequest - 107, // 165: gctrpc.GoCryptoTraderService.GetExchangeOrderbookStream:input_type -> gctrpc.GetExchangeOrderbookStreamRequest - 108, // 166: gctrpc.GoCryptoTraderService.GetTickerStream:input_type -> gctrpc.GetTickerStreamRequest - 109, // 167: gctrpc.GoCryptoTraderService.GetExchangeTickerStream:input_type -> gctrpc.GetExchangeTickerStreamRequest - 110, // 168: gctrpc.GoCryptoTraderService.GetAuditEvent:input_type -> gctrpc.GetAuditEventRequest - 121, // 169: gctrpc.GoCryptoTraderService.GCTScriptExecute:input_type -> gctrpc.GCTScriptExecuteRequest - 126, // 170: gctrpc.GoCryptoTraderService.GCTScriptUpload:input_type -> gctrpc.GCTScriptUploadRequest - 127, // 171: gctrpc.GoCryptoTraderService.GCTScriptReadScript:input_type -> gctrpc.GCTScriptReadScriptRequest - 124, // 172: gctrpc.GoCryptoTraderService.GCTScriptStatus:input_type -> gctrpc.GCTScriptStatusRequest - 128, // 173: gctrpc.GoCryptoTraderService.GCTScriptQuery:input_type -> gctrpc.GCTScriptQueryRequest - 122, // 174: gctrpc.GoCryptoTraderService.GCTScriptStop:input_type -> gctrpc.GCTScriptStopRequest - 123, // 175: gctrpc.GoCryptoTraderService.GCTScriptStopAll:input_type -> gctrpc.GCTScriptStopAllRequest - 125, // 176: gctrpc.GoCryptoTraderService.GCTScriptListAll:input_type -> gctrpc.GCTScriptListAllRequest - 129, // 177: gctrpc.GoCryptoTraderService.GCTScriptAutoLoadToggle:input_type -> gctrpc.GCTScriptAutoLoadRequest - 116, // 178: gctrpc.GoCryptoTraderService.GetHistoricCandles:input_type -> gctrpc.GetHistoricCandlesRequest - 133, // 179: gctrpc.GoCryptoTraderService.SetExchangeAsset:input_type -> gctrpc.SetExchangeAssetRequest - 134, // 180: gctrpc.GoCryptoTraderService.SetAllExchangePairs:input_type -> gctrpc.SetExchangeAllPairsRequest - 135, // 181: gctrpc.GoCryptoTraderService.UpdateExchangeSupportedPairs:input_type -> gctrpc.UpdateExchangeSupportedPairsRequest - 136, // 182: gctrpc.GoCryptoTraderService.GetExchangeAssets:input_type -> gctrpc.GetExchangeAssetsRequest - 138, // 183: gctrpc.GoCryptoTraderService.WebsocketGetInfo:input_type -> gctrpc.WebsocketGetInfoRequest - 140, // 184: gctrpc.GoCryptoTraderService.WebsocketSetEnabled:input_type -> gctrpc.WebsocketSetEnabledRequest - 141, // 185: gctrpc.GoCryptoTraderService.WebsocketGetSubscriptions:input_type -> gctrpc.WebsocketGetSubscriptionsRequest - 144, // 186: gctrpc.GoCryptoTraderService.WebsocketSetProxy:input_type -> gctrpc.WebsocketSetProxyRequest - 145, // 187: gctrpc.GoCryptoTraderService.WebsocketSetURL:input_type -> gctrpc.WebsocketSetURLRequest - 112, // 188: gctrpc.GoCryptoTraderService.GetRecentTrades:input_type -> gctrpc.GetSavedTradesRequest - 112, // 189: gctrpc.GoCryptoTraderService.GetHistoricTrades:input_type -> gctrpc.GetSavedTradesRequest - 112, // 190: gctrpc.GoCryptoTraderService.GetSavedTrades:input_type -> gctrpc.GetSavedTradesRequest - 115, // 191: gctrpc.GoCryptoTraderService.ConvertTradesToCandles:input_type -> gctrpc.ConvertTradesToCandlesRequest - 146, // 192: gctrpc.GoCryptoTraderService.FindMissingSavedCandleIntervals:input_type -> gctrpc.FindMissingCandlePeriodsRequest - 147, // 193: gctrpc.GoCryptoTraderService.FindMissingSavedTradeIntervals:input_type -> gctrpc.FindMissingTradePeriodsRequest - 149, // 194: gctrpc.GoCryptoTraderService.SetExchangeTradeProcessing:input_type -> gctrpc.SetExchangeTradeProcessingRequest - 150, // 195: gctrpc.GoCryptoTraderService.UpsertDataHistoryJob:input_type -> gctrpc.UpsertDataHistoryJobRequest - 154, // 196: gctrpc.GoCryptoTraderService.GetDataHistoryJobDetails:input_type -> gctrpc.GetDataHistoryJobDetailsRequest - 0, // 197: gctrpc.GoCryptoTraderService.GetActiveDataHistoryJobs:input_type -> gctrpc.GetInfoRequest - 158, // 198: gctrpc.GoCryptoTraderService.GetDataHistoryJobsBetween:input_type -> gctrpc.GetDataHistoryJobsBetweenRequest - 154, // 199: gctrpc.GoCryptoTraderService.GetDataHistoryJobSummary:input_type -> gctrpc.GetDataHistoryJobDetailsRequest - 159, // 200: gctrpc.GoCryptoTraderService.SetDataHistoryJobStatus:input_type -> gctrpc.SetDataHistoryJobStatusRequest - 160, // 201: gctrpc.GoCryptoTraderService.UpdateDataHistoryJobPrerequisite:input_type -> gctrpc.UpdateDataHistoryJobPrerequisiteRequest - 58, // 202: gctrpc.GoCryptoTraderService.GetManagedOrders:input_type -> gctrpc.GetOrdersRequest - 161, // 203: gctrpc.GoCryptoTraderService.ModifyOrder:input_type -> gctrpc.ModifyOrderRequest - 163, // 204: gctrpc.GoCryptoTraderService.CurrencyStateGetAll:input_type -> gctrpc.CurrencyStateGetAllRequest - 164, // 205: gctrpc.GoCryptoTraderService.CurrencyStateTrading:input_type -> gctrpc.CurrencyStateTradingRequest - 167, // 206: gctrpc.GoCryptoTraderService.CurrencyStateDeposit:input_type -> gctrpc.CurrencyStateDepositRequest - 166, // 207: gctrpc.GoCryptoTraderService.CurrencyStateWithdraw:input_type -> gctrpc.CurrencyStateWithdrawRequest - 165, // 208: gctrpc.GoCryptoTraderService.CurrencyStateTradingPair:input_type -> gctrpc.CurrencyStateTradingPairRequest - 170, // 209: gctrpc.GoCryptoTraderService.GetFuturesPositions:input_type -> gctrpc.GetFuturesPositionsRequest - 173, // 210: gctrpc.GoCryptoTraderService.GetCollateral:input_type -> gctrpc.GetCollateralRequest - 178, // 211: gctrpc.GoCryptoTraderService.Shutdown:input_type -> gctrpc.ShutdownRequest - 180, // 212: gctrpc.GoCryptoTraderService.GetTechnicalAnalysis:input_type -> gctrpc.GetTechnicalAnalysisRequest - 183, // 213: gctrpc.GoCryptoTraderService.GetMarginRatesHistory:input_type -> gctrpc.GetMarginRatesHistoryRequest - 1, // 214: gctrpc.GoCryptoTraderService.GetInfo:output_type -> gctrpc.GetInfoResponse - 7, // 215: gctrpc.GoCryptoTraderService.GetSubsystems:output_type -> gctrpc.GetSusbsytemsResponse - 132, // 216: gctrpc.GoCryptoTraderService.EnableSubsystem:output_type -> gctrpc.GenericResponse - 132, // 217: gctrpc.GoCryptoTraderService.DisableSubsystem:output_type -> gctrpc.GenericResponse - 10, // 218: gctrpc.GoCryptoTraderService.GetRPCEndpoints:output_type -> gctrpc.GetRPCEndpointsResponse - 4, // 219: gctrpc.GoCryptoTraderService.GetCommunicationRelayers:output_type -> gctrpc.GetCommunicationRelayersResponse - 13, // 220: gctrpc.GoCryptoTraderService.GetExchanges:output_type -> gctrpc.GetExchangesResponse - 132, // 221: gctrpc.GoCryptoTraderService.DisableExchange:output_type -> gctrpc.GenericResponse - 19, // 222: gctrpc.GoCryptoTraderService.GetExchangeInfo:output_type -> gctrpc.GetExchangeInfoResponse - 14, // 223: gctrpc.GoCryptoTraderService.GetExchangeOTPCode:output_type -> gctrpc.GetExchangeOTPResponse - 16, // 224: gctrpc.GoCryptoTraderService.GetExchangeOTPCodes:output_type -> gctrpc.GetExchangeOTPsResponse - 132, // 225: gctrpc.GoCryptoTraderService.EnableExchange:output_type -> gctrpc.GenericResponse - 22, // 226: gctrpc.GoCryptoTraderService.GetTicker:output_type -> gctrpc.TickerResponse - 25, // 227: gctrpc.GoCryptoTraderService.GetTickers:output_type -> gctrpc.GetTickersResponse - 28, // 228: gctrpc.GoCryptoTraderService.GetOrderbook:output_type -> gctrpc.OrderbookResponse - 31, // 229: gctrpc.GoCryptoTraderService.GetOrderbooks:output_type -> gctrpc.GetOrderbooksResponse - 35, // 230: gctrpc.GoCryptoTraderService.GetAccountInfo:output_type -> gctrpc.GetAccountInfoResponse - 35, // 231: gctrpc.GoCryptoTraderService.UpdateAccountInfo:output_type -> gctrpc.GetAccountInfoResponse - 35, // 232: gctrpc.GoCryptoTraderService.GetAccountInfoStream:output_type -> gctrpc.GetAccountInfoResponse - 37, // 233: gctrpc.GoCryptoTraderService.GetConfig:output_type -> gctrpc.GetConfigResponse - 40, // 234: gctrpc.GoCryptoTraderService.GetPortfolio:output_type -> gctrpc.GetPortfolioResponse - 47, // 235: gctrpc.GoCryptoTraderService.GetPortfolioSummary:output_type -> gctrpc.GetPortfolioSummaryResponse - 132, // 236: gctrpc.GoCryptoTraderService.AddPortfolioAddress:output_type -> gctrpc.GenericResponse - 132, // 237: gctrpc.GoCryptoTraderService.RemovePortfolioAddress:output_type -> gctrpc.GenericResponse - 52, // 238: gctrpc.GoCryptoTraderService.GetForexProviders:output_type -> gctrpc.GetForexProvidersResponse - 55, // 239: gctrpc.GoCryptoTraderService.GetForexRates:output_type -> gctrpc.GetForexRatesResponse - 59, // 240: gctrpc.GoCryptoTraderService.GetOrders:output_type -> gctrpc.GetOrdersResponse - 56, // 241: gctrpc.GoCryptoTraderService.GetOrder:output_type -> gctrpc.OrderDetails - 63, // 242: gctrpc.GoCryptoTraderService.SubmitOrder:output_type -> gctrpc.SubmitOrderResponse - 65, // 243: gctrpc.GoCryptoTraderService.SimulateOrder:output_type -> gctrpc.SimulateOrderResponse - 65, // 244: gctrpc.GoCryptoTraderService.WhaleBomb:output_type -> gctrpc.SimulateOrderResponse - 132, // 245: gctrpc.GoCryptoTraderService.CancelOrder:output_type -> gctrpc.GenericResponse - 70, // 246: gctrpc.GoCryptoTraderService.CancelBatchOrders:output_type -> gctrpc.CancelBatchOrdersResponse - 72, // 247: gctrpc.GoCryptoTraderService.CancelAllOrders:output_type -> gctrpc.CancelAllOrdersResponse - 75, // 248: gctrpc.GoCryptoTraderService.GetEvents:output_type -> gctrpc.GetEventsResponse - 77, // 249: gctrpc.GoCryptoTraderService.AddEvent:output_type -> gctrpc.AddEventResponse - 132, // 250: gctrpc.GoCryptoTraderService.RemoveEvent:output_type -> gctrpc.GenericResponse - 82, // 251: gctrpc.GoCryptoTraderService.GetCryptocurrencyDepositAddresses:output_type -> gctrpc.GetCryptocurrencyDepositAddressesResponse - 84, // 252: gctrpc.GoCryptoTraderService.GetCryptocurrencyDepositAddress:output_type -> gctrpc.GetCryptocurrencyDepositAddressResponse - 86, // 253: gctrpc.GoCryptoTraderService.GetAvailableTransferChains:output_type -> gctrpc.GetAvailableTransferChainsResponse - 89, // 254: gctrpc.GoCryptoTraderService.WithdrawFiatFunds:output_type -> gctrpc.WithdrawResponse - 89, // 255: gctrpc.GoCryptoTraderService.WithdrawCryptocurrencyFunds:output_type -> gctrpc.WithdrawResponse - 91, // 256: gctrpc.GoCryptoTraderService.WithdrawalEventByID:output_type -> gctrpc.WithdrawalEventByIDResponse - 94, // 257: gctrpc.GoCryptoTraderService.WithdrawalEventsByExchange:output_type -> gctrpc.WithdrawalEventsByExchangeResponse - 94, // 258: gctrpc.GoCryptoTraderService.WithdrawalEventsByDate:output_type -> gctrpc.WithdrawalEventsByExchangeResponse - 101, // 259: gctrpc.GoCryptoTraderService.GetLoggerDetails:output_type -> gctrpc.GetLoggerDetailsResponse - 101, // 260: gctrpc.GoCryptoTraderService.SetLoggerDetails:output_type -> gctrpc.GetLoggerDetailsResponse - 104, // 261: gctrpc.GoCryptoTraderService.GetExchangePairs:output_type -> gctrpc.GetExchangePairsResponse - 132, // 262: gctrpc.GoCryptoTraderService.SetExchangePair:output_type -> gctrpc.GenericResponse - 28, // 263: gctrpc.GoCryptoTraderService.GetOrderbookStream:output_type -> gctrpc.OrderbookResponse - 28, // 264: gctrpc.GoCryptoTraderService.GetExchangeOrderbookStream:output_type -> gctrpc.OrderbookResponse - 22, // 265: gctrpc.GoCryptoTraderService.GetTickerStream:output_type -> gctrpc.TickerResponse - 22, // 266: gctrpc.GoCryptoTraderService.GetExchangeTickerStream:output_type -> gctrpc.TickerResponse - 111, // 267: gctrpc.GoCryptoTraderService.GetAuditEvent:output_type -> gctrpc.GetAuditEventResponse - 132, // 268: gctrpc.GoCryptoTraderService.GCTScriptExecute:output_type -> gctrpc.GenericResponse - 132, // 269: gctrpc.GoCryptoTraderService.GCTScriptUpload:output_type -> gctrpc.GenericResponse - 131, // 270: gctrpc.GoCryptoTraderService.GCTScriptReadScript:output_type -> gctrpc.GCTScriptQueryResponse - 130, // 271: gctrpc.GoCryptoTraderService.GCTScriptStatus:output_type -> gctrpc.GCTScriptStatusResponse - 131, // 272: gctrpc.GoCryptoTraderService.GCTScriptQuery:output_type -> gctrpc.GCTScriptQueryResponse - 132, // 273: gctrpc.GoCryptoTraderService.GCTScriptStop:output_type -> gctrpc.GenericResponse - 132, // 274: gctrpc.GoCryptoTraderService.GCTScriptStopAll:output_type -> gctrpc.GenericResponse - 130, // 275: gctrpc.GoCryptoTraderService.GCTScriptListAll:output_type -> gctrpc.GCTScriptStatusResponse - 132, // 276: gctrpc.GoCryptoTraderService.GCTScriptAutoLoadToggle:output_type -> gctrpc.GenericResponse - 117, // 277: gctrpc.GoCryptoTraderService.GetHistoricCandles:output_type -> gctrpc.GetHistoricCandlesResponse - 132, // 278: gctrpc.GoCryptoTraderService.SetExchangeAsset:output_type -> gctrpc.GenericResponse - 132, // 279: gctrpc.GoCryptoTraderService.SetAllExchangePairs:output_type -> gctrpc.GenericResponse - 132, // 280: gctrpc.GoCryptoTraderService.UpdateExchangeSupportedPairs:output_type -> gctrpc.GenericResponse - 137, // 281: gctrpc.GoCryptoTraderService.GetExchangeAssets:output_type -> gctrpc.GetExchangeAssetsResponse - 139, // 282: gctrpc.GoCryptoTraderService.WebsocketGetInfo:output_type -> gctrpc.WebsocketGetInfoResponse - 132, // 283: gctrpc.GoCryptoTraderService.WebsocketSetEnabled:output_type -> gctrpc.GenericResponse - 143, // 284: gctrpc.GoCryptoTraderService.WebsocketGetSubscriptions:output_type -> gctrpc.WebsocketGetSubscriptionsResponse - 132, // 285: gctrpc.GoCryptoTraderService.WebsocketSetProxy:output_type -> gctrpc.GenericResponse - 132, // 286: gctrpc.GoCryptoTraderService.WebsocketSetURL:output_type -> gctrpc.GenericResponse - 114, // 287: gctrpc.GoCryptoTraderService.GetRecentTrades:output_type -> gctrpc.SavedTradesResponse - 114, // 288: gctrpc.GoCryptoTraderService.GetHistoricTrades:output_type -> gctrpc.SavedTradesResponse - 114, // 289: gctrpc.GoCryptoTraderService.GetSavedTrades:output_type -> gctrpc.SavedTradesResponse - 117, // 290: gctrpc.GoCryptoTraderService.ConvertTradesToCandles:output_type -> gctrpc.GetHistoricCandlesResponse - 148, // 291: gctrpc.GoCryptoTraderService.FindMissingSavedCandleIntervals:output_type -> gctrpc.FindMissingIntervalsResponse - 148, // 292: gctrpc.GoCryptoTraderService.FindMissingSavedTradeIntervals:output_type -> gctrpc.FindMissingIntervalsResponse - 132, // 293: gctrpc.GoCryptoTraderService.SetExchangeTradeProcessing:output_type -> gctrpc.GenericResponse - 153, // 294: gctrpc.GoCryptoTraderService.UpsertDataHistoryJob:output_type -> gctrpc.UpsertDataHistoryJobResponse - 155, // 295: gctrpc.GoCryptoTraderService.GetDataHistoryJobDetails:output_type -> gctrpc.DataHistoryJob - 157, // 296: gctrpc.GoCryptoTraderService.GetActiveDataHistoryJobs:output_type -> gctrpc.DataHistoryJobs - 157, // 297: gctrpc.GoCryptoTraderService.GetDataHistoryJobsBetween:output_type -> gctrpc.DataHistoryJobs - 155, // 298: gctrpc.GoCryptoTraderService.GetDataHistoryJobSummary:output_type -> gctrpc.DataHistoryJob - 132, // 299: gctrpc.GoCryptoTraderService.SetDataHistoryJobStatus:output_type -> gctrpc.GenericResponse - 132, // 300: gctrpc.GoCryptoTraderService.UpdateDataHistoryJobPrerequisite:output_type -> gctrpc.GenericResponse - 59, // 301: gctrpc.GoCryptoTraderService.GetManagedOrders:output_type -> gctrpc.GetOrdersResponse - 162, // 302: gctrpc.GoCryptoTraderService.ModifyOrder:output_type -> gctrpc.ModifyOrderResponse - 168, // 303: gctrpc.GoCryptoTraderService.CurrencyStateGetAll:output_type -> gctrpc.CurrencyStateResponse - 132, // 304: gctrpc.GoCryptoTraderService.CurrencyStateTrading:output_type -> gctrpc.GenericResponse - 132, // 305: gctrpc.GoCryptoTraderService.CurrencyStateDeposit:output_type -> gctrpc.GenericResponse - 132, // 306: gctrpc.GoCryptoTraderService.CurrencyStateWithdraw:output_type -> gctrpc.GenericResponse - 132, // 307: gctrpc.GoCryptoTraderService.CurrencyStateTradingPair:output_type -> gctrpc.GenericResponse - 171, // 308: gctrpc.GoCryptoTraderService.GetFuturesPositions:output_type -> gctrpc.GetFuturesPositionsResponse - 174, // 309: gctrpc.GoCryptoTraderService.GetCollateral:output_type -> gctrpc.GetCollateralResponse - 179, // 310: gctrpc.GoCryptoTraderService.Shutdown:output_type -> gctrpc.ShutdownResponse - 182, // 311: gctrpc.GoCryptoTraderService.GetTechnicalAnalysis:output_type -> gctrpc.GetTechnicalAnalysisResponse - 187, // 312: gctrpc.GoCryptoTraderService.GetMarginRatesHistory:output_type -> gctrpc.GetMarginRatesHistoryResponse - 214, // [214:313] is the sub-list for method output_type - 115, // [115:214] is the sub-list for method input_type - 115, // [115:115] is the sub-list for extension type_name - 115, // [115:115] is the sub-list for extension extendee - 0, // [0:115] is the sub-list for field type_name + 21, // 87: gctrpc.FundingData.pair:type_name -> gctrpc.CurrencyPair + 170, // 88: gctrpc.FundingData.rates:type_name -> gctrpc.FundingRate + 170, // 89: gctrpc.FundingData.latest_rate:type_name -> gctrpc.FundingRate + 170, // 90: gctrpc.FundingData.upcoming_rate:type_name -> gctrpc.FundingRate + 21, // 91: gctrpc.FuturePosition.pair:type_name -> gctrpc.CurrencyPair + 56, // 92: gctrpc.FuturePosition.orders:type_name -> gctrpc.OrderDetails + 172, // 93: gctrpc.FuturePosition.position_stats:type_name -> gctrpc.FuturesPositionStats + 171, // 94: gctrpc.FuturePosition.funding_data:type_name -> gctrpc.FundingData + 21, // 95: gctrpc.GetManagedPositionRequest.pair:type_name -> gctrpc.CurrencyPair + 173, // 96: gctrpc.GetManagedPositionsResponse.positions:type_name -> gctrpc.FuturePosition + 21, // 97: gctrpc.GetFuturesPositionsRequest.pair:type_name -> gctrpc.CurrencyPair + 173, // 98: gctrpc.GetFuturesPositionsResponse.positions:type_name -> gctrpc.FuturePosition + 183, // 99: gctrpc.GetCollateralResponse.used_breakdown:type_name -> gctrpc.CollateralUsedBreakdown + 181, // 100: gctrpc.GetCollateralResponse.currency_breakdown:type_name -> gctrpc.CollateralForCurrency + 182, // 101: gctrpc.GetCollateralResponse.position_breakdown:type_name -> gctrpc.CollateralByPosition + 183, // 102: gctrpc.CollateralForCurrency.used_breakdown:type_name -> gctrpc.CollateralUsedBreakdown + 171, // 103: gctrpc.GetFundingRatesResponse.funding_payments:type_name -> gctrpc.FundingData + 21, // 104: gctrpc.GetTechnicalAnalysisRequest.pair:type_name -> gctrpc.CurrencyPair + 210, // 105: gctrpc.GetTechnicalAnalysisRequest.start:type_name -> google.protobuf.Timestamp + 210, // 106: gctrpc.GetTechnicalAnalysisRequest.end:type_name -> google.protobuf.Timestamp + 21, // 107: gctrpc.GetTechnicalAnalysisRequest.other_pair:type_name -> gctrpc.CurrencyPair + 209, // 108: gctrpc.GetTechnicalAnalysisResponse.signals:type_name -> gctrpc.GetTechnicalAnalysisResponse.SignalsEntry + 194, // 109: gctrpc.GetMarginRatesHistoryRequest.rates:type_name -> gctrpc.MarginRate + 192, // 110: gctrpc.MarginRate.lending_payment:type_name -> gctrpc.LendingPayment + 193, // 111: gctrpc.MarginRate.borrow_cost:type_name -> gctrpc.BorrowCost + 194, // 112: gctrpc.GetMarginRatesHistoryResponse.rates:type_name -> gctrpc.MarginRate + 194, // 113: gctrpc.GetMarginRatesHistoryResponse.latest_rate:type_name -> gctrpc.MarginRate + 194, // 114: gctrpc.GetMarginRatesHistoryResponse.predicted_rate:type_name -> gctrpc.MarginRate + 9, // 115: gctrpc.GetInfoResponse.RpcEndpointsEntry.value:type_name -> gctrpc.RPCEndpoint + 3, // 116: gctrpc.GetCommunicationRelayersResponse.CommunicationRelayersEntry.value:type_name -> gctrpc.CommunicationRelayer + 9, // 117: gctrpc.GetRPCEndpointsResponse.EndpointsEntry.value:type_name -> gctrpc.RPCEndpoint + 18, // 118: gctrpc.GetExchangeInfoResponse.SupportedAssetsEntry.value:type_name -> gctrpc.PairsSupported + 44, // 119: gctrpc.OnlineCoins.CoinsEntry.value:type_name -> gctrpc.OnlineCoinSummary + 45, // 120: gctrpc.GetPortfolioSummaryResponse.CoinsOfflineSummaryEntry.value:type_name -> gctrpc.OfflineCoins + 46, // 121: gctrpc.GetPortfolioSummaryResponse.CoinsOnlineSummaryEntry.value:type_name -> gctrpc.OnlineCoins + 81, // 122: gctrpc.GetCryptocurrencyDepositAddressesResponse.AddressesEntry.value:type_name -> gctrpc.DepositAddresses + 18, // 123: gctrpc.GetExchangePairsResponse.SupportedAssetsEntry.value:type_name -> gctrpc.PairsSupported + 189, // 124: gctrpc.GetTechnicalAnalysisResponse.SignalsEntry.value:type_name -> gctrpc.ListOfSignals + 0, // 125: gctrpc.GoCryptoTraderService.GetInfo:input_type -> gctrpc.GetInfoRequest + 6, // 126: gctrpc.GoCryptoTraderService.GetSubsystems:input_type -> gctrpc.GetSubsystemsRequest + 5, // 127: gctrpc.GoCryptoTraderService.EnableSubsystem:input_type -> gctrpc.GenericSubsystemRequest + 5, // 128: gctrpc.GoCryptoTraderService.DisableSubsystem:input_type -> gctrpc.GenericSubsystemRequest + 8, // 129: gctrpc.GoCryptoTraderService.GetRPCEndpoints:input_type -> gctrpc.GetRPCEndpointsRequest + 2, // 130: gctrpc.GoCryptoTraderService.GetCommunicationRelayers:input_type -> gctrpc.GetCommunicationRelayersRequest + 12, // 131: gctrpc.GoCryptoTraderService.GetExchanges:input_type -> gctrpc.GetExchangesRequest + 11, // 132: gctrpc.GoCryptoTraderService.DisableExchange:input_type -> gctrpc.GenericExchangeNameRequest + 11, // 133: gctrpc.GoCryptoTraderService.GetExchangeInfo:input_type -> gctrpc.GenericExchangeNameRequest + 11, // 134: gctrpc.GoCryptoTraderService.GetExchangeOTPCode:input_type -> gctrpc.GenericExchangeNameRequest + 15, // 135: gctrpc.GoCryptoTraderService.GetExchangeOTPCodes:input_type -> gctrpc.GetExchangeOTPsRequest + 11, // 136: gctrpc.GoCryptoTraderService.EnableExchange:input_type -> gctrpc.GenericExchangeNameRequest + 20, // 137: gctrpc.GoCryptoTraderService.GetTicker:input_type -> gctrpc.GetTickerRequest + 23, // 138: gctrpc.GoCryptoTraderService.GetTickers:input_type -> gctrpc.GetTickersRequest + 26, // 139: gctrpc.GoCryptoTraderService.GetOrderbook:input_type -> gctrpc.GetOrderbookRequest + 29, // 140: gctrpc.GoCryptoTraderService.GetOrderbooks:input_type -> gctrpc.GetOrderbooksRequest + 32, // 141: gctrpc.GoCryptoTraderService.GetAccountInfo:input_type -> gctrpc.GetAccountInfoRequest + 32, // 142: gctrpc.GoCryptoTraderService.UpdateAccountInfo:input_type -> gctrpc.GetAccountInfoRequest + 32, // 143: gctrpc.GoCryptoTraderService.GetAccountInfoStream:input_type -> gctrpc.GetAccountInfoRequest + 36, // 144: gctrpc.GoCryptoTraderService.GetConfig:input_type -> gctrpc.GetConfigRequest + 39, // 145: gctrpc.GoCryptoTraderService.GetPortfolio:input_type -> gctrpc.GetPortfolioRequest + 41, // 146: gctrpc.GoCryptoTraderService.GetPortfolioSummary:input_type -> gctrpc.GetPortfolioSummaryRequest + 48, // 147: gctrpc.GoCryptoTraderService.AddPortfolioAddress:input_type -> gctrpc.AddPortfolioAddressRequest + 49, // 148: gctrpc.GoCryptoTraderService.RemovePortfolioAddress:input_type -> gctrpc.RemovePortfolioAddressRequest + 50, // 149: gctrpc.GoCryptoTraderService.GetForexProviders:input_type -> gctrpc.GetForexProvidersRequest + 53, // 150: gctrpc.GoCryptoTraderService.GetForexRates:input_type -> gctrpc.GetForexRatesRequest + 58, // 151: gctrpc.GoCryptoTraderService.GetOrders:input_type -> gctrpc.GetOrdersRequest + 60, // 152: gctrpc.GoCryptoTraderService.GetOrder:input_type -> gctrpc.GetOrderRequest + 61, // 153: gctrpc.GoCryptoTraderService.SubmitOrder:input_type -> gctrpc.SubmitOrderRequest + 64, // 154: gctrpc.GoCryptoTraderService.SimulateOrder:input_type -> gctrpc.SimulateOrderRequest + 66, // 155: gctrpc.GoCryptoTraderService.WhaleBomb:input_type -> gctrpc.WhaleBombRequest + 67, // 156: gctrpc.GoCryptoTraderService.CancelOrder:input_type -> gctrpc.CancelOrderRequest + 68, // 157: gctrpc.GoCryptoTraderService.CancelBatchOrders:input_type -> gctrpc.CancelBatchOrdersRequest + 71, // 158: gctrpc.GoCryptoTraderService.CancelAllOrders:input_type -> gctrpc.CancelAllOrdersRequest + 73, // 159: gctrpc.GoCryptoTraderService.GetEvents:input_type -> gctrpc.GetEventsRequest + 76, // 160: gctrpc.GoCryptoTraderService.AddEvent:input_type -> gctrpc.AddEventRequest + 78, // 161: gctrpc.GoCryptoTraderService.RemoveEvent:input_type -> gctrpc.RemoveEventRequest + 79, // 162: gctrpc.GoCryptoTraderService.GetCryptocurrencyDepositAddresses:input_type -> gctrpc.GetCryptocurrencyDepositAddressesRequest + 83, // 163: gctrpc.GoCryptoTraderService.GetCryptocurrencyDepositAddress:input_type -> gctrpc.GetCryptocurrencyDepositAddressRequest + 85, // 164: gctrpc.GoCryptoTraderService.GetAvailableTransferChains:input_type -> gctrpc.GetAvailableTransferChainsRequest + 87, // 165: gctrpc.GoCryptoTraderService.WithdrawFiatFunds:input_type -> gctrpc.WithdrawFiatRequest + 88, // 166: gctrpc.GoCryptoTraderService.WithdrawCryptocurrencyFunds:input_type -> gctrpc.WithdrawCryptoRequest + 90, // 167: gctrpc.GoCryptoTraderService.WithdrawalEventByID:input_type -> gctrpc.WithdrawalEventByIDRequest + 92, // 168: gctrpc.GoCryptoTraderService.WithdrawalEventsByExchange:input_type -> gctrpc.WithdrawalEventsByExchangeRequest + 93, // 169: gctrpc.GoCryptoTraderService.WithdrawalEventsByDate:input_type -> gctrpc.WithdrawalEventsByDateRequest + 100, // 170: gctrpc.GoCryptoTraderService.GetLoggerDetails:input_type -> gctrpc.GetLoggerDetailsRequest + 102, // 171: gctrpc.GoCryptoTraderService.SetLoggerDetails:input_type -> gctrpc.SetLoggerDetailsRequest + 103, // 172: gctrpc.GoCryptoTraderService.GetExchangePairs:input_type -> gctrpc.GetExchangePairsRequest + 105, // 173: gctrpc.GoCryptoTraderService.SetExchangePair:input_type -> gctrpc.SetExchangePairRequest + 106, // 174: gctrpc.GoCryptoTraderService.GetOrderbookStream:input_type -> gctrpc.GetOrderbookStreamRequest + 107, // 175: gctrpc.GoCryptoTraderService.GetExchangeOrderbookStream:input_type -> gctrpc.GetExchangeOrderbookStreamRequest + 108, // 176: gctrpc.GoCryptoTraderService.GetTickerStream:input_type -> gctrpc.GetTickerStreamRequest + 109, // 177: gctrpc.GoCryptoTraderService.GetExchangeTickerStream:input_type -> gctrpc.GetExchangeTickerStreamRequest + 110, // 178: gctrpc.GoCryptoTraderService.GetAuditEvent:input_type -> gctrpc.GetAuditEventRequest + 121, // 179: gctrpc.GoCryptoTraderService.GCTScriptExecute:input_type -> gctrpc.GCTScriptExecuteRequest + 126, // 180: gctrpc.GoCryptoTraderService.GCTScriptUpload:input_type -> gctrpc.GCTScriptUploadRequest + 127, // 181: gctrpc.GoCryptoTraderService.GCTScriptReadScript:input_type -> gctrpc.GCTScriptReadScriptRequest + 124, // 182: gctrpc.GoCryptoTraderService.GCTScriptStatus:input_type -> gctrpc.GCTScriptStatusRequest + 128, // 183: gctrpc.GoCryptoTraderService.GCTScriptQuery:input_type -> gctrpc.GCTScriptQueryRequest + 122, // 184: gctrpc.GoCryptoTraderService.GCTScriptStop:input_type -> gctrpc.GCTScriptStopRequest + 123, // 185: gctrpc.GoCryptoTraderService.GCTScriptStopAll:input_type -> gctrpc.GCTScriptStopAllRequest + 125, // 186: gctrpc.GoCryptoTraderService.GCTScriptListAll:input_type -> gctrpc.GCTScriptListAllRequest + 129, // 187: gctrpc.GoCryptoTraderService.GCTScriptAutoLoadToggle:input_type -> gctrpc.GCTScriptAutoLoadRequest + 116, // 188: gctrpc.GoCryptoTraderService.GetHistoricCandles:input_type -> gctrpc.GetHistoricCandlesRequest + 133, // 189: gctrpc.GoCryptoTraderService.SetExchangeAsset:input_type -> gctrpc.SetExchangeAssetRequest + 134, // 190: gctrpc.GoCryptoTraderService.SetAllExchangePairs:input_type -> gctrpc.SetExchangeAllPairsRequest + 135, // 191: gctrpc.GoCryptoTraderService.UpdateExchangeSupportedPairs:input_type -> gctrpc.UpdateExchangeSupportedPairsRequest + 136, // 192: gctrpc.GoCryptoTraderService.GetExchangeAssets:input_type -> gctrpc.GetExchangeAssetsRequest + 138, // 193: gctrpc.GoCryptoTraderService.WebsocketGetInfo:input_type -> gctrpc.WebsocketGetInfoRequest + 140, // 194: gctrpc.GoCryptoTraderService.WebsocketSetEnabled:input_type -> gctrpc.WebsocketSetEnabledRequest + 141, // 195: gctrpc.GoCryptoTraderService.WebsocketGetSubscriptions:input_type -> gctrpc.WebsocketGetSubscriptionsRequest + 144, // 196: gctrpc.GoCryptoTraderService.WebsocketSetProxy:input_type -> gctrpc.WebsocketSetProxyRequest + 145, // 197: gctrpc.GoCryptoTraderService.WebsocketSetURL:input_type -> gctrpc.WebsocketSetURLRequest + 112, // 198: gctrpc.GoCryptoTraderService.GetRecentTrades:input_type -> gctrpc.GetSavedTradesRequest + 112, // 199: gctrpc.GoCryptoTraderService.GetHistoricTrades:input_type -> gctrpc.GetSavedTradesRequest + 112, // 200: gctrpc.GoCryptoTraderService.GetSavedTrades:input_type -> gctrpc.GetSavedTradesRequest + 115, // 201: gctrpc.GoCryptoTraderService.ConvertTradesToCandles:input_type -> gctrpc.ConvertTradesToCandlesRequest + 146, // 202: gctrpc.GoCryptoTraderService.FindMissingSavedCandleIntervals:input_type -> gctrpc.FindMissingCandlePeriodsRequest + 147, // 203: gctrpc.GoCryptoTraderService.FindMissingSavedTradeIntervals:input_type -> gctrpc.FindMissingTradePeriodsRequest + 149, // 204: gctrpc.GoCryptoTraderService.SetExchangeTradeProcessing:input_type -> gctrpc.SetExchangeTradeProcessingRequest + 150, // 205: gctrpc.GoCryptoTraderService.UpsertDataHistoryJob:input_type -> gctrpc.UpsertDataHistoryJobRequest + 154, // 206: gctrpc.GoCryptoTraderService.GetDataHistoryJobDetails:input_type -> gctrpc.GetDataHistoryJobDetailsRequest + 0, // 207: gctrpc.GoCryptoTraderService.GetActiveDataHistoryJobs:input_type -> gctrpc.GetInfoRequest + 158, // 208: gctrpc.GoCryptoTraderService.GetDataHistoryJobsBetween:input_type -> gctrpc.GetDataHistoryJobsBetweenRequest + 154, // 209: gctrpc.GoCryptoTraderService.GetDataHistoryJobSummary:input_type -> gctrpc.GetDataHistoryJobDetailsRequest + 159, // 210: gctrpc.GoCryptoTraderService.SetDataHistoryJobStatus:input_type -> gctrpc.SetDataHistoryJobStatusRequest + 160, // 211: gctrpc.GoCryptoTraderService.UpdateDataHistoryJobPrerequisite:input_type -> gctrpc.UpdateDataHistoryJobPrerequisiteRequest + 58, // 212: gctrpc.GoCryptoTraderService.GetManagedOrders:input_type -> gctrpc.GetOrdersRequest + 161, // 213: gctrpc.GoCryptoTraderService.ModifyOrder:input_type -> gctrpc.ModifyOrderRequest + 163, // 214: gctrpc.GoCryptoTraderService.CurrencyStateGetAll:input_type -> gctrpc.CurrencyStateGetAllRequest + 164, // 215: gctrpc.GoCryptoTraderService.CurrencyStateTrading:input_type -> gctrpc.CurrencyStateTradingRequest + 167, // 216: gctrpc.GoCryptoTraderService.CurrencyStateDeposit:input_type -> gctrpc.CurrencyStateDepositRequest + 166, // 217: gctrpc.GoCryptoTraderService.CurrencyStateWithdraw:input_type -> gctrpc.CurrencyStateWithdrawRequest + 165, // 218: gctrpc.GoCryptoTraderService.CurrencyStateTradingPair:input_type -> gctrpc.CurrencyStateTradingPairRequest + 177, // 219: gctrpc.GoCryptoTraderService.GetFuturesPositions:input_type -> gctrpc.GetFuturesPositionsRequest + 179, // 220: gctrpc.GoCryptoTraderService.GetCollateral:input_type -> gctrpc.GetCollateralRequest + 186, // 221: gctrpc.GoCryptoTraderService.Shutdown:input_type -> gctrpc.ShutdownRequest + 188, // 222: gctrpc.GoCryptoTraderService.GetTechnicalAnalysis:input_type -> gctrpc.GetTechnicalAnalysisRequest + 191, // 223: gctrpc.GoCryptoTraderService.GetMarginRatesHistory:input_type -> gctrpc.GetMarginRatesHistoryRequest + 174, // 224: gctrpc.GoCryptoTraderService.GetManagedPosition:input_type -> gctrpc.GetManagedPositionRequest + 175, // 225: gctrpc.GoCryptoTraderService.GetAllManagedPositions:input_type -> gctrpc.GetAllManagedPositionsRequest + 184, // 226: gctrpc.GoCryptoTraderService.GetFundingRates:input_type -> gctrpc.GetFundingRatesRequest + 1, // 227: gctrpc.GoCryptoTraderService.GetInfo:output_type -> gctrpc.GetInfoResponse + 7, // 228: gctrpc.GoCryptoTraderService.GetSubsystems:output_type -> gctrpc.GetSusbsytemsResponse + 132, // 229: gctrpc.GoCryptoTraderService.EnableSubsystem:output_type -> gctrpc.GenericResponse + 132, // 230: gctrpc.GoCryptoTraderService.DisableSubsystem:output_type -> gctrpc.GenericResponse + 10, // 231: gctrpc.GoCryptoTraderService.GetRPCEndpoints:output_type -> gctrpc.GetRPCEndpointsResponse + 4, // 232: gctrpc.GoCryptoTraderService.GetCommunicationRelayers:output_type -> gctrpc.GetCommunicationRelayersResponse + 13, // 233: gctrpc.GoCryptoTraderService.GetExchanges:output_type -> gctrpc.GetExchangesResponse + 132, // 234: gctrpc.GoCryptoTraderService.DisableExchange:output_type -> gctrpc.GenericResponse + 19, // 235: gctrpc.GoCryptoTraderService.GetExchangeInfo:output_type -> gctrpc.GetExchangeInfoResponse + 14, // 236: gctrpc.GoCryptoTraderService.GetExchangeOTPCode:output_type -> gctrpc.GetExchangeOTPResponse + 16, // 237: gctrpc.GoCryptoTraderService.GetExchangeOTPCodes:output_type -> gctrpc.GetExchangeOTPsResponse + 132, // 238: gctrpc.GoCryptoTraderService.EnableExchange:output_type -> gctrpc.GenericResponse + 22, // 239: gctrpc.GoCryptoTraderService.GetTicker:output_type -> gctrpc.TickerResponse + 25, // 240: gctrpc.GoCryptoTraderService.GetTickers:output_type -> gctrpc.GetTickersResponse + 28, // 241: gctrpc.GoCryptoTraderService.GetOrderbook:output_type -> gctrpc.OrderbookResponse + 31, // 242: gctrpc.GoCryptoTraderService.GetOrderbooks:output_type -> gctrpc.GetOrderbooksResponse + 35, // 243: gctrpc.GoCryptoTraderService.GetAccountInfo:output_type -> gctrpc.GetAccountInfoResponse + 35, // 244: gctrpc.GoCryptoTraderService.UpdateAccountInfo:output_type -> gctrpc.GetAccountInfoResponse + 35, // 245: gctrpc.GoCryptoTraderService.GetAccountInfoStream:output_type -> gctrpc.GetAccountInfoResponse + 37, // 246: gctrpc.GoCryptoTraderService.GetConfig:output_type -> gctrpc.GetConfigResponse + 40, // 247: gctrpc.GoCryptoTraderService.GetPortfolio:output_type -> gctrpc.GetPortfolioResponse + 47, // 248: gctrpc.GoCryptoTraderService.GetPortfolioSummary:output_type -> gctrpc.GetPortfolioSummaryResponse + 132, // 249: gctrpc.GoCryptoTraderService.AddPortfolioAddress:output_type -> gctrpc.GenericResponse + 132, // 250: gctrpc.GoCryptoTraderService.RemovePortfolioAddress:output_type -> gctrpc.GenericResponse + 52, // 251: gctrpc.GoCryptoTraderService.GetForexProviders:output_type -> gctrpc.GetForexProvidersResponse + 55, // 252: gctrpc.GoCryptoTraderService.GetForexRates:output_type -> gctrpc.GetForexRatesResponse + 59, // 253: gctrpc.GoCryptoTraderService.GetOrders:output_type -> gctrpc.GetOrdersResponse + 56, // 254: gctrpc.GoCryptoTraderService.GetOrder:output_type -> gctrpc.OrderDetails + 63, // 255: gctrpc.GoCryptoTraderService.SubmitOrder:output_type -> gctrpc.SubmitOrderResponse + 65, // 256: gctrpc.GoCryptoTraderService.SimulateOrder:output_type -> gctrpc.SimulateOrderResponse + 65, // 257: gctrpc.GoCryptoTraderService.WhaleBomb:output_type -> gctrpc.SimulateOrderResponse + 132, // 258: gctrpc.GoCryptoTraderService.CancelOrder:output_type -> gctrpc.GenericResponse + 70, // 259: gctrpc.GoCryptoTraderService.CancelBatchOrders:output_type -> gctrpc.CancelBatchOrdersResponse + 72, // 260: gctrpc.GoCryptoTraderService.CancelAllOrders:output_type -> gctrpc.CancelAllOrdersResponse + 75, // 261: gctrpc.GoCryptoTraderService.GetEvents:output_type -> gctrpc.GetEventsResponse + 77, // 262: gctrpc.GoCryptoTraderService.AddEvent:output_type -> gctrpc.AddEventResponse + 132, // 263: gctrpc.GoCryptoTraderService.RemoveEvent:output_type -> gctrpc.GenericResponse + 82, // 264: gctrpc.GoCryptoTraderService.GetCryptocurrencyDepositAddresses:output_type -> gctrpc.GetCryptocurrencyDepositAddressesResponse + 84, // 265: gctrpc.GoCryptoTraderService.GetCryptocurrencyDepositAddress:output_type -> gctrpc.GetCryptocurrencyDepositAddressResponse + 86, // 266: gctrpc.GoCryptoTraderService.GetAvailableTransferChains:output_type -> gctrpc.GetAvailableTransferChainsResponse + 89, // 267: gctrpc.GoCryptoTraderService.WithdrawFiatFunds:output_type -> gctrpc.WithdrawResponse + 89, // 268: gctrpc.GoCryptoTraderService.WithdrawCryptocurrencyFunds:output_type -> gctrpc.WithdrawResponse + 91, // 269: gctrpc.GoCryptoTraderService.WithdrawalEventByID:output_type -> gctrpc.WithdrawalEventByIDResponse + 94, // 270: gctrpc.GoCryptoTraderService.WithdrawalEventsByExchange:output_type -> gctrpc.WithdrawalEventsByExchangeResponse + 94, // 271: gctrpc.GoCryptoTraderService.WithdrawalEventsByDate:output_type -> gctrpc.WithdrawalEventsByExchangeResponse + 101, // 272: gctrpc.GoCryptoTraderService.GetLoggerDetails:output_type -> gctrpc.GetLoggerDetailsResponse + 101, // 273: gctrpc.GoCryptoTraderService.SetLoggerDetails:output_type -> gctrpc.GetLoggerDetailsResponse + 104, // 274: gctrpc.GoCryptoTraderService.GetExchangePairs:output_type -> gctrpc.GetExchangePairsResponse + 132, // 275: gctrpc.GoCryptoTraderService.SetExchangePair:output_type -> gctrpc.GenericResponse + 28, // 276: gctrpc.GoCryptoTraderService.GetOrderbookStream:output_type -> gctrpc.OrderbookResponse + 28, // 277: gctrpc.GoCryptoTraderService.GetExchangeOrderbookStream:output_type -> gctrpc.OrderbookResponse + 22, // 278: gctrpc.GoCryptoTraderService.GetTickerStream:output_type -> gctrpc.TickerResponse + 22, // 279: gctrpc.GoCryptoTraderService.GetExchangeTickerStream:output_type -> gctrpc.TickerResponse + 111, // 280: gctrpc.GoCryptoTraderService.GetAuditEvent:output_type -> gctrpc.GetAuditEventResponse + 132, // 281: gctrpc.GoCryptoTraderService.GCTScriptExecute:output_type -> gctrpc.GenericResponse + 132, // 282: gctrpc.GoCryptoTraderService.GCTScriptUpload:output_type -> gctrpc.GenericResponse + 131, // 283: gctrpc.GoCryptoTraderService.GCTScriptReadScript:output_type -> gctrpc.GCTScriptQueryResponse + 130, // 284: gctrpc.GoCryptoTraderService.GCTScriptStatus:output_type -> gctrpc.GCTScriptStatusResponse + 131, // 285: gctrpc.GoCryptoTraderService.GCTScriptQuery:output_type -> gctrpc.GCTScriptQueryResponse + 132, // 286: gctrpc.GoCryptoTraderService.GCTScriptStop:output_type -> gctrpc.GenericResponse + 132, // 287: gctrpc.GoCryptoTraderService.GCTScriptStopAll:output_type -> gctrpc.GenericResponse + 130, // 288: gctrpc.GoCryptoTraderService.GCTScriptListAll:output_type -> gctrpc.GCTScriptStatusResponse + 132, // 289: gctrpc.GoCryptoTraderService.GCTScriptAutoLoadToggle:output_type -> gctrpc.GenericResponse + 117, // 290: gctrpc.GoCryptoTraderService.GetHistoricCandles:output_type -> gctrpc.GetHistoricCandlesResponse + 132, // 291: gctrpc.GoCryptoTraderService.SetExchangeAsset:output_type -> gctrpc.GenericResponse + 132, // 292: gctrpc.GoCryptoTraderService.SetAllExchangePairs:output_type -> gctrpc.GenericResponse + 132, // 293: gctrpc.GoCryptoTraderService.UpdateExchangeSupportedPairs:output_type -> gctrpc.GenericResponse + 137, // 294: gctrpc.GoCryptoTraderService.GetExchangeAssets:output_type -> gctrpc.GetExchangeAssetsResponse + 139, // 295: gctrpc.GoCryptoTraderService.WebsocketGetInfo:output_type -> gctrpc.WebsocketGetInfoResponse + 132, // 296: gctrpc.GoCryptoTraderService.WebsocketSetEnabled:output_type -> gctrpc.GenericResponse + 143, // 297: gctrpc.GoCryptoTraderService.WebsocketGetSubscriptions:output_type -> gctrpc.WebsocketGetSubscriptionsResponse + 132, // 298: gctrpc.GoCryptoTraderService.WebsocketSetProxy:output_type -> gctrpc.GenericResponse + 132, // 299: gctrpc.GoCryptoTraderService.WebsocketSetURL:output_type -> gctrpc.GenericResponse + 114, // 300: gctrpc.GoCryptoTraderService.GetRecentTrades:output_type -> gctrpc.SavedTradesResponse + 114, // 301: gctrpc.GoCryptoTraderService.GetHistoricTrades:output_type -> gctrpc.SavedTradesResponse + 114, // 302: gctrpc.GoCryptoTraderService.GetSavedTrades:output_type -> gctrpc.SavedTradesResponse + 117, // 303: gctrpc.GoCryptoTraderService.ConvertTradesToCandles:output_type -> gctrpc.GetHistoricCandlesResponse + 148, // 304: gctrpc.GoCryptoTraderService.FindMissingSavedCandleIntervals:output_type -> gctrpc.FindMissingIntervalsResponse + 148, // 305: gctrpc.GoCryptoTraderService.FindMissingSavedTradeIntervals:output_type -> gctrpc.FindMissingIntervalsResponse + 132, // 306: gctrpc.GoCryptoTraderService.SetExchangeTradeProcessing:output_type -> gctrpc.GenericResponse + 153, // 307: gctrpc.GoCryptoTraderService.UpsertDataHistoryJob:output_type -> gctrpc.UpsertDataHistoryJobResponse + 155, // 308: gctrpc.GoCryptoTraderService.GetDataHistoryJobDetails:output_type -> gctrpc.DataHistoryJob + 157, // 309: gctrpc.GoCryptoTraderService.GetActiveDataHistoryJobs:output_type -> gctrpc.DataHistoryJobs + 157, // 310: gctrpc.GoCryptoTraderService.GetDataHistoryJobsBetween:output_type -> gctrpc.DataHistoryJobs + 155, // 311: gctrpc.GoCryptoTraderService.GetDataHistoryJobSummary:output_type -> gctrpc.DataHistoryJob + 132, // 312: gctrpc.GoCryptoTraderService.SetDataHistoryJobStatus:output_type -> gctrpc.GenericResponse + 132, // 313: gctrpc.GoCryptoTraderService.UpdateDataHistoryJobPrerequisite:output_type -> gctrpc.GenericResponse + 59, // 314: gctrpc.GoCryptoTraderService.GetManagedOrders:output_type -> gctrpc.GetOrdersResponse + 162, // 315: gctrpc.GoCryptoTraderService.ModifyOrder:output_type -> gctrpc.ModifyOrderResponse + 168, // 316: gctrpc.GoCryptoTraderService.CurrencyStateGetAll:output_type -> gctrpc.CurrencyStateResponse + 132, // 317: gctrpc.GoCryptoTraderService.CurrencyStateTrading:output_type -> gctrpc.GenericResponse + 132, // 318: gctrpc.GoCryptoTraderService.CurrencyStateDeposit:output_type -> gctrpc.GenericResponse + 132, // 319: gctrpc.GoCryptoTraderService.CurrencyStateWithdraw:output_type -> gctrpc.GenericResponse + 132, // 320: gctrpc.GoCryptoTraderService.CurrencyStateTradingPair:output_type -> gctrpc.GenericResponse + 178, // 321: gctrpc.GoCryptoTraderService.GetFuturesPositions:output_type -> gctrpc.GetFuturesPositionsResponse + 180, // 322: gctrpc.GoCryptoTraderService.GetCollateral:output_type -> gctrpc.GetCollateralResponse + 187, // 323: gctrpc.GoCryptoTraderService.Shutdown:output_type -> gctrpc.ShutdownResponse + 190, // 324: gctrpc.GoCryptoTraderService.GetTechnicalAnalysis:output_type -> gctrpc.GetTechnicalAnalysisResponse + 195, // 325: gctrpc.GoCryptoTraderService.GetMarginRatesHistory:output_type -> gctrpc.GetMarginRatesHistoryResponse + 176, // 326: gctrpc.GoCryptoTraderService.GetManagedPosition:output_type -> gctrpc.GetManagedPositionsResponse + 176, // 327: gctrpc.GoCryptoTraderService.GetAllManagedPositions:output_type -> gctrpc.GetManagedPositionsResponse + 185, // 328: gctrpc.GoCryptoTraderService.GetFundingRates:output_type -> gctrpc.GetFundingRatesResponse + 227, // [227:329] is the sub-list for method output_type + 125, // [125:227] is the sub-list for method input_type + 125, // [125:125] is the sub-list for extension type_name + 125, // [125:125] is the sub-list for extension extendee + 0, // [0:125] is the sub-list for field type_name } func init() { file_rpc_proto_init() } @@ -17608,7 +18609,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFuturesPositionsRequest); i { + switch v := v.(*FundingRate); i { case 0: return &v.state case 1: @@ -17620,7 +18621,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFuturesPositionsResponse); i { + switch v := v.(*FundingData); i { case 0: return &v.state case 1: @@ -17632,7 +18633,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FuturePosition); i { + switch v := v.(*FuturesPositionStats); i { case 0: return &v.state case 1: @@ -17644,7 +18645,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCollateralRequest); i { + switch v := v.(*FuturePosition); i { case 0: return &v.state case 1: @@ -17656,7 +18657,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCollateralResponse); i { + switch v := v.(*GetManagedPositionRequest); i { case 0: return &v.state case 1: @@ -17668,7 +18669,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CollateralForCurrency); i { + switch v := v.(*GetAllManagedPositionsRequest); i { case 0: return &v.state case 1: @@ -17680,7 +18681,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CollateralByPosition); i { + switch v := v.(*GetManagedPositionsResponse); i { case 0: return &v.state case 1: @@ -17692,7 +18693,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CollateralUsedBreakdown); i { + switch v := v.(*GetFuturesPositionsRequest); i { case 0: return &v.state case 1: @@ -17704,7 +18705,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShutdownRequest); i { + switch v := v.(*GetFuturesPositionsResponse); i { case 0: return &v.state case 1: @@ -17716,7 +18717,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShutdownResponse); i { + switch v := v.(*GetCollateralRequest); i { case 0: return &v.state case 1: @@ -17728,7 +18729,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTechnicalAnalysisRequest); i { + switch v := v.(*GetCollateralResponse); i { case 0: return &v.state case 1: @@ -17740,7 +18741,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOfSignals); i { + switch v := v.(*CollateralForCurrency); i { case 0: return &v.state case 1: @@ -17752,7 +18753,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTechnicalAnalysisResponse); i { + switch v := v.(*CollateralByPosition); i { case 0: return &v.state case 1: @@ -17764,7 +18765,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMarginRatesHistoryRequest); i { + switch v := v.(*CollateralUsedBreakdown); i { case 0: return &v.state case 1: @@ -17776,7 +18777,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LendingPayment); i { + switch v := v.(*GetFundingRatesRequest); i { case 0: return &v.state case 1: @@ -17788,7 +18789,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[185].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BorrowCost); i { + switch v := v.(*GetFundingRatesResponse); i { case 0: return &v.state case 1: @@ -17800,7 +18801,7 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[186].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarginRate); i { + switch v := v.(*ShutdownRequest); i { case 0: return &v.state case 1: @@ -17812,6 +18813,102 @@ func file_rpc_proto_init() { } } file_rpc_proto_msgTypes[187].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[188].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[189].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[190].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[191].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[192].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[193].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[194].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[195].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetMarginRatesHistoryResponse); i { case 0: return &v.state @@ -17830,7 +18927,7 @@ func file_rpc_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_rpc_proto_rawDesc, NumEnums: 0, - NumMessages: 202, + NumMessages: 210, NumExtensions: 0, NumServices: 1, }, diff --git a/gctrpc/rpc.pb.gw.go b/gctrpc/rpc.pb.gw.go index 6463d750..2cb99b88 100644 --- a/gctrpc/rpc.pb.gw.go +++ b/gctrpc/rpc.pb.gw.go @@ -3185,6 +3185,114 @@ func local_request_GoCryptoTraderService_GetMarginRatesHistory_0(ctx context.Con } +var ( + filter_GoCryptoTraderService_GetManagedPosition_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_GoCryptoTraderService_GetManagedPosition_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetManagedPositionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetManagedPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetManagedPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GoCryptoTraderService_GetManagedPosition_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetManagedPositionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetManagedPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetManagedPosition(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_GoCryptoTraderService_GetAllManagedPositions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_GoCryptoTraderService_GetAllManagedPositions_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAllManagedPositionsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetAllManagedPositions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetAllManagedPositions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GoCryptoTraderService_GetAllManagedPositions_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAllManagedPositionsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetAllManagedPositions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetAllManagedPositions(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_GoCryptoTraderService_GetFundingRates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_GoCryptoTraderService_GetFundingRates_0(ctx context.Context, marshaler runtime.Marshaler, client GoCryptoTraderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetFundingRatesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetFundingRates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetFundingRates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GoCryptoTraderService_GetFundingRates_0(ctx context.Context, marshaler runtime.Marshaler, server GoCryptoTraderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetFundingRatesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GoCryptoTraderService_GetFundingRates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetFundingRates(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterGoCryptoTraderServiceHandlerServer registers the http handlers for service GoCryptoTraderService to "mux". // UnaryRPC :call GoCryptoTraderServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -3198,20 +3306,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3222,20 +3331,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSubsystems", runtime.WithHTTPPathPattern("/v1/getsubsystems")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetSubsystems_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSubsystems_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetSubsystems_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3246,20 +3356,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableSubsystem", runtime.WithHTTPPathPattern("/v1/enablesubsystem")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_EnableSubsystem_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableSubsystem_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_EnableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3270,20 +3381,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableSubsystem", runtime.WithHTTPPathPattern("/v1/disablesubsystem")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_DisableSubsystem_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableSubsystem_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_DisableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3294,20 +3406,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRPCEndpoints", runtime.WithHTTPPathPattern("/v1/getrpcendpoints")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetRPCEndpoints_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRPCEndpoints_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetRPCEndpoints_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3318,20 +3431,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCommunicationRelayers", runtime.WithHTTPPathPattern("/v1/getcommunicationrelayers")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetCommunicationRelayers_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCommunicationRelayers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCommunicationRelayers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3342,20 +3456,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchanges", runtime.WithHTTPPathPattern("/v1/getexchanges")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchanges_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchanges_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchanges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3366,20 +3481,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableExchange", runtime.WithHTTPPathPattern("/v1/disableexchange")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_DisableExchange_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_DisableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3390,20 +3506,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeInfo", runtime.WithHTTPPathPattern("/v1/getexchangeinfo")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchangeInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3414,20 +3531,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCode", runtime.WithHTTPPathPattern("/v1/getexchangeotp")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchangeOTPCode_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeOTPCode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3438,20 +3556,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCodes", runtime.WithHTTPPathPattern("/v1/getexchangeotps")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchangeOTPCodes_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeOTPCodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3462,20 +3581,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableExchange", runtime.WithHTTPPathPattern("/v1/enableexchange")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_EnableExchange_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_EnableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3486,20 +3606,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTicker", runtime.WithHTTPPathPattern("/v1/getticker")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetTicker_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTicker_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTicker_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3510,20 +3631,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickers", runtime.WithHTTPPathPattern("/v1/gettickers")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetTickers_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTickers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTickers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3534,20 +3656,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbook", runtime.WithHTTPPathPattern("/v1/getorderbook")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrderbook_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3558,20 +3681,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbooks", runtime.WithHTTPPathPattern("/v1/getorderbooks")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrderbooks_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbooks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbooks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3582,20 +3706,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountInfo", runtime.WithHTTPPathPattern("/v1/getaccountinfo")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetAccountInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3606,20 +3731,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateAccountInfo", runtime.WithHTTPPathPattern("/v1/updateaccountinfo")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_UpdateAccountInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3637,20 +3763,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetConfig", runtime.WithHTTPPathPattern("/v1/getconfig")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetConfig_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3661,20 +3788,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolio", runtime.WithHTTPPathPattern("/v1/getportfolio")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetPortfolio_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolio_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetPortfolio_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3685,20 +3813,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolioSummary", runtime.WithHTTPPathPattern("/v1/getportfoliosummary")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetPortfolioSummary_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolioSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetPortfolioSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3709,20 +3838,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddPortfolioAddress", runtime.WithHTTPPathPattern("/v1/addportfolioaddress")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_AddPortfolioAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddPortfolioAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_AddPortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3733,20 +3863,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemovePortfolioAddress", runtime.WithHTTPPathPattern("/v1/removeportfolioaddress")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_RemovePortfolioAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemovePortfolioAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_RemovePortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3757,20 +3888,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexProviders", runtime.WithHTTPPathPattern("/v1/getforexproviders")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetForexProviders_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexProviders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetForexProviders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3781,20 +3913,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexRates", runtime.WithHTTPPathPattern("/v1/getforexrates")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetForexRates_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetForexRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3805,20 +3938,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrders", runtime.WithHTTPPathPattern("/v1/getorders")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrders_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3829,20 +3963,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrder", runtime.WithHTTPPathPattern("/v1/getorder")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetOrder_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3853,20 +3988,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SubmitOrder", runtime.WithHTTPPathPattern("/v1/submitorder")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SubmitOrder_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SubmitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SubmitOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3877,20 +4013,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SimulateOrder", runtime.WithHTTPPathPattern("/v1/simulateorder")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SimulateOrder_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SimulateOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SimulateOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3901,20 +4038,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WhaleBomb", runtime.WithHTTPPathPattern("/v1/whalebomb")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WhaleBomb_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WhaleBomb_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WhaleBomb_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3925,20 +4063,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelOrder", runtime.WithHTTPPathPattern("/v1/cancelorder")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CancelOrder_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3949,20 +4088,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelBatchOrders", runtime.WithHTTPPathPattern("/v1/cancelbatchorders")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CancelBatchOrders_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelBatchOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelBatchOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3973,20 +4113,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelAllOrders", runtime.WithHTTPPathPattern("/v1/cancelallorders")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CancelAllOrders_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelAllOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelAllOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -3997,20 +4138,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetEvents", runtime.WithHTTPPathPattern("/v1/getevents")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetEvents_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetEvents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetEvents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4021,20 +4163,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddEvent", runtime.WithHTTPPathPattern("/v1/addevent")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_AddEvent_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_AddEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4045,20 +4188,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemoveEvent", runtime.WithHTTPPathPattern("/v1/removeevent")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_RemoveEvent_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemoveEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_RemoveEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4069,20 +4213,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddresses", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddresses")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4093,20 +4238,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddress", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddress")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4117,20 +4263,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAvailableTransferChains", runtime.WithHTTPPathPattern("/v1/getavailabletransferchains")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetAvailableTransferChains_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAvailableTransferChains_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAvailableTransferChains_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4141,20 +4288,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawFiatFunds", runtime.WithHTTPPathPattern("/v1/withdrawfiatfunds")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WithdrawFiatFunds_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawFiatFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawFiatFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4165,20 +4313,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawCryptocurrencyFunds", runtime.WithHTTPPathPattern("/v1/withdrawithdrawcryptofundswfiatfunds")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4189,20 +4338,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventByID", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyid")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WithdrawalEventByID_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventByID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4213,20 +4363,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByExchange", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyexchange")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WithdrawalEventsByExchange_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventsByExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4237,20 +4388,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByDate", runtime.WithHTTPPathPattern("/v1/withdrawaleventbydate")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WithdrawalEventsByDate_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByDate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventsByDate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4261,20 +4413,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLoggerDetails", runtime.WithHTTPPathPattern("/v1/getloggerdetails")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetLoggerDetails_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLoggerDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4285,20 +4438,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLoggerDetails", runtime.WithHTTPPathPattern("/v1/setloggerdetails")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetLoggerDetails_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetLoggerDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4309,20 +4463,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangePairs", runtime.WithHTTPPathPattern("/v1/getexchangepairs")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchangePairs_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangePairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4333,20 +4488,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangePair", runtime.WithHTTPPathPattern("/v1/setexchangepair")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetExchangePair_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangePair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangePair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4385,20 +4541,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAuditEvent", runtime.WithHTTPPathPattern("/v1/getauditevent")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetAuditEvent_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAuditEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAuditEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4409,20 +4566,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptExecute", runtime.WithHTTPPathPattern("/v1/gctscript/execute")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptExecute_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptExecute_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptExecute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4433,20 +4591,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptUpload", runtime.WithHTTPPathPattern("/v1/gctscript/upload")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptUpload_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptUpload_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptUpload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4457,20 +4616,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptReadScript", runtime.WithHTTPPathPattern("/v1/gctscript/read")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptReadScript_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptReadScript_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptReadScript_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4481,20 +4641,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStatus", runtime.WithHTTPPathPattern("/v1/gctscript/status")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4505,20 +4666,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptQuery", runtime.WithHTTPPathPattern("/v1/gctscript/query")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptQuery_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4529,20 +4691,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStop", runtime.WithHTTPPathPattern("/v1/gctscript/stop")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptStop_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStop_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4553,20 +4716,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStopAll", runtime.WithHTTPPathPattern("/v1/gctscript/stopall")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptStopAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStopAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStopAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4577,20 +4741,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptListAll", runtime.WithHTTPPathPattern("/v1/gctscript/list")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptListAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptListAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptListAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4601,20 +4766,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptAutoLoadToggle", runtime.WithHTTPPathPattern("/v1/gctscript/autoload")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4625,20 +4791,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricCandles", runtime.WithHTTPPathPattern("/v1/gethistoriccandles")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetHistoricCandles_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetHistoricCandles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetHistoricCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4649,20 +4816,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeAsset", runtime.WithHTTPPathPattern("/v1/setexchangeasset")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetExchangeAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeAsset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangeAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4673,20 +4841,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetAllExchangePairs", runtime.WithHTTPPathPattern("/v1/setallexchangepairs")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetAllExchangePairs_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetAllExchangePairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetAllExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4697,20 +4866,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateExchangeSupportedPairs", runtime.WithHTTPPathPattern("/v1/updateexchangesupportedpairs")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4721,20 +4891,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeAssets", runtime.WithHTTPPathPattern("/v1/getexchangeassets")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetExchangeAssets_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeAssets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4745,20 +4916,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetInfo", runtime.WithHTTPPathPattern("/v1/websocketgetinfo")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WebsocketGetInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketGetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4769,20 +4941,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetEnabled", runtime.WithHTTPPathPattern("/v1/websocketsetenabled")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WebsocketSetEnabled_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetEnabled_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetEnabled_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4793,20 +4966,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetSubscriptions", runtime.WithHTTPPathPattern("/v1/websocketgetsubscriptions")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WebsocketGetSubscriptions_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetSubscriptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketGetSubscriptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4817,20 +4991,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetProxy", runtime.WithHTTPPathPattern("/v1/websocketsetproxy")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WebsocketSetProxy_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetProxy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4841,20 +5016,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetURL", runtime.WithHTTPPathPattern("/v1/websocketseturl")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_WebsocketSetURL_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetURL_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetURL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4865,20 +5041,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRecentTrades", runtime.WithHTTPPathPattern("/v1/getrecenttrades")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetRecentTrades_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRecentTrades_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetRecentTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4896,20 +5073,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSavedTrades", runtime.WithHTTPPathPattern("/v1/getsavedtrades")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetSavedTrades_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSavedTrades_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetSavedTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4920,20 +5098,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ConvertTradesToCandles", runtime.WithHTTPPathPattern("/v1/converttradestocandles")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_ConvertTradesToCandles_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ConvertTradesToCandles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_ConvertTradesToCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4944,20 +5123,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedCandleIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedcandleintervals")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4968,20 +5148,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedTradeIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedtradeintervals")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -4992,20 +5173,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeTradeProcessing", runtime.WithHTTPPathPattern("/v1/setexchangetradeprocessing")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetExchangeTradeProcessing_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeTradeProcessing_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangeTradeProcessing_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5016,20 +5198,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpsertDataHistoryJob", runtime.WithHTTPPathPattern("/v1/upsertdatahistoryjob")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_UpsertDataHistoryJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpsertDataHistoryJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpsertDataHistoryJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5040,20 +5223,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobDetails", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobdetails")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetDataHistoryJobDetails_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5064,20 +5248,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetActiveDataHistoryJobs", runtime.WithHTTPPathPattern("/v1/getactivedatahistoryjobs")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetActiveDataHistoryJobs_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5088,20 +5273,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobsBetween", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsbetween")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetDataHistoryJobsBetween_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5112,20 +5298,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobSummary", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsummary")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetDataHistoryJobSummary_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5136,20 +5323,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetDataHistoryJobStatus", runtime.WithHTTPPathPattern("/v1/setdatahistoryjobstatus")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_SetDataHistoryJobStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetDataHistoryJobStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetDataHistoryJobStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5160,20 +5348,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateDataHistoryJobPrerequisite", runtime.WithHTTPPathPattern("/v1/updatedatahistoryjobprerequisite")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5184,20 +5373,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedOrders", runtime.WithHTTPPathPattern("/v1/getmanagedorders")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetManagedOrders_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetManagedOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetManagedOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5208,20 +5398,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ModifyOrder", runtime.WithHTTPPathPattern("/v1/modifyorder")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_ModifyOrder_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ModifyOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_ModifyOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5232,20 +5423,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateGetAll", runtime.WithHTTPPathPattern("/v1/currencystategetall")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CurrencyStateGetAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateGetAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateGetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5256,20 +5448,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTrading", runtime.WithHTTPPathPattern("/v1/currencystatetrading")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CurrencyStateTrading_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTrading_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateTrading_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5280,20 +5473,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateDeposit", runtime.WithHTTPPathPattern("/v1/currencystatedeposit")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CurrencyStateDeposit_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateDeposit_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5304,20 +5498,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateWithdraw", runtime.WithHTTPPathPattern("/v1/currencystatewithdraw")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CurrencyStateWithdraw_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateWithdraw_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateWithdraw_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5328,20 +5523,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTradingPair", runtime.WithHTTPPathPattern("/v1/currencystatetradingpair")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_CurrencyStateTradingPair_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTradingPair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateTradingPair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5352,20 +5548,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositions", runtime.WithHTTPPathPattern("/v1/getfuturespositions")) + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositions", runtime.WithHTTPPathPattern("/v1/getfuturespositions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GoCryptoTraderService_GetFuturesPositions_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetFuturesPositions_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFuturesPositions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetFuturesPositions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5376,20 +5573,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateral", runtime.WithHTTPPathPattern("/v1/getcollateral")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetCollateral_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCollateral_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCollateral_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5400,20 +5598,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/Shutdown", runtime.WithHTTPPathPattern("/v1/shutdown")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_Shutdown_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_Shutdown_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_Shutdown_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5424,20 +5623,21 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTechnicalAnalysis", runtime.WithHTTPPathPattern("/v1/gettechnicalanalysis")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetTechnicalAnalysis_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTechnicalAnalysis_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTechnicalAnalysis_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5448,20 +5648,96 @@ func RegisterGoCryptoTraderServiceHandlerServer(ctx context.Context, mux *runtim ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetMarginRatesHistory", runtime.WithHTTPPathPattern("/v1/getmarginrateshistory")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GoCryptoTraderService_GetMarginRatesHistory_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetMarginRatesHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetMarginRatesHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GoCryptoTraderService_GetManagedPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + 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")) + 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) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GoCryptoTraderService_GetManagedPosition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GoCryptoTraderService_GetAllManagedPositions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + 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")) + 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) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GoCryptoTraderService_GetAllManagedPositions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GoCryptoTraderService_GetFundingRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + 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")) + 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) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GoCryptoTraderService_GetFundingRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5511,19 +5787,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetInfo", runtime.WithHTTPPathPattern("/v1/getinfo")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5532,19 +5809,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSubsystems", runtime.WithHTTPPathPattern("/v1/getsubsystems")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetSubsystems_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSubsystems_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetSubsystems_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5553,19 +5831,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableSubsystem", runtime.WithHTTPPathPattern("/v1/enablesubsystem")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_EnableSubsystem_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableSubsystem_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_EnableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5574,19 +5853,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableSubsystem", runtime.WithHTTPPathPattern("/v1/disablesubsystem")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_DisableSubsystem_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableSubsystem_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_DisableSubsystem_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5595,19 +5875,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRPCEndpoints", runtime.WithHTTPPathPattern("/v1/getrpcendpoints")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetRPCEndpoints_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRPCEndpoints_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetRPCEndpoints_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5616,19 +5897,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCommunicationRelayers", runtime.WithHTTPPathPattern("/v1/getcommunicationrelayers")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetCommunicationRelayers_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCommunicationRelayers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCommunicationRelayers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5637,19 +5919,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchanges", runtime.WithHTTPPathPattern("/v1/getexchanges")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetExchanges_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchanges_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchanges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5658,19 +5941,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/DisableExchange", runtime.WithHTTPPathPattern("/v1/disableexchange")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_DisableExchange_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_DisableExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_DisableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5679,19 +5963,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeInfo", runtime.WithHTTPPathPattern("/v1/getexchangeinfo")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5700,19 +5985,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCode", runtime.WithHTTPPathPattern("/v1/getexchangeotp")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeOTPCode_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeOTPCode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5721,19 +6007,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOTPCodes", runtime.WithHTTPPathPattern("/v1/getexchangeotps")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeOTPCodes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOTPCodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeOTPCodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5742,19 +6029,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/EnableExchange", runtime.WithHTTPPathPattern("/v1/enableexchange")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_EnableExchange_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_EnableExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_EnableExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5763,19 +6051,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTicker", runtime.WithHTTPPathPattern("/v1/getticker")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetTicker_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTicker_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTicker_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5784,19 +6073,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickers", runtime.WithHTTPPathPattern("/v1/gettickers")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetTickers_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTickers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTickers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5805,19 +6095,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbook", runtime.WithHTTPPathPattern("/v1/getorderbook")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetOrderbook_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5826,19 +6117,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbooks", runtime.WithHTTPPathPattern("/v1/getorderbooks")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetOrderbooks_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbooks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbooks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5847,19 +6139,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountInfo", runtime.WithHTTPPathPattern("/v1/getaccountinfo")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetAccountInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5868,19 +6161,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateAccountInfo", runtime.WithHTTPPathPattern("/v1/updateaccountinfo")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_UpdateAccountInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5889,19 +6183,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAccountInfoStream", runtime.WithHTTPPathPattern("/v1/getaccountinfostream")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetAccountInfoStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAccountInfoStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAccountInfoStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -5910,19 +6205,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetConfig", runtime.WithHTTPPathPattern("/v1/getconfig")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetConfig_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5931,19 +6227,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolio", runtime.WithHTTPPathPattern("/v1/getportfolio")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetPortfolio_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolio_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetPortfolio_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5952,19 +6249,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetPortfolioSummary", runtime.WithHTTPPathPattern("/v1/getportfoliosummary")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetPortfolioSummary_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetPortfolioSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetPortfolioSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5973,19 +6271,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddPortfolioAddress", runtime.WithHTTPPathPattern("/v1/addportfolioaddress")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_AddPortfolioAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddPortfolioAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_AddPortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -5994,19 +6293,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemovePortfolioAddress", runtime.WithHTTPPathPattern("/v1/removeportfolioaddress")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_RemovePortfolioAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemovePortfolioAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_RemovePortfolioAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6015,19 +6315,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexProviders", runtime.WithHTTPPathPattern("/v1/getforexproviders")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetForexProviders_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexProviders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetForexProviders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6036,19 +6337,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetForexRates", runtime.WithHTTPPathPattern("/v1/getforexrates")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetForexRates_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetForexRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetForexRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6057,19 +6359,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrders", runtime.WithHTTPPathPattern("/v1/getorders")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetOrders_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6078,19 +6381,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrder", runtime.WithHTTPPathPattern("/v1/getorder")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetOrder_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6099,19 +6403,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SubmitOrder", runtime.WithHTTPPathPattern("/v1/submitorder")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_SubmitOrder_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SubmitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SubmitOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6120,19 +6425,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SimulateOrder", runtime.WithHTTPPathPattern("/v1/simulateorder")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_SimulateOrder_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SimulateOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SimulateOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6141,19 +6447,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WhaleBomb", runtime.WithHTTPPathPattern("/v1/whalebomb")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WhaleBomb_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WhaleBomb_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WhaleBomb_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6162,19 +6469,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelOrder", runtime.WithHTTPPathPattern("/v1/cancelorder")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_CancelOrder_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6183,19 +6491,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelBatchOrders", runtime.WithHTTPPathPattern("/v1/cancelbatchorders")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_CancelBatchOrders_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelBatchOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelBatchOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6204,19 +6513,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CancelAllOrders", runtime.WithHTTPPathPattern("/v1/cancelallorders")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_CancelAllOrders_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CancelAllOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CancelAllOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6225,19 +6535,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetEvents", runtime.WithHTTPPathPattern("/v1/getevents")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetEvents_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetEvents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetEvents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6246,19 +6557,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/AddEvent", runtime.WithHTTPPathPattern("/v1/addevent")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_AddEvent_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_AddEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_AddEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6267,19 +6579,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/RemoveEvent", runtime.WithHTTPPathPattern("/v1/removeevent")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_RemoveEvent_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_RemoveEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_RemoveEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6288,19 +6601,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddresses", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddresses")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCryptocurrencyDepositAddresses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6309,19 +6623,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCryptocurrencyDepositAddress", runtime.WithHTTPPathPattern("/v1/getcryptodepositaddress")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCryptocurrencyDepositAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6330,19 +6645,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAvailableTransferChains", runtime.WithHTTPPathPattern("/v1/getavailabletransferchains")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetAvailableTransferChains_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAvailableTransferChains_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAvailableTransferChains_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6351,19 +6667,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawFiatFunds", runtime.WithHTTPPathPattern("/v1/withdrawfiatfunds")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WithdrawFiatFunds_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawFiatFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawFiatFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6372,19 +6689,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawCryptocurrencyFunds", runtime.WithHTTPPathPattern("/v1/withdrawithdrawcryptofundswfiatfunds")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawCryptocurrencyFunds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6393,19 +6711,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventByID", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyid")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WithdrawalEventByID_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventByID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6414,19 +6733,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByExchange", runtime.WithHTTPPathPattern("/v1/withdrawaleventbyexchange")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WithdrawalEventsByExchange_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByExchange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventsByExchange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6435,19 +6755,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WithdrawalEventsByDate", runtime.WithHTTPPathPattern("/v1/withdrawaleventbydate")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WithdrawalEventsByDate_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WithdrawalEventsByDate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WithdrawalEventsByDate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6456,19 +6777,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetLoggerDetails", runtime.WithHTTPPathPattern("/v1/getloggerdetails")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetLoggerDetails_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetLoggerDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6477,19 +6799,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetLoggerDetails", runtime.WithHTTPPathPattern("/v1/setloggerdetails")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_SetLoggerDetails_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetLoggerDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetLoggerDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6498,19 +6821,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangePairs", runtime.WithHTTPPathPattern("/v1/getexchangepairs")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetExchangePairs_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangePairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6519,19 +6843,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangePair", runtime.WithHTTPPathPattern("/v1/setexchangepair")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_SetExchangePair_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangePair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangePair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6540,19 +6865,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetOrderbookStream", runtime.WithHTTPPathPattern("/v1/getorderbookstream")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetOrderbookStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetOrderbookStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetOrderbookStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -6561,19 +6887,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeOrderbookStream", runtime.WithHTTPPathPattern("/v1/getexchangeorderbookstream")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeOrderbookStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeOrderbookStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeOrderbookStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -6582,19 +6909,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTickerStream", runtime.WithHTTPPathPattern("/v1/gettickerstream")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetTickerStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTickerStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTickerStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -6603,19 +6931,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeTickerStream", runtime.WithHTTPPathPattern("/v1/getexchangetickerstream")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeTickerStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeTickerStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeTickerStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -6624,19 +6953,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetAuditEvent", runtime.WithHTTPPathPattern("/v1/getauditevent")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetAuditEvent_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetAuditEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetAuditEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6645,19 +6975,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptExecute", runtime.WithHTTPPathPattern("/v1/gctscript/execute")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptExecute_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptExecute_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptExecute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6666,19 +6997,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptUpload", runtime.WithHTTPPathPattern("/v1/gctscript/upload")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptUpload_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptUpload_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptUpload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6687,19 +7019,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptReadScript", runtime.WithHTTPPathPattern("/v1/gctscript/read")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptReadScript_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptReadScript_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptReadScript_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6708,19 +7041,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStatus", runtime.WithHTTPPathPattern("/v1/gctscript/status")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6729,19 +7063,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptQuery", runtime.WithHTTPPathPattern("/v1/gctscript/query")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptQuery_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6750,19 +7085,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStop", runtime.WithHTTPPathPattern("/v1/gctscript/stop")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptStop_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStop_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6771,19 +7107,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptStopAll", runtime.WithHTTPPathPattern("/v1/gctscript/stopall")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptStopAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptStopAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptStopAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6792,19 +7129,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptListAll", runtime.WithHTTPPathPattern("/v1/gctscript/list")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptListAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptListAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptListAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6813,19 +7151,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GCTScriptAutoLoadToggle", runtime.WithHTTPPathPattern("/v1/gctscript/autoload")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GCTScriptAutoLoadToggle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6834,19 +7173,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricCandles", runtime.WithHTTPPathPattern("/v1/gethistoriccandles")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetHistoricCandles_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetHistoricCandles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetHistoricCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6855,19 +7195,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeAsset", runtime.WithHTTPPathPattern("/v1/setexchangeasset")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_SetExchangeAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeAsset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangeAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6876,19 +7217,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetAllExchangePairs", runtime.WithHTTPPathPattern("/v1/setallexchangepairs")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_SetAllExchangePairs_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetAllExchangePairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetAllExchangePairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6897,19 +7239,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateExchangeSupportedPairs", runtime.WithHTTPPathPattern("/v1/updateexchangesupportedpairs")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateExchangeSupportedPairs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6918,19 +7261,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetExchangeAssets", runtime.WithHTTPPathPattern("/v1/getexchangeassets")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetExchangeAssets_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetExchangeAssets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetExchangeAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6939,19 +7283,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetInfo", runtime.WithHTTPPathPattern("/v1/websocketgetinfo")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WebsocketGetInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketGetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6960,19 +7305,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetEnabled", runtime.WithHTTPPathPattern("/v1/websocketsetenabled")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WebsocketSetEnabled_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetEnabled_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetEnabled_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6981,19 +7327,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketGetSubscriptions", runtime.WithHTTPPathPattern("/v1/websocketgetsubscriptions")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WebsocketGetSubscriptions_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketGetSubscriptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketGetSubscriptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7002,19 +7349,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetProxy", runtime.WithHTTPPathPattern("/v1/websocketsetproxy")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WebsocketSetProxy_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetProxy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7023,19 +7371,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/WebsocketSetURL", runtime.WithHTTPPathPattern("/v1/websocketseturl")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_WebsocketSetURL_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_WebsocketSetURL_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_WebsocketSetURL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7044,19 +7393,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetRecentTrades", runtime.WithHTTPPathPattern("/v1/getrecenttrades")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetRecentTrades_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetRecentTrades_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetRecentTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7065,19 +7415,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetHistoricTrades", runtime.WithHTTPPathPattern("/v1/gethistorictrades")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetHistoricTrades_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetHistoricTrades_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetHistoricTrades_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -7086,19 +7437,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetSavedTrades", runtime.WithHTTPPathPattern("/v1/getsavedtrades")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetSavedTrades_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetSavedTrades_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetSavedTrades_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7107,19 +7459,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ConvertTradesToCandles", runtime.WithHTTPPathPattern("/v1/converttradestocandles")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_ConvertTradesToCandles_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ConvertTradesToCandles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_ConvertTradesToCandles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7128,19 +7481,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedCandleIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedcandleintervals")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_FindMissingSavedCandleIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7149,19 +7503,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/FindMissingSavedTradeIntervals", runtime.WithHTTPPathPattern("/v1/findmissingsavedtradeintervals")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_FindMissingSavedTradeIntervals_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7170,19 +7525,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetExchangeTradeProcessing", runtime.WithHTTPPathPattern("/v1/setexchangetradeprocessing")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_SetExchangeTradeProcessing_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetExchangeTradeProcessing_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetExchangeTradeProcessing_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7191,19 +7547,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpsertDataHistoryJob", runtime.WithHTTPPathPattern("/v1/upsertdatahistoryjob")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_UpsertDataHistoryJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpsertDataHistoryJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpsertDataHistoryJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7212,19 +7569,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobDetails", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobdetails")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetDataHistoryJobDetails_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7233,19 +7591,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetActiveDataHistoryJobs", runtime.WithHTTPPathPattern("/v1/getactivedatahistoryjobs")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetActiveDataHistoryJobs_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetActiveDataHistoryJobs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7254,19 +7613,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobsBetween", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsbetween")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetDataHistoryJobsBetween_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobsBetween_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7275,19 +7635,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetDataHistoryJobSummary", runtime.WithHTTPPathPattern("/v1/getdatahistoryjobsummary")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetDataHistoryJobSummary_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetDataHistoryJobSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetDataHistoryJobSummary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7296,19 +7657,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/SetDataHistoryJobStatus", runtime.WithHTTPPathPattern("/v1/setdatahistoryjobstatus")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_SetDataHistoryJobStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_SetDataHistoryJobStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_SetDataHistoryJobStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7317,19 +7679,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/UpdateDataHistoryJobPrerequisite", runtime.WithHTTPPathPattern("/v1/updatedatahistoryjobprerequisite")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_UpdateDataHistoryJobPrerequisite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7338,19 +7701,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetManagedOrders", runtime.WithHTTPPathPattern("/v1/getmanagedorders")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetManagedOrders_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetManagedOrders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetManagedOrders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7359,19 +7723,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/ModifyOrder", runtime.WithHTTPPathPattern("/v1/modifyorder")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_ModifyOrder_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_ModifyOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_ModifyOrder_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7380,19 +7745,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateGetAll", runtime.WithHTTPPathPattern("/v1/currencystategetall")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_CurrencyStateGetAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateGetAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateGetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7401,19 +7767,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTrading", runtime.WithHTTPPathPattern("/v1/currencystatetrading")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_CurrencyStateTrading_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTrading_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateTrading_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7422,19 +7789,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateDeposit", runtime.WithHTTPPathPattern("/v1/currencystatedeposit")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_CurrencyStateDeposit_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateDeposit_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7443,19 +7811,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateWithdraw", runtime.WithHTTPPathPattern("/v1/currencystatewithdraw")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_CurrencyStateWithdraw_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateWithdraw_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateWithdraw_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7464,19 +7833,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/CurrencyStateTradingPair", runtime.WithHTTPPathPattern("/v1/currencystatetradingpair")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_CurrencyStateTradingPair_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_CurrencyStateTradingPair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_CurrencyStateTradingPair_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7485,19 +7855,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositions", runtime.WithHTTPPathPattern("/v1/getfuturespositions")) + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetFuturesPositions", runtime.WithHTTPPathPattern("/v1/getfuturespositions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GoCryptoTraderService_GetFuturesPositions_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetFuturesPositions_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetFuturesPositions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetFuturesPositions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7506,19 +7877,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetCollateral", runtime.WithHTTPPathPattern("/v1/getcollateral")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetCollateral_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetCollateral_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetCollateral_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7527,19 +7899,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/Shutdown", runtime.WithHTTPPathPattern("/v1/shutdown")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_Shutdown_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_Shutdown_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_Shutdown_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7548,19 +7921,20 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetTechnicalAnalysis", runtime.WithHTTPPathPattern("/v1/gettechnicalanalysis")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetTechnicalAnalysis_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetTechnicalAnalysis_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetTechnicalAnalysis_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7569,19 +7943,86 @@ func RegisterGoCryptoTraderServiceHandlerClient(ctx context.Context, mux *runtim defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/gctrpc.GoCryptoTraderService/GetMarginRatesHistory", runtime.WithHTTPPathPattern("/v1/getmarginrateshistory")) + var annotatedContext context.Context + annotatedContext, 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(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_GoCryptoTraderService_GetMarginRatesHistory_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_GoCryptoTraderService_GetMarginRatesHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_GoCryptoTraderService_GetMarginRatesHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GoCryptoTraderService_GetManagedPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + 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")) + 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) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GoCryptoTraderService_GetManagedPosition_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GoCryptoTraderService_GetAllManagedPositions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + 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")) + 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) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GoCryptoTraderService_GetAllManagedPositions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GoCryptoTraderService_GetFundingRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + 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")) + 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) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GoCryptoTraderService_GetFundingRates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -7786,6 +8227,12 @@ var ( pattern_GoCryptoTraderService_GetTechnicalAnalysis_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gettechnicalanalysis"}, "")) pattern_GoCryptoTraderService_GetMarginRatesHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getmarginrateshistory"}, "")) + + pattern_GoCryptoTraderService_GetManagedPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getmanagedposition"}, "")) + + pattern_GoCryptoTraderService_GetAllManagedPositions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getallmanagedpositions"}, "")) + + pattern_GoCryptoTraderService_GetFundingRates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "getfundingrates"}, "")) ) var ( @@ -7986,4 +8433,10 @@ var ( forward_GoCryptoTraderService_GetTechnicalAnalysis_0 = runtime.ForwardResponseMessage forward_GoCryptoTraderService_GetMarginRatesHistory_0 = runtime.ForwardResponseMessage + + forward_GoCryptoTraderService_GetManagedPosition_0 = runtime.ForwardResponseMessage + + forward_GoCryptoTraderService_GetAllManagedPositions_0 = runtime.ForwardResponseMessage + + forward_GoCryptoTraderService_GetFundingRates_0 = runtime.ForwardResponseMessage ) diff --git a/gctrpc/rpc.proto b/gctrpc/rpc.proto index 22d8aa6e..b9c356ea 100644 --- a/gctrpc/rpc.proto +++ b/gctrpc/rpc.proto @@ -295,8 +295,8 @@ message OrderDetails { string asset_type = 6; string order_side = 7; string order_type = 8; - int64 creation_time = 9; - int64 update_time = 10; + string creation_time = 9; + string update_time = 10; string status = 11; double price = 12; double amount = 13; @@ -1026,6 +1026,81 @@ message CurrencyState { bool trading_enabled = 5; } +message FundingRate { + string date = 1; + string rate = 2; + string payment = 3; +} + +message FundingData { + string exchange = 1; + string asset = 2; + CurrencyPair pair = 3; + string start_date = 4; + string end_date = 5; + repeated FundingRate rates = 6; + FundingRate latest_rate = 7; + FundingRate upcoming_rate = 8; + string payment_sum = 9; +} + +message FuturesPositionStats { + string maintenance_margin_requirement = 1; + string initial_margin_requirement = 2; + string estimated_liquidation_price = 3; + string collateral_used = 4; + string mark_price = 5; + string current_size = 6; + string break_even_price = 7; + string average_open_price = 8; + string recent_pnl = 9; + string margin_fraction = 10; + string free_collateral = 11; + string total_collateral = 12; +} + +message FuturePosition { + string exchange = 1; + string asset = 2; + CurrencyPair pair = 3; + string status = 4; + string opening_date = 5; + string opening_direction = 6; + string opening_price = 7; + string opening_size = 8; + string current_direction = 9; + string current_price = 10; + string current_size = 11; + string unrealised_pnl = 12; + string realised_pnl = 13; + string closing_date = 14; + int64 order_count = 15; + repeated OrderDetails orders = 16; + FuturesPositionStats position_stats = 17; + FundingData funding_data = 18; +} + +message GetManagedPositionRequest { + string exchange = 1; + string asset = 2; + CurrencyPair pair = 3; + bool include_full_order_data = 4; + bool get_funding_payments = 5; + bool include_full_funding_rates = 6; + bool include_predicted_rate = 7; +} + +message GetAllManagedPositionsRequest { + bool include_full_order_data = 1; + bool get_funding_payments = 2; + bool include_full_funding_rates = 3; + bool include_predicted_rate = 4; +} + +message GetManagedPositionsResponse { + repeated FuturePosition positions = 1; +} + message GetFuturesPositionsRequest { string exchange = 1; string asset = 2; @@ -1034,8 +1109,12 @@ message GetFuturesPositionsRequest { string end_date = 5; string status = 6; int64 position_limit = 7; - bool verbose = 8; - bool overwrite = 9; + bool overwrite = 8; + bool get_position_stats = 9; + bool include_full_order_data = 10; + bool get_funding_payments = 11; + bool include_full_funding_rates = 12; + bool include_predicted_rate = 13; } message GetFuturesPositionsResponse { @@ -1047,16 +1126,6 @@ message GetFuturesPositionsResponse { repeated FuturePosition positions = 6; } -message FuturePosition { - string status = 1; - string current_direction = 2; - string unrealised_pnl = 3; - string realised_pnl = 4; - string opening_date = 5; - string closing_date = 6; - repeated OrderDetails orders = 7; -} - message GetCollateralRequest { string exchange = 1; string asset = 2; @@ -1116,6 +1185,20 @@ message CollateralUsedBreakdown { string used_in_spot_margin = 8; } +message GetFundingRatesRequest { + string exchange = 1; + string asset = 2; + repeated string pairs = 3; + string start_date = 4; + string end_date = 5; + bool include_predicted = 6; + bool include_payments = 7; +} + +message GetFundingRatesResponse { + repeated FundingData funding_payments = 1; +} + message ShutdownRequest {} message ShutdownResponse {} @@ -1809,4 +1892,19 @@ service GoCryptoTraderService { get: "/v1/getmarginrateshistory" }; } + rpc GetManagedPosition(GetManagedPositionRequest) returns (GetManagedPositionsResponse) { + option (google.api.http) = { + get: "/v1/getmanagedposition" + }; + } + rpc GetAllManagedPositions(GetAllManagedPositionsRequest) returns (GetManagedPositionsResponse) { + option (google.api.http) = { + get: "/v1/getallmanagedpositions" + }; + } + rpc GetFundingRates(GetFundingRatesRequest) returns (GetFundingRatesResponse) { + option (google.api.http) = { + get: "/v1/getfundingrates" + }; + } } diff --git a/gctrpc/rpc.swagger.json b/gctrpc/rpc.swagger.json index 9df5f790..aef23fba 100644 --- a/gctrpc/rpc.swagger.json +++ b/gctrpc/rpc.swagger.json @@ -1135,6 +1135,54 @@ ] } }, + "/v1/getallmanagedpositions": { + "get": { + "operationId": "GoCryptoTraderService_GetAllManagedPositions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/gctrpcGetManagedPositionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "includeFullOrderData", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "getFundingPayments", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "includeFullFundingRates", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "includePredictedRate", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "GoCryptoTraderService" + ] + } + }, "/v1/getauditevent": { "get": { "operationId": "GoCryptoTraderService_GetAuditEvent", @@ -1823,6 +1871,76 @@ ] } }, + "/v1/getfundingrates": { + "get": { + "operationId": "GoCryptoTraderService_GetFundingRates", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/gctrpcGetFundingRatesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "exchange", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "asset", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pairs", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "startDate", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "endDate", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "includePredicted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "includePayments", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "GoCryptoTraderService" + ] + } + }, "/v1/getfuturespositions": { "get": { "operationId": "GoCryptoTraderService_GetFuturesPositions", @@ -1897,13 +2015,37 @@ "format": "int64" }, { - "name": "verbose", + "name": "overwrite", "in": "query", "required": false, "type": "boolean" }, { - "name": "overwrite", + "name": "getPositionStats", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "includeFullOrderData", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "getFundingPayments", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "includeFullFundingRates", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "includePredictedRate", "in": "query", "required": false, "type": "boolean" @@ -2176,6 +2318,84 @@ ] } }, + "/v1/getmanagedposition": { + "get": { + "operationId": "GoCryptoTraderService_GetManagedPosition", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/gctrpcGetManagedPositionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "exchange", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "asset", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pair.delimiter", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pair.base", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pair.quote", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "includeFullOrderData", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "getFundingPayments", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "includeFullFundingRates", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "includePredictedRate", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "GoCryptoTraderService" + ] + } + }, "/v1/getmarginrateshistory": { "get": { "operationId": "GoCryptoTraderService_GetMarginRatesHistory", @@ -4555,32 +4775,156 @@ } } }, + "gctrpcFundingData": { + "type": "object", + "properties": { + "exchange": { + "type": "string" + }, + "asset": { + "type": "string" + }, + "pair": { + "$ref": "#/definitions/gctrpcCurrencyPair" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "rates": { + "type": "array", + "items": { + "$ref": "#/definitions/gctrpcFundingRate" + } + }, + "latestRate": { + "$ref": "#/definitions/gctrpcFundingRate" + }, + "upcomingRate": { + "$ref": "#/definitions/gctrpcFundingRate" + }, + "paymentSum": { + "type": "string" + } + } + }, + "gctrpcFundingRate": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "rate": { + "type": "string" + }, + "payment": { + "type": "string" + } + } + }, "gctrpcFuturePosition": { "type": "object", "properties": { + "exchange": { + "type": "string" + }, + "asset": { + "type": "string" + }, + "pair": { + "$ref": "#/definitions/gctrpcCurrencyPair" + }, "status": { "type": "string" }, + "openingDate": { + "type": "string" + }, + "openingDirection": { + "type": "string" + }, + "openingPrice": { + "type": "string" + }, + "openingSize": { + "type": "string" + }, "currentDirection": { "type": "string" }, + "currentPrice": { + "type": "string" + }, + "currentSize": { + "type": "string" + }, "unrealisedPnl": { "type": "string" }, "realisedPnl": { "type": "string" }, - "openingDate": { - "type": "string" - }, "closingDate": { "type": "string" }, + "orderCount": { + "type": "string", + "format": "int64" + }, "orders": { "type": "array", "items": { "$ref": "#/definitions/gctrpcOrderDetails" } + }, + "positionStats": { + "$ref": "#/definitions/gctrpcFuturesPositionStats" + }, + "fundingData": { + "$ref": "#/definitions/gctrpcFundingData" + } + } + }, + "gctrpcFuturesPositionStats": { + "type": "object", + "properties": { + "maintenanceMarginRequirement": { + "type": "string" + }, + "initialMarginRequirement": { + "type": "string" + }, + "estimatedLiquidationPrice": { + "type": "string" + }, + "collateralUsed": { + "type": "string" + }, + "markPrice": { + "type": "string" + }, + "currentSize": { + "type": "string" + }, + "breakEvenPrice": { + "type": "string" + }, + "averageOpenPrice": { + "type": "string" + }, + "recentPnl": { + "type": "string" + }, + "marginFraction": { + "type": "string" + }, + "freeCollateral": { + "type": "string" + }, + "totalCollateral": { + "type": "string" } } }, @@ -5004,6 +5348,17 @@ } } }, + "gctrpcGetFundingRatesResponse": { + "type": "object", + "properties": { + "fundingPayments": { + "type": "array", + "items": { + "$ref": "#/definitions/gctrpcFundingData" + } + } + } + }, "gctrpcGetFuturesPositionsResponse": { "type": "object", "properties": { @@ -5108,6 +5463,17 @@ } } }, + "gctrpcGetManagedPositionsResponse": { + "type": "object", + "properties": { + "positions": { + "type": "array", + "items": { + "$ref": "#/definitions/gctrpcFuturePosition" + } + } + } + }, "gctrpcGetMarginRatesHistoryResponse": { "type": "object", "properties": { @@ -5460,12 +5826,10 @@ "type": "string" }, "creationTime": { - "type": "string", - "format": "int64" + "type": "string" }, "updateTime": { - "type": "string", - "format": "int64" + "type": "string" }, "status": { "type": "string" diff --git a/gctrpc/rpc_grpc.pb.go b/gctrpc/rpc_grpc.pb.go index 9c9209ff..153709b2 100644 --- a/gctrpc/rpc_grpc.pb.go +++ b/gctrpc/rpc_grpc.pb.go @@ -121,6 +121,9 @@ type GoCryptoTraderServiceClient interface { Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error) GetTechnicalAnalysis(ctx context.Context, in *GetTechnicalAnalysisRequest, opts ...grpc.CallOption) (*GetTechnicalAnalysisResponse, error) GetMarginRatesHistory(ctx context.Context, in *GetMarginRatesHistoryRequest, opts ...grpc.CallOption) (*GetMarginRatesHistoryResponse, error) + GetManagedPosition(ctx context.Context, in *GetManagedPositionRequest, opts ...grpc.CallOption) (*GetManagedPositionsResponse, error) + GetAllManagedPositions(ctx context.Context, in *GetAllManagedPositionsRequest, opts ...grpc.CallOption) (*GetManagedPositionsResponse, error) + GetFundingRates(ctx context.Context, in *GetFundingRatesRequest, opts ...grpc.CallOption) (*GetFundingRatesResponse, error) } type goCryptoTraderServiceClient struct { @@ -1160,6 +1163,33 @@ func (c *goCryptoTraderServiceClient) GetMarginRatesHistory(ctx context.Context, return out, nil } +func (c *goCryptoTraderServiceClient) GetManagedPosition(ctx context.Context, in *GetManagedPositionRequest, opts ...grpc.CallOption) (*GetManagedPositionsResponse, error) { + out := new(GetManagedPositionsResponse) + err := c.cc.Invoke(ctx, "/gctrpc.GoCryptoTraderService/GetManagedPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *goCryptoTraderServiceClient) GetAllManagedPositions(ctx context.Context, in *GetAllManagedPositionsRequest, opts ...grpc.CallOption) (*GetManagedPositionsResponse, error) { + out := new(GetManagedPositionsResponse) + err := c.cc.Invoke(ctx, "/gctrpc.GoCryptoTraderService/GetAllManagedPositions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *goCryptoTraderServiceClient) GetFundingRates(ctx context.Context, in *GetFundingRatesRequest, opts ...grpc.CallOption) (*GetFundingRatesResponse, error) { + out := new(GetFundingRatesResponse) + err := c.cc.Invoke(ctx, "/gctrpc.GoCryptoTraderService/GetFundingRates", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // GoCryptoTraderServiceServer is the server API for GoCryptoTraderService service. // All implementations must embed UnimplementedGoCryptoTraderServiceServer // for forward compatibility @@ -1263,6 +1293,9 @@ type GoCryptoTraderServiceServer interface { Shutdown(context.Context, *ShutdownRequest) (*ShutdownResponse, error) GetTechnicalAnalysis(context.Context, *GetTechnicalAnalysisRequest) (*GetTechnicalAnalysisResponse, error) GetMarginRatesHistory(context.Context, *GetMarginRatesHistoryRequest) (*GetMarginRatesHistoryResponse, error) + GetManagedPosition(context.Context, *GetManagedPositionRequest) (*GetManagedPositionsResponse, error) + GetAllManagedPositions(context.Context, *GetAllManagedPositionsRequest) (*GetManagedPositionsResponse, error) + GetFundingRates(context.Context, *GetFundingRatesRequest) (*GetFundingRatesResponse, error) mustEmbedUnimplementedGoCryptoTraderServiceServer() } @@ -1567,6 +1600,15 @@ func (UnimplementedGoCryptoTraderServiceServer) GetTechnicalAnalysis(context.Con func (UnimplementedGoCryptoTraderServiceServer) GetMarginRatesHistory(context.Context, *GetMarginRatesHistoryRequest) (*GetMarginRatesHistoryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMarginRatesHistory not implemented") } +func (UnimplementedGoCryptoTraderServiceServer) GetManagedPosition(context.Context, *GetManagedPositionRequest) (*GetManagedPositionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetManagedPosition not implemented") +} +func (UnimplementedGoCryptoTraderServiceServer) GetAllManagedPositions(context.Context, *GetAllManagedPositionsRequest) (*GetManagedPositionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAllManagedPositions not implemented") +} +func (UnimplementedGoCryptoTraderServiceServer) GetFundingRates(context.Context, *GetFundingRatesRequest) (*GetFundingRatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFundingRates not implemented") +} func (UnimplementedGoCryptoTraderServiceServer) mustEmbedUnimplementedGoCryptoTraderServiceServer() {} // UnsafeGoCryptoTraderServiceServer may be embedded to opt out of forward compatibility for this service. @@ -3380,6 +3422,60 @@ func _GoCryptoTraderService_GetMarginRatesHistory_Handler(srv interface{}, ctx c return interceptor(ctx, in, info, handler) } +func _GoCryptoTraderService_GetManagedPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetManagedPositionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GoCryptoTraderServiceServer).GetManagedPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gctrpc.GoCryptoTraderService/GetManagedPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GoCryptoTraderServiceServer).GetManagedPosition(ctx, req.(*GetManagedPositionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GoCryptoTraderService_GetAllManagedPositions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllManagedPositionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GoCryptoTraderServiceServer).GetAllManagedPositions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gctrpc.GoCryptoTraderService/GetAllManagedPositions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GoCryptoTraderServiceServer).GetAllManagedPositions(ctx, req.(*GetAllManagedPositionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GoCryptoTraderService_GetFundingRates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFundingRatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GoCryptoTraderServiceServer).GetFundingRates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gctrpc.GoCryptoTraderService/GetFundingRates", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GoCryptoTraderServiceServer).GetFundingRates(ctx, req.(*GetFundingRatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + // GoCryptoTraderService_ServiceDesc is the grpc.ServiceDesc for GoCryptoTraderService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -3759,6 +3855,18 @@ var GoCryptoTraderService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetMarginRatesHistory", Handler: _GoCryptoTraderService_GetMarginRatesHistory_Handler, }, + { + MethodName: "GetManagedPosition", + Handler: _GoCryptoTraderService_GetManagedPosition_Handler, + }, + { + MethodName: "GetAllManagedPositions", + Handler: _GoCryptoTraderService_GetAllManagedPositions_Handler, + }, + { + MethodName: "GetFundingRates", + Handler: _GoCryptoTraderService_GetFundingRates_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/gctscript/wrappers/gct/gctwrapper_test.go b/gctscript/wrappers/gct/gctwrapper_test.go index 79c23b3c..cd5a5864 100644 --- a/gctscript/wrappers/gct/gctwrapper_test.go +++ b/gctscript/wrappers/gct/gctwrapper_test.go @@ -59,7 +59,7 @@ func TestMain(m *testing.M) { os.Exit(1) } - engine.Bot.OrderManager, err = engine.SetupOrderManager(em, &engine.CommunicationManager{}, &engine.Bot.ServicesWG, false, false) + engine.Bot.OrderManager, err = engine.SetupOrderManager(em, &engine.CommunicationManager{}, &engine.Bot.ServicesWG, false, false, 0) if err != nil { log.Print(err) os.Exit(1)