
    ih                    (   d dl mZ d dlm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! 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)ImplicitAPI)BalancesBool
CurrenciesCurrencyIntMarketNumOrder	OrderBook	OrderSide	OrderTypeStrStringsTickerTickersTradeTransactionTransferEntry)List)ExchangeError)AuthenticationError)PermissionDenied)ArgumentsRequired)
BadRequest)	BadSymbol)InsufficientFunds)InvalidOrder)NotSupported)RateLimitExceeded)	TICK_SIZE)Precisec                       e Zd Z fdZi fdefdZi fdee         fdZd>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i fdZdi fdededefdZd Zd>dedededefdZd>dedefdZddi fdedededee         fdZd>dedefdZdddi fdedededee         fdZdefdZi fdefdZdefdZ d>dede!fdZ"i fdede#fdZ$di fdede%de&d e#d!e'f
d"Z(di fd#ede)fd$Z*di fde)fd%Z+di fd#ede)fd&Z,dddi fde)dededee!         fd'Z-dddi fde)dedefd(Z.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dee!         fd+Z1d, Z2d-d.i ddfd/Z3i fd0efd1Z4d2 Z5d>d3e6de7fd4Z8dddi fd0e)dededee7         fd5Z9dddi fd0e)dededee7         fd6Z:i fd0ed e#d7ed8ede;f
d9Z<d>d3e6fd:Z=d; Z>di fd0ed e#fd<Z?d= Z@ xZAS )?bigonec           %      Z   |                      t          t          |                                           dddgddi dd ddd	d
dd dd dd
dddddddd
dd
ddddddddddddi dddddddddd
ddddd dd!dd"dd#dd$dd%dd&dd'dd(dd)d
d
d
dddd*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d<d=d>d?d@dAdBdCdDg dEig dFg dGdHdDg dIig dJdKdLgdMdNgdOdLgdPdDdQgid>|                     dR          |                     dR          dSdTi idUddVdWdWdXdXdYdZdid[dd\dd]d^d_d`ii dadadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dddi ddddddddddddddddddddddddddddddddddi dddddddddddddddddddddddddddddddddddddddddddddddddќdҜt
          i dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          dt          t          t          t          t          t          t          di dddddddd          S )Nr%   BigONECNv3i  CORSspotTmarginFswapfutureoptioncancelAllOrderscancelOrdercreateMarketBuyOrderWithCostcreateMarketOrderWithCostcreateMarketSellOrderWithCostcreateOrdercreatePostOnlyOrdercreateStopLimitOrdercreateStopMarketOrdercreateStopOrderfetchBalancefetchClosedOrdersfetchCurrenciesfetchDepositAddressfetchDepositsfetchFundingRatefetchMarketsfetchMyTrades
fetchOHLCVfetchOpenOrders
fetchOrderfetchOrderBookfetchOrdersfetchTickerfetchTickers	fetchTimefetchTradesfetchTradingFee)fetchTradingFeesfetchTransactionFeesfetchWithdrawalstransferwithdrawmin1min5min15min30hour1hour3hour4hour6hour12day1week1month1)1m5m15m30m1h3h4h6h12h1d1w1Mzbig.onezchttps://user-images.githubusercontent.com/1294454/69354403-1d532180-0c91-11ea-88ed-44c06cefdf87.jpgzhttps://{hostname}/api/v3z https://{hostname}/api/v3/viewerz"https://{hostname}/api/contract/v2zhttps://{hostname}/api/)publicprivatecontractPubliccontractPrivatewebExchangezhttps://big.onez"https://open.big.one/docs/api.htmlzKhttps://bigone.zendesk.com/hc/en-us/articles/115001933374-BigONE-Fee-Policyz&https://b1.run/users/new?code=D3LLBVFT)logoapiwwwdocfeesreferralget)pingasset_pairsz#asset_pairs/{asset_pair_name}/depthz$asset_pairs/{asset_pair_name}/tradesz$asset_pairs/{asset_pair_name}/tickerz%asset_pairs/{asset_pair_name}/candleszasset_pairs/tickers)	accountszfund/accountszassets/{asset_symbol}/addressordersorders/{id}zorders/multitradeswithdrawalsdeposits)rx   zorders/{id}/cancelzorders/cancelr{   rO   )rt   post)symbolsinstrumentszdepth@{symbol}/snapshotzinstruments/differencezinstruments/prices)rw   ry   rx   zorders/openingzorders/countzorders/opening/countrz   ztrades/countrx   zorders/batchzpositions/{symbol}/marginzpositions/{symbol}/risk-limitry   )rt   r}   putdeletezuc/v2/assetsz0.001)makertakerrP   )tradingfundingSPOTFUNDCONTRACT)r+   fundr   r.   r-   fillResponseFromRequesti   )webApiEnablewebApiRetrieswebApiMuteFailureERC20USDTTRC20ABBCACAAcalaAE	AeternityALGOAlgorandAPTAptosARArweaveASTRAstarAVAXCAvaxAVAXX	AvaxChainBEAMBeamBEP20BinanceSmartChainBITCI
BitciChainBTCBitcoinBCHBitcoinCashBSV	BitcoinSVCELOCeloCKKBCKBATOMCosmosCRC20CRODASHDashDOGEDogecoinXECECashEOSETHEthereumETCEthereumClassicETHWEthereumPowFTMFantomFILFilecoinFSNFusionGRINGrinONEHarmonyHRC20	HecochainHBARHederaHNTHeliumZENHorizenIOSTIRISKLAYKlaytnKSMKusamaLTCLitecoinXMRMoneroGLMRMoonbeamNEARNearNEONeoNEON3NeoN3OASISOasisOKC	OkexchainONTOntologyOPTIMISMOptimismDOTPolkadotMATICPolygonQtumREIRippleSGBShidenSolanaStellarTeraTezosTronVechainVSystemsWAXZcash)QTUMr   XRPr   SDNSOLXLMTERAXTZr   VETVSYSr   ZEC)!createMarketBuyOrderRequiresPriceaccountsByTyperO   exchangeMillisecondsCorrectionr<   defaultNetworkdefaultNetworksnetworks1000110005z7Amount's scale must greater than AssetPair's base scalezFPrice mulit with amount should larger than AssetPair's min_quote_value10007100111001310014104031042940004401034010440301403024060140602)406034060440605401204012160100)exactbroad	CybereitsFXTTOKENFreeRossDAOzMobilian CoinzBigONE Token)CREFXTFREEMBNr   )idname	countriesversion	rateLimithas
timeframeshostnameurlsro   rr   optionsprecisionMode
exceptionscommonCurrencies)deep_extendsuperr%   describeparse_numberr"   r   r   r   r   r   r   r!   r   )self	__class__s    Q/var/www/html/crypto-bot/backend/venv/lib/python3.11/site-packages/ccxt/bigone.pyr?  zbigone.describe   s+   fd 3 3 < < > >((( %( 	(
 $( %( "4( t( /( ,U( 0( t( &t( '( ((  "4!(" #( ($ $T%(& "4'(( &t)(*  +(, #E-(. /(0  1(2 d3(4 "45(6 d7(8 !$9(: t;(< t=(> ?(@ TA(B tC(D "5E( (F %*(-$(  O( ( (T   "}9A&J'K#<  );eD      

 
 
   *    #	 	 	 !&
 47
 &&'$ $2 & CF FR "..w77!..w77 
   6:""%(&# # .t 37$(%&)-$ $
 #*G$`F`7` +` J	`
 7` )` G` V` [` F` 0` \` 9` =` ;`  F!`" E#` `$ H%`& U'`( F)`* J+`, 7-`. 5/`0 :1`2 ,3`4 M5`6 87`8 :9`: 8;`< F=`> 9?`@ [A`B HC`D 8E` ` `F 9G`H FI`J FK`L HM`N 8O`P :Q`R 8S`T JU`V FW`X 5Y`Z W[`\ W]`^ ;_`` :a`b 
c`d :e`f Yg` `h # # ##$""#$& "C` ` `-w wp 'Z] N| ]^j	
 Z ] Y . - . 0 0 0 - ]  ]!" ]#$ /))))&/  25 < #!%&%! !e	yA
 yA
 y y y	    returnc                 $   |                      ddd          }|dS |                     |dg           }i }t          dt          |                    D ]<}||         }|                     |d          }|                     |          }|                     |d          }	|                     |d	          rd
nd}
i }|                     |dg           }|                     |                     |dd                    }d}d}t          dt          |                    D ]B}||         }|                     |d          }|                     |          }|                     |d          }|                     |d          }|o|}|                     |d          }|                     |d          }|                     |d          }|                     |                     |dd                    }||d|||| 	                    |          | 	                    |          |dd|ddd|d
||<   |r|du p|n|}|r|du p|n|}t          j        ||          r|du p|n|}D||||	|
d||d| 	                    |          ddddddd|d||<   >|S )z
        fetches all available currencies on an exchange
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: an associative dictionary of currencies
        r<   webExchangeGetUcV2AssetsTNdatar   symbolr1  is_fiatfiatcryptobinding_gatewayswithdrawal_scalescalegateway_nameis_deposit_enabledis_withdrawal_enabledmin_deposit_amountmin_withdrawal_amountwithdrawal_feeminmax)depositrP   )
r0  networkr,   rY  rP   activefee	precisionlimitsinfo)amountrP   )r0  coder_  r1  typer[  rY  rP   r\  r]  r^  r  )fetch_web_endpoint
safe_valuerangelensafe_stringsafe_currency_codeparse_precisionsafe_string_2network_id_to_coder@  r#   	string_gt)rA  paramsrH  currenciesDataresulticurrencyr0  ra  r1  rb  r  chainscurrencyMaxPrecisioncurrencyDepositEnabledcurrencyWithdrawEnabledjchain	networkIdnetworkCoderY  rP   isActiveminDepositAmountminWithdrawalAmountwithdrawalFeer]  s                              rC  fetch_currencieszbigone.fetch_currenciesV  sx    &&'8:TVZ[[<4@ vr::q#n--.. E	 E	A%a(H!!(H55B**2..D##Hf55D!__XyAAO66xDH__X/A2FFF#'#7#78J8J8Ugip8q8q#r#r +/",0#1c&kk** #c #cq	 ,,UNCC	"55i@@//%1EFF??52IJJ#0#'#3#3E;O#P#P &*&6&6u>U&V&V# $ 0 08H I I 001C1CEK]_f1g1ghh	#*"& (&,,];;!%!2!29!=!= $4#'$ $
 $7#'% %	 	 "') )%, Y`){*@D*H)TWe{&[c  +A+Bd+J*Wx  jA'V]Vgh|  H  WI  WI  (c(<(D'R  Oc$$ 13!../CDD  $# 
  $#! !	 	 %+ F4LL. rD  c                 	   |                      |          |                     |          g}|}|d         }|d         }|                     |dg           }g }t          dt	          |                    D ]}||         }	|                     |	di           }
|                     |	di           }|                     |
d          }|                     |d          }|                     |          }|                     |          }|                    |                     i d|                     |	d          d	|                     |	d          d|d
z   |z   d|d|ddd|d|dddddddddddddddd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#                     t          dt	          |                    D ]}||         }	|                     |	d$          }|                     |	d%          }|                     |	d&          }|                     |	d          }|                     |          }|                     |          }|                     |          }|                     |	d'          }|                    |                     i d|d|d
z   |z   d(z   |z   d|d|d|d|d|d|ddddddddddddd|                     |	d)          ddd*| ||                     |	d+          dddd| 	                    | 
                    |                     |	d,                              | 	                    | 
                    |                     |	d-                              ddddddd|                     |	d.          |                     |	d/          d|                     |	d0          ddd"|	d1	                     |S )2a  
        retrieves data on all markets for bigone
        :see: https://open.big.one/docs/spot_asset_pair.html
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict[]: an array of objects representing market data
        r      rH  
base_assetquote_assetrI  r0  r1  uuid/basequotesettleNbaseIdquoteIdsettleIdrb  r+   Tr,   Fr-   r.   r/   r[  contract
base_scalequote_scale)r`  pricerV  min_quote_valuemax_quote_value)leverager`  r  cost)linearinversecontractSizeexpiryexpiryDatetimestrike
optionTyper]  r^  createdr_  baseCurrencyquoteCurrencysettleCurrency	isInverse:enabler  
multipliervaluePrecisionpricePrecisionpriceMinpriceMaxinitialMargin)	r  r  r  r  r  r  r]  r^  r_  )publicGetAssetPairscontractPublicGetSymbolsrd  re  rf  rg  rh  appendsafe_market_structurer@  ri  safe_number)rA  rm  promisespromisesResultresponsecontractResponsemarketsro  rp  market	baseAsset
quoteAssetr  r  r  r  r  marketIdr  r  s                       rC  fetch_marketszbigone.fetch_markets	  sR    ,,V44d6S6STZ6[6[\!!!$)!,j //(FB77q#g,,'' 9	 9	AQZFbAAICCJ%%i::F&&z8<<G**622D++G44EMM$44 16d&&vv6616((6616 $*u,16 	16
 16 $16 &16 716 D16 16 16 %16 16 %16 %16  $!16" E#16$  $"&""//0D0DTEUEUV\^jEkEk0l0lmm!..t/C/CDDTDTU[]jDkDk/l/lmm   $#! !
  $# 
  $# 
  $//8IJJ#//8IJJ  $  a16 16 16 1 1 1 1 1 1d q#.//00 9	 9	A%a(F%%fn==F&&v??G''0@AAH''99H**622D++G44E,,X66Foofk::GMM$44 /6h/6$*u,s2V;/6 /6 	/6
 &/6 &/6 7/6 H/6 /6 /6 %/6 /6 %/6 %/6 $//&(;;/6  D!/6" g+#/6$ # $ 0 0 F F"&""//0D0DTEUEUV\^nEoEo0p0pqq!..t/C/CDDTDTU[]mDnDn/o/opp   $#! !
  $# 
  $//
CC#//
CC 
  $//HH#  $ ]/6 /6 /6 / / / / / /` rD  Nr  c           	      0   d|v rdnd}|                      |dd          }|                     ||d|          }|                      |dd          }|                     |di           }|                     |d	i           }|                     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asset_pair_namer+   r-   rI  -closelatestPricebidask	timestampdatetimehighlast24hMaxPricelowlast24hMinPricer  	bidVolumequantity	askVolumevwapopenlastpreviousClosechangedaily_changelast24hPriceChange
percentageaveragevolume	volume24hvolume24hInUsd)
baseVolumequoteVolumer_  )rj  safe_symbolrd  safe_tickerrg  )	rA  tickerr  
marketTyper  rI  r  r  r  s	            rC  parse_tickerzbigone.parse_ticker  s:   ^ !2V ; ;VV&
%%f.?JJ!!(FCDD""67MBBoofeR00oofeR00 !
f!
!
 !
 D&&vv7HII	!

 4%%fe5FGG!
 4##C11!
 ))#z::!
 4##C11!
 ))#z::!
 D!
 D$$VV44!
 U!
 E!
 T!
 d((AUVV!
  $!!
" t#!
$ ,,VX{KK++F4DEE)!
 !
 !
* +  	rD  rI  c                    |                                   |                     |          }d}|                     d||          \  }}|dk    r`d|d         i}|                     |                     ||                    }|                     |di           }|                     ||          S |                     |g|          }|                     ||          S )a  
        fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
        :see: https://open.big.one/docs/spot_tickers.html
        :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>`
        NrG   r+   r  r0  rH  )	load_marketsr  handle_market_type_and_params&publicGetAssetPairsAssetPairNameTickerextend	safe_dictr  fetch_tickersrd  )	rA  rI  rm  r  rb  requestr  r  tickerss	            rC  fetch_tickerzbigone.fetch_ticker  s     	V$$99-QWXXf6>>!6$<G BB4;;wX^C_C_``H" ^^Hfb99F$$VV444((&6::G??7F333rD  r~   c                 f   |                                   d}|                     |d          }||                     |          }d}|                     d||          \  }}|dk    }i }|                     |          }d}|rp|-|                     |          }	d                    |	          |d<   |                     |                     ||                    }
| 	                    |
dg           }n| 
                    |          }|                     ||          }|                     |d|          S )	a  
        fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
        :see: https://open.big.one/docs/spot_tickers.html
        :param str[] [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   rH   r+   ,
pair_namesrH  rI  )r  rg  r  r  market_symbols
market_idsjoinpublicGetAssetPairsTickersr  rd  contractPublicGetInstrumentsparse_tickersfilter_by_array_tickers)rA  r~   rm  r  rI  rb  isSpotr  rH  idsr  r  s               rC  r  zbigone.fetch_tickers3  s=    	!!'1--[[((F99.&RXYYf%%g.. "	="oog..(+%66t{{7F7S7STTH8 ??8VR88DD44V<<D4 $$T733++GXwGGGrD  c                     |                      |          }|                     |di           }|                     |d          }|                     |dz            S )aI  
        fetches the current integer timestamp in milliseconds from the exchange server
        :see: https://open.big.one/docs/spot_ping.html
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns int: the current integer timestamp in milliseconds from the exchange server
        rH  	Timestamp@B )publicGetPingrd  safe_integerparse_to_int)rA  rm  r  rH  r  s        rC  
fetch_timezbigone.fetch_time  s\     %%f-- x44%%dK88	  W!4555rD  limitc           	         |                                   |                     |          }d}|d         rPd|d         i}|                     |                     ||                    }|                     ||d         |          S d|d         i}|||d<   |                     |                     ||                    }|                     |di           }|                     ||d         ddd	d
d          S )aE  
        fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
        :see: https://open.big.one/docs/contract_misc.html#get-orderbook-snapshot
        :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  rI  r0  r  r  rH  bidsasksr  r  )r  r  $contractPublicGetDepthSymbolSnapshotr  parse_contract_order_book%publicGetAssetPairsAssetPairNameDepthr  parse_order_book)rA  rI  r  rm  r  r  r  	orderbooks           rC  fetch_order_bookzbigone.fetch_order_book  s    	V$$* 7	q&,G @@WV\A]A]^^H8 11(F8<LeTTT "6$<G  #( AA$++gW]B^B^__H x<<I((F84DdFTZ\ceoppprD  c                 &   t          |                                          }g }t          dt          |                    D ]O}||         }||         }|                    |                     |          |                     |          g           P|S )Nr   )listkeysre  rf  r  r@  )rA  bidsAsksbidsAsksKeysro  rp  r  r`  s          rC  parse_contract_bids_askszbigone.parse_contract_bids_asks  s    HMMOO,,q#l++,, 	Q 	QA OEe_FMM4,,U33T5F5Fv5N5NOPPPPrD  r  c                 b   |                      |d          }|                      |d          }|                     |          }|                     |          }||                     |                     |dd          |          |                     |                     |d          |          d d d dS )Nr  r  r   T)rI  r  r  r  r  nonce)rd  r  filter_by_limitsort_by)rA  r  rI  r  responseBidsresponseAsksr  r  s           rC  r  z bigone.parse_contract_order_book  s    y&99y&99,,\::,,\::((dAt)D)DeLL((dA)>)>FF
 
 	
rD  c                    |                      |                     |dd                    }|                     |d          }|                     |d          }|                     |d          }|                     ||d          }|                     |d          }|                     |d          }d }	|||d	k    r
||k    rd
nd}	||dk    rdnd}n|dk    rd}n|dk    rd}|                     |d          }
|                     |d          }d }|
|
}n||}|                     |d          }|||                     |          |d         |d||	||d |d}d }d }|	V|dk    r(|	dk    r|d         }|d         }nl|d         }|d         }n[|	dk    r|d         }|d         }nD|d         }|d         }n3|d	k    r-|dk    r|d         }|d         }n|dk    r|d         }|d         }|                     |d          }|                     |d          }||||d||dg|d<   n||d|d<   n|	||d|d<   nd |d<   |                     ||          S )N
created_atinserted_atr  r`  r  r  side
taker_sideSELF_TRADINGr   r   ASKsellbuyBIDmaker_order_idtaker_order_idr0  rI  r  )r0  r  r  rI  orderrb  r  takerOrMakerr  r`  r  r_  r  r  	maker_fee	taker_fee)r  rq  rr   r\  )	parse8601rj  rg  safe_marketiso8601
safe_trade)rA  trader  r  priceStringamountStringr  r  	takerSider  makerOrderIdtakerOrderIdorderIdr0  ro  makerCurrencyCodetakerCurrencyCodemakerFeeCosttakerFeeCosts                      rC  parse_tradezbigone.parse_trade  s2   T NN4#5#5e\=#Y#YZZ	&&ug66''x88##E+<==!!(FC88v..$$UL99	 !(8t~?U?U'0D'8'877wL< (50066uDDu}}''/?@@''/?@@#"GG%"GeT**"Y//X&( "
 
 ! #u}}7**(.v%(.w%%(.w%(.v%%7**(.w%(.v%%(.v%(.w%%^##E!!$*7O!$*6N!!e##$*6N!$*7O!''{;;''{;;#')7HII)7HII"v
 *6CT U Uu%%1?PQQF5MM F5Mvv...rD  sincec                 V   |                                   |                     |          }|d         rt          | j        dz             d|d         i}|                     |                     ||                    }|                     |dg           }|                     ||||          S )a   
        get the list of most recent trades for a particular symbol
        :see: https://open.big.one/docs/spot_asset_pair_trade.html
        :param str symbol: unified symbol of the market to fetch trades for
        :param int [since]: timestamp in ms of the earliest trade to fetch
        :param int [limit]: the maximum amount of trades to fetch
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
        r  z5 fetchTrades() can only fetch trades for spot marketsr  r0  rH  )r  r  r   r0  &publicGetAssetPairsAssetPairNameTradesr  	safe_listparse_trades	rA  rI  r,  r  rm  r  r  r  rz   s	            rC  fetch_tradeszbigone.fetch_tradeso  s     	V$$* 	`TW'^^___vd|
 >>t{{7TZ?[?[\\, &"55  >>>rD  c           	      (   |                      |                     |d                    |                     |d          |                     |d          |                     |d          |                     |d          |                     |d          gS )Ntimer  r  r  r  r  )r  rg  r  )rA  ohlcvr  s      rC  parse_ohlcvzbigone.parse_ohlcv  s     NN4++E6::;;UF++UF++UE**UG,,UH--
 	
rD  r]   c                 .   |                                   |                     |          }|d         rt          | j        dz             |d}|d         |                     | j        ||          |d}|I|                     |          }|                     |||z  dz            }	|                     |	          |d<   | 	                    | 
                    ||                    }
|                     |
d	g           }|                     |||||          S )
a  
        fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
        :see: https://open.big.one/docs/spot_asset_pair_candle.html
        :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
        r  z4 fetchOHLCV() can only fetch ohlcvs for spot marketsNd   r0  )r  periodr    r4  rH  )r  r  r   r0  rg  r6  parse_timeframesumr  'publicGetAssetPairsAssetPairNameCandlesr  r/  parse_ohlcvs)rA  rI  	timeframer,  r  rm  r  r  durationendr  rH  s               rC  fetch_ohlcvzbigone.fetch_ohlcv  s$    	V$$* 	_TW']]^^^=E%d|&&t	9MM
 

 ++I66H((5%("2T"9::C"ll3//GFO??GU[@\@\]]0 ~~h33  vy%GGGrD  c                    |d d d}|                      |dg           }t          dt          |                    D ]}||         }|                     |d          }|                     |          }|                                 }|                     |d          |d<   |                     |d          |d<   |||<   |                     |          S )	N)r_  r  r  rH  r   asset_symbolbalancetotallocked_balanceused)rd  re  rf  rg  rh  accountsafe_balance)	rA  r  ro  balancesrp  rE  rI  ra  rI  s	            rC  parse_balancezbigone.parse_balance  s    
 

 ??8VR88q#h--(( 	# 	#AqkG%%g~>>F**622DllnnG#//CCGG"..w8HIIGFO"F4LL  (((rD  c                     |                                   |                     |dd          }|                     |d          }d}|dk    s|dk    r|                     |          }n|                     |          }|                     |          S )a  
        query for balance and get the amount of funds available for trading or funds locked in orders
        :see: https://open.big.one/docs/fund_accounts.html
        :see: https://open.big.one/docs/spot_accounts.html
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
        rb   Nr   r   )r  rg  omitprivateGetFundAccountsprivateGetAccountsrL  )rA  rm  rb  r  s       rC  fetch_balancezbigone.fetch_balance  s     	3366**9226::HH..v66H !!(+++rD  rb  c                 >    ddddd}|                      |||          S )Nr  r  )
STOP_LIMITSTOP_MARKETLIMITMARKETrg  )rA  rb  typess      rC  
parse_typezbigone.parse_type  s4    !#	
 
 tT222rD  c                    |                      |d          }|                      |d          }|                     ||d          }|                     |                      |d                    }|                      |d          }|dk    rd}nd}|                      |d	          }t          j        |d
          rd }|                     |d          }	d }
|	rd}
|                     |                      |d                    }|                      |d          }d }d }d }|dk    r|dk    r|                      |d          }n,|                      |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#|          S )$Nr0  r  r  r  r  r  r  r  
stop_price0immediate_or_cancelIOCrb  r  r  filled_amountr`  r_  clientOrderIdclient_order_idr  r  lastTradeTimestamp
updated_atrI  timeInForcepostOnly	post_only	stopPricetriggerPricer  r  avg_deal_pricestate)filled	remainingstatusr\  rz   )
rg  r  r  r#   	string_eqrd  rZ  
safe_orderr  parse_order_status)rA  r  r  r0  r  rI  r  r  ri  immediateOrCancelre  rb  r  r`  rl  r  s                   rC  parse_orderzbigone.parse_order  s   ( eT**##E+<==!!(FC88NN4#3#3E<#H#HII	v..5==DDD''|<<\3// 	 L OOE3HII 	 Kt//v>>??  008##E?;;DD%%eX66F%%e_==F  
E 
" 
 T--e5FGG 
 	 

 Y// 
 !$..1A1A%1V1V"W"W 
 f 
 D 
 ; 
 {;; 
 D 
 U 
  
 L 
 f 
  D! 
" t''/?@@# 
$ --d.>.>ug.N.NOO- 
  
  
. /  	rD  r  c                     |                                   |                     |          }|d         st          | j        dz             d|d<   |                     |dd|d|          S )a  
        create a market buy order by providing the symbol and cost
        :see: https://open.big.one/docs/spot_orders.html#create-order
        :param str symbol: unified symbol of the market to create an order in
        :param float cost: how much you want to trade in units of the quote currency
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
        r+   z9 createMarketBuyOrderWithCost() supports spot orders onlyFr  r  r  N)r  r  r    r0  create_order)rA  rI  r  rm  r  s        rC  !create_market_buy_order_with_costz(bigone.create_market_buy_order_with_cost`  ss     	V$$f~ 	ftw)ddeee6;23  5$fMMMrD  r  r`  r  c                    |                                   |                     |          }|dk    }|rdnd}	|                                }
|
dk    }|                     |dd          }d}|                     |
dk    ||          \  }}|                     |g d	          }|d
         |	|                     ||          d}|s|
dk    r^|                     ||          |d<   |r(|                     |d          }|dk    rd|d<   |rd|d<   |                     ||          |d<   n|rd}| 	                    |ddd          \  }}| 
                    |d          }|                     |d          }|r||t          | j        dz             |                     |          }|                     |          }|                     t!          j        ||                    }||n|}|                     ||          |d<   n3|                     ||          |d<   n|                     ||          |d<   |/|                     ||          |d<   |rdnd|d<   |rd}
n|
dk    rd}
|
|d<   |                     |d          }|||d<   |                     |g d          }|                     |                     ||                    }|                     |d           }|                     ||          S )!a  
        create a trade order
        :see: https://open.big.one/docs/spot_orders.html#create-order
        :param str symbol: unified symbol of the market to create an order in
        :param str type: 'market' or 'limit'
        :param str side: 'buy' or 'sell'
        :param float amount: how much of currency you want to trade in units of base currency
        :param float [price]: the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :param float [params.triggerPrice]: the price at which a trigger order is triggered at
        :param bool [params.postOnly]: if True, the order will only be posted to the order book and not executed immediately
        :param str [params.timeInForce]: "GTC", "IOC", or "PO"
        :param float [params.cost]: *spot market buy only* the quote quantity that can be used alternative for the amount
         *
         * EXCHANGE SPECIFIC PARAMETERS
        :param str operator: *stop order only* GTE or LTE(default)
        :param str client_order_id: must match ^[a-zA-Z0-9-_]{1,36}$ self regex. client_order_id is unique in 24 hours, If created 24 hours later and the order closed, it will be released and can be reused
        :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
        r  r  r  rV  rg  FNrW  )ri  rh  r\  r0  )r  r  r`  rT  r  re  r_  Tr^  r`  r5   r  r  z createOrder() requires the price argument for market buy orders to calculate the total cost to spend(amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to False and pass the cost to spend in the amount argumentr\  GTELTEoperatorrU  rb  ra  rb  )r\  rh  ri  re  ra  rH  )r  r  upper	safe_boolhandle_post_onlysafe_string_namount_to_precisionprice_to_precisionrg  handle_option_and_paramsr  rO  r   r0  number_to_stringparse_to_numericr#   
string_mulcost_to_precisionprivatePostOrdersr  r  rs  )rA  rI  rb  r  r`  r  rm  r  isBuyrequestSideuppercaseTypeisLimitexchangeSpecificParamrf  ri  r  re  r  r  r"  r!  quoteAmountcostRequestra  r  r  s                             rC  ru  zbigone.create_orderp  s   ( 	V$$$/ee%

7* $v{E J J00-82KNcekll&))&2]2]2]^^%d|..vv>>
 
  	M}44#66vuEEGG 0"..v}EE%''59G12 0+/GK( $ 8 8 H HGH M481<@<Y<YZ`bo  rU  W[  =\  =\916''7766224 
ODL*47  6q  ,q  r  r  r'+'<'<V'D'D&*&;&;E&B&B&*&;&;G<N|]h<i<i&j&j/3/?ddk,0,B,B6;,W,W))(,(>(>vv(N(NGH%%$($<$<VV$L$L!#$($;$;FL$Q$QGL!+0";%%eGJ . ,(** -'((AA$)6G%&6#n#n#noo))$++gv*F*FGG x00v...rD  r0  c                     |                                   d|i}|                     |                     ||                    }|                     |d          }|                     |          S )ax  
        cancels an open order
        :see: https://open.big.one/docs/spot_orders.html#cancel-order
        :param str id: order id
        :param str symbol: Not used by bigone cancelOrder()
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
        r0  rH  )r  privatePostOrdersIdCancelr  r  rs  rA  r0  rI  rm  r  r  r  s          rC  cancel_orderzbigone.cancel_order  si     	*11$++gv2N2NOO x00&&&rD  c                     |                                   |                     |          }d|d         i}|                     |                     ||                    }|S )a  
        cancel all open orders
        :see: https://open.big.one/docs/spot_orders.html#cancel-all-orders
        :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>`
        r  r0  )r  r  privatePostOrdersCancelr  )rA  rI  rm  r  r  r  s         rC  cancel_all_orderszbigone.cancel_all_orders  sa     	V$$vd|
 //GV0L0LMM rD  c                     |                                   d|i}|                     |                     ||                    }|                     |di           }|                     |          S )aq  
        fetches information on an order made by the user
        :see: https://open.big.one/docs/spot_orders.html#get-one-order
        :param str symbol: not used by bigone fetchOrder
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
        r0  rH  )r  privateGetOrdersIdr  r  rs  r  s          rC  fetch_orderzbigone.fetch_order  si     	***4;;w+G+GHHx44&&&rD  c                 X   |t          | j        dz             |                                  |                     |          }d|d         i}|||d<   |                     |                     ||                    }|                     |dg           }|                     ||||          S )aH  
        fetches information on multiple orders made by the user
        :see: https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
        :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  r0  r  rH  )r   r0  r  r  privateGetOrdersr  r/  parse_orders)	rA  rI  r,  r  rm  r  r  r  rx   s	            rC  fetch_orderszbigone.fetch_orders  s     >#DG.Y$YZZZV$$vd|
 $GG((Wf)E)EFF* &"55  >>>rD  c                 X   |t          | j        dz             |                                  |                     |          }d|d         i}|||d<   |                     |                     ||                    }|                     |dg           }|                     ||||          S )a  
        fetch all trades made by the user
        :see: https://open.big.one/docs/spot_trade.html#trades-of-user
        :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  r0  r  rH  )r   r0  r  r  privateGetTradesr  r/  r0  r1  s	            rC  fetch_my_tradeszbigone.fetch_my_tradesE  s     >#DG.[$[\\\V$$vd|
 $GG((Wf)E)EFFF &"55  >>>rD  c                 :    dddd}|                      ||          S )Nr  closedcanceled)PENDINGFILLED	CANCELLEDrX  rA  rn  statusess      rC  rq  zbigone.parse_order_status  s/    #
 

 &111rD  c           	      b    ddi}|                      ||||                     ||                    S )a#  
        fetch all unfilled currently open orders
        :see: https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
        :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>`
        rk  r  r  r  rA  rI  r,  r  rm  r  s         rC  fetch_open_orderszbigone.fetch_open_orders  s:     Y
   t{{7F7S7STTTrD  c           	      b    ddi}|                      ||||                     ||                    S )aO  
        fetches information on multiple closed orders made by the user
        :see: https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
        :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>`
        rk  r  r  r  s         rC  fetch_closed_orderszbigone.fetch_closed_orders  s:     X
   t{{7F7S7STTTrD  c                     |                      | j        dd          dz  }|                     |                                 dz  |          S )Nr  r   r  r:  )r  r9  r<  microseconds)rA  exchangeTimeCorrections     rC  r  zbigone.nonce  sJ    !%!2!24<Aacd!e!eho!oxx))++d24JKKKrD  ri   GETc                    |                      ||                     |                    }|                     | j        d         |                   }|dz   |                     ||          z   }	i }|dk    s|dk    s|dk    r|r|	d|                     |          z   z  }	n|                                  t          |                                           }
d| j	        |
d}| 
                    ||                     | j                  d	          }d
|z   |d<   |dk    r|r|	d|                     |          z   z  }	n |dk    rd|d<   |                     |          }d| j        z   dz   | j        z   |d<   |	|||dS )Nro   r  ri   rm   rk   ?	OpenAPIV2)rb  subr  sha256zBearer Authorizationr  POSTzapplication/jsonzContent-Typezccxt/r  z
User-Agent)urlmethodbodyheaders)rO  extract_paramsimplode_hostnamer8  implode_params	urlencodecheck_required_credentialsstrr  apiKeyjwtencodesecretjsonr0  r3  )rA  pathro   r  rm  r  r  querybaseUrlr  r  r  tokens                rC  signzbigone.sign  s   		&$"5"5d";";<<''	%(8(=>>md11$???(??c]22c=M6M6M 3sT^^E2222++---

%%E#{ G HHWdkk$+&>&>IIE'05'8GO$ 73!6!666C6!!*<'yy'' '$' 1C 7$, FfdwOOOrD  ra  c                    |                                   |                     |          }d|d         i}|                     |          \  }}|                     |                     ||                    }|                     |dg           }t          |          }	|	dk     rt          | j        dz             | 	                    |d          }
| 
                    |||
          }|                     |
|i           }|                     |d          }|                     |d          }|                     |           ||||                     |          |d	S )
a  
        fetch the deposit address for a currency associated with self account
        :see: https://open.big.one/docs/spot_deposit.html#get-deposite-address-of-one-asset-of-user
        :param str code: unified currency code
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
        rD  r0  rH  r  z6 fetchDepositAddress() returned empty address responserw  valuememo)rq  addresstagrZ  r_  )r  rq  handle_network_code_and_params"privateGetAssetsAssetSymbolAddressr  rd  rf  r   r0  index_by#select_network_id_from_raw_networksrg  check_addressrk  )rA  ra  rm  rq  r  ry  paramsOmittedr  rH  
dataLengthchainsIndexedByIdselectedNetworkIdaddressObjectr  r  s                  rC  fetch_deposit_addresszbigone.fetch_deposit_address  sc    	==&&HTN
 &*%H%H%P%P"]::4;;wP];^;^__$ x44YY
>>*b bccc MM$88 DDT;Xijj(9;LbQQ""='::}f557###../@AA
 
 	
rD  c                 @    dddddd}|                      |||          S )Nokpending)WITHHOLDUNCONFIRMED	CONFIRMED	COMPLETEDr  rX  r  s      rC  parse_transaction_statuszbigone.parse_transaction_status  s9     $ 
 
 &&999rD  rq  c                    |                      |d          }|                     |          }|                      |d          }|                     |d          }|                     |                      |d                    }|                     |                      |d                    }|                     |                     |dd                    }	|                      |d          }
|                      |d	          }|                      |d
          }d|v rdnd}|                     |d          }i d|d|d|
d|d|                     |          dd dd dd d|dd d|dd d|d|d|d|d|	d d |dS )NrD  r0  r`  rk  r  rd  completed_attxidtarget_addressr  customer_id
withdrawalrY  is_internalr_  r  r  rZ  addressFromr  	addressTotagFromr  tagTorb  rq  rn  updated)r\  commentinternal)rg  rh  r  r  r  rj  rd  r  )rA  transactionrq  
currencyIdra  r0  r`  rn  r  r  r  r  r  rb  r  s                  rC  parse_transactionzbigone.parse_transaction  s   h %%k>BB
&&z22k400!!+x88..t/?/?W/U/UVVNN4#3#3K#O#OPP	..!3!3K~!^!^__V44"";0@AA{F33 - < <||9??;>>
K
"
 D
 	

 Y//
 t
 4
 t
 
 t
 3
 T
 D
 f
 
  f!
" w#
$  )
 
 
 	
rD  c                 4   |                                   i }d}| |                     |          }|d         |d<   |||d<   |                     |                     ||                    }|                     |dg           }|                     ||||          S )a  
        fetch all deposits made to an account
        :see: https://open.big.one/docs/spot_deposit.html#deposit-of-user
        :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>`
        Nr0  rD  r  rH  )r  rq  privateGetDepositsr  r/  parse_transactions)	rA  ra  r,  r  rm  r  rq  r  r|   s	            rC  fetch_depositszbigone.fetch_depositsY  s     	
 }}T**H&.tnGN#$GG**4;;w+G+GHH, >>(FB77&&x5%HHHrD  c                 4   |                                   i }d}| |                     |          }|d         |d<   |||d<   |                     |                     ||                    }|                     |dg           }|                     ||||          S )a'  
        fetch all withdrawals made from an account
        :see: https://open.big.one/docs/spot_withdrawal.html#get-withdrawals-of-user
        :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>`
        Nr0  rD  r  rH  )r  rq  privateGetWithdrawalsr  r/  r  )	rA  ra  r,  r  rm  r  rq  r  r{   s	            rC  fetch_withdrawalszbigone.fetch_withdrawals  s     	
 }}T**H&.tnGN#$GG--dkk'6.J.JKK, nnXvr::&&{HeUKKKrD  fromAccount	toAccountc                    |                                   |                     |          }|                     | j        di           }|                     |||          }|                     |||          }	|                     |d|                                           }
|d         |                     ||          ||	|
d}|                     |                     ||                    }| 	                    ||          }|                     | j        di           }| 
                    |dd          }|r||d<   ||d	<   ||d
<   |
|d<   |S )a+  
        transfer currency internally between wallets on the same account
        :see: https://open.big.one/docs/spot_transfer.html#transfer-of-user
        :param str code: unified currency code
        :param float amount: amount to transfer
        :param str fromAccount: 'SPOT', 'FUND', or 'CONTRACT'
        :param str toAccount: 'SPOT', 'FUND', or 'CONTRACT'
        :param dict [params]: extra parameters specific to the exchange API endpoint
        :returns dict: a `transfer structure <https://docs.ccxt.com/#/?id=transfer-structure>`
        r  guidr0  )rI  r`  fromtor  rO   r   Tr  r  r`  )r  rq  rd  r9  rg  r  currency_to_precisionprivatePostTransferr  parse_transferr|  )rA  ra  r`  r  r  rm  rq  r  fromIdtoIdr  r  r  rO   transferOptionsr   s                   rC  rO   zbigone.transfer  sX    	==&&7GLL!!.+{KK	9EE		<<tn00v>>
 
 ++DKK,H,HII &&x:://$,
BGG"&..B[]a"b"b" 	"&1H]#$-H[!!'HX!HTNrD  c                 l    |                      |d          }|d d d d d d d |                     |          d	S )Nra  )	r_  r0  r  r  rq  r`  r  r  rn  )r  parse_transfer_status)rA  rO   rq  ra  s       rC  r  zbigone.parse_transfer  sQ     &110066

 

 
	
rD  c                 8    ddi}|                      ||d          S )Nr]  r  failedrX  r  s      rC  r	  zbigone.parse_transfer_status  s(    
 &(;;;rD  c                    |                      ||          \  }}|                                  |                     |          }|d         ||                     ||          d}|||d<   d}|                     |          \  }}||                     |          |d<   |                     |                     ||                    }	|                     |	di           }
| 	                    |
|          S )a  
        make a withdrawal
        :see: https://open.big.one/docs/spot_withdrawal.html#create-withdrawal-of-user
        :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>`
        r0  )rI  r  r`  Nr  rP  rH  )
handle_withdraw_tag_and_paramsr  rq  r  r  network_code_to_idprivatePostWithdrawalsr  r  r  )rA  ra  r`  r  r  rm  rq  r  ry  r  rH  s              rC  rP   zbigone.withdraw  s    99#vFFV==&&tn%00v>>
 

 ?!GFO"AA&IIV"&*&=&=k&J&JGN#..t{{7F/K/KLL, ~~h33%%dH555rD  c
                 z   |d S |                      |d          }
|                      |d          }|
dk    r|
| j        dz   |z   }|                     | j        d         ||           |                     | j        d         |
|           |                     | j        d         ||           t          |          d S )Nra  messager]   r'  r(  )rg  r0  throw_exactly_matched_exceptionr;  throw_broadly_matched_exceptionr   )rA  httpCodereasonr  r  r  r  r  requestHeadersrequestBodyra  r  feedbacks                rC  handle_errorszbigone.handle_errors1  s    4
 &11""8Y77CKKd.w}t+H001I7T\]]]001I4QYZZZ001I7T\]]])))trD  )N)B__name__
__module____qualname__r?  r   r~  r   r
   r  r   r  r  r  r   r   r  r  r	   r   r  r  objectr  r   r+  r2  r  r6  rB  r   rL  rR  rZ  r   rs  floatrv  r   r   r   ru  r   r  r  r  r  r  rq  r  r  r  r  r  r  r   r   r  r  r  r   rO   r  r	  rP   r  __classcell__)rB  s   @rC  r%   r%      s       z z z z zx	 ') q qZ q q q qf $& u u$v, u u u unJ J6 JV J J J JX 02 %4 %43 %4f %4 %4 %4 %4N 04B PH PHW PH7 PH PH PH PHd !# 6 6 6 6& :>b Cq Cqs Cq3 CqY Cq Cq Cq CqJ  
 
6 
3 
s 
^g 
 
 
 
y/ y/ y/5 y/ y/ y/ y/v 6:UW (? (?3 (?s (?# (?\`af\g (? (? (? (?T
 
 
4 
 
 
 
( 26DW[df 4H 4H# 4Hc 4HQT 4Hkoptku 4H 4H 4H 4Hl) ) ) ) )" $& , ,( , , , ,83s 3 3 3 3E E E5 E E E EN RT N N N5 N N N N  gksu _/ _/3 _/i _/y _/RW _/`c _/ _/ _/ _/B 37r ' 's 'C ' ' ' '6 /32      8 26b ' 'c '3 ' ' ' ' *.Dt\^ -? -?3 -?c -? -?cghmcn -? -? -? -?^ -1tRV_a 8? 8?c 8? 8?C 8? 8? 8? 8?t2 2 2 /3TXac U U U3 Uc Uhlmrhs U U U U 154VZce U U# US UPS Ujnotju U U U UL L L &eBSW P P P P8 79 0
 0
# 0
 0
 0
 0
d	: 	: 	:U
 U
x U
; U
 U
 U
 U
n *.Dt\^ .I .I3 .Ic .I .Icghsct .I .I .I .I` -1tRV_a .L .Lc .L .LC .Lfjkvfw .L .L .L .L` [] ) )S )% )c )c )an ) ) ) )V
 
 
 
 
 
(< < < ?C2 16 16S 16% 16 16 16 16f      rD  r%   N))ccxt.base.exchanger   ccxt.abstract.bigoner   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   r   r   r    r!   ccxt.base.decimal_to_precisionr"   ccxt.base.preciser#   r%    rD  rC  <module>r)     sE   ( ' ' ' ' ' , , , , , , }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }  }       * * * * * * 0 0 0 0 0 0 - - - - - - . . . . . . ' ' ' ' ' ' & & & & & & . . . . . . ) ) ) ) ) ) ) ) ) ) ) ) . . . . . . 4 4 4 4 4 4 % % % % % %h  h  h  h  h X{ h  h  h  h  h rD  