
    ei                         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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j        j                  ZdS )    N)
ArrayCacheArrayCacheBySymbolByIdArrayCacheByTimestamp)AnyBalancesBool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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
de+fd%Z,d
e
fd&Z-d
e
fd'Z.d
e
fd(Z/d
e
fd)Z0 xZ1S )+whitebitreturnc                 
   |                      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   describer:   r   r   )self	__class__s    O/var/www/html/volatility/venv/lib/python3.11/site-packages/ccxt/pro/whitebit.pyrG   zwhitebit.describe   s    h 5 5 > > @ @ $!%""&## $#).  5  ! !!!"
 
 $Q# " 	 '''0	 	K/C
 /C
 / / /	    r/   Nsymbol	timeframesincelimitc                   K   |                                   d{V  |                     |          }|d         }|                     | j        di           }|                     ||          }|d         }	d|z   }
|	|g}d}|                     |
|||           d{V }| j        r|                    ||          }|                     |||dd          S )	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
        NrL   r9   idcandles:candles_subscriber   T)	load_marketsmarket
safe_valuerB   safe_integerwatch_public
newUpdatesgetLimitfilter_by_since_limit)rH   rL   rM   rN   rO   paramsrU   r9   intervalmarketIdmessageHash	reqParamsmethodohlcvs                 rJ   watch_ohlcvzwhitebit.watch_ohlcvE   s       !!!!!!!!!V$$!__T\<DD
$$Z;;$<
 !6)x(	$''VYOOOOOOOO? 	2NN6511E))%q$GGGrK   clientc                 V   |                      |dg           }t          dt          |                    D ]}||         }|                     |d          }|                     |          }|d         }d|z   }	|                     ||          }
|| j        vr
i | j        |<   d| j        |         vr;|                     | j        dd          }t          |          }|| j        |         d<   | j        |         d         }|
                    |
           |                    ||	           |S )	Nr\   r      rL   rR   unknown
OHLCVLimit  )rV   rangelensafe_stringsafe_marketparse_ohlcvohlcvsrW   rB   r   appendresolve)rH   rd   messager\   idatar^   rU   rL   r_   parsedrO   storedrb   s                 rJ   handle_ohlcvzwhitebit.handle_ohlcvd   s3   & (B77q#f++&& 	/ 	/A!9D''a00H%%h//FH%F)F2K%%dF33Fdk))&(F#V!444))$,dKK.u5517F#I.K'	2ELL   NN5+....rK   c                   K   |                                   d{V  |                     |          }|d}d|d         z   }d}|                     | j        di           }|                     |dd          }|                     |d|          }	|                     |d          }|d	         ||	d
g}
|                     |||
|           d{V }|                                S )a4  
        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:rL   depth_subscriber   r8   0rQ   T)rT   rU   rV   rB   rl   omitrX   rO   )rH   rL   rO   r\   rU   r_   ra   rB   defaultPriceIntervalr8   r`   	orderbooks               rJ   watch_order_bookzwhitebit.watch_order_book   s
      !!!!!!!!!V$$=E'&*::"//$,0@"EE#//#NN((BVWW6?334L	
	 ++KFSSSSSSSS	   rK   c                    |                      |dg           }|                      |d          }|                     |d          }|                     |          }|d         }|                      |d          }|                     |d          }	|| j        vr|                                 }
|
| j        |<   | j        |         }|	|d<   |                     |	          |d<   |r,|                     ||          }|                    |           nf|                      |dg           }|                      |d	g           }| 	                    |d         |           | 	                    |d	         |           d
|z   }|
                    ||           d S )Nr\   r      rL      	timestampdatetimeasksbidsrz   )rV   rl   rm   safe_timestamp
orderbooks
order_bookiso8601parse_order_bookresethandle_deltasrq   )rH   rd   rr   r\   
isSnapshotr^   rU   rL   rt   r   obr   snapshotr   r   r_   s                   rJ   handle_order_bookzwhitebit.handle_order_book   s   L (B77__VQ//
##FA..!!(++!vq))''k::	$/))""B&(DOF#OF+	!*	+ $Y 7 7	* 	8,,T6::HOOH%%%%??444D??444Dy0$777y0$777'&0y+.....rK   c                     |                      |d          }|                      |d          }|                    ||           d S )Nr   r   )
safe_floatstore)rH   booksidedeltapriceamounts        rJ   handle_deltazwhitebit.handle_delta   sB    q))**uf%%%%%rK   c                 ~    t          dt          |                    D ]}|                     |||                    d S )Nr   )rj   rk   r   )rH   r   deltasrs   s       rJ   r   zwhitebit.handle_deltas   sH    q#f++&& 	3 	3Ahq	2222	3 	3rK   c                    K   |                                   d{V  |                     |          }|d         }d}d|z   }|                     |||d|           d{V S )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>`
        NrL   market_subscribeticker:F)rT   rU   watch_multiple_subscription)rH   rL   r\   rU   ra   r_   s         rJ   watch_tickerzwhitebit.watch_ticker   s       !!!!!!!!!V$$!#&(55k66SXZ`aaaaaaaaarK   symbolsc                 R  K   |                                   d{V  |                     |dd          }d}| j        d         d         }|                                 }g }g }t	          dt          |                    D ]V}|                     ||                   }	|                    d|	d         z              |                    |	d	                    W|||d
}
|                     ||| 	                    |
|          |           d{V  | 
                    | j        d|          S )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   rL   rQ   rQ   ra   r\   )rT   market_symbolsrA   noncerj   rk   rU   rp   watch_multipleextendfilter_by_arraytickers)rH   r   r\   ra   urlrQ   messageHashesargsrs   rU   requests              rJ   watch_tickerszwhitebit.watch_tickers  sG      !!!!!!!!!%%gtU;;#it$ZZ\\q#g,,'' 	& 	&A[[,,F  VH-=!=>>>KKt%%%%
 

 !!#}dkk'66R6RTabbbbbbbbb##DL(GDDDrK   c                 l   |                      |dg           }|                     |d          }|                     |d           }|d         }|                      |di           }d|z   }|                     ||          }	|	| j        |<   |                    |	|           t          |j                                                  }
t          dt          |
                    D ]R}|
|         }|                    d          dk    r/|                    |          dk    r|                    |	|           S|S )Nr\   r   rL   r   r   r   )rV   rl   rm   parse_tickerr   rq   listfutureskeysrj   rk   find)rH   rd   rr   r   r^   rU   rL   	rawTickerr_   tickerr   rs   currentMessageHashs                rJ   handle_tickerzwhitebit.handle_ticker   s9   ( //'8R88##GQ//!!(D11!OOGQ33	$v-""9f55%Vv{+++V^002233q#m,,-- 	; 	;A!.q!1!&&y11Q66;M;R;RSY;Z;Z^_;_;_ v'9:::rK   c                 ,  K   |                                   d{V  |                     |          }|d         }d|z   }d}|                     |||d|           d{V }| j        r|                    ||          }|                     |||dd          S )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>`
        NrL   trades:trades_subscribeFr   T)rT   rU   r   rY   rZ   r[   	rH   rL   rN   rO   r\   rU   r_   ra   tradess	            rJ   watch_tradeszwhitebit.watch_tradesO  s       !!!!!!!!!V$$!$v-#77VVUZ\bcccccccc? 	3OOFE22E))&%TRRRrK   c                 P   |                      |dg           }|                     |d          }|                     |          }|d         }|                      | j        |          }|5|                     | j        dd          }t          |          }|| j        |<   |                      |dg           }	|                     |	|          }
t          dt          |
                    D ]}|
                    |
|                    d|d         z   }|                    ||           d S )Nr\   r   rL   tradesLimitri   r   r   )rV   rl   rm   r   rW   rB   r   parse_tradesrj   rk   rp   rq   )rH   rd   rr   r\   r^   rU   rL   rv   rO   rt   parsedTradesjr_   s                rJ   handle_tradeszwhitebit.handle_tradesf  s$   2 (B77##FA..!!(++!f55>%%dlM4HHE&&F"(DKvq"--((v66q#l++,, 	+ 	+AMM,q/****&"22v{+++++rK   c                   K   |t          | j        dz             |                                  d{V  |                                  d{V  |                     |          }|d         }d|z   }d}|                     |||d|           d{V }| j        r|                    ||          }|                     ||||d          S )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 argumentrL   	myTrades:deals_subscribeT	r   rQ   rT   authenticaterU   r   rY   rZ   filter_by_symbol_since_limitr   s	            rJ   watch_my_tradeszwhitebit.watch_my_trades  s       >#DG.[$[\\\!!!!!!!!!!!!!!!!!!V$$!!F*"77VVUY[abbbbbbbb? 	3OOFE22E00tTTTrK   c                 H   |                      |d          }| j        0|                     | j        dd          }t	          |          | _        | j        }|                     |          }|                    |           |d         }d|z   }	|                    ||	           d S )Nr\   r   ri   rL   r   )rV   myTradesrW   rB   r   parse_ws_traderp   rq   )
rH   rd   rr   subscriptiontraderO   rv   ru   rL   r_   s
             rJ   handle_my_tradeszwhitebit.handle_my_trades  s    " 22= %%dlM4HHE&u--DM$$U++f!!F*v{+++++rK   c                    |                      |d          }|                     |d          }|                      |d          }|                      |d          }|                      |d          }|                      |d          }|                     ||          }d }	|                      |d          }
|
|
|d         d	}	|                     ||||                     |          |d
         |d d d ||d |	d|          S )N   r   r         r      quotecostcurrencyrL   )rQ   infor   r   rL   ordertypesidetakerOrMakerr   r   r   fee)rl   r   rm   
safe_trader   )rH   r   rU   orderIdr   rQ   r   r   r^   r   feeCosts              rJ   r   zwhitebit.parse_ws_trade  s,    ""5!,,''q11	eQ''  **!!%++##E1--!!(F33""5!,,"7O C "Y//X&  
  
   	rK   c                   K   |t          | j        dz             |                                  d{V  |                                  d{V  |                     |          }|d         }d|z   }d}|                     |||d|           d{V }| j        r|                    ||          }|                     ||||d          S )a0  
        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 argumentrL   orders:ordersPending_subscribeFTr   r   s	            rJ   watch_orderszwhitebit.watch_orders  s       >#DG.Y$YZZZ!!!!!!!!!!!!!!!!!!V$$!&(*77VVUZ\bcccccccc? 	3OOFE22E00tTTTrK   c                    |                      |dg           }|                      |d          }| j        0|                     | j        dd          }t	          |          | _        | j        }|                     |d          }|                     |                     |d|i                    }	|                    |	           |	d         }
d|
z   }|                    | j        |           d S )	Nr\   r   ordersLimitri   r   statusrL   r   )	rV   ordersrW   rB   r   parse_ws_orderr   rp   rq   )rH   rd   rr   r   r\   rt   rO   rv   r   ru   rL   r_   s               rJ   handle_orderzwhitebit.handle_order  s    6 (B77vq));%%dlM4HHE077DK""61--$$T[[&7I%J%JKKf!&(t{K00000rK   c           	         |                      |d          }|                     |d          }|                     ||          }|                     |d          }|                     |                     |d                    }|                     |d          }|                     |d          }|                     |d          }	|                     |d          }
|                     |d	          }|                     |          }d }d }|dk    r|                     |d          }d
}n,|                     |d          }|                     |d          }|                     |d          }|                     |d          }|d         }|                      |d          }|dk    rdnd}|                     |d          }d }||                     |          |d         d}d }|dk    s|dk    rd}nt          j        |d
          rd}nd}| 	                    i d|d|d|d|d|d| 
                    |          d|d	|d d d!d d|d|d"|
d#|
d|d$|	d%d ||||d d&|          S )'Nr   rU   rQ   client_order_idr   
deal_stock
deal_moneyactivation_pricer   r|   leftr   ctimemtimerL   r   r   sellbuydeal_feer   r   r   openclosedcanceledr   clientOrderIdr   r   lastTradeTimestamptimeInForcepostOnly	stopPricetriggerPricer   average)filled	remainingr   r   r   )rW   rl   rm   	omit_zeroparse_ws_order_typer   parse_numberr   string_equals
safe_orderr   )rH   r   rU   r   r^   rQ   r   r   r  r   r  rawTyper   r   r  r   r   rL   rawSider   dealFeer   unifiedStatuss                          rJ   r   zwhitebit.parse_ws_order0  sF   . ""5(33##E844!!(F33eT**t'7'7?P'Q'QRR  00!!%66|44$$U,>??	""5&11''00	8%%e\::FII((77I%%eX66F''w77	!00@@!##E622!Q,,vvU""5*55))'22"7O C aKKVq[["MM$Y44 + ( *  
E 
f 
 " 
 ]	 

  
 Y// 
 !"4 
 D 
 4 
  
 D 
 U 
  
 I 
 f 
  D! 
" t# 
$ "#- 
  
  
. /  	rK   c           
      H    dddddddddd	}|                      |||          S )NrO   rU   )	r<   r=   2023r>   5r?   810)rl   )rH   r   statusess      rJ   r  zwhitebit.parse_ws_order_type  sC    

 

 &&999rK   c                 ,  K   |                                   d{V  d}|                     dd|          \  }}d}d}|dk    rd}|dz  }nd}|dz  }t          | j                                                  }|                     ||||           d{V S )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)rT   handle_market_type_and_paramsr   
currenciesr   watch_private)rH   r\   r   r_   ra   r  s         rJ   watch_balancezwhitebit.watch_balance  s       !!!!!!!!!99.$PVWWf6>>,F6!KK.F8#K$/..0011
''VZPPPPPPPPPrK   c                    |                      |d          }|                     |d          }|                     |d          }|| j        d<   t          |                                          }|                     |d          }|                     ||          }|                     |          }	|                                 }
|                      |d          |
d<   |                      |d          |
d<   |
| j        |	<   |                     | j                  | _        d	}|                    d
          dk    r|dz  }n|dz  }|	                    | j        |           d S )Nra   r\   r   r   	availablefreefreezeusedr  Spotr  r  )
rl   rV   balancer   r   safe_currency_codeaccountsafe_balancer   rq   )rH   rd   rr   ra   rt   balanceDictr   
currencyId
rawBalancecoder(  r_   s               rJ   handle_balancezwhitebit.handle_balance  sM    !!'844w11oodA..*VK$$&&''__T1--
__[*==
&&z22,,..**:{CC**:x@@$T((66;;v!##6!KK8#Kt|[11111rK   c                    K   | j         d         d         }|                                 }|||d}|                     ||          }|                     ||||           d {V S Nr%   r   r   )rA   r   r   watch	rH   r_   ra   r`   r\   r   rQ   r   rr   s	            rJ   rX   zwhitebit.watch_public  sx      it$ZZ\\
 

 ++gv..ZZ[';GGGGGGGGGrK   Fc                 L  K   |                                   d {V  | j        d         d         }|                                 }|                     | j        |          }d }	g }
|gi }|                     |          }|d         }d||<   |g}
|r|
g}
|||
d}	|                     |	|          }|                     |||||           d {V S |                     |j        |i           }d}|                     |          }|d         }| 	                    ||d          }|sd||<   d}|r|                     |||	||           d {V S g }t          |                                          }|r|g}|||d}||j        v r|j        |= |                     |||||           d {V S )Nr%   r   rQ   Tr   F)rT   rA   r   rV   clientsrU   r   r1  subscriptions	safe_boolr   r   )rH   r_   ra   rL   isNestedr\   r   rQ   rd   r   	marketIdsr   rU   r^   rr   hasSymbolSubscriptionisSubscribedmarketIdsNewresubRequests                      rJ   r   z$whitebit.watch_multiple_subscription  s'     !!!!!!!!!it$ZZ\\s33	>!#L[[((Fd|H%)L"!
I (&K	 # G
 kk'622GCgv|TTTTTTTTT??6+?LLL$(![[((Fd|H>>,%HHL .)-X&(-%$ ^!ZZ['6<XXXXXXXXX  "#L$5$5$7$788 2$0>L$*& &
 V111,V4!ZZ[,P\]]]]]]]]]rK   c                 $  K   |                                   |                                  d {V  | j        d         d         }|                                 }|||d}|                     ||          }|                     ||||           d {V S r0  )check_required_credentialsr   rA   r   r   r1  r2  s	            rJ   r  zwhitebit.watch_private  s      '')))!!!!!!!!!it$ZZ\\
 

 ++gv..ZZ[';GGGGGGGGGrK   c                 L  K   |                                   | j        d         d         }d}|                     |          }|                    d          }|                     |j        |          }||                                  d {V }|                     |d          }|                                 }	|	d|dgd}
|	| j	        d}	 | 
                    |||
||           d {V  n4# t          $ r'}|j        |= |                    |           Y d }~nd }~ww xY w| d {V S )	Nr%   r   authenticatedwebsocket_token	authorizepublicr   )rQ   ra   )r>  rA   rd   reusableFuturerV   r5  "v4PrivatePostProfileWebsocketTokenrl   r   handle_authenticater1  	Exceptionreject)rH   r\   r   r_   rd   futurer@  	authTokentokenrQ   r   r   es                rJ   r   zwhitebit.authenticate  s}     '')))it$%S!!&&77(<kJJ "EEGGGGGGGGI $$Y0ABBEB% G 2" "L!jjk7KVVVVVVVVVV ! ! !(5a        ! ||||||s   
C* *
D4DDc                 J    |j         d         }|                    d           |S )Nr@  r   )r   rq   )rH   rd   rr   rI  s       rJ   rF  zwhitebit.handle_authenticate=  s'     0qrK   c                    |                      |d          }	 |^|                     |d          }| j        dz   |                     |          z   }|                     | j        d         d         ||           nY# t          $ rL}t          |t                    r-|	                    |d           d|j
        v r|j
        d= Y d }~dS Y d }~nd }~ww xY w|S )Nerrorr-   r   r;   r@  F)rV   rl   rQ   jsonthrow_exactly_matched_exceptionrD   rG  
isinstancer   rH  r5  )rH   rd   rr   rO  r-  feedbackrL  s          rJ   handle_error_messagezwhitebit.handle_error_messageE  s    11
	 ''887S=499W+=+==44T_T5J75SUY[cddd 	 	 	!011 a111"f&:::,_=uuuuu	    	 s   A A9 9
C<C

Cc           
         |                      ||          sd S |                     |d          }|dk    r|                     ||           d S |                     |d          }||                     |||           d S | j        | j        | j        | j        | j	        | j	        | j
        | j
        | j        d	}|                     |d          }|                     ||          }| |||           d S d S )NresultpongrQ   )	market_updatetrades_updatedepth_updatecandles_updateordersPending_updateordersExecuted_updatebalanceSpot_updatebalanceMargin_updatedeals_updatera   )rU  rl   handle_pongrW   handle_subscription_statusr   r   r   rw   r   r.  r   rV   )rH   rd   rr   rW  rQ   methodstopicra   s           rJ   handle_messagezwhitebit.handle_message[  s#    ((99 	F!!'844VVW---Fw-->++FGR@@@F!/!/ 2"/$($5%)%6"&"5$($7 1

 

 22%00F67##### rK   c                 8   |j         }t          |                                          }t          dt	          |                    D ]S}||         }|durE|                     |d          }|-||k    r'|                     |d          }	|	 |	||            d S Td S )Nr   TrQ   ra   )r5  r   valuesrj   rk   rW   rV   )
rH   rd   rr   rQ   subsrh  rs   r   subIdra   s
             rJ   rc  z#whitebit.handle_subscription_status}  s     #dkkmm$$q#f++&& 	 	A!!9L4'')),==%ERKK!__\8DDF)vw///	 	rK   c                 8    |                                  |_        |S N)millisecondslastPong)rH   rd   rr   s      rJ   rb  zwhitebit.handle_pong  s    ++--rK   c                     ddg dS )Nr   r:   r    )rH   rd   s     rJ   r:   zwhitebit.ping  s    
 
 	
rK   rl  )2__name__
__module____qualname__r   rG   strr	   r   r   rc   r   rw   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.  rX   r   r  r   rF  r   rU  rf  rc  rb  r:   __classcell__)rI   s   @rJ   r   r      s       0# 0 0 0 0 0 0d ?CQUdhqs H H H H3 H^a Hx|  ~B  yC H H H H>&6 & & & &P @DB ! !S ! !S\ ! ! ! !<</ </ </ </ </|& & &
3 3 3 68 b b bF b b b b$ 6:" E E7 E E E E E:-F - - - -^ <@d[] S S SS S Sbfglbm S S S S.',F ', ', ', ',R 37TX\eg U UC Us URU Ulpqvlw U U U U2, ,v , , , ,8) ) ) )V 04$UYbd U U UC Us Uimnsit U U U U2&1 &16 &1 &1 &1 &1PU U U Un: : : *, Q Q Q Q Q Q2!2V !2 !2 !2 !2F AC2 	H 	H 	H 	H W\df /^ /^ /^ /^b BDB H H H H )+ ! ! ! !F&    6 t    , $V  $  $  $  $D    &    
6 
 
 
 
 
 
 
 
rK   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   rp  rK   rJ   <module>r     s/       f f f f f f f f f f l l l l l l l l l l l l l l l l l l l l l l l l l l 4 4 4 4 4 4       0 0 0 0 0 0 . . . . . . ' ' ' ' ' ' % % % % % %D
 D
 D
 D
 D
t!* D
 D
 D
 D
 D
rK   