
    E#i                         S SK rS SKJrJrJ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  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\R8                  R:                  5      rg)    N)
ArrayCacheArrayCacheBySymbolByIdArrayCacheByTimestamp)AnyBalancesBoolIntOrder	OrderBookStrStringsTickerTickersTrade)Client)List)AuthenticationError)ArgumentsRequired)
BadRequest)Precisec                   d  ^  \ rS rSrS\4U 4S jjrSSS0 4S\S\S\S	\S\\	   4
S
 jjr
S\4S jrS0 4S\S	\S\4S jjrS\4S jrS rS r0 4S\S\4S jjrS0 4S\S\4S jjrS\4S jrSS0 4S\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S,S\4S jjrS,S jrSSS0 4S\S\S	\S\\   4S jjr S,S\4S jjr!S,S jr"S r#0 4S\$4S jjr%S\4S jr&/ 0 4S  jr'S!0 4S" jr(/ 0 4S# jr)0 4S$ jr*S\4S% jr+S\S\,4S& jr-S\4S' jr.S\4S( jr/S\4S) jr0S\4S* jr1S+r2U =r3$ )-whitebit   returnc                    > U R                  [        [        U ]  5       SSSSSSSSSSS.
SSS00SSS	S
SSSSSS.	SS0S.SU R                  0SS[
        [
        [
        [        S.00S.5      $ )NTF)
wswatchBalancewatchMyTrades
watchOHLCVwatchOrderBookwatchOrderswatchTickerwatchTickerswatchTradeswatchTradesForSymbolsapir   zwss://api.whitebit.com/ws6030090018003600144002880086400604800)	1m5m15m30m1h4h8h1d1wpriceIntervalr   )
timeframesr    pingexact)1246)hasurlsoptions	streaming
exceptions)deep_extendsuperr   describer;   r   r   )self	__class__s    K/home/james-whalen/.local/lib/python3.13/site-packages/ccxt/pro/whitebit.pyrH   whitebit.describe   s    h > @ $!%""&## $#). 5  ! !!!"
 $Q#" 		 '''0		K/C
 / /	    r0   Nsymbol	timeframesincelimitc                   #    U R                  5       I Sh  vN   U R                  U5      nUS   nU R                  U R                  S0 5      nU R	                  Xr5      nUS   n	SU-   n
X/nSnU R                  XX5      I Sh  vN nU R                  (       a  UR                  X5      nU R                  XUSS5      $  N N<7f)	aE  
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market

https://docs.whitebit.com/public/websocket/#kline

: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
NrN   r:   idcandles:candles_subscriber   T)	load_marketsmarket
safe_valuerC   safe_integerwatch_public
newUpdatesgetLimitfilter_by_since_limit)rI   rN   rO   rP   rQ   paramsrW   r:   intervalmarketIdmessageHash	reqParamsmethodohlcvs                 rK   watch_ohlcvwhitebit.watch_ohlcvE   s      !!!V$!__T\\<D
$$Z;$<
 !6)(	$''YOO??NN61E))%q$GG! 	" Ps"   CB>A,CC ;C Cclientc                 $   U R                  US/ 5      n[        S[        U5      5       H  nX4   nU R                  US5      nU R	                  U5      nUS   nSU-   n	U R                  XW5      n
XR                  ;  a  0 U R                  U'   SU R                  U   ;  a9  U R                  U R                  SS5      n[        U5      nXR                  U   S'   U R                  U   S   nUR                  U
5        UR                  X5        M     U$ )	Nr^   r      rN   rT   unknown
OHLCVLimit  )rX   rangelensafe_stringsafe_marketparse_ohlcvohlcvsrY   rC   r   appendresolve)rI   rg   messager^   idatar`   rW   rN   ra   parsedrQ   storedrd   s                 rK   handle_ohlcvwhitebit.handle_ohlcvd   s   & (B7q#f+&A9D''a0H%%h/FH%F)F2K%%d3Fkk)&(F#V!44))$,,dK.u517F#I.KK'	2ELL NN5.# '$ rM   c                   #    U R                  5       I Sh  vN   U R                  U5      nUc  SnSUS   -   nSnU R                  U R                  S0 5      nU R	                  USS5      nU R	                  USU5      n	U R                  US5      nUS	   UU	S
/n
U R                  XVX5      I Sh  vN nUR                  5       $  N N7f)a  
watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

https://docs.whitebit.com/public/websocket/#market-depth

: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
:returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
N
   
orderbook:rN   depth_subscriber    r9   0rS   T)rV   rW   rX   rC   ro   omitrZ   rQ   )rI   rN   rQ   r^   rW   ra   rc   rC   defaultPriceIntervalr9   rb   	orderbooks               rK   watch_order_bookwhitebit.watch_order_book   s      !!!V$=E'&*::"//$,,0@"E#//#N((BVW6?34L	
	 ++KSS	  # 	"  Ts"   CCBC.C/CC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S5      nU R                  US5      n	XpR                  ;  a  U R                  5       n
XR                  U'   U R                  U   nXS'   U R                  U	5      US'   U(       a#  U R                  X5      nUR                  U5        OPU R                  US/ 5      nU R                  US	/ 5      nU R                  US   U5        U R                  US	   U5        S
U-   nUR                  X5        g )Nr^   r      rN      	timestampdatetimeasksbidsr~   )rX   ro   rp   safe_timestamp
orderbooks
order_bookiso8601parse_order_bookresethandle_deltasrt   )rI   rg   ru   r^   
isSnapshotr`   rW   rN   rw   r   obr   snapshotr   r   ra   s                   rK   handle_order_bookwhitebit.handle_order_book   sC   L (B7__VQ/
##FA.!!(+!vq)''k:	//)"B&(OOF#OOF+	!*+ $Y 7	*,,T:HOOH%??44D??44Dy0$7y0$7'&0y.rM   c                 n    U R                  US5      nU R                  US5      nUR                  X45        g )Nr   r   )
safe_floatstore)rI   booksidedeltapriceamounts        rK   handle_deltawhitebit.handle_delta   s.    q)*u%rM   c                 d    [        S[        U5      5       H  nU R                  XU   5        M     g )Nr   )rm   rn   r   )rI   r   deltasrv   s       rK   r   whitebit.handle_deltas   s)    q#f+&Ahq	2 'rM   c                    #    U R                  5       I Sh  vN   U R                  U5      nUS   nSnSU-   nU R                  XTUSU5      I Sh  vN $  N= 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://docs.whitebit.com/public/websocket/#market-statistics

: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>`
NrN   market_subscribeticker:F)rV   rW   watch_multiple_subscription)rI   rN   r^   rW   rc   ra   s         rK   watch_tickerwhitebit.watch_ticker   sg      !!!V$!#&(55k6SXZ`aaa 	" bs!   AA8AAAAsymbolsc                   #    U R                  5       I Sh  vN   U R                  USS5      nSnU R                  S   S   nU R                  5       n/ n/ n[	        S[        U5      5       HA  nU R                  X   5      n	UR                  SU	S   -   5        UR                  U	S	   5        MC     UUUS
.n
U R                  XFU R                  X5      U5      I Sh  vN   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://docs.whitebit.com/public/websocket/#market-statistics

: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   r   rN   rS   rS   rc   r^   )rV   market_symbolsrB   noncerm   rn   rW   rs   watch_multipleextendfilter_by_arraytickers)rI   r   r^   rc   urlrS   messageHashesargsrv   rW   requests              rK   watch_tickerswhitebit.watch_tickers  s     !!!%%gtU;#iit$ZZ\q#g,'A[[,F  VH-=!=>KKt% (
 

 !!#dkk'6RTabbb##DLL(GDD# 	"  	cs"   DC=CDC?"D?Dc                    U R                  US/ 5      nU R                  US5      nU R                  US 5      nUS   nU R                  US0 5      nSU-   nU R                  Xu5      n	XR                  U'   UR                  X5        [        UR                  R                  5       5      n
[        S[        U
5      5       HF  nX   nUR                  S5      S:  d  M  UR                  U5      S:  d  M5  UR                  X5        MH     U$ )Nr^   r   rN   r   r   r   )rX   ro   rp   parse_tickerr   rt   listfutureskeysrm   rn   find)rI   rg   ru   r   r`   rW   rN   	rawTickerra   tickerr   rv   currentMessageHashs                rK   handle_tickerwhitebit.handle_ticker   s    ( //'8R8##GQ/!!(D1!OOGQ3	$v-""95%Vv+V^^0023q#m,-A!.!1!&&y1Q6;M;R;RSY;Z^_;_ v: . rM   c                    #    U R                  5       I Sh  vN   U R                  U5      nUS   nSU-   nSnU R                  XgUSU5      I Sh  vN nU R                  (       a  UR	                  X5      nU R                  XUSS5      $  Ns N<7f)a  
get the list of most recent trades for a particular symbol

https://docs.whitebit.com/public/websocket/#market-trades

: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>`
NrN   trades:trades_subscribeFr   T)rV   rW   r   r[   r\   r]   	rI   rN   rP   rQ   r^   rW   ra   rc   tradess	            rK   watch_tradeswhitebit.watch_tradesO  s      !!!V$!$v-#77VUZ\bcc??OOF2E))&TRR 	" ds!   BB
8B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 R                  U5      nUc6  U R	                  U R
                  SS5      n[        U5      nXpR                  U'   U R                  US/ 5      n	U R                  X5      n
[        S[        U
5      5       H  nUR                  X   5        M     SUS   -   nUR                  X|5        g )Nr^   r   rN   tradesLimitrl   r   r   )rX   ro   rp   r   rY   rC   r   parse_tradesrm   rn   rs   rt   )rI   rg   ru   r^   r`   rW   rN   ry   rQ   rw   parsedTradesjra   s                rK   handle_tradeswhitebit.handle_tradesf  s    2 (B7##FA.!!(+!f5>%%dllM4HE&F"(KKvq"-((6q#l+,AMM,/* -&"22v+rM   c                   #    Uc  [        U R                  S-   5      eU R                  5       I Sh  vN   U R                  5       I Sh  vN   U R	                  U5      nUS   nSU-   nSnU R                  XgUSU5      I Sh  vN nU R                  (       a  UR                  X5      nU R                  XX#S5      $  N Nt N=7f)a  
watches trades made by the user

https://docs.whitebit.com/private/websocket/#deals

:param str symbol: unified market symbol
:param int [since]: the earliest time in ms to fetch trades for
:param int [limit]: the maximum number of trades 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>`
Nz+ watchMyTrades() requires a symbol argumentrN   	myTrades:deals_subscribeT	r   rS   rV   authenticaterW   r   r[   r\   filter_by_symbol_since_limitr   s	            rK   watch_my_tradeswhitebit.watch_my_trades  s      >#DGG.[$[\\!!!!!!V$!!F*"77VUY[abb??OOF2E00tTT 	"!
 c3   /CB<C	B>
8CC :C>C Cc                 .   U R                  US5      nU R                  c-  U R                  U R                  SS5      n[	        U5      U l        U R                  nU R                  U5      nUR                  U5        US   nSU-   n	UR                  Xi5        g )Nr^   r   rl   rN   r   )rX   myTradesrY   rC   r   parse_ws_traders   rt   )
rI   rg   ru   subscriptiontraderQ   ry   rx   rN   ra   s
             rK   handle_my_tradeswhitebit.handle_my_trades  s    " 2== %%dllM4HE&u-DM$$U+f!!F*v+rM   c                    U R                  US5      nU R                  US5      nU R                  US5      nU R                  US5      nU R                  US5      nU R                  US5      nU R                  X5      nS n	U R                  US5      n
U
b  U
US   S	.n	U R                  UUUU R	                  U5      US
   US S S UUS U	S.U5      $ )N   r   r         r      quotecostcurrencyrN   )rS   infor   r   rN   ordertypesidetakerOrMakerr   r   r   fee)ro   r   rp   
safe_trader   )rI   r   rW   orderIdr   rS   r   r   r`   r   feeCosts              rK   r   whitebit.parse_ws_trade  s     ""5!,''q1	eQ'  *!!%+##E1-!!(3""5!,"7OC "Y/X&  
  	rM   c                   #    Uc  [        U R                  S-   5      eU R                  5       I Sh  vN   U R                  5       I Sh  vN   U R	                  U5      nUS   nSU-   nSnU R                  XgUSU5      I Sh  vN nU R                  (       a  UR                  X5      nU R                  XX#S5      $  N Nt N=7f)a  
watches information on multiple orders made by the user

https://docs.whitebit.com/private/websocket/#orders-pending

: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>`
Nz) watchOrders() requires a symbol argumentrN   orders:ordersPending_subscribeFTr   r   s	            rK   watch_orderswhitebit.watch_orders  s      >#DGG.Y$YZZ!!!!!!V$!&(*77VUZ\bcc??OOF2E00tTT 	"!
 dr   c                    U R                  US/ 5      nU R                  US5      nU R                  c-  U R                  U R                  SS5      n[	        U5      U l        U R                  nU R                  US5      nU R                  U R                  USU05      5      n	UR                  U	5        U	S   n
SU
-   nUR                  U R                  U5        g )	Nr^   r   ordersLimitrl   r   statusrN   r   )	rX   ordersrY   rC   r   parse_ws_orderr   rs   rt   )rI   rg   ru   r   r^   rw   rQ   ry   r   rx   rN   ra   s               rK   handle_orderwhitebit.handle_order  s    6 (B7vq);;%%dllM4HE07DK""61-$$T[[&7I%JKf!&(t{{K0rM   c           	      0   U R                  US5      nU R                  US5      nU R                  XB5      nU R                  US5      nU R                  U R                  US5      5      nU R                  US5      nU R                  US5      nU R                  US5      n	U R                  US5      n
U R                  US	5      nU R	                  U5      nS nS nUS:X  a  U R                  US5      nS
nO$U R                  US5      nU R                  US5      nU R                  US5      nU R                  US5      nUS   nU R                  US5      nUS:X  a  SOSnU R                  US5      nS nUb  U R                  U5      US   S.nS nUS:X  d  US:X  a  SnO![        R                  " US
5      (       a  SnOSnU R                  0 SU_SU_SU_SU_SU_SU R                  U5      _SU_S	U_S S _S!S _SU_SU_S"U
_S#U
_SU_S$U	_S%S _UUUUS S&.EU5      $ )'Nr   rW   rS   client_order_idr   
deal_stock
deal_moneyactivation_pricer   r   leftr   ctimemtimerN   r   r   sellbuydeal_feer   r   r   openclosedcanceledr   clientOrderIdr   r   lastTradeTimestamptimeInForcepostOnly	stopPricetriggerPricer   average)filled	remainingr   r   r   )rY   ro   rp   	omit_zeroparse_ws_order_typer   parse_numberr   string_equals
safe_orderr   )rI   r   rW   r   r`   rS   r  r   r  r   r  rawTyper   r   r  r   r  rN   rawSider   dealFeer   unifiedStatuss                          rK   r   whitebit.parse_ws_order0  s   . ""5(3##E84!!(3eT*t'7'7?P'QR  0!!%6|4$$U,>?	""5&1''0	8%%e\:FI((7I%%eX6F''w7	!00@!##E62!Q,vU""5*5))'2"7OC aKVq["M$$Y44 ( *  
E 
f 
 " 
 ]	 

  
 Y/ 
 !"4 
 D 
 4 
  
 D 
 U 
  
 I 
 f 
  D! 
" t# 
$ "#- 
. / 	rM   c           
      >    SSSSSSSSSS.	nU R                  X!U5      $ )NrQ   rW   )	r=   r>   2023r?   5r@   810)ro   )rI   r   statusess      rK   r  whitebit.parse_ws_order_type  s9    

 &99rM   c                   #    U R                  5       I Sh  vN   SnU R                  SSU5      u  p!SnSnUS:X  a  SnUS-  nOSnUS-  n[        U R                  R	                  5       5      nU R                  X4XQ5      I Sh  vN $  Nq N7f)a  
watch balance and get the amount of funds available for trading or funds locked in orders

https://docs.whitebit.com/private/websocket/#balance-spot
https://docs.whitebit.com/private/websocket/#balance-margin

:param dict [params]: extra parameters specific to the exchange API endpoint
:param str [params.type]: spot or contract if not provided self.options['defaultType'] is used
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
Nr   wallet:spotbalanceSpot_subscribebalanceMargin_subscribemargin)rV   handle_market_type_and_paramsr   
currenciesr   watch_private)rI   r^   r   ra   rc   r2  s         rK   watch_balancewhitebit.watch_balance  s      !!!99.$PVW6>,F6!K.F8#K$//..01
''ZPPP 	" Qs"   BBA,BB
B
Bc                 r   U R                  US5      nU R                  US5      nU R                  US5      nXPR                  S'   [        UR	                  5       5      nU R                  US5      nU R                  XW5      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        S	nUR                  S
5      S:  a  US-  nOUS-  nUR                  U R                  U5        g )Nrc   r^   r   r   	availablefreefreezeusedr,  Spotr-  r0  )
ro   rX   balancer   r   safe_currency_codeaccountsafe_balancer   rt   )rI   rg   ru   rc   rw   balanceDictr   
currencyId
rawBalancecoder>  ra   s               rK   handle_balancewhitebit.handle_balance  s    !!'84w1oodA.*VK$$&'__T1-
__[=
&&z2,,.**:{C**:x@$T((6;;v!#6!K8#Kt||[1rM   c                    #    U R                   S   S   nU R                  5       nUUUS.nU R                  Xt5      nU R                  XQX5      I S h  vN $  N7fNr&   r   r   )rB   r   r   watch	rI   ra   rc   rb   r^   r   rS   r   ru   s	            rK   rZ   whitebit.watch_public  sZ     iit$ZZ\

 ++g.ZZ'GGGGs   AAAAFc                 <  #    U R                  5       I S h  vN   U R                  S   S   nU R                  5       nU R                  U R                  U5      nS n	/ n
Uc[  0 nU R                  U5      nUS   nSX'   U/n
U(       a  U
/n
UUU
S.n	U R                  X5      nU R                  XaXU5      I S h  vN $ U R                  UR                  U0 5      nSnU R                  U5      nUS   nU R                  XS5      nU(       d  SX'   SnU(       a  U R                  XaXU5      I S h  vN $ / n[        UR                  5       5      nU(       a  U/nUUUS.nX(R                  ;   a  UR                  U	 U R                  XaUX+5      I S h  vN $  GN} N Nk N7f)Nr&   r   rS   Tr   F)rV   rB   r   rX   clientsrW   r   rH  subscriptions	safe_boolr   r   )rI   ra   rc   rN   isNestedr^   r   rS   rg   r   	marketIdsr   rW   r`   ru   hasSymbolSubscriptionisSubscribedmarketIdsNewresubRequests                      rK   r   $whitebit.watch_multiple_subscription  s    !!!iit$ZZ\s3	>!#L[[(Fd|H%)L"!
I&K	 #G
 kk'2GCg|TTT??6+?+?LL$(![[(Fd|H>>,%HL)-&(-%$!ZZ'<XXX  "#L$5$5$78$0>L$*&
 111,,V4!ZZ,]]]] 	"( U Y ^sH   FFBF6F7A5F,F-A!FFFFFFc                   #    U R                  5         U R                  5       I S h  vN   U R                  S   S   nU R                  5       nUUUS.nU R	                  Xt5      nU R                  XQX5      I S h  vN $  NW N7frG  )check_required_credentialsr   rB   r   r   rH  rI  s	            rK   r3  whitebit.watch_private  s     '')!!!iit$ZZ\

 ++g.ZZ'GGG 	" Hs"   $BA>AB9B :B Bc                 8  #    U R                  5         U R                  S   S   nSnU R                  U5      nUR                  S5      nU R	                  UR
                  U5      nUcm  U R                  5       I S h  vN nU R                  US5      nU R                  5       n	U	SUS/S.n
U	U R                  S.n U R                  X#XU5      I S h  vN   UI S h  vN $  Nc N! [         a(  nUR
                  U	 UR                  U5         S nAN;S nAff = f N=7f)	Nr&   r   authenticatedwebsocket_token	authorizepublicr   )rS   rc   )rW  rB   rg   reusableFuturerX   rM  "v4PrivatePostProfileWebsocketTokenro   r   handle_authenticaterH  	Exceptionreject)rI   r^   r   ra   rg   futurerZ  	authTokentokenrS   r   r   es                rK   r   whitebit.authenticate  s$    '')iit$%S!&&7(<(<kJ "EEGGI $$Y0ABEB%G 22"L!jj7VVV |3 H* W !((5a  ! sZ   A9D;C<=D:C# C!C# DDD!C# #
D-DDDDc                 F    UR                   S   nUR                  S5        U$ )NrZ  r   )r   rt   )rI   rg   ru   rc  s       rK   r`  whitebit.handle_authenticate=  s#     0qrM   c                    U R                  US5      n UbU  U R                  US5      nU R                  S-   U R                  U5      -   nU R	                  U R
                  S   S   XE5        U$ ! [         aT  n[        U[        5      (       a4  UR                  US5        SUR                  ;   a  UR                  S	  S nAg S nAU$ S nAff = f)NerrorrC   r   r<   rZ  F)rX   ro   rS   jsonthrow_exactly_matched_exceptionrE   ra  
isinstancer   rb  rM  )rI   rg   ru   rk  rC  feedbackrf  s          rK   handle_error_messagewhitebit.handle_error_messageE  s     1
	 ''877S=499W+==44T__T5J75SUYd   	!011a1"f&:&::,,_=	 2
 	s   AA. .
C8ACCc           
          U R                  X5      (       d  g U R                  US5      nUS:X  a  U R                  X5        g U R                  US5      nUb  U R	                  XU5        g U R
                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  S.	nU R                  US5      nU R                  XV5      nUb	  U" X5        g g )NresultpongrS   )	market_updatetrades_updatedepth_updatecandles_updateordersPending_updateordersExecuted_updatebalanceSpot_updatebalanceMargin_updatedeals_updaterc   )rq  ro   handle_pongrY   handle_subscription_statusr   r   r   rz   r   rD  r   rX   )rI   rg   ru   rt  rS   methodstopicrc   s           rK   handle_messagewhitebit.handle_message[  s     ((99!!'84VV-w->++FR@!//!// 22"//$($5$5%)%6%6"&"5"5$($7$7 11

 206# rM   c                    UR                   n[        UR                  5       5      n[        S[	        U5      5       HK  nXV   nUSLd  M  U R                  US5      nUc  M%  X:X  d  M,  U R                  US5      n	U	c  MC  U	" X5          g    g )Nr   TrS   rc   )rM  r   valuesrm   rn   rY   rX   )
rI   rg   ru   rS   subsr  rv   r   subIdrc   s
             rK   r  #whitebit.handle_subscription_status}  s     ##dkkm$q#f+&A!9L4')),=%EK!__\8DF)v/ 'rM   c                 0    U R                  5       Ul        U$ N)millisecondslastPong)rI   rg   ru   s      rK   r  whitebit.handle_pong  s    ++-rM   c                     SS/ S.$ )Nr   r;   r    )rI   rg   s     rK   r;   whitebit.ping  s    
 	
rM   )r<  r   r   r  )4__name__
__module____qualname____firstlineno__r   rH   strr	   r   r   re   r   rz   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   r   r   r   r  r   r4  rD  rZ   r   r3  r   r`  r   rq  r  r  r  r;   __static_attributes____classcell__)rJ   s   @rK   r   r      s~   0# 0d ?CQUdhqs H H H3 H^a Hx|  ~B  yC H>&6 &P @DB !S ! !S\ !<</ </|&
3 68 b bF b$ 6:" E7 E E:-F -^ <@d[] S SS S Sbfglbm S.',F ',R 37TX\eg UC Us URU Ulpqvlw U2,v ,8)V 04$UYbd U UC Us Uimnsit U2&16 &1PUn: *, Q Q2!2V !2F AC2 	H W\df /^b BDB H )+ !F& 6 t , $V  $D & 
6 
 
rM   r   )ccxt.async_supportccxt ccxt.async_support.base.ws.cacher   r   r   ccxt.base.typesr   r   r   r	   r
   r   r   r   r   r   r   !ccxt.async_support.base.ws.clientr   typingr   ccxt.base.errorsr   r   r   ccxt.base.preciser   async_supportr   r  rM   rK   <module>r     sH     f f l l l l 4  0 . ' %D
t!!** D
rM   