4646 tx_pb2 as injective_permissions_tx_pb ,
4747)
4848from pyinjective .proto .injective .stream .v1beta1 import query_pb2 as chain_stream_query
49+ from pyinjective .proto .injective .stream .v2 import query_pb2 as chain_stream_v2_query
4950from pyinjective .proto .injective .tokenfactory .v1beta1 import tx_pb2 as token_factory_tx_pb
5051from pyinjective .proto .injective .wasmx .v1 import tx_pb2 as wasmx_tx_pb
5152from pyinjective .utils .denom import Denom
@@ -2703,13 +2704,30 @@ def MsgVote(
27032704 def chain_stream_bank_balances_filter (
27042705 self , accounts : Optional [List [str ]] = None
27052706 ) -> chain_stream_query .BankBalancesFilter :
2707+ """
2708+ This method is deprecated and will be removed soon. Please use `chain_stream_bank_balances_v2_filter` instead
2709+ """
2710+ warn (
2711+ "This method is deprecated. Use chain_stream_bank_balances_v2_filter instead" ,
2712+ DeprecationWarning ,
2713+ stacklevel = 2 ,
2714+ )
27062715 accounts = accounts or ["*" ]
27072716 return chain_stream_query .BankBalancesFilter (accounts = accounts )
27082717
27092718 def chain_stream_subaccount_deposits_filter (
27102719 self ,
27112720 subaccount_ids : Optional [List [str ]] = None ,
27122721 ) -> chain_stream_query .SubaccountDepositsFilter :
2722+ """
2723+ This method is deprecated and will be removed soon.
2724+ Please use `chain_stream_subaccount_deposits_v2_filter` instead
2725+ """
2726+ warn (
2727+ "This method is deprecated. Use chain_stream_subaccount_deposits_v2_filter instead" ,
2728+ DeprecationWarning ,
2729+ stacklevel = 2 ,
2730+ )
27132731 subaccount_ids = subaccount_ids or ["*" ]
27142732 return chain_stream_query .SubaccountDepositsFilter (subaccount_ids = subaccount_ids )
27152733
@@ -2718,6 +2736,11 @@ def chain_stream_trades_filter(
27182736 subaccount_ids : Optional [List [str ]] = None ,
27192737 market_ids : Optional [List [str ]] = None ,
27202738 ) -> chain_stream_query .TradesFilter :
2739+ """
2740+ This method is deprecated and will be removed soon. Please use `chain_stream_trades_v2_filter` instead
2741+ """
2742+ warn ("This method is deprecated. Use chain_stream_trades_v2_filter instead" , DeprecationWarning , stacklevel = 2 )
2743+
27212744 subaccount_ids = subaccount_ids or ["*" ]
27222745 market_ids = market_ids or ["*" ]
27232746 return chain_stream_query .TradesFilter (subaccount_ids = subaccount_ids , market_ids = market_ids )
@@ -2727,6 +2750,11 @@ def chain_stream_orders_filter(
27272750 subaccount_ids : Optional [List [str ]] = None ,
27282751 market_ids : Optional [List [str ]] = None ,
27292752 ) -> chain_stream_query .OrdersFilter :
2753+ """
2754+ This method is deprecated and will be removed soon. Please use `chain_stream_orders_v2_filter` instead
2755+ """
2756+ warn ("This method is deprecated. Use chain_stream_orders_v2_filter instead" , DeprecationWarning , stacklevel = 2 )
2757+
27302758 subaccount_ids = subaccount_ids or ["*" ]
27312759 market_ids = market_ids or ["*" ]
27322760 return chain_stream_query .OrdersFilter (subaccount_ids = subaccount_ids , market_ids = market_ids )
@@ -2735,6 +2763,13 @@ def chain_stream_orderbooks_filter(
27352763 self ,
27362764 market_ids : Optional [List [str ]] = None ,
27372765 ) -> chain_stream_query .OrderbookFilter :
2766+ """
2767+ This method is deprecated and will be removed soon. Please use `chain_stream_orderbooks_v2_filter` instead
2768+ """
2769+ warn (
2770+ "This method is deprecated. Use chain_stream_orderbooks_v2_filter instead" , DeprecationWarning , stacklevel = 2
2771+ )
2772+
27382773 market_ids = market_ids or ["*" ]
27392774 return chain_stream_query .OrderbookFilter (market_ids = market_ids )
27402775
@@ -2743,6 +2778,13 @@ def chain_stream_positions_filter(
27432778 subaccount_ids : Optional [List [str ]] = None ,
27442779 market_ids : Optional [List [str ]] = None ,
27452780 ) -> chain_stream_query .PositionsFilter :
2781+ """
2782+ This method is deprecated and will be removed soon. Please use `chain_stream_positions_v2_filter` instead
2783+ """
2784+ warn (
2785+ "This method is deprecated. Use chain_stream_positions_v2_filter instead" , DeprecationWarning , stacklevel = 2
2786+ )
2787+
27462788 subaccount_ids = subaccount_ids or ["*" ]
27472789 market_ids = market_ids or ["*" ]
27482790 return chain_stream_query .PositionsFilter (subaccount_ids = subaccount_ids , market_ids = market_ids )
@@ -2751,9 +2793,72 @@ def chain_stream_oracle_price_filter(
27512793 self ,
27522794 symbols : Optional [List [str ]] = None ,
27532795 ) -> chain_stream_query .PositionsFilter :
2796+ """
2797+ This method is deprecated and will be removed soon. Please use `chain_stream_oracle_price_v2_filter` instead
2798+ """
2799+ warn (
2800+ "This method is deprecated. Use chain_stream_oracle_price_v2_filter instead" ,
2801+ DeprecationWarning ,
2802+ stacklevel = 2 ,
2803+ )
2804+
27542805 symbols = symbols or ["*" ]
27552806 return chain_stream_query .OraclePriceFilter (symbol = symbols )
27562807
2808+ def chain_stream_bank_balances_v2_filter (
2809+ self , accounts : Optional [List [str ]] = None
2810+ ) -> chain_stream_v2_query .BankBalancesFilter :
2811+ accounts = accounts or ["*" ]
2812+ return chain_stream_v2_query .BankBalancesFilter (accounts = accounts )
2813+
2814+ def chain_stream_subaccount_deposits_v2_filter (
2815+ self ,
2816+ subaccount_ids : Optional [List [str ]] = None ,
2817+ ) -> chain_stream_v2_query .SubaccountDepositsFilter :
2818+ subaccount_ids = subaccount_ids or ["*" ]
2819+ return chain_stream_v2_query .SubaccountDepositsFilter (subaccount_ids = subaccount_ids )
2820+
2821+ def chain_stream_trades_v2_filter (
2822+ self ,
2823+ subaccount_ids : Optional [List [str ]] = None ,
2824+ market_ids : Optional [List [str ]] = None ,
2825+ ) -> chain_stream_v2_query .TradesFilter :
2826+ subaccount_ids = subaccount_ids or ["*" ]
2827+ market_ids = market_ids or ["*" ]
2828+ return chain_stream_v2_query .TradesFilter (subaccount_ids = subaccount_ids , market_ids = market_ids )
2829+
2830+ def chain_stream_orders_v2_filter (
2831+ self ,
2832+ subaccount_ids : Optional [List [str ]] = None ,
2833+ market_ids : Optional [List [str ]] = None ,
2834+ ) -> chain_stream_v2_query .OrdersFilter :
2835+ subaccount_ids = subaccount_ids or ["*" ]
2836+ market_ids = market_ids or ["*" ]
2837+ return chain_stream_v2_query .OrdersFilter (subaccount_ids = subaccount_ids , market_ids = market_ids )
2838+
2839+ def chain_stream_orderbooks_v2_filter (
2840+ self ,
2841+ market_ids : Optional [List [str ]] = None ,
2842+ ) -> chain_stream_v2_query .OrderbookFilter :
2843+ market_ids = market_ids or ["*" ]
2844+ return chain_stream_v2_query .OrderbookFilter (market_ids = market_ids )
2845+
2846+ def chain_stream_positions_v2_filter (
2847+ self ,
2848+ subaccount_ids : Optional [List [str ]] = None ,
2849+ market_ids : Optional [List [str ]] = None ,
2850+ ) -> chain_stream_v2_query .PositionsFilter :
2851+ subaccount_ids = subaccount_ids or ["*" ]
2852+ market_ids = market_ids or ["*" ]
2853+ return chain_stream_v2_query .PositionsFilter (subaccount_ids = subaccount_ids , market_ids = market_ids )
2854+
2855+ def chain_stream_oracle_price_v2_filter (
2856+ self ,
2857+ symbols : Optional [List [str ]] = None ,
2858+ ) -> chain_stream_v2_query .PositionsFilter :
2859+ symbols = symbols or ["*" ]
2860+ return chain_stream_v2_query .OraclePriceFilter (symbol = symbols )
2861+
27572862 # endregion
27582863
27592864 # ------------------------------------------------
0 commit comments