gctrpc/ordermanager/binance: Add new getManagedOrders command and various improvements (#712)

* first draft of getmanaged orders RPC call

* - ClientIDs for binance, especially spot asset
- applied old ClientOrderId for cancelled orders
- added clientOrderId to GCTRPC

* added tests for Matchfilter and GetManagedOrders

* smaller fixes

* comment fix
added getFilteredOrders to store
changed store mutex to RWMutex
smaller fixes

* fixed bug in Detail Copy and added test

* fixes for Scotts review

* processSubmittedOrder was missing clientOrderId

* changed: TestGetOrdersFiltered expanded
fixed: warning, where variable name collided with package name
fixed: used req.AssetType in binance_wrapper.go

Co-authored-by: Mark Dzulko <81071907+Mark-numus@users.noreply.github.com>
This commit is contained in:
Mark Dzulko
2021-07-20 02:27:16 +02:00
committed by GitHub
parent 6182dd6fbc
commit e1eceeafe8
19 changed files with 1061 additions and 313 deletions

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.1
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: rpc.proto
package gctrpc
import (
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@@ -23,10 +22,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type GetInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -11019,8 +11014,8 @@ var file_rpc_proto_rawDesc = []byte{
0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61,
0x74, 0x65, 0x18, 0x01, 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,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x32, 0x98,
0x4e, 0x0a, 0x0e, 0x47, 0x6f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x54, 0x72, 0x61, 0x64, 0x65,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x32, 0x82,
0x4f, 0x0a, 0x0e, 0x47, 0x6f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x54, 0x72, 0x61, 0x64, 0x65,
0x72, 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,
@@ -11645,11 +11640,17 @@ var file_rpc_proto_rawDesc = []byte{
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, 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,
0x6f, 0x62, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 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, 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 (
@@ -12013,93 +12014,95 @@ var file_rpc_proto_depIdxs = []int32{
147, // 173: gctrpc.GoCryptoTrader.DeleteDataHistoryJob:input_type -> gctrpc.GetDataHistoryJobDetailsRequest
151, // 174: gctrpc.GoCryptoTrader.GetDataHistoryJobsBetween:input_type -> gctrpc.GetDataHistoryJobsBetweenRequest
147, // 175: gctrpc.GoCryptoTrader.GetDataHistoryJobSummary:input_type -> gctrpc.GetDataHistoryJobDetailsRequest
1, // 176: gctrpc.GoCryptoTrader.GetInfo:output_type -> gctrpc.GetInfoResponse
7, // 177: gctrpc.GoCryptoTrader.GetSubsystems:output_type -> gctrpc.GetSusbsytemsResponse
127, // 178: gctrpc.GoCryptoTrader.EnableSubsystem:output_type -> gctrpc.GenericResponse
127, // 179: gctrpc.GoCryptoTrader.DisableSubsystem:output_type -> gctrpc.GenericResponse
10, // 180: gctrpc.GoCryptoTrader.GetRPCEndpoints:output_type -> gctrpc.GetRPCEndpointsResponse
4, // 181: gctrpc.GoCryptoTrader.GetCommunicationRelayers:output_type -> gctrpc.GetCommunicationRelayersResponse
13, // 182: gctrpc.GoCryptoTrader.GetExchanges:output_type -> gctrpc.GetExchangesResponse
127, // 183: gctrpc.GoCryptoTrader.DisableExchange:output_type -> gctrpc.GenericResponse
19, // 184: gctrpc.GoCryptoTrader.GetExchangeInfo:output_type -> gctrpc.GetExchangeInfoResponse
14, // 185: gctrpc.GoCryptoTrader.GetExchangeOTPCode:output_type -> gctrpc.GetExchangeOTPReponse
16, // 186: gctrpc.GoCryptoTrader.GetExchangeOTPCodes:output_type -> gctrpc.GetExchangeOTPsResponse
127, // 187: gctrpc.GoCryptoTrader.EnableExchange:output_type -> gctrpc.GenericResponse
22, // 188: gctrpc.GoCryptoTrader.GetTicker:output_type -> gctrpc.TickerResponse
25, // 189: gctrpc.GoCryptoTrader.GetTickers:output_type -> gctrpc.GetTickersResponse
28, // 190: gctrpc.GoCryptoTrader.GetOrderbook:output_type -> gctrpc.OrderbookResponse
31, // 191: gctrpc.GoCryptoTrader.GetOrderbooks:output_type -> gctrpc.GetOrderbooksResponse
35, // 192: gctrpc.GoCryptoTrader.GetAccountInfo:output_type -> gctrpc.GetAccountInfoResponse
35, // 193: gctrpc.GoCryptoTrader.UpdateAccountInfo:output_type -> gctrpc.GetAccountInfoResponse
35, // 194: gctrpc.GoCryptoTrader.GetAccountInfoStream:output_type -> gctrpc.GetAccountInfoResponse
37, // 195: gctrpc.GoCryptoTrader.GetConfig:output_type -> gctrpc.GetConfigResponse
40, // 196: gctrpc.GoCryptoTrader.GetPortfolio:output_type -> gctrpc.GetPortfolioResponse
47, // 197: gctrpc.GoCryptoTrader.GetPortfolioSummary:output_type -> gctrpc.GetPortfolioSummaryResponse
127, // 198: gctrpc.GoCryptoTrader.AddPortfolioAddress:output_type -> gctrpc.GenericResponse
127, // 199: gctrpc.GoCryptoTrader.RemovePortfolioAddress:output_type -> gctrpc.GenericResponse
52, // 200: gctrpc.GoCryptoTrader.GetForexProviders:output_type -> gctrpc.GetForexProvidersResponse
55, // 201: gctrpc.GoCryptoTrader.GetForexRates:output_type -> gctrpc.GetForexRatesResponse
59, // 202: gctrpc.GoCryptoTrader.GetOrders:output_type -> gctrpc.GetOrdersResponse
56, // 203: gctrpc.GoCryptoTrader.GetOrder:output_type -> gctrpc.OrderDetails
63, // 204: gctrpc.GoCryptoTrader.SubmitOrder:output_type -> gctrpc.SubmitOrderResponse
65, // 205: gctrpc.GoCryptoTrader.SimulateOrder:output_type -> gctrpc.SimulateOrderResponse
65, // 206: gctrpc.GoCryptoTrader.WhaleBomb:output_type -> gctrpc.SimulateOrderResponse
127, // 207: gctrpc.GoCryptoTrader.CancelOrder:output_type -> gctrpc.GenericResponse
69, // 208: gctrpc.GoCryptoTrader.CancelBatchOrders:output_type -> gctrpc.CancelBatchOrdersResponse
71, // 209: gctrpc.GoCryptoTrader.CancelAllOrders:output_type -> gctrpc.CancelAllOrdersResponse
74, // 210: gctrpc.GoCryptoTrader.GetEvents:output_type -> gctrpc.GetEventsResponse
76, // 211: gctrpc.GoCryptoTrader.AddEvent:output_type -> gctrpc.AddEventResponse
127, // 212: gctrpc.GoCryptoTrader.RemoveEvent:output_type -> gctrpc.GenericResponse
79, // 213: gctrpc.GoCryptoTrader.GetCryptocurrencyDepositAddresses:output_type -> gctrpc.GetCryptocurrencyDepositAddressesResponse
81, // 214: gctrpc.GoCryptoTrader.GetCryptocurrencyDepositAddress:output_type -> gctrpc.GetCryptocurrencyDepositAddressResponse
84, // 215: gctrpc.GoCryptoTrader.WithdrawFiatFunds:output_type -> gctrpc.WithdrawResponse
84, // 216: gctrpc.GoCryptoTrader.WithdrawCryptocurrencyFunds:output_type -> gctrpc.WithdrawResponse
86, // 217: gctrpc.GoCryptoTrader.WithdrawalEventByID:output_type -> gctrpc.WithdrawalEventByIDResponse
89, // 218: gctrpc.GoCryptoTrader.WithdrawalEventsByExchange:output_type -> gctrpc.WithdrawalEventsByExchangeResponse
89, // 219: gctrpc.GoCryptoTrader.WithdrawalEventsByDate:output_type -> gctrpc.WithdrawalEventsByExchangeResponse
96, // 220: gctrpc.GoCryptoTrader.GetLoggerDetails:output_type -> gctrpc.GetLoggerDetailsResponse
96, // 221: gctrpc.GoCryptoTrader.SetLoggerDetails:output_type -> gctrpc.GetLoggerDetailsResponse
99, // 222: gctrpc.GoCryptoTrader.GetExchangePairs:output_type -> gctrpc.GetExchangePairsResponse
127, // 223: gctrpc.GoCryptoTrader.SetExchangePair:output_type -> gctrpc.GenericResponse
28, // 224: gctrpc.GoCryptoTrader.GetOrderbookStream:output_type -> gctrpc.OrderbookResponse
28, // 225: gctrpc.GoCryptoTrader.GetExchangeOrderbookStream:output_type -> gctrpc.OrderbookResponse
22, // 226: gctrpc.GoCryptoTrader.GetTickerStream:output_type -> gctrpc.TickerResponse
22, // 227: gctrpc.GoCryptoTrader.GetExchangeTickerStream:output_type -> gctrpc.TickerResponse
106, // 228: gctrpc.GoCryptoTrader.GetAuditEvent:output_type -> gctrpc.GetAuditEventResponse
127, // 229: gctrpc.GoCryptoTrader.GCTScriptExecute:output_type -> gctrpc.GenericResponse
127, // 230: gctrpc.GoCryptoTrader.GCTScriptUpload:output_type -> gctrpc.GenericResponse
126, // 231: gctrpc.GoCryptoTrader.GCTScriptReadScript:output_type -> gctrpc.GCTScriptQueryResponse
125, // 232: gctrpc.GoCryptoTrader.GCTScriptStatus:output_type -> gctrpc.GCTScriptStatusResponse
126, // 233: gctrpc.GoCryptoTrader.GCTScriptQuery:output_type -> gctrpc.GCTScriptQueryResponse
127, // 234: gctrpc.GoCryptoTrader.GCTScriptStop:output_type -> gctrpc.GenericResponse
127, // 235: gctrpc.GoCryptoTrader.GCTScriptStopAll:output_type -> gctrpc.GenericResponse
125, // 236: gctrpc.GoCryptoTrader.GCTScriptListAll:output_type -> gctrpc.GCTScriptStatusResponse
127, // 237: gctrpc.GoCryptoTrader.GCTScriptAutoLoadToggle:output_type -> gctrpc.GenericResponse
112, // 238: gctrpc.GoCryptoTrader.GetHistoricCandles:output_type -> gctrpc.GetHistoricCandlesResponse
127, // 239: gctrpc.GoCryptoTrader.SetExchangeAsset:output_type -> gctrpc.GenericResponse
127, // 240: gctrpc.GoCryptoTrader.SetAllExchangePairs:output_type -> gctrpc.GenericResponse
127, // 241: gctrpc.GoCryptoTrader.UpdateExchangeSupportedPairs:output_type -> gctrpc.GenericResponse
132, // 242: gctrpc.GoCryptoTrader.GetExchangeAssets:output_type -> gctrpc.GetExchangeAssetsResponse
134, // 243: gctrpc.GoCryptoTrader.WebsocketGetInfo:output_type -> gctrpc.WebsocketGetInfoResponse
127, // 244: gctrpc.GoCryptoTrader.WebsocketSetEnabled:output_type -> gctrpc.GenericResponse
138, // 245: gctrpc.GoCryptoTrader.WebsocketGetSubscriptions:output_type -> gctrpc.WebsocketGetSubscriptionsResponse
127, // 246: gctrpc.GoCryptoTrader.WebsocketSetProxy:output_type -> gctrpc.GenericResponse
127, // 247: gctrpc.GoCryptoTrader.WebsocketSetURL:output_type -> gctrpc.GenericResponse
109, // 248: gctrpc.GoCryptoTrader.GetRecentTrades:output_type -> gctrpc.SavedTradesResponse
109, // 249: gctrpc.GoCryptoTrader.GetHistoricTrades:output_type -> gctrpc.SavedTradesResponse
109, // 250: gctrpc.GoCryptoTrader.GetSavedTrades:output_type -> gctrpc.SavedTradesResponse
112, // 251: gctrpc.GoCryptoTrader.ConvertTradesToCandles:output_type -> gctrpc.GetHistoricCandlesResponse
143, // 252: gctrpc.GoCryptoTrader.FindMissingSavedCandleIntervals:output_type -> gctrpc.FindMissingIntervalsResponse
143, // 253: gctrpc.GoCryptoTrader.FindMissingSavedTradeIntervals:output_type -> gctrpc.FindMissingIntervalsResponse
127, // 254: gctrpc.GoCryptoTrader.SetExchangeTradeProcessing:output_type -> gctrpc.GenericResponse
146, // 255: gctrpc.GoCryptoTrader.UpsertDataHistoryJob:output_type -> gctrpc.UpsertDataHistoryJobResponse
148, // 256: gctrpc.GoCryptoTrader.GetDataHistoryJobDetails:output_type -> gctrpc.DataHistoryJob
150, // 257: gctrpc.GoCryptoTrader.GetActiveDataHistoryJobs:output_type -> gctrpc.DataHistoryJobs
127, // 258: gctrpc.GoCryptoTrader.DeleteDataHistoryJob:output_type -> gctrpc.GenericResponse
150, // 259: gctrpc.GoCryptoTrader.GetDataHistoryJobsBetween:output_type -> gctrpc.DataHistoryJobs
148, // 260: gctrpc.GoCryptoTrader.GetDataHistoryJobSummary:output_type -> gctrpc.DataHistoryJob
176, // [176:261] is the sub-list for method output_type
91, // [91:176] is the sub-list for method input_type
58, // 176: gctrpc.GoCryptoTrader.GetManagedOrders:input_type -> gctrpc.GetOrdersRequest
1, // 177: gctrpc.GoCryptoTrader.GetInfo:output_type -> gctrpc.GetInfoResponse
7, // 178: gctrpc.GoCryptoTrader.GetSubsystems:output_type -> gctrpc.GetSusbsytemsResponse
127, // 179: gctrpc.GoCryptoTrader.EnableSubsystem:output_type -> gctrpc.GenericResponse
127, // 180: gctrpc.GoCryptoTrader.DisableSubsystem:output_type -> gctrpc.GenericResponse
10, // 181: gctrpc.GoCryptoTrader.GetRPCEndpoints:output_type -> gctrpc.GetRPCEndpointsResponse
4, // 182: gctrpc.GoCryptoTrader.GetCommunicationRelayers:output_type -> gctrpc.GetCommunicationRelayersResponse
13, // 183: gctrpc.GoCryptoTrader.GetExchanges:output_type -> gctrpc.GetExchangesResponse
127, // 184: gctrpc.GoCryptoTrader.DisableExchange:output_type -> gctrpc.GenericResponse
19, // 185: gctrpc.GoCryptoTrader.GetExchangeInfo:output_type -> gctrpc.GetExchangeInfoResponse
14, // 186: gctrpc.GoCryptoTrader.GetExchangeOTPCode:output_type -> gctrpc.GetExchangeOTPReponse
16, // 187: gctrpc.GoCryptoTrader.GetExchangeOTPCodes:output_type -> gctrpc.GetExchangeOTPsResponse
127, // 188: gctrpc.GoCryptoTrader.EnableExchange:output_type -> gctrpc.GenericResponse
22, // 189: gctrpc.GoCryptoTrader.GetTicker:output_type -> gctrpc.TickerResponse
25, // 190: gctrpc.GoCryptoTrader.GetTickers:output_type -> gctrpc.GetTickersResponse
28, // 191: gctrpc.GoCryptoTrader.GetOrderbook:output_type -> gctrpc.OrderbookResponse
31, // 192: gctrpc.GoCryptoTrader.GetOrderbooks:output_type -> gctrpc.GetOrderbooksResponse
35, // 193: gctrpc.GoCryptoTrader.GetAccountInfo:output_type -> gctrpc.GetAccountInfoResponse
35, // 194: gctrpc.GoCryptoTrader.UpdateAccountInfo:output_type -> gctrpc.GetAccountInfoResponse
35, // 195: gctrpc.GoCryptoTrader.GetAccountInfoStream:output_type -> gctrpc.GetAccountInfoResponse
37, // 196: gctrpc.GoCryptoTrader.GetConfig:output_type -> gctrpc.GetConfigResponse
40, // 197: gctrpc.GoCryptoTrader.GetPortfolio:output_type -> gctrpc.GetPortfolioResponse
47, // 198: gctrpc.GoCryptoTrader.GetPortfolioSummary:output_type -> gctrpc.GetPortfolioSummaryResponse
127, // 199: gctrpc.GoCryptoTrader.AddPortfolioAddress:output_type -> gctrpc.GenericResponse
127, // 200: gctrpc.GoCryptoTrader.RemovePortfolioAddress:output_type -> gctrpc.GenericResponse
52, // 201: gctrpc.GoCryptoTrader.GetForexProviders:output_type -> gctrpc.GetForexProvidersResponse
55, // 202: gctrpc.GoCryptoTrader.GetForexRates:output_type -> gctrpc.GetForexRatesResponse
59, // 203: gctrpc.GoCryptoTrader.GetOrders:output_type -> gctrpc.GetOrdersResponse
56, // 204: gctrpc.GoCryptoTrader.GetOrder:output_type -> gctrpc.OrderDetails
63, // 205: gctrpc.GoCryptoTrader.SubmitOrder:output_type -> gctrpc.SubmitOrderResponse
65, // 206: gctrpc.GoCryptoTrader.SimulateOrder:output_type -> gctrpc.SimulateOrderResponse
65, // 207: gctrpc.GoCryptoTrader.WhaleBomb:output_type -> gctrpc.SimulateOrderResponse
127, // 208: gctrpc.GoCryptoTrader.CancelOrder:output_type -> gctrpc.GenericResponse
69, // 209: gctrpc.GoCryptoTrader.CancelBatchOrders:output_type -> gctrpc.CancelBatchOrdersResponse
71, // 210: gctrpc.GoCryptoTrader.CancelAllOrders:output_type -> gctrpc.CancelAllOrdersResponse
74, // 211: gctrpc.GoCryptoTrader.GetEvents:output_type -> gctrpc.GetEventsResponse
76, // 212: gctrpc.GoCryptoTrader.AddEvent:output_type -> gctrpc.AddEventResponse
127, // 213: gctrpc.GoCryptoTrader.RemoveEvent:output_type -> gctrpc.GenericResponse
79, // 214: gctrpc.GoCryptoTrader.GetCryptocurrencyDepositAddresses:output_type -> gctrpc.GetCryptocurrencyDepositAddressesResponse
81, // 215: gctrpc.GoCryptoTrader.GetCryptocurrencyDepositAddress:output_type -> gctrpc.GetCryptocurrencyDepositAddressResponse
84, // 216: gctrpc.GoCryptoTrader.WithdrawFiatFunds:output_type -> gctrpc.WithdrawResponse
84, // 217: gctrpc.GoCryptoTrader.WithdrawCryptocurrencyFunds:output_type -> gctrpc.WithdrawResponse
86, // 218: gctrpc.GoCryptoTrader.WithdrawalEventByID:output_type -> gctrpc.WithdrawalEventByIDResponse
89, // 219: gctrpc.GoCryptoTrader.WithdrawalEventsByExchange:output_type -> gctrpc.WithdrawalEventsByExchangeResponse
89, // 220: gctrpc.GoCryptoTrader.WithdrawalEventsByDate:output_type -> gctrpc.WithdrawalEventsByExchangeResponse
96, // 221: gctrpc.GoCryptoTrader.GetLoggerDetails:output_type -> gctrpc.GetLoggerDetailsResponse
96, // 222: gctrpc.GoCryptoTrader.SetLoggerDetails:output_type -> gctrpc.GetLoggerDetailsResponse
99, // 223: gctrpc.GoCryptoTrader.GetExchangePairs:output_type -> gctrpc.GetExchangePairsResponse
127, // 224: gctrpc.GoCryptoTrader.SetExchangePair:output_type -> gctrpc.GenericResponse
28, // 225: gctrpc.GoCryptoTrader.GetOrderbookStream:output_type -> gctrpc.OrderbookResponse
28, // 226: gctrpc.GoCryptoTrader.GetExchangeOrderbookStream:output_type -> gctrpc.OrderbookResponse
22, // 227: gctrpc.GoCryptoTrader.GetTickerStream:output_type -> gctrpc.TickerResponse
22, // 228: gctrpc.GoCryptoTrader.GetExchangeTickerStream:output_type -> gctrpc.TickerResponse
106, // 229: gctrpc.GoCryptoTrader.GetAuditEvent:output_type -> gctrpc.GetAuditEventResponse
127, // 230: gctrpc.GoCryptoTrader.GCTScriptExecute:output_type -> gctrpc.GenericResponse
127, // 231: gctrpc.GoCryptoTrader.GCTScriptUpload:output_type -> gctrpc.GenericResponse
126, // 232: gctrpc.GoCryptoTrader.GCTScriptReadScript:output_type -> gctrpc.GCTScriptQueryResponse
125, // 233: gctrpc.GoCryptoTrader.GCTScriptStatus:output_type -> gctrpc.GCTScriptStatusResponse
126, // 234: gctrpc.GoCryptoTrader.GCTScriptQuery:output_type -> gctrpc.GCTScriptQueryResponse
127, // 235: gctrpc.GoCryptoTrader.GCTScriptStop:output_type -> gctrpc.GenericResponse
127, // 236: gctrpc.GoCryptoTrader.GCTScriptStopAll:output_type -> gctrpc.GenericResponse
125, // 237: gctrpc.GoCryptoTrader.GCTScriptListAll:output_type -> gctrpc.GCTScriptStatusResponse
127, // 238: gctrpc.GoCryptoTrader.GCTScriptAutoLoadToggle:output_type -> gctrpc.GenericResponse
112, // 239: gctrpc.GoCryptoTrader.GetHistoricCandles:output_type -> gctrpc.GetHistoricCandlesResponse
127, // 240: gctrpc.GoCryptoTrader.SetExchangeAsset:output_type -> gctrpc.GenericResponse
127, // 241: gctrpc.GoCryptoTrader.SetAllExchangePairs:output_type -> gctrpc.GenericResponse
127, // 242: gctrpc.GoCryptoTrader.UpdateExchangeSupportedPairs:output_type -> gctrpc.GenericResponse
132, // 243: gctrpc.GoCryptoTrader.GetExchangeAssets:output_type -> gctrpc.GetExchangeAssetsResponse
134, // 244: gctrpc.GoCryptoTrader.WebsocketGetInfo:output_type -> gctrpc.WebsocketGetInfoResponse
127, // 245: gctrpc.GoCryptoTrader.WebsocketSetEnabled:output_type -> gctrpc.GenericResponse
138, // 246: gctrpc.GoCryptoTrader.WebsocketGetSubscriptions:output_type -> gctrpc.WebsocketGetSubscriptionsResponse
127, // 247: gctrpc.GoCryptoTrader.WebsocketSetProxy:output_type -> gctrpc.GenericResponse
127, // 248: gctrpc.GoCryptoTrader.WebsocketSetURL:output_type -> gctrpc.GenericResponse
109, // 249: gctrpc.GoCryptoTrader.GetRecentTrades:output_type -> gctrpc.SavedTradesResponse
109, // 250: gctrpc.GoCryptoTrader.GetHistoricTrades:output_type -> gctrpc.SavedTradesResponse
109, // 251: gctrpc.GoCryptoTrader.GetSavedTrades:output_type -> gctrpc.SavedTradesResponse
112, // 252: gctrpc.GoCryptoTrader.ConvertTradesToCandles:output_type -> gctrpc.GetHistoricCandlesResponse
143, // 253: gctrpc.GoCryptoTrader.FindMissingSavedCandleIntervals:output_type -> gctrpc.FindMissingIntervalsResponse
143, // 254: gctrpc.GoCryptoTrader.FindMissingSavedTradeIntervals:output_type -> gctrpc.FindMissingIntervalsResponse
127, // 255: gctrpc.GoCryptoTrader.SetExchangeTradeProcessing:output_type -> gctrpc.GenericResponse
146, // 256: gctrpc.GoCryptoTrader.UpsertDataHistoryJob:output_type -> gctrpc.UpsertDataHistoryJobResponse
148, // 257: gctrpc.GoCryptoTrader.GetDataHistoryJobDetails:output_type -> gctrpc.DataHistoryJob
150, // 258: gctrpc.GoCryptoTrader.GetActiveDataHistoryJobs:output_type -> gctrpc.DataHistoryJobs
127, // 259: gctrpc.GoCryptoTrader.DeleteDataHistoryJob:output_type -> gctrpc.GenericResponse
150, // 260: gctrpc.GoCryptoTrader.GetDataHistoryJobsBetween:output_type -> gctrpc.DataHistoryJobs
148, // 261: gctrpc.GoCryptoTrader.GetDataHistoryJobSummary:output_type -> gctrpc.DataHistoryJob
59, // 262: gctrpc.GoCryptoTrader.GetManagedOrders:output_type -> gctrpc.GetOrdersResponse
177, // [177:263] is the sub-list for method output_type
91, // [91:177] is the sub-list for method input_type
91, // [91:91] is the sub-list for extension type_name
91, // [91:91] is the sub-list for extension extendee
0, // [0:91] is the sub-list for field type_name

File diff suppressed because it is too large Load Diff

View File

@@ -1454,4 +1454,10 @@ service GoCryptoTrader {
get: "/v1/getdatahistoryjobsummary"
};
}
rpc GetManagedOrders (GetOrdersRequest) returns (GetOrdersResponse) {
option (google.api.http) = {
post: "/v1/getmanagedorders"
body: "*"
};
}
}

View File

@@ -1667,6 +1667,38 @@
]
}
},
"/v1/getmanagedorders": {
"post": {
"operationId": "GoCryptoTrader_GetManagedOrders",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetOrdersResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGetOrdersRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getorder": {
"post": {
"operationId": "GoCryptoTrader_GetOrder",

View File

@@ -103,6 +103,7 @@ type GoCryptoTraderClient interface {
DeleteDataHistoryJob(ctx context.Context, in *GetDataHistoryJobDetailsRequest, opts ...grpc.CallOption) (*GenericResponse, error)
GetDataHistoryJobsBetween(ctx context.Context, in *GetDataHistoryJobsBetweenRequest, opts ...grpc.CallOption) (*DataHistoryJobs, error)
GetDataHistoryJobSummary(ctx context.Context, in *GetDataHistoryJobDetailsRequest, opts ...grpc.CallOption) (*DataHistoryJob, error)
GetManagedOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (*GetOrdersResponse, error)
}
type goCryptoTraderClient struct {
@@ -1016,6 +1017,15 @@ func (c *goCryptoTraderClient) GetDataHistoryJobSummary(ctx context.Context, in
return out, nil
}
func (c *goCryptoTraderClient) GetManagedOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (*GetOrdersResponse, error) {
out := new(GetOrdersResponse)
err := c.cc.Invoke(ctx, "/gctrpc.GoCryptoTrader/GetManagedOrders", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GoCryptoTraderServer is the server API for GoCryptoTrader service.
// All implementations must embed UnimplementedGoCryptoTraderServer
// for forward compatibility
@@ -1105,6 +1115,7 @@ type GoCryptoTraderServer interface {
DeleteDataHistoryJob(context.Context, *GetDataHistoryJobDetailsRequest) (*GenericResponse, error)
GetDataHistoryJobsBetween(context.Context, *GetDataHistoryJobsBetweenRequest) (*DataHistoryJobs, error)
GetDataHistoryJobSummary(context.Context, *GetDataHistoryJobDetailsRequest) (*DataHistoryJob, error)
GetManagedOrders(context.Context, *GetOrdersRequest) (*GetOrdersResponse, error)
mustEmbedUnimplementedGoCryptoTraderServer()
}
@@ -1367,6 +1378,9 @@ func (UnimplementedGoCryptoTraderServer) GetDataHistoryJobsBetween(context.Conte
func (UnimplementedGoCryptoTraderServer) GetDataHistoryJobSummary(context.Context, *GetDataHistoryJobDetailsRequest) (*DataHistoryJob, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDataHistoryJobSummary not implemented")
}
func (UnimplementedGoCryptoTraderServer) GetManagedOrders(context.Context, *GetOrdersRequest) (*GetOrdersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetManagedOrders not implemented")
}
func (UnimplementedGoCryptoTraderServer) mustEmbedUnimplementedGoCryptoTraderServer() {}
// UnsafeGoCryptoTraderServer may be embedded to opt out of forward compatibility for this service.
@@ -2928,6 +2942,24 @@ func _GoCryptoTrader_GetDataHistoryJobSummary_Handler(srv interface{}, ctx conte
return interceptor(ctx, in, info, handler)
}
func _GoCryptoTrader_GetManagedOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetOrdersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GoCryptoTraderServer).GetManagedOrders(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gctrpc.GoCryptoTrader/GetManagedOrders",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GoCryptoTraderServer).GetManagedOrders(ctx, req.(*GetOrdersRequest))
}
return interceptor(ctx, in, info, handler)
}
// GoCryptoTrader_ServiceDesc is the grpc.ServiceDesc for GoCryptoTrader service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -3251,6 +3283,10 @@ var GoCryptoTrader_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetDataHistoryJobSummary",
Handler: _GoCryptoTrader_GetDataHistoryJobSummary_Handler,
},
{
MethodName: "GetManagedOrders",
Handler: _GoCryptoTrader_GetManagedOrders_Handler,
},
},
Streams: []grpc.StreamDesc{
{