
    !:h:                         d dl mZ d dlmZ d dlZd dl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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 d dlm Z   G d dee      Z!y)    )Exchange)ImplicitAPIN)AnyBalancesBoolIntMarketNumOrder	OrderBook	OrderSide	OrderTypeStrStringsTickerTickersTrade)List)ExchangeError)
BadRequest)InsufficientFunds)InvalidOrder)	TICK_SIZE)Precisec                   H    e Zd Zdef fdZi fdee   fdZdefdZde	fdZ
i fde	fdZdi fded	edefd
Zd3dededefdZdi fdedefdZi fdedefdZd3dededefdZddi fdeded	edee   fdZd3dedefdZdddi fdeded	edee   fdZd4ded	edefdZdi fdedede de!de"f
dZ#di fdede$fd Z%dddi fde$ded	edee&   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)d3d%edede&fd&Z*dddi fde$ded	efd'Z+d( Z,d)d*i ddfd+Z-d,e.d-ed.ed/ed0ed1efd2Z/ xZ0S )5btcturkreturnc                    | j                  t        t        |          dddgddi ddddd	dd
dddddddddddddddddddddddddddi ddddddddddddddddd dd!dd"dd#dd$dd%dd&dd'dd(di d)dd*dd+dd,dd-dd.dd/dd0dd1dd2dd3dd4dd5dd6dd7dd8dd9ddddd:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLd;dMd;d;d;dNid;d;d;d;dOd;d;d;d;dPdQd;idRdLd;d;dSidHdddd dddd dddddTddddddddUd dddVd=ddWd dd ddddXddYdVd=ddddZd d[d id\	d d d]d d d]d^d_| j	                  d`      | j	                  da      dbidct
        t        t        ddit        de      S )fNr   BTCTurkTRd   FCORSTspotmarginswapfutureoption	addMargincancelOrdercloseAllPositionsclosePositioncreateDepositAddresscreateOrdercreateReduceOnlyOrderfetchBalancefetchBorrowRateHistoriesfetchBorrowRateHistoryfetchCrossBorrowRatefetchCrossBorrowRatesfetchDepositAddressfetchDepositAddressesfetchDepositAddressesByNetworkfetchFundingHistoryfetchFundingRatefetchFundingRateHistoryfetchFundingRatesfetchIndexOHLCVfetchIsolatedBorrowRatefetchIsolatedBorrowRatesfetchLeveragefetchMarginModefetchMarketsfetchMarkOHLCVfetchMyTrades
fetchOHLCVfetchOpenInterestHistoryfetchOpenOrdersfetchOrderBookfetchOrdersfetchPositionfetchPositionHistoryfetchPositionModefetchPositionsfetchPositionsForSymbolfetchPositionsHistoryfetchPositionsRiskfetchPremiumIndexOHLCVfetchTickerfetchTickersfetchTradesreduceMarginsetLeverage)setMarginModesetPositionModews         <      z1 dz1 wz1 y)1m15m30m1h4h1d1w1yzOhttps://github.com/user-attachments/assets/10e0a238-9f60-4b06-9dda-edfc7602f1d6zhttps://api.btcturk.com/api/v2zhttps://api.btcturk.com/api/v1z https://graph-api.btcturk.com/v1)publicprivategraphzhttps://www.btcturk.comz,https://github.com/BTCTrader/broker-api-docs)logoapiwwwdocgetg?)	orderbooktickertradesohlczserver/exchangeinfo)zusers/balances
openOrders	allOrderszusers/transactions/trade)zusers/transactions/cryptozusers/transactions/fiatorderr)   rs   )rl   postdelete)ohlcszklines/history)IOCFOKPOGTD)
marginModetriggerPricetriggerPriceTypetriggerDirectionstopLossPricetakeProfitPriceattachedStopLossTakeProfittimeInForcehedgedleveragemarketBuyRequiresPricemarketBuyByCostselfTradePreventiontrailingicebergi )r{   limitdaysBack	untilDayssymbolRequired)r{   r   triggerr   r     )r{   r   r   r   r   r   r   r   )	sandboxr-   createOrdersrB   
fetchOrderrE   rG   fetchClosedOrdersrC   )linearinverse)r#   r%   r&   tradingz0.0005z0.0009)makertakerexact)FAILED_ORDER_WITH_OPEN_ORDERSFAILED_LIMIT_ORDERFAILED_MARKET_ORDER)idname	countries	rateLimitprohas
timeframesurlsri   featuresfees
exceptionsprecisionMode)deep_extendsuperr   describeparse_numberr   r   r   )self	__class__s    F/var/www/html/turnos/venv/lib/python3.12/site-packages/ccxt/btcturk.pyr   zbtcturk.describe   s   gt = ?777 %7 	7
 %7 %7 U7 t7 $U7  7 '7 t7 (7 7 +E7  )%!7" '#7$ (%7& &u'7( ()7* 1%+7, &u-7. #E/70 *5172 $U374 "5576 *5778 +E97:  ;7< "5=7> ?7@ !%A7B  C7D dE7F +EG7H "4I7J !$K7L tM7N  O7P 'Q7R $US7T !%U7V *5W7X (Y7Z %e[7\ )%]7^ t_7` a7b tc7d e7f ug7h "'#(m7r 	 j>??
 1E	 %&"%"# !/0 +,&'%&45	 6734!"'(	  $ !"*+7!H  %&+(,,0,1).+06:#(#("'#(	( #($)27+0/4$)#()$, %)&+!$$*%'*.& #'&+!%#($)*.( ',!%$*%'#($)*.$ *.#e5n ##
 ##w?B !..x8!..x8 5F*6+7 'CBB
 B B	    c                     | j                  |      }| j                  |di       }| j                  |dg       }| j                  |      S )a  
        retrieves data on all markets for btcturk

        https://docs.btcturk.com/public-endpoints/exchange-info

        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict[]: an array of objects representing market data
        datasymbols)publicGetServerExchangeinfo	safe_dict	safe_listparse_markets)r   paramsresponser   marketss        r   fetch_marketszbtcturk.fetch_markets   sL     33F;X ~~h3..y"5!!'**r   c                    | j                  |d      }| j                  |d      }| j                  |d      }| j                  |      }| j                  |      }| j                  |dg       }d }d }	d }
d }d }t        dt	        |            D ]y  }||   }| j                  |d      }|dk(  s | j                  |d      }| j                  |d	      }	| j                  |d
      }
| j                  |d      }| j                  |d      }{ | j                  |d      }i d|d|dz   |z   d|d|dd d|d|dd ddddddddddddd|d k(  d!dd"d d d d d d d | j                  | j                  | j                  |d#                  | j                  | j                  | j                  |d$                  d%d d d&|
|d&||	d&|d d&d'd |d(
S ))Nr   	numeratordenominatorfiltersr   
filterTypePRICE_FILTERminPricemaxPrice	minAmount	maxAmountminExchangeValuestatusr   symbol/basequotesettlebaseIdquoteIdsettleIdtyper#   Tr$   Fr%   r&   r'   activeTRADINGcontractr   numeratorScaledenominatorScale)amountprice)minmax)r   r   r   cost)
r   contractSizeexpiryexpiryDatetimestrike
optionType	precisionlimitscreatedinfo)safe_stringsafe_currency_coder   rangelensafe_numberr   parse_precision)r   entryr   r   r   r   r   r   r   r   r   r   minCostjfilterr   r   s                    r   parse_marketzbtcturk.parse_market  s   eV,!!%5""5-8&&v.''0..	26		q#g,' 	GAQZF))&,?J^+++FJ?++FJ? ,,V[A	 ,,V[A	**63EF	G !!%20
"0
dSj5(0
 D0
 U	0

 d0
 f0
 w0
 0
 F0
 D0
 e0
 E0
 e0
 e0
 v*0
  !0
" d#0
$  "++D,@,@AQAQRWYiAj,kl**4+?+?@P@PQVXj@k+lm  
 %$
 $#
 #$ _0
 0	
r   c                    | j                  |dg       }|d d d}t        dt        |            D ]~  }||   }| j                  |d      }| j	                  |      }| j                         }| j                  |d      |d<   | j                  |d      |d<   | j                  |d      |d	<   |||<    | j                  |      S )
Nr   )r   	timestampdatetimer   assetbalancetotalfreelockedused)r   r   r   r   r   accountsafe_balance)	r   r   r   resultir   
currencyIdcoder   s	            r   parse_balancezbtcturk.parse_balance\  s    ~~h3

 q#d)$ 	#AGE))%9J**:6DllnG#//yAGG"..uf=GFO"..uh?GFO"F4L	#   ((r   c                 f    | j                          | j                  |      }| j                  |      S )af  
        query for balance and get the amount of funds available for trading or funds locked in orders

        https://docs.btcturk.com/private-endpoints/account-balance

        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
        )load_marketsprivateGetUsersBalancesr   )r   r   r   s      r   fetch_balancezbtcturk.fetch_balancen  s3     	//7" !!(++r   Nr   r   c           	         | j                          | j                  |      }d|d   i}| j                  | j                  ||            }| j	                  |di       }| j                  |d      }| j                  ||d   |dddd	      S )
a1  
        fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

        https://docs.btcturk.com/public-endpoints/orderbook

        :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
        
pairSymbolr   r   r   r   bidsasksr   rX   )r   marketpublicGetOrderbookextendr   safe_integerparse_order_book)	r   r   r   r   r  requestr   r   r   s	            r   fetch_order_bookzbtcturk.fetch_order_book  s     	V$&,
 **4;;w+GH ~~h3%%dK8	$$T6(+;YPVXY[\]]r   rn   r  c                 p   | j                  |d      }| j                  ||      }|d   }| j                  |d      }| j                  |d      }| j                  i d|d|d| j	                  |      d| j                  |d      d| j                  |d      d| j                  |d      d	d d
| j                  |d
      dd dd d| j                  |d      d|d|dd d| j                  |d      d| j                  |d      d| j                  |d      | j                  |d      d |d|      S )Npairr   r   lastr   highlowbid	bidVolumeask	askVolumevwapopenclosepreviousClosechangedaily
percentagedailyPercentaveragevolume)
baseVolumequoteVolumer   )r   safe_marketr
  safe_tickeriso8601)r   rn   r  marketIdr   r   r  s          r   parse_tickerzbtcturk.parse_ticker  s   * ##FF3!!(F3!%%fk:	/ !
f!
!
 Y/!
 D$$VV4	!

 4##FE2!
 4##FE2!
 !
 4##FE2!
 !
 D!
 D$$VV4!
 T!
 D!
 T!
 d&&vw7!
  $**6>B!!
" t''	:#!
$ **68<)!
* + 	r   r   c                     | j                          | j                  |      }| j                  |d      }| j                  ||      S )a  
        fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

        https://docs.btcturk.com/public-endpoints/ticker

        :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
        r   )r   publicGetTickerr   parse_tickers)r   r   r   r   tickerss        r   fetch_tickerszbtcturk.fetch_tickers  sC     	''/..62!!'733r   c                 l    | j                          | j                  |g|      }| j                  ||      S )a  
        fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

        https://docs.btcturk.com/public-endpoints/ticker

        :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>`
        )r   r,  
safe_value)r   r   r   r+  s       r   fetch_tickerzbtcturk.fetch_ticker  s5     	$$fXv6w//r   tradec                 J   | j                  |dd      }| j                  |dd      }| j                  |d      }| j                  |d      }t        j                  | j                  |d            }| j                  |d      }| j                  ||      }	| j                  |d	d
      }
d }| j                  |d      }|9| j                  |d      }t        j                  |      | j                  |      d}| j                  ||||| j                  |      |	d |
d ||d |d|      S )Ndater   tidr   orderIdr   r   r  side	orderTypefeedenominatorSymbol)r   currency)r   r   rs   r   r   r   r   r5  takerOrMakerr   r   r   r7  )	safe_integer_2safe_string_2r   r   
string_abssafe_symbolr   
safe_trader%  )r   r0  r  r   r   rs   priceStringamountStringr&  r   r5  r7  feeAmountStringfeeCurrencys                 r   parse_tradezbtcturk.parse_trade  sE   : ''v{C	ud3  	2&&ug6))$*:*:5(*KL##E62!!(F3!!%=**5%8&**52EFK**?; 33K@C "Y/  " 
  	r   sincec                     | j                          | j                  |      }d|d   i}|||d<   | j                  | j                  ||            }| j	                  |d      }| j                  ||||      S )a  
        get the list of most recent trades for a particular symbol

        https://docs.btcturk.com/public-endpoints/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 Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
        r  r   r  r   )r   r  publicGetTradesr	  r   parse_trades	r   r   rE  r   r   r  r  r   r   s	            r   fetch_tradeszbtcturk.fetch_trades6  s     	V$ &,
 #GFO''GV(DE$ ~~h/  vue<<r   c           	          | j                  |d      | j                  |d      | j                  |d      | j                  |d      | j                  |d      | j                  |d      gS )Nr   r  r  r  r  r   )safe_timestampr   )r   ohlcvr  s      r   parse_ohlcvzbtcturk.parse_ohlcv_  sn     {3UF+UF+UE*UG,UH-
 	
r   r`   c                    | j                          | j                  |      }|d   | j                  | j                  ||      d}| j	                  |d| j                               }| j                  |dz        |d<   || j                  |dz        |d<   n|d}|t        |d      }|d	k(  rt        | j                  d
z         | j                  |      }	|	|dz
  z  }
|*| j                  |dz        |
z   }t        |d   |      |d<   n| j                  d      |
z
  |d<   | j                  | j                  ||            }| j                  |||||      S )a  
        fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market

        https://docs.btcturk.com/public-endpoints/get-kline-data

        :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
        :param int [params.until]: timestamp in ms of the latest candle to fetch
        :returns int[][]: A list of candles ordered, open, high, low, close, volume
        r   )r   
resolutionuntilr   tofromr!   i*  rd   zF fetchOHLCV() does not accept a limit parameter when timeframe == "1y"rX   g        )r   r  r.  r   r
  millisecondsparse_to_intr   r   r   parse_timeframegraphGetKlinesHistoryr	  parse_ohlcvs)r   r   	timeframerE  r   r   r  r  rQ  secondslimitSecondsrR  r   s                r   fetch_ohlcvzbtcturk.fetch_ohlcvs  so    	V$Tl//$//9iP
 !!&'43D3D3FG))54<9"//=GFO]Eu%ED  +s!stt**95G"eai0L &&ut|4|C #GDM2 6"&"3"3H"="L--dkk'6.JKH   69eUKKr   tailc           
         g }| j                  |dg       }| j                  |dg       }	| j                  |dg       }
| j                  |dg       }| j                  |dg       }| j                  |dg       }t        dt        |            D ]  }| j                  ||      | j	                  |	|      | j	                  |
|      | j	                  ||      | j	                  ||      | j	                  ||      d}|j                  | j                  ||              | j                  |d      }| j                  |||d|      S )	Ntholcvr   )r   r  r  r  r  r   )	r   r   r   r
  r   appendrN  sort_byfilter_by_since_limit)r   ohlcvsr  rY  rE  r   r]  resultsr   r  r  r  r  r   r   rM  sorteds                    r   rX  zbtcturk.parse_ohlcvs  s:   NN633	~~fc2.~~fc2.nnVS"-vsB/R0q#i.) 		<A!..y!<((q1((q1''Q/))%3**615E NN4++E6:;		< gq)))&%4HHr   r   r5  r   r   c                 ~   | j                          | j                  |      }|||d   | j                  ||      d}|dk7  r| j                  ||      |d<   d|v r	|d   |d<   nd|vr| j	                         |d<   | j                  | j                  ||            }	| j                  |	d      }
| j                  |
|      S )a  
        create a trade order

        https://docs.btcturk.com/private-endpoints/submit-order

        :param str symbol: unified symbol of the market to create an order in
        :param str type: 'market' or 'limit'
        :param str side: 'buy' or 'sell'
        :param float amount: how much of currency you want to trade in units of base currency
        :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
        r   )r6  orderMethodr  quantityr  r   clientOrderIdnewClientOrderIdr   )	r   r  amount_to_precisionprice_to_precisionuuidprivatePostOrderr	  r   parse_order)r   r   r   r5  r   r   r   r  r  r   r   s              r   create_orderzbtcturk.create_order  s     	V$ ,00@	
 8#66vuEGGf$*0*AG&'$.*.))+G&'((Wf)EF~~h/f--r   r   c                 r    d|i}| j                  | j                  ||            }| j                  d|i      S )au  
        cancels an open order

        https://docs.btcturk.com/private-endpoints/cancel-order

        :param str id: order id
        :param str symbol: not used by btcturk cancelOrder()
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
        r   r   )privateDeleteOrderr	  
safe_order)r   r   r   r   r  r   s         r   cancel_orderzbtcturk.cancel_order  sJ     "
 **4;;w+GH H 
  	r   c                 \   | j                          i }d}|| j                  |      }|d   |d<   | j                  | j                  ||            }| j	                  |di       }| j                  |dg       }	| j                  |dg       }
| j                  | j                  |	|
      |||      S )a	  
        fetch all unfilled currently open orders

        https://docs.btcturk.com/private-endpoints/open-orders

        :param str symbol: unified market symbol
        :param int [since]: the earliest time in ms to fetch open orders for
        :param int [limit]: the maximum number of  open orders structures to retrieve
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
        Nr   r  r   r  r  )r   r  privateGetOpenOrdersr	  r   r   parse_ordersarray_concat)r   r   rE  r   r   r  r  r   r   r  r  s              r   fetch_open_orderszbtcturk.fetch_open_orders  s     	[[(F$*4LGL!,,T[[&-IJ~~h3~~dFB/~~dFB/  !2!24!>uUUr   c                 :   | j                          | j                  |      }d|d   i}|||d<   |$t        t        j                  |dz              |d<   | j                  | j                  ||            }| j                  |d      }| j                  ||||      S )a-  
        fetches information on multiple orders made by the user

        https://docs.btcturk.com/private-endpoints/all-orders

        :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 Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
        r  r   r  r   	startTimer   )	r   r  intmathfloorprivateGetAllOrdersr	  r   r|  rI  s	            r   fetch_orderszbtcturk.fetch_orders%  s     	V$&,
 #GFO#&tzz%$,'?#@GK ++DKK,HI* ~~h/  vue<<r   r   c                 6    ddddd}| j                  |||      S )Nr  canceledclosed)	UntouchedPartialCanceledClosed)r   )r   r   statusess      r   parse_order_statuszbtcturk.parse_order_statusS  s,    "	
 &&99r   rs   c                    | j                  |d      }| j                  |d      }| j                  |dd      }t        j                  |      }| j                  |d      }| j                  |d      }| j	                  ||      }	| j                  |d      }
| j                  |d      }| j                  |d	      }| j                  |d
d      }| j                  |d      }| j                  |      }| j                  i d|d|d|d|d|dd dd dd d|d|
d|d|d|d| j                  |      d|	dd |      S )Nr   r   r   rm  
leftAmountr  r   methodorderClientId
updateTimer   r   r   	remainingfilledr   r  r5  rn  r   r   r7  )	r   r<  r   r=  r>  r;  r  rx  r%  )r   rs   r  r   r   rA  r   r  r&  r   r5  r   rn  r   	rawStatusr   s                   r   rt  zbtcturk.parse_order\  s   D eT*  0))%:F##L1$$UL9	##E<8!!(F3v.x0((@''|ZH	$$UH5	((3  
E 
" 
 U 
 f	 

  
 d 
 D 
 t 
 f 
 D 
 D 
 ] 
  
 Y/ 
 f 
  4! 
" # 	r   c                     | j                          d}|| j                  |      }| j                         }| j                  |d      }| j	                  ||||      S )a  
        fetch all trades made by the user

        https://docs.btcturk.com/private-endpoints/user-transactions

        :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 Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
        Nr   )r   r   privateGetUsersTransactionsTrader   rH  )r   r   rE  r   r   r  r   r   s           r   fetch_my_tradeszbtcturk.fetch_my_trades  s`     	[[(F88:, ~~h/  vue<<r   c                 "    | j                         S N)rT  )r   s    r   noncezbtcturk.nonce  s      ""r   re   GETc                 (   | j                   dk(  rt        | j                   dz         | j                  d   |   dz   |z   }|dk(  s|dk(  r|r)|d| j                  |      z   z  }n| j	                  |      }|dk(  r| j                          t        | j                               }| j                  | j                        }	| j                  |z   }
| j                  || j                  | j                  |
      |	t        j                  d	      d
d}||||dS )N	btctraderz1 is an abstract base API for BTCExchange, BTCTurkri   r   r  DELETE?rf   base64zapplication/json)zX-PCKzX-StampzX-SignaturezContent-Type)urlr  bodyheaders)r   r   r   	urlencodejsoncheck_required_credentialsstrr  base64_to_binarysecretapiKeyhmacencodehashlibsha256)r   pathri   r  r   r  r  r  r  r  auths              r   signzbtcturk.sign  s   77k!*] ]^^iis#c)D0eO8!3sT^^F33399V$D)++-

%E**4;;7F;;&D #yyT):FGNNT\] 2	G fdwOOr   r   reasonr  r  r  r  c
                    | j                  |dd      }
| j                  |d      }||n|}| j                  | j                  d   || j                  dz   |z          |
dk7  r |
dk7  rt	        | j                  dz   |z         y )Nr   0messager    SUCCESS)r   throw_exactly_matched_exceptionr   r   r   )r   r   r  r  r  r  r  r   requestHeadersrequestBody	errorCoder  outputs                r   handle_errorszbtcturk.handle_errors  s    $$Xvs;	""8Y7!/,,T__W-EwPTPWPWZ]P]`fPfg9	#9# 677r   r  )Nr]   NNF)1__name__
__module____qualname__r   r   r   r	   r   r   r   r   r  r  r   r   r  dictr   r'  r   r   r,  r/  r   rD  rJ  listrN  r\  r   rX  r   r   floatr
   ru  r   ry  r   r~  r  r  rt  r  r  r  r  r  __classcell__)r   s   @r   r   r      s   C# CJ $& 7+$v, 7+rF
V F
P) )$ $& ,( ,: :>b ^s ^3 ^Y ^@/4 / /6 /b 04B 4W 47 4 02 03 0f 0; ;v ; ;z 6:UW '=3 '=s '=# '=\`af\g '=R
 
4 
( 26DW[df IL# ILc ILQT ILkoptku ILVIs IZ] Ilp I* gksu .3 .i .y .RW .`c .@ 37r s C 4 /3TXac V V3 Vc Vhlmrhs V0 *.Dt\^ ,=3 ,=c ,= ,=cghmcn ,=\: :@ @v @ @D -1tRV_a '=c '= '=C '=R# &eBSW P,# s  c TX `c r   r   )"ccxt.base.exchanger   ccxt.abstract.btcturkr   r  r  ccxt.base.typesr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   typingr   ccxt.base.errorsr   r   r   r   ccxt.base.decimal_to_precisionr   ccxt.base.preciser   r    r   r   <module>r     sV    ( -   P  P  P  P  P  * ' . ) 4 %Sh Sr   