
    E#i%                       S SK Jr  S SK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JrJrJrJrJrJrJrJrJrJrJrJr  S SKJr  S SKJ r   S SKJ!r!  S SKJ"r"  S S	KJ#r#  S S
KJ$r$  S SKJ%r%  S SKJ&r&  S SK'J(r(  S SK)J*r*   " S S\\5      r+g)    )Exchange)ImplicitAPIN)AccountAnyBalances
CurrenciesCurrencyDepositAddressIntLedgerEntryMarketNumOrder	OrderBook	OrderSide	OrderTypeStrStringsTickerTickersTradeTradingFeeInterfaceTradingFeesTransactionTransferEntry)List)ExchangeError)AuthenticationError)PermissionDenied)ArgumentsRequired)
BadRequest)InsufficientFunds)NullResponse)	TICK_SIZE)Precisec                     ^  \ rS rSrS\4U 4S jjr0 4S\4S jjrS\S\	4S jr
0 4S\\   4S jjrS\S\4S	 jr0 4S\4S
 jjr0 4S\S\4S jjrS0 4S\S\4S jjrSSS\S\S\4S jjrSS0 4S\S\S\S\\   4S jjrSSS\S\S\4S jjrS0 4S\S\S\4S jjrSSS0 4S\S\S\S\S\\   4
S jjrSSS\S\4S jjr0 4S\ 4S jjr!STS\ 4S jjr"SSS\S\S\#4S jjr$0 4S\\%   4S  jjr&S!\S\%4S" jr'0 4S\(4S# jjr)S\(4S$ jr*SSS0 4S%\S\+S\S\S\\,   4
S& jjr-SSS0 4S\+S\S\4S' jjr.SSS0 4S\+S\S\4S( jjr/S0 4S)\S\+4S* jjr0S0 4S)\S\+4S+ jjr1S%\+4S, jr2SSS-\S\S\,4S. jjr3S0 4S\S/\4S0\5S1\6S2\74
S3 jjr8S0 4S)\S\+4S4 jjr9S0 4S\+4S5 jjr:SSS0 4S6\+S\S\S\\;   4S7 jjr<SSS8\S9\	S\;4S: jjr=S; r>SSS0 4S6\+S\S\S\\?   4S< jjr@SSS=\S9\	S\?4S> jjrAS%\+4S? jrB0 4S6\S1\6S@\SA\S\C4
SB jjrD0 4S6\S1\6S@\SA\S\C4
SC jjrE0 4S6\S1\6S@\SA\S\C4
SD jjrFSSSE\S9\	S\C4SF jjrG0 4S6\S\H4SG jjrISSS9\	S\H4SH jjrJSISJ0 SS4SK jrKS6\LSL\SM\SN\SO\SP\4SQ jrMSRrNU =rO$ )Ucex   returnc                   > U R                  [        [        U ]  5       SS/ SQSS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	_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_E0 S)S_S*S_S+S	_S,S	_S-S	_S.S	_S/S	_S0S	_S1S	_S2S	_S3S	_S4S	_S5S	_S6S_S7S	_S8S	_S9S	_E0 S:S	_S;S	_S<S	_S=S	_S>S	_S?S	_S@S	_SAS_SBS	_SCS	_SDS	_SES	_SFS_SGS	_SHS	_SIS	_SJS_E0 SKS_SLS	_SMS	_SNS_SOS	_SPS	_SQS	_SRS	_SSS	_STS	_SUS	_SVS	_SWS	_SXS_SYS_SZS_S[S_ESS	S	S	S	S	S	S	S	S	SS\.ES]S^S_S`.SaSbScSd/SeSf.0 SgSgSgShSgSgSgSgSi.Sj.0 0 SkSl_SmSg_SnSl_SoSg_SpSl_SqSl_SrSl_SsSg_StSg_SuSl_SvSg_SwSg_SxSg_SySg_SzSl_S{Sg_S|Sh_SlSgSgS}.ESj.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	SS	S	S	S.S S	SSSgSS	S	S	S.SS0S.	S S S.S S S.S.[        0 [
        [        [        [        [
        [        [        [        S.S.SSSSSSSSS.S0 SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_0 SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_ESSSSSSS.E0S.5      $ )Nr'   zCEX.IO)GBEUCYRUi,  TCORSspotmarginFswapfutureoption	addMarginborrowCrossMarginborrowIsolatedMarginborrowMargincancelAllOrderscancelOrdercloseAllPositionsclosePositioncreateOrder$createOrderWithTakeProfitAndStopLoss&createOrderWithTakeProfitAndStopLossWscreatePostOnlyOrdercreateReduceOnlyOrdercreateStopOrdercreateTriggerOrderfetchAccountsfetchBalancefetchBorrowInterestfetchBorrowRatefetchBorrowRateHistoriesfetchBorrowRateHistoryfetchBorrowRatesfetchBorrowRatesPerSymbolfetchClosedOrderfetchClosedOrdersfetchCrossBorrowRatefetchCrossBorrowRatesfetchCurrenciesfetchDepositAddressfetchDepositsWithdrawalsfetchFundingHistoryfetchFundingIntervalfetchFundingIntervalsfetchFundingRatefetchFundingRateHistoryfetchFundingRatesfetchGreeksfetchIndexOHLCVfetchIsolatedBorrowRatefetchIsolatedBorrowRatesfetchIsolatedPositionsfetchLedgerfetchLeveragefetchLeveragesfetchLeverageTiersfetchLiquidationsfetchLongShortRatiofetchLongShortRatioHistoryfetchMarginAdjustmentHistoryfetchMarginModefetchMarginModesfetchMarketLeverageTiersfetchMarketsfetchMarkOHLCVfetchMarkPricesfetchMyLiquidationsfetchMySettlementHistory
fetchOHLCVfetchOpenInterestfetchOpenInterestHistoryfetchOpenInterestsfetchOpenOrderfetchOpenOrdersfetchOptionfetchOptionChainfetchOrderBookfetchPositionfetchPositionHistoryfetchPositionModefetchPositionsfetchPositionsForSymbolfetchPositionsHistoryfetchPositionsRiskfetchPremiumIndexOHLCVfetchSettlementHistoryfetchTickerfetchTickers	fetchTimefetchTrades)fetchTradingFeesfetchVolatilityHistoryreduceMarginrepayCrossMarginrepayIsolatedMarginrepayMarginsetLeverage	setMarginsetMarginModesetPositionModetransferzchttps://user-images.githubusercontent.com/1294454/27766442-8ddc33b0-5ed8-11e7-8b98-f786aef0f3c9.jpgz)https://trade.cex.io/api/spot/rest-publicz"https://trade.cex.io/api/spot/rest)publicprivatezhttps://cex.iozhttps://trade.cex.io/docs/zhttps://cex.io/fee-schedulez!https://cex.io/limits-commissionsz!https://cex.io/r/0/up105393824/0/)logoapiwwwdocfeesreferral   
   )get_server_timeget_pairs_infoget_currencies_infoget_processing_info
get_tickerget_trade_historyget_order_bookget_candles)getpostget_my_current_fee   get_fee_strategyget_my_volumedo_create_accountget_my_account_status_v3get_my_wallet_balanceget_my_ordersdo_my_new_orderdo_cancel_my_orderdo_cancel_all_ordersr   r   r   get_my_transaction_historyget_my_funding_historydo_my_internal_transferr   )get_deposit_addressdo_deposit_funds_from_walletdo_withdrawal_funds_to_wallet)IOCFOKPOGTD)
marginModetriggerPricetriggerPriceTypetriggerDirectionstopLossPricetakeProfitPriceattachedStopLossTakeProfittimeInForcehedgedleveragemarketBuyRequiresPricemarketBuyByCostselfTradePreventiontrailingicebergi  )r   limittriggerr   symbolRequiredi )r   r   daysBackdaysBackCanceled	untilDaysr   r   r   r   )	sandboxr=   createOrdersfetchMyTrades
fetchOrderrs   fetchOrdersrM   rn   )linearinverse)r0   r2   r3   )z/You have negative balance on following accountsz2Mandatory parameter side should be one of BUY,SELLz,API orders from Main account are not allowedzcheck failedzInsufficient fundsz3Get deposit address for main account is not allowedz%Market Trigger orders are not allowedzkey not passed or incorrect)exactbroad1m5m15m30m1h2h4h1d)r   r   r   r   r   r   r   r   networksBTCbitcoinERC20BSC20binancesmartchainDOGEdogecoinALGOalgorandXLMstellarATOMcosmosLTClitecoinXRPrippleFTMfantomMINAminaTHETAthetaXTZtezosTIAcelestiaCRONOScronosMATICpolygonTONtonTRC20tronSOLANAsolanaSGBsongbirdDYDXdydxDASHdashZILzilliqaEOSeos
AVALANCHEC	avalancheETHPOWethereumpowNEARnearARBarbitrumDOTpolkadotOPToptimismINJ	injectiveADAcardanoONTontologyICPicpkavakusamaseineoneo3xdc)KAVAKSMSEINEONEO3XDC)idname	countries	rateLimitprohasurlsr   featuresprecisionMode
exceptions
timeframesoptions)	deep_extendsuperr'   describer$   r"   r!   r   r   )self	__class__s    B/home/james-whalen/.local/lib/python3.13/site-packages/ccxt/cex.pyr<  cex.describe   s4	   c4 9 ;1aaa %a 	a
 %a %a Ua $Ua 'a a "4a ta $Ua  a ta  7!a" 9%#a$ &u%a& ('a( "4)a* %d+a,  -a. /a0 &u1a2 "53a4 +E5a6 )%7a8 #E9a: ,U;a< #D=a> $T?a@ 'AaB (CaD "4EaF &tGaH +DIaJ &uKaL 'MaN (OaP #EQaR *5SaT $UUaV uWaX "5YaZ *5[a\ +E]a^ )%_a` taab  cad !%eaf %egah $Uiaj &ukal -eman /oap "5qar #Esat +Euav wax !%yaz "5{a| &u}a~ +Ea@ dAaB $UCaD +EEaF %eGaH !$IaJ "4KaL uMaN #EOaP !$QaR  SaT 'UaV $UWaX !%YaZ *5[a\ (]a^ %e_a` )%aab )%cad teaf gah Tiaj tkal %)*/ %$)',$$"!&#( AaF ~IC (317 @  +,*+/0/1&'-.*+'(	 ,a*A ( ,Q	
 3A 0 ( *1 -a / )! &q ,Q 5a 1!  21!" .r#$ 01899:)'T  %&+(,,0,1).+06:#'#'"'#'	( #($)27+//4$)#()$, %)%)"&&+!%#($)*/( $(&+!%$*,-%+#($)*/	*  #[0d ##
 ##m:v 'GXJTDN$.*;K[=G3F	 	  -9-W- 0- J	-
 J- 9- H- :- 8- 8- F- W- 7- :- h-  Y!-" 5#-$ V%-& h'-( :)-* F+-, F--. 9/-0 51-2 !+3-4 m5-6 F7-8 :9-: :;-< :=-> ;?-@ 9A-B :C-D 5E-F ##  " !Y-/ca>
 a a	    c                 h   / nUR                  U R                  U5      5        UR                  U R                  U5      5        UnU R                  US   S/ 5      nU R	                  US   S0 5      nU R                  US5      nU R                  Xe5      nU R                  U R                  U5      5      $ )z
fetches all available currencies on an exchange

https://trade.cex.io/docs/#rest-public-api-calls-currencies-info

:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: an associative dictionary of currencies
r   datar   currency)	appendpublicPostGetCurrenciesInfopublicPostGetProcessingInfo	safe_list	safe_dictindex_byr:  parse_currenciesto_array)r=  paramspromises	responsesdataCurrenciesdataNetworkscurrenciesIndexedrC  s           r?  fetch_currenciescex.fetch_currencies<  s     88@A 	88@A, 		!fbA~~ilFB? MM.*E 1@$$T]]4%899rA  rawCurrencyc                    U R                  US5      nU R                  U5      nU R                  US5      (       a  SOSnU R                  U R	                  U R                  US5      5      5      n0 nU R                  US0 5      n[        UR                  5       5      n[        S[        U5      5       H  n	X   n
Xz   nU R                  U
5      nU R                  US5      S:H  nU R                  US	5      S:H  nU
US UUS U R                  US
5      UU R                  US5      S S.U R                  US5      S S.S.US.
Xl'   M     U R                  UUS US U R                  US5      U R                  US5      S US S S.S S S.S.UUS.5      $ )NrD  fiatcrypto	precisionblockchainsr   depositenabled
withdrawalwithdrawalFee
minDepositminmaxminWithdrawal)r[  withdraw)
r.  networkr1   r[  rd  activefeerY  limitsinfowalletDepositwalletWithdrawal)amountrd  )r.  coder/  typerf  r[  rd  rg  rY  rh  r   ri  )safe_stringsafe_currency_code	safe_boolparse_numberparse_precisionrI  listkeysrangelennetwork_id_to_codesafe_numbersafe_currency_structure)r=  rU  r.  rm  rn  currencyPrecisionr   rawNetworksru  j	networkId
rawNetworknetworkCoder[  rd  s                  r?  parse_currencycex.parse_currencyr  s   k:6&&r*V<<v( --d.B.B4CSCST_alCm.nonn[-DK$$&'q#d)$AI$/J11)<K&&z9=JG''
LAYNH&"$''
OD.  $//
LI# 
  $//
OL#!	 #'%H! %6 ++~~k?C{4FG*  
  	 !+-
  	rA  c                 l    U R                  U5      nU R                  US/ 5      nU R                  U5      $ )z
retrieves data on all markets for ace

https://trade.cex.io/docs/#rest-public-api-calls-pairs-info

:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict[]: an array of objects representing market data
rC  )publicPostGetPairsInforH  parse_markets)r=  rM  responserC  s       r?  fetch_marketscex.fetch_markets  s9     ..v6, ~~h3!!$''rA  marketc                 p   U R                  US5      nU R                  U5      nU R                  US5      nU R                  U5      nUS-   U-   nUS-   U-   nU R                  0 SU_SU_SU_SU_SU_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5      U R                  US5      S.U R                  US5      U R                  US5      S.U R                  US5      U R                  US5      S.S S S.S.U R                  US5      U R	                  U R                  U R                  US5      5      5      U R	                  U R                  U R                  US 5      5      5      U R	                  U R                  U R                  US!5      5      5      S".S S US#.
E5      $ )$Nbasequote-/r.  symbolbaseIdquoteIdsettlesettleIdrn  r0   Tr1   Fr2   r3   r4   contractr   r   baseMinbaseMaxr`  minPricemaxPricequoteMinquoteMax)rl  pricecostr   baseLotSizepricePrecisionbasePrecisionquotePrecision)rl  r  r  r  )
contractSizeexpiryexpiryDatetimestrike
optionTyperh  rY  rf  createdri  )ro  rp  safe_market_structurery  rr  rs  )r=  r  r  r  r  r  r.  r  s           r?  parse_marketcex.parse_market  sz   !!&&1&&v.""673''0CZ%e#)) 3+
"3+
f3+
 D3+
 f	3+

 U3+
 w3+
 d3+
 3+
 F3+
 D3+
 e3+
 E3+
 e3+
 e3+
 3+
  d!3+
" t#3+
$ !"  ++FI>++FI>
  ++FJ?++FJ?
  ++FJ?++FJ?
  & **6=A**4+?+?@P@PQWYi@j+kl))$*>*>t?O?OPVXg?h*ij**4+?+?@P@PQWYi@j+kl e3+
 3 3	rA  c                 p    U R                  U5      nU R                  US5      nU R                  US5      nU$ )z
fetches the current integer timestamp in milliseconds from the exchange server
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns int: the current integer timestamp in milliseconds from the exchange server
rC  	timestamp)publicPostGetServerTimerI  safe_integer)r=  rM  r  rC  r  s        r?  
fetch_timecex.fetch_time  s>     //7 ~~h/%%dK8	rA  r  c                 l    U R                  5         U R                  U/U5      nU R                  X10 5      $ )as  
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

https://trade.cex.io/docs/#rest-public-api-calls-ticker

:param str symbol:
: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>`
)load_marketsfetch_tickersrI  )r=  r  rM  r  s       r?  fetch_tickercex.fetch_ticker  s5     	%%vh7~~h33rA  Nsymbolsc                     U R                  5         0 nUb  U R                  U5      US'   U R                  U R                  X25      5      nU R	                  US0 5      nU R                  XQ5      $ )a  
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

https://trade.cex.io/docs/#rest-public-api-calls-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>`
pairsrC  )r  
market_idspublicPostGetTickerextendrI  parse_tickers)r=  r  rM  requestr  rC  s         r?  r  cex.fetch_tickers-  sl     	#w7GG++DKK,HI6 ~~h3!!$00rA  tickerc                    U R                  US5      nU R                  X25      nU R                  0 SU_SS _SS _SU R                  US5      _SU R                  US5      _SU R                  US5      _S	S _S
U R                  US5      _SS _SS _SS _SU R                  US5      _SS _SU R                  US5      _SU R                  US5      _SS _SU R                  US5      _U R                  US5      US.EU5      $ )Nr.  r  r  datetimehighlowbidbestBid	bidVolumeaskbestAsk	askVolumevwapopencloselastpreviousClosechangepriceChange
percentagepriceChangePercentageaverage
baseVolumevolumequoteVolume)r  ri  )ro  safe_symbolsafe_tickerry  )r=  r  r  marketIdr  s        r?  parse_tickercex.parse_tickerY  s   ##FD1!!(3 !
f!
!
 !
 D$$VV4	!

 4##FE2!
 4##FI6!
 !
 4##FI6!
 !
 D!
 D!
 T%%ff5!
 T!
 d&&v}=!
 $**63JK!
  t!!
" $**68<#!
$  ++FMB'!
( ) 	rA  sincer   c                    U R                  5         U R                  U5      nSUS   0nUb  U R                  U5      US'   SnU R                  USS5      u  ptUb  U R                  U5      US'   Ub  [	        US5      US	'   U R                  U R                  Xd5      5      nU R                  US
0 5      n	U R                  U	S/ 5      n
U R                  XX#5      $ )a%  
get the list of most recent trades for a particular symbol

https://trade.cex.io/docs/#rest-public-api-calls-trade-history

: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
:param int [params.until]: timestamp in ms of the latest entry
:returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
pairr.  NfromDateISOuntiltill	toDateISOi'  pageSizerC  trades)
r  r  iso8601handle_param_integer_2ra  publicPostGetTradeHistoryr  rI  rH  parse_trades)r=  r  r  r   rM  r  r  r  r  rC  r  s              r?  fetch_tradescex.fetch_tradesr  s     	V$F4L
 %)\\%%8GM"33FGVL#'<<#6GK "%eU"3GJ11$++g2NO  ~~h3h3  >>rA  tradec                 P   U R                  US5      nU R                  U5      nU R                  S U5      nU R                  UUU R	                  U5      US   U R                  US5      S S S U R                  US5      U R                  US5      U R                  US5      S S S.U5      $ )NdateISOr  tradeIdsider  rl  )ri  r  r  r  r.  orderrn  takerOrMakerr  r  rl  r  rg  )ro  	parse8601safe_market
safe_trader  safe_string_lower)r=  r  r  dateStrr  s        r?  parse_tradecex.parse_trade  s     ""5)4NN7+	!!$/"Y/X&""5)4 **5&9%%eW5&&uh7 
  	rA  c                    U R                  5         U R                  U5      nSUS   0nU R                  U R                  XS5      5      nU R	                  US0 5      nU R                  US5      nU R                  XtS   U5      $ )a  
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

https://trade.cex.io/docs/#rest-public-api-calls-order-book

: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
r  r.  rC  r  r  )r  r  publicPostGetOrderBookr  rI  r  parse_order_book)	r=  r  r   rM  r  r  r  	orderBookr  s	            r?  fetch_order_bookcex.fetch_order_book  s     	V$F4L
 ..t{{7/KL& NN8VR8	%%i=	$$Yx0@)LLrA  r   	timeframec                    SnU R                  USS5      u  peUc  [        U R                  S-   5      eU R                  5         U R	                  U5      nUS   U R
                  U   US.nUb  U R                  U5      US'   Sn	U R                  USS	5      u  pU	b  U R                  U	5      US
'   O%Uc"  U R                  U R                  5       5      US
'   Ub  U	b  Ub  [        U R                  S-   5      eUc  U	b  Uc  [        U R                  S-   5      eUb  XHS'   U R                  U R                  X5      5      n
U R                  U
S/ 5      nU R                  XX#U5      $ )a  
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market

https://trade.cex.io/docs/#rest-public-api-calls-candles

: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 entry
:returns int[][]: A list of candles ordered, open, high, low, close, volume
Nrn   dataTypezO fetchOHLCV requires a parameter "dataType" to be either "bestBid" or "bestAsk"r.  )r  
resolutionr   fromISOr  r  toISOzO fetchOHLCV does not support fetching candles with both a limit and since/untilzP fetchOHLCV requires a limit parameter when fetching candles with since or untilr   rC  )handle_option_and_paramsr    r.  r  r  r8  r  r  millisecondspublicPostGetCandlesr  rH  parse_ohlcvs)r=  r  r  r  r   rM  r   r  r  r  r  rC  s               r?  fetch_ohlcvcex.fetch_ohlcv  s    88zZ#DGG.$  A  AV$4L//)4 

 !%e!4GI33FGVL#||E2GG]#||D,=,=,?@GG!2u7H#DGG.$  A  A5#4%-#DGG  /A  %A  B  B$G,,T[[-IJ$ ~~h3  yGGrA  c           	          U R                  US5      U R                  US5      U R                  US5      U R                  US5      U R                  US5      U R                  US5      /$ )Nr  r  r  r  r  r  )r  ry  )r=  ohlcvr  s      r?  parse_ohlcvcex.parse_ohlcv#  sl    e[1UF+UF+UE*UG,UH-
 	
rA  c                     U R                  5         U R                  U5      nU R                  US0 5      nU R                  US0 5      nU R                  US5      $ )a+  
fetch the trading fees for multiple markets

https://trade.cex.io/docs/#rest-public-api-calls-candles

:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
rC  
tradingFeeT)r  privatePostGetMyCurrentFeerI  parse_trading_fees)r=  rM  r  rC  r   s        r?  fetch_trading_feescex.fetch_trading_fees-  sY     	226: ~~h3~~dL"5&&tT22rA  c                    0 n[        UR                  5       5      n[        S[        U5      5       H<  nXE   nS nU(       a  U R	                  U5      nU R                  X   U5      nXUS   '   M>     [        S[        U R                  5      5       H=  nU R                  U   n	X;  d  M  U R                  U	5      nU R                  X5      X9'   M?     U$ )Nr   r  )rt  ru  rv  rw  r  parse_trading_feer  r  )
r=  r  
useKeyAsIdresultru  ikeyr  parsedr  s
             r?  r  cex.parse_trading_feesF  s    HMMO$q#d)$A'CF))#.++HM6BF'-6(#$ % q#dll+,A\\!_F$V,!%!7!7!I	 -
 rA  rg  c                 t    UU R                  US5      U R                  US5      U R                  US5      S S S.$ )Nr  percent)ri  r  makertakerr  	tierBased)ro  ry  )r=  rg  r  s      r?  r  cex.parse_trading_feeW  sE    &&vx8%%c95%%c95
 	
rA  c                     U R                  5         U R                  U5      nU R                  US0 5      nU R                  US0 5      nU R                  U5      nU R	                  XQ5      $ )NrC  balancesPerAccounts)r  privatePostGetMyAccountStatusV3rI  rL  parse_accounts)r=  rM  r  rC  balancesarrayss         r?  fetch_accountscex.fetch_accountsa  sd    77?* ~~h3>>$(=rBx(""622rA  accountc                     S S S US.$ )N)r.  rn  rm  ri   )r=  r*  s     r?  parse_accountcex.parse_account}  s    	
 	
rA  c                 l   SnU R                  USS5      u  p!SnU R                  USS5      u  p1SnUS:X  aJ  U R                  U5      nU R                  US0 5      nU R                  US0 5      nU R                  Xr0 5      nO$U R                  U5      nU R                  US0 5      nU R	                  U5      $ )	a8  
query for balance and get the amount of funds available for trading or funds locked in orders

https://trade.cex.io/docs/#rest-private-api-calls-account-status-v3

:param dict [params]: extra parameters specific to the exchange API endpoint
:param dict [params.method]: 'privatePostGetMyWalletBalance' or 'privatePostGetMyAccountStatusV3'
:param dict [params.account]:  in case 'privatePostGetMyAccountStatusV3' is chosen, self can specify the account name(default is empty string)
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
Nr*   methodprivatePostGetMyWalletBalancer$  rC  r#  )handle_param_stringr$  rI  r2  parse_balance)r=  rM  accountNamer1  accountBalancer  rC  r&  s           r?  fetch_balancecex.fetch_balance  s     "66vy"M11&(Dcd66;;FCH >>(FB7D~~d,A2FH!^^H2FN99&AH "^^HfbAN!!.11rA  c                 6   SU0n[        UR                  5       5      n[        S[        U5      5       HS  nX4   nU R	                  X0 5      nU R                  U5      nU R                  US5      U R                  US5      S.nXU'   MU     U R                  U5      $ )Nri  r   balanceOnHoldbalance)usedtotal)rt  ru  rv  rw  rI  rp  ro  safe_balance)	r=  r  r  ru  r  r  r;  rm  r*  s	            r?  r4  cex.parse_balance  s    H
 HMMO$q#d)$A'CnnXB7G**3/D((/B))'9=G #4L %   ((rA  statusc                    U R                  5         0 nUS:H  nU(       a  SUS'   SnUb  U R                  U5      nUS   US'   Ub  XFS'   Ub  X6S'   OU(       a  U R                  5       S	-
  US'   Sn	U R                  US
S5      u  pU	b  XS'   U R	                  U R                  Xe5      5      n
U R                  U
S/ 5      nU R                  XX45      $ )a\  
fetches information on multiple orders made by the user

https://trade.cex.io/docs/#rest-private-api-calls-orders

:param str status: order status to fetch for
: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
:param int [params.until]: timestamp in ms of the latest entry
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
closedTarchivedNr.  r  r  serverCreateTimestampFroml    P% r  r  serverCreateTimestampTorC  )r  r  r  r  privatePostGetMyOrdersr  rH  parse_orders)r=  r@  r  r  r   rM  r  isClosedOrdersr  r  r  rC  s               r?  fetch_orders_by_statuscex.fetch_orders_by_status  s     	 H,"&GJ[[(F$TlGFO"'J38/0373D3D3FIb3bG/033FGVL16-...t{{7/KLR ~~h3  u<<rA  c                 (    U R                  SXX45      $ )  

https://trade.cex.io/docs/#rest-private-api-calls-orders

fetches information on multiple canceled orders made by the user
:param str symbol: unified market symbol of the market orders were made in
:param int [since]: timestamp in ms of the earliest order, default is None
:param int [limit]: max number of orders to return, default is None
: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>`
rB  rI  r=  r  r  r   rM  s        r?  fetch_closed_orderscex.fetch_closed_orders  s     **8VERRrA  c                 (    U R                  SXX45      $ )rL  r  rM  rN  s        r?  fetch_open_orderscex.fetch_open_orders$  s     **66%PPrA  r.  c           	          U R                  5         S[        U5      0nU R                  USSU R                  XC5      5      nUS   $ )aq  
fetches information on an open order made by the user

https://trade.cex.io/docs/#rest-private-api-calls-orders

:param str id: order id
:param str [symbol]: unified symbol of the market the order was made in
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
orderIdNr   )r  intrR  r  r=  r.  r  rM  r  r  s         r?  fetch_open_ordercex.fetch_open_order2  sK     	s2w
 ''dDKK<XYayrA  c           	          U R                  5         S[        U5      0nU R                  USSU R                  XC5      5      nUS   $ )as  
fetches information on an closed order made by the user

https://trade.cex.io/docs/#rest-private-api-calls-orders

:param str id: order id
:param str [symbol]: unified symbol of the market the order was made in
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
rU  Nr   )r  rV  rO  r  rW  s         r?  fetch_closed_ordercex.fetch_closed_orderD  sK     	s2w
 ))&$dkk'>Z[ayrA  c           	      <    SSSSSSSSS.nU R                  X!U5      $ )Nr  rB  expiredrejected	cancelingcanceled)PENDING_NEWNEWPARTIALLY_FILLEDFILLEDEXPIREDREJECTEDPENDING_CANCEL	CANCELLEDro  r=  r@  statusess      r?  parse_order_statuscex.parse_order_statusV  s6    ! & ")#	
 &99rA  r  c           	         U R                  US5      nU R                  US5      nS nUb  Ub  US-   U-   nU R                  XR5      nUS   nU R                  U R                  US5      5      n0 nU R                  US5      n	U	b+  U R                  US5      n
U R	                  U
5      nXS'   XS	'   U R                  US
5      nU R                  US5      nU R                  US5      nU R                  US5      nU R                  0 SU R                  US5      _SU R                  US5      _SU_SU R                  U5      _SU R                  US5      _SS _SU_SU R                  US5      _SU R                  US5      _SS _SU R                  US5      _SU R                  US5      _SU R                  US5      _SU_S	U_SU R                  US5      _S U_S UUS US!.EU5      $ )"N	currency1	currency2r  r  r@  	feeAmountfeeCurrencyrD  r  serverCreateTimestamprequestedAmountCcy1executedAmountCcy1executedAmountCcy2r.  rU  clientOrderIdr  r  lastUpdateTimestamplastTradeTimestamprn  	orderTyper   postOnlyr  r  r   	stopPricerl  r  averagePricefilled)	remainingr@  rg  r  ri  )	ro  r  rm  ry  rp  r  
safe_orderr  r  )r=  r  r  rp  rq  r  r  r@  rg  rr  
currencyIdfeeCoder  requestedBaseexecutedBaseexecutedQuotes                   r?  parse_ordercex.parse_orderc  s   B $$UK8	$$UK8	 Y%: 32H!!(3!(()9)9%)JK$$UK8	 ))%?J--j9G%
O#K%%e-DE	((0EF''/CD((0DE  
$""5)4 
T--e_E 
  
 Y/	 

 "4#4#4U<Q#R 
 !$ 
 f 
 D**5+> 
 4++E=A 
  
 D**5&9 
 T%%eW5 
 D,,UK@ 
 m 
 M 
  t''~>! 
" l# 
$ - 
. / 	rA  rn  r  rl  r  c                    SnU R                  USS5      u  pvUc  [        U R                  S-   5      eU R                  5         U R	                  U5      nU R                  5       US   US   UU R                  UR                  5       5      UR                  5       U R                  5       U R                  X5      S.n	Sn
U R                  USSS	5      u  pUS
:X  a  U R                  X5      U	S'   XS'   SnU R                  US5      u  pUb	  SU	S'   XS'   U R                  U R                  X5      5      nU R                  US5      nU R!                  X5      $ )a  
create a trade order

https://trade.cex.io/docs/#rest-private-api-calls-new-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
:param str [params.accountId]: account-id to use(default is empty string)
:param float [params.triggerPrice]: the price at which a trigger order is triggered at
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
Nr=   	accountIdz createOrder() : API trading is now allowed from main account, set params["accountId"] or .options["createOrder"]["accountId"] to the name of your sub-accountr  r  )rx  rp  rq  r  r{  r  r  
amountCcy1r   GTCr   r  r   z
Stop Limitrn  r}  rC  )r  r    r.  r  r  uuid
capitalizelowerupperr  amount_to_precisionprice_to_precisionr3  privatePostDoMyNewOrderr  rI  r  )r=  r  rn  r  rl  r  rM  r  r  r  r   r   r  rC  s                 r?  create_ordercex.create_order  sn     	 99&-Q\]	#DGG  /O  %O  P  PV$!YY[)	*"6JJL**,226B	
 ";;FMS`bgh7?#66vEGG%0M"#77O#*GFO#/K //G0LMb ~~h/--rA  c                    U R                  5         [        U5      S[        U R                  5       5      -   U R                  5       S.nU R	                  U R                  XC5      5      nU R                  US0 5      nU R                  U5      $ )aU  
cancels an open order

https://trade.cex.io/docs/#rest-private-api-calls-cancel-order

:param str id: order id
:param str symbol: unified symbol of the market the order was made in
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
c_)rU  cancelRequestIdr  rC  )r  rV  strr  privatePostDoCancelMyOrderr  rI  r  )r=  r.  r  rM  r  r  rC  s          r?  cancel_ordercex.cancel_order  s     	2w#c4+<+<+>&@@**,

 224;;w3OP ~~h3%%rA  c                    U R                  5         U R                  U5      nU R                  US0 5      nU R                  US/ 5      n/ n[	        S[        U5      5       H  nXW   nUR                  SU05        M     U R                  U5      $ )as  
cancel all open orders in a market

https://trade.cex.io/docs/#rest-private-api-calls-cancel-all-orders

:param str symbol: alpaca cancelAllOrders cannot setting symbol, it will cancel all open orders
: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>`
rC  clientOrderIdsr   rx  )r  privatePostDoCancelAllOrdersrI  rH  rv  rw  rE  rG  )	r=  r  rM  r  rC  idsordersr  r.  s	            r?  cancel_all_orderscex.cancel_all_orders'  s     	44V< ~~h3nnT#3R8q#c(#ABMM?B/0 $   ((rA  rm  c                 D   U R                  5         Sn0 nUb  U R                  U5      nUS   US'   Ub  X&S'   Ub  X6S'   SnU R                  USS5      u  ptUb  XvS'   U R                  U R	                  Xd5      5      nU R                  US	/ 5      n	U R                  XX#5      $ )
a4  
fetch the history of changes, actions done by the user or operations that altered the balance of the user

https://trade.cex.io/docs/#rest-private-api-calls-transaction-history

:param str [code]: unified currency code
:param int [since]: timestamp in ms of the earliest ledger entry
:param int [limit]: max number of ledger entries to return
:param dict [params]: extra parameters specific to the exchange API endpoint
:param int [params.until]: timestamp in ms of the latest ledger entry
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
Nr.  rD  dateFromr  r  r  dateTorC  )r  rD  r  "privatePostGetMyTransactionHistoryr  rH  parse_ledger)
r=  rm  r  r   rM  rD  r  r  r  rC  s
             r?  fetch_ledgercex.fetch_ledgerE  s     	}}T*H"*4.GJ"'J"'J33FGVL %H::4;;w;WX  ~~h3  >>rA  itemrD  c                 L   U R                  US5      nS n[        R                  " US5      (       a  Sn[        R                  " SU5      nOSnU R                  US5      nU R	                  XR5      nU R                  XR5      nU R                  US5      nU R                  U5      nU R                  US5      n	U R                  UU R                  US	5      UU R                  US
S5      S S U R                  U	5      UU R                  U5      UU R                  U5      S S S S S.U5      $ )Nrl  0outz-1inrD  r  rn  transactionIdr  r0  )ri  r.  	directionr*  referenceAccountreferenceIdrn  rD  rl  r  r  beforeafterr@  rg  )ro  r%   	string_le
string_mulsafe_currencyrp  r  safe_ledger_entryparse_ledger_entry_typerr  r  )
r=  r  rD  rl  r  r  rm  timestampStringr  rn  s
             r?  parse_ledger_entrycex.parse_ledger_entrys  s1   !!$1	VS))I''f5FI%%dJ7
%%j;&&z<**4=NN?3	f-%%""49"''k2> $006''/"Y/'
  ! 	rA  c                 2    SSSS.nU R                  X!U5      $ )Nr[  r]  rg  )r[  rd  
commissionrj  )r=  rn  
ledgerTypes      r?  r  cex.parse_ledger_entry_type  s'     $


 
$77rA  c                 4   U R                  5         0 nSnUb  U R                  U5      nUb  X%S'   Ub  X5S'   SnU R                  USS5      u  ptUb  XuS'   U R                  U R	                  XT5      5      nU R                  US/ 5      n	U R                  XX#5      $ )a0  
fetch history of deposits and withdrawals

https://trade.cex.io/docs/#rest-private-api-calls-funding-history

:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
:param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
:param int [limit]: max number of deposit/withdrawals to return, default is None
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a list of `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
Nr  r  r  r  r  rC  )r  rD  r  privatePostGetMyFundingHistoryr  rH  parse_transactions)
r=  rm  r  r   rM  r  rD  r  r  rC  s
             r?  fetch_deposits_withdrawalscex.fetch_deposits_withdrawals  s     	}}T*H"'J"'J33FGVL %H66t{{77ST& ~~h3&&tuDDrA  transactionc                    U R                  US5      nU R                  US5      nUS:X  a  SOSnU R                  X25      nU R                  US5      nU R                  U5      n0 SU_SU R                  US	5      _S
S _SU_SU_SS _SU R                  US5      _SU R	                  U R                  US5      5      _SU_SU R                  U5      _SS _SS _SS _SS _SS _SS _SS _S UU R                  US5      S.S S.E$ )NrD  r  rd  r]  r[  	updatedAtri  r.  txIdtxidrn  re  rl  r@  r  r  addressaddressFrom	addressTotagtagFromtagToupdatedcommissionAmount)rD  r  )commentrg  internal)ro  rp  r  ry  parse_transaction_statusr  )	r=  r  rD  r  r  rn  rm  r  r  s	            r?  parse_transactioncex.parse_transaction  s   %%k:>
$$[+>	 )Z 7|i&&z<$$[+>	NN9-	
K
$"";7
 D
 D	

 
 t
 d&&{H=
 d33D4D4D[RZ4[\
 
 Y/
 t
 4
 
 4
 t
  T!
" t#
$  ((6HI /
 	
rA  c                 2    SSSS.nU R                  X!U5      $ )Nr_  pendingok)r_  r  approvedrj  rk  s      r?  r  cex.parse_transaction_status  s'    " 

 &99rA  fromAccount	toAccountc                     SnUS:w  a  US:w  a  U R                  XX4U5      nOU R                  XX4U5      nU R                  SSS5      nU(       a  X6S'   XFS'   U$ )a  
transfer currency internally between wallets on the same account

https://trade.cex.io/docs/#rest-private-api-calls-internal-transfer

:param str code: unified currency code
:param float amount: amount to transfer
:param str fromAccount: 'SPOT', 'FUND', or 'CONTRACT'
:param str toAccount: 'SPOT', 'FUND', or 'CONTRACT'
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a `transfer structure <https://docs.ccxt.com/#/?id=transfer-structure>`
Nr0  r   fillResponseFromRequestTr  r  )transfer_between_sub_accounts%transfer_between_main_and_sub_accounthandle_option)r=  rm  rl  r  r  rM  r   r  s           r?  r   cex.transfer  sq     ?{b099$`fgHAA$P[hnoH"&"4"4ZAZ\`"a"&1]#$-[!rA  c                    U R                  5         U R                  U5      nUS:H  nU(       a  UOUnU R                  USU R                  5       5      n	US   U R	                  X5      UU	S.n
S nU(       a!  U R                  U R                  X5      5      nO U R                  U R                  X5      5      nU R                  US0 5      nU R                  X5      $ )Nr0  guidr.  )rD  rl  r  
clientTxIdrC  )
r  rD  ro  r  currency_to_precision#privatePostDoDepositFundsFromWalletr  $privatePostDoWithdrawalFundsToWalletrI  parse_transfer)r=  rm  rl  r  r  rM  rD  fromMaintargetAccountr  r  r  rC  s                r?  r  )cex.transfer_between_main_and_sub_account  s    ==&2%%-	;		< 00>&	
 ??G@\]H@@WA]^H ~~h3""422rA  c                     U R                  5         U R                  U5      nUS   U R                  X5      UUS.nU R                  U R	                  Xu5      5      nU R                  US0 5      n	U R                  X5      $ )Nr.  )rD  rl  fromAccountIdtoAccountIdrC  )r  rD  r  privatePostDoMyInternalTransferr  rI  r  )
r=  rm  rl  r  r  rM  rD  r  r  rC  s
             r?  r  !cex.transfer_between_sub_accounts,  s~    ==& 00>($	
 77G8TU ~~h3""422rA  r   c                     U R                  US5      nU R                  X25      nUU R                  USS5      S S US S S U R                  U R                  US5      5      S.	$ )NrD  r  r  r@  )	ri  r.  r  r  rD  rl  r  r  r@  )ro  rp  safe_string_2r  )r=  r   rD  r  currencyCodes        r?  r  cex.parse_transferA  sr    . %%h
;
..zD$$XM$33D4D4DXx4XY

 
	
rA  c                    SnU R                  USS5      u  p2Uc  [        U R                  S-   5      eU R                  5         SnU R	                  U5      u  pBU R                  U5      nUUS   U R                  U5      S.nU R                  U R                  Xb5      5      nU R                  US0 5      nU R                  X5      $ )a  
fetch the deposit address for a currency associated with self account

https://trade.cex.io/docs/#rest-private-api-calls-deposit-address

:param str code: unified currency code
:param dict [params]: extra parameters specific to the exchange API endpoint
:param str [params.accountId]: account-id(default to empty string) to refer to(at self moment, only sub-accounts allowed by exchange)
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
Nr=   r  z fetchDepositAddress() : main account is not allowed to fetch deposit address from api, set params["accountId"] or .options["createOrder"]["accountId"] to the name of your sub-accountr.  )r  rD  
blockchainrC  )r  r    r.  r  handle_network_code_and_paramsrD  network_code_to_idprivatePostGetDepositAddressr  rI  parse_deposit_address)	r=  rm  rM  r  r  rD  r  r  rC  s	            r?  fetch_deposit_addresscex.fetch_deposit_addressf  s     	 99&-Q\]	#DGG  /h  %h  i  i"AA&I==&" 11+>

 44T[[5QR ~~h3))$99rA  c                     U R                  US5      nU R                  US5      nU R                  XB5      nU R                  U5        UUS   U R                  U R                  US5      5      US S.$ )Nr  rD  rm  r  )ri  rD  re  r  r  )ro  r  check_addressrx  )r=  depositAddressrD  r  r  s        r?  r  cex.parse_deposit_address  s{    "">9=%%njA
%%j;7#" (..t/?/?P\/]^
 	
rA  r   GETc                 T   U R                   S   U   S-   U R                  X5      -   nU R                  X@R                  U5      5      nUS:X  a;  US:X  a  U(       a  USU R	                  U5      -   -  nOU R                  U5      nSS0nOU R                  5         [        U R                  5       5      n	U R                  U5      nX-   U-   n
U R                  U R                  U
5      U R                  U R                  5      [        R                  S5      nSU R                  U	US	.nXsXeS
.$ )Nr   r  r   r  ?Content-Typezapplication/jsonbase64)r  z
X-AGGR-KEYzX-AGGR-TIMESTAMPzX-AGGR-SIGNATURE)urlr1  bodyheaders)r4  implode_paramsomitextract_params	urlencodejsoncheck_required_credentialsr  secondshmacencodesecrethashlibsha256apiKey)r=  pathr   r1  rM  r  r  r
  queryr  auth	signatures               r?  signcex.sign  s   iis#c)D,?,?,MM		&"5"5d";<(?3!666Cyy'"$6 ++-$,,.)G99U#D>D(D		$++d"3T[[5Mw~~_ghI 2"kk$+$-	G dOOrA  reasonr
  r1  r  r  c
                    Ucb  Uc  [        U R                  S-   5      eUS   S:X  a#  U R                  U5      n
U R                  U
5      nO[        U R                  S-   U-   5      eU R	                  US5      nUb[  U R                  S-   U-   nU R                  U R                  S   X5        U R                  U R                  S   X5        [        U5      eUR                  S	5      S:  ab  U R                  US
0 5      nU R	                  US5      nUb:  U R                  U R                  S   X5        [        U R                  S-   U-   5      eg )Nz returned empty responser   {z returned unparsed response: error r   r   r   rC  rejectReasonz createOrder() )r#   r.  fix_stringified_json_members
parse_jsonro  throw_exactly_matched_exceptionr7  throw_broadly_matched_exceptionr   findrI  )r=  rm  r   r
  r1  r  r  r  requestHeadersrequestBodyfixedr#  feedbackrC  r%  s                  r?  handle_errorscex.handle_errors  s@    |"477-G#GHHaC99$???51"477-L#Lt#STT  73ww}t+H001I5[001I5[))88%&!+>>(FB7D++D.AL'44T__W5M|j#DGG.?$?,$NOOrA  r,  )N)F)P__name__
__module____qualname____firstlineno__r   r<  r   rS  dictr	   r  r   r   r  r  r   r  r  r   r  r   r   r  r  r   r  r  r   r  rt  r  r  r   r  r  r   r  r   r(  r-  r   r7  r4  r   r   rI  rO  rR  rX  r[  rm  r  r   r   floatr   r  r  r  r   r  r  r  r   r  r  r  r   r   r  r  r  r
   r  r  r  rV  r/  __static_attributes____classcell__)r>  s   @r?  r'   r'      sa   b# bH	 ') 4:Z 4:l9$ 98 9v $&  ($v,  (D:4 :F :x !# s ( 02 43 4f 4 04B *1W *17 *1X4  6 2 6:UW ,?3 ,?s ,?# ,?\`af\g ,?\ v  > :>b %Ms %M3 %MY %MN 9=4^bkm ;H# ;H# ;HS ;HX[ ;Hrvw{r| ;Hz
 
4 
 )+ 3{ 32 "
T 
6 
EX 
 %' 34= 38
T 
g 
 $& 12( 12f) )  AESWfjsu L=S L=# L=S L=`c L=z~  @E  {F L=\ 154VZce S# SS SPS S /3TXac Q Q3 Qc Q 7;2 3  $ 9=R S # $: :L Lv L L\ gksu \.3 \.i \.y \.RW \.`c \.| 37r &s &C &0 /32 ) )< (,$TZ\ ,? ,?C ,?s ,?aefqar ,?\t x ; @8 6:[_hj -Es -E# -EUX -Eost  pA -E^
T 
X 
Q\ 
B:s : [] S % c c an 0 xz 3# 3u 3[^ 3kn 3  L 3B pr 3# 3u 3SV 3cf 3  wD 3*#
t #
x #
= #
J 79 %:# %:^ %:N
h 
R` 
 &eBSW P4# s  c TX `c  rA  r'   ),ccxt.base.exchanger   ccxt.abstract.cexr   r  ccxt.base.typesr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   typingr   ccxt.base.errorsr   r   r   r    r!   r"   r#   ccxt.base.decimal_to_precisionr$   ccxt.base.preciser%   r'   r,  rA  r?  <module>r@     sh    ( )  D  D  D  D  D  D  D  * 0 - . ' . ) 4 %w(K wrA  