UNPKG

@compendiumfi/pendax

Version:

connector for centralized cryptocurrency exchanges

1 lines 37.3 kB
const a9_0x2a5536=a9_0x2fc4;(function(_0x1fe96b,_0x4da056){const _0x7ad8c0=a9_0x2fc4,_0xddf27b=_0x1fe96b();while(!![]){try{const _0x4210f5=parseInt(_0x7ad8c0(0x279))/0x1*(-parseInt(_0x7ad8c0(0x1e3))/0x2)+parseInt(_0x7ad8c0(0x209))/0x3*(-parseInt(_0x7ad8c0(0x26a))/0x4)+parseInt(_0x7ad8c0(0x268))/0x5+parseInt(_0x7ad8c0(0x1fa))/0x6+parseInt(_0x7ad8c0(0x243))/0x7*(parseInt(_0x7ad8c0(0x282))/0x8)+-parseInt(_0x7ad8c0(0x21b))/0x9*(parseInt(_0x7ad8c0(0x2b0))/0xa)+parseInt(_0x7ad8c0(0x23f))/0xb;if(_0x4210f5===_0x4da056)break;else _0xddf27b['push'](_0xddf27b['shift']());}catch(_0x53b545){_0xddf27b['push'](_0xddf27b['shift']());}}}(a9_0x41b1,0x7b906));import a9_0x3eb976 from'axios';import a9_0x429887,{sign}from'crypto';function a9_0x2fc4(_0x12caab,_0x4784f9){const _0x41b17f=a9_0x41b1();return a9_0x2fc4=function(_0x2fc480,_0x494024){_0x2fc480=_0x2fc480-0x1a1;let _0x4ba818=_0x41b17f[_0x2fc480];return _0x4ba818;},a9_0x2fc4(_0x12caab,_0x4784f9);}import a9_0x1a9eaa from'short-unique-id';import a9_0x3f67be from'crypto-js';function a9_0x41b1(){const _0x380875=['changeMarginFutures','/api/v3/capital/convert','getKlinesSpot','/api/v1/contract/kline/fair_price/','stringify','1228173sTBWvG','toString','/api/v3/etf/info','dhsyTW5!ysh8IuysQKcG45','subaccount','application/json','sha256','getBookTickerSpot','orderId\x20or\x20origClientOrderId\x20required\x20as\x20parameter','exchange','DELETE','sockets','/api/v3/capital/deposit/address','getServerTimeFutures','log','getCurrentHoldingPositionFutures','/api/v3/capital/transfer','/api/v3/ping','6090543gjGsRp','/api/v3/sub-account/apiKey','https','universalTransferSpot','mxDeductEnable','/api/v3/mxDeduct/enable','getPositionModeFutures','tranId','parse','/api/v3/sub-account/list','/api/v3/sub-account/virtualSubAccount','external_oid','deKJA','Hmac','mJDtx','authenticate','https://contract.mexc.com','/api/v1/private/account/risk_limit','key','WVcDx','data','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','/api/v1/private/stoporder/list/orders','auystrAAS2iW85#s2@jdDC','getContractTransactionDataFutures','/api/v3/myTrades','getAvgPriceSpot','Missing\x20params:\x20','/api/v3/capital/withdraw/address','/api/v3/trades','keys','Ymntf','getContractNDepthInfoFutures','getContractFundingRateHistoryFutures','TEDyt','proxyPort','14315169PPmwLA','useProxy','application/JSON','AsZDK','7ESNAMO','/api/v3/account','/api/v3/capital/convert/list','/api/v1/private/position/position_mode','getContractDepthInfoFutures','getLeverageFutures','/api/v1/private/position/change_margin','getHistoryPositionInformationFutures','getContractIndexPriceKlineFutures','testNewOrderSpot','/api/v1/contract/ticker','euEMo','qbFLM','network','lAyAe','/api/v3/rebate/taxQuery','getAllTranscationDetailsUserOrderFutures','getContractFairPriceFutures','/api/v1/private/position/list/history_positions','/api/v3/selfSymbols','proxyUser','/api/v3/openOrders','secret','asset','userUniversalTransferSpot','recvWindow=','default','getContractTrendDataFutures','isMain','status','/api/v3/klines','hEhKM','WBxGu','/api/v1/contract/support_currencies','https://api.mexc.com','/api/v3/exchangeInfo','QKZth','1006925IXEnFP','getDustLogSpot','4UmoOSR','getDefaultSymbolsSpot','executeGetRequest','getCurrencyInformationSpot','limit','uXIEb','getAllContractRiskFundBalanceFutures','spoturl','code','query','/api/v1/private/order/list/history_orders','mBqqg','futuresRequest','createSubaccountApiKeySpot','/api/v1/private/order/deal_details/','32789elHXgO','orderId','rRekn','publicApis','dArds','getWithdrawAddressSpot','apiKey','doLog','cancelOpenOrdersSpot','3125048Znvjie','slice','Utf8','permissions','hQtLe','getBalances','/api/v1/private/order/get/','/api/v1/private/order/list/order_deals','ymWxp','symbol\x20is\x20a\x20required\x20parameter','symbol\x20and\x20limit\x20are\x20required\x20parameters','getSubaccountListSpot','symbol','name','/api/v3/aggTrades','/api/v1/private/planorder/list/orders','executeRequest','proxyAuth','label','now','GsgCs','newOrderSpot','toAccountType','dustTransferSpot','YHdQq','getStopLimitOrderListFutures','dec','testConnectivitySpot','page_num','ESNKH','getContractRiskFundBalanceHistoryFutures','push','exchangename','/api/v1/contract/depth_commits/','/api/v3/capital/deposit/hisrec','apiSecret','getServerTimeSpot','/api/v1/contract/risk_reverse/history','HLLmh','&timestamp=','/api/v3/capital/transfer/tranId','origClientOrderId','logDeletes','BxQBW','fromAccount','currency','10FyaQdE','nsWcT','&signature=','getExchangeInformationSpot','OwAjp','getRiskLimitsFutures','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','Mnydo','createSignedPayload','msg','Omaub','getOrderByOrderNumberFutures','length','note','decrypt','proxyPass','getOpenOrdersSpot','/api/v1/private/order/external/','/api/v3/time','getAggTradesSpot','hex','proxy','/api/v1/private/account/tiered_fee_rate','getRebateRecordsDetail','getMxConvertableAssetsSpot','deleteSubaccountApiKeySpot','generateDepositAddressSpot','getUserFundingRateDetails','amount','createUnsignedPayload','getUserAssetInfoFutures','/api/v3/ticker/24hr','/api/v1/private/position/open_positions','AES','&recvWindow=','address','/api/v1/private/account/transfer_record','logGets','auth','addProxyObject','GET','getMxDeductStatus','QgZbb','getContractKlineFutures','join','/api/v3/avgPrice','order_id\x20is\x20a\x20required\x20parameter','NHqwo','getOrderByExternalNumberFutures','enableMxDeduct','/api/v1/contract/kline/','HJqgV','MARKET','/api/v3/order/test?','getAllUserHistoricalOrdersFutures','POST','createSignaturePrehash','/api/v1/private/position/leverage','/api/v3/ticker/price','getContractFairPriceKlineFutures','quantity','XFPHk','getUniversalTransferHistorySpot','order_id','futuresurl','/api/v3/capital/config/getall','quantity\x20or\x20quoteOrderQty\x20required\x20for\x20type\x20MARKET','/api/v3/capital/withdraw','/api/v1/contract/kline/index_price/','/api/v1/contract/funding_rate/','getTransferableCurrenciesFutures','body','getRebateHistoryRecords','getReferCode','/api/v1/contract/index_price/','digest','update','/api/v1/private/account/asset/','coin','iXzwy','getContractFundingRateFutures','jvD+/C+JqXhqhZcCvnGOeQ==','price\x20and\x20quantity\x20required\x20for\x20type\x20LIMIT','unvalidatedGetSpot','passphrase','page_size','subAccount','38lXmWqz','toAccount\x20or\x20fromAccount\x20required\x20as\x20parameter','/api/v1/private/position/funding_records','get24HrTickerSpot','filter','getDepositHistorySpot','Base64','getDepositAddressSpot','includes','url','/api/v1/contract/detail','type','sort','/api/v1/contract/deals/','enc','LIMIT','toAccount','/api/v3/rebate/detail/kickback','getPriceTickerSpot','side','quoteOrderQty','createAuthHeaderV1','Proxy\x20port\x20required','1930992JGHbys','nYnSs','createAuthHeader','/api/v3/order','interval','spotRequest','fromAccountType','MghDJ','zaHCj','/api/v1/contract/risk_reverse'];a9_0x41b1=function(){return _0x380875;};return a9_0x41b1();}import{access}from'fs';export class Mexc{[a9_0x2a5536(0x27c)]=new Array();['ky']=a9_0x2a5536(0x232);['i']=a9_0x2a5536(0x20c);[a9_0x2a5536(0x214)]={};[a9_0x2a5536(0x1b1)]=![];['logPosts']=![];[a9_0x2a5536(0x2ac)]=![];constructor(_0x3e8adc){const _0x23bfc3=a9_0x2a5536;this[_0x23bfc3(0x1cc)]=_0x23bfc3(0x22b),this['spoturl']=_0x23bfc3(0x265),this[_0x23bfc3(0x22a)]=_0x3e8adc[_0x23bfc3(0x22a)]==undefined?!![]:_0x3e8adc[_0x23bfc3(0x22a)],this[_0x23bfc3(0x28f)]=_0x3e8adc[_0x23bfc3(0x212)][_0x23bfc3(0x2a2)]==undefined?'mexc':_0x3e8adc[_0x23bfc3(0x212)]['exchangename'],this['exchangeid']=_0x3e8adc[_0x23bfc3(0x212)]['id'],this[_0x23bfc3(0x294)]=_0x3e8adc['label'];if(this[_0x23bfc3(0x22a)]){if(!_0x3e8adc[_0x23bfc3(0x22d)]||!_0x3e8adc[_0x23bfc3(0x259)]||_0x3e8adc[_0x23bfc3(0x22d)]==''||_0x3e8adc['secret']=='')throw _0x23bfc3(0x2b6);this[_0x23bfc3(0x27f)]=_0x3e8adc[_0x23bfc3(0x22d)],this[_0x23bfc3(0x2a5)]=_0x3e8adc[_0x23bfc3(0x259)],this['isMain']=_0x3e8adc[_0x23bfc3(0x20d)]==undefined,this['subaccount']=this[_0x23bfc3(0x25f)]?'':_0x3e8adc['subaccount'],this[_0x23bfc3(0x1e0)]=_0x3e8adc[_0x23bfc3(0x1e0)];}this[_0x23bfc3(0x240)]=![];if(_0x3e8adc[_0x23bfc3(0x240)]){if(_0x3e8adc[_0x23bfc3(0x1a1)]&&_0x3e8adc[_0x23bfc3(0x1a1)]!=''){this[_0x23bfc3(0x240)]=!![],this[_0x23bfc3(0x1a1)]=this[_0x23bfc3(0x1ec)],this[_0x23bfc3(0x1a1)]=_0x3e8adc[_0x23bfc3(0x1a1)];if(_0x3e8adc[_0x23bfc3(0x23e)]){if(_0x23bfc3(0x2b1)===_0x23bfc3(0x2b1))this[_0x23bfc3(0x23e)]=_0x3e8adc[_0x23bfc3(0x23e)];else return this[_0x23bfc3(0x1df)](_0x3c0ef5,[_0x23bfc3(0x28e)],_0x23bfc3(0x290));}else{if(_0x23bfc3(0x24f)!==_0x23bfc3(0x24f))_0x16edc4('No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters');else throw'Proxy\x20port\x20required';}}if(_0x3e8adc[_0x23bfc3(0x257)]){if(_0x23bfc3(0x2ad)!=='BxQBW')throw{'message':_0x23bfc3(0x211)};else this[_0x23bfc3(0x257)]=_0x3e8adc[_0x23bfc3(0x257)];}_0x3e8adc['proxyPass']&&(this[_0x23bfc3(0x2bf)]=_0x3e8adc[_0x23bfc3(0x2bf)]);if(_0x3e8adc[_0x23bfc3(0x293)]===!![]){if(_0x23bfc3(0x27b)===_0x23bfc3(0x27b))this[_0x23bfc3(0x293)]=!![];else return this[_0x23bfc3(0x1df)](_0x254fa2,[],'/api/v3/ticker/price');}else this['proxyAuth']=![];}this['br']=_0x23bfc3(0x1dd),this[_0x23bfc3(0x27c)][_0x23bfc3(0x2a1)](_0x23bfc3(0x2a6),_0x23bfc3(0x29d),_0x23bfc3(0x26b),_0x23bfc3(0x2b3),'getOrderBookSpot','getRecentTradesListSpot','getAggTradesSpot',_0x23bfc3(0x206),_0x23bfc3(0x1f5),_0x23bfc3(0x210));}[a9_0x2a5536(0x29c)]=_0x474351=>{const _0x55c3ff=a9_0x2a5536;if(_0x474351==null){if('lwjoT'!=='nZKjl')return undefined;else{if(_0x37a84d==null)return _0x4eb934;const _0x22a9ba=_0x4af27e[_0x55c3ff(0x1f1)][_0x55c3ff(0x1e9)][_0x55c3ff(0x223)](this['ky']),_0x1a3600=_0x543364['enc'][_0x55c3ff(0x1e9)][_0x55c3ff(0x223)](this['i']);return _0x2102c9[_0x55c3ff(0x1ad)][_0x55c3ff(0x2be)](_0x30ad4,_0x22a9ba,{'iv':_0x1a3600})[_0x55c3ff(0x20a)](_0x1b63ae[_0x55c3ff(0x1f1)][_0x55c3ff(0x284)]);}}const _0x2c478d=a9_0x3f67be['enc']['Base64'][_0x55c3ff(0x223)](this['ky']),_0x4abd8f=a9_0x3f67be['enc'][_0x55c3ff(0x1e9)]['parse'](this['i']);return a9_0x3f67be[_0x55c3ff(0x1ad)]['decrypt'](_0x474351,_0x2c478d,{'iv':_0x4abd8f})[_0x55c3ff(0x20a)](a9_0x3f67be[_0x55c3ff(0x1f1)][_0x55c3ff(0x284)]);};async[a9_0x2a5536(0x1fc)](){const _0x39146f=a9_0x2a5536;let _0x162cd8=_0x39146f(0x20e),_0x2cda5d={'Content-Type':_0x162cd8,'source':this[_0x39146f(0x29c)](this['br']),'X-MEXC-APIKEY':this[_0x39146f(0x27f)]};return _0x2cda5d;}async['createSignedPayload'](_0x275373,_0x19167f){const _0x4ba95b=a9_0x2a5536;let _0x4b75ba=Date[_0x4ba95b(0x295)](),_0x19b28d='5000',_0x4ca7e7=[],_0x36d644='';for(let _0x5cbcf8 in _0x19167f){_0x4ca7e7[_0x4ba95b(0x2a1)](_0x5cbcf8+'='+_0x19167f[_0x5cbcf8]);}_0x36d644=_0x4ca7e7[_0x4ba95b(0x1b8)]('&');let _0x2a989c=_0x275373+_0x4ca7e7[_0x4ba95b(0x2bc)]>0x0?_0x36d644+_0x4ba95b(0x1ae)+_0x19b28d+_0x4ba95b(0x2a9)+_0x4b75ba:''+_0x4ba95b(0x1ae)+_0x19b28d+_0x4ba95b(0x2a9)+_0x4b75ba;_0x2a989c=_0x2a989c[0x0]=='&'?_0x2a989c[_0x4ba95b(0x283)](0x1):_0x2a989c;let _0x3bdf97=this[_0x4ba95b(0x1c4)](this[_0x4ba95b(0x2a5)],_0x2a989c),_0x4dea1f={};if(_0x275373!==''&&_0x36d644!=='')_0x4dea1f[_0x4ba95b(0x273)]=_0x275373,_0x4dea1f[_0x4ba95b(0x1d3)]=_0x36d644+_0x4ba95b(0x1ae)+_0x19b28d+_0x4ba95b(0x2a9)+_0x4b75ba+'&signature='+_0x3bdf97;else{if(_0x275373!==''){if(_0x4ba95b(0x1bf)!=='rRvFr')_0x4dea1f[_0x4ba95b(0x273)]=_0x275373+_0x4ba95b(0x1ae)+_0x19b28d+_0x4ba95b(0x2a9)+_0x4b75ba+_0x4ba95b(0x2b2)+_0x3bdf97;else throw{'message':_0x4ba95b(0x1e4)};}else _0x36d644!==''?_0x4dea1f[_0x4ba95b(0x1d3)]=_0x36d644+_0x4ba95b(0x1ae)+_0x19b28d+_0x4ba95b(0x2a9)+_0x4b75ba+_0x4ba95b(0x2b2)+_0x3bdf97:_0x4dea1f[_0x4ba95b(0x1d3)]=_0x4ba95b(0x25c)+_0x19b28d+_0x4ba95b(0x2a9)+_0x4b75ba+_0x4ba95b(0x2b2)+_0x3bdf97;}return _0x4dea1f;}async['createUnsignedPayload'](_0x45f059,_0x3e85b3){const _0x234837=a9_0x2a5536;let _0x2a26b8=[],_0x2f7a6e='';for(let _0x4855f0 in _0x3e85b3){_0x2a26b8[_0x234837(0x2a1)](_0x4855f0+'='+_0x3e85b3[_0x4855f0]);}_0x2f7a6e=_0x2a26b8[_0x234837(0x1b8)]('&');let _0x5b8a7b={};return _0x5b8a7b['query']=_0x45f059,_0x5b8a7b[_0x234837(0x1d3)]=_0x2f7a6e,_0x5b8a7b;}['createSignaturePrehash'](_0x3c6da0,_0x27b4ab){const _0x12ec8a=a9_0x2a5536;return a9_0x429887['Hmac'](_0x12ec8a(0x20f),_0x3c6da0)['update'](_0x27b4ab)[_0x12ec8a(0x1d7)](_0x12ec8a(0x2c4));}[a9_0x2a5536(0x1b3)](_0x2994b3){const _0x29d8e5=a9_0x2a5536;if(this['useProxy']){if('LNcVI'===_0x29d8e5(0x27d))throw{'message':_0x29d8e5(0x1de)};else{let _0x81ea85={'protocol':_0x29d8e5(0x21d),'host':this['proxy'],'port':this[_0x29d8e5(0x23e)]};this[_0x29d8e5(0x293)]===!![]&&(_0x81ea85['auth']={'username':this[_0x29d8e5(0x257)],'password':this[_0x29d8e5(0x2bf)]}),_0x2994b3['proxy']=_0x81ea85;}}return _0x2994b3;}async[a9_0x2a5536(0x292)](_0x460fb3,_0x481241,_0xbc4e87,_0x10ec24=null){const _0xe238ca=a9_0x2a5536;let _0x41f011={'baseURL':_0xbc4e87,'url':_0x481241,'method':_0x460fb3,'headers':_0xbc4e87==this['spoturl']?await this[_0xe238ca(0x1fc)]():await this[_0xe238ca(0x1f8)](_0x10ec24,_0x460fb3)};_0x41f011=this['addProxyObject'](_0x41f011);try{const _0x3fee5d=await a9_0x3eb976(_0x41f011);if(!_0x3fee5d){if('AsZDK'===_0xe238ca(0x242)){if(this[_0xe238ca(0x1b1)]==!![]){if('kIoAY'===_0xe238ca(0x2ba)){if(!_0x1caeb3[_0xe238ca(0x22d)]||!_0x2d616b['secret']||_0x2142e7[_0xe238ca(0x22d)]==''||_0x31e0f5[_0xe238ca(0x259)]=='')throw'authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret';this[_0xe238ca(0x27f)]=_0x2843b9[_0xe238ca(0x22d)],this[_0xe238ca(0x2a5)]=_0x362032['secret'],this['isMain']=_0x296006['subaccount']==_0x241514,this[_0xe238ca(0x20d)]=this['isMain']?'':_0x3beaa5[_0xe238ca(0x20d)],this['passphrase']=_0x43d01d[_0xe238ca(0x1e0)];}else doLog(_0xe238ca(0x230));}throw _0xe238ca(0x230);}else _0x3236a4[_0xe238ca(0x1d3)]=_0x379ba1+_0xe238ca(0x1ae)+_0x7ca76a+_0xe238ca(0x2a9)+_0x5b8f20+_0xe238ca(0x2b2)+_0x5db82b;}if(this['logGets']==!![]){if(_0xe238ca(0x227)!==_0xe238ca(0x29f))this[_0xe238ca(0x280)]({'send':_0x41f011,'level':_0xe238ca(0x25d),'receive':{'code':_0x3fee5d[_0xe238ca(0x22f)][_0xe238ca(0x272)],'data':JSON['stringify'](_0x3fee5d[_0xe238ca(0x22f)]['data']),'msg':_0x3fee5d[_0xe238ca(0x22f)][_0xe238ca(0x2b9)]}});else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}return{'code':_0x3fee5d[_0xe238ca(0x260)],'data':_0x3fee5d[_0xe238ca(0x22f)],'msg':_0x3fee5d['statusText']};}catch(_0x134c10){if(_0xe238ca(0x1bb)==='oyHQK'){let _0x39cf6e={'protocol':_0xe238ca(0x21d),'host':this[_0xe238ca(0x1a1)],'port':this[_0xe238ca(0x23e)]};this[_0xe238ca(0x293)]===!![]&&(_0x39cf6e[_0xe238ca(0x1b2)]={'username':this[_0xe238ca(0x257)],'password':this['proxyPass']}),_0x3747e4[_0xe238ca(0x1a1)]=_0x39cf6e;}else return _0x134c10;}}async[a9_0x2a5536(0x1ff)](_0x3c9aa3,_0x19918a,_0x51e45e,_0x2f7485){const _0x1caf5a=a9_0x2a5536;let _0x9bf27d=_0x19918a!=null?_0x51e45e[_0x1caf5a(0x1e7)](_0x295819=>!Object[_0x1caf5a(0x239)](_0x19918a)[_0x1caf5a(0x1eb)](_0x295819)):_0x51e45e;if(_0x9bf27d['length']==0x0){if(_0x1caf5a(0x1c9)!==_0x1caf5a(0x1c9))return this[_0x1caf5a(0x1df)](_0x11f829,[],_0x1caf5a(0x266));else{let _0x4deb45=await this[_0x1caf5a(0x2b8)]('',_0x19918a),_0x49cbd0=_0x2f7485+'?'+_0x4deb45[_0x1caf5a(0x1d3)],_0x3452da=await this[_0x1caf5a(0x292)](_0x3c9aa3,_0x49cbd0,this['spoturl']);return _0x3452da;}}else throw{'message':_0x1caf5a(0x236)+_0x9bf27d['join'](',')};}async[a9_0x2a5536(0x276)](_0x2c61aa,_0x41c861,_0xf7d0c4,_0x573680){const _0x183e76=a9_0x2a5536;let _0x5116d5=_0x41c861!=null?_0xf7d0c4[_0x183e76(0x1e7)](_0x5d339f=>!Object[_0x183e76(0x239)](_0x41c861)['includes'](_0x5d339f)):_0xf7d0c4;if(_0x5116d5[_0x183e76(0x2bc)]==0x0){let _0x289c76=await this[_0x183e76(0x1a9)]('',_0x41c861),_0xb00949=_0x573680+'?'+_0x289c76[_0x183e76(0x1d3)],_0x1d0972=await this['executeRequest'](_0x2c61aa,_0xb00949,this[_0x183e76(0x1cc)],_0x41c861);return _0x1d0972;}else throw{'message':'Missing\x20params:\x20'+_0x5116d5[_0x183e76(0x1b8)](',')};}async[a9_0x2a5536(0x1df)](_0x1b4bf3,_0x3cdcd9,_0x50b2cd){const _0xda9f72=a9_0x2a5536;let _0x1ee214=_0x1b4bf3!=null?_0x3cdcd9[_0xda9f72(0x1e7)](_0x13e361=>!Object['keys'](_0x1b4bf3)[_0xda9f72(0x1eb)](_0x13e361)):_0x3cdcd9;if(_0x1ee214['length']==0x0){if('KBFRH'!==_0xda9f72(0x263)){let _0xfa3ac7=await this['createUnsignedPayload']('',_0x1b4bf3),_0x2d453e=_0x50b2cd+'?'+_0xfa3ac7[_0xda9f72(0x1d3)],_0x482c27=await this[_0xda9f72(0x26c)](_0x2d453e,this[_0xda9f72(0x271)]);return _0x482c27;}else throw{'message':_0xda9f72(0x1ba)};}else throw{'message':_0xda9f72(0x236)+_0x1ee214[_0xda9f72(0x1b8)](',')};}async[a9_0x2a5536(0x287)](){const _0x57b6b6=a9_0x2a5536;let _0x44b36e=await this[_0x57b6b6(0x2b8)]('',''),_0x50e05c='/api/v3/capital/config/getall?'+_0x44b36e[_0x57b6b6(0x273)],_0xa5a80b=await this[_0x57b6b6(0x1ff)](_0x57b6b6(0x1b4),[],this[_0x57b6b6(0x271)]);return _0xa5a80b;}async[a9_0x2a5536(0x29d)](){const _0x4b3a2e=a9_0x2a5536;let _0x117398=_0x4b3a2e(0x21a),_0x46b963=await this[_0x4b3a2e(0x1ff)]('GET',[],[],_0x117398);return _0x46b963;}async[a9_0x2a5536(0x2a6)](){const _0x411978=a9_0x2a5536;let _0x55b26e=_0x411978(0x2c2),_0x32fbc8=await this[_0x411978(0x1ff)](_0x411978(0x1b4),[],[],_0x55b26e);return _0x32fbc8;}async[a9_0x2a5536(0x26b)](){const _0x175190=a9_0x2a5536;let _0x117f8e='/api/v3/defaultSymbols',_0x5d0bfe=await this[_0x175190(0x1ff)](_0x175190(0x1b4),[],[],_0x117f8e);return _0x5d0bfe;}async[a9_0x2a5536(0x2b3)](_0x4a4483){const _0x4d6144=a9_0x2a5536;return this['unvalidatedGetSpot'](_0x4a4483,[],_0x4d6144(0x266));}async['getOrderBookSpot'](_0x557e0e){return this['unvalidatedGetSpot'](_0x557e0e,['symbol'],'/api/v3/depth');}async['getRecentTradesListSpot'](_0xc0d2e5){const _0x4aaead=a9_0x2a5536;return this[_0x4aaead(0x1df)](_0xc0d2e5,['symbol'],_0x4aaead(0x238));}async[a9_0x2a5536(0x2c3)](_0x4ba6e4){const _0x44cf1b=a9_0x2a5536;return this[_0x44cf1b(0x1df)](_0x4ba6e4,[_0x44cf1b(0x28e)],_0x44cf1b(0x290));}async[a9_0x2a5536(0x206)](_0x46ccb2){const _0x43c198=a9_0x2a5536;return this['unvalidatedGetSpot'](_0x46ccb2,['symbol',_0x43c198(0x1fe)],_0x43c198(0x261));}async[a9_0x2a5536(0x235)](_0x367a06){const _0x1cfc91=a9_0x2a5536;return this[_0x1cfc91(0x1df)](_0x367a06,[_0x1cfc91(0x28e)],_0x1cfc91(0x1b9));}async[a9_0x2a5536(0x1e6)](_0x52ce0c){const _0x5e3b40=a9_0x2a5536;return this[_0x5e3b40(0x1df)](_0x52ce0c,[],_0x5e3b40(0x1ab));}async['getPriceTickerSpot'](_0x3488f6){const _0x34e38c=a9_0x2a5536;return this['unvalidatedGetSpot'](_0x3488f6,[],_0x34e38c(0x1c6));}async['getBookTickerSpot'](_0xe97f){const _0x2ec01a=a9_0x2a5536;return await this[_0x2ec01a(0x1df)](_0xe97f,[],'/api/v3/ticker/bookTicker');}async['createSubAccountSpot'](_0x1c0f76){const _0x4cd94e=a9_0x2a5536;return await this[_0x4cd94e(0x1ff)](_0x4cd94e(0x1c3),_0x1c0f76,['subAccount','note'],_0x4cd94e(0x225));}async[a9_0x2a5536(0x28d)](_0x1f4680){const _0x332a51=a9_0x2a5536;return await this[_0x332a51(0x1ff)](_0x332a51(0x1b4),_0x1f4680,[],_0x332a51(0x224));}async[a9_0x2a5536(0x277)](_0x4b7399){const _0xef0e2c=a9_0x2a5536;return await this[_0xef0e2c(0x1ff)]('POST',_0x4b7399,[_0xef0e2c(0x1e2),_0xef0e2c(0x2bd),_0xef0e2c(0x285)],'/api/v3/sub-account/apiKey');}async['getSubaccountApiKeySpot'](_0x29c1ff){const _0x3bd3eb=a9_0x2a5536;return await this[_0x3bd3eb(0x1ff)](_0x3bd3eb(0x1b4),_0x29c1ff,[_0x3bd3eb(0x1e2)],'/api/v3/sub-account/apiKey');}async[a9_0x2a5536(0x1a5)](_0x144fdc){const _0x416ff7=a9_0x2a5536;return await this['spotRequest'](_0x416ff7(0x213),_0x144fdc,[_0x416ff7(0x1e2),_0x416ff7(0x27f)],_0x416ff7(0x21c));}async[a9_0x2a5536(0x21e)](_0x28480c){const _0x4ba7d8=a9_0x2a5536;let _0x1d7a2d=Object[_0x4ba7d8(0x239)](_0x28480c);if(_0x1d7a2d[_0x4ba7d8(0x1eb)](_0x4ba7d8(0x1f3))||_0x1d7a2d[_0x4ba7d8(0x1eb)](_0x4ba7d8(0x2ae))){if(_0x4ba7d8(0x262)===_0x4ba7d8(0x262))return await this[_0x4ba7d8(0x1ff)](_0x4ba7d8(0x1c3),_0x28480c,[_0x4ba7d8(0x200),_0x4ba7d8(0x298),_0x4ba7d8(0x1a8),'asset'],'/api/v3/capital/sub-account/universalTransfer');else throw{'message':_0x4ba7d8(0x211)};}else{if('QXxvc'!=='QXxvc')throw{'message':_0x4ba7d8(0x236)+_0x59e010[_0x4ba7d8(0x1b8)](',')};else throw{'message':'toAccount\x20or\x20fromAccount\x20required\x20as\x20parameter'};}}async[a9_0x2a5536(0x1ca)](_0x385116){const _0x487849=a9_0x2a5536;let _0x100b8c=Object[_0x487849(0x239)](_0x385116);if(_0x100b8c[_0x487849(0x1eb)]('toAccount')||_0x100b8c[_0x487849(0x1eb)]('fromAccount'))return _0x487849(0x23a)!=='Ymntf'?_0x261989[_0x487849(0x228)]('sha256',_0x2e029f)[_0x487849(0x1d8)](_0x328fa0)[_0x487849(0x1d7)]('hex'):await this[_0x487849(0x1ff)](_0x487849(0x1b4),_0x385116,[_0x487849(0x200),_0x487849(0x298)],'/api/v3/capital/sub-account/universalTransfer');else throw{'message':_0x487849(0x1e4)};}async['getSelfSymbolsSpot'](_0x484372){const _0x2ffc98=a9_0x2a5536;return await this[_0x2ffc98(0x1ff)](_0x2ffc98(0x1b4),_0x484372,[],_0x2ffc98(0x256));}async[a9_0x2a5536(0x24c)](_0x38f0f1){const _0x593767=a9_0x2a5536;if(_0x38f0f1[_0x593767(0x28e)]&&_0x38f0f1['side']&&_0x38f0f1[_0x593767(0x1ee)]){if('Mnydo'!==_0x593767(0x2b7))throw{'message':_0x593767(0x236)+_0xaf9dd['join'](',')};else{if(_0x38f0f1[_0x593767(0x1ee)]==_0x593767(0x1f2)&&(!_0x38f0f1['price']||!_0x38f0f1['quantity']))throw{'message':_0x593767(0x1de)};else{if(_0x38f0f1[_0x593767(0x1ee)]=='MARKET'&&!_0x38f0f1[_0x593767(0x1c8)]&&!_0x38f0f1[_0x593767(0x1f7)])throw{'message':_0x593767(0x1ce)};}let _0x3709ce=await this[_0x593767(0x2b8)]('',_0x38f0f1),_0xcde9ed=_0x593767(0x1c1)+_0x3709ce[_0x593767(0x1d3)];return await this[_0x593767(0x292)](_0x593767(0x1c3),_0xcde9ed,this[_0x593767(0x271)]);}}else throw{'message':'symbol,\x20side,\x20and\x20type\x20are\x20required'};}async[a9_0x2a5536(0x297)](_0x5b0664){const _0x5ac5ea=a9_0x2a5536;if(_0x5b0664['symbol']&&_0x5b0664[_0x5ac5ea(0x1f6)]&&_0x5b0664['type']){if(_0x5b0664['type']==_0x5ac5ea(0x1f2)&&(!_0x5b0664['price']||!_0x5b0664[_0x5ac5ea(0x1c8)])){if(_0x5ac5ea(0x23d)!==_0x5ac5ea(0x23d)){this[_0x5ac5ea(0x1b1)]==!![]&&_0x53f459(_0x5ac5ea(0x230));throw _0x5ac5ea(0x230);}else throw{'message':_0x5ac5ea(0x1de)};}else{if(_0x5b0664[_0x5ac5ea(0x1ee)]==_0x5ac5ea(0x1c0)&&!_0x5b0664[_0x5ac5ea(0x1c8)]&&!_0x5b0664[_0x5ac5ea(0x1f7)]){if(_0x5ac5ea(0x1b6)===_0x5ac5ea(0x1b6))throw{'message':_0x5ac5ea(0x1ce)};else throw _0x5ac5ea(0x1f9);}}let _0xb7bf3e=await this[_0x5ac5ea(0x2b8)]('',_0x5b0664),_0x3f6e34='/api/v3/order?'+_0xb7bf3e[_0x5ac5ea(0x1d3)];return await this['executeRequest'](_0x5ac5ea(0x1c3),_0x3f6e34,this[_0x5ac5ea(0x271)]);}else throw{'message':'symbol,\x20side,\x20and\x20type\x20are\x20required'};}async['cancelOrderSpot'](_0x38dab2){const _0x5efe42=a9_0x2a5536;let _0x3838e9=Object[_0x5efe42(0x239)](_0x38dab2);if(_0x3838e9['includes'](_0x5efe42(0x27a))||_0x3838e9['includes'](_0x5efe42(0x2ab)))return _0x5efe42(0x26f)===_0x5efe42(0x275)?this[_0x5efe42(0x1df)](_0x593592,[_0x5efe42(0x28e)],'/api/v3/avgPrice'):await this['spotRequest']('DELETE',_0x38dab2,['symbol'],_0x5efe42(0x1fd));else{if(_0x5efe42(0x229)!==_0x5efe42(0x229))throw{'message':_0x5efe42(0x28b)};else throw{'message':_0x5efe42(0x211)};}}async[a9_0x2a5536(0x281)](_0x31eb86){const _0x32639c=a9_0x2a5536;return await this[_0x32639c(0x1ff)](_0x32639c(0x213),_0x31eb86,[_0x32639c(0x28e)],'/api/v3/openOrders');}async['getOrderSpot'](_0x184162){const _0x5808b8=a9_0x2a5536;let _0xf1c581=Object[_0x5808b8(0x239)](_0x184162);if(_0xf1c581[_0x5808b8(0x1eb)](_0x5808b8(0x27a))||_0xf1c581[_0x5808b8(0x1eb)](_0x5808b8(0x2ab))){if('GsgCs'===_0x5808b8(0x296))return await this[_0x5808b8(0x1ff)](_0x5808b8(0x1b4),_0x184162,[_0x5808b8(0x28e)],'/api/v3/order');else throw{'message':_0x5808b8(0x236)+_0x355f8b[_0x5808b8(0x1b8)](',')};}else throw{'message':_0x5808b8(0x211)};}async[a9_0x2a5536(0x2c0)](_0x4ef200){const _0x3028a8=a9_0x2a5536;return await this[_0x3028a8(0x1ff)](_0x3028a8(0x1b4),_0x4ef200,[_0x3028a8(0x28e)],_0x3028a8(0x258));}async['getAllOrdersSpot'](_0x3e915f){const _0x1dfeb1=a9_0x2a5536;return await this[_0x1dfeb1(0x1ff)](_0x1dfeb1(0x1b4),_0x3e915f,[_0x1dfeb1(0x28e)],'/api/v3/allOrders');}async['getSpotAccountInfo'](_0x8c327d){const _0x2e49a1=a9_0x2a5536;return await this[_0x2e49a1(0x1ff)](_0x2e49a1(0x1b4),_0x8c327d,[],_0x2e49a1(0x244));}async['getAccountTradeListSpot'](_0x28ef0a){const _0x26430b=a9_0x2a5536;return await this[_0x26430b(0x1ff)](_0x26430b(0x1b4),_0x28ef0a,[_0x26430b(0x28e)],_0x26430b(0x234));}async[a9_0x2a5536(0x1bd)](_0x344f20){const _0x330973=a9_0x2a5536;return await this[_0x330973(0x1ff)](_0x330973(0x1c3),_0x344f20,[_0x330973(0x21f)],_0x330973(0x220));}async[a9_0x2a5536(0x1b5)](_0x5b581a){const _0xf327f4=a9_0x2a5536;return await this[_0xf327f4(0x1ff)](_0xf327f4(0x1b4),_0x5b581a,[],'/api/v3/mxDeduct/enable');}async[a9_0x2a5536(0x26d)](_0x5518de){const _0x53251c=a9_0x2a5536;return await this['spotRequest'](_0x53251c(0x1b4),_0x5518de,[],_0x53251c(0x1cd));}async['withdrawSpot'](_0x191262){const _0x421d18=a9_0x2a5536;return await this[_0x421d18(0x1ff)](_0x421d18(0x1c3),_0x191262,['coin',_0x421d18(0x1af),_0x421d18(0x1a8)],'/api/v3/capital/withdraw/apply');}async['cancelWithdrawSpot'](_0x2dd8c5){const _0x375fa0=a9_0x2a5536;return await this['spotRequest'](_0x375fa0(0x213),_0x2dd8c5,['id'],_0x375fa0(0x1cf));}async[a9_0x2a5536(0x1e8)](_0x21ea14){const _0x141577=a9_0x2a5536;return await this['spotRequest'](_0x141577(0x1b4),_0x21ea14,[],_0x141577(0x2a4));}async['getWithdrawHistorySpot'](_0x2fee02){return await this['spotRequest']('GET',_0x2fee02,[],'/api/v3/capital/withdraw/history');}async[a9_0x2a5536(0x1a6)](_0x1c477c){const _0x1475da=a9_0x2a5536;return await this[_0x1475da(0x1ff)]('POST',_0x1c477c,[_0x1475da(0x1da),_0x1475da(0x250)],_0x1475da(0x215));}async[a9_0x2a5536(0x1ea)](_0x3ce403){const _0x72ddd2=a9_0x2a5536;return await this[_0x72ddd2(0x1ff)](_0x72ddd2(0x1b4),_0x3ce403,[_0x72ddd2(0x1da)],_0x72ddd2(0x215));}async[a9_0x2a5536(0x27e)](_0x51f313){const _0x2ae8d1=a9_0x2a5536;return await this[_0x2ae8d1(0x1ff)](_0x2ae8d1(0x1b4),_0x51f313,[],_0x2ae8d1(0x237));}async[a9_0x2a5536(0x25b)](_0x1729d4){const _0x2aa751=a9_0x2a5536;return await this[_0x2aa751(0x1ff)]('POST',_0x1729d4,[_0x2aa751(0x200),_0x2aa751(0x298),_0x2aa751(0x25a),_0x2aa751(0x1a8)],_0x2aa751(0x219));}async[a9_0x2a5536(0x1ca)](_0x458fab){const _0x2e7c8e=a9_0x2a5536;return await this[_0x2e7c8e(0x1ff)]('GET',_0x458fab,['fromAccountType',_0x2e7c8e(0x298)],_0x2e7c8e(0x219));}async['getUniversalTransferHistoryTranIdSpot'](_0x46aaac){const _0x424aaf=a9_0x2a5536;return await this[_0x424aaf(0x1ff)](_0x424aaf(0x1b4),_0x46aaac,[_0x424aaf(0x222)],_0x424aaf(0x2aa));}async[a9_0x2a5536(0x1a4)](_0x47b042){const _0x1875d3=a9_0x2a5536;return await this[_0x1875d3(0x1ff)](_0x1875d3(0x1b4),_0x47b042,[],_0x1875d3(0x245));}async[a9_0x2a5536(0x299)](_0x33474c){const _0x2d10e0=a9_0x2a5536;return await this[_0x2d10e0(0x1ff)](_0x2d10e0(0x1c3),_0x33474c,[_0x2d10e0(0x25a)],_0x2d10e0(0x205));}async[a9_0x2a5536(0x269)](_0x176866){const _0x41fb7c=a9_0x2a5536;return await this['spotRequest'](_0x41fb7c(0x1b4),_0x176866,[],_0x41fb7c(0x205));}async['getEtfInfo'](_0x4d4df0){const _0x202ef5=a9_0x2a5536;return await this['spotRequest'](_0x202ef5(0x1b4),_0x4d4df0,[],_0x202ef5(0x20b));}async[a9_0x2a5536(0x1d4)](_0x39e496){const _0x494572=a9_0x2a5536;return await this[_0x494572(0x1ff)]('GET',_0x39e496,[],_0x494572(0x252));}async[a9_0x2a5536(0x1a3)](_0x48b7d9){const _0x6c8739=a9_0x2a5536;return await this[_0x6c8739(0x1ff)](_0x6c8739(0x1b4),_0x48b7d9,[],'/api/v3/rebate/detail');}async['getSelfRebateRecordsDetail'](_0x492339){const _0x4f0623=a9_0x2a5536;return await this[_0x4f0623(0x1ff)]('GET',_0x492339,[],_0x4f0623(0x1f4));}async[a9_0x2a5536(0x1d5)](_0xd1bdda){const _0x3e6aa4=a9_0x2a5536;return await this['spotRequest'](_0x3e6aa4(0x1b4),_0xd1bdda,[],'/api/v3/rebate/referCode');}async[a9_0x2a5536(0x1f8)](_0x510deb,_0x89abb6){const _0x453d0c=a9_0x2a5536;let _0x35c18e=_0x453d0c(0x241),_0x131f2c='';if(_0x89abb6==_0x453d0c(0x1c3))_0x131f2c=JSON[_0x453d0c(0x208)](_0x510deb);else{if(_0x510deb!=null&&Object[_0x453d0c(0x239)](_0x510deb)[_0x453d0c(0x2bc)]>0x0){for(let _0x48c02c of Object[_0x453d0c(0x239)](_0x510deb)[_0x453d0c(0x1ef)]()){_0x131f2c=_0x131f2c+_0x48c02c+'='+_0x510deb[_0x48c02c]+'&';}_0x131f2c=_0x131f2c[_0x453d0c(0x283)](0x0,-0x1);}}console[_0x453d0c(0x217)](_0x131f2c);let _0x4974fd=Date[_0x453d0c(0x295)](),_0x3d93b1={'Content-Type':_0x35c18e,'Request-Time':_0x4974fd,'ApiKey':this[_0x453d0c(0x27f)],'Signature':await this[_0x453d0c(0x1c4)](this[_0x453d0c(0x2a5)],this[_0x453d0c(0x27f)]+_0x4974fd+_0x131f2c)};return _0x3d93b1;}async[a9_0x2a5536(0x216)](_0x3b73dd){const _0x519ad2=a9_0x2a5536;return await this[_0x519ad2(0x276)](_0x519ad2(0x1b4),_0x3b73dd,[],'/api/v1/contract/ping');}async['getContractDetailFutures'](_0x251341){const _0x2dbe49=a9_0x2a5536;return await this[_0x2dbe49(0x276)]('GET',_0x251341,[],_0x2dbe49(0x1ed));}async[a9_0x2a5536(0x1d2)](_0x18160c){const _0x504614=a9_0x2a5536;return await this[_0x504614(0x276)](_0x504614(0x1b4),_0x18160c,[],_0x504614(0x264));}async[a9_0x2a5536(0x247)](_0x2307e0){const _0x2d74d5=a9_0x2a5536;if(Object[_0x2d74d5(0x239)](_0x2307e0)[_0x2d74d5(0x1eb)](_0x2d74d5(0x28e)))return await this['futuresRequest']('GET',_0x2307e0,[],'/api/v1/contract/depth/'+_0x2307e0[_0x2d74d5(0x28e)]);else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}async[a9_0x2a5536(0x23b)](_0x1a2b7d){const _0xb3eba4=a9_0x2a5536;if(Object['keys'](_0x1a2b7d)[_0xb3eba4(0x1eb)](_0xb3eba4(0x28e))&&Object[_0xb3eba4(0x239)](_0x1a2b7d)[_0xb3eba4(0x1eb)]('limit')){if('DKYCw'!=='DKYCw')throw{'message':_0xb3eba4(0x1ce)};else return await this[_0xb3eba4(0x276)](_0xb3eba4(0x1b4),_0x1a2b7d,[],_0xb3eba4(0x2a3)+_0x1a2b7d[_0xb3eba4(0x28e)]+'/'+_0x1a2b7d[_0xb3eba4(0x26e)]);}else{if(_0xb3eba4(0x251)===_0xb3eba4(0x251))throw{'message':_0xb3eba4(0x28c)};else _0x220f3b[_0xb3eba4(0x273)]=_0x4d6367,_0x3b89b7[_0xb3eba4(0x1d3)]=_0x3b5a95+_0xb3eba4(0x1ae)+_0x23f5c6+_0xb3eba4(0x2a9)+_0x37c4f0+_0xb3eba4(0x2b2)+_0xe683ad;}}async['getContractIndexPriceFutures'](_0x390f7d){const _0x1f4a8c=a9_0x2a5536;if(Object[_0x1f4a8c(0x239)](_0x390f7d)[_0x1f4a8c(0x1eb)](_0x1f4a8c(0x28e)))return await this['futuresRequest'](_0x1f4a8c(0x1b4),_0x390f7d,[],_0x1f4a8c(0x1d6)+_0x390f7d[_0x1f4a8c(0x28e)]);else throw{'message':_0x1f4a8c(0x28b)};}async[a9_0x2a5536(0x254)](_0x65f93b){const _0x5716dc=a9_0x2a5536;if(Object[_0x5716dc(0x239)](_0x65f93b)[_0x5716dc(0x1eb)](_0x5716dc(0x28e)))return await this['futuresRequest']('GET',_0x65f93b,[],'/api/v1/contract/fair_price/'+_0x65f93b['symbol']);else throw{'message':_0x5716dc(0x28b)};}async[a9_0x2a5536(0x1dc)](_0x36ba6f){const _0x3f5aaf=a9_0x2a5536;if(Object[_0x3f5aaf(0x239)](_0x36ba6f)['includes'](_0x3f5aaf(0x28e)))return await this['futuresRequest'](_0x3f5aaf(0x1b4),_0x36ba6f,[],_0x3f5aaf(0x1d1)+_0x36ba6f[_0x3f5aaf(0x28e)]);else{if(_0x3f5aaf(0x29a)===_0x3f5aaf(0x29a))throw{'message':_0x3f5aaf(0x28b)};else _0x1ad987[_0x3f5aaf(0x2a1)](_0x4ef258+'='+_0x233fad[_0x3e53c8]);}}async[a9_0x2a5536(0x1b7)](_0x508ef0){const _0x408661=a9_0x2a5536;if(Object[_0x408661(0x239)](_0x508ef0)[_0x408661(0x1eb)]('symbol'))return await this[_0x408661(0x276)](_0x408661(0x1b4),_0x508ef0,[],_0x408661(0x1be)+_0x508ef0['symbol']);else throw{'message':_0x408661(0x28b)};}async[a9_0x2a5536(0x24b)](_0x1fe4e8){const _0x2bfc87=a9_0x2a5536;if(Object[_0x2bfc87(0x239)](_0x1fe4e8)[_0x2bfc87(0x1eb)]('symbol'))return'duwgW'==='zJeHn'?this[_0x2bfc87(0x1df)](_0x1fa0fe,[],_0x2bfc87(0x1ab)):await this['futuresRequest'](_0x2bfc87(0x1b4),_0x1fe4e8,[],_0x2bfc87(0x1d0)+_0x1fe4e8[_0x2bfc87(0x28e)]);else throw{'message':_0x2bfc87(0x28b)};}async[a9_0x2a5536(0x1c7)](_0x3d6b1e){const _0x2e5d3a=a9_0x2a5536;if(Object[_0x2e5d3a(0x239)](_0x3d6b1e)[_0x2e5d3a(0x1eb)]('symbol'))return await this['futuresRequest'](_0x2e5d3a(0x1b4),_0x3d6b1e,[],_0x2e5d3a(0x207)+_0x3d6b1e[_0x2e5d3a(0x28e)]);else{if(_0x2e5d3a(0x286)!==_0x2e5d3a(0x1fb))throw{'message':_0x2e5d3a(0x28b)};else this[_0x2e5d3a(0x293)]=![];}}async[a9_0x2a5536(0x233)](_0x28844c){const _0x1b7571=a9_0x2a5536;if(Object['keys'](_0x28844c)[_0x1b7571(0x1eb)](_0x1b7571(0x28e)))return await this['futuresRequest'](_0x1b7571(0x1b4),_0x28844c,[],_0x1b7571(0x1f0)+_0x28844c['symbol']);else{if(_0x1b7571(0x22e)!==_0x1b7571(0x22e))this[_0x1b7571(0x280)]({'send':_0x9979fc,'level':'default','receive':{'code':_0x596acf[_0x1b7571(0x22f)][_0x1b7571(0x272)],'data':_0x352db1[_0x1b7571(0x208)](_0x24d630[_0x1b7571(0x22f)][_0x1b7571(0x22f)]),'msg':_0xa2ea37['data']['msg']}});else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}}async[a9_0x2a5536(0x25e)](_0x422042){const _0x22ae14=a9_0x2a5536;return await this[_0x22ae14(0x276)](_0x22ae14(0x1b4),_0x422042,[],_0x22ae14(0x24d));}async[a9_0x2a5536(0x270)](_0x1afeef){const _0x5d2680=a9_0x2a5536;return await this[_0x5d2680(0x276)](_0x5d2680(0x1b4),_0x1afeef,[],_0x5d2680(0x203));}async[a9_0x2a5536(0x2a0)](_0x3b92d3){const _0x4df4c5=a9_0x2a5536;return await this['futuresRequest'](_0x4df4c5(0x1b4),_0x3b92d3,[_0x4df4c5(0x28e),_0x4df4c5(0x29e),_0x4df4c5(0x1e1)],_0x4df4c5(0x2a7));}async[a9_0x2a5536(0x23c)](_0x4b922e){const _0x235019=a9_0x2a5536;return await this[_0x235019(0x276)](_0x235019(0x1b4),_0x4b922e,['symbol',_0x235019(0x29e),_0x235019(0x1e1)],'/api/v1/contract/funding_rate/history');}async[a9_0x2a5536(0x1aa)](_0x5d145c){const _0x44f768=a9_0x2a5536;return await this[_0x44f768(0x276)](_0x44f768(0x1b4),_0x5d145c,[],'/api/v1/private/account/assets');}async['getUserAssetTransferRecordsFutures'](_0x470ffc){const _0x5330a0=a9_0x2a5536;return await this[_0x5330a0(0x276)](_0x5330a0(0x1b4),_0x470ffc,[],_0x5330a0(0x1b0));}async['getUserSingleCurrencyAssetInfoFutures'](_0x4fb97c){const _0xf514c5=a9_0x2a5536;if(Object['keys'](_0x4fb97c)['includes'](_0xf514c5(0x2af))){if(_0xf514c5(0x267)===_0xf514c5(0x2a8))_0x1f462b=_0x5a7fa6+_0x166d9d+'='+_0x582c1f[_0x5a3b53]+'&';else return await this[_0xf514c5(0x276)]('GET',_0x4fb97c,[],_0xf514c5(0x1d9)+_0x4fb97c[_0xf514c5(0x2af)]);}else throw{'message':'currency\x20is\x20a\x20required\x20parameter'};}async[a9_0x2a5536(0x24a)](_0x717f85){const _0x3b32d3=a9_0x2a5536;return await this[_0x3b32d3(0x276)](_0x3b32d3(0x1b4),_0x717f85,[],_0x3b32d3(0x255));}async[a9_0x2a5536(0x218)](_0x396dc2){const _0x26813d=a9_0x2a5536;return await this[_0x26813d(0x276)](_0x26813d(0x1b4),_0x396dc2,[],_0x26813d(0x1ac));}async[a9_0x2a5536(0x1a7)](_0x551fa9){const _0x13150b=a9_0x2a5536;return await this[_0x13150b(0x276)](_0x13150b(0x1b4),_0x551fa9,[],_0x13150b(0x1e5));}async['getUserCurrentPendingOrderFutures'](_0x325ed3){const _0x31fce3=a9_0x2a5536;if(Object[_0x31fce3(0x239)](_0x325ed3)['includes']('symbol'))return await this['futuresRequest']('GET',_0x325ed3,[],'/api/v1/private/order/list/open_orders/'+_0x325ed3[_0x31fce3(0x28e)]);else throw{'message':_0x31fce3(0x28b)};}async[a9_0x2a5536(0x1c2)](_0x257a85){const _0x23b2ac=a9_0x2a5536;return await this[_0x23b2ac(0x276)]('GET',_0x257a85,[],_0x23b2ac(0x274));}async[a9_0x2a5536(0x1bc)](_0x3dd236){const _0x2b5f1c=a9_0x2a5536;if(Object[_0x2b5f1c(0x239)](_0x3dd236)['includes'](_0x2b5f1c(0x28e))&&Object[_0x2b5f1c(0x239)](_0x3dd236)[_0x2b5f1c(0x1eb)](_0x2b5f1c(0x226)))return await this[_0x2b5f1c(0x276)](_0x2b5f1c(0x1b4),_0x3dd236,[],_0x2b5f1c(0x2c1)+_0x3dd236[_0x2b5f1c(0x28e)]+'/'+_0x3dd236[_0x2b5f1c(0x26e)]);else{if('MghDJ'!==_0x2b5f1c(0x201))return this[_0x2b5f1c(0x1df)](_0x113435,[_0x2b5f1c(0x28e)],_0x2b5f1c(0x238));else throw{'message':_0x2b5f1c(0x28c)};}}async[a9_0x2a5536(0x2bb)](_0x419e5a){const _0x44e59b=a9_0x2a5536;if(Object[_0x44e59b(0x239)](_0x419e5a)[_0x44e59b(0x1eb)](_0x44e59b(0x1cb))){if(_0x44e59b(0x202)===_0x44e59b(0x24e))throw{'message':'toAccount\x20or\x20fromAccount\x20required\x20as\x20parameter'};else return await this[_0x44e59b(0x276)](_0x44e59b(0x1b4),_0x419e5a,[],_0x44e59b(0x288)+_0x419e5a['order_id']);}else{if(_0x44e59b(0x2b4)===_0x44e59b(0x2b4))throw{'message':'order_id\x20is\x20a\x20required\x20parameter'};else throw{'message':_0x44e59b(0x1ce)};}}async['getOrderTransactionDetailsByOIDFutures'](_0x4e7cec){const _0x4e6ee5=a9_0x2a5536;if(Object[_0x4e6ee5(0x239)](_0x4e7cec)[_0x4e6ee5(0x1eb)]('order_id'))return _0x4e6ee5(0x28a)!==_0x4e6ee5(0x1db)?await this[_0x4e6ee5(0x276)]('GET',_0x4e7cec,[],_0x4e6ee5(0x278)+_0x4e7cec[_0x4e6ee5(0x1cb)]):_0x4a2c9a;else throw{'message':_0x4e6ee5(0x1ba)};}async[a9_0x2a5536(0x253)](_0x371afd){const _0x446be9=a9_0x2a5536;return await this[_0x446be9(0x276)](_0x446be9(0x1b4),_0x371afd,[],_0x446be9(0x289));}async['getTriggerOrderListFutures'](_0x5d9846){const _0x3d0137=a9_0x2a5536;return await this['futuresRequest'](_0x3d0137(0x1b4),_0x5d9846,[],_0x3d0137(0x291));}async[a9_0x2a5536(0x29b)](_0x1aa701){const _0x425631=a9_0x2a5536;return await this[_0x425631(0x276)](_0x425631(0x1b4),_0x1aa701,[],_0x425631(0x231));}async[a9_0x2a5536(0x2b5)](_0x398eb9){const _0x516c3e=a9_0x2a5536;return await this['futuresRequest']('GET',_0x398eb9,[],_0x516c3e(0x22c));}async['getUserCurrentTradingFeeRateFutures'](_0x400387){const _0x42518e=a9_0x2a5536;return await this[_0x42518e(0x276)](_0x42518e(0x1b4),_0x400387,[],_0x42518e(0x1a2));}async[a9_0x2a5536(0x204)](_0x1542d8){const _0x13a2f9=a9_0x2a5536;return await this[_0x13a2f9(0x276)](_0x13a2f9(0x1c3),_0x1542d8,['positionId',_0x13a2f9(0x1a8),_0x13a2f9(0x1ee)],_0x13a2f9(0x249));}async[a9_0x2a5536(0x221)](_0x2fa55c){const _0x44aa36=a9_0x2a5536;return await this['futuresRequest'](_0x44aa36(0x1b4),_0x2fa55c,[],_0x44aa36(0x246));}async[a9_0x2a5536(0x248)](_0x4b2abe){const _0x49a2f0=a9_0x2a5536;return await this[_0x49a2f0(0x276)](_0x49a2f0(0x1b4),_0x4b2abe,['symbol'],_0x49a2f0(0x1c5));}}