11from enum import Enum
2- from typing import Callable , List , Optional , Union
2+ from typing import Any , Callable , List , Optional , Union
33
44from dacite import Config , from_dict
55from typing_extensions import Literal
99from cryptomarket .dataclasses .transaction import Transaction
1010from cryptomarket .websockets .callback import Callback
1111from cryptomarket .websockets .client_auth import ClientAuthenticable
12+ from cryptomarket .websockets .client_base import OnErrorException
1213from cryptomarket .websockets .subscriptionMethodData import \
1314 SubscriptionMethodData
1415
@@ -30,8 +31,8 @@ def __init__(
3031 api_secret : str ,
3132 window : Optional [int ] = None ,
3233 on_connect : Optional [Callable [[], None ]] = None ,
33- on_error : Optional [Callable [[], None ]] = None ,
34- on_close : Optional [Callable [[], None ]] = None ,
34+ on_error : Optional [Callable [[OnErrorException ], None ]] = None ,
35+ on_close : Optional [Callable [[int , str ], None ]] = None ,
3536 ):
3637 super (WalletClient , self ).__init__ (
3738 "wss://api.exchange.cryptomkt.com/api/3/ws/wallet" ,
@@ -185,7 +186,7 @@ def get_transactions(
185186 currencies : Optional [List [str ]] = None ,
186187 order_by : Optional [Union [args .OrderBy , Literal [
187188 'created_at' , 'updated_at' , 'last_updated_at' , 'id' ]]] = None ,
188- sort : Optional [Literal [ 'ASC' , 'DESC' ] ] = None ,
189+ sort : Optional [args . Sort ] = None ,
189190 id_from : Optional [int ] = None ,
190191 id_till : Optional [int ] = None ,
191192 since : Optional [str ] = None ,
0 commit comments