Skip to content

Commit cba7505

Browse files
committed
chore(exchange): re-gen API
1 parent f28c278 commit cba7505

24 files changed

+2827
-883
lines changed

pyinjective/async_client.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,14 @@ async def get_binary_options_market(self, market_id: str):
991991
async def get_account_portfolio(self, account_address: str):
992992
req = portfolio_rpc_pb.AccountPortfolioRequest(account_address=account_address)
993993
return await self.stubPortfolio.AccountPortfolio(req)
994+
995+
async def stream_account_portfolio(
996+
self, account_address: str = None, subaccount_id: str = None, portfolio_type: str = None
997+
):
998+
req = portfolio_rpc_pb.StreamAccountPortfolioRequest(
999+
account_address=account_address,
1000+
subaccount_id=subaccount_id,
1001+
type=portfolio_type
1002+
)
1003+
metadata = await self.load_cookie(type="exchange")
1004+
return self.stubPortfolio.StreamAccountPortfolio.__call__(req, metadata=metadata)

pyinjective/proto/exchange/injective_accounts_rpc_pb2.py

Lines changed: 54 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/exchange/injective_accounts_rpc_pb2_grpc.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
class InjectiveAccountsRPCStub(object):
9-
"""InjectiveAccountsRPC defines gRPC API of Exchange Accounts provider.
9+
"""InjectiveAccountsRPC defines API of Exchange Accounts provider.
1010
"""
1111

1212
def __init__(self, channel):
@@ -37,8 +37,8 @@ def __init__(self, channel):
3737
)
3838
self.SubaccountBalanceEndpoint = channel.unary_unary(
3939
'/injective_accounts_rpc.InjectiveAccountsRPC/SubaccountBalanceEndpoint',
40-
request_serializer=exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceRequest.SerializeToString,
41-
response_deserializer=exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceResponse.FromString,
40+
request_serializer=exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceEndpointRequest.SerializeToString,
41+
response_deserializer=exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceEndpointResponse.FromString,
4242
)
4343
self.StreamSubaccountBalance = channel.unary_stream(
4444
'/injective_accounts_rpc.InjectiveAccountsRPC/StreamSubaccountBalance',
@@ -63,7 +63,7 @@ def __init__(self, channel):
6363

6464

6565
class InjectiveAccountsRPCServicer(object):
66-
"""InjectiveAccountsRPC defines gRPC API of Exchange Accounts provider.
66+
"""InjectiveAccountsRPC defines API of Exchange Accounts provider.
6767
"""
6868

6969
def Portfolio(self, request, context):
@@ -156,8 +156,8 @@ def add_InjectiveAccountsRPCServicer_to_server(servicer, server):
156156
),
157157
'SubaccountBalanceEndpoint': grpc.unary_unary_rpc_method_handler(
158158
servicer.SubaccountBalanceEndpoint,
159-
request_deserializer=exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceRequest.FromString,
160-
response_serializer=exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceResponse.SerializeToString,
159+
request_deserializer=exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceEndpointRequest.FromString,
160+
response_serializer=exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceEndpointResponse.SerializeToString,
161161
),
162162
'StreamSubaccountBalance': grpc.unary_stream_rpc_method_handler(
163163
servicer.StreamSubaccountBalance,
@@ -187,7 +187,7 @@ def add_InjectiveAccountsRPCServicer_to_server(servicer, server):
187187

188188
# This class is part of an EXPERIMENTAL API.
189189
class InjectiveAccountsRPC(object):
190-
"""InjectiveAccountsRPC defines gRPC API of Exchange Accounts provider.
190+
"""InjectiveAccountsRPC defines API of Exchange Accounts provider.
191191
"""
192192

193193
@staticmethod
@@ -270,8 +270,8 @@ def SubaccountBalanceEndpoint(request,
270270
timeout=None,
271271
metadata=None):
272272
return grpc.experimental.unary_unary(request, target, '/injective_accounts_rpc.InjectiveAccountsRPC/SubaccountBalanceEndpoint',
273-
exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceRequest.SerializeToString,
274-
exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceResponse.FromString,
273+
exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceEndpointRequest.SerializeToString,
274+
exchange_dot_injective__accounts__rpc__pb2.SubaccountBalanceEndpointResponse.FromString,
275275
options, channel_credentials,
276276
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
277277

pyinjective/proto/exchange/injective_auction_rpc_pb2.py

Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/exchange/injective_auction_rpc_pb2_grpc.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def __init__(self, channel):
1717
"""
1818
self.AuctionEndpoint = channel.unary_unary(
1919
'/injective_auction_rpc.InjectiveAuctionRPC/AuctionEndpoint',
20-
request_serializer=exchange_dot_injective__auction__rpc__pb2.AuctionRequest.SerializeToString,
21-
response_deserializer=exchange_dot_injective__auction__rpc__pb2.AuctionResponse.FromString,
20+
request_serializer=exchange_dot_injective__auction__rpc__pb2.AuctionEndpointRequest.SerializeToString,
21+
response_deserializer=exchange_dot_injective__auction__rpc__pb2.AuctionEndpointResponse.FromString,
2222
)
2323
self.Auctions = channel.unary_unary(
2424
'/injective_auction_rpc.InjectiveAuctionRPC/Auctions',
@@ -62,8 +62,8 @@ def add_InjectiveAuctionRPCServicer_to_server(servicer, server):
6262
rpc_method_handlers = {
6363
'AuctionEndpoint': grpc.unary_unary_rpc_method_handler(
6464
servicer.AuctionEndpoint,
65-
request_deserializer=exchange_dot_injective__auction__rpc__pb2.AuctionRequest.FromString,
66-
response_serializer=exchange_dot_injective__auction__rpc__pb2.AuctionResponse.SerializeToString,
65+
request_deserializer=exchange_dot_injective__auction__rpc__pb2.AuctionEndpointRequest.FromString,
66+
response_serializer=exchange_dot_injective__auction__rpc__pb2.AuctionEndpointResponse.SerializeToString,
6767
),
6868
'Auctions': grpc.unary_unary_rpc_method_handler(
6969
servicer.Auctions,
@@ -98,8 +98,8 @@ def AuctionEndpoint(request,
9898
timeout=None,
9999
metadata=None):
100100
return grpc.experimental.unary_unary(request, target, '/injective_auction_rpc.InjectiveAuctionRPC/AuctionEndpoint',
101-
exchange_dot_injective__auction__rpc__pb2.AuctionRequest.SerializeToString,
102-
exchange_dot_injective__auction__rpc__pb2.AuctionResponse.FromString,
101+
exchange_dot_injective__auction__rpc__pb2.AuctionEndpointRequest.SerializeToString,
102+
exchange_dot_injective__auction__rpc__pb2.AuctionEndpointResponse.FromString,
103103
options, channel_credentials,
104104
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
105105

pyinjective/proto/exchange/injective_derivative_exchange_rpc_pb2.py

Lines changed: 120 additions & 106 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/exchange/injective_derivative_exchange_rpc_pb2_grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def StreamOrderbookUpdate(self, request, context):
233233
raise NotImplementedError('Method not implemented!')
234234

235235
def Orders(self, request, context):
236-
"""DerivativeLimitOrders gets the limit orders of a Derivative Market.
236+
"""DerivativeLimitOrders gets the limit orders of a derivative Market.
237237
"""
238238
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
239239
context.set_details('Method not implemented!')

pyinjective/proto/exchange/injective_explorer_rpc_pb2.py

Lines changed: 111 additions & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)