
    E#io(                        S SK Jr  S SKJr  S SKrS SKrS SKJrJrJ	r	J
r
JrJrJrJrJrJrJrJrJrJrJrJrJrJr  S SKJr  S SKJr  S SKJr  S SKJr  S S	KJr  S S
KJ r   S SKJ!r!  S SK"J#r#  S SK$J%r%   " S S\\5      r&g)    )Exchange)ImplicitAPIN)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                   ,  ^  \ rS rSrS\4U 4S jjr0 4S\4S jjr0 4S\\	   4S jjr
S\S\	4S jrSIS	\S\	S\4S
 jjr0 4S\S\4S jjrS0 4S\S\4S jjrS0 4S\S\S\4S jjrSIS\S\	S\4S jjrSS0 4S\S\S\S\\   4S jjr0 4S\4S jjrSIS\	S\4S jjrSSS0 4S\S\S\S\S\\   4
S jjrS rS\ 4S jr!0 4S\ 4S jjr"S\#4S jr$SIS\S\	S\%4S  jjr&S0 4S\S!\'S"\(S#\)S$\*4
S% jjr+S0 4S&\S\#4S' jjr,S( r-S0 4S)\\   S\#S\\%   4S* jjr.S0 4S\#S\\%   4S+ jjr/S0 4S&\S\#4S, jjr0SSS0 4S\#S\S\S\\%   4S- jjr1SSS0 4S\#S\S\4S. jjr2SSS0 4S\#S\S\S\\%   4S/ jjr3SSS0 4S\#S\S\4S0 jjr4S\#4S1 jr5SIS2\S3\6S\74S4 jjr8SSS0 4S5\#S\S\S\\7   4S6 jjr9SSS0 4S5\#S\S\S\\7   4S7 jjr:S0 4S&\S5\#4S8 jjr;S0 4S5\S#\)S9\S:\#S\74
S; jjr<SIS3\64S< jjr=S0 4S=\4S> jjr>S?S@0 SS4SA jr?S5\@SB\SC\SD\SE\SF\4SG jrASHrBU =rC$ )Jbitopro   returnc                   > U R                  [        [        U ]  5       0 SS_SS_SS/_SS_S	S
_SS_S0 SS _SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_0 S S_S!S_S"S_S#S_S$S_S%S_S&S_S'S_S(S_S)S_S*S_S+S_S,S_S-S_S.S_S/S_S0S_E0 S1S_S2S_S3S4_S5S_S6S_S7S_S8S_S9S_S:S_S;S_S<S_S=S_S>S_S?S_S@S_SAS_SBS_E0 SCS_SDS_SES_SFS_SGS_SHS_SIS_SJS_SKS_SLS_SMS_SNS_SOS_SPS_SQS_SRS_SSS_E0 STS_SUS_SVS_SWS_SXS_SYS_SZS_S[S_S\S_S]S_S^S_S_S_S`S_SaS_SbS_ScS_SdS_E0 SeS_SfS_SgS_ShS_SiS_SjS_SkS_SlS_SmS_SnS_SoS_SpS_SqS_SrS_SsS_StS_SuS_ESSSSSSv.E_SwSxSySzS{S|S}S~SSSSS._SSSS0SS/SS._SSSS._SSSSSSSSSSSS.	0SSSSSSSSSSS.
SSSS.SS0SSSS.S.S._SSSSU R	                  S5      U R	                  S5      U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      //U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      /U R	                  S5      U R	                  S5      //S.S.0_SSSSSSSS.S/S._SSSSS SSSS SSSSS.SSSSSSSS.S SSSSSS.SSSSS.SS SSSS.SSSSSSSS.SSSSSSSSS.SS0S.	S S S.S S S.S._S[
        _S[        [        [        [        [        S.[        [        [        [        S.S._S0 _5      $ )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?   createOrdersrq   ry   rv   r{   rM   rr   )linearinverse)r1   r3   r4   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    T/home/james-whalen/.local/lib/python3.13/site-packages/ccxt/async_support/bitopro.pyr   bitopro.describe   s
   gt = ? 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$ 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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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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 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N #!&#(! W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!..w7 "..s3T5F5Fw5OP!..y94;L;LY;WX!..y94;L;LX;VW!..z:D<M<Mh<WX!..{;T=N=Nx=XY!..{;T=N=Nx=XY!..|<d>O>OPX>YZ" "..s3T5F5Fw5OP!..y94;L;LY;WX!..y94;L;LX;VW!..z:D<M<Mh<WX!..{;T=N=Nx=XY!..{;T=N=Nx=XY!..|<d>O>OPX>YZ"uBB
l $" ""  $)'
mBB
B $&+(,,0,0).+06:#(#("&#(	( #($)$)27+0/4#()$, %)&+!%$*%+*.& ',#($)*.	# ',!%#($)*/( ',!%$*%+#($)*.$ ',!%$*,-%*#($)*.	*  #CDL ##
 ##UNCBB
`	 Ya	BB
b	 -7.8$.)<1; '3$5 *'1	c	BB
@
  !A
BB
 B B	    c                 b  #    U R                  U5      I Sh  vN nU R                  US/ 5      n0 nU R                  U R                  S/ 5      n[        S[	        U5      5       H  nX6   nU R                  US5      nU R                  U5      n	U R                  US5      n
U R                  US5      nU R                  US5      nU R                  US	5      nU R                  US
5      nUUS.SSS.S.nU R                  X5      nUU	UU(       a  SOSSU
=(       a    UU
UUSUSS.XI'   M     U$  GN7f)a  
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_currenciesbitopro.fetch_currencies]  sT     ==fEE^^Hfb9
" 6FKq#j/*A!}H))(J?J**:6DnnXy9G~~h
;H""8];C**8]CK**8]CK '&
  	F ]]48F  "(h!.h"$!  FL) +D m Fs   D/D,DD/c                    #    U R                  5       I Sh  vN nU R                  US/ 5      nU R                  U5      $  N(7f)a  
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_marketsbitopro.fetch_markets  sC      ??AA..626* !!'**- Bs   A?)Amarketc                    U R                  US5      (       + nU R                  US5      nUR                  5       nU R                  US5      nU R                  US5      nU R                  U5      nU R                  U5      nUS-   U-   n	U R	                  US5      U R	                  US5      S.S S S.S S S.S S S.S	.n
0 S
U_SU_SU	_SU_SU_SU_SU_SS _SS _SS_SS_SS_SS_SS_SS_SS_SS _S S S S S S U
U R                  U R                  U R                  US5      5      5      U R                  U R                  U R                  US5      5      5      S.US US.E$ )Nmaintainpairbasequote/minLimitBaseAmountmaxLimitBaseAmountr	  )r  pricecostr   r%   uppercaseIdsymbolbaseIdquoteIdsettlesettleIdr  r1   Tr2   Fr3   r4   r5   contractr   quotePrecisionbasePrecision)r9  r  )r   contractSizeexpiryexpiryDatetimestrike
optionTyper  r  r  createdr  )r  r  upperr  r  r   parse_precision)r   r0  r  r%   r;  r=  r>  r4  r5  r<  r  s              r   parse_marketbitopro.parse_market  s)   ^^FJ77ff-hhj!!&&1""673&&v.''0e# ''0DE''0DE
 
 
 
$ 
" 
; 
 f 
 D	 

 U 
 d 
 u 
 d 
  
 F 
 D 
 e 
 E 
 e 
 e 
  ! 
" d# 
$  "**4+?+?@P@PQWYi@j+kl++D,@,@AQAQRXZiAj,kl ? 
  	
r  Ntickerc                    U R                  US5      nU R                  X25      nU R                  US5      nU R                  0 SU_SS _SS _SU R                  US5      _SU R                  US5      _S	S _S
S _SS _SS _SS _SS _SU R                  US5      _SU R                  US5      _SS _SS _SU R                  US5      _SS _U R                  US5      S US.EU5      $ )Nr3  r<  	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   rN  r0  marketIdr<  s        r   parse_tickerbitopro.parse_ticker  s|    ##FF3!!(3!!&(3 !
f!
!
 !
 D$$VZ8	!

 4##FI6!
 4!
 !
 4!
 !
 D!
 D!
 T%%fk:!
 D$$V[9!
 T!
 d!
  $**63DE!!
" t#!
$ **6<@)!
* + 	r  r<  c                 
  #    U R                  5       I Sh  vN   U R                  U5      nSUS   0nU R                  U R                  XB5      5      I Sh  vN nU R	                  US0 5      nU R                  Xc5      $  Nh N*7f)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>`
Nr3  r%   r  )load_marketsr0  publicGetTickersPairextend	safe_dictri  )r   r<  r  r0  requestr   rN  s          r   fetch_tickerbitopro.fetch_ticker"  s      !!!V$F4L
 224;;w3OPP&"5   00) 	"
 Qs!   BA??BB)BBsymbolsc                    #    U R                  5       I Sh  vN   U R                  5       I Sh  vN nU R                  US/ 5      nU R                  XA5      $  N@ N*7f)a  
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  )rl  publicGetTickersr  parse_tickers)r   rs  r  r   r   s        r   fetch_tickersbitopro.fetch_tickersB  sW      !!!..00..626  !!'33% 	"0s   AAAA)AAr   c           	        #    U R                  5       I Sh  vN   U R                  U5      nSUS   0nUb  X%S'   U R                  U R                  XS5      5      I Sh  vN nU R	                  XdS   SSSSS	5      $  Nd N7f)
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
Nr3  r%   r   r<  bidsasksr9  r  )rl  r0  publicGetOrderBookPairrn  parse_order_book)r   r<  r   r  r0  rp  r   s          r   fetch_order_bookbitopro.fetch_order_book`  s      !!!V$F4L
 $G44T[[5QRR* $$Xh/?vvW^`hii9 	" Ss"   A?A;AA?A=A?=A?tradec                 $   U R                  US5      nU R                  US5      nS nUc  U R                  US5      nOU R                  US5      nU R                  US5      nU R                  Xb5      nU R                  US5      nU R                  US5      nU R	                  US5      n	U R	                  US5      n
U
c  U R                  US	5      nU(       a  S
n
OSn
U R                  US5      nUc  U R                  US5      nS nU R                  US5      nU R                  U R                  US5      5      nUb  UUS S.nU R                  US5      nS nUb  U(       a  SnOSnU R                  UUUUU R                  U5      UUU	U
UUS US.U5      $ )NtradeIdorderIdrP  r3  r<  r9  r  actionisBuyerbuysellr  
baseAmountr  	feeSymbol)r:  r  rateisTakerr   r   )r%   r  orderrP  rQ  r<  takerOrMakerr  sider9  r  r:  r  )	r  safe_timestampsafe_integerrf  safe_string_lowerr  r  
safe_tradeiso8601)r   r  r0  r%   r  rP  rh  r<  r9  r  r  r  r  r  	feeAmountr  r  r  s                     r   parse_tradebitopro.parse_trade  s   2 eY/""5)4	:++E;?I))%=I##E62!!(3!!&(3  0%%eV4%%eX6<nnUI6G!!%2>%%e\:F$$UE2	++D,<,<UK,PQ	 !%C
 ..	2&&"Y/( 
  	r  sincec                   #    U R                  5       I Sh  vN   U R                  U5      nSUS   0nU R                  U R                  Xd5      5      I Sh  vN nU R	                  US/ 5      nU R                  XX#5      $  Ni N+7f)a  
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>`
Nr3  r%   r  )rl  r0  publicGetTradesPairrn  r  parse_trades	r   r<  r  r   r  r0  rp  r   tradess	            r   fetch_tradesbitopro.fetch_trades  s      !!!V$F4L
 11$++g2NOO&"5   >>' 	"
 Ps!   BB ?BB*BBc                   #    U R                  5       I Sh  vN   U R                  U5      I Sh  vN nU R                  US0 5      nU R                  US5      n0 nU R	                  US5      nU R	                  US5      n[        S[        U R                  5      5       H  nU R                  U   n	UU	UUSSS.XY'   M     U$  N N7f)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  r<  r   r   r   r   )rl  'publicGetProvisioningLimitationsAndFeesro  
safe_valuer  r  r  rs  )
r   r  r   r  firstr"  r   r   r#  r<  s
             r   fetch_trading_feesbitopro.fetch_trading_fees  s      !!!EEfMM2BBG2|   
3  
3q#dll+,A\\!_F "!FN - ] 	"Ms    CCCCBCCc           	          U R                  US5      U R                  US5      U R                  US5      U R                  US5      U R                  US5      U R                  US5      /$ )NrP  r[  rR  rT  r\  volume)r  r  )r   ohlcvr0  s      r   parse_ohlcvbitopro.parse_ohlcvR  sl    e[1UF+UF+UE*UG,UH-
 	
r  r   	timeframec                   #    U R                  5       I Sh  vN   U R                  U5      nU R                  U R                  X"5      nUS   US.nUc  SnO[	        US5      nU R                  U5      n	Sn
Uc!  U R                  5       US'   US   XI-  -
  US'   OhU	S-  n[        [        R                  " X;-  5      5      U-  n
[        [        R                  " US-  5      5      US'   U R                  US   XI-  5      US'   U R                  U R                  X5      5      I Sh  vN nU R                  US	/ 5      nU R                  XX#U5      nU R                  XX5      $  GNK N?7f)
aq  
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%   )r3  
resolutioni  i$ tofromr   r  )rl  r0  r  r   r
  parse_timeframesecondsintmathfloorsumpublicGetTradingHistoryPairrn  r  parse_ohlcvsinsert_missing_candles)r   r<  r  r  r   r  r0  r  rp  timeframeInSecondsalignedSincetimeframeInMillisecondsr   r  sparses                  r   fetch_ohlcvbitopro.fetch_ohlcv\  se     !!!V$%%dooyL
4L$

 =Eu%E!11)<= LLNGDM%dmu/IJGFO&84&?#tzz%*IJKNeeL!$**UT\":;GFO HHWV_e6PQGDM99$++g:VWW~~h3 ""45I**6|[[O 	", Xs"   E&E!DE&$E$%=E&$E&c                    [        U5      nUS:X  a  U$ / nUS   nS nUc  US   nOUnSn	[        U5      n
SnX:  a  X:  a  X   nUS   U:X  a$  UR                  U5        U R                  U	S5      n	OSU R                  / U5      nXS'   US   US'   US   US'   US   US'   U R	                  S5      US'   UR                  U5        U R                  XS-  5      n[        U5      nXkS-
     nX:  a  X:  a  M  U$ )	Nr   r            r   r   r   )r  appendr  array_concatr   )r   candlesdistancer  r   lengthr"  copyFromrP  r#  candleLengthresultLengthcandlecopys                 r   r  bitopro.insert_missing_candles  s'    WQ;N1:	= II7|#!*:ZFayI%f%HHQN((X6#Qq'Qq'Qq'Q++C0Qd#tO<Iv;LQ./H! #!*:" r  c                    SU0n[        S[        U5      5       HW  nX   nU R                  US5      nU R                  U5      nU R                  US5      nU R                  US5      nUUS.n	XU'   MY     U R	                  U5      $ )Nr  r   r  r  	available)freetotal)r  r  r  r  safe_balance)
r   r   r"  r#  balancer$  r  r  r  accounts
             r   parse_balancebitopro.parse_balance  s     H
 q#h-(AkG))':>J**:6D%%gx8F((+>I!G #4L )   ((r  c                    #    U R                  5       I Sh  vN   U R                  U5      I Sh  vN nU R                  US/ 5      nU R                  U5      $  NA N*7f)ah  
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  )rl  privateGetAccountsBalancer  r  )r   r  r   balancess       r   fetch_balancebitopro.fetch_balance  sY      !!!77??>>(FB7 !!(++! 	"?s   AAAA)AAstatusc                 :    SSSSSSSS.nU R                  X!S 5      $ )Nr[  closedcanceled)z-1r   12346r  )r   r  statusess      r   parse_order_statusbitopro.parse_order_status  s3    
 $77r  r  c                    U R                  USS5      nU R                  USS5      nU R                  US5      nUR                  5       nU R                  USS5      nU R                  US5      nU R                  US	5      nU R	                  XS
5      nU R                  US5      n	U R                  US5      n
U R                  U
5      nU R                  US5      nU R                  US5      nU R                  US5      nU R                  US5      nU R                  US5      nS nUS:X  a  SnS nU R                  US5      nU R                  U R                  US5      5      n[        R                  " US5      (       a  UUS.nU R                  0 SU_SS _SU_SU R                  U5      _SU R                  US5      _SU	_SU_SU_SU_SU_SU_SS _SU_SS _S U_S!U_S"U_UUS US#.EU5      $ )$Nr%   r  rP  createdTimestampr  r  originalAmountr9  r3  _r<  r  r  avgExecutionPriceexecutedAmountremainingAmountr   	POST_ONLYTr  r  r   )r  r:  clientOrderIdrQ  lastTradeTimestampupdatedTimestamppostOnlyr  r   r:  rb  filled	remaining)r  r  r  r  )safe_string_2safe_integer_2r  lowerrf  r  r  r  r   	string_gt
safe_orderr  r  )r   r  r0  r%   rP  r  r  r9  rh  r<  orderStatusr  r  rb  r  r  r   r  r  r  r  s                        r   parse_orderbitopro.parse_order  s   F tY7''{<NO	x0zz|##E85EF  0##E62!!(C8!!&(3&&uh7((5%%eV4""5*=>!!%)9:$$U,=>	&&um<+%H$$UE2	++D,<,<UK,PQ	Y,,%!C   
" 
T 
  
 Y/	 

 !$"3"3E;M"N 
 f 
 D 
 ; 
  
 D 
 U 
 D 
 f 
 D 
 w 
  f! 
" # 
$ + 
, - 	r  r  r  r  r9  c                   #    U R                  5       I Sh  vN   U R                  U5      nUUS   UU R                  X5      U R                  5       S.nUR	                  5       n	U	S:X  a  U R                  X5      US'   U	S:X  a  U R                  X5      US'   U R                  USS5      n
U R                  USS/5      nU
c  [        U R                  S	-   U	-   S
-   5      eU R                  X5      US'   U R                  US5      nUc  [        U R                  S-   U	-   S
-   5      eXS'   U R                  U	S:H  SU5      nU(       a  SUS'   U R                  U R                  X5      5      I Sh  vN nU R                  X5      $  GNp N7f)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  r3  r  r  rP  LIMITr9  
STOP_LIMITr   	stopPricez5 createOrder() requires a triggerPrice parameter for z orders	conditionz2 createOrder() requires a condition parameter for MARKETr  r   )rl  r0  amount_to_precisionmillisecondsrJ  price_to_precisionsafe_value_2omitr   r%   r  is_post_onlyprivatePostOrdersPairrn  r  )r   r<  r  r  r  r9  r  r0  rp  	orderTyper   r  r  r   s                 r   create_orderbitopro.create_orderL  s     !!!V$4L..v>**,
 JJL	#66vEGG$#66vEGG,,V^[QLYYv'DEF#"477-d#dgp#ps|#|}}'+'>'>v'T$((=I "477-a#adm#mpy#yzz'0$$$Y(%:D&I%0GM"33DKK4PQQ 11O 	"8 Rs"   FFEF0F	1F	Fr%   c                   #    Uc  [        U R                  S-   5      eU R                  5       I Sh  vN   U R                  U5      nUUS   S.nU R	                  U R                  XS5      5      I Sh  vN nU R                  Xd5      $  NV N7f)aw  
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%   r3  )r   r%   rl  r0  privateDeleteOrdersPairIdrn  r  r   r%   r<  r  r0  rp  r   s          r   cancel_orderbitopro.cancel_order  s      >#DGG.Y$YZZ!!!V$4L
 77G8TUU 11! 	" V"   /BBA B2B
3B
Bc                 *   [        UR                  5       5      n/ n[        S[        U5      5       H^  nX$   nX   n[        S[        U5      5       H:  nUR	                  U R                  Xg   Xg   U R                  U5      S.5      5        M<     M`     U$ )Nr   )r  r%   r<  )listkeysr  r  r  r  safe_symbol)r   r  dataKeysr   r#  rh  orderIdsjs           r   parse_cancel_ordersbitopro.parse_cancel_orders  s    		$q#h-(A{H~H1c(m,doo$K"+"..x8/   - ) r  idsc                 F  #    Uc  [        U R                  S-   5      eU R                  5       I Sh  vN   U R                  U5      nUS   n0 nXU'   U R	                  U R                  Xc5      5      I Sh  vN nU R                  US5      nU R                  U5      $  Nk N)7f)al  
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 argumentr;  r  )r   r%   rl  r0  privatePutOrdersrn  ro  r  )	r   r   r<  r  r0  r%   rp  r   r  s	            r   cancel_ordersbitopro.cancel_orders  s      >#DGG.Z$Z[[!!!V$M"..t{{7/KLL ~~h/''--# 	"
 Ms"   /B!BAB!5B6(B!B!c                 p  #    U R                  5       I Sh  vN   0 nSnUbB  U R                  U5      nUS   US'   U R                  U R                  X25      5      I Sh  vN nO(U R	                  U R                  X25      5      I Sh  vN nU R                  US0 5      nU R                  U5      $  N NS N,7f)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%   r3  r  )rl  r0  privateDeleteOrdersPairrn  privateDeleteOrdersAllro  r  )r   r<  r  rp  r   r0  r  s          r   cancel_all_ordersbitopro.cancel_all_orders  s      !!!
 [[(F$TlGFO!99$++g:VWWH!88W9UVVH~~h3 ''--- 	" XVs4   B6B0AB6B2(B6B4)B62B64B6c                   #    Uc  [        U R                  S-   5      eU R                  5       I Sh  vN   U R                  U5      nUUS   S.nU R	                  U R                  XS5      5      I Sh  vN nU R                  Xd5      $  NV N7f)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%   )r  r3  )r   r%   rl  r0  privateGetOrdersPairOrderIdrn  r  r  s          r   fetch_orderbitopro.fetch_order  s      >#DGG.X$XYY!!!V$4L
 99$++g:VWW0 11= 	" Xr  c                 h  #    Uc  [        U R                  S-   5      eU R                  5       I Sh  vN   U R                  U5      nSUS   0nUb  X&S'   Ub  X6S'   U R	                  U R                  Xd5      5      I Sh  vN nU R                  US/ 5      nUc  / nU R                  XX#5      $  N| N07f)a  
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 argumentr3  r%   startTimestampr   r  )r   r%   rl  r0  privateGetOrdersAllPairrn  r  parse_orders)	r   r<  r  r   r  r0  rp  r   r   s	            r   fetch_ordersbitopro.fetch_orders   s      >#DGG.Y$YZZ!!!V$F4L
 (-$%$G55dkk'6RSS&"5>F6   >>W 	" Ts"   /B2B.AB2?B0 /B20B2c                   #    U R                  5       I Sh  vN   0 nSnUb  U R                  U5      nUS   US'   U R                  U R                  XT5      5      I Sh  vN nU R	                  US/ 5      nU R                  XX#5      $  Nq N+7f)a  
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%   r3  r  )rl  r0  privateGetOrdersOpenrn  r  r1  )	r   r<  r  r   r  rp  r0  r   r   s	            r   fetch_open_ordersbitopro.fetch_open_orders[  s      !!![[(F$TlGFO224;;w3OPP&"5  >> 	" Qs"   BBABB
*B
Bc           	      T   #    SS0nU R                  XX0R                  XT5      5      $ 7f)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)r2  rn  )r   r<  r  r   r  rp  s         r   fetch_closed_ordersbitopro.fetch_closed_ordersq  s1      &
   {{77STTs   &(c                 B  #    Uc  [        U R                  S-   5      eU R                  5       I Sh  vN   U R                  U5      nSUS   0nU R	                  U R                  Xd5      5      I Sh  vN nU R                  US/ 5      nU R                  XX#5      $  Ni N+7f)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 argumentr3  r%   r  )r   r%   rl  r0  privateGetOrdersTradesPairrn  r  r  r  s	            r   fetch_my_tradesbitopro.fetch_my_trades  s      >#DGG.[$[\\!!!V$F4L
 88W9UVV&"5(   >>5 	"
 Ws!   /BB?B1B2*BBc           
      >    SSSSSSSSSS.	nU R                  X!U5      $ )Nokfailedpending)	COMPLETEINVALID
PROCESSINGWAIT_PROCESSFAILEDEXPIRED	CANCELLEDEMAIL_VERIFICATIONWAIT_CONFIRMATIONr  )r   r  statess      r   parse_transaction_status bitopro.parse_transaction_status  s9    #%!"+!*

 77r  transactionr  c                 d   U R                  US5      nU R                  X25      nU R                  US5      nU R                  US5      nU R                  US5      nU R                  US5      nU R                  US5      n	U	S:X  a  Un	0 SU_S	U R                  US
5      _SU R                  US5      _SS _SU_SU R                  U	5      _SU R	                  US5      _SU R                  U5      _SU_SU R                  U5      _SU_SS _SU_SU_SS _SU_SS _S S UU R	                  US5      S S.S.E$ )NcoinrP  addressmessager  protocolMAINr  r%   serialtxidr  r  networkr  r  rQ  addressFrom	addressTotagtagFromtagToupdatedr  )r  r:  r  )commentinternalr  )r  r  r  network_id_to_coder  rO  r  )
r   rQ  r  r$  r  rP  rT  r]  r  	networkIds
             r   parse_transactionbitopro.parse_transaction  s   Z %%k6:
&&z<%%k;?	"";	:{I6!!+x8$$[*=	I
K
$"";9
 D$$[&9
 D	

 
 t..y9
 d&&{G<
 d33F;
 
 Y/
 w
 4
 
 3
 t
  S!
" t#
$  ((e<)
 	
r  r  c                 d  #    Uc  [        U R                  S-   5      eU R                  5       I Sh  vN   U R                  U5      nSUS   0nUb  X&S'   Ub  X6S'   U R	                  U R                  Xd5      5      I Sh  vN nU R                  US/ 5      nU R                  XX#SS	05      $  Nz N.7f)
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%   rl  safe_currency&privateGetWalletDepositHistoryCurrencyrn  r  parse_transactions	r   r  r  r   r  r  rp  r   r"  s	            r   fetch_depositsbitopro.fetch_deposits  s      <#DGG.[$[\\!!!%%d+
 (-$%$GDDT[[QXEabb&"5( &&vPYGZ[[C 	" c"   /B0B,AB0?B. -B0.B0c                 d  #    Uc  [        U R                  S-   5      eU R                  5       I Sh  vN   U R                  U5      nSUS   0nUb  X&S'   Ub  X6S'   U R	                  U R                  Xd5      5      I Sh  vN nU R                  US/ 5      nU R                  XX#SS	05      $  Nz N.7f)
a  
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%   rl  rh  'privateGetWalletWithdrawHistoryCurrencyrn  r  rj  rk  s	            r   fetch_withdrawalsbitopro.fetch_withdrawals<  s      <#DGG.^$^__!!!%%d+
 (-$%$GEEdkkRYFbcc&"5& &&vP\G]^^A 	" drn  c                 B  #    Uc  [        U R                  S-   5      eU R                  5       I Sh  vN   U R                  U5      nUUS   S.nU R	                  U R                  XS5      5      I Sh  vN nU R                  US0 5      nU R                  Xt5      $  Ni N*7f)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%   )rX  r  r  )r   r%   rl  rh  &privateGetWalletWithdrawCurrencySerialrn  ro  re  )r   r%   r  r  r  rp  r   r"  s           r   fetch_withdrawalbitopro.fetch_withdrawall  s      <#DGG.]$]^^!!!%%d+ 
 DDT[[QXEabb&"5" %%f771 	" cs"   /BBA B2B3)BBrT  r]  c                 z  #    U R                  XE5      u  pEU R                  5       I Sh  vN   U R                  U5        U R                  U5      nUS   U R	                  U5      US.nSU;   au  U R                  U R                  S0 5      nU R                  US5      n	U R                  US/5      nU R                  X5      n
U
c  [        U R                  S-   U	-   5      eXS'   Ub  XGS'   U R                  U R                  Xu5      5      I Sh  vN nU R                  US	0 5      nU R                  X5      $  GN N+7f)
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  rT  rZ  r   z invalid network rV  rU  r  )handle_withdraw_tag_and_paramsrl  check_addressr  number_to_stringro  r   safe_string_upperr  r  r   r%   !privatePostWalletWithdrawCurrencyrn  re  )r   r  r  rT  r]  r  r  rp  r   requestedNetworkrd  r   r"  s                r   r   bitopro.withdraw  s>     99#F!!!7#==& ++F3

 ~~dllJCH#55fiHYYv	{3F((DI #DGG.A$ADT$TUU"+J?!$I??G@\]]&"5 %%f77C 	"$ ^s"   'D;D6C#D;D9)D;9D;c                 <    UU R                  US5      SS.S S S.0 S.$ )Nr  F)r  r   )r  r   r  r   )r  )r   r  r  s      r   parse_deposit_withdraw_fee"bitopro.parse_deposit_withdraw_fee  s;     ''];#
 " 
 	
r  codesc                    #    U R                  5       I Sh  vN   U R                  U5      I Sh  vN nU R                  US/ 5      nU R                  XAS5      $  NB N+7f)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  )rl  r  r  parse_deposit_withdraw_fees)r   r  r  r   r  s        r   fetch_deposit_withdraw_fees#bitopro.fetch_deposit_withdraw_fees  s[      !!!==fEE" ~~h3//ZHH' 	"Es   AAAA*AAr   GETc                    SU R                  X5      -   nU R                  X@R                  U5      5      nUc  0 nSUS'   US:X  Ga`  U R                  5         US:X  d  US:X  a  U R	                  U5      nU R                  U5      n	U R                  U R                  U	5      U R                  U R                  5      [        R                  5      n
U R                  US'   XS'   XS	'   OUS
:X  d  US:X  a  U(       a  USU R                  U5      -   -  nU R                  5       nSU0nU R	                  U5      nU R                  U5      n	U R                  U R                  U	5      U R                  U R                  5      [        R                  5      n
U R                  US'   XS'   XS	'   O*US:X  a$  US
:X  a  U(       a  USU R                  U5      -   -  nU R                  S   S   U-   nXsXeS.$ )Nr6  ccxtzX-BITOPRO-APIr   POSTPUTzX-BITOPRO-APIKEYzX-BITOPRO-PAYLOADzX-BITOPRO-SIGNATUREr  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   r  r  r  r  r  querypayload	signaturer  rawDatar  s                 r   signbitopro.sign  s   D''55		&"5"5d";<?G#) )++-6U?yy(//5 IIdkk'&:DKK<TV]VdVde	.2kk*+/6+,1:-.5Fh$63!666C))+U! yy)//5 IIdkk'&:DKK<TV]VdVde	.2kk*+/6+,1:-.H_5sT^^E222iiv&,dOOr  reasonr  r  r  r  c
                     Uc  g US:  a  US:  a  g U R                   S-   U-   n
U R                  US5      nU R                  U R                  S   X5        U R	                  U R                  S   X5        [        U
5      e)N   i,   errorr   r   )r%   r  throw_exactly_matched_exceptionr   throw_broadly_matched_exceptionr   )r   r  r  r  r  r  r  r   requestHeadersrequestBodyfeedbackr  s               r   handle_errorsbitopro.handle_errors  s|    3;4#:77S=4'  73,,T__W-EuW,,T__W-EuWH%%r   )N)D__name__
__module____qualname____firstlineno__r   r   r   r(  r   r
   r.  dictrL  r   ri  strrq  r   r   rw  r	   r   r~  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,  r2  r6  r;  r?  rO  r   r   re  rl  rr  rv  r   r  r  r  r  r  __static_attributes____classcell__)r   s   @r   r!   r!      s   C# CJ
 -/ ?: ?B *, +V +B;
4 ;
F ;
z$4 $ $6 $L 68 1 1F 1@ 6:" 47 4 4< @DB 'jS 'j 'jS\ 'jRM Mv M M^ <@d[] ? ?S ? ?bfglbm ?B /1 W[ Wr
 
4 
 ?CQUdhqs 4\ 4\ 4\3 4\^a 4\x|  ~B  yC 4\l!F) )4 *, , ,6
8 
8T Tv T Tl mqy{ 62 62I 62Y 62X] 62fi 62p 9=R 2S 2# 2> AER .tCy .# .TXY^T_ .@ 59  .c  .U  .D 8<B +2C +2 +2Z 04$UYbd 9? 9?C 9?s 9?imnsit 9?v 59tZ^gi ?c ? ?TW ?, 7;\`ik U U3 UVY Uptuzp{ U" 37TX\eg (?C (?s (?RU (?T8s 8O
T O
X O
Q\ O
b 04$UYbd /\ /\C /\s /\imnyiz /\b 37TX\eg ._C ._s ._RU ._lpq|l} ._` ;?r %8 %8C %8N QU]_ /83 /8 /8 /8# /8do /8b
 
0 BFb Iw I> &eBSW  PD	&# 	&s 	& 	&c 	&TX 	&`c 	& 	&r  r!   )' ccxt.async_support.base.exchanger   ccxt.abstract.bitopror   r  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  r   <module>r     s\    6 -   z  z  z  z  z  * 0 . ' . ) 4 %P&h P&r  