2022-03-07 03:59:02 +00:00
|
|
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
|
|
"""Client and server classes corresponding to protobuf-defined services."""
|
|
|
|
import grpc
|
|
|
|
|
2022-04-07 11:28:05 +00:00
|
|
|
import bbgo_pb2 as bbgo__pb2
|
2022-03-07 03:59:02 +00:00
|
|
|
|
|
|
|
|
2022-04-07 11:28:05 +00:00
|
|
|
class MarketDataServiceStub(object):
|
2022-03-07 03:59:02 +00:00
|
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
|
|
|
|
def __init__(self, channel):
|
|
|
|
"""Constructor.
|
|
|
|
|
|
|
|
Args:
|
|
|
|
channel: A grpc.Channel.
|
|
|
|
"""
|
2022-04-07 11:28:05 +00:00
|
|
|
self.Subscribe = channel.unary_stream(
|
|
|
|
'/pb.MarketDataService/Subscribe',
|
2022-03-07 03:59:02 +00:00
|
|
|
request_serializer=bbgo__pb2.SubscribeRequest.SerializeToString,
|
|
|
|
response_deserializer=bbgo__pb2.SubscribeResponse.FromString,
|
|
|
|
)
|
2022-04-07 11:28:05 +00:00
|
|
|
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',
|
2022-03-07 03:59:02 +00:00
|
|
|
request_serializer=bbgo__pb2.Empty.SerializeToString,
|
|
|
|
response_deserializer=bbgo__pb2.SubscribeResponse.FromString,
|
|
|
|
)
|
2022-04-07 11:28:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
"""
|
2022-03-07 03:59:02 +00:00
|
|
|
self.SubmitOrder = channel.unary_unary(
|
2022-04-07 11:28:05 +00:00
|
|
|
'/pb.TradingService/SubmitOrder',
|
2022-03-07 03:59:02 +00:00
|
|
|
request_serializer=bbgo__pb2.SubmitOrderRequest.SerializeToString,
|
|
|
|
response_deserializer=bbgo__pb2.SubmitOrderResponse.FromString,
|
|
|
|
)
|
|
|
|
self.CancelOrder = channel.unary_unary(
|
2022-04-07 11:28:05 +00:00
|
|
|
'/pb.TradingService/CancelOrder',
|
2022-03-07 03:59:02 +00:00
|
|
|
request_serializer=bbgo__pb2.CancelOrderRequest.SerializeToString,
|
|
|
|
response_deserializer=bbgo__pb2.CancelOrderResponse.FromString,
|
|
|
|
)
|
|
|
|
self.QueryOrder = channel.unary_unary(
|
2022-04-07 11:28:05 +00:00
|
|
|
'/pb.TradingService/QueryOrder',
|
2022-03-07 03:59:02 +00:00
|
|
|
request_serializer=bbgo__pb2.QueryOrderRequest.SerializeToString,
|
|
|
|
response_deserializer=bbgo__pb2.QueryOrderResponse.FromString,
|
|
|
|
)
|
|
|
|
self.QueryOrders = channel.unary_unary(
|
2022-04-07 11:28:05 +00:00
|
|
|
'/pb.TradingService/QueryOrders',
|
2022-03-07 03:59:02 +00:00
|
|
|
request_serializer=bbgo__pb2.QueryOrdersRequest.SerializeToString,
|
|
|
|
response_deserializer=bbgo__pb2.QueryOrdersResponse.FromString,
|
|
|
|
)
|
|
|
|
self.QueryTrades = channel.unary_unary(
|
2022-04-07 11:28:05 +00:00
|
|
|
'/pb.TradingService/QueryTrades',
|
2022-03-07 03:59:02 +00:00
|
|
|
request_serializer=bbgo__pb2.QueryTradesRequest.SerializeToString,
|
|
|
|
response_deserializer=bbgo__pb2.QueryTradesResponse.FromString,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-04-07 11:28:05 +00:00
|
|
|
class TradingServiceServicer(object):
|
2022-03-07 03:59:02 +00:00
|
|
|
"""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!')
|
|
|
|
|
|
|
|
|
2022-04-07 11:28:05 +00:00
|
|
|
def add_TradingServiceServicer_to_server(servicer, server):
|
2022-03-07 03:59:02 +00:00
|
|
|
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(
|
2022-04-07 11:28:05 +00:00
|
|
|
'pb.TradingService', rpc_method_handlers)
|
2022-03-07 03:59:02 +00:00
|
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
|
|
|
|
|
|
|
|
|
|
# This class is part of an EXPERIMENTAL API.
|
2022-04-07 11:28:05 +00:00
|
|
|
class TradingService(object):
|
2022-03-07 03:59:02 +00:00
|
|
|
"""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):
|
2022-04-07 11:28:05 +00:00
|
|
|
return grpc.experimental.unary_unary(request, target, '/pb.TradingService/SubmitOrder',
|
2022-03-07 03:59:02 +00:00
|
|
|
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):
|
2022-04-07 11:28:05 +00:00
|
|
|
return grpc.experimental.unary_unary(request, target, '/pb.TradingService/CancelOrder',
|
2022-03-07 03:59:02 +00:00
|
|
|
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):
|
2022-04-07 11:28:05 +00:00
|
|
|
return grpc.experimental.unary_unary(request, target, '/pb.TradingService/QueryOrder',
|
2022-03-07 03:59:02 +00:00
|
|
|
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):
|
2022-04-07 11:28:05 +00:00
|
|
|
return grpc.experimental.unary_unary(request, target, '/pb.TradingService/QueryOrders',
|
2022-03-07 03:59:02 +00:00
|
|
|
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):
|
2022-04-07 11:28:05 +00:00
|
|
|
return grpc.experimental.unary_unary(request, target, '/pb.TradingService/QueryTrades',
|
2022-03-07 03:59:02 +00:00
|
|
|
bbgo__pb2.QueryTradesRequest.SerializeToString,
|
|
|
|
bbgo__pb2.QueryTradesResponse.FromString,
|
|
|
|
options, channel_credentials,
|
|
|
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|