
    eiC                    L   d dl mZ d dlm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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! 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( d dl)m*Z*  G d dee          Z+dS )    )Exchange)ImplicitAPIN)AnyBalances
CurrenciesCurrencyIntMarketNumOrder	OrderBook	OrderSide	OrderTypeStrStringsTickerTickersTradeTradingFeeInterfaceTransactionTransferEntry)List)ExchangeError)AuthenticationError)PermissionDenied)AccountSuspended)ArgumentsRequired)
BadRequest)	BadSymbol)InsufficientFunds)InvalidOrder)NotSupported)RateLimitExceeded)ExchangeNotAvailable)InvalidNonce)	TICK_SIZEc                   6    e Zd Zdef fdZd Zi fdefdZi fdee	         fdZ
i fdefdZi fdefdZdi fd	ed
edefdZdCdede	defdZi fd	edefdZdi fdedefdZdCdede	defdZddi fd	eded
edee         fdZi fd	edefdZi fd	efdZi fd	efdZdddi fd	e ded
efdZ!de fdZ"d Z#de fdZ$dCde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i f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i fd	e fd+Z0dddi fd,e ded
efd-Z1dCd.ed/e2de3fd0Z4de fd1Z5d2 Z6dddi fd,e ded
edee7         fd3Z8i fd,ed'e,d4ed5ede7f
d6Z9dCd7ed/e2de7fd8Z:de de fd9Z;dDd<Z<d,e=d=ed>ed?ed@edAefdBZ> xZ?S )Elatokenreturnc           !      R   |                      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
d0d
d1d
d2d
d3d
d4d
d5d
d6d
d7d
d8d
d9d
d:d
i d;d
d<d
d=d
d>d
d?d
d@ddAd
dBd
dCd
dDd
dEd
dFddGd
dHd
dId
dJddKd
i dLd
dMddNddOddPd
dQd
dRd
dSd
dTd
dUd
dVd
dWd
dXd
dYddZdd[dd\ddd
d]d
dd
d
d
d
d
d
d
d
d
dd^d_d`daidbdagdcdddedfi dgdhdidhdjdhdkdhdldhdmdhdndhdodhdpdhdqdhdrdhdsdhdtdhdudhdvdhdwdhii dxdhdydhdzdhd{dhd|dhd}dhd~dhddhddhddhddhddhddhddhddhddhddhddhii ddhddhddhddhddhddhddhddhddhddhddhddhddhddhddhddhddhddhiddt          ddfd
d|                     d          |                     d          dii ddddddddddddddddddddddddddddddddi dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          t          t          t          t          t          dҜt          t          t          t          t           t           t           t          dӜdԜdddddלdddٜddidd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dd d
dd
dd
d
dd
d d
d
ddd d
dddhd dd
d
dd d	d d dd d ddd          S )Nr(   LatokenKYv2i  CORSspotTmarginFswapfutureoption	addMarginborrowCrossMarginborrowIsolatedMarginborrowMargincancelAllOrderscancelOrdercloseAllPositionsclosePositioncreateOrdercreatePostOnlyOrdercreateStopLimitOrdercreateStopMarketOrdercreateStopOrderfetchAllGreeksfetchBalancefetchBorrowInterestfetchBorrowRatefetchBorrowRateHistoriesfetchBorrowRateHistoryfetchBorrowRatesfetchBorrowRatesPerSymbolfetchCrossBorrowRatefetchCrossBorrowRatesfetchCurrenciesfetchDepositAddressfetchDepositAddressesfetchDepositAddressesByNetworkfetchDepositsWithdrawalsfetchDepositWithdrawFeesfetchFundingHistoryfetchFundingIntervalfetchFundingIntervalsfetchFundingRatefetchFundingRateHistoryfetchFundingRatesfetchGreeksfetchIndexOHLCVfetchIsolatedBorrowRatefetchIsolatedBorrowRatesfetchIsolatedPositionsfetchLeveragefetchLeveragesfetchLeverageTiersfetchLiquidationsfetchLongShortRatiofetchLongShortRatioHistoryfetchMarginAdjustmentHistoryfetchMarginModefetchMarginModesfetchMarketLeverageTiersfetchMarketsfetchMarkOHLCVfetchMarkPricefetchMarkPricesfetchMyLiquidationsfetchMySettlementHistoryfetchMyTradesfetchOpenInterestfetchOpenInterestHistoryfetchOpenInterestsfetchOpenOrdersfetchOptionfetchOptionChain
fetchOrderfetchOrderBookfetchOrdersfetchPositionfetchPositionHistoryfetchPositionModefetchPositionsfetchPositionsForSymbolfetchPositionsHistoryfetchPositionsRiskfetchPremiumIndexOHLCVfetchSettlementHistoryfetchTickerfetchTickers	fetchTimefetchTradesemulated)fetchTradingFeefetchTradingFeesfetchTransactionsfetchTransferfetchTransfersfetchUnderlyingAssetsfetchVolatilityHistoryreduceMarginrepayCrossMarginrepayIsolatedMarginsetLeverage	setMarginsetMarginModesetPositionModetransferzchttps://user-images.githubusercontent.com/1294454/61511972-24c39f00-aa01-11e9-9f7c-471f1d6e5214.jpgrestzhttps://api.latoken.comzhttps://latoken.comzhttps://latoken.com/feesz%https://latoken.com/invite?r=mvgp2djk)logoapiwwwdocfeesreferralgetzbook/{currency}/{quote}   z
chart/weekzchart/week/{currency}/{quote}currencyzcurrency/availablezcurrency/quoteszcurrency/{currency}pairzpair/availabletickerzticker/{base}/{quote}timez trade/history/{currency}/{quote}ztrade/fee/{currency}/{quote}ztrade/feeLevelsztransaction/bindingszauth/accountz'auth/account/currency/{currency}/{type}z
auth/orderzauth/order/getOrder/{id}z"auth/order/pair/{currency}/{quote}z)auth/order/pair/{currency}/{quote}/activezauth/stopOrderzauth/stopOrder/getOrder/{id}z&auth/stopOrder/pair/{currency}/{quote}z-auth/stopOrder/pair/{currency}/{quote}/activez
auth/tradez"auth/trade/pair/{currency}/{quote}z!auth/trade/fee/{currency}/{quote}zauth/transactionzauth/transaction/bindingsz$auth/transaction/bindings/{currency}zauth/transaction/{id}zauth/transferzauth/order/cancelzauth/order/cancelAllz'auth/order/cancelAll/{currency}/{quote}zauth/order/placezauth/spot/depositzauth/spot/withdrawzauth/stopOrder/cancelzauth/stopOrder/cancelAllz+auth/stopOrder/cancelAll/{currency}/{quote}zauth/stopOrder/placezauth/transaction/depositAddresszauth/transaction/withdrawz auth/transaction/withdraw/cancelz!auth/transaction/withdraw/confirmz$auth/transaction/withdraw/resendCodezauth/transfer/emailzauth/transfer/idzauth/transfer/phone)r   post)publicprivatetradingz0.0049)feeSide	tierBased
percentagemakertakerBUXBuxcoinCBTzCommunity Business TokenCTCCyberTronchainDMDzDiamond CoinFRENFrenchieGDXGoldenXGECzGeco OneGEMNFTmallGMTz	GMT TokenIMCIMCoinMTMonarchTPAYz	Tetra PayTRADEzSmart Trade CoinTSLzTreasure SLUNO
UnobtaniumWARzWarrior TokenINTERNAL_ERRORSERVICE_UNAVAILABLENOT_AUTHORIZED	FORBIDDENBAD_REQUEST	NOT_FOUNDACCESS_DENIEDREQUEST_REJECTEDHTTP_MEDIA_TYPE_NOT_SUPPORTEDMEDIA_TYPE_NOT_ACCEPTABLEMETHOD_ARGUMENT_NOT_VALIDVALIDATION_ERRORACCOUNT_EXPIREDBAD_CREDENTIALSCOOKIE_THEFTCREDENTIALS_EXPIREDINSUFFICIENT_AUTHENTICATION)UNKNOWN_LOCATIONTOO_MANY_REQUESTSINSUFFICIENT_FUNDSORDER_VALIDATION	BAD_TICKS)z$invalid API key, signature or digestzThe API key was revokedzrequest expired or badzFor input stringz!Unable to resolve currency by tagzCan't find currency with tagz7Unable to place order because pair is in inactive statezAPI keys are not available for)exactbroadACCOUNT_TYPE_WALLETACCOUNT_TYPE_SPOT)walletfundingr/   r   )r   r   methodfetchPrivateTradingFeer   )defaultTypetypesaccountsr   timeDifferenceadjustForTimeDifference)IOCFOKPOGTD)
marginModetriggerPricetriggerPriceTypetriggerDirectionstopLossPricetakeProfitPriceattachedStopLossTakeProfittimeInForcehedgedselfTradePreventiontrailingleveragemarketBuyByCostmarketBuyRequiresPriceicebergi )r   limitdaysBack	untilDayssymbolRequired)r   triggerr   r   )r   r   r   r   r   )r   r   r   daysBackCanceledr   r   r   r   )	sandboxr<   createOrdersrl   rs   rp   ru   fetchClosedOrders
fetchOHLCV)linearinverse)r/   r1   r2   )idname	countriesversion	rateLimithasurlsr   precisionModer   commonCurrencies
exceptionsoptionsfeatures)deep_extendsuperr(   describer&   parse_numberr   r$   r   r   r   r   r#   r    r!   r%   r   )self	__class__s    X/var/www/html/volatility/venv/lib/python3.11/site-packages/ccxt/async_support/latoken.pyr  zlatoken.describe   s   gt 4 4 = = ? ?eee %e 	e
 %e %e Ue $Ue 'e e "4e te $Ue  e te  &u!e" '#e e$ (%e& "4'e( !%)e* +e, &u-e. "5/e0 +E1e2 )%3e4 #E5e6 ,U7e8 '9e: (;e< "4=e> &u?e@ (AeB 1%CeD +DEe e eF +EGeH &uIeJ 'KeL (MeN #EOeP *5QeR $USeT uUeV "5WeX *5YeZ +E[e\ )%]e^  _e` !%aeb %eced $Ueef &uge e eh -eiej /kel "5men #Eoep +Eqer set !%uev !%wex "5yez &u{e| +E}e~  e@ $UAeB +ECeD %eEeF "4GeH uIe e eJ #EKeL dMeN !$OeP tQeR  SeT 'UeV $UWeX !%YeZ *5[e\ (]e^ %e_e` )%aeb )%ced teef geh Tiej tke el $($)%/!&"&).*/ %$)',$"!&#( Ie e eN ~5 -- 3C   11$a 8 #A	
 -a *1 .q  )! !! 0  ;A 7 *1  /!*&A1 %a 3A	
 =a DQ )! 7 A! H %a =a <Q +A 4Q  ?!" 0#$ (% (+Q. B1 +A	
 ,Q -a 0 3A Fq / :1 4Q ;A <Q ?  .q!" +A#$ .q% +) )+? ?@ '$!&"&!..x88!..x88 !y!1! '! ~	!
 
! y! z! y! {! x! i! ! +! }! |!  !!&$m)+? %&9  !1	
 ":   $%5 ' 4Z 0 0 '
 &'7 &': #$7  *+;!" 23F#$ )<):*;(4!--  2 =P/B.:(29B4=OX6F	 	3# #J  &34/  ,4)/ 
 6$ #$+/ &  %&+(,,0,1).+06:#'#'"'#(	( ( #(/4$)$)+/27#()$ $, %)&+!%$*%)*/& & ',#'$)*/	# # ',!%#($)*.( ( $(&+!%$*,-%)#'$)*/	* 	* #'q9 9v ## 
 ## C CSMB
 MB
 M M M	    c                 F    |                                  | j        d         z
  S )Nr   )millisecondsr  )r  s    r  noncezlatoken.noncem  s!      ""T\2B%CCCr  c                 h   K   |                      |           d{V }|                     |d          S )a[  
        fetches the current integer timestamp in milliseconds from the exchange server

        https://api.latoken.com/doc/v2/#tag/Time/operation/currentTime

        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns int: the current integer timestamp in milliseconds from the exchange server
        N
serverTime)publicGetTimesafe_integer)r  paramsresponses      r  
fetch_timezlatoken.fetch_timep  sE       ++F33333333   <888r  c                   K   |                      |           d{V }|                     | j        dd          r|                                  d{V  |                     | j        di           }|                     |d          }g }t          dt          |                    D ]-}||         }|                     |d          }|                     |d          }	|                     |d          }
|                     ||	          }|                     ||
          }|                     |d	          }|                     |d	          }||| 	                    |                     |d
                    }| 	                    |                     |d
                    }|
                                }|                     |          }|                     |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|                     |d          |                     |d           d!ddd"|                     |d#          dd"ddd"|                     |d$|z             |                     |d%|z             d"d&|                     |d'          |d(
           /|S ))a"  
        retrieves data on all markets for latoken

        https://api.latoken.com/doc/v2/#tag/Pair/operation/getActivePairs

        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict[]: an array of objects representing market data
        Nr   FcachedCurrenciesr  r   baseCurrencyquoteCurrencyinfotagstatussymbol/basequotesettlebaseIdquoteIdsettleIdtyper/   Tr0   r1   r2   r3   activePAIR_STATUS_ACTIVEcontractr  quantityTick	priceTick)amountpriceminmaxminOrderQuantityminOrderCostmaxOrderCost)r   r6  r7  costcreated)
r  contractSizeexpiryexpiryDatetimestrike
optionType	precisionlimitsr?  r%  )publicGetPair	safe_boolr  load_time_difference	safe_dictindex_byrangelensafe_stringsafe_currency_codelower
capitalizeappendsafe_numberr  )r  r  r  
currenciescurrenciesByIdresultimarketr  r-  r.  r#  r$  baseCurrencyInfoquoteCurrencyInfor*  r+  lowercaseQuotecapitalizedQuoter'  s                       r  fetch_marketszlatoken.fetch_markets  s      ++F33333333* >>$,(A5II 	.++---------^^DL2DbII
z488q#h--(( @	 @	Aa[F!!&$//B%%fn==F&&v??G>>.&AAL NN>7CCM#~~lFCC $}f E E+0A0M..t/?/?@PRW/X/XYY//0@0@ARTY0Z0Z[[!&#'??>#B#B ))&(;; 0"0dSj50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$  $$("&*""&"&"2"26>"J"J!%!1!1&+!F!F" " $(#'% %
 $(#3#3F<N#O#O#'# #
 $(#'" "
 $(#3#3FNM]<]#^#^#'#3#3FNM]<]#^#^! ! $  $00CC"_0 0 0 0 0 0b r  c                   K   |                      |           d{V }i }t          dt          |                    D ].}||         }|                     |d          }|                     |d          }|                     |          }|                     |d          }	|	dk    p|	dk    }
|                     ||||                     |d          |
rd	nd
|                     |d          dk    dd|                     |d          |                     |                     |                     |d                              |                     |d          ddddddi d          ||<   0|S )z
        fetches all available currencies on an exchange
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: an associative dictionary of currencies
        Nr   r  r&  r0  CURRENCY_TYPE_CRYPTOCURRENCY_TYPE_IEOr  cryptootherr'  CURRENCY_STATUS_ACTIVEfeedecimalsminTransferAmountr8  )r6  withdraw)r  coder%  r  r0  r1  depositrg  rd  rE  rF  networks)	publicGetCurrencyrL  rM  rN  rO  safe_currency_structurerS  r  parse_precision)r  r  r  rV  rW  r   r  r&  rh  currencyTypeisCryptos              r  fetch_currencieszlatoken.fetch_currencies  s      //77777777B q#h--(( 	 	A{H!!(D11B""8U33C**3//D++Hf==L$(>>e,ReBeH77 ((6::$,9'**8X>>BZZ ''%88!..t/C/CDDTDTU]_iDjDj/k/kll  $//:MNN# 
  $#! !	 	 +9 9  F4LL. r  c                   K   |                                   d{V  |                     |           d{V }|ddd}d}|                     | j        ddd          }|                     |d|          }|                     | j        di           }|                     |||          }|                     |d          }	|                     |	|g           }
t          dt          |
                    D ]}|
|         }|                     |d	          }| 	                    |d
          }|||}nt          ||          }|                     |          }|                                 }|                     |d          |d<   |                     |d          |d<   |||<   ||d
<   |                     |          |d<   |                     |          S )aq  
        query for balance and get the amount of funds available for trading or funds locked in orders

        https://api.latoken.com/doc/v2/#tag/Account/operation/getBalancesByUser

        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a `balance structure <https://docs.ccxt.com/?id=balance-structure>`
        N)r%  	timestampdatetimerB   r   r/   r0  r   r   r   rr  	availablefreeblockedusedrs  )load_marketsprivateGetAuthAccountsafe_string_2r  rN  
safe_valuegroup_byrL  rM  r  r:  rO  accountiso8601safe_balance)r  r  r  rV  maxTimestampr   r0  r   accountTypebalancesByTypebalancesrW  balance
currencyIdrr  rh  r}  s                    r  fetch_balancezlatoken.fetch_balance/  s      !!!!!!!!!33F;;;;;;;;0 
 

 ((~}V\]]<<gr::&&udD99x88??>;CCq#h--(( 	# 	#AqkG))':>>J))';??I$'#,LL#&|Y#?#?L**:66DllnnG"..wDDGFO"..w	BBGFO"F4LL*{!\\,77z  (((r  Nr(  r   c           	      (  K   |                                   d{V  |                     |          }|d         |d         d}|||d<   |                     |                     ||                     d{V }|                     ||ddddd	          S )
aA  
        fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

        https://api.latoken.com/doc/v2/#tag/Order-Book/operation/getOrderBook

        :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
        Nr-  r.  r   r+  r   bidaskr7  quantity)rx  rX  publicGetBookCurrencyQuoteextendparse_order_book)r  r(  r   r  rX  requestr  s          r  fetch_order_bookzlatoken.fetch_order_bookn  s       !!!!!!!!!V$$x(I&
 
 $GG88Wf9U9UVVVVVVVV" $$XvtUE7T^___r  r   rX  c                    |                      |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|          S )Nr(  	lastPriceupdateTimestamprr  rs  lowhighr  bestBid	bidVolumebestBidQuantityr  bestAsk	askVolumebestAskQuantityvwapopencloselastpreviousClosechanger   	change24haverage	amount24h	volume24h)
baseVolumequoteVolumer%  )rN  safe_integer_omit_zerosafe_tickersafe_symbolr~  )r  r   rX  marketIdr  rr  s         r  parse_tickerzlatoken.parse_ticker  s   * ##FH5544//8IJJ	 !
d&&x88!
!
 Y//!
 4	!

 D!
 4##FI66!
 ))&2CDD!
 4##FI66!
 ))&2CDD!
 D!
 D!
 T!
 D!
 T!
 d!
  $**6;??!!
" t#!
$ **6;??++FK@@)!
 !
 !
* +  	r  c                   K   |                                   d{V  |                     |          }|d         |d         d}|                     |                     ||                     d{V }|                     ||          S )a  
        fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

        https://api.latoken.com/doc/v2/#tag/Ticker/operation/getTicker

        :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>`
        Nr-  r.  )r*  r+  )rx  rX  publicGetTickerBaseQuoter  r  r  r(  r  rX  r  r  s         r  fetch_tickerzlatoken.fetch_ticker  s       !!!!!!!!!V$$8$I&
 
 66t{{7F7S7STTTTTTTT*   6222r  symbolsc                    K   |                                   d{V  |                     |           d{V }|                     ||          S )a  
        fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

        https://api.latoken.com/doc/v2/#tag/Ticker/operation/getAllTickers

        :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>`
        N)rx  publicGetTickerparse_tickers)r  r  r  r  s       r  fetch_tickerszlatoken.fetch_tickers  si       !!!!!!!!!--f55555555. !!(G444r  tradec                 Z   d }|                      |d          }|                     |d          }|                     |d          }|                     |d          }|                     |d          }|                     |d          }	|	|rdnd}	n|	d	k    rd}	n|	d
k    rd}	|	dk    }
|r|
rdnd}|                     |d          }|                     |d          }|                     |          }|                     |          }|dz   |z   }|| j        v r|                     |          }|                     |d          }|                     |d          }|                     |d          }d }|||d}|                     |||                     |          ||||||	||||d|          S )Nrr  r7  r  r>  
makerBuyer	directionsellbuyTRADE_DIRECTION_BUYTRADE_DIRECTION_SELLr   r   r#  r$  r)  r  orderrd  )r>  r   )r%  rr  rs  r(  r  r  r0  takerOrMakersider7  r6  r>  rd  )r  rN  r{  rO  marketsrX  
safe_trader~  )r  r  rX  r0  rr  priceStringamountString
costStringr  r  isBuyr  r-  r.  r*  r+  r(  r  orderIdfeeCostrd  s                        r  parse_tradezlatoken.parse_trade  s   B %%e[99	&&ug66''z::%%eV44
__UL99
{33<'266UDD,,,///#-E%Ewwg!!%88""5/::&&v..''00e#T\!![[((FeT**""5'22""5%00! C "Y//( " 
  
   	r  sincec                 >  K   |                                   d{V  |                     |          }|d         |d         d}|t          |d          |d<   |                     |                     ||                     d{V }|                     ||||          S )a)  
        get the list of most recent trades for a particular symbol

        https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByPair

        :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>`
        Nr-  r.  r  d   r   )rx  rX  r9  "publicGetTradeHistoryCurrencyQuoter  parse_trades)r  r(  r  r   r  rX  r  r  s           r  fetch_tradeszlatoken.fetch_trades_  s       !!!!!!!!!V$$x(I&
 
 "5#GG@@WV\A]A]^^^^^^^^   65%@@@r  c                 |  K   |                      | j        di           }|                     |dd          }|                     |d|          }|                     |d          }|dk    r|                     ||           d{V S |dk    r|                     ||           d{V S t          | j        dz             )a  
        fetch the trading fees for a market

        https://api.latoken.com/doc/v2/#tag/Trade/operation/getFeeByPair
        https://api.latoken.com/doc/v2/#tag/Trade/operation/getAuthFeeByPair

        :param str symbol: unified market symbol
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a `fee structure <https://docs.ccxt.com/?id=fee-structure>`
        r   r   r   NfetchPublicTradingFeez not support self method)r{  r  rN  omitfetch_private_trading_feefetch_public_trading_feer"   r  )r  r(  r  r  defaultMethodr   s         r  fetch_trading_feezlatoken.fetch_trading_fee  s       //$,0A2FF(((<TUU!!&(MBB68,,---77GGGGGGGGG...66vvFFFFFFFFFtw)CCDDDr  c                 R  K   |                                   d {V  |                     |          }|d         |d         d}|                     |                     ||                     d {V }||d         |                     |d          |                     |d          d d dS Nr-  r.  r  r(  makerFeetakerFee)r%  r(  r   r   r   r   )rx  rX  publicGetTradeFeeCurrencyQuoter  rS  r  s         r  r  z latoken.fetch_public_trading_fee  s      !!!!!!!!!V$$x(I&
 
 <<T[[RX=Y=YZZZZZZZZ X&%%h
;;%%h
;;
 
 	
r  c                 R  K   |                                   d {V  |                     |          }|d         |d         d}|                     |                     ||                     d {V }||d         |                     |d          |                     |d          d d dS r  )rx  rX  #privateGetAuthTradeFeeCurrencyQuoter  rS  r  s         r  r  z!latoken.fetch_private_trading_fee  s      !!!!!!!!!V$$x(I&
 
 AA$++gW]B^B^________ X&%%h
;;%%h
;;
 
 	
r  c                   K   |                                   d{V  i }d}|||d<   d}|[|                     |          }|d         |d<   |d         |d<   |                     |                     ||                     d{V }n/|                     |                     ||                     d{V }|                     ||||          S )aZ  
        fetch all trades made by the user

        https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByTrader
        https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByAssetAndTrader

        :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   r.  r+  )rx  rX  $privateGetAuthTradePairCurrencyQuoter  privateGetAuthTrader  )r  r(  r  r   r  r  rX  r  s           r  fetch_my_tradeszlatoken.fetch_my_trades  s
      !!!!!!!!!
 $GG[[((F"("2GJ%i0GG!FFt{{SZ\bGcGcddddddddHH!55dkk'66R6RSSSSSSSSH&   65%@@@r  r'  c                 <    dddd}|                      |||          S )Nr  closedcanceled)ORDER_STATUS_PLACEDORDER_STATUS_CLOSEDORDER_STATUS_CANCELLEDrN  r  r'  statusess      r  parse_order_statuszlatoken.parse_order_status  s1    #)#+&0
 

 &&999r  c                 :    ddd}|                      |||          S )NrX  r   )ORDER_TYPE_MARKETORDER_TYPE_LIMITr  r  s      r  parse_order_typezlatoken.parse_order_type  s.    !) '
 
 &&999r  r   c                 <    dddd}|                      |||          S )NGTCr   r   )#ORDER_CONDITION_GOOD_TILL_CANCELLED#ORDER_CONDITION_IMMEDIATE_OR_CANCELORDER_CONDITION_FILL_OR_KILLr  )r  r   timeInForcess      r  parse_time_in_forcezlatoken.parse_time_in_force	  s1    3838,1
 

 k;GGGr  r  c                 j   |                      |d          }|                     |d          }|                      |d          }|                      |d          }|                     |          }|                     |          }d }	|(|&|dz   |z   }	|	| j        v r|                     |	          }|                      |d          }
d }|
=|
                    d          }t          |          }|                     ||dz
            }|                     |                      |d	                    }|                      |d
          }|                      |d          }|                      |d          }|                      |d          }| 	                    |                      |d                    }|                      |d          }|7|
                    d          dk    rd}n|
                    d          dk    r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 |          S )!Nr  rr  r#  r$  r)  r  _r   r0  r7  r  filledr>  r'  messagecancelr   r  acceptr  clientOrderId	conditionr%  rs  lastTradeTimestampr(  r   postOnlyr   	stopPricer6  )r  	remainingrd  trades)rN  r  rO  r  rX  splitrM  safe_string_lowerr  r  findr  
safe_orderr~  )r  r  rX  r  rr  r-  r.  r*  r+  r(  	orderSider  partspartsLengthr0  r7  r6  r  r>  r'  r  r  r   s                          r  parse_orderzlatoken.parse_order  sX   X eT**%%e[99	!!%88""5/::&&v..''005#4CZ%'F%%V,,$$UF33	 OOC((Ee**K))%qAAD$$T%5%5eV%D%DEE  00!!%44!!%22v..(()9)9%)J)JKK""5)44||H%%**#h''1,,((@@..t/?/?{/S/STT  
" 
] 
 E 
 	 

 Y// 
 !$ 
 f 
 f 
 D 
 ; 
  
 D 
 U 
 D,,UK@@ 
 D 
  f! 
" f# 
$ + 
  
  
, -  	r  c                   K   |t          | j        dz             |                                  d{V  d}|                     |dd          }|                     |d          }|                     |          }|d         |d         d}|r0|                     |                     ||                     d{V }n/|                     |                     ||                     d{V }| 	                    ||||          S )a  
        fetch all unfilled currently open orders

        https://api.latoken.com/doc/v2/#tag/Order/operation/getMyActiveOrdersByPair
        https://api.latoken.com/doc/v2/#tag/StopOrder/operation/getMyActiveStopOrdersByPair  # stop

        :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
        :param boolean [params.trigger]: True if fetching trigger orders
        :returns Order[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
        Nz- fetchOpenOrders() requires a symbol argumentr   stopr-  r.  r  )
r   r  rx  safe_value_2r  rX  .privateGetAuthStopOrderPairCurrencyQuoteActiver  *privateGetAuthOrderPairCurrencyQuoteActiveparse_orders)	r  r(  r  r   r  r  	isTriggerrX  r  s	            r  fetch_open_orderszlatoken.fetch_open_orderst  s9      >#DG.]$]^^^!!!!!!!!!%%fi@@	66**V$$x(I&
 
  	k!PPQUQ\Q\]dflQmQmnnnnnnnnHH!LLT[[Y`bhMiMijjjjjjjjH.   65%@@@r  c                   K   |                                   d{V  i }d}|                     |dd          }|                     |ddg          }|||d<   d}||                     |          }|d         |d<   |d         |d<   |r0|                     |                     ||                     d{V }n|                     |                     ||                     d{V }na|r0|                     |                     ||                     d{V }n/|                     |                     ||                     d{V }| 	                    ||||          S )	a  
        fetches information on multiple orders made by the user

        https://api.latoken.com/doc/v2/#tag/Order/operation/getMyOrders
        https://api.latoken.com/doc/v2/#tag/Order/operation/getMyOrdersByPair
        https://api.latoken.com/doc/v2/#tag/StopOrder/operation/getMyStopOrders       # stop
        https://api.latoken.com/doc/v2/#tag/StopOrder/operation/getMyStopOrdersByPair  # stop

        :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 boolean [params.trigger]: True if fetching trigger orders
        :returns Order[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
        Nr   r  r   r-  r   r.  r+  )
rx  r  r  rX  (privateGetAuthStopOrderPairCurrencyQuoter  $privateGetAuthOrderPairCurrencyQuoteprivateGetAuthStopOrderprivateGetAuthOrderr  )	r  r(  r  r   r  r  rX  r  r  s	            r  fetch_orderszlatoken.fetch_orders  s       !!!!!!!!!
 %%fi@@	6FI#677$GG[[((F"("2GJ%i0GG i!%!N!Nt{{[bdjOkOk!l!lllllll!%!J!J4;;W^`fKgKg!h!hhhhhhh X!%!=!=dkk'SY>Z>Z![![[[[[[[!%!9!9$++gv:V:V!W!WWWWWWW.   65%@@@r  r  c                   K   |                                   d{V  d|i}|                     |dd          }|                     |ddg          }d}|r0|                     |                     ||                     d{V }n/|                     |                     ||                     d{V }|                     |          S )a1  
        fetches information on an order made by the user

        https://api.latoken.com/doc/v2/#tag/Order/operation/getOrderById
        https://api.latoken.com/doc/v2/#tag/StopOrder/operation/getStopOrderById

        :param str id: order id
        :param str [symbol]: not used by latoken fetchOrder
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :param boolean [params.trigger]: True if fetching a trigger order
        :returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>`
        Nr  r   r  )rx  r  r  !privateGetAuthStopOrderGetOrderIdr  privateGetAuthOrderGetOrderIdr  r  r  r(  r  r  r  r  s          r  fetch_orderzlatoken.fetch_order  s       !!!!!!!!!"
 %%fi@@	6FI#677 	^!CCDKKPWY_D`D`aaaaaaaaHH!??GU[@\@\]]]]]]]]H* )))r  r0  r  r6  r7  c           
        K   |                                   d{V  |                     |          }|                                }|d         |d         |                                d||                                 |                     ||          |                                 d}	|dk    r|                     ||          |	d<   |                     |dd	          }
|                     |dd	g          }d}|
I|                     ||
          |	d	<   | 	                    | 
                    |	|                     d{V }n/|                     | 
                    |	|                     d{V }|                     ||          S )
a5  
        create a trade order

        https://api.latoken.com/doc/v2/#tag/Order/operation/placeOrder
        https://api.latoken.com/doc/v2/#tag/StopOrder/operation/placeStopOrder  # stop

        :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 float [params.triggerPrice]: the price at which a trigger order is triggered at

 EXCHANGE SPECIFIC PARAMETERS
        :param str [params.condition]: "GTC", "IOC", or  "FOK"
        :param str [params.clientOrderId]: [0 .. 50] characters, client's custom order id(free field for your convenience)
        :returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
        Nr-  r.  r  )r#  r$  r  r  r0  r  r  rr  LIMITr7  r   r  )rx  rX  upperuuidamount_to_precisionsecondsprice_to_precisionrz  r  privatePostAuthStopOrderPlacer  privatePostAuthOrderPlacer  )r  r(  r0  r  r6  r7  r  rX  uppercaseTyper  r   r  s               r  create_orderzlatoken.create_order  s     ( !!!!!!!!!V$$

"8,#I.JJLL!!YY[[ 00@@
 
 G###66vuEEGG))&.+NN6NK#@AA##'#:#:6<#P#PGK !??GU[@\@\]]]]]]]]HH!;;DKKQW<X<XYYYYYYYYH &111r  c                   K   |                                   d{V  d|i}|                     |dd          }|                     |ddg          }d}|r0|                     |                     ||                     d{V }n/|                     |                     ||                     d{V }|                     |          S )a  
        cancels an open order

        https://api.latoken.com/doc/v2/#tag/Order/operation/cancelOrder
        https://api.latoken.com/doc/v2/#tag/StopOrder/operation/cancelStopOrder  # stop

        :param str id: order id
        :param str symbol: not used by latoken cancelOrder()
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :param boolean [params.trigger]: True if cancelling a trigger order
        :returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>`
        Nr  r   r  )rx  r  r  privatePostAuthStopOrderCancelr  privatePostAuthOrderCancelr  r  s          r  cancel_orderzlatoken.cancel_orderU  s       !!!!!!!!!"
 %%fi@@	6FI#677 	[!@@WV\A]A]^^^^^^^^HH!<<T[[RX=Y=YZZZZZZZZH )))r  c                   K   |                                   d{V  i }d}|                     |dd          }|                     |ddg          }d}||                     |          }|d         |d<   |d         |d<   |r0|                     |                     ||                     d{V }n|                     |                     ||                     d{V }na|r0|                     |                     ||                     d{V }n/|                     |                     ||                     d{V }| 	                    d|i          gS )	a)  
        cancel all open orders in a market

        https://api.latoken.com/doc/v2/#tag/Order/operation/cancelAllOrders
        https://api.latoken.com/doc/v2/#tag/Order/operation/cancelAllOrdersByPair

        :param str symbol: unified market symbol of the market to cancel orders in
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :param boolean [params.trigger]: True if cancelling trigger orders
        :returns dict[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
        Nr   r  r-  r   r.  r+  r%  )
rx  r  r  rX  .privatePostAuthStopOrderCancelAllCurrencyQuoter  *privatePostAuthOrderCancelAllCurrencyQuote!privatePostAuthStopOrderCancelAllprivatePostAuthOrderCancelAllr  )r  r(  r  r  rX  r  r  s          r  cancel_all_orderszlatoken.cancel_all_ordersx  s      !!!!!!!!!
 %%fi@@	6FI#677[[((F"("2GJ%i0GG o!%!T!TUYU`U`ahjpUqUq!r!rrrrrrr!%!P!PQUQ\Q\]dflQmQm!n!nnnnnnn b!%!G!GT[]cHdHd!e!eeeeeee!%!C!CDKKPWY_D`D`!a!aaaaaaa OO  
 	
r  rh  c                 ,  K   |                                   d{V  i }|                     |                     ||                     d{V }d}||                     |          }|                     |dg           }|                     ||||          S )ak  
 @deprecated
        use fetchDepositsWithdrawals instead

        https://api.latoken.com/doc/v2/#tag/Transaction/operation/getUserTransactions

        :param str code: unified currency code for the currency of the transactions, default is None
        :param int [since]: timestamp in ms of the earliest transaction, default is None
        :param int [limit]: max number of transactions 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>`
        Ncontent)rx  privateGetAuthTransactionr  r   	safe_listparse_transactions)	r  rh  r  r   r  r  r  r   r5  s	            r  fetch_transactionszlatoken.fetch_transactions  s       !!!!!!!!!
 77GV8T8TUUUUUUUU6 }}T**H..9b99&&w%GGGr  transactionr   c                    |                      |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S )Nr  rr  r   r'  r6  senderAddressrecipientAddresstransactionHashmemo)r   r>  ratetransactionFeer>  r0  r%  txidrs  networkaddressFrom	addressToaddresstagFromtagTor&  updated)commentinternalrd  )rN  r  rO  parse_transaction_statusrS  parse_transaction_typer~  )r  r:  r   r  rr  r  rh  r'  r6  rD  rE  rB  rH  rd  r  r0  s                   r  parse_transactionzlatoken.parse_transaction  sF   & k400%%k;??	%%k:>>
&&z8<<..t/?/?X/V/VWW!!+x88&&{ODD$$[2DEE	->??  f55
 

 "";0@AA!CK"C
O**4+;+;K+P+PQQ
K
"
 D
 	

 Y//
 t
 ;
 
 y
 t
 U
 5
 D
 f
 
  f!
" t#
$ )
 
 
 	
r  c                 B    ddddddd}|                      |||          S )Nokpendingr  failedrejected)TRANSACTION_STATUS_CONFIRMEDTRANSACTION_STATUS_EXECUTEDTRANSACTION_STATUS_CHECKINGTRANSACTION_STATUS_CANCELLEDTRANSACTION_STATUS_FAILEDTRANSACTION_STATUS_REJECTEDr  r  s      r  rL  z latoken.parse_transaction_status  s:    ,0+/+4,6)1+5
 
 &&999r  c                 :    ddd}|                      |||          S )Nri  
withdrawal)TRANSACTION_TYPE_DEPOSITTRANSACTION_TYPE_WITHDRAWALr  )r  r0  r   s      r  rM  zlatoken.parse_transaction_type"  s.    (1+7
 
 tT222r  c                    K   |                                   d{V  |                     |          }|                     |           d{V }|                     |dg           }|                     ||||          S )aD  
        fetch a history of internal transfers made on an account

        https://api.latoken.com/doc/v2/#tag/Transfer/operation/getUsersTransfers

        :param str code: unified currency code of the currency transferred
        :param int [since]: the earliest time in ms to fetch transfers for
        :param int [limit]: the maximum number of  transfers structures to retrieve
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict[]: a list of `transfer structures <https://docs.ccxt.com/?id=transfer-structure>`
        Nr5  )rx  r   privateGetAuthTransferr7  parse_transfers)r  rh  r  r   r  r   r  	transferss           r  fetch_transferszlatoken.fetch_transfers)  s       !!!!!!!!!==&&44V<<<<<<<<@ NN8Y;;	##IxFFFr  fromAccount	toAccountc                 H  K   |                                   d{V  |                     |          }|d         ||                     ||          d}d}|                    d          dk    r0|                     |                     ||                     d{V }nrt          |          dk    r0|                     |                     ||                     d{V }n/|                     |                     ||                     d{V }| 	                    |          S )a  
        transfer currency internally between wallets on the same account

        https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferByEmail
        https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferById
        https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferByPhone

        :param str code: unified currency code
        :param float amount: amount to transfer
        :param str fromAccount: account to transfer from
        :param str toAccount: account to transfer to
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a `transfer structure <https://docs.ccxt.com/?id=transfer-structure>`
        Nr  )r   	recipientvalue@r   $   )
rx  r   currency_to_precisionr  privatePostAuthTransferEmailr  rM  privatePostAuthTransferIdprivatePostAuthTransferPhoneparse_transfer)	r  rh  r6  rc  rd  r  r   r  r  s	            r  r   zlatoken.transferZ  sK      !!!!!!!!!==&& "//f==
 

 >>#!##!>>t{{7TZ?[?[\\\\\\\\HH^^r!!!;;DKKQW<X<XYYYYYYYYHH!>>t{{7TZ?[?[\\\\\\\\H. ""8,,,r  r   c                    |                      |d          }|                     |d          }|                     |d          }||                     |d          |                     |d          |                     |          |                     ||          |                     |d          |                     |d          |                     |d          |                     |          d	S )	Nrr  r   r'  r  transferringFundsrc  rd  )	r%  r  rr  rs  r   r6  rc  rd  r'  )safe_timestamprN  r  r~  rO  rS  parse_transfer_status)r  r   r   rr  r  r'  s         r  rn  zlatoken.parse_transfer  s    . ''+>>	%%h
;;
!!(H55""8T22**8[AAY////
HEE&&x1DEE++HmDD))(K@@0088

 

 
	
r  c                 @    dddddd}|                      |||          S )NrP  rQ  rR  r  )TRANSFER_STATUS_COMPLETEDTRANSFER_STATUS_PENDINGTRANSFER_STATUS_REJECTEDTRANSFER_STATUS_UNVERIFIEDTRANSFER_STATUS_CANCELLEDr  r  s      r  rr  zlatoken.parse_transfer_status  s7    )-'0(0*3)3
 
 &&999r  r   GETc                 V   d| j         z   dz   |                     ||          z   }|}|                     ||                     |                    }	|                     |	          }
|dk    r
|	r|d|
z   z  }|dk    r|                                  ||z   |
z   }|                     |                     |          |                     | j                  t          j
                  }| j        |dd}|dk    rd|d	<   |                     |	          }| j        d
         d         |z   }||||dS )Nr)  ry  ?r   zHMAC-SHA512)zX-LA-APIKEYzX-LA-SIGNATUREzX-LA-DIGESTPOSTzapplication/jsonzContent-Typer   r   )urlr   bodyheaders)r  implode_paramsr  extract_params	urlencodecheck_required_credentialshmacencodesecrethashlibsha512apiKeyjsonr	  )r  pathr   r   r  r  r~  r  requestStringqueryurlencodedQueryauth	signaturer}  s                 r  signzlatoken.sign  sC   $s*T-@-@v-N-NN		&$"5"5d";";<<..//U?? 7!66)++---G#o5D		$++d"3"3T[[5M5Mw~^^I#{"+, G
 *<'yy''iv&6fdwOOOr  reasonr}  r   r  r~  c
                    |sd S |                      |d          }
| j        dz   |z   }|
D|                     | j        d         |
|           |                     | j        d         |
|           |                     |d          }|                      |d          }||S|                     | j        d         ||           |                     | j        d         ||           t          |          d S )Nr   r   r   error)rN  r  throw_exactly_matched_exceptionr  throw_broadly_matched_exceptionr{  r   )r  rh  r  r}  r   r  r~  r  requestHeadersrequestBodyr  feedbackr  errorMessages                 r  handle_errorszlatoken.handle_errors  s    	4 ""8Y777S=4'001I7T\]]]001I7T\]]]'22''y99<#;001I5RZ[[[001I4QYZZZ)))tr  )N)r   ry  NNN)@__name__
__module____qualname__r   r  r  r	   r   r   r
   r]  r   rp  r   r  strr   r  dictr   r  r  r   r   r  r   r  r  r   r  r  r  r   r  r  r  r  r   r  r  r  r  r   r   floatr   r)  r-  r3  r9  r   r   rN  rL  rM  r   rb  r   rn  rr  r  intr  __classcell__)r  s   @r  r(   r(      s       N# N N N N N N`
D D D ') 9 9S 9 9 9 9" *, d dV d d d dL -/ F F: F F F FP *, =) =) =) =) =) =)~ @DB $` $`S $` $`S\ $` $` $` $`L- -4 - -6 - - - -^ 68 %3 %3 %3F %3 %3 %3 %3N 6:" "5 "57 "5 "5 "5 "5 "5HO O Ov O O O O Ob <@d[] A A AS A Abfglbm A A A A@ ;= E Ec EAT E E E E, BD 
 
S 
 
 
 
2 CE 
 
c 
 
 
 
2 37TX\eg 1A 1AC 1As 1ARU 1A 1A 1A 1Af: : : : :: : :Hs H H H Ha a av a a a a aF 59tZ^gi 4A 4Ac 4A 4ATW 4Anrsxny 4A 4A 4A 4Al 04$UYbd @A @A @AC @As @Aimnsit @A @A @A @AD 8<B ,* ,*C ,* ,* ,* ,* ,*\ mqy{ 92 92 92I 92Y 92X] 92fi 92 92 92 92v 9=R !* !*S !*# !* !* !* !*F 59 ,
 ,
c ,
 ,
 ,
 ,
\ 48dY]fh 1H 1HS 1H 1HSV 1H 1H 1H 1Hf<
 <
T <
X <
Q\ <
 <
 <
 <
|	:s 	: 	: 	: 	:3 3 3 154VZce /G /G# /GS /GPS /Gjno|j} /G /G /G /Gb ac 3- 3-3 3- 3-C 3-TW 3-gt 3- 3- 3- 3-j$
 $
t $
x $
= $
 $
 $
 $
L:C :C : : : :P P P P.# s  c TX `c        r  r(   ), ccxt.async_support.base.exchanger   ccxt.abstract.latokenr   r  ccxt.base.typesr   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   r    r!   r"   r#   r$   r%   ccxt.base.decimal_to_precisionr&   r(    r  r  <module>r     s~   6 5 5 5 5 5 - - - - - -  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q  Q       * * * * * * 0 0 0 0 0 0 - - - - - - - - - - - - . . . . . . ' ' ' ' ' ' & & & & & & . . . . . . ) ) ) ) ) ) ) ) ) ) ) ) . . . . . . 1 1 1 1 1 1 ) ) ) ) ) ) 4 4 4 4 4 4O O O O Oh O O O O Or  