
    E#i                         S SK rS SKJrJrJrJr  S SKrS SKJ	r	J
r
JrJrJrJrJrJrJrJrJrJrJrJrJrJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJ r   S S	KJ!r!   " S
 S\RD                  RF                  5      r#g)    N)
ArrayCacheArrayCacheBySymbolByIdArrayCacheBySymbolBySideArrayCacheByTimestamp)AnyBalancesBoolIntMarketNumOrder	OrderBook	OrderSide	OrderTypePositionStrStringsTickerTickersTrade)Client)List)ExchangeError)AuthenticationError)NetworkError)ChecksumErrorc                     ^  \ rS rSrS\4U 4S jjrS rS0 4S\S\S\	4S jjr
0 4S\S\4S	 jjrS0 4S
\\   S\S\	4S jjr0 4S
\\   S\	4S jjrS rS rS\4S jrSS0 4S\S\S\S\\   4S jjr0 4S\S\\   4S jjrSS0 4S
\\   S\S\S\\   4S jjr0 4S
\\   S\4S jjrS\4S jrSSS0 4S\S\S\S\\   4S jjr0 4S\S\4S jjr0 4S\S\4S jjrS0 4S
\S\4S jjr S0 4S
\S\4S jjr!S\4S jr"SLS\#S\$S\4S jjr%S0 4S
\S\4S  jjr&S\4S! jr'SLS" jr(S#SS0 4S\S$\S\S\S\\)   4
S% jjr*S#0 4S\S$\S\4S& jjr+S\4S' jr,SSS0 4S\S\S\S\\-   4S( jjr.SLS\4S) jjr/SSS0 4S
\S\S\S\\0   4S* jjr1SLS\S
\4S+ jjr2S, r3S- r40 4S\54S. jjr6S\4S/ jr7S0 4S\S0\8S1\9S2\:S3\;S\-4S4 jjr<SS0 4S5\S\S0\8S1\9S2\;S3\;S\-4S6 jjr=S\4S7 jr>S0 4S5\S\S\-4S8 jjr?S0 4S\4S9 jjr@S\4S: jrA0 4S; jrB0 4S< jrC0 0 4S=\S
\\   S>\\   S?\\   S@\\   4
SA jjrD0 4SB jrE0 4SC jrFS\S\G4SD jrHS\4SE jrIS\4SF jrJ0 4SG jrKS\4SH jrLS\4SI jrMS\4SJ jrNSKrOU =rP$ )M	cryptocom   returnc                    > U R                  [        [        U ]  5       0 SS_SS_SS_SS_SS_SS_SS_S	S_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SSSS.0SSS.S.SSS.SS0S.0 S.5      $ )NwsTwatchBalancewatchTickerwatchTickerswatchBidsAskswatchMyTradeswatchTradeswatchTradesForSymbolswatchOrderBookwatchOrderBookForSymbolswatchOrders
watchOHLCVwatchPositionscreateOrderWscancelOrderWscancelAllOrderseditOrderWsz*wss://stream.crypto.com/exchange/v1/marketz(wss://stream.crypto.com/exchange/v1/user)publicprivatez+wss://uat-stream.3ona.co/exchange/v1/marketz)wss://uat-stream.3ona.co/exchange/v1/user)apitest)fetchPositionsSnapshotawaitPositionsSnapshotchecksum)r.   r*   )hasurlsoptions	streaming)deep_extendsuperr   describe)self	__class__s    L/home/james-whalen/.local/lib/python3.13/site-packages/ccxt/pro/cryptocom.pyr@   cryptocom.describe   sA   i ? Ad t 	
     t ( !$ +D t d !$      "4!" t#* "N#M LJ /3.2#
 #S+D
 + +	    c                   #     UR                  U R                  US5      SS.5      I S h  vN   g  N! [         aE  n[        U R                  S-   U R                  U5      -   5      nUR                  U5         S nAg S nAff = f7f)Nidzpublic/respond-heartbeat)rG   methodz pong failed with error )sendsafe_integer	Exceptionr   rG   jsonreset)rA   clientmessageeerrors        rC   pongcryptocom.pongB   so     	 ++T%6%6w%EQklmmm 	  +E!E		RS!TUELL	 s6   B'3 13 B3 
B;A=8B=BBNsymbollimitc                 D   #    U R                  U/X#5      I Sh  vN $  N7f)aX  
watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name

:param str symbol: unified symbol of the market to fetch the order book for
:param int [limit]: the maximum amount of order book entries to return
:param dict [params]: extra parameters specific to the exchange API endpoint
:param str [params.bookSubscriptionType]: The subscription type. Allowed values: SNAPSHOT full snapshot. This is the default if not specified. SNAPSHOT_AND_UPDATE delta updates
:param int [params.bookUpdateFrequency]: Book update interval in ms. Allowed values: 100 for snapshot subscription 10 for delta subscription
:returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
N)watch_order_book_for_symbols)rA   rT   rU   paramss       rC   watch_order_bookcryptocom.watch_order_bookN   s"      66xOOOO     c                 D   #    U R                  U/U5      I Sh  vN $  N7f)a  
unWatches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name

:param str symbol: unified symbol of the market to fetch the order book for
:param dict [params]: extra parameters specific to the exchange API endpoint
:param str [params.bookSubscriptionType]: The subscription type. Allowed values: SNAPSHOT full snapshot. This is the default if not specified. SNAPSHOT_AND_UPDATE delta updates
:param int [params.bookUpdateFrequency]: Book update interval in ms. Allowed values: 100 for snapshot subscription 10 for delta subscription
:returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
N)un_watch_order_book_for_symbolsrA   rT   rX   s      rC   un_watch_order_bookcryptocom.un_watch_order_book]   s"      996(FKKKKr[   symbolsc                   #    U R                  5       I Sh  vN   U R                  U5      n/ n/ nU(       d  SnU R                  US5      nUc  0 US'   SnSnU R                  USSS5      u  psU R                  USSU5      u  pXS   S'   Sn	Sn
U R                  USS5      u  pU R                  USSU	5      u  pU
b  XS   S'   [	        S	[        U5      5       HY  nX   nU R                  U5      nS
US   -   S-   [        U5      -   nSUS   -   nUR                  U5        UR                  U5        M[     U R                  XTU5      I Sh  vN nUR                  5       $  GNI N7f)a;  
watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name

:param str[] symbols: unified array of symbols
:param int [limit]: the maximum amount of order book entries to return
:param dict [params]: extra parameters specific to the exchange API endpoint
:param str [params.bookSubscriptionType]: The subscription type. Allowed values: SNAPSHOT full snapshot. This is the default if not specified. SNAPSHOT_AND_UPDATE delta updates
:param int [params.bookUpdateFrequency]: Book update interval in ms. Allowed values: 100 for snapshot subscription 10 for delta subscription
:returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
N2   rX   r*   bookSubscriptionTypeSNAPSHOT_AND_UPDATEr+   bookUpdateFrequencyr   book.rG   .
orderbook:rT   )load_marketsmarket_symbols
safe_valuehandle_option_and_paramsrangelenmarketstrappendwatch_public_multiplerU   )rA   ra   rU   rX   topicsmessageHashestopicParamsrd   bookSubscriptionType2rf   bookUpdateFrequency2irT   rp   currentTopicmessageHash	orderbooks                    rC   rW   &cryptocom.watch_order_book_for_symbolsk   s     !!!%%g.Eoofh7!F8# $'+'D'DVM]_u  xM  (N$(,(E(EfNh  kA  CW  )X%3Hx/0"#&*&C&CFL\^s&t#'+'D'DVMgi~  AT  (U$+7K834q#g,'AZF[[(F'&,6<s5zIL&)99K  -MM,' ( 44]FSS	  9 	"6 Ts"   E$ED3E$
E"E$"E$c                   #    U R                  5       I Sh  vN   U R                  U5      n/ n/ n/ nU R                  USS5      nU R                  US5      nUc  0 US'   SnSn	U R	                  USSS5      u  pU R	                  USSU5      u  pXS   S'   Sn
SnU R	                  USS	5      u  pU R	                  USS	U
5      u  pUb  XS   S'   [        S
[        U5      5       Hm  nX   nU R                  U5      nSUS   -   S-   [        U5      -   nSUS   -   nUR                  U5        UR                  SU-   5        UR                  U5        Mo     U R                  SXXCU5      I Sh  vN $  GN[ N7f)a0  
unWatches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name

:param str[] symbols: unified array of symbols
:param dict [params]: extra parameters specific to the exchange API endpoint
:param int [params.limit]: orderbook limit, default is 50
:param str [params.bookSubscriptionType]: The subscription type. Allowed values: SNAPSHOT full snapshot. This is the default if not specified. SNAPSHOT_AND_UPDATE delta updates
:param int [params.bookUpdateFrequency]: Book update interval in ms. Allowed values: 100 for snapshot subscription 10 for delta subscription
:returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
NrU   rc   rX   r*   rd   re   r+   rf   r   rg   rG   rh   ri   rT   zunsubscribe:r|   )rj   rk   rJ   rl   rm   rn   ro   rp   rq   rr   un_watch_public_multiple)rA   ra   rX   rt   subMessageHashesru   rU   rv   rd   rw   rf   rx   ry   rT   rp   rz   r{   s                    rC   r]   )cryptocom.un_watch_order_book_for_symbols   s     !!!%%g.!!&'26oofh7!F8# $'+'D'DVM]_u  xM  (N$(,(E(EfNh  kA  CW  )X%3Hx/0"#&*&C&CFL\^s&t#'+'D'DVMgi~  AT  (U$+7K834q#g,'AZF[[(F'&,6<s5zIL&)99K##K0  +!=>MM,' ( 22;Xhrxyyy9 	"8 zs"   E6E1EE6,E4-E64E6c                     U R                  US5      nU R                  US5      nU R                  US5      nUR                  X4U/5        g )Nr         )
safe_floatrJ   
storeArray)rA   booksidedeltapriceamountcounts         rC   handle_deltacryptocom.handle_delta   sG    q)*!!%+UE23rE   c                 d    [        S[        U5      5       H  nU R                  XU   5        M     g )Nr   )rn   ro   r   )rA   r   deltasry   s       rC   handle_deltascryptocom.handle_deltas   s)    q#f+&Ahq	2 'rE   rN   c                    U R                  US5      nU R                  U5      nUS   nU R                  US5      nU R                  US5      nU R                  US5      nXPR                  ;  a1  U R                  US5      nU R                  0 U5      U R                  U'   U R                  U   n	U R                  US5      n
U R                  USS	5      nUnU
S
:X  a2  U	R                  0 5        XYS'   XyS'   U R                  U5      U	S'   XS'   OsU R                  US0 5      nU R                  US5      nU	S   nX:w  aD  U R                  SSS5      nU(       a*  [        U R                  S-   U R                  U5      -   5      eU R                  U	S   U R                  US/ 5      5        U R                  U	S   U R                  US/ 5      5        XS'   XR                  U'   SU-   nUR                  U	U5        g )Ninstrument_namerT   datar   tdepthchannelusbook	timestampdatetimenonceupdatepur*   r9   T asksbidsri   )safe_stringsafe_marketrl   rJ   
orderbookscounted_order_booksafe_integer_2rM   iso8601handle_optionr   rG   orderbook_checksum_messager   resolve)rA   rN   rO   marketIdrp   rT   r   r   rU   r|   r   r   bookspreviousNoncecurrentNoncer9   r{   s                    rC   handle_order_bookcryptocom.handle_order_book   s   p ##G->?!!(+!w/tQ'%%dC0	//)%%gw7E&*&=&=b%&HDOOF#OOF+	""7I6##D#s3fOOB"(h%.k"$(LL$;Ij!!&gOOD(B7E --dD9M$W-L,--.>
DQ'#8W8WX^8_(_``9V,dooeVR.PQ9V,dooeVR.PQ"'"+"V+y+.rE   sincec                 F   #    U R                  U/X#U5      I Sh  vN $  N7f)a  
get the list of most recent trades for a particular symbol

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name

:param str symbol: unified symbol of the market to fetch trades for
:param int [since]: timestamp in ms of the earliest trade to fetch
:param int [limit]: the maximum amount of trades to fetch
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
N)watch_trades_for_symbols)rA   rT   r   rU   rX   s        rC   watch_tradescryptocom.watch_trades%  s$      22F8U6RRRRs   !!c                 D   #    U R                  U/U5      I Sh  vN $  N7f)a  
get the list of most recent trades for a particular symbol

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name

:param str symbol: unified symbol of the market to fetch trades for
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
N)un_watch_trades_for_symbolsr^   s      rC   un_watch_tradescryptocom.un_watch_trades3  s"      55vhGGGGr[   c                   #    U R                  5       I Sh  vN   U R                  U5      n/ n[        S[        U5      5       H1  nX   nU R	                  U5      nSUS   -   n	UR                  U	5        M3     U R                  XUU5      I Sh  vN n
U R                  (       a5  U R                  U
S5      nU R                  US5      nU
R                  X5      nU R                  XUSS5      $  N N`7f)a  
get the list of most recent trades for a particular symbol

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name

:param str[] symbols: unified symbol of the market to fetch trades for
:param int [since]: timestamp in ms of the earliest trade to fetch
:param int [limit]: the maximum amount of trades to fetch
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
Nr   trade.rG   rT   r   T)rj   rk   rn   ro   rp   rr   rs   
newUpdatesrl   r   getLimitfilter_by_since_limit)rA   ra   r   rU   rX   rt   ry   rT   rp   rz   tradesfirsttradeSymbols                rC   r   "cryptocom.watch_trades_for_symbols?  s      !!!%%g.q#g,'AZF[[(F(6$<7LMM,'	 (
 11&&II??OOFA.E**5(;KOOK7E))&TRR 	" Js#   C0C,A6C0C.AC0.C0c                 f  #    U R                  5       I Sh  vN   U R                  U5      n/ n/ n[        S[        U5      5       HH  nX   nU R	                  U5      nSUS   -   nUR                  SUS   -   5        UR                  U5        MJ     U R                  SXX3U5      I Sh  vN $  N N7f)a  
get the list of most recent trades for a particular symbol

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name

:param str[] [symbols]: list of unified market symbols to unwatch trades for
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
Nr   r   rG   zunsubscribe:trades:rT   r   )rj   rk   rn   ro   rp   rr   r   )	rA   ra   rX   rt   ru   ry   rT   rp   rz   s	            rC   r   %cryptocom.un_watch_trades_for_symbolsZ  s      !!!%%g.q#g,'AZF[[(F(6$<7L  !69I!IJMM,' ( 228WU[eklll 	" ms"   B1B-BB1(B/)B1/B1c                 ~   U R                  US5      nU R                  US5      nU R                  US5      nU R                  U5      nUS   nU R                  U R                  U5      nUc6  U R	                  U R
                  SS5      n	[        U	5      nXR                  U'   U R                  US/ 5      n
[        U
5      nUS:X  a  g U R                  X5      n[        S[        U5      5       H  nUR                  X   5        M     UR                  S	U-   S
5      nUR                  X5        UR                  X5        g )Nr   r   subscriptionrT   tradesLimit  r   r   rh    )r   r   rl   r   rJ   r<   r   ro   parse_tradesrn   rr   replacer   )rA   rN   rO   r   r   symbolSpecificMessageHashrp   rT   storedrU   r   
dataLengthparsedTradesjchannelReplaceds                  rC   handle_tradescryptocom.handle_tradesp  s"   . ""7I6##G->?$($4$4Wn$M!!!(+!f5>%%dllM4HE&F"(KKw3Y
?((6q#l+,AMM,/* -!//#."=v9v/rE   c                 8  #    U R                  5       I Sh  vN   SnUb  U R                  U5      nUS   nSnUb  US-   US   -   OUnU R                  Xd5      I Sh  vN nU R                  (       a  UR	                  X5      nU R                  XqX#S5      $  N N;7f)a  
watches information on multiple trades made by the user

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-trade-instrument_name

:param str symbol: unified market symbol of the market trades were made in
:param int [since]: the earliest time in ms to fetch trades for
:param int [limit]: the maximum number of trade structures to retrieve
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
NrT   
user.traderh   rG   Trj   rp   watch_private_subscriber   r   filter_by_symbol_since_limit)rA   rT   r   rU   rX   rp   r{   r   s           rC   watch_my_tradescryptocom.watch_my_trades        !!![[(FH%F"=C=O{S(6$<7Va33KHH??OOF2E00tTT 	" I"   BBABB:BBc                    #    U R                  5       I Sh  vN   U R                  U5      nSUS   -   nU R                  XB5      I Sh  vN $  N6 N7f)a  
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name

:param str symbol: unified symbol of the market to fetch the ticker for
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
Nticker.rG   )rj   rp   watch_public)rA   rT   rX   rp   r{   s        rC   watch_tickercryptocom.watch_ticker  sS      !!!V$$vd|3&&{;;; 	" <s!   AA1AA	AAc                    #    U R                  5       I Sh  vN   U R                  U5      nSUS   -   nSUS   -   nU R                  SUS   /U/U/U/U5      I Sh  vN $  NJ N7f)a  
unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name

:param str symbol: unified symbol of the market to fetch the ticker for
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
Nr   rG   unsubscribe:ticker:rT   ticker)rj   rp   r   )rA   rT   rX   rp   subMessageHashr{   s         rC   un_watch_tickercryptocom.un_watch_ticker  s      !!!V$'&,6+fX.>>228fX>N=OR]Q^ao`p  tB  sC  EK  L  L  	L	 	" Ls"   A%A!AA%A#A%#A%c                   #    U R                  5       I Sh  vN   U R                  USS5      n/ nU R                  U5      n[        S[	        U5      5       H  nXE   nUR                  SU-   5        M     U R                  S   S   S   nU R                  5       nSS	U0US
.n	U R                  XsU R                  X5      U5      I Sh  vN n
U R                  (       a  0 nXU
S   '   U$ U R                  U R                  SU5      $  N N?7f)a  
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name

:param str[] symbols: unified symbol of the market to fetch the ticker for
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
NFr   r   r5   r"   r3   	subscribechannelsrH   rX   r   rT   )rj   rk   
market_idsrn   ro   rr   r;   r   watch_multipleextendr   filter_by_arraytickers)rA   ra   rX   ru   	marketIdsry   r   urlrG   requestr   results               rC   watch_tickerscryptocom.watch_tickers  s     !!!%%gtU;OOG,	q#i.)A |H  X!56 * iit$X.ZZ\!M 
 **3t{{7?[]jkk??F'-6(#$M##DLL(GDD+ 	"  ls"   D	DB0D	D>D	D	c                 b  #    U R                  5       I Sh  vN   U R                  USS5      n/ n/ nU R                  U5      n[        S[	        U5      5       H3  nXV   nX   nUR                  SU-   5        UR                  SU-   5        M5     U R                  SXXDU5      I Sh  vN $  N N7f)a^  
unWatches a price ticker

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name

:param str[] symbols: unified symbol of the market to fetch the ticker for
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
NFr   r   r   r   )rj   rk   r   rn   ro   rr   r   )	rA   ra   rX   ru   r   r   ry   r   rT   s	            rC   un_watch_tickerscryptocom.un_watch_tickers  s      !!!%%gtU;OOG,	q#i.)A |HZF##I$89  !6!?@	 *
 228WUey  A  A  	A 	" As"   B/B+BB/&B-'B/-B/c                 `   U R                  X5        U R                  US5      nU R                  US5      nU R                  U5      nU R                  US/ 5      n[	        S[        U5      5       H<  nXg   nU R                  X5      n	U	S   n
XR                  U
'   UR                  X5        M>     g )Nr   r   r   r   rT   )	handle_bid_askr   r   rl   rn   ro   parse_ws_tickerr   r   )rA   rN   rO   r{   r   rp   r   ry   r   parsedrT   s              rC   handle_tickercryptocom.handle_ticker
  s    2 	F,&&w?##G->?!!(+w3q#d)$AWF))&9FH%F#)LL NN6/ %rE   r   rp   c                    U R                  US5      nU R                  US5      nU R                  XBS5      nU R                  US5      nU R                  US5      nU R                  0 SUS   _SU_SU R	                  U5      _S	U R                  US
5      _SU R                  US5      _SU R                  US5      _SU R                  US5      _SU R                  US5      _SU R                  US5      _SS _SS _SU_SU_SS _SS _SU R                  US5      _SS _U R                  US5      US:X  a  U R                  US 5      OS US!.EU5      $ )"Nr   ry   _quotearT   r   r   highhlowlbidb	bidVolumebsaskk	askVolumeksvwapopencloselastpreviousClosechange
percentagecaveragevUSDvv)
baseVolumequoteVolumeinfo)rJ   r   r   safe_tickerr   safe_number)rA   r   rp   r   r   r  r  s          rC   r   cryptocom.parse_ws_ticker/  s   $ %%fc2	##FC0!!(C8  1, !
fX&!
!
 Y/!
 D$$VS1	!

 4##FC0!
 4##FC0!
 ))&$7!
 4##FC0!
 ))&$7!
 D!
 D!
 T!
 D!
 T!
 d!
  $**637!!
" t#!
$ **637>Cun4++FD9SW)!
* + 	rE   c                 H  #    U R                  5       I Sh  vN   U R                  USS5      n/ n/ nU R                  U5      n[        S[	        U5      5       H1  nXV   nUR                  SX   -   5        UR                  SU-   5        M3     U R                  S   S   S   nU R                  5       n	S	S
U0U	S.n
U R                  XU R                  X5      U5      I Sh  vN nU R                  (       a  0 nXUS   '   U$ U R                  U R                  SU5      $  GN N@7f)ah  

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name

watches best bid & ask for symbols
:param str[] symbols: unified symbol of the market to fetch the ticker for
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
NFr   bidask.r   r5   r"   r3   r   r   r   rT   )rj   rk   r   rn   ro   rr   r;   r   r   r   r   r   bidsasks)rA   ra   rX   ru   rt   r   ry   r   r   rG   r   
newTickersr   s                rC   watch_bids_askscryptocom.watch_bids_asks]  s*     !!!%%gtU;OOG,	q#i.)A |H  WZ!78MM)h./ * iit$X.ZZ\!F 
  ..s4;;wC_anoo
??G,6Jx()N##DMM8WEE/ 	"$ ps"   D"DCD"D  >D" D"c                     U R                  US/ 5      nU R                  US0 5      nU R                  U5      nUS   nXPR                  U'   SU-   nUR	                  XW5        g )Nr   r   rT   r$  )	safe_list	safe_dictparse_ws_bid_askr%  r   )rA   rN   rO   r   r   parsedTickerrT   r{   s           rC   r   cryptocom.handle_bid_ask  sb    ~~gvr2a,,,V4h' ,f&(|1rE   c                 d   U R                  US5      nU R                  X25      nU R                  US5      nU R                  US5      nU R                  UUU R	                  U5      U R                  US5      U R                  US5      U R                  US5      U R                  US5      US.U5      $ )	Nry   rT   r   r  r  r
  r  )rT   r   r   r  r  r	  r  r  )r   r   rJ   r   r   )rA   r   rp   r   rT   r   s         rC   r,  cryptocom.parse_ws_bid_ask  s    ##FC0!!(3!!&(3%%fc2	"Y/##FC0))&$7##FC0))&$7	!
 	 		rE   1m	timeframec                 `  #    U R                  5       I Sh  vN   U R                  U5      nUS   nU R                  U R                  X"5      nSU-   S-   US   -   nU R	                  X5      I Sh  vN n	U R
                  (       a  U	R                  X5      nU R                  XUSS5      $  N N<7f)az  
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#candlestick-time_frame-instrument_name

:param str symbol: unified symbol of the market to fetch OHLCV data for
:param str timeframe: the length of time each candle represents
:param int [since]: timestamp in ms of the earliest candle to fetch
:param int [limit]: the maximum amount of candles to fetch
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns int[][]: A list of candles ordered, open, high, low, close, volume
NrT   candlestick.rh   rG   r   T)rj   rp   r   
timeframesr   r   r   r   )
rA   rT   r2  r   rU   rX   rp   intervalr{   ohlcvs
             rC   watch_ohlcvcryptocom.watch_ohlcv  s      !!!V$!##DOOYJ)H4s:VD\I''<<??NN61E))%q$GG 	"
 =s"   B.B*AB./B,0;B.,B.c           	      <  #    U R                  5       I Sh  vN   U R                  U5      nUS   nU R                  U R                  X"5      nSU-   S-   US   -   nSUS   -   S-   U-   nSUS   U//0nU R	                  S	US   /U/U/U/X85      I Sh  vN $  N N7f)
a  
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#candlestick-time_frame-instrument_name

:param str symbol: unified symbol of the market to fetch OHLCV data for
:param str timeframe: the length of time each candle represents
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns int[][]: A list of candles ordered, open, high, low, close, volume
NrT   r4  rh   rG   zunsubscribe:ohlcv::symbolsAndTimeframesr7  )rj   rp   r   r5  r   )	rA   rT   r2  rX   rp   r6  r   r{   	subExtends	            rC   un_watch_ohlcvcryptocom.un_watch_ohlcv  s      !!!V$!##DOOYJ,x7#=tL*VH-==CiO"fX&6	%B$C
	 227VH=M<NQ\P]`n_o  sA  rB  DJ  V  V  	V 	" Vs"   BBA<BBBBc                    U R                  US5      nU R                  US5      nU R                  U5      nUS   nU R                  US5      nU R                  U5      nU R                  U R                  U0 5      U R                  U'   U R                  U R                  U   U5      n	U	c9  U R                  U R                  SS5      n
[        U
5      n	XR                  U   U'   U R                  US5      n[        S[        U5      5       H)  nX   nU R                  X5      nU	R                  U5        M+     UR                  X5        g )	Nr   r   rT   r6  
OHLCVLimitr   r   r   )r   r   find_timeframerl   ohlcvsrJ   r<   r   rn   ro   parse_ohlcvrr   r   )rA   rN   rO   r{   r   rp   rT   r6  r2  r   rU   r   ry   tickr   s                  rC   handle_ohlcvcryptocom.handle_ohlcv  s+    &&w?##G->?!!(+!##GZ8''1	"oodkk62FFV!4i@>%%dllL$GE*51F-3KK	*w/q#d)$A7D%%d3FMM&! % 	v+rE   c                 8  #    U R                  5       I Sh  vN   SnUb  U R                  U5      nUS   nSnUb  US-   US   -   OUnU R                  Xd5      I Sh  vN nU R                  (       a  UR	                  X5      nU R                  XqX#S5      $  N N;7f)a  
watches information on multiple orders made by the user

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-order-instrument_name

:param str symbol: unified market symbol of the market orders were made in
:param int [since]: the earliest time in ms to fetch orders for
:param int [limit]: the maximum number of order structures to retrieve
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
NrT   
user.orderrh   rG   Tr   )rA   rT   r   rU   rX   rp   r{   orderss           rC   watch_orderscryptocom.watch_orders  r   r   c                 
   U R                  US5      nU R                  US5      nU R                  US/ 5      n[        U5      nUS:  a  U R                  c-  U R	                  U R
                  SS5      n[        U5      U l        U R                  n	U R                  U5      n
[        S[        U
5      5       H  nU	R                  X   5        M     UR                  X5        UR                  X5        UR                  U	S5        g g )Nr   r   r   r   ordersLimitr   rI  )r   rl   ro   rJ  rJ   r<   r   parse_ordersrn   rr   r   )rA   rN   rO   r   r   r   rJ  ordersLengthrU   r   r   ry   s               rC   handle_orderscryptocom.handle_orders  s    > ""7I6$($4$4Wn$M!&"56{!{{"))$,,tL4U;[[F&&v.F1c&k*fi( +NN6=NN6+NN6<0 rE   c                 &  #    U R                  5       I Sh  vN   U R                  5       I Sh  vN   U R                  S   S   S   nU R                  5       nSSS/0US.nS	nU R	                  U5      nU R                  U5      (       d  S
SR                  U5      -   nU R                  U5      n	U R                  X5        U R                  SSS5      n
U R                  SSS5      nU
(       a@  U(       a9  U R                  c,  U	R                  S5      I Sh  vN nU R                  XX#S5      $ U R                  XXU R                  Xt5      5      I Sh  vN nU R                  (       a  U$ U R                  U R                  XUS5      $  GNq GN\ Nw N=7f)a  
watch all open positions

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-position_balance

:param str[] [symbols]: list of unified market symbols to watch positions for
:param int [since]: the earliest time in ms to fetch positions for
:param int [limit]: the maximum number of positions to retrieve
:param dict params: extra parameters specific to the exchange API endpoint
:returns dict[]: a list of `position structure <https://docs.ccxt.com/en/latest/manual.html#position-structure>`
Nr5   r"   r4   r   r   user.position_balancer   	positions::,r.   r7   Tr8   )rj   authenticater;   r   rk   is_emptyjoinrN   set_positions_cacher   rU  futurefilter_by_symbols_since_limitwatchr   r   )rA   ra   r   rU   rX   r   rG   r   r{   rN   r7   r8   snapshotnewPositionss                 rC   watch_positionscryptocom.watch_positions,  s~     !!!!!!iit$Y/ZZ\!45 
 "%%g.}}W%%'!22KS!  1!%!3!34DF^`d!e!%!3!34DF^`d!e!&<AW#]]+CDDH55hW[\\!ZZ$++g:VWW??11$..'RWY]^^3 	"!& EWsD   FFFF
C&FF;FF6F
FFFc                     U R                  SSS5      nU(       a@  SnXQR                  ;  a.  UR                  U5        U R                  U R                  X5        g g [        5       U l        g )Nr.   r7   F)r   futuresr\  spawnload_positions_snapshotr   rU  )rA   rN   typera   r7   r{   s         rC   r[  cryptocom.set_positions_cacheS  s]    !%!3!34DF^`e!f!2K>>1k*

477M 2 67DNrE   c                 r  #    U R                  5       I S h  vN n[        5       U l        U R                  n[        S[	        U5      5       H3  nX5   nU R                  USS5      nUS:  d  M"  UR                  U5        M5     UR                  U   nUR                  U5        UR                  US5        g  N7f)Nr   	contractsrU  )	fetch_positionsr   rU  rn   ro   r!  rr   rd  r   )	rA   rN   r{   rU  cachery   positionrj  r\  s	            rC   rf  !cryptocom.load_positions_snapshot]  s     ..00	13q#i.)A |H((;BI1}X&	 * ,uuk* 1s   B7B5AB7-A	B7c                    U R                  US/ 5      nU R                  US0 5      nU R                  US/ 5      nU R                  c  [        5       U l        U R                  n/ n[        S[	        U5      5       H:  nXX   n	U R                  U	5      n
UR                  U
5        UR                  U
5        M<     U R                  US5      n[        S[	        U5      5       Hl  nX   nUR                  S5      nUS   nUR                  S5      nU R                  USUS	5      nU R                  U5      (       a  MZ  UR                  UU5        Mn     UR                  US5        g )
Nr   r   rU  zpositions::rV  r   rW  rT   F)rl   rU  r   rn   ro   parse_positionrr   find_message_hashessplitr   rY  r   )rA   rN   rO   r   	firstDatarawPositionsrl  r`  ry   rawPositionrm  ru   r{   partssymbolsStringra   rU  s                    rC   handle_positionscryptocom.handle_positionsk  sA   6 w3OOD!R0	y+rB>>!57DNq#l+,A&/K**;7H)LL"	 -
 00Gq#m,-A'*K%%d+E!!HM#))#.G,,\8WeTI==++y+6 . 	|[1rE   c                 D   #    SnU R                  X!5      I Sh  vN $  N7f)aL  
watch balance and get the amount of funds available for trading or funds locked in orders

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-balance

:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
user.balanceN)r   )rA   rX   r{   s      rC   watch_balancecryptocom.watch_balance  s#      %11+FFFFr[   c                    U R                  US5      nU R                  US/ 5      nU R                  US   S/ 5      nX@R                  S'   [        S[	        U5      5       H  nXV   nU R                  US5      nU R                  U5      n	U R                  5       n
U R                  US5      U
S'   U R                  US	5      U
S
'   XR                  U	'   U R                  U R                  5      U l        M     UR                  U R                  U5        U R                  US5      nUR                  U R                  U5        g )Nr   r   r   position_balancesr  r   quantitytotalreserved_qtyusedrG   )	r   rl   balancern   ro   safe_currency_codeaccountsafe_balancer   )rA   rN   rO   r{   r   positionBalancesry   r  
currencyIdcoder  messageHashRequests               rC   handle_balancecryptocom.handle_balance  s#   \ &&w?w3??474GL#Vq#./0A&)G))'3DEJ**:6DllnG#//DGG"..wGGFO!(LL,,T\\:DL 1 	t||[1!--gt<t||%78rE   rg  sider   r   c                    #    U R                  5       I Sh  vN   U R                  XX4XV5      nSUS.nU R                  5       nU R                  X5      I Sh  vN $  NE N7f)an  

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order

create a trade order
:param str symbol: unified symbol of the market to create an order in
:param str type: 'market' or 'limit'
:param str side: 'buy' or 'sell'
:param float amount: how much of currency you want to trade in units of base currency
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
Nprivate/create-orderrH   rX   )rj   create_order_requestr   watch_private_request)	rA   rT   rg  r  r   r   rX   r   r{   s	            rC   create_order_wscryptocom.create_order_ws  sf      !!!**6uU,
 jjl//EEE 	" F"   A AA A AA A rG   c                    #    U R                  5       I Sh  vN   U R                  XXVU5      nSUS.nU R                  5       n	U R                  X5      I Sh  vN $  NE N7f)a  
edit a trade order

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-amend-order

:param str id: order id
:param str symbol: unified market symbol of the order to edit
:param str [type]: not used by cryptocom editOrder
:param str [side]: not used by cryptocom editOrder
:param float amount:(mandatory) how much of the currency you want to trade in units of the base currency
:param float price:(mandatory) the price for the order, in units of the quote currency, ignored in market orders
:param dict [params]: extra parameters specific to the exchange API endpoint
:param str [params.clientOrderId]: the original client order id of the order to edit, required if id is not provided
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
Nprivate/amend-orderr  )rj   edit_order_requestr   r  )
rA   rG   rT   rg  r  r   r   rX   r   r{   s
             rC   edit_order_wscryptocom.edit_order_ws  sf       !!!((VFK+
 jjl//EEE 	" Fr  c                     U R                  US5      nU R                  US0 5      nU R                  U5      nUR                  XS5        g )NrG   r   )r   rl   parse_orderr   )rA   rN   rO   r{   rawOrderorders         rC   handle_ordercryptocom.handle_order  sD     &&w5??7Hb9  *u*rE   c                    #    U R                  5       I Sh  vN   U R                  SU0U5      nSUS.nU R                  5       nU R                  XT5      I Sh  vN $  NF N7f)a  
cancels an open order

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order

:param str id: the order id of the order to cancel
:param str [symbol]: unified symbol of the market the order was made in
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
Norder_idprivate/cancel-orderr  )rj   r   r   r  )rA   rG   rT   rX   r   r{   s         rC   cancel_order_wscryptocom.cancel_order_ws)  so      !!!
 -
 jjl//EEE 	" Fs"   A!AAA!AA!A!c                    #    U R                  5       I Sh  vN   SnSU R                  0 U5      S.nUb  U R                  U5      nUS   US   S'   U R                  5       nU R	                  XT5      I Sh  vN $  Nc N7f)ab  
cancel all open orders

https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-all-orders

:param str symbol: unified market symbol of the orders to cancel
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict} Returns exchange raw message {@link https://docs.ccxt.com/#/?id=order-structure:
Nprivate/cancel-all-ordersr  rG   rX   r   )rj   r   rp   r   r  )rA   rT   rX   rp   r   r{   s         rC   cancel_all_orders_wscryptocom.cancel_all_orders_ws?  s      !!!1kk"f-
 [[(F39$<GH/0jjl//EEE 	" Fs"   A>A:AA>5A<6A><A>c                 J    U R                  US5      nUR                  X#5        g )NrG   )r   r   )rA   rN   rO   r{   s       rC   handle_cancel_all_orders"cryptocom.handle_cancel_all_ordersU  s"     &&w5w,rE   c                    #    U R                   S   S   S   nU R                  5       nSSU/0US.nU R                  XR5      nU R                  X1Xa5      I S h  vN $  N7fNr5   r"   r3   r   r   r   )r;   r   r   r^  rA   r{   rX   r   rG   r   rO   s          rC   r   cryptocom.watch_public`  sj     iit$X.ZZ\![M 
 ++g.ZZ'GGGGs   AAAAc                    #    U R                   S   S   S   nU R                  5       nSSU0US.nU R                  Xc5      nU R                  XAXq5      I S h  vN $  N7fr  )r;   r   r>   r   )rA   ru   rt   rX   r   rG   r   rO   s           rC   rs   cryptocom.watch_public_multiplem  sl     iit$X.ZZ\!F 
 ""73((WTTTTs   AAAAtopicru   r   rt   c           
        #    U R                   S   S   S   nU R                  5       n	SSU0U	[        U	5      S.n
[        U	5      UUUUS.nU R                  X5      nU R	                  XXU R                  X5      5      I S h  vN $  N7f)Nr5   r"   r3   unsubscriber   )rH   rX   r   rG   )rG   r  ra   r   ru   )r;   r   rq   r>   r   r   )rA   r  ra   ru   r   rt   rX   r=  r   rG   r   r   rO   s                rC   r   "cryptocom.un_watch_public_multiplez  s     iit$X.ZZ\#F b'
 b' 0*
 ""73((WUYU`U`amUyzzzzs   A?BBBc                    #    U R                  5       I S h  vN   U R                  S   S   S   nUUS.nU R                  XB5      nU R                  U[	        U5      US5      I S h  vN $  NT N7f)Nr5   r"   r4   )rG   r   T)rX  r;   r   r^  rq   )rA   r   rX   r   r   rO   s         rC   r  cryptocom.watch_private_request  ss     !!!iit$Y/
 ++g.ZZSZ$??? 	" @s"   A/A+AA/&A-'A/-A/c                    #    U R                  5       I S h  vN   U R                  S   S   S   nU R                  5       nSSU/0US.nU R                  XR5      nU R	                  X1Xa5      I S h  vN $  N] N7f)Nr5   r"   r4   r   r   r   )rX  r;   r   r   r^  r  s          rC   r   !cryptocom.watch_private_subscribe  s     !!!iit$Y/ZZ\![M 
 ++g.ZZ'GGG 	" Hs"   A8A4AA8/A60A86A8c                 @   U R                  US5      nU R                  US5      n U(       a  US:w  a  U R                  S-   U R                  U5      -   nU R                  U R                  S   XE5        U R                  US5      nUb  U R                  U R                  S   Xe5        [        U5      eg! [         a`  n[        U[        5      (       a0  S	nUR                  Xx5        XR                  ;   a  UR                  U	 OUR                  Xs5         S nAg
S nAff = f)NrG   r  0r   exactrO   broadFauthenticatedT)r   rG   rL   throw_exactly_matched_exception
exceptionsrl   throw_broadly_matched_exceptionr   rK   
isinstancer   rejectsubscriptions)	rA   rN   rO   rG   	errorCodefeedbackmessageStringrP   r{   s	            rC   handle_error_messagecryptocom.handle_error_message  s    gt,$$Wf5		Y#-77S=499W+==44T__W5Myc $ C ,889QS`k#H-- 	!011-a-"6"66,,[9a$	s   BB3 3
D=ADDc           
         U R                   U R                  U R                  U R                  U R                  U R                  U R                  U R
                  U R                  S.	nU R                  USS5      nU R                  US5      nUb&  UR                  S5      S:  a  U R                  X5        Ub'  UR                  S5      (       a  U R	                  X5        U R                  X55      nUb	  U" X5        g g )N)	candlestickr   trader   zbook.updaterI  r   r{  rT  r   r  r   r   rI  )rF  r   r   r   rQ  r  rx  safe_value_2r   find
startswithrl   )rA   rN   rO   methodsr   r   rH   s          rC   handle_subscribecryptocom.handle_subscribe  s    ,,((''**11,,,, //%)%:%:

 ""7Hf=""695W\\,%?"%Dv.W%7%7%E%Ev.26" rE   c                 r   U R                  X5      (       a  g U R                  US5      nU R                  U R                  U R                  U R                  U R                  U R                  U R
                  U R                  U R                  U R                  S.
nU R                  XC5      nUb	  U" X5        g g )NrH   )
r   zpublic/heartbeatpublic/authr  r  r  r  zprivate/close-positionr   r  )	r  r   handle_pinghandle_authenticater  r  r  handle_unsubscriberl   )rA   rN   rO   rH   r  
callMethods         rC   handle_messagecryptocom.handle_message  s    D $$V55!!'84   $ 0 033$($5$5#'#4#4$($5$5)-)F)F&*&7&7..22
 __W5
!v' "rE   c                 L  #    U R                  5         U R                  S   S   S   nU R                  U5      nSnUR                  U5      nU R	                  UR
                  U5      nUc  Sn[        U R                  5       5      nXx-   U R                  -   U-   n	U R                  U R                  U	5      U R                  U R                  5      [        R                  5      n
UUUU R                  U
S.nU R                  X5      nU R                  X$X5        UI S h  vN $  N7f)Nr5   r"   r4   r  r  )rG   r   rH   api_keysig)check_required_credentialsr;   rN   reusableFuturerl   r  rq   r   apiKeyhmacencodesecrethashlibsha256r   r^  )rA   rX   r   rN   r{   r\  r  rH   r   auth	signaturer   rO   s                rC   rX  cryptocom.authenticate  s     '')iit$Y/S!%&&{3(<(<kJ "F

%E>DKK/%7D		$++d"3T[[5Mw~~^I ;; G kk'2GJJs>||s   DD$D"D$c                 <    U R                  U R                  X5        g N)re  rR   )rA   rN   rO   s      rC   r  cryptocom.handle_ping)  s    

499f.rE   c                 ^    U R                  UR                  S5      nUR                  S5        g )Nr  T)rl   rd  r   )rA   rN   rO   r\  s       rC   r  cryptocom.handle_authenticate,  s$     AtrE   c                 *   U R                  US5      n[        UR                  R                  5       5      n[	        S[        U5      5       H  nXE   nXaR                  ;  a  M  UR                  S5      (       d  M0  UR                  U   nU R                  US5      nX8:w  a  MX  U R                  US/ 5      n	U R                  US/ 5      n
[	        S[        U	5      5       H  nX   nX   nU R                  XU5        M     U R                  U5        M     g )NrG   r   r  ru   r   )
r   listr  keysrn   ro   r  r*  clean_unsubscriptionclean_cache)rA   rN   rO   rG   r  ry   r{   r   subIdru   r   r   	unsubHashsubHashs                 rC   r  cryptocom.handle_unsubscribe3  s    gt,F((--/0q#d)$A'K#7#77%%m44%33K@((t<; $|_b Q#'>>,@RTV#W q#m"45A - 0I.1G--fyI 6   .! %rE   )r  rJ  rU  r  )Q__name__
__module____qualname____firstlineno__r   r@   rR   rq   r
   r   rY   r_   r   rW   r]   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   dictr   r   r'  r   r,  r  r8  r>  rF  r   rK  rQ  r   ra  r[  rf  rx  r   r|  r  r   r   floatr   r  r  r  r  r  r  r   rs   r   r  r   r	   r  r  r  rX  r  r  r  __static_attributes____classcell__)rB   s   @rC   r   r      s   ,# ,\
  @DB PS P PS\ P =? L L3 L SW_a )!$s) )!C )!fo )!V PR )zT#Y )zV_ )zV43X/ X/t <@d[] S SS S Sbfglbm S 9; 
HC 
HtE{ 
H OSaenp Sd3i S S[^ Suyz  vA S6 LN mc mRU m,*0F *0X 37TX\eg UC Us URU Ulpqvlw U0 68 < <F < 9; LC Ls L  6:" E7 E EB 9=R Ag AC A,#0F #0J,d ,F ,f ,\ 8<B !FW !F7 !FF2V 2  ?CQUdhqs H H H3 H^a Hx|  ~B  yC H. BFb V3 V3 VUX V,,6 ,< 04$UYbd U UC Us Uimnsit U0.1F .1` 8<$]ajl %_W %_C %_WZ %_quv~q %_N8& 8 8+02d *, 
G 
G=9V =9~ pt|~ FC Fy F	 F[` Fil F  DI F. im{  IK Fc F3 Fi Fy Fbe Fux F  PU F2+6 +" <@ F FS Fu F, 8<B F F,	-v 	- 68 H IK U _a  mo {C {$s) {\`ad\e {y}  B  zC {  MQ  RU  MV {* 9; @ AC H6 t <#v #03(V 3(j )+ ./& /& / / /rE   r   )$ccxt.async_supportccxt ccxt.async_support.base.ws.cacher   r   r   r   r  ccxt.base.typesr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   !ccxt.async_support.base.ws.clientr   typingr   ccxt.base.errorsr   r   r   r   async_supportr    rE   rC   <module>r     sc     A  A  Z  Z  Z  Z  Z 4  * 0 ) *t/"",, t/rE   