
    eiG(                       d dl mZ d dlmZ d dlZd dlZd dlmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZmZ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%  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TradingFeesTransaction)List)ExchangeError)AuthenticationError)ArgumentsRequired)
BadRequest)InsufficientFunds)InvalidOrder)	TICK_SIZE)Precisec                       e Zd Zdef fdZi fdefdZi fdee         fdZ	de
defdZdGd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di fd
ededefdZdGd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fdZdGdedefdZdddi fd
ededededee         f
dZd ZdefdZ i fdefdZ!de"fdZ#dGde
dede$fdZ%di fd
ed e&d!e'd"e(d#e)f
d$Z*di fd%ed
e"fd&Z+d' Z,di fd(ee         d
e"dee$         fd)Z-di fd
e"dee$         fd*Z.di fd%ed
e"fd+Z/dddi fd
e"dededee$         fd,Z0dddi fd
e"dedefd-Z1dddi fd
e"dededee$         fd.Z2dddi fd
e"dedefd/Z3de"fd0Z4dGd1e
d2e5de6fd3Z7dddi fd4e"dededee6         fd5Z8dddi fd4e"dededee6         fd6Z9di fd%ed4e"fd7Z:di fd4ed"e(d8ed9e"de6f
d:Z;dGd2e5fd;Z<di fd<efd=Z=d>d?i ddfd@Z>d4e?dAedBedCedDe
dEefdFZ@ xZAS )Hbitoproreturnc                 	   |                      t          t          |                                           i ddddddgddd	d
dddi dd ddddddddddddddddddddddddddddddddi d dd!dd"dd#dd$dd%dd&dd'dd(dd)dd*dd+dd,dd-dd.dd/dd0di d1dd2dd3d4d5dd6dd7dd8dd9dd:dd;dd<dd=dd>dd?dd@ddAddBdi dCddDddEddFddGddHddIddJddKddLddMddNddOddPddQddRddSdi dTddUddVddWddXddYddZdd[dd\dd]dd^dd_dd`ddaddbddcddddi deddfddgddhddiddjddkddlddmddnddoddpddqddrddsddtddudddddddvdwdxdydzd{d|d}d~dddddddddiddgdddddddddddddddddd	iddddddddddd
ddddddidddddddddd|                     d          |                     d          |                     d          |                     d          g|                     d          |                     d          g|                     d          |                     d          g|                     d          |                     d          g|                     d          |                     d          g|                     d          |                     d          g|                     d          |                     d          gg|                     d          |                     d          g|                     d          |                     d          g|                     d          |                     d          g|                     d          |                     d          g|                     d          |                     d          g|                     d          |                     d          g|                     d          |                     d          ggddidddddddddgdddddd dddd dddddddddddddd dddddddddddÜdd ddddĜddddddddŜdddddddddǜddidɜ	d d dʜd d dʜd˜dt
          dt          t          t          t          t          dΜt          t          t          t          dϜdМdi           S )Nidr!   nameBitoPro	countriesTWversionv3	rateLimitd   proThasCORSspotmarginFswapfutureoption	addMarginborrowCrossMarginborrowIsolatedMarginborrowMargincancelAllOrderscancelOrdercancelOrderscloseAllPositionsclosePositioncreateOrder$createOrderWithTakeProfitAndStopLoss&createOrderWithTakeProfitAndStopLossWscreateReduceOnlyOrdercreateStopOrdercreateTriggerOrder	editOrderfetchBalancefetchBorrowInterestfetchBorrowRatefetchBorrowRateHistoriesfetchBorrowRateHistoryfetchBorrowRatesfetchBorrowRatesPerSymbolfetchClosedOrdersfetchCrossBorrowRatefetchCrossBorrowRatesfetchCurrenciesfetchDepositAddressfetchDepositsfetchDepositsWithdrawalsfetchDepositWithdrawFeeemulatedfetchDepositWithdrawFeesfetchFundingHistoryfetchFundingIntervalfetchFundingIntervalsfetchFundingRatefetchFundingRateHistoryfetchFundingRatesfetchGreeksfetchIndexOHLCVfetchIsolatedBorrowRatefetchIsolatedBorrowRatesfetchIsolatedPositionsfetchLeveragefetchLeveragesfetchLeverageTiersfetchLiquidationsfetchLongShortRatiofetchLongShortRatioHistoryfetchMarginAdjustmentHistoryfetchMarginModefetchMarginModesfetchMarketLeverageTiersfetchMarketsfetchMarkOHLCVfetchMarkPricesfetchMyLiquidationsfetchMySettlementHistoryfetchMyTrades
fetchOHLCVfetchOpenInterestfetchOpenInterestHistoryfetchOpenInterestsfetchOpenOrdersfetchOptionfetchOptionChain
fetchOrderfetchOrderBookfetchOrdersfetchOrderTradesfetchPositionfetchPositionHistoryfetchPositionModefetchPositionsfetchPositionsForSymbolfetchPositionsHistoryfetchPositionsRiskfetchPremiumIndexOHLCVfetchSettlementHistoryfetchTickerfetchTickers	fetchTimefetchTradesfetchTradingFeefetchTradingFeesfetchTransactionFeesfetchTransactionsfetchTransferfetchTransfersfetchVolatilityHistoryfetchWithdrawalfetchWithdrawalsreduceMarginrepayCrossMarginrepayIsolatedMarginsetLeverage)	setMarginsetMarginModesetPositionModetransferwithdraw
timeframes1m5m15m30m1h3h6h12h1d1w1M)r   r   r   r   r   r   r   r   r   r   r   urlszOhttps://github.com/user-attachments/assets/affc6337-b95a-44bf-aacd-04f9722364f6restzhttps://api.bitopro.com/v3zhttps://www.bitopro.comzRhttps://github.com/bitoex/bitopro-offical-api-docs/blob/master/v3-1/rest-1/rest.mdzhttps://www.bitopro.com/fees)logoapiwwwdocfeesrequiredCredentials)apiKeysecretr   get   )	zorder-book/{pair}tickersztickers/{pair}ztrades/{pair}zprovisioning/currencieszprovisioning/trading-pairsz!provisioning/limitations-and-feesztrading-history/{pair}zprice/otc/{currency})
zaccounts/balancezorders/historyzorders/all/{pair}zorders/trades/{pair}zorders/{pair}/{orderId}z#wallet/withdraw/{currency}/{serial}z"wallet/withdraw/{currency}/id/{id}z wallet/depositHistory/{currency}z!wallet/withdrawHistory/{currency}zorders/openg      ?g@
   )orders/{pair}zorders/batchzwallet/withdraw/{currency}orders   gUUUUUU?)zorders/{pair}/{id}z
orders/allr   )r   postputdelete)publicprivater   tradingz0.001z0.00203000000z0.001945000000z0.001530000000z0.0014	300000000z0.0013	550000000z0.0012
1300000000z0.0011z0.00097z0.0007z0.0006z0.0005z0.0004z0.0003)takermaker)	tierBased
percentager   r   tiersoptionsERC20TRXBSC)r   ETHr   TRC20BEP20r   TWD)networksfiatCurrenciesfeatures)IOCFOKPOGTD)
marginModetriggerPricetriggerPriceTypetriggerDirectionstopLossPricetakeProfitPriceattachedStopLossTakeProfittimeInForcehedgedtrailingleveragemarketBuyRequiresPricemarketBuyByCostselfTradePreventioniceberg  i )r   limitdaysBack	untilDayssymbolRequired)r   triggerr   r   )r   r   r   r   r   )r   r   r   r   r   r   r   i'  )r   r   r   daysBackCanceledr   r   r   r   r   )	sandboxr>   createOrdersrp   rx   ru   rz   rL   rq   )linearinverse)r0   r2   r3   precisionMode
exceptions)zUnsupported currency.zUnsupported order typezInvalid bodyzInvalid SignaturezAddress not in whitelist.)zInvalid amountzBalance for zInvalid zWrong parameter)exactbroadcommonCurrencies)
deep_extendsuperr!   describeparse_numberr   r   r   r   r   )self	__class__s    X/var/www/html/volatility/venv/lib/python3.11/site-packages/ccxt/async_support/bitopro.pyr   zbitopro.describe   s7   gt 4 4 = = ? ? BB
)BB
IBB
 $BB
 t	BB

 BB
 4BB
  lll %l 	l
 %l %l Ul $Ul 'l l "4l tl l $Ul  l  t!l" 7#l l$ 9%%l& ('l( "4)l* %d+l, U-l. /l0 &u1l2 "53l4 +E5l6 )%7l8 #E9l: ,U;l< $T=l> '?l@ (AlB "4ClD &uEl l lF  GlH +EIlJ *:KlL +DMlN &uOlP 'QlR (SlT #EUlV *5WlX $UYlZ u[l\ "5]l^ *5_l` +Ealb )%cld  elf !%gl l lh %eilj $Ukll &umln -eolp /qlr "5slt #Eulv +Ewlx ylz !%{l| "5}l~ &ul@ +EAlB  ClD dElF $UGlH +EIl l lJ %eKlL "4MlN uOlP #EQlR dSlT !$UlV uWlX #EYlZ  [l\ ']l^ $U_l` !%alb *5cld (elf %eglh )%ilj )%kl l ll tmln olp Uqlr tslt "5ulv #Dwlx 'ylz $U{l|  }l~ !%l@ )%AlB "4ClD #DElF GlH #EIlJ &uKlL uMl lN #!&#(! Wl l lBB
h  iBB
B i8 1h 7
 
CBB
X "$ $YBB
` -.#$*+)*3467=>2301
 
 -.*+-.0134?@>?<==>'(  */(.68  !! /4&')* + ) )aBB
t !%"&!..w77!..w77 "..s33T5F5Fw5O5OP!..y994;L;LY;W;WX!..y994;L;LX;V;VW!..z::D<M<Mh<W<WX!..{;;T=N=Nx=X=XY!..{;;T=N=Nx=X=XY!..|<<d>O>OPX>Y>YZ" "..s33T5F5Fw5O5OP!..y994;L;LY;W;WX!..y994;L;LX;V;VW!..z::D<M<Mh<W<WX!..{;;T=N=Nx=X=XY!..{;;T=N=Nx=X=XY!..|<<d>O>OPX>Y>YZ"  uBB
l $" ""   $)'
 
mBB
B $&+(,,0,0).+06:#(#("&#(	( ( #($)$)27+0/4#()$ $, %)&+!%$*%+*.& & ',#($)*.	# # ',!%#($)*/( ( ',!%$*%+#($)*.$ $ ',!%$*,-%*#($)*.	* 	*  #CD DL ## 
 ## UN NCBB
`	 Ya	BB
b	 -7.8$.)<1;  '3$5 *'1	  c	BB
@
  !A
BB
 B B B	    c                   K   |                      |           d{V }|                     |dg           }i }|                     | j        dg           }t          dt	          |                    D ]}||         }|                     |d          }|                     |          }	|                     |d          }
|                     |d          }|                     |d          }|                     |d	          }|                     |d
          }||ddddd}| 	                    |	|          }||	||rdndd|
o||
||d|dd||	<   |S )aA  
        fetches all available currencies on an exchange

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_currency_info.md

        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: an associative dictionary of currencies
        Ndatar   r   currencydepositr   withdrawFeeminWithdrawmaxWithdrawminmax)r   amountfiatcrypto)r$   codeinfotyper%   activer  r   fee	precisionlimitsr   )
publicGetProvisioningCurrencies	safe_listr   rangelensafe_stringsafe_currency_code	safe_boolsafe_numberin_array)r   paramsresponse
currenciesresultr   ir  
currencyIdr  r  r   r  withdrawMinwithdrawMaxr  isFiats                    r   fetch_currencieszbitopro.fetch_currencies]  s      ==fEEEEEEEE^^Hfb99
" 6FKKq#j//** !	 !	A!!}H))(J??J**:66DnnXy99G~~h
;;H""8];;C**8]CCK**8]CCK '& 
   	 	F ]]488F  "(6h!.h"$!   F4LL r   c                    K   |                                   d{V }|                     |dg           }|                     |          S )aF  
        retrieves data on all markets for bitopro

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_trading_pair_info.md

        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict[]: an array of objects representing market data
        Nr  )!publicGetProvisioningTradingPairsr  parse_markets)r   r  r  marketss       r   fetch_marketszbitopro.fetch_markets  sV       ??AAAAAAAA..6266* !!'***r   marketc                 *   |                      |d           }|                     |d          }|                                }|                     |d          }|                     |d          }|                     |          }|                     |          }|dz   |z   }	|                     |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                              |                     |                     |                     |d                              d|d |dS )Nmaintainpairbasequote/minLimitBaseAmountmaxLimitBaseAmountr  )r
  pricecostr   r$   uppercaseIdsymbolbaseIdquoteIdsettlesettleIdr  r0   Tr1   Fr2   r3   r4   contractr   quotePrecisionbasePrecision)r5  r
  )r   contractSizeexpiryexpiryDatetimestrike
optionTyper  r  r  createdr  )r  r  upperr  r  r   parse_precision)r   r,  r  r$   r7  r9  r:  r0  r1  r8  r  s              r   parse_marketzbitopro.parse_market  s}   ^^FJ777ff--hhjj!!&&11""6733&&v..''00e# ''0DEE''0DEE 
  
  
  
 
$ 
" 
; 
 f 
 D	 

 U 
 d 
 u 
 d 
  
 F 
 D 
 e 
 E 
 e 
 e 
  ! 
" d# 
$  "**4+?+?@P@PQWYi@j@j+k+kll++D,@,@AQAQRXZiAjAj,k,kll  ? 
  
  
  	
r   Ntickerc                    |                      |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          d |d|          S )Nr/  r8  	timestampdatetimehighhigh24hrlowlow24hrbid	bidVolumeask	askVolumevwapopenclose	lastPricelastpreviousClosechanger   priceChange24hraverage
volume24hr)
baseVolumequoteVolumer  )r  safe_marketsafe_ticker)r   rI  r,  marketIdr8  s        r   parse_tickerzbitopro.parse_ticker  s    ##FF33!!(F33!!&(33 !
f!
!
 !
 D$$VZ88	!

 4##FI66!
 4!
 !
 4!
 !
 D!
 D!
 T%%fk::!
 D$$V[99!
 T!
 d!
  $**63DEE!!
" t#!
$ **6<@@)!
 !
 !
* +  	r   r8  c                 0  K   |                                   d{V  |                     |          }d|d         i}|                     |                     ||                     d{V }|                     |di           }|                     ||          S )a  
        fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_ticker_data.md

        :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  )load_marketsr,  publicGetTickersPairextend	safe_dictrd  )r   r8  r  r,  requestr  rI  s          r   fetch_tickerzbitopro.fetch_ticker"  s       !!!!!!!!!V$$F4L
 224;;w3O3OPPPPPPPP&"55   000r   symbolsc                    K   |                                   d{V  |                                  d{V }|                     |dg           }|                     ||          S )a9  
        fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_ticker_data.md

        :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>`
        Nr  )rf  publicGetTickersr  parse_tickers)r   rl  r  r  r   s        r   fetch_tickerszbitopro.fetch_tickersB  s|       !!!!!!!!!..00000000..6266  !!'7333r   r   c           	      &  K   |                                   d{V  |                     |          }d|d         i}|||d<   |                     |                     ||                     d{V }|                     ||d         ddddd	          S )
a^  
        fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_orderbook_data.md

        :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   r8  bidsasksr5  r
  )rf  r,  publicGetOrderBookPairrh  parse_order_book)r   r8  r   r  r,  rj  r  s          r   fetch_order_bookzbitopro.fetch_order_book`  s       !!!!!!!!!V$$F4L
 $GG44T[[&5Q5QRRRRRRRR* $$Xvh/?vvW^`hiiir   tradec                    |                      |d          }|                      |d          }d }||                     |d          }n|                     |d          }|                      |d          }|                     ||          }|                      |d          }|                      |d          }|                     |d          }	|                     |d          }
|
|                     |d	          }|rd
}
nd}
|                      |d          }||                      |d          }d }|                      |d          }|                     |                      |d                    }|||d d}|                     |d          }d }||rd}nd}|                     |||||                     |          |||	|
||d |d|          S )NtradeIdorderIdrK  r/  r8  r5  r  actionisBuyerbuysellr
  
baseAmountr  	feeSymbol)r6  r  rateisTakerr   r   )r$   r  orderrK  rL  r8  takerOrMakerr  sider5  r
  r6  r  )	r  safe_timestampsafe_integerra  safe_string_lowerr  r  
safe_tradeiso8601)r   rw  r,  r$   rz  rK  rc  r8  r5  r  r  r|  r
  r  	feeAmountr  r  r  s                     r   parse_tradezbitopro.parse_trade  s!   2 eY//""5)44	:++E;??II))%==I##E622!!(F33!!&(33  00%%eV44%%eX66<nnUI66G !!%22>%%e\::F$$UE22	++D,<,<UK,P,PQQ	 !% C
 ..	22 '&&"Y//( 
  
   	r   sincec                 4  K   |                                   d{V  |                     |          }d|d         i}|                     |                     ||                     d{V }|                     |dg           }|                     ||||          S )aE  
        get the list of most recent trades for a particular symbol

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_trades_data.md

        :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  )rf  r,  publicGetTradesPairrh  r  parse_trades	r   r8  r  r   r  r,  rj  r  tradess	            r   fetch_tradeszbitopro.fetch_trades  s       !!!!!!!!!V$$F4L
 11$++gv2N2NOOOOOOOO&"55   >>>r   c                   K   |                                   d{V  |                     |           d{V }|                     |di           }|                     |d          }i }|                     |d          }|                     |d          }t          dt          | j                            D ]}| j        |         }	||	||ddd||	<   |S )a  
        fetch the trading fees for multiple markets

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_limitations_and_fees.md

        :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
        NtradingFeeRater   makerFeetakerFeeT)r  r8  r   r   r   r   )rf  'publicGetProvisioningLimitationsAndFeesri  
safe_valuer  r  r  rl  )
r   r  r  r  firstr   r   r   r!  r8  s
             r   fetch_trading_feeszbitopro.fetch_trading_fees  s      !!!!!!!!!EEfMMMMMMMM2BBGG22|   
33  
33q#dl++,, 		 		A\!_F "! F6NN r   c           	         |                      |d          |                     |d          |                     |d          |                     |d          |                     |d          |                     |d          gS )NrK  rV  rM  rO  rW  volume)r  r  )r   ohlcvr,  s      r   parse_ohlcvzbitopro.parse_ohlcvR  s~    e[11UF++UF++UE**UG,,UH--
 	
r   r   	timeframec                 8  K   |                                   d{V  |                     |          }|                     | j        ||          }|d         |d}|d}nt	          |d          }|                     |          }	d}
|)|                                 |d<   |d         ||	z  z
  |d<   nu|	dz  }t          t          j	        ||z                      |z  }
t          t          j	        |dz                      |d<   | 
                    |d         ||	z            |d<   |                     |                     ||                     d{V }|                     |d	g           }|                     |||||          }|                     ||	|
|          S )
a  
        fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_ohlc_data.md

        :param str symbol: unified symbol of the market to fetch OHLCV data for
        :param str timeframe: the length of time each candle represents
        :param int [since]: timestamp in ms of the earliest candle to fetch
        :param int [limit]: the maximum amount of candles to fetch
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns int[][]: A list of candles ordered, open, high, low, close, volume
        Nr$   )r/  
resolutioni  i$ tofromr   r  )rf  r,  r  r   r  parse_timeframesecondsintmathfloorsumpublicGetTradingHistoryPairrh  r  parse_ohlcvsinsert_missing_candles)r   r8  r  r  r   r  r,  r  rj  timeframeInSecondsalignedSincetimeframeInMillisecondsr  r  sparses                  r   fetch_ohlcvzbitopro.fetch_ohlcv\  s      !!!!!!!!!V$$%%doy)LL
4L$
 

 =EEu%%E!11)<<= LLNNGDM%dmu7I/IJGFOO&84&?#tz%2I*IJJKKNeeL!$*UT\":":;;GFO HHWV_e>P6PQQGDM99$++gv:V:VWWWWWWWW~~h33 ""4E5II**63E|UZ[[[r   c                 t   t          |          }|dk    r|S g }|d         }d }|	|d         }n|}d}	t          |          }
d}||k     r|	|
k     r||	         }|d         |k    r,|                    |           |                     |	d          }	ni|                     g |          }||d<   |d         |d<   |d         |d<   |d         |d<   |                     d          |d<   |                    |           |                     ||dz            }t          |          }||dz
           }||k     r|	|
k     |S )	Nr   r            r   r   r   )r  appendr  array_concatr   )r   candlesdistancer  r   lengthr   copyFromrK  r!  candleLengthresultLengthcandlecopys                 r   r  zbitopro.insert_missing_candles  si    WQ;;N1:	= III7||e##!l*:*:QZFayI%%f%%%HHQNN((X66#Qq'Qq'Qq'Q++C00Qd###HtO<<Iv;;LlQ./H! e##!l*:*:" r   c                 F   d|i}t          dt          |                    D ]k}||         }|                     |d          }|                     |          }|                     |d          }|                     |d          }||d}	|	||<   l|                     |          S )Nr  r   r  r
  	available)freetotal)r  r  r  r  safe_balance)
r   r  r   r!  balancer"  r  r
  r  accounts
             r   parse_balancezbitopro.parse_balance  s     H
 q#h--(( 
	# 
	#AqkG))':>>J**:66D%%gx88F((+>>I! G #F4LL  (((r   c                    K   |                                   d{V  |                     |           d{V }|                     |dg           }|                     |          S )a  
        query for balance and get the amount of funds available for trading or funds locked in orders

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_account_balance.md

        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a `balance structure <https://docs.ccxt.com/?id=balance-structure>`
        Nr  )rf  privateGetAccountsBalancer  r  )r   r  r  balancess       r   fetch_balancezbitopro.fetch_balance  s|       !!!!!!!!!77????????>>(FB77 !!(+++r   statusc                 D    dddddddd}|                      ||d           S )NrV  closedcanceled)z-1r   12346r  )r   r  statusess      r   parse_order_statuszbitopro.parse_order_status  s=    
 
 &$777r   r  c                 |   |                      |dd          }|                     |dd          }|                     |d          }|                                }|                      |dd          }|                     |d          }|                     |d	          }|                     ||d
          }|                     |d          }	|                     |d          }
|                     |
          }|                     |d          }|                     |d          }|                     |d          }|                     |d          }|                     |d          }d }|dk    rd}d }|                     |d          }|                     |                     |d                    }t          j	        |d          r||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$   rz  rK  createdTimestampr{  r
  originalAmountr5  r/  _r8  r  r  avgExecutionPriceexecutedAmountremainingAmountr   	POST_ONLYTr  r  r   )r  r6  clientOrderIdrL  lastTradeTimestampupdatedTimestamppostOnlyr  r   r6  r]  filled	remaining)r  r  r  r  )safe_string_2safe_integer_2r  lowerra  r  r  r  r   	string_gt
safe_orderr  r  )r   r  r,  r$   rK  r  r
  r5  rc  r8  orderStatusr  r  r]  r  r  r   r  r  r  r  s                        r   parse_orderzbitopro.parse_order  s   F tY77''{<NOO	x00zz||##E85EFF  00##E622!!(FC88!!&(33&&uh77((55%%eV44""5*=>>!!%)9::$$U,=>>	&&um<<+%%H$$UE22	++D,<,<UK,P,PQQ	Y,, 	%! C   
" 
T 
  
 Y//	 

 !$"3"3E;M"N"N 
 f 
 D 
 ; 
  
 D 
 U 
 D 
 f 
 D 
 w 
  f! 
" # 
$ + 
  
  
, -  	r   r  r  r
  r5  c                   K   |                                   d{V  |                     |          }||d         ||                     ||          |                                 d}|                                }	|	dk    r|                     ||          |d<   |	dk    r|                     ||          |d<   |                     |dd          }
|                     |ddg          }|
t          | j	        d	z   |	z   d
z             |                     ||
          |d<   | 
                    |d          }|t          | j	        dz   |	z   d
z             ||d<   |                     |	dk    d|          }|rd|d<   |                     |                     ||                     d{V }|                     ||          S )a&  
        create a trade order

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/create_an_order.md

        :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 dict [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$   )r  r/  r{  r
  rK  LIMITr5  
STOP_LIMITr   	stopPricez5 createOrder() requires a triggerPrice parameter for z orders	conditionz2 createOrder() requires a condition parameter for MARKETr  r   )rf  r,  amount_to_precisionmillisecondsrF  price_to_precisionsafe_value_2omitr   r$   r  is_post_onlyprivatePostOrdersPairrh  r  )r   r8  r  r  r
  r5  r  r,  rj  	orderTyper   r  r  r  s                 r   create_orderzbitopro.create_orderL  s      !!!!!!!!!V$$4L..vv>>**,,
 
 JJLL	#66vuEEGG$$#66vuEEGG,,V^[QQLYYv'DEEF#"47-d#dgp#ps|#|}}}'+'>'>v|'T'T$((==I "47-a#adm#mpy#yzzz'0$$$Y(%:D&II 	1%0GM"33DKK4P4PQQQQQQQQ &111r   r$   c                 6  K   |t          | j        dz             |                                  d{V  |                     |          }||d         d}|                     |                     ||                     d{V }|                     ||          S )a  
        cancels an open order

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/cancel_an_order.md

        :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>`
        Nz) cancelOrder() requires a symbol argumentr$   )r$   r/  )r   r$   rf  r,  privateDeleteOrdersPairIdrh  r  r   r$   r8  r  r,  rj  r  s          r   cancel_orderzbitopro.cancel_order  s       >#DG.Y$YZZZ!!!!!!!!!V$$4L
 
 77GV8T8TUUUUUUUU &111r   c                    t          |                                          }g }t          dt          |                    D ]}}||         }||         }t          dt          |                    D ]M}|                    |                     ||         ||         |                     |          d                     N~|S )Nr   )r  r$   r8  )listkeysr  r  r  r  safe_symbol)r   r  dataKeysr   r!  rc  orderIdsjs           r   parse_cancel_orderszbitopro.parse_cancel_orders  s    		$$q#h--(( 	 	A{HH~H1c(mm,,  doo$QK"1+"..x88/ /       r   idsc                 h  K   |t          | j        dz             |                                  d{V  |                     |          }|d         }i }|||<   |                     |                     ||                     d{V }|                     |d          }|                     |          S )a  
        cancel multiple orders

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/cancel_batch_orders.md

        :param str[] ids: order ids
        :param str symbol: unified market symbol
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: an list of `order structures <https://docs.ccxt.com/?id=order-structure>`
        Nz* cancelOrders() requires a symbol argumentr7  r  )r   r$   rf  r,  privatePutOrdersrh  ri  r  )	r   r	  r8  r  r,  r$   rj  r  r  s	            r   cancel_orderszbitopro.cancel_orders  s       >#DG.Z$Z[[[!!!!!!!!!V$$M"..t{{7F/K/KLLLLLLLL ~~h//''---r   c                   K   |                                   d{V  i }d}|P|                     |          }|d         |d<   |                     |                     ||                     d{V }n/|                     |                     ||                     d{V }|                     |di           }|                     |          S )a  
        cancel all open orders

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/cancel_all_orders.md

        :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not 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>`
        Nr$   r/  r  )rf  r,  privateDeleteOrdersPairrh  privateDeleteOrdersAllri  r  )r   r8  r  rj  r  r,  r  s          r   cancel_all_orderszbitopro.cancel_all_orders  s       !!!!!!!!!
 [[((F$TlGFO!99$++gv:V:VWWWWWWWWHH!88Wf9U9UVVVVVVVVH~~h33 ''---r   c                 6  K   |t          | j        dz             |                                  d{V  |                     |          }||d         d}|                     |                     ||                     d{V }|                     ||          S )a  
        fetches information on an order made by the user

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_an_order_data.md

        :param str id: the 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>`
        Nz( fetchOrder() requires a symbol argumentr$   )rz  r/  )r   r$   rf  r,  privateGetOrdersPairOrderIdrh  r  r  s          r   fetch_orderzbitopro.fetch_order  s       >#DG.X$XYYY!!!!!!!!!V$$4L
 
 99$++gv:V:VWWWWWWWW0 &111r   c                   K   |t          | j        dz             |                                  d{V  |                     |          }d|d         i}|||d<   |||d<   |                     |                     ||                     d{V }|                     |dg           }|g }|                     ||||          S )aV  
        fetches information on multiple orders made by the user

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_orders_data.md

        :param str symbol: unified market symbol of the market orders were made in
        :param int [since]: the earliest time in ms to fetch orders for
        :param int [limit]: the maximum number of order structures to retrieve
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns Order[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
        Nz) fetchOrders() requires a symbol argumentr/  r$   startTimestampr   r  )r   r$   rf  r,  privateGetOrdersAllPairrh  r  parse_orders)	r   r8  r  r   r  r,  rj  r  r   s	            r   fetch_orderszbitopro.fetch_orders   s       >#DG.Y$YZZZ!!!!!!!!!V$$F4L
 (-G$%$GG55dkk'66R6RSSSSSSSS&"55>F6   >>>r   c                 B  K   |                                   d{V  i }d}| |                     |          }|d         |d<   |                     |                     ||                     d{V }|                     |dg           }|                     ||||          S )a5  
        fetch all unfilled currently open orders

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_open_orders_data.md

        :param str symbol: unified market symbol
        :param int [since]: the earliest time in ms to fetch open orders for
        :param int [limit]: the maximum number of open orders structures to retrieve
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns Order[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
        Nr$   r/  r  )rf  r,  privateGetOrdersOpenrh  r  r  )	r   r8  r  r   r  rj  r,  r  r   s	            r   fetch_open_orderszbitopro.fetch_open_orders[  s       !!!!!!!!![[((F$TlGFO224;;w3O3OPPPPPPPP&"55  >>>r   c           	      f   K   ddi}|                      ||||                     ||                    S )a]  
        fetches information on multiple closed orders made by the user

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_orders_data.md

        :param str symbol: unified market symbol of the market orders were made in
        :param int [since]: the earliest time in ms to fetch orders for
        :param int [limit]: the maximum number of order structures to retrieve
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns Order[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
        
statusKindDONE)r  rh  )r   r8  r  r   r  rj  s         r   fetch_closed_orderszbitopro.fetch_closed_ordersq  s>       &
   t{{7F7S7STTTr   c                 f  K   |t          | j        dz             |                                  d{V  |                     |          }d|d         i}|                     |                     ||                     d{V }|                     |dg           }|                     ||||          S )a  
        fetch all trades made by the user

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_trades_data.md

        :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>`
        Nz+ fetchMyTrades() requires a symbol argumentr/  r$   r  )r   r$   rf  r,  privateGetOrdersTradesPairrh  r  r  r  s	            r   fetch_my_tradeszbitopro.fetch_my_trades  s       >#DG.[$[\\\!!!!!!!!!V$$F4L
 88Wf9U9UVVVVVVVV&"55(   >>>r   c           
      H    dddddddddd	}|                      |||          S )Nokfailedpending)	COMPLETEINVALID
PROCESSINGWAIT_PROCESSFAILEDEXPIRED	CANCELLEDEMAIL_VERIFICATIONWAIT_CONFIRMATIONr  )r   r  statess      r   parse_transaction_statusz bitopro.parse_transaction_status  sC    #%!"+!*

 

 777r   transactionr  c                    |                      |d          }|                     ||          }|                     |d          }|                      |d          }|                      |d          }|                      |d          }|                      |d          }	|	dk    r|}	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S )NcoinrK  addressmessager  protocolMAINr  r$   serialtxidr  r  networkr
  r  rL  addressFrom	addressTotagtagFromtagToupdatedr  )r  r6  r  )commentinternalr  )r  r  r  network_id_to_coder  r1  r  )
r   r2  r  r"  r  rK  r5  r>  r  	networkIds
             r   parse_transactionzbitopro.parse_transaction  s   Z %%k6::
&&z8<<%%k;??	"";	::{I66!!+x88$$[*==	I
K
$"";99
 D$$[&99
 D	

 
 t..y99
 d&&{G<<
 d33F;;
 
 Y//
 w
 4
 
 3
 t
  S!
" t#
$  ((e<< )
 
 
 	
r   r  c                   K   |t          | j        dz             |                                  d{V  |                     |          }d|d         i}|||d<   |||d<   |                     |                     ||                     d{V }|                     |dg           }|                     ||||dd	i          S )
a:  
        fetch all deposits made to an account

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_deposit_invoices_data.md

        :param str code: unified currency code
        :param int [since]: the earliest time in ms to fetch deposits for
        :param int [limit]: the maximum number of deposits structures to retrieve
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/?id=transaction-structure>`
        Nz+ fetchDeposits() requires the code argumentr  r$   r  r   r  r  r  )r   r$   rf  safe_currency&privateGetWalletDepositHistoryCurrencyrh  r  parse_transactions	r   r  r  r   r  r  rj  r  r   s	            r   fetch_depositszbitopro.fetch_deposits  s       <#DG.[$[\\\!!!!!!!!!%%d++
 (-G$%$GGDDT[[QXZ`EaEabbbbbbbb&"55( &&vxPYGZ[[[r   c                   K   |t          | j        dz             |                                  d{V  |                     |          }d|d         i}|||d<   |||d<   |                     |                     ||                     d{V }|                     |dg           }|                     ||||dd	i          S )
aF  
        fetch all withdrawals made from an account

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_withdraw_invoices_data.md

        :param str code: unified currency code
        :param int [since]: the earliest time in ms to fetch withdrawals for
        :param int [limit]: the maximum number of withdrawals structures to retrieve
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/?id=transaction-structure>`
        Nz. fetchWithdrawals() requires the code argumentr  r$   r  r   r  r  
withdrawal)r   r$   rf  rH  'privateGetWalletWithdrawHistoryCurrencyrh  r  rJ  rK  s	            r   fetch_withdrawalszbitopro.fetch_withdrawals<  s       <#DG.^$^___!!!!!!!!!%%d++
 (-G$%$GGEEdkkRY[aFbFbcccccccc&"55& &&vxP\G]^^^r   c                 d  K   |t          | j        dz             |                                  d{V  |                     |          }||d         d}|                     |                     ||                     d{V }|                     |di           }|                     ||          S )a  
        fetch data on a currency withdrawal via the withdrawal id

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_an_withdraw_invoice_data.md

        :param str id: withdrawal id
        :param str code: unified currency code of the currency withdrawn, default is None
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a `transaction structure <https://docs.ccxt.com/?id=transaction-structure>`
        Nz- fetchWithdrawal() requires the code argumentr$   )r9  r  r  )r   r$   rf  rH  &privateGetWalletWithdrawCurrencySerialrh  ri  rF  )r   r$   r  r  r  rj  r  r   s           r   fetch_withdrawalzbitopro.fetch_withdrawall  s       <#DG.]$]^^^!!!!!!!!!%%d++ 
 
 DDT[[QXZ`EaEabbbbbbbb&"55" %%fh777r   r5  r>  c                   K   |                      ||          \  }}|                                  d{V  |                     |           |                     |          }|d         |                     |          |d}d|v r|                     | j        di           }|                     |d          }	|                     |dg          }| 	                    ||	          }
|
t          | j        dz   |	z             |
|d<   |||d<   |                     |                     ||                     d{V }|                     |d	i           }|                     ||          S )
a  
        make a withdrawal

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/create_an_withdraw_invoice.md

        :param str code: unified currency code
        :param float amount: the amount to withdraw
        :param str address: the address to withdraw to
        :param str tag:
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a `transaction structure <https://docs.ccxt.com/?id=transaction-structure>`
        Nr$   )r  r
  r5  r;  r   z invalid network r7  r6  r  )handle_withdraw_tag_and_paramsrf  check_addressr  number_to_stringri  r   safe_string_upperr  r  r   r$   !privatePostWalletWithdrawCurrencyrh  rF  )r   r  r
  r5  r>  r  r  rj  r   requestedNetworkrE  r  r   s                r   r   zbitopro.withdraw  s      99#vFFV!!!!!!!!!7###==&& ++F33
 

 ~~dlJCCH#55fiHHYYv	{33F((3CDDI #DG.A$ADT$TUUU"+GJ?!$GI??GU[@\@\]]]]]]]]&"55 %%fh777r   c                 D    ||                      |d          ddd d di dS )Nr  F)r  r   )r  r   r  r   )r  )r   r  r  s      r   parse_deposit_withdraw_feez"bitopro.parse_deposit_withdraw_fee  sM     ''];;# 
 "  
 
 	
r   codesc                    K   |                                   d{V  |                     |           d{V }|                     |dg           }|                     ||d          S )a  
        fetch deposit and withdraw fees

        https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_currency_info.md

        :param str[]|None codes: list of unified currency codes
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a list of `fee structures <https://docs.ccxt.com/?id=fee-structure>`
        Nr  r  )rf  r  r  parse_deposit_withdraw_fees)r   r]  r  r  r  s        r   fetch_deposit_withdraw_feesz#bitopro.fetch_deposit_withdraw_fees  s       !!!!!!!!!==fEEEEEEEE" ~~h33//eZHHHr   r   GETc                     d|                      ||          z   }|                     ||                     |                    }|i }d|d<   |dk    rw|                                  |dk    s|dk    r|                     |          }|                     |          }	|                     |                     |	          |                     | j                  t          j
                  }
| j        |d<   |	|d<   |
|d	<   n|d
k    s|dk    r|r|d|                     |          z   z  }|                                 }d|i}|                     |          }|                     |          }	|                     |                     |	          |                     | j                  t          j
                  }
| j        |d<   |	|d<   |
|d	<   n)|dk    r#|d
k    r|r|d|                     |          z   z  }| j        d         d         |z   }||||dS )Nr2  ccxtzX-BITOPRO-APIr   POSTPUTzX-BITOPRO-APIKEYzX-BITOPRO-PAYLOADzX-BITOPRO-SIGNATUREra  DELETE?noncer   r   r   )urlmethodbodyheaders)implode_paramsr  extract_paramscheck_required_credentialsjsonstring_to_base64hmacencoder   hashlibsha384r   	urlencoder  r   )r   pathr   rj  r  rl  rk  ri  querypayload	signaturerh  rawDatar  s                 r   signzbitopro.sign  s*   D''f555		&$"5"5d";";<<?G#) )++---6U??yy((//55 IIdkk'&:&:DKK<T<TV]Vdee	.2k*+/6+,1:-..5Fh$6$6 73!6!666C))++U! yy))//55 IIdkk'&:&:DKK<T<TV]Vdee	.2k*+/6+,1:-.H__5 3sT^^E2222iv&,fdwOOOr   reasonri  rj  rl  rk  c
                    |d S |dk    r|dk     rd S | j         dz   |z   }
|                     |d          }|                     | j        d         ||
           |                     | j        d         ||
           t          |
          )N   i,   errorr   r   )r$   r  throw_exactly_matched_exceptionr   throw_broadly_matched_exceptionr   )r   r  r}  ri  rj  rl  rk  r  requestHeadersrequestBodyfeedbackr  s               r   handle_errorszbitopro.handle_errors  s    43;;4#::47S=4'  733,,T_W-EuhWWW,,T_W-EuhWWWH%%%r   )N)B__name__
__module____qualname__r   r   r   r&  r   r
   r+  dictrH  r   rd  strrk  r   r   rp  r	   r   rv  r   r  r  r   r  r  r  r  r  r   r  r  r   r  r   r  r   r   floatr   r  r   r  r  r  r  r  r  r  r"  r1  r   r   rF  rL  rP  rS  r   r\  r`  r|  r  r  __classcell__)r   s   @r   r!   r!      s       C# C C C C C CJ
 -/ ? ?: ? ? ? ?B *, + +V + + + +B;
4 ;
F ;
 ;
 ;
 ;
z$ $4 $ $6 $ $ $ $L 68 1 1 1F 1 1 1 1@ 6:" 4 47 4 4 4 4 4< @DB 'j 'jS 'j 'jS\ 'j 'j 'j 'jRM M Mv M M M M M^ <@d[] ? ? ?S ? ?bfglbm ? ? ? ?B /1 W W[ W W W Wr
 
 
4 
 
 
 
 ?CQUdhqs 4\ 4\ 4\ 4\3 4\^a 4\x|  ~B  yC 4\ 4\ 4\ 4\l! ! !F) ) ) ) )4 *, , , , , , ,6
8 
8 
8 
8 
8T T Tv T T T T Tl mqy{ 62 62 62I 62Y 62X] 62fi 62 62 62 62p 9=R 2 2S 2# 2 2 2 2>   AER . .tCy .# .TXY^T_ . . . .@ 59  .  .c  .U  .  .  .  .D 8<B +2 +2C +2 +2 +2 +2 +2Z 04$UYbd 9? 9? 9?C 9?s 9?imnsit 9? 9? 9? 9?v 59tZ^gi ? ?c ? ?TW ? ? ? ?, 7;\`ik U U U3 UVY Uptuzp{ U U U U" 37TX\eg (? (?C (?s (?RU (? (? (? (?T8s 8 8 8 8O
 O
T O
X O
Q\ O
 O
 O
 O
b 04$UYbd /\ /\ /\C /\s /\imnyiz /\ /\ /\ /\b 37TX\eg ._ ._C ._s ._RU ._lpq|l} ._ ._ ._ ._` ;?r %8 %8 %8C %8 %8 %8 %8N QU]_ /8 /83 /8 /8 /8# /8do /8 /8 /8 /8b
 
 
 
 
 
0 BFb I Iw I I I I> &eBSW  P  P  P  PD	&# 	&s 	& 	&c 	&TX 	&`c 	& 	& 	& 	& 	& 	& 	& 	&r   r!   )' ccxt.async_support.base.exchanger   ccxt.abstract.bitopror   rt  r  ccxt.base.typesr   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   ccxt.base.decimal_to_precisionr   ccxt.base.preciser   r!    r   r   <module>r     s   6 5 5 5 5 5 - - - - - -   z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z  z       * * * * * * 0 0 0 0 0 0 . . . . . . ' ' ' ' ' ' . . . . . . ) ) ) ) ) ) 4 4 4 4 4 4 % % % % % %P& P& P& P& P&h P& P& P& P& P&r   