# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc import bbgo_pb2 as bbgo__pb2 class MarketDataServiceStub(object): """Missing associated documentation comment in .proto file.""" def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.Subscribe = channel.unary_stream( '/pb.MarketDataService/Subscribe', request_serializer=bbgo__pb2.SubscribeRequest.SerializeToString, response_deserializer=bbgo__pb2.SubscribeResponse.FromString, ) self.QueryKLines = channel.unary_unary( '/pb.MarketDataService/QueryKLines', request_serializer=bbgo__pb2.QueryKLinesRequest.SerializeToString, response_deserializer=bbgo__pb2.QueryKLinesResponse.FromString, ) class MarketDataServiceServicer(object): """Missing associated documentation comment in .proto file.""" def Subscribe(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def QueryKLines(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_MarketDataServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'Subscribe': grpc.unary_stream_rpc_method_handler( servicer.Subscribe, request_deserializer=bbgo__pb2.SubscribeRequest.FromString, response_serializer=bbgo__pb2.SubscribeResponse.SerializeToString, ), 'QueryKLines': grpc.unary_unary_rpc_method_handler( servicer.QueryKLines, request_deserializer=bbgo__pb2.QueryKLinesRequest.FromString, response_serializer=bbgo__pb2.QueryKLinesResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'pb.MarketDataService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API. class MarketDataService(object): """Missing associated documentation comment in .proto file.""" @staticmethod def Subscribe(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_stream(request, target, '/pb.MarketDataService/Subscribe', bbgo__pb2.SubscribeRequest.SerializeToString, bbgo__pb2.SubscribeResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def QueryKLines(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/pb.MarketDataService/QueryKLines', bbgo__pb2.QueryKLinesRequest.SerializeToString, bbgo__pb2.QueryKLinesResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) class UserDataServiceStub(object): """Missing associated documentation comment in .proto file.""" def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.SubscribeUserData = channel.unary_stream( '/pb.UserDataService/SubscribeUserData', request_serializer=bbgo__pb2.Empty.SerializeToString, response_deserializer=bbgo__pb2.SubscribeResponse.FromString, ) class UserDataServiceServicer(object): """Missing associated documentation comment in .proto file.""" def SubscribeUserData(self, request, context): """should support streaming """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_UserDataServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'SubscribeUserData': grpc.unary_stream_rpc_method_handler( servicer.SubscribeUserData, request_deserializer=bbgo__pb2.Empty.FromString, response_serializer=bbgo__pb2.SubscribeResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'pb.UserDataService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API. class UserDataService(object): """Missing associated documentation comment in .proto file.""" @staticmethod def SubscribeUserData(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_stream(request, target, '/pb.UserDataService/SubscribeUserData', bbgo__pb2.Empty.SerializeToString, bbgo__pb2.SubscribeResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) class TradingServiceStub(object): """Missing associated documentation comment in .proto file.""" def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.SubmitOrder = channel.unary_unary( '/pb.TradingService/SubmitOrder', request_serializer=bbgo__pb2.SubmitOrderRequest.SerializeToString, response_deserializer=bbgo__pb2.SubmitOrderResponse.FromString, ) self.CancelOrder = channel.unary_unary( '/pb.TradingService/CancelOrder', request_serializer=bbgo__pb2.CancelOrderRequest.SerializeToString, response_deserializer=bbgo__pb2.CancelOrderResponse.FromString, ) self.QueryOrder = channel.unary_unary( '/pb.TradingService/QueryOrder', request_serializer=bbgo__pb2.QueryOrderRequest.SerializeToString, response_deserializer=bbgo__pb2.QueryOrderResponse.FromString, ) self.QueryOrders = channel.unary_unary( '/pb.TradingService/QueryOrders', request_serializer=bbgo__pb2.QueryOrdersRequest.SerializeToString, response_deserializer=bbgo__pb2.QueryOrdersResponse.FromString, ) self.QueryTrades = channel.unary_unary( '/pb.TradingService/QueryTrades', request_serializer=bbgo__pb2.QueryTradesRequest.SerializeToString, response_deserializer=bbgo__pb2.QueryTradesResponse.FromString, ) class TradingServiceServicer(object): """Missing associated documentation comment in .proto file.""" def SubmitOrder(self, request, context): """request-response """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CancelOrder(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def QueryOrder(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def QueryOrders(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def QueryTrades(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_TradingServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'SubmitOrder': grpc.unary_unary_rpc_method_handler( servicer.SubmitOrder, request_deserializer=bbgo__pb2.SubmitOrderRequest.FromString, response_serializer=bbgo__pb2.SubmitOrderResponse.SerializeToString, ), 'CancelOrder': grpc.unary_unary_rpc_method_handler( servicer.CancelOrder, request_deserializer=bbgo__pb2.CancelOrderRequest.FromString, response_serializer=bbgo__pb2.CancelOrderResponse.SerializeToString, ), 'QueryOrder': grpc.unary_unary_rpc_method_handler( servicer.QueryOrder, request_deserializer=bbgo__pb2.QueryOrderRequest.FromString, response_serializer=bbgo__pb2.QueryOrderResponse.SerializeToString, ), 'QueryOrders': grpc.unary_unary_rpc_method_handler( servicer.QueryOrders, request_deserializer=bbgo__pb2.QueryOrdersRequest.FromString, response_serializer=bbgo__pb2.QueryOrdersResponse.SerializeToString, ), 'QueryTrades': grpc.unary_unary_rpc_method_handler( servicer.QueryTrades, request_deserializer=bbgo__pb2.QueryTradesRequest.FromString, response_serializer=bbgo__pb2.QueryTradesResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'pb.TradingService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API. class TradingService(object): """Missing associated documentation comment in .proto file.""" @staticmethod def SubmitOrder(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/pb.TradingService/SubmitOrder', bbgo__pb2.SubmitOrderRequest.SerializeToString, bbgo__pb2.SubmitOrderResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def CancelOrder(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/pb.TradingService/CancelOrder', bbgo__pb2.CancelOrderRequest.SerializeToString, bbgo__pb2.CancelOrderResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def QueryOrder(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/pb.TradingService/QueryOrder', bbgo__pb2.QueryOrderRequest.SerializeToString, bbgo__pb2.QueryOrderResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def QueryOrders(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/pb.TradingService/QueryOrders', bbgo__pb2.QueryOrdersRequest.SerializeToString, bbgo__pb2.QueryOrdersResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def QueryTrades(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/pb.TradingService/QueryTrades', bbgo__pb2.QueryTradesRequest.SerializeToString, bbgo__pb2.QueryTradesResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata)