
    E#i}                         S SK rS SKJrJr  S SKrS SKJrJrJ	r	J
r
JrJrJrJrJrJrJr  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
\R4                  R6                  5      rg)    N)
ArrayCacheArrayCacheByTimestamp)AnyBoolIntMarket	OrderBookStringsTickerTickersFundingRateFundingRatesTrade)Client)List)ExchangeError)AuthenticationError)NotSupportedc                   B  ^  \ rS rSrS\4U 4S jjrS0 4S\S\4S jjrS0 4S\S\4S jjr	0 4S	\S\
4S
 jjr0 4S\\   S\4S jjr0 4S	\S\4S jjrS rS0 4S\S\4S jjrS\4S jrS*S\4S jjrS\4S jrS*S\S\S\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S0 4S	\S\S\S\\    4S jjr!SS0 4S\\   S\S\S\\    4S jjr"S r#S*S jr$S0 4S	\S\S\%4S  jjr&S0 4S\\   S\S\%4S! jjr'S" r(S# r)S$ r*S% r+S\4S& jr,S\S\-4S' jr.S( r/S)r0U =r1$ )+coinbaseinternational   returnc                   > U R                  [        [        U ]  5       0 SS_SS_SS_SS_SS_SS_SS	_S
S	_SS_SS	_SS	_SS	_SS	_SS_SS	_SS	_SS	_S	S	S	S	S	S	S.ESS0SS0S.SS0SSSSSSSSS S!.S".S#S$[        00S%.5      $ )&NwsTwatchTradeswatchTradesForSymbolswatchOrderBookwatchOrderBookForSymbolswatchTickerwatchBalanceFwatchMyTrades
watchOHLCVwatchOHLCVForSymbolswatchOrderswatchOrdersForSymbolswatchPositionswatchTickerscreateOrderWseditOrderWscancelOrderWs)cancelOrdersWscancelAllOrdersWsfetchOrderWsfetchOrdersWsfetchBalanceWsfetchMyTradesWsz&wss://ws-md.international.coinbase.comzwss://ws-md.n5e2.coinbase.com)apitestchannelLEVEL1  CANDLES_ONE_MINUTECANDLES_FIVE_MINUTESCANDLES_THIRTY_MINUTESCANDLES_ONE_HOURCANDLES_TWO_HOURSCANDLES_ONE_DAY)1m5m30m1h2h1d)r   tradesLimitordersLimitmyTradesLimit
timeframesexactzUnable to authenticate)hasurlsoptions
exceptions)deep_extendsuperr   describer   )self	__class__s    X/home/james-whalen/.local/lib/python3.13/site-packages/ccxt/pro/coinbaseinternational.pyrM   coinbaseinternational.describe   sw   &;T K Mdt ( !$	
 +D t    d ' u ( !%     u!"  #$ #(%* %!&"'#(/6 B 9	 x   $#!%.03,-+" ,.Ae7P
 7 7	    Nnamesymbolsc                 *  #    U R                  5       I Sh  vN   U R                  5         SnUnSnUc  U R                  5       n[        U5      n/ nUS:  aZ  U R	                  U5      n	U R                  U	5      n
U
n[        S[        U	5      5       H  nUR                  US-   X   -   5        M     O+US:X  a%  U R                  US   5      nUS-   US   -   nUS   /nU R                  S   S   nUc  [        U R                  S	-   5      e[        U R                  5       5      nXR                  -   S
-   U R                  -   nU R!                  U R#                  U5      U R%                  U R&                  5      [(        R*                  S5      nSU/UU R                  U R                  US.nUb  UUS'   US:  a+  U R-                  XU R/                  UU5      U5      I Sh  vN $ U R1                  XU R/                  UU5      U5      I Sh  vN $  GN N2 N	7f)a|  
@ignore
       subscribes to a websocket channel

       https://docs.cloud.coinbase.com/intx/docs/websocket-overview#subscribe

       :param str name: the name of the channel
       :param str[] [symbols]: unified market symbol
       :param dict [params]: extra parameters specific to the exchange API endpoint
       :returns dict: subscription to a websocket channel
       N   r   ::symbolidr1   r   ( is not supported in sandbox environmentCBINTLMDbase64	SUBSCRIBE)typechannelstimekey
passphrase	signatureproduct_ids)load_marketscheck_required_credentialsget_active_symbolslenmarket_symbols
market_idsrangeappendmarketrH   r   rY   strnonceapiKeypasswordhmacencodebase64_to_binarysecrethashlibsha256watch_multipleextendwatch)rN   rS   rT   paramsrm   messageHash
productIdssymbolsLengthmessageHashesparsedSymbols	marketIdsiurl	timestampauthrc   	subscribes                    rP   r   coinbaseinternational.subscribeM   s	     !!!'')
?--/GG1 //8M6I"J1c-01$$TD[=3C%CD 2 a[[,F+x(88K ,Jiit$;tww)SSTT

%	;;&3dmmCIIdkk$/1F1Ft{{1SU\UcUcemn	;;--"
	 !'1Im$1,,SYX^A_anoooZZ$++i2PR]^^^O 	"L p^s4   HHGHH*HHHHHc                   #    U R                  5       I Sh  vN   U R                  5         U R                  U5      (       a  U R                  nOU R	                  U5      n/ n/ n[        S[        U5      5       HO  nU R                  X&   5      nU R                  U5      nUR                  U5        UR                  US-   U-   5        MQ     U R                  S   S   n	U	c  [        U R                  S-   5      eU R                  U R                  5       5      n
XR                  -   S-   U R                   -   nU R#                  U R%                  U5      U R'                  U R(                  5      [*        R,                  S5      nS	U
UU/U R                  U R                   US
.nU R/                  XU R1                  X5      U5      I Sh  vN $  GN N7f)a  
@ignore
       subscribes to a websocket channel using watchMultiple

       https://docs.cloud.coinbase.com/intx/docs/websocket-overview#subscribe

       :param str name: the name of the channel
       :param string|str[] [symbols]: unified market symbol
       :param dict [params]: extra parameters specific to the exchange API endpoint
       :returns dict: subscription to a websocket channel
       Nr   rW   r1   r   rZ   r[   r\   r]   )r^   r`   rd   r_   ra   rb   rc   )re   rf   is_emptyrT   ri   rk   rh   	market_idrX   rl   rH   r   rY   number_to_stringsecondsrp   rq   rr   rs   rt   ru   rv   rw   rx   ry   )rN   rS   rT   r{   r   r}   r   marketIdrX   r   r   r   rc   r   s                 rP   subscribe_multiple(coinbaseinternational.subscribe_multiple   s     !!!'')==!!llG))'2G
q#g,'A~~gj1H[[*Fh'  v!56	 (
 iit$;tww)SSTT))$,,.9	;;&3dmmCIIdkk$/1F1Ft{{1SU\UcUcemn	%;;--"
	 ((T[[=[]jkkk9 	"8 ls"   GGF,GGGGrX   c                 z   #    U R                  5       I Sh  vN   U R                  SU/U5      I Sh  vN $  N  N7f)aD  
watch the current funding rate

https://docs.cloud.coinbase.com/intx/docs/websocket-channels#funding-channel

:param str symbol: unified market symbol
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
NRISK)re   r   )rN   rX   r{   s      rP   watch_funding_rate(coinbaseinternational.watch_funding_rate   s9      !!!^^FVHf=== 	"=s   ;7;9;;c                   #    U R                  5       I Sh  vN   U R                  SX5      I Sh  vN nU R                  US5      nU R                  (       a  0 nX5U'   U$ U R	                  U R
                  SU5      $  Nf NN7f)a  
watch the funding rate for multiple markets

https://docs.cloud.coinbase.com/intx/docs/websocket-channels#funding-channel

:param str[]|None symbols: list of unified market symbols
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a dictionary of `funding rates structures <https://docs.ccxt.com/#/?id=funding-rates-structure>`, indexe by market symbols
Nr   rX   )re   r   safe_string
newUpdatesfilter_by_arrayfundingRates)rN   rT   r{   fundingRaterX   results         rP   watch_funding_rates)coinbaseinternational.watch_funding_rates   s{      !!! 33FGLL!!+x8??F(6NM##D$5$5xII 	"Ls    BA=BA?AB?Bc                    #    U R                  5       I Sh  vN   SnU R                  USSS5      u  p2U R                  X1/U5      I Sh  vN $  N7 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.cloud.coinbase.com/intx/docs/websocket-channels#instruments-channel

:param str [symbol]: unified symbol of the market to fetch the ticker for
:param dict [params]: extra parameters specific to the exchange API endpoint
:param str [params.channel]: the channel to watch, 'LEVEL1' or 'INSTRUMENTS', default is 'LEVEL1'
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
Nr   r3   r4   )re   handle_option_and_paramsr   )rN   rX   r{   r3   s       rP   watch_ticker"coinbaseinternational.watch_ticker   sW      !!!77yZbc^^GXv>>> 	" ?s!   AA2A	A
AAc                     U R                   n/ n[        S[        U5      5       H3  nX   nU R                  U   nUS   (       d  M"  UR	                  U5        M5     U$ )Nr   active)rT   rk   rh   marketsrl   )rN   rT   outputr   rX   rm   s         rP   rg   (coinbaseinternational.get_active_symbols   sX    ,,q#g,'AZF\\&)Fhf%	 (
 rR   c                   #    U R                  5       I Sh  vN   SnU R                  USSS5      u  p2U R                  X1U5      I Sh  vN nU R                  (       a  0 nXEUS   '   U$ U R	                  U R
                  SU5      $  No 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.cloud.coinbase.com/intx/docs/websocket-channels#instruments-channel

:param str[] [symbols]: unified symbol of the market to fetch the ticker for
:param dict [params]: extra parameters specific to the exchange API endpoint
:param str [params.channel]: the channel to watch, 'LEVEL1' or 'INSTRUMENTS', default is 'INSTLEVEL1UMENTS'
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
Nr'   r3   r4   rX   )re   r   r   r   r   tickers)rN   rT   r{   r3   tickerr   s         rP   watch_tickers#coinbaseinternational.watch_tickers   s      !!!77PY[cd~~g????F'-6(#$M##DLL(GDD 	" @s!   B
B1B
B	>B
B
clientc                     U R                  U5      nU R                  US5      nUR                  X45        UR                  X4S-   US   -   5        g Nr3   rW   rX   )parse_ws_instrumentr   resolverN   r   messager   r3   s        rP   handle_instrument'coinbaseinternational.handle_instrument   sL    4 ))'2""7I6v'v~x0@@ArR   r   c           
      `   U R                  US5      nU R                  US5      nU R                  0 SU_SU R                  X2S5      _SU R                  U5      _SU_SS _S	S _S
S _SS _SS _SS _SS _SS _SS _SS _SS _SS _SS _S U R	                  USS5      U R	                  USS5      S.E5      $ )N
product_idr`   inforX   -r   datetimehighlowbid	bidVolumeask	askVolumevwapopencloselastpreviousClosechange
percentagetotal_24_hour_quantitytotal24_hour_quantitytotal_24_hour_volumetotal24_hour_volume)average
baseVolumequoteVolume)r   safe_tickersafe_symbol	parse8601safe_string_2)rN   r   rm   r   r   s        rP   r   )coinbaseinternational.parse_ws_instrument  sQ   l ##FL9##FF3 !
F!
d&&x=!
 1!
 	!

 D!
 4!
 4!
 !
 4!
 !
 D!
 D!
 T!
 D!
 T!
  d!!
" $#!
$ ,,V5MOfg--f6LNcd)!
  	rR   c                     U R                  U5      nU R                  US5      nUR                  X45        UR                  X4S-   US   -   5        g r   )parse_ws_tickerr   r   r   s        rP   handle_ticker#coinbaseinternational.handle_tickeri  sL    2 %%g.""7I6v'v~x0@@ArR   rm   c                    U R                  US5      nU R                  US5      nU R                  0 SU_SU R                  XB5      _SU R                  U5      _SU_SU R	                  US5      _S	U R	                  US
5      _SU R	                  US5      _SU R	                  US5      _SS _SS _SS _SS _SS _SS _SS _SS _SS _S S S S.E5      $ )Nr`   r   r   rX   r   r   r   	bid_pricer   bid_qtyr   	ask_pricer   ask_qtyr   r   r   r   r   r   r   r   r   )r   r   r   )r   r   r   r   safe_number)rN   r   rm   r   r   s        rP   r   %coinbaseinternational.parse_ws_ticker  s`    ##FF3##FL9 !
F!
d&&x8!
 1!
 	!

 4##FK8!
 ))&)<!
 4##FK8!
 ))&)<!
 D!
 4!
 D!
 T!
 D!
 d!
 $!
  t!!
" D#!
$ !)!
  	rR   r<   	timeframesincelimitc                 n  #    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	                  XrU5      nU R                  X/U5      I Sh  vN n	U R                  (       a  U	R                  X5      nU R                  XUSS5      $  N N<7f)aZ  
watches historical candlestick data containing the open, high, low, close price, and the volume of a market

https://docs.cdp.coinbase.com/intx/docs/websocket-channels#candles-channel

: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
NrX   rE   r   T)	re   rm   	safe_dictrI   r   r   r   getLimitfilter_by_since_limit)
rN   rX   r   r   r   r{   rm   rI   intervalohlcvs
             rP   watch_ohlcv!coinbaseinternational.watch_ohlcv  s      !!!V$!..|R@##G	BnnXx@@??NN61E))%q$GG 	"
 As"   B5B1AB56B37;B53B5c                    U R                  US5      nU R                  US5      nU R                  U5      nUS   nU R                  U5      nU R                  U R                  U0 5      U R                  U'   U R                  U R                  U   U5      c8  U R                  U R                  SS5      n[        U5      U R                  U   U'   U R                  U   U   n	U R                  US/ 5      n
[        S[        U
5      5       H)  nX   nU R                  X5      nU	R                  U5        M+     UR                  XS-   U-   5        g )	Nr3   r   rX   
OHLCVLimitr5   candlesr   rW   )r   safe_marketfind_timeframe
safe_valueohlcvssafe_integerrI   r   	safe_listrk   rh   parse_ohlcvrl   r   )rN   r   r   r|   r   rm   rX   r   r   storeddatar   tickparseds                 rP   handle_ohlcv"coinbaseinternational.handle_ohlcv  s0   & &&w	:##G\:!!(+!''4	"oodkk62FF??4;;v.	:B%%dllL$GE-B5-IDKK	*V$Y/~~gy"5q#d)$A7D%%d3FMM&! % 	vT1F:;rR   c                 F   #    U R                  U/X#U5      I Sh  vN $  N7f)a  
get the list of most recent trades for a particular symbol

https://docs.cloud.coinbase.com/intx/docs/websocket-channels#match-channel

:param str symbol: unified symbol of the market to fetch trades for
:param int [since]: timestamp in ms of the earliest trade to fetch
:param int [limit]: the maximum amount of trades to fetch
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
N)watch_trades_for_symbols)rN   rX   r   r   r{   s        rP   watch_trades"coinbaseinternational.watch_trades  s$      22F8U6RRRRs   !!c                 T  #    U R                  5       I Sh  vN   U R                  USSSS5      nU R                  SX5      I Sh  vN nU R                  (       a5  U R	                  US5      nU R                  US5      nUR                  Xs5      nU R                  XRUSS5      $  N N`7f)a  
get the list of most recent trades for a list of symbols
:param str[] symbols: unified symbol of the market to fetch trades for
:param int [since]: timestamp in ms of the earliest trade to fetch
:param int [limit]: the maximum amount of trades to fetch
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
NFTMATCHr   rX   r   )re   ri   r   r   r   r   r   r   )rN   rT   r   r   r{   tradesfirsttradeSymbols           rP   r   .coinbaseinternational.watch_trades_for_symbols  s      !!!%%gtUD$G..wHH??NN61-E**5(;KOOK7E))&TRR 	"Hs"   B(B$.B(B&AB(&B(c                    U R                  U5      nUS   nU R                  US5      nX@R                  ;  a6  U R                  U R                  SS5      n[        U5      nXpR                  U'   U R                  U   nUR                  U5        XR                  U'   UR                  X5        UR                  XS-   US   -   5        U$ )NrX   r3   rB   r5   rW   )parse_ws_trader   r   r   rI   r   rl   r   )	rN   r   r   traderX   r3   r   tradesArrayCachetradesArrays	            rP   handle_trade"coinbaseinternational.handle_trade	  s     ##G,x""7I6++%%%dllM4HE)%0"2KKkk&)5!)F{,{dNU8_$DErR   c                 F   U R                  USS5      nU R                  US5      nU R                  UU R                  US5      S U R                  U5      UU R	                  X25      S U R                  US5      S U R                  US5      U R                  US5      S S S.5      $ )	NrX   r   r`   match_idagressor_sidetrade_price	trade_qty)r   rY   orderr   r   rX   r^   sidetakerOrMakerpriceamountcostfee)r   r   
safe_trader   r   safe_string_lower)rN   r  rm   r   r   s        rP   r  $coinbaseinternational.parse_ws_trade%  s     %%eX|D##E62""5*51 &&x8**5/B %%e];&&uk: 
  	rR   c                 D   #    U R                  U/X#5      I Sh  vN $  N7f)a  
watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

https://docs.cloud.coinbase.com/intx/docs/websocket-channels#level2-channel

: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)watch_order_book_for_symbols)rN   rX   r   r{   s       rP   watch_order_book&coinbaseinternational.watch_order_bookD  s"      66xOOOOs     c                 v   #    U R                  5       I Sh  vN   U R                  SX5      I Sh  vN $  N N7f)a  
watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

https://docs.cloud.coinbase.com/intx/docs/websocket-channels#level2-channel

:param str[] symbols:
: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LEVEL2)re   r   )rN   rT   r   r{   s       rP   r  2coinbaseinternational.watch_order_book_for_symbolsQ  s7      !!!,,XwGGG 	"Gs   959799c                    U R                  US5      nU R                  US5      nU R                  U5      nU R                  US5      nU R                  US5      nXPR                  ;  a<  U R                  U R                  SS5      nU R                  0 U5      U R                  U'   U R                  U   n	US:X  a*  U R                  X%S SS	5      n
U	R                  U
5        XYS
'   O$U R                  US/ 5      nU R                  X5        U R                  US5      U	S'   XiS'   U R                  U5      U	S'   XR                  U'   UR                  XS-   U-   5        g )Nr^   r   r`   r3   watchOrderBookLimitr5   SNAPSHOTbidsasksrX   changessequencero   r   r   rW   )r   r   
orderbooksr   rI   
order_bookparse_order_bookresetr   handle_deltasr   r   )rN   r   r   r^   r   rX   r   r3   r   	orderbookparsedSnapshotr$  s               rP   handle_order_book'coinbaseinternational.handle_order_book_  sM   H 0##G\:!!(+##GV4""7I6//)%%dll4I4PE&*oob%&@DOOF#OOF+	:!227D&RXYNOON+"(hnnWi<Gy2!..w
C	' (*!%!9	+"+yD.6"9:rR   c                     U R                  US5      nUS:X  a  SOSnU R                  US5      nU R                  US5      nX   nUR                  XV5        g )Nr   buyr"  r#  rV      )r  
safe_floatstore)rN   r+  deltarawSider  r  r  booksides           rP   handle_delta"coinbaseinternational.handle_delta  sU    ((2!U*vq)*?u%rR   c                 d    [        S[        U5      5       H  nU R                  XU   5        M     g )Nr   )rk   rh   r7  )rN   r+  deltasr   s       rP   r*  #coinbaseinternational.handle_deltas  s)    q#f+&Ai3 'rR   c                     U$ N )rN   r   r   s      rP   handle_subscription_status0coinbaseinternational.handle_subscription_status  s	    2 rR   c                     U R                  US5      nU R                  U5      nX@R                  US   '   UR                  XCS-   US   -   5        g )Nr3   rX   rW   )r   parse_funding_rater   r   )rN   r   r   r3   r   s        rP   handle_funding_rate)coinbaseinternational.handle_funding_rate  sS    . ""7I6--g63>+h/0{dN[5J$JKrR   c                    U R                  US5      nUS:w  a  gU R                  US5      nU R                  US5      n U R                  S-   U-   U-   nU R                  U R                  S   XF5        U R	                  U R                  S   XF5        [        U5      e! [         a  nUR                  U5         S nAg	S nAff = f)
Nr^   REJECTFreasonr    rF   broadT)r   rY   throw_exactly_matched_exceptionrJ   throw_broadly_matched_exceptionr   	Exceptionreject)rN   r   r   r^   rG  errMsgfeedbackes           rP   handle_error_message*coinbaseinternational.handle_error_message  s     08!!'84!!'95	ww}v-6H001I6\001I6\)) 	MM!	s   AB 
C'B==Cc                    U R                  X5      (       a  g U R                  USS5      nU R                  U R                  U R                  U R
                  U R                  U R                  U R                  S.nU R                  US5      nUS:X  a  U R                  US5      n[        U5      eUR                  S5      S:  a  U R                  X5        U R                  XC5      nUb	  U" X5        g g )	Nr3    )SUBSCRIPTIONSINSTRUMENTSr4   r   r  FUNDINGr   r^   errorr   CANDLES)rQ  r   r?  r   r   r  r-  rC  r   findr   r   )rN   r   r   r3   methodsr^   errorMessagemethods           rP   handle_message$coinbaseinternational.handle_message  s    $$V55""7Ir:!<<11((&&,,//&&
 07?++GY?L--<<	"R'f.26# rR   r>  r=  )2__name__
__module____qualname____firstlineno__r   rM   rn   r
   r   r   r   r   r   r   r   r   r   rg   r   r   r   r   dictr   r   objectr   r   r   listr   r   r   r   r   r  r  r	   r  r  r-  r7  r*  r?  rC  r   rQ  r_  __static_attributes____classcell__)rO   s   @rP   r   r      s}   8# 8t =A 3_C 3_' 3_j FJRT (lS (l7 (lT <> >s >+ > DF Jc J, J& 68 ? ?F ?  6:" E7 E E*B B>M$ M^BF B<%f %f % %N ?CQUdhqs H H H3 H^a Hx|  ~B  yC H."<6 "<H <@d[] S SS S Sbfglbm S OSaenp Sd3i S S[^ Suyz  vA S$8> @DB PS P PS\ P SW_a H$s) HC Hfo H8;t&46L& L86 t .$ $rR   r   )ccxt.async_supportccxt ccxt.async_support.base.ws.cacher   r   rv   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   async_supportr   r>  rR   rP   <module>rr     sE     N  y y y y 4  * 0 )w$D..DD w$rR   