Skip to content

Commit

Permalink
chore: update proto files
Browse files Browse the repository at this point in the history
  • Loading branch information
achilleas-kal committed Sep 1, 2022
1 parent 8364cd2 commit b465a0b
Show file tree
Hide file tree
Showing 12 changed files with 1,927 additions and 477 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Note that the [sync client](https://github.com/InjectiveLabs/sdk-python/blob/mas
**0.5.7.8**
* Add state as a request param in OrdersHistory
* Add market_id as an optional param in Positions
* Re-gen proto files

**0.5.7.7**
* Add start_time and end_time in TradesRequest
Expand Down
407 changes: 337 additions & 70 deletions pyinjective/proto/exchange/injective_derivative_exchange_rpc_pb2.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def __init__(self, channel):
request_serializer=exchange_dot_injective__derivative__exchange__rpc__pb2.OrdersHistoryRequest.SerializeToString,
response_deserializer=exchange_dot_injective__derivative__exchange__rpc__pb2.OrdersHistoryResponse.FromString,
)
self.StreamOrdersHistory = channel.unary_stream(
'/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/StreamOrdersHistory',
request_serializer=exchange_dot_injective__derivative__exchange__rpc__pb2.StreamOrdersHistoryRequest.SerializeToString,
response_deserializer=exchange_dot_injective__derivative__exchange__rpc__pb2.StreamOrdersHistoryResponse.FromString,
)


class InjectiveDerivativeExchangeRPCServicer(object):
Expand Down Expand Up @@ -258,7 +263,14 @@ def SubaccountTradesList(self, request, context):
raise NotImplementedError('Method not implemented!')

def OrdersHistory(self, request, context):
"""Lists history orders posted from this subaccount
"""Lists history orders posted from a subaccount
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def StreamOrdersHistory(self, request, context):
"""Stream updates to historical orders of a spot Market
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
Expand Down Expand Up @@ -367,6 +379,11 @@ def add_InjectiveDerivativeExchangeRPCServicer_to_server(servicer, server):
request_deserializer=exchange_dot_injective__derivative__exchange__rpc__pb2.OrdersHistoryRequest.FromString,
response_serializer=exchange_dot_injective__derivative__exchange__rpc__pb2.OrdersHistoryResponse.SerializeToString,
),
'StreamOrdersHistory': grpc.unary_stream_rpc_method_handler(
servicer.StreamOrdersHistory,
request_deserializer=exchange_dot_injective__derivative__exchange__rpc__pb2.StreamOrdersHistoryRequest.FromString,
response_serializer=exchange_dot_injective__derivative__exchange__rpc__pb2.StreamOrdersHistoryResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC', rpc_method_handlers)
Expand Down Expand Up @@ -718,3 +735,20 @@ def OrdersHistory(request,
exchange_dot_injective__derivative__exchange__rpc__pb2.OrdersHistoryResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def StreamOrdersHistory(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, '/injective_derivative_exchange_rpc.InjectiveDerivativeExchangeRPC/StreamOrdersHistory',
exchange_dot_injective__derivative__exchange__rpc__pb2.StreamOrdersHistoryRequest.SerializeToString,
exchange_dot_injective__derivative__exchange__rpc__pb2.StreamOrdersHistoryResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
251 changes: 210 additions & 41 deletions pyinjective/proto/exchange/injective_spot_exchange_rpc_pb2.py

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions pyinjective/proto/exchange/injective_spot_exchange_rpc_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ def __init__(self, channel):
request_serializer=exchange_dot_injective__spot__exchange__rpc__pb2.OrdersHistoryRequest.SerializeToString,
response_deserializer=exchange_dot_injective__spot__exchange__rpc__pb2.OrdersHistoryResponse.FromString,
)
self.StreamOrdersHistory = channel.unary_stream(
'/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrdersHistory',
request_serializer=exchange_dot_injective__spot__exchange__rpc__pb2.StreamOrdersHistoryRequest.SerializeToString,
response_deserializer=exchange_dot_injective__spot__exchange__rpc__pb2.StreamOrdersHistoryResponse.FromString,
)


class InjectiveSpotExchangeRPCServicer(object):
Expand Down Expand Up @@ -177,6 +182,13 @@ def OrdersHistory(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def StreamOrdersHistory(self, request, context):
"""Stream updates to historical orders of a spot Market
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')


def add_InjectiveSpotExchangeRPCServicer_to_server(servicer, server):
rpc_method_handlers = {
Expand Down Expand Up @@ -245,6 +257,11 @@ def add_InjectiveSpotExchangeRPCServicer_to_server(servicer, server):
request_deserializer=exchange_dot_injective__spot__exchange__rpc__pb2.OrdersHistoryRequest.FromString,
response_serializer=exchange_dot_injective__spot__exchange__rpc__pb2.OrdersHistoryResponse.SerializeToString,
),
'StreamOrdersHistory': grpc.unary_stream_rpc_method_handler(
servicer.StreamOrdersHistory,
request_deserializer=exchange_dot_injective__spot__exchange__rpc__pb2.StreamOrdersHistoryRequest.FromString,
response_serializer=exchange_dot_injective__spot__exchange__rpc__pb2.StreamOrdersHistoryResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'injective_spot_exchange_rpc.InjectiveSpotExchangeRPC', rpc_method_handlers)
Expand Down Expand Up @@ -476,3 +493,20 @@ def OrdersHistory(request,
exchange_dot_injective__spot__exchange__rpc__pb2.OrdersHistoryResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def StreamOrdersHistory(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, '/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrdersHistory',
exchange_dot_injective__spot__exchange__rpc__pb2.StreamOrdersHistoryRequest.SerializeToString,
exchange_dot_injective__spot__exchange__rpc__pb2.StreamOrdersHistoryResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
Loading

0 comments on commit b465a0b

Please sign in to comment.