
    ":h                         d dl Zd dlmZmZmZ d dlmZmZm	Z	m
Z
mZmZmZmZmZmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d d	lmZ  G d
 dej6                  j8                        Zy)    N)
ArrayCacheArrayCacheBySymbolByIdArrayCacheByTimestamp)
AnyBalancesIntOrder	OrderBookStrStringsTickerTickersTrade)Client)List)AuthenticationError)ArgumentsRequired)
BadRequest)Precisec            
           e Zd Zdef fdZdddi fdedededee   fdZ	d	e
fd
Zdi fdededefdZd	e
fdZd Zd Zi fdedefdZdi fdedefdZd	e
fdZddi fdedededee   fdZd	e
fdZdddi fdedededee   fdZd)d	e
fdZd)dZdddi fdedededee   fdZd)d	e
fdZ d)dZ!d Z"i fde#fdZ$d	e
fdZ%g i fdZ&di fd Z'g i fd!Z(i fd"Z)d	e
fd#Z*d	e
fd$Z+d	e
fd%Z,d	e
fd&Z-d	e
fd'Z.d	e
fd(Z/ xZ0S )*whitebitreturnc                     | j                  t        t        |          ddddddddddd
dddiiddd	d
dddddd	ddidd| j                  iddt
        t
        t
        t        diid      S )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   describer9   r   r   )self	__class__s    K/var/www/html/turnos/venv/lib/python3.12/site-packages/ccxt/pro/whitebit.pyrF   zwhitebit.describe   s    h > @ $!%""&## $#). 5  ! !!!"
 $Q#" 		 '''0		K/C
 / /	    r.   Nsymbolsincelimitc                   K   | j                          d{    | j                  |      }|d   }| j                  | j                  di       }| j	                  ||      }|d   }	d|z   }
|	|g}d}| j                  |
|||       d{   }| j                  r|j                  ||      }| j                  |||dd      S 7 7 9w)	a  
        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
        NrK   r8   idcandles:candles_subscriber   T)	load_marketsmarket
safe_valuerA   safe_integerwatch_public
newUpdatesgetLimitfilter_by_since_limit)rG   rK   	timeframerL   rM   paramsrS   r8   intervalmarketIdmessageHash	reqParamsmethodohlcvs                 rI   watch_ohlcvzwhitebit.watch_ohlcvE   s      !!!V$!__T\\<D
$$Z;$<
 !6)x(	$''VYOO??NN651E))%q$GG! 	" Ps"   CB?A0CC8CCclientc                 "   | j                  |dg       }t        dt        |            D ]  }||   }| j                  |d      }| j	                  |      }|d   }d|z   }	| j                  ||      }
|| j                  vri | j                  |<   d| j                  |   vr:| j                  | j                  dd      }t        |      }|| j                  |   d<   | j                  |   d   }|j                  |
       |j                  ||	        |S )	Nr[   r      rK   rP   unknown
OHLCVLimit  )rT   rangelensafe_stringsafe_marketparse_ohlcvohlcvsrU   rA   r   appendresolve)rG   rc   messager[   idatar]   rS   rK   r^   parsedrM   storedra   s                 rI   handle_ohlcvzwhitebit.handle_ohlcvd   s   & (B7q#f+& 	/A!9D''a0H%%h/FH%F)F2K%%dF3Fdkk)&(F#V!44))$,,dK.u517F#I.KK'	2ELL NN5+.#	/$ rJ   c                   K   | j                          d{    | j                  |      }|d}d|d   z   }d}| j                  | j                  di       }| j	                  |dd      }| j	                  |d|      }	| j                  |d      }|d	   ||	d
g}
| j                  |||
|       d{   }|j                         S 7 7 w)a6  
        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:rK   depth_subscriber   r7   0rO   T)rR   rS   rT   rA   rk   omitrV   rM   )rG   rK   rM   r[   rS   r^   r`   rA   defaultPriceIntervalr7   r_   	orderbooks               rI   watch_order_bookzwhitebit.watch_order_book   s      !!!V$=E'&*::"//$,,0@"E#//#N((BVW6?34L	
	 ++KFSS	  # 	"  Ts"   CCBC/C0CCc                    | j                  |dg       }| j                  |d      }| j                  |d      }| j                  |      }|d   }| j                  |d      }| j                  |d      }	|| j                  vr| j                         }
|
| j                  |<   | j                  |   }|	|d<   | j                  |	      |d<   |r$| j                  ||      }|j                  |       nP| j                  |dg       }| j                  |d	g       }| j                  |d   |       | j                  |d	   |       d
|z   }|j                  ||       y )Nr[   r      rK      	timestampdatetimeasksbidsry   )rT   rk   rl   safe_timestamp
orderbooks
order_bookiso8601parse_order_bookresethandle_deltasrp   )rG   rc   rq   r[   
isSnapshotr]   rS   rK   rs   r   obr~   snapshotr   r   r^   s                   rI   handle_order_bookzwhitebit.handle_order_book   sM   L (B7__VQ/
##FA.!!(+!vq)''k:	$//)"B&(DOOF#OOF+	!*	+ $Y 7	*,,T6:HOOH%??44D??44Dy0$7y0$7'&0y+.rJ   c                 p    | j                  |d      }| j                  |d      }|j                  ||       y )Nr   r   )
safe_floatstore)rG   booksidedeltapriceamounts        rI   handle_deltazwhitebit.handle_delta   s0    q)*uf%rJ   c                 b    t        dt        |            D ]  }| j                  |||           y )Nr   )ri   rj   r   )rG   r   deltasrr   s       rI   r   zwhitebit.handle_deltas   s0    q#f+& 	3Ahq	2	3rJ   c                    K   | j                          d{    | j                  |      }|d   }d}d|z   }| j                  |||d|       d{   S 7 >7 w)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>`
        NrK   market_subscribeticker:F)rR   rS   watch_multiple_subscription)rG   rK   r[   rS   r`   r^   s         rI   watch_tickerzwhitebit.watch_ticker   sk      !!!V$!#&(55k66SXZ`aaa 	" bs!   AA9AAAAsymbolsc                   K   | j                          d{    | j                  |dd      }d}| j                  d   d   }| j                         }g }g }t	        dt        |            D ]A  }| j                  ||         }	|j                  d|	d   z          |j                  |	d	          C |||d
}
| j                  ||| j                  |
|      |       d{    | j                  | j                  d|      S 7 7 #w)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   rK   rO   rO   r`   r[   )rR   market_symbolsr@   nonceri   rj   rS   ro   watch_multipleextendfilter_by_arraytickers)rG   r   r[   r`   urlrO   messageHashesargsrr   rS   requests              rI   watch_tickerszwhitebit.watch_tickers  s     !!!%%gtU;#iit$ZZ\q#g,' 	&A[[,F  VH-=!=>KKt%	&
 

 !!#}dkk'66RTabbb##DLL(GDD# 	"  	cs"   DC>CDD "D Dc                    | j                  |dg       }| j                  |d      }| j                  |d       }|d   }| j                  |di       }d|z   }| j                  ||      }	|	| j                  |<   |j                  |	|       t        |j                  j                               }
t        dt        |
            D ]C  }|
|   }|j                  d      dk\  s|j                  |      dk\  s2|j                  |	|       E |S )Nr[   r   rK   r   r   r   )rT   rk   rl   parse_tickerr   rp   listfutureskeysri   rj   find)rG   rc   rq   r   r]   rS   rK   	rawTickerr^   tickerr   rr   currentMessageHashs                rI   handle_tickerzwhitebit.handle_ticker   s   ( //'8R8##GQ/!!(D1!OOGQ3	$v-""9f5%Vv{+V^^0023q#m,- 	;A!.q!1!&&y1Q6;M;R;RSY;Z^_;_ v'9:	; rJ   c                   K   | j                          d{    | j                  |      }|d   }d|z   }d}| j                  |||d|       d{   }| j                  r|j	                  ||      }| j                  |||dd      S 7 q7 9w)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>`
        NrK   trades:trades_subscribeFr   T)rR   rS   r   rW   rX   rY   	rG   rK   rL   rM   r[   rS   r^   r`   tradess	            rI   watch_tradeszwhitebit.watch_tradesO  s      !!!V$!$v-#77VVUZ\bcc??OOFE2E))&%TRR 	" ds!   BB9BB
8B
Bc                    | j                  |dg       }| j                  |d      }| j                  |      }|d   }| j                  | j                  |      }|7| j	                  | j
                  dd      }t        |      }|| j                  |<   | j                  |dg       }	| j                  |	|      }
t        dt        |
            D ]  }|j                  |
|           d|d   z   }|j                  ||       y )Nr[   r   rK   tradesLimitrh   r   r   )rT   rk   rl   r   rU   rA   r   parse_tradesri   rj   ro   rp   )rG   rc   rq   r[   r]   rS   rK   ru   rM   rs   parsedTradesjr^   s                rI   handle_tradeszwhitebit.handle_tradesf  s    2 (B7##FA.!!(+!f5>%%dllM4HE&F"(DKKvq"-((v6q#l+, 	+AMM,q/*	+&"22v{+rJ   c                   K   |t        | j                  dz         | j                          d{    | j                          d{    | j	                  |      }|d   }d|z   }d}| j                  |||d|       d{   }| j                  r|j                  ||      }| j                  ||||d      S 7 7 s7 ;w)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 argumentrK   	myTrades:deals_subscribeT	r   rO   rR   authenticaterS   r   rW   rX   filter_by_symbol_since_limitr   s	            rI   watch_my_tradeszwhitebit.watch_my_trades  s      >#DGG.[$[\\!!!!!!V$!!F*"77VVUY[abb??OOFE2E00tTT 	"!
 c3   .C B:C B<	9C B>8C <C >C c                 .   | j                  |d      }| j                  -| j                  | j                  dd      }t	        |      | _        | j                  }| j                  |      }|j                  |       |d   }d|z   }	|j                  ||	       y )Nr[   r   rh   rK   r   )rT   myTradesrU   rA   r   parse_ws_tradero   rp   )
rG   rc   rq   subscriptiontraderM   ru   rt   rK   r^   s
             rI   handle_my_tradeszwhitebit.handle_my_trades  s    " 2== %%dllM4HE&u-DM$$U+f!!F*v{+rJ   c                    | j                  |d      }| j                  |d      }| j                  |d      }| j                  |d      }| j                  |d      }| j                  |d      }| j                  ||      }d }	| j                  |d      }
|
|
|d   d	}	| j                  |||| j	                  |      |d
   |d d d ||d |	d|      S )N   r   r         r      quotecostcurrencyrK   )rO   infor   r   rK   ordertypesidetakerOrMakerr   r   r   fee)rk   r   rl   
safe_trader   )rG   r   rS   orderIdr   rO   r   r   r]   r   feeCosts              rI   r   zwhitebit.parse_ws_trade  s    ""5!,''q1	eQ'  *!!%+##E1-!!(F3""5!,"7OC "Y/X&  
  	rJ   c                   K   |t        | j                  dz         | j                          d{    | j                          d{    | j	                  |      }|d   }d|z   }d}| j                  |||d|       d{   }| j                  r|j                  ||      }| j                  ||||d      S 7 7 s7 ;w)a2  
        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 argumentrK   orders:ordersPending_subscribeFTr   r   s	            rI   watch_orderszwhitebit.watch_orders  s      >#DGG.Y$YZZ!!!!!!V$!&(*77VVUZ\bcc??OOFE2E00tTT 	"!
 dr   c                    | j                  |dg       }| j                  |d      }| j                  -| j                  | j                  dd      }t	        |      | _        | j                  }| j                  |d      }| j                  | j                  |d|i            }	|j                  |	       |	d   }
d|
z   }|j                  | j                  |       y )	Nr[   r   ordersLimitrh   r   statusrK   r   )	rT   ordersrU   rA   r   parse_ws_orderr   ro   rp   )rG   rc   rq   r   r[   rs   rM   ru   r   rt   rK   r^   s               rI   handle_orderzwhitebit.handle_order  s    6 (B7vq);;%%dllM4HE07DK""61-$$T[[&7I%JKf!&(t{{K0rJ   c           	         | j                  |d      }| j                  |d      }| j                  ||      }| j                  |d      }| j                  | j                  |d            }| j                  |d      }| j                  |d      }| j                  |d      }	| j                  |d      }
| j                  |d	      }| j	                  |      }d }d }|dk(  r| j                  |d      }d
}n$| j                  |d      }| j                  |d      }| j                  |d      }| j                  |d      }|d   }| j                  |d      }|dk(  rdnd}| j                  |d      }d }|| j                  |      |d   d}d }|dk(  s|dk(  rd}nt        j                  |d
      rd}nd}| j                  i d|d|d|d|d|d| j                  |      d|d	|d d d!d d|d|d"|
d#|
d|d$|	d%d ||||d d&|      S )'Nr   rS   rO   client_order_idr   
deal_stock
deal_moneyactivation_pricer   r{   leftr   ctimemtimerK   r   r   sellbuydeal_feer   r   r   openclosedcanceledr   clientOrderIdr   r   lastTradeTimestamptimeInForcepostOnly	stopPricetriggerPricer   average)filled	remainingr   r   r   )rU   rk   rl   	omit_zeroparse_ws_order_typer   parse_numberr   string_equals
safe_orderr   )rG   r   rS   r   r]   rO   r   r   r  r   r  rawTyper   r   r  r   r   rK   rawSider   dealFeer   unifiedStatuss                          rI   r   zwhitebit.parse_ws_order0  s   . ""5(3##E84!!(F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 ( *  
E 
f 
 " 
 ]	 

  
 Y/ 
 !"4 
 D 
 4 
  
 D 
 U 
  
 I 
 f 
  D! 
" t# 
$ "#- 
. / 	rJ   c           
      @    dddddddddd	}| j                  |||      S )NrM   rS   )	r;   r<   2023r=   5r>   810)rk   )rG   r   statusess      rI   r  zwhitebit.parse_ws_order_type  s;    

 &&99rJ   c                    K   | j                          d{    d}| j                  dd|      \  }}d}d}|dk(  rd}|dz  }nd}|dz  }t        | j                  j	                               }| j                  ||||       d{   S 7 s7 w)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)rR   handle_market_type_and_paramsr   
currenciesr   watch_private)rG   r[   r   r^   r`   r  s         rI   watch_balancezwhitebit.watch_balance  s      !!!99.$PVWf6>,F6!K.F8#K$//..01
''VZPPP 	" Qs"   BB
A.BBBBc                 v   | j                  |d      }| j                  |d      }| j                  |d      }|| j                  d<   t        |j	                               }| j                  |d      }| j                  ||      }| j                  |      }	| j                         }
| j                  |d      |
d<   | j                  |d      |
d<   |
| j                  |	<   | j                  | j                        | _        d	}|j                  d
      dk\  r|dz  }n|dz  }|j                  | j                  |       y )Nr`   r[   r   r   	availablefreefreezeusedr  Spotr  r  )
rk   rT   balancer   r   safe_currency_codeaccountsafe_balancer   rp   )rG   rc   rq   r`   rs   balanceDictr   
currencyId
rawBalancecoder(  r^   s               rI   handle_balancezwhitebit.handle_balance  s    !!'84w1oodA.*VK$$&'__T1-
__[*=
&&z2,,.**:{C**:x@$T((6;;v!#6!K8#Kt||[1rJ   c                    K   | j                   d   d   }| j                         }|||d}| j                  ||      }| j                  ||||       d {   S 7 wNr$   r   r   )r@   r   r   watch	rG   r^   r`   r_   r[   r   rO   r   rq   s	            rI   rV   zwhitebit.watch_public  sa     iit$ZZ\

 ++gv.ZZ[';GGGGs   AAAAFc                 $  K   | j                          d {    | j                  d   d   }| j                         }| j                  | j                  |      }d }	g }
|Zi }| j                  |      }|d   }d||<   |g}
|r|
g}
|||
d}	| j                  |	|      }| j                  |||||       d {   S | j                  |j                  |i       }d}| j                  |      }|d   }| j                  ||d      }|sd||<   d}|r| j                  |||	||       d {   S g }t        |j                               }|r|g}|||d}||j                  v r|j                  |= | j                  |||||       d {   S 7 q7 7 g7 w)Nr$   r   rO   Tr   F)rR   r@   r   rT   clientsrS   r   r1  subscriptions	safe_boolr   r   )rG   r^   r`   rK   isNestedr[   r   rO   rc   r   	marketIdsr   rS   r]   rq   hasSymbolSubscriptionisSubscribedmarketIdsNewresubRequests                      rI   r   z$whitebit.watch_multiple_subscription  s    !!!iit$ZZ\s3	>!#L[[(Fd|H%)L"!
I&K	 #G
 kk'62GCgv|TTT??6+?+?LL$(![[(Fd|H>>,%HL)-X&(-%$!ZZ['6<XXX  "#L$5$5$78$0>L$*&
 V111,,V4!ZZ[,P\]]]] 	"( U Y ^sH   FFBF4F
5A/F$F%AFFF
FFFc                   K   | j                          | j                          d {    | j                  d   d   }| j                         }|||d}| j	                  ||      }| j                  ||||       d {   S 7 Z7 wr0  )check_required_credentialsr   r@   r   r   r1  r2  s	            rI   r  zwhitebit.watch_private  s     '')!!!iit$ZZ\

 ++gv.ZZ[';GGG 	" Hs"   $BBAB<B=BBc                 8  K   | j                          | j                  d   d   }d}| j                  |      }|j                  d      }| j	                  |j
                  |      }|o| j                          d {   }| j                  |d      }| j                         }	|	d|dgd}
|	| j                  d}	 | j                  |||
||       d {    | d {   S 7 e7 # t        $ r(}|j
                  |= |j                  |       Y d }~:d }~ww xY w7 <w)	Nr$   r   authenticatedwebsocket_token	authorizepublicr   )rO   r`   )r>  r@   rc   futurerT   r5  "v4PrivatePostProfileWebsocketTokenrk   r   handle_authenticater1  	Exceptionreject)rG   r[   r   r^   rc   rD  r@  	authTokentokenrO   r   r   es                rI   r   zwhitebit.authenticate  s(    '')iit$%S!/(<(<kJ "EEGGI $$Y0ABEB%G 22"L!jjk7KVVV |3 H* W !((5a  ! sZ   A8D:C ;=D9C$ C"C$ DDD"C$ $	D-DDDDc                 F    |j                   d   }|j                  d       |S )Nr@  r   )r   rp   )rG   rc   rq   rD  s       rI   rF  zwhitebit.handle_authenticate=  s#     0qrJ   c                    | j                  |d      }	 |V| j                  |d      }| j                  dz   | j                  |      z   }| j	                  | j
                  d   d   ||       |S # t        $ rM}t        |t              r2|j                  |d       d|j                  v r|j                  d= Y d }~yY d }~|S d }~ww xY w)Nerrorr-   r   r:   r@  F)rT   rk   rO   jsonthrow_exactly_matched_exceptionrC   rG  
isinstancer   rH  r5  )rG   rc   rq   rN  r-  feedbackrK  s          rI   handle_error_messagezwhitebit.handle_error_messageE  s     1
	 ''877S=499W+==44T__T5J75SUY[cd   	!01a1"f&:&::,,_=	 2
 	s   AA. .	C7=B??Cc           
         | j                  ||      sy | j                  |d      }|dk(  r| j                  ||       y | j                  |d      }|| j	                  |||       y | j
                  | j                  | j                  | j                  | j                  | j                  | j                  | j                  | j                  d	}| j                  |d      }| j                  ||      }|
 |||       y y )NresultpongrO   )	market_updatetrades_updatedepth_updatecandles_updateordersPending_updateordersExecuted_updatebalanceSpot_updatebalanceMargin_updatedeals_updater`   )rT  rk   handle_pongrU   handle_subscription_statusr   r   r   rv   r   r.  r   rT   )rG   rc   rq   rV  rO   methodstopicr`   s           rI   handle_messagezwhitebit.handle_message[  s     ((9!!'84VVW-w->++FGR@!//!// 22"//$($5$5%)%6%6"&"5"5$($7$7 11

 2%067# rJ   c                 
   |j                   }t        |j                               }t        dt	        |            D ]F  }||   }|dus| j                  |d      }|"||k(  s(| j                  |d      }	|	= |	||        y  y )Nr   TrO   r`   )r5  r   valuesri   rj   rU   rT   )
rG   rc   rq   rO   subsrg  rr   r   subIdr`   s
             rI   rb  z#whitebit.handle_subscription_status}  s     ##dkkm$q#f+& 	A!!9L4')),=%ERK!__\8DF)vw/	rJ   c                 0    | j                         |_        |S N)millisecondslastPong)rG   rc   rq   s      rI   ra  zwhitebit.handle_pong  s    ++-rJ   c                     ddg dS )Nr   r9   r    )rG   rc   s     rI   r9   zwhitebit.ping  s    
 	
rJ   rk  )1__name__
__module____qualname__r   rF   strr   r   r   rb   r   rv   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r	   r   r   r   r  r   r  r.  rV   r   r  r   rF  rT  re  rb  ra  r9   __classcell__)rH   s   @rI   r   r      s`   0# 0d 8<$]ajl H HC HWZ Hquvzq{ 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 , $V  $D & 
6 
rJ   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   !ccxt.async_support.base.ws.clientr   typingr   ccxt.base.errorsr   r   r   ccxt.base.preciser   async_supportr   ro  rJ   rI   <module>r~     sE     f f f f f 4  0 . ' %D
t!!** D
rJ   