@@ -201,22 +201,21 @@ async def get_subaccount_balances_list(self, subaccount_id: str):
201
201
req = exchange_accounts_rpc_pb .SubaccountBalancesListRequest (subaccount_id = subaccount_id )
202
202
return await self .stubExchangeAccount .SubaccountBalancesList (req )
203
203
204
- async def get_subaccount_history (self , subaccount_id : str , denom : str = '' , transfer_types : List = [] ):
205
- req = exchange_accounts_rpc_pb .SubaccountHistoryRequest (subaccount_id = subaccount_id , denom = denom , transfer_types = transfer_types )
204
+ async def get_subaccount_history (self , subaccount_id : str , ** kwargs ):
205
+ req = exchange_accounts_rpc_pb .SubaccountHistoryRequest (subaccount_id = subaccount_id , denom = kwargs . get ( " denom" ) , transfer_types = kwargs . get ( " transfer_types" ) )
206
206
return await self .stubExchangeAccount .SubaccountHistory (req )
207
207
208
- async def get_subaccount_order_summary (self , subaccount_id : str , order_direction : str = '' , market_id : str = '' ):
209
- req = exchange_accounts_rpc_pb .SubaccountOrderSummaryRequest (subaccount_id = subaccount_id , order_direction = order_direction , market_id = market_id )
208
+ async def get_subaccount_order_summary (self , subaccount_id : str , ** kwargs ):
209
+ req = exchange_accounts_rpc_pb .SubaccountOrderSummaryRequest (subaccount_id = subaccount_id , order_direction = kwargs . get ( " order_direction" ) , market_id = kwargs . get ( " market_id" ) )
210
210
return await self .stubExchangeAccount .SubaccountOrderSummary (req )
211
211
212
212
async def get_order_states (
213
213
self ,
214
- spot_order_hashes : List [str ] = ["" ],
215
- derivative_order_hashes : List [str ] = ["" ],
214
+ ** kwargs
216
215
):
217
216
req = exchange_accounts_rpc_pb .OrderStatesRequest (
218
- spot_order_hashes = spot_order_hashes ,
219
- derivative_order_hashes = derivative_order_hashes ,
217
+ spot_order_hashes = kwargs . get ( " spot_order_hashes" ) ,
218
+ derivative_order_hashes = kwargs . get ( " derivative_order_hashes" ) ,
220
219
)
221
220
return await self .stubExchangeAccount .OrderStates (req )
222
221
@@ -246,8 +245,8 @@ async def get_insurance_funds(self):
246
245
req = insurance_rpc_pb .FundsRequest ()
247
246
return await self .stubInsurance .Funds (req )
248
247
249
- async def get_redemptions (self , redeemer : str = '' , redemption_denom : str = '' , status : str = '' ):
250
- req = insurance_rpc_pb .RedemptionsRequest (redeemer = redeemer , redemption_denom = redemption_denom , status = status )
248
+ async def get_redemptions (self , ** kwargs ):
249
+ req = insurance_rpc_pb .RedemptionsRequest (redeemer = kwargs . get ( " redeemer" ) , redemption_denom = kwargs . get ( " redemption_denom" ) , status = kwargs . get ( " status" ) )
251
250
return await self .stubInsurance .Redemptions (req )
252
251
253
252
@@ -257,8 +256,8 @@ async def get_spot_market(self, market_id: str):
257
256
req = spot_exchange_rpc_pb .MarketRequest (market_id = market_id )
258
257
return await self .stubSpotExchange .Market (req )
259
258
260
- async def get_spot_markets (self , market_status : str = '' , base_denom : str = '' , quote_denom : str = '' ):
261
- req = spot_exchange_rpc_pb .MarketsRequest (market_status = market_status , base_denom = base_denom , quote_denom = quote_denom )
259
+ async def get_spot_markets (self , ** kwargs ):
260
+ req = spot_exchange_rpc_pb .MarketsRequest (market_status = kwargs . get ( " market_status" ) , base_denom = kwargs . get ( " base_denom" ) , quote_denom = kwargs . get ( " quote_denom" ) )
262
261
return await self .stubSpotExchange .Markets (req )
263
262
264
263
async def stream_spot_markets (self ):
@@ -269,12 +268,12 @@ async def get_spot_orderbook(self, market_id: str):
269
268
req = spot_exchange_rpc_pb .OrderbookRequest (market_id = market_id )
270
269
return await self .stubSpotExchange .Orderbook (req )
271
270
272
- async def get_spot_orders (self , market_id : str , order_side : str = '' , subaccount_id : str = '' ):
273
- req = spot_exchange_rpc_pb .OrdersRequest (market_id = market_id , order_side = order_side , subaccount_id = subaccount_id )
271
+ async def get_spot_orders (self , market_id : str , ** kwargs ):
272
+ req = spot_exchange_rpc_pb .OrdersRequest (market_id = market_id , order_side = kwargs . get ( " order_side" ) , subaccount_id = kwargs . get ( " subaccount_id" ) )
274
273
return await self .stubSpotExchange .Orders (req )
275
274
276
- async def get_spot_trades (self , market_id : str , execution_side : str = '' , direction : str = '' , subaccount_id : str = '' , skip : int = 0 , limit : int = 0 ):
277
- req = spot_exchange_rpc_pb .TradesRequest (market_id = market_id , execution_side = execution_side , direction = direction , subaccount_id = subaccount_id , skip = skip , limit = limit )
275
+ async def get_spot_trades (self , market_id : str , ** kwargs ):
276
+ req = spot_exchange_rpc_pb .TradesRequest (market_id = market_id , execution_side = kwargs . get ( " execution_side" ) , direction = kwargs . get ( " direction" ) , subaccount_id = kwargs . get ( " subaccount_id" ) , skip = kwargs . get ( " skip" ) , limit = kwargs . get ( " limit" ) )
278
277
return await self .stubSpotExchange .Trades (req )
279
278
280
279
async def stream_spot_orderbook (self , market_id : str ):
@@ -286,20 +285,20 @@ async def stream_spot_orderbooks(self, market_ids: List[str]):
286
285
return self .stubSpotExchange .StreamOrderbook (req )
287
286
288
287
289
- async def stream_spot_orders (self , market_id : str , order_side : str = '' , subaccount_id : str = '' ):
290
- req = spot_exchange_rpc_pb .StreamOrdersRequest (market_id = market_id , order_side = order_side , subaccount_id = subaccount_id )
288
+ async def stream_spot_orders (self , market_id : str , ** kwargs ):
289
+ req = spot_exchange_rpc_pb .StreamOrdersRequest (market_id = market_id , order_side = kwargs . get ( " order_side" ) , subaccount_id = kwargs . get ( " subaccount_id" ) )
291
290
return self .stubSpotExchange .StreamOrders (req )
292
291
293
- async def stream_spot_trades (self , market_id : str , execution_side : str = '' , direction : str = '' , subaccount_id : str = '' , skip : int = 0 , limit : int = 0 ):
294
- req = spot_exchange_rpc_pb .StreamTradesRequest (market_id = market_id , execution_side = execution_side , direction = direction , subaccount_id = subaccount_id , skip = skip , limit = limit )
292
+ async def stream_spot_trades (self , market_id : str , ** kwargs ):
293
+ req = spot_exchange_rpc_pb .StreamTradesRequest (market_id = market_id , execution_side = kwargs . get ( " execution_side" ) , direction = kwargs . get ( " direction" ) , subaccount_id = kwargs . get ( " subaccount_id" ) , skip = kwargs . get ( " skip" ) , limit = kwargs . get ( " limit" ) )
295
294
return self .stubSpotExchange .StreamTrades (req )
296
295
297
- async def get_spot_subaccount_orders (self , subaccount_id : str , market_id : str = '' ):
298
- req = spot_exchange_rpc_pb .SubaccountOrdersListRequest (subaccount_id = subaccount_id , market_id = market_id )
296
+ async def get_spot_subaccount_orders (self , subaccount_id : str , ** kwargs ):
297
+ req = spot_exchange_rpc_pb .SubaccountOrdersListRequest (subaccount_id = subaccount_id , market_id = kwargs . get ( " market_id" ) )
299
298
return await self .stubSpotExchange .SubaccountOrdersList (req )
300
299
301
- async def get_spot_subaccount_trades (self , subaccount_id : str , market_id : str = '' , execution_type : str = '' , direction : str = '' ):
302
- req = spot_exchange_rpc_pb .SubaccountTradesListRequest (subaccount_id = subaccount_id , market_id = market_id , execution_type = execution_type , direction = direction )
300
+ async def get_spot_subaccount_trades (self , subaccount_id : str , ** kwargs ):
301
+ req = spot_exchange_rpc_pb .SubaccountTradesListRequest (subaccount_id = subaccount_id , market_id = kwargs . get ( " market_id" ) , execution_type = kwargs . get ( " execution_type" ) , direction = kwargs . get ( " direction" ) )
303
302
return await self .stubSpotExchange .SubaccountTradesList (req )
304
303
305
304
# DerivativeRPC
@@ -308,8 +307,8 @@ async def get_derivative_market(self, market_id: str):
308
307
req = derivative_exchange_rpc_pb .MarketRequest (market_id = market_id )
309
308
return await self .stubDerivativeExchange .Market (req )
310
309
311
- async def get_derivative_markets (self , market_status : str = '' , quote_denom : str = '' ):
312
- req = derivative_exchange_rpc_pb .MarketsRequest (market_status = market_status , quote_denom = quote_denom )
310
+ async def get_derivative_markets (self , ** kwargs ):
311
+ req = derivative_exchange_rpc_pb .MarketsRequest (market_status = kwargs . get ( " market_status" ) , quote_denom = kwargs . get ( " quote_denom" ) )
313
312
return await self .stubDerivativeExchange .Markets (req )
314
313
315
314
async def stream_derivative_markets (self ):
@@ -320,12 +319,12 @@ async def get_derivative_orderbook(self, market_id: str):
320
319
req = derivative_exchange_rpc_pb .OrderbookRequest (market_id = market_id )
321
320
return await self .stubDerivativeExchange .Orderbook (req )
322
321
323
- async def get_derivative_orders (self , market_id : str , order_side : str = '' , subaccount_id : str = '' ):
324
- req = derivative_exchange_rpc_pb .OrdersRequest (market_id = market_id , order_side = order_side , subaccount_id = subaccount_id )
322
+ async def get_derivative_orders (self , market_id : str , ** kwargs ):
323
+ req = derivative_exchange_rpc_pb .OrdersRequest (market_id = market_id , order_side = kwargs . get ( " order_side" ) , subaccount_id = kwargs . get ( " subaccount_id" ) )
325
324
return await self .stubDerivativeExchange .Orders (req )
326
325
327
- async def get_derivative_trades (self , market_id : str , subaccount_id : str = '' , skip : int = 0 , limit : int = 0 ):
328
- req = derivative_exchange_rpc_pb .TradesRequest (market_id = market_id , subaccount_id = subaccount_id , execution_side = execution_side , direction = direction , skip = skip , limit = limit )
326
+ async def get_derivative_trades (self , market_id : str , ** kwargs ):
327
+ req = derivative_exchange_rpc_pb .TradesRequest (market_id = market_id , subaccount_id = kwargs . get ( " subaccount_id" ) , execution_side = kwargs . get ( " execution_side" ) , direction = kwargs . get ( " direction" ) , skip = kwargs . get ( " skip" ) , limit = kwargs . get ( " limit" ) )
329
328
return await self .stubDerivativeExchange .Trades (req )
330
329
331
330
async def stream_derivative_orderbook (self , market_id : str ):
@@ -336,34 +335,34 @@ async def stream_derivative_orderbooks(self, market_ids: List[str]):
336
335
req = derivative_exchange_rpc_pb .StreamOrderbookRequest (market_ids = market_ids )
337
336
return self .stubDerivativeExchange .StreamOrderbook (req )
338
337
339
- async def stream_derivative_orders (self , market_id : str , order_side : str = '' , subaccount_id : str = '' ):
340
- req = derivative_exchange_rpc_pb .StreamOrdersRequest (market_id = market_id , order_side = order_side , subaccount_id = subaccount_id )
338
+ async def stream_derivative_orders (self , market_id : str , ** kwargs ):
339
+ req = derivative_exchange_rpc_pb .StreamOrdersRequest (market_id = market_id , order_side = kwargs . get ( " order_side" ) , subaccount_id = kwargs . get ( " subaccount_id" ) )
341
340
return self .stubDerivativeExchange .StreamOrders (req )
342
341
343
- async def stream_derivative_trades (self , market_id : str , subaccount_id : str = "" , execution_side : str = "" , direction : str = "" , skip : int = 0 , limit : int = 0 ):
344
- req = derivative_exchange_rpc_pb .StreamTradesRequest (market_id = market_id , subaccount_id = subaccount_id , execution_side = execution_side , direction = direction , skip = skip , limit = limit )
342
+ async def stream_derivative_trades (self , market_id : str , ** kwargs ):
343
+ req = derivative_exchange_rpc_pb .StreamTradesRequest (market_id = market_id , subaccount_id = kwargs . get ( " subaccount_id" ) , execution_side = kwargs . get ( " execution_side" ) , direction = kwargs . get ( " direction" ) , skip = kwargs . get ( " skip" ) , limit = kwargs . get ( " limit" ) )
345
344
return self .stubDerivativeExchange .StreamTrades (req )
346
345
347
- async def get_derivative_positions (self , market_id : str , subaccount_id : str = '' ):
348
- req = derivative_exchange_rpc_pb .PositionsRequest (market_id = market_id , subaccount_id = subaccount_id )
346
+ async def get_derivative_positions (self , market_id : str , ** kwargs ):
347
+ req = derivative_exchange_rpc_pb .PositionsRequest (market_id = market_id , subaccount_id = kwargs . get ( " subaccount_id" ) )
349
348
return await self .stubDerivativeExchange .Positions (req )
350
349
351
- async def stream_derivative_positions (self , market_id : str , subaccount_id : str = '' ):
352
- req = derivative_exchange_rpc_pb .StreamPositionsRequest (market_id = market_id , subaccount_id = subaccount_id )
350
+ async def stream_derivative_positions (self , market_id : str , ** kwargs ):
351
+ req = derivative_exchange_rpc_pb .StreamPositionsRequest (market_id = market_id , subaccount_id = kwargs . get ( " subaccount_id" ) )
353
352
return self .stubDerivativeExchange .StreamPositions (req )
354
353
355
- async def get_derivative_liquidable_positions (self , market_id : str = '' ):
356
- req = derivative_exchange_rpc_pb .LiquidablePositionsRequest (market_id = market_id )
354
+ async def get_derivative_liquidable_positions (self , ** kwargs ):
355
+ req = derivative_exchange_rpc_pb .LiquidablePositionsRequest (market_id = kwargs . get ( " market_id" ) )
357
356
return await self .stubDerivativeExchange .LiquidablePositions (req )
358
357
359
- async def get_derivative_subaccount_orders (self , subaccount_id : str , market_id : str = '' ):
360
- req = derivative_exchange_rpc_pb .SubaccountOrdersListRequest (subaccount_id = subaccount_id , market_id = market_id )
358
+ async def get_derivative_subaccount_orders (self , subaccount_id : str , ** kwargs ):
359
+ req = derivative_exchange_rpc_pb .SubaccountOrdersListRequest (subaccount_id = subaccount_id , market_id = kwargs . get ( " market_id" ) )
361
360
return await self .stubDerivativeExchange .SubaccountOrdersList (req )
362
361
363
- async def get_derivative_subaccount_trades (self , subaccount_id : str , market_id : str = '' , execution_type : str = '' , direction : str = '' ):
364
- req = derivative_exchange_rpc_pb .SubaccountTradesListRequest (subaccount_id = subaccount_id , market_id = market_id , execution_type = execution_type , direction = direction )
362
+ async def get_derivative_subaccount_trades (self , subaccount_id : str , ** kwargs ):
363
+ req = derivative_exchange_rpc_pb .SubaccountTradesListRequest (subaccount_id = subaccount_id , market_id = kwargs . get ( " market_id" ) , execution_type = kwargs . get ( " execution_type" ) , direction = kwargs . get ( " direction" ) )
365
364
return await self .stubDerivativeExchange .SubaccountTradesList (req )
366
365
367
- async def get_funding_payments (self , subaccount_id : str , market_id : str = '' ):
368
- req = derivative_exchange_rpc_pb .FundingPaymentsRequest (subaccount_id = subaccount_id , market_id = market_id )
366
+ async def get_funding_payments (self , subaccount_id : str , ** kwargs ):
367
+ req = derivative_exchange_rpc_pb .FundingPaymentsRequest (subaccount_id = subaccount_id , market_id = kwargs . get ( " market_id" ) )
369
368
return await self .stubDerivativeExchange .FundingPayments (req )
0 commit comments