New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@compendiumfi/pendax

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compendiumfi/pendax - npm Package Compare versions

Comparing version 1.1.19 to 1.1.20

2

common/pendaxsocket.js

@@ -1,1 +0,1 @@

const a0_0x4ce242=a0_0x34fe;(function(_0x278588,_0x588f66){const _0x3ca96a=a0_0x34fe,_0x15f144=_0x278588();while(!![]){try{const _0x493c8a=-parseInt(_0x3ca96a(0x20f))/0x1*(parseInt(_0x3ca96a(0x203))/0x2)+parseInt(_0x3ca96a(0x21e))/0x3+-parseInt(_0x3ca96a(0x229))/0x4*(-parseInt(_0x3ca96a(0x235))/0x5)+-parseInt(_0x3ca96a(0x230))/0x6+parseInt(_0x3ca96a(0x1fe))/0x7*(-parseInt(_0x3ca96a(0x1d8))/0x8)+-parseInt(_0x3ca96a(0x1d6))/0x9*(-parseInt(_0x3ca96a(0x220))/0xa)+parseInt(_0x3ca96a(0x1e6))/0xb;if(_0x493c8a===_0x588f66)break;else _0x15f144['push'](_0x15f144['shift']());}catch(_0x2d63c8){_0x15f144['push'](_0x15f144['shift']());}}}(a0_0x38b5,0x6aabe));import a0_0x326bcc from'ws';import*as a0_0x1b2197 from'crypto';import{v4}from'uuid';function a0_0x38b5(){const _0x57367d=['GiiOU','getConnectionUrl','kAKqK','AWfGT','5EMCiUy','rtIPf','error','subscriptions','BvoTi','toUTCString','socket','loggedOut','rFuWR','9RweecV','closed\x20from\x20client','4441672PypNud','hex','length','clientReconnect','onOpen','FXRPF','readyState','getRetryNumber','iSwgg','customPing','getSocketState','gvOzL','pong:\x20','bumpRetries','11015620LljqYh','subclassOnError','removeSubscriptionHavingArgs','sJTIM','maxRetries','close','bgTJY','subclassOnPong','none','Hmac','KlfnT','onMessage','subclassOnOpen','isPublic','ysfPJ','subclassOnClose','kill','connect','stringify','subclassOnMessage','autoReconnectOnError','log','pingInterval','pong','7BSYWkN','closed\x20from\x20ping()','ping\x20','PSTuj','publicChannels','2206UXhwHt','isLoggedIn','getClosedReason','autoReconnectOnClose','loggedIn','yjFoU','getAutoReconnect','message','_timerArgs','update','OPEN','digest','24UiHgQh','clientOnOpen','connected','timestampPings','includes','onClose','getPingInterval','privateChannels','reconnectWaitTime','clientOnClose','getOptions','retryNumber',',\x20msg\x20=\x20','yyQED','code','274866lPONSn','KLIhg','3044390kVNfBe','clientOnMessage','url','getPublicChannels','terminate','wbQgC','name','onError','msg','370324gVGaGq','getPrivateChannels','kill()\x20called\x20with\x20no\x20source','getSubscriptionArgsHash','YeTwM','clientOnError','open','2828730ntmbDt'];a0_0x38b5=function(){return _0x57367d;};return a0_0x38b5();}function a0_0x34fe(_0x6a8fdb,_0x346621){const _0x38b521=a0_0x38b5();return a0_0x34fe=function(_0x34fe9b,_0x3e640d){_0x34fe9b=_0x34fe9b-0x1ce;let _0x52101b=_0x38b521[_0x34fe9b];return _0x52101b;},a0_0x34fe(_0x6a8fdb,_0x346621);}export class PendaxSocket extends a0_0x326bcc{#pings=0x0;#pongs=0x0;#pingIntervalTimer;#defaultPingInterval=0x3a98;#defaultReconnectWaitTime=0x1f4;#reconnectTries=0x0;#defaultMaxReconnectTries=-0x1;#options={};#url='';[a0_0x4ce242(0x207)]=![];[a0_0x4ce242(0x211)]=![];#closeCode_NORMAL=0xfa0;#closeCode_NOPONG=0xfa1;#closeCode_CLIENTKILL=0xfa2;#closeCode_UNHANDLEDERROR=0xfa3;#closedReason='';#defaultOptions={'name':v4(),'key':a0_0x4ce242(0x1ee),'secret':a0_0x4ce242(0x1ee),'pingInterval':0x3a98,'autoReconnectOnError':![],'autoReconnectOnClose':![],'retryNumber':0x0,'maxRetries':this.#defaultMaxReconnectTries,'timestampPings':![]};['subscriptions']={};constructor(_0xca9a06){const _0x431915=a0_0x4ce242;let _0x219b2b=_0xca9a06?_0xca9a06[_0x431915(0x222)]||'':'';super(_0x219b2b),this[_0x431915(0x1f7)](),this.#url=_0x219b2b,this.#options={...this.#defaultOptions,..._0xca9a06},this.#options[_0x431915(0x1e8)]=this[_0x431915(0x1e8)],!this.#options['maxRetries']&&(this.#options[_0x431915(0x1ea)]=this.#defaultMaxReconnectTries);}['getConnectionName'](){const _0x31b83e=a0_0x4ce242;return this.#options[_0x31b83e(0x226)];}[a0_0x4ce242(0x232)](){return this.#url;}[a0_0x4ce242(0x215)](){const _0x3472a=a0_0x4ce242;return this.#options[_0x3472a(0x1fc)]||this.#defaultPingInterval;}[a0_0x4ce242(0x209)](){return this.#options['autoReconnect']||!![];}[a0_0x4ce242(0x1e2)](){const _0x2d7428=a0_0x4ce242;return this[_0x2d7428(0x1de)];}[a0_0x4ce242(0x219)](){return this.#options;}[a0_0x4ce242(0x1df)](){const _0x1e6d15=a0_0x4ce242;return this.#options[_0x1e6d15(0x21a)];}[a0_0x4ce242(0x205)](){return this.#closedReason;}['getSubscriptions'](){const _0x33a1c4=a0_0x4ce242;return this[_0x33a1c4(0x1d0)];}[a0_0x4ce242(0x204)](){const _0x74d53c=a0_0x4ce242;return this[_0x74d53c(0x207)]==!![];}[a0_0x4ce242(0x1d4)](){const _0x32db2e=a0_0x4ce242;this[_0x32db2e(0x207)]=![];}[a0_0x4ce242(0x223)](){const _0x184a58=a0_0x4ce242;return this[_0x184a58(0x202)];}[a0_0x4ce242(0x22a)](){const _0x5d0096=a0_0x4ce242;return this[_0x5d0096(0x216)];}[a0_0x4ce242(0x1f3)](_0x46a41f){const _0x2ff96c=a0_0x4ce242;return this[_0x2ff96c(0x202)][_0x2ff96c(0x213)](_0x46a41f);}[a0_0x4ce242(0x22c)](_0x48c611){const _0x2e8c70=a0_0x4ce242,_0x344088=JSON[_0x2e8c70(0x1f8)](_0x48c611),_0x1aab58=a0_0x1b2197[_0x2e8c70(0x1ef)]('sha256',this.#options['secret'])[_0x2e8c70(0x20c)](_0x344088)[_0x2e8c70(0x20e)](_0x2e8c70(0x1d9));return _0x1aab58;}#heartbeat(){const _0x3e2f34=a0_0x4ce242;let _0x31c1ac=this['_timerArgs'][0x0];if(_0x31c1ac[_0x3e2f34(0x1de)]==_0x31c1ac[_0x3e2f34(0x20d)]){if(_0x31c1ac.#pongs<_0x31c1ac.#pings)_0x31c1ac.#disconnect({'code':_0x31c1ac.#closeCode_NOPONG,'msg':_0x3e2f34(0x1ff),'socketObject':_0x31c1ac},!![]);else{_0x31c1ac.#pings=_0x31c1ac.#pings+0x1;if(_0x31c1ac.#options[_0x3e2f34(0x212)]===!![]){if(_0x3e2f34(0x1f4)===_0x3e2f34(0x1d1))return this[_0x3e2f34(0x202)][_0x3e2f34(0x213)](_0x1ea3ea);else console['log'](_0x3e2f34(0x200)+_0x31c1ac.#pings+':\x20'+new Date()[_0x3e2f34(0x1d2)]());}else{if(_0x3e2f34(0x201)===_0x3e2f34(0x201))console[_0x3e2f34(0x1fb)]('ping\x20'+_0x31c1ac.#pings);else return this[_0x3e2f34(0x202)];}_0x31c1ac['ping'](),_0x31c1ac.#options['customPing']&&(_0x3e2f34(0x1ce)!==_0x3e2f34(0x208)?_0x31c1ac.#options[_0x3e2f34(0x1e1)]():this['close'](_0x23fde0,_0x95ff6c));}}}['connect'](){const _0x297bf9=a0_0x4ce242;this['on'](_0x297bf9(0x22f),this[_0x297bf9(0x1dc)]),this['on'](_0x297bf9(0x1eb),this[_0x297bf9(0x214)]),this['on'](_0x297bf9(0x1cf),this[_0x297bf9(0x227)]),this['on'](_0x297bf9(0x20a),this[_0x297bf9(0x1f1)]),this['on'](_0x297bf9(0x1fd),this.#onPong);}[a0_0x4ce242(0x1f6)](_0x2b1d6f,_0x4b340d){const _0x70a080=a0_0x4ce242;let _0x426920,_0x23d1a9;if(_0x2b1d6f)_0x70a080(0x1e0)!==_0x70a080(0x234)?(_0x426920=_0x2b1d6f,_0x23d1a9=_0x4b340d||![]):this[_0x70a080(0x224)]();else{if(this[_0x70a080(0x20b)]&&this['_timerArgs'][_0x70a080(0x1da)]>0x0)_0x426920=this[_0x70a080(0x20b)][0x0],_0x23d1a9=this[_0x70a080(0x20b)][0x1]||![];else throw _0x70a080(0x22b);}_0x426920.#disconnect({'code':_0x426920.#closeCode_CLIENTKILL,'msg':_0x70a080(0x1d7),'socketObject':_0x426920},_0x23d1a9);}[a0_0x4ce242(0x1dc)](){const _0x49ef00=a0_0x4ce242;this.#options[_0x49ef00(0x1d3)]=this,console[_0x49ef00(0x1fb)]('opened'),this.#startPingTimer(),this[_0x49ef00(0x211)]=!![];if(this.#options[_0x49ef00(0x1f2)])_0x49ef00(0x231)!==_0x49ef00(0x1e9)?this.#options[_0x49ef00(0x1f2)](this.#options):_0x2bccac['log'](_0x1b6f77);else this.#options[_0x49ef00(0x210)]&&this.#options[_0x49ef00(0x210)](this.#options);}[a0_0x4ce242(0x214)](_0x44753b,_0x3350fe){const _0x3d1b2e=a0_0x4ce242;if(this.#pingIntervalTimer){if(_0x3d1b2e(0x225)===_0x3d1b2e(0x21f))return this['subscriptions'];else clearInterval(this.#pingIntervalTimer),this.#pingIntervalTimer=undefined;}this.#options[_0x3d1b2e(0x206)]&&_0x44753b!==this.#closeCode_NORMAL&&this.#options[_0x3d1b2e(0x1db)]&&(this[_0x3d1b2e(0x1e5)](),this.#startReconnectTimer(_0x44753b));if(this.#options[_0x3d1b2e(0x1f5)])_0x3d1b2e(0x1f0)===_0x3d1b2e(0x1f0)?this.#options[_0x3d1b2e(0x1f5)](_0x44753b,_0x3350fe,this.#options):(_0x391b90=_0x1ba821,_0x5c25f6=_0x30450d||![]);else this.#options[_0x3d1b2e(0x218)]?this.#options[_0x3d1b2e(0x218)](_0x44753b,_0x3350fe,this.#options):console['log']('closed:\x20code\x20=\x20'+_0x44753b+',\x20msg\x20=\x20'+_0x3350fe);this[_0x3d1b2e(0x211)]=![],this[_0x3d1b2e(0x207)]=![];}['onError'](_0x3cd3c2){const _0x1291d3=a0_0x4ce242;this.#pingIntervalTimer&&(clearInterval(this.#pingIntervalTimer),this.#pingIntervalTimer=undefined);this.#options[_0x1291d3(0x1fa)]===!![]&&this.#options[_0x1291d3(0x1db)]&&(this[_0x1291d3(0x1e5)](),this.#startReconnectTimer());if(this.#options[_0x1291d3(0x1e7)])_0x1291d3(0x1d5)===_0x1291d3(0x1e3)?_0x288519[_0x1291d3(0x1fb)]('closed:\x20code\x20=\x20'+_0x40c12d+_0x1291d3(0x21b)+_0x448e78):this.#options['subclassOnError'](_0x3cd3c2,this.#options);else{if(this.#options[_0x1291d3(0x22e)]){if('RDIav'!=='TrUBy')this.#options[_0x1291d3(0x22e)](_0x3cd3c2,this.#options);else throw'kill()\x20called\x20with\x20no\x20source';}else console['log'](_0x3cd3c2);}this[_0x1291d3(0x211)]=![],this[_0x1291d3(0x207)]=![];}['onMessage'](_0x288d0e){const _0x3a3b64=a0_0x4ce242;if(this.#options[_0x3a3b64(0x1f9)])this.#options[_0x3a3b64(0x1f9)](this,_0x288d0e,this.#options);else{if(this.#options[_0x3a3b64(0x221)]){if('RoAsD'!==_0x3a3b64(0x1ec))this.#options[_0x3a3b64(0x22e)](_0x288d0e,this.#options);else return this[_0x3a3b64(0x216)];}}}#onPong(_0x474aca){const _0x385e29=a0_0x4ce242;if(this.#options[_0x385e29(0x1ed)]){if(_0x385e29(0x21c)===_0x385e29(0x22d))return this[_0x385e29(0x1de)];else this.#options['subclassOnPong'](this,_0x474aca,this.#options);}else this.#pongs=this.#pongs+0x1,console['log'](_0x385e29(0x1e4)+this.#pongs);}#disconnect(_0x23bcec,_0x2c6761){const _0x133bce=a0_0x4ce242;let _0x170289=parseInt(_0x23bcec[_0x133bce(0x21d)])||0x0,_0x345fc1=_0x23bcec[_0x133bce(0x228)]||'';this.#closedReason=_0x345fc1,_0x2c6761?_0x133bce(0x1dd)!=='zPsBD'?this[_0x133bce(0x224)]():(_0x573fec=this['_timerArgs'][0x0],_0x36d1d7=this['_timerArgs'][0x1]||![]):this[_0x133bce(0x1eb)](_0x170289,_0x345fc1);}[a0_0x4ce242(0x1e5)](){const _0x197b20=a0_0x4ce242;this.#options[_0x197b20(0x21a)]=this.#options['retryNumber']+0x1;}['resetRetries'](){const _0x121c9e=a0_0x4ce242;this.#options[_0x121c9e(0x21a)]=0x0;}#startPingTimer(){this.#pingIntervalTimer=setInterval(this.#heartbeat,this.#options['pingInterval']||this.#defaultPingInterval,this);}#startReconnectTimer(_0xa47396){const _0x1fcff0=a0_0x4ce242;if(this.#options[_0x1fcff0(0x1db)]){if('FmvkB'!==_0x1fcff0(0x233))setTimeout(this.#options[_0x1fcff0(0x1db)],this.#options[_0x1fcff0(0x217)]||this.#defaultReconnectWaitTime,this,_0xa47396);else return this['loggedIn']==!![];}}}
const a0_0x414ec6=a0_0x14f2;(function(_0x30a9d0,_0x217842){const _0xef77d7=a0_0x14f2,_0x431615=_0x30a9d0();while(!![]){try{const _0x16b105=parseInt(_0xef77d7(0x17c))/0x1*(parseInt(_0xef77d7(0x1b4))/0x2)+parseInt(_0xef77d7(0x167))/0x3+parseInt(_0xef77d7(0x1b1))/0x4*(parseInt(_0xef77d7(0x1ac))/0x5)+parseInt(_0xef77d7(0x1b0))/0x6+-parseInt(_0xef77d7(0x19e))/0x7*(-parseInt(_0xef77d7(0x17e))/0x8)+-parseInt(_0xef77d7(0x194))/0x9+parseInt(_0xef77d7(0x172))/0xa*(-parseInt(_0xef77d7(0x174))/0xb);if(_0x16b105===_0x217842)break;else _0x431615['push'](_0x431615['shift']());}catch(_0x41b0d9){_0x431615['push'](_0x431615['shift']());}}}(a0_0xdedd,0x471b8));import a0_0x4537ea from'ws';import*as a0_0x57ea1c from'crypto';import{v4}from'uuid';function a0_0x14f2(_0x3624ef,_0x514996){const _0xdedd72=a0_0xdedd();return a0_0x14f2=function(_0x14f29a,_0x153abe){_0x14f29a=_0x14f29a-0x153;let _0x3aaa06=_0xdedd72[_0x14f29a];return _0x3aaa06;},a0_0x14f2(_0x3624ef,_0x514996);}function a0_0xdedd(){const _0x78998c=['sha256','log','error','getRetryNumber','ycNMz','3970989vLTRKJ','kill','subclassOnMessage','msg','vJpKl','subclassOnError','close','getSubscriptionArgsHash','clientReconnect','Vrkog','182LJeIBB','pingInterval','MSMaJ','clientOnMessage','clientOnOpen','digest','bumpRetries','timestampPings','connect','retryNumber','customPing','getConnectionUrl','readyState','cEvMT','3785smlIvP','JTkSw','isLoggedIn','isPublic','83658oeXhIc','2728XVlEce','getPublicChannels','includes','937714vBBijl','getClosedReason','onError','update','subscriptions','loggedOut','rybCR','gjGbq','getOptions','onClose','socket','connected','autoReconnectOnError','getSubscriptions','EIhpR','pong','closed:\x20code\x20=\x20',',\x20msg\x20=\x20','subclassOnClose','AxunT','FtILj','1331193RNoRvc','getSocketState','opened','terminate','closed\x20from\x20client','onOpen','publicChannels','ping\x20','_timerArgs','getConnectionName','Hmac','4918070DNJoXP','secret','22rZynTB','LZCCG','closed\x20from\x20ping()','length','autoReconnectOnClose','code','loggedIn','clientOnError','1Ecjgov','none','84088YZFbMQ','clientOnClose','fqLSk','lrYvt','getAutoReconnect','pong:\x20','name','privateChannels','HwfaH','subclassOnPong','PpIUc','message','resetRetries','stringify','subclassOnOpen','pXDto','removeSubscriptionHavingArgs'];a0_0xdedd=function(){return _0x78998c;};return a0_0xdedd();}export class PendaxSocket extends a0_0x4537ea{#pings=0x0;#pongs=0x0;#pingIntervalTimer;#defaultPingInterval=0x3a98;#defaultReconnectWaitTime=0x1f4;#reconnectTries=0x0;#defaultMaxReconnectTries=-0x1;#options={};#url='';[a0_0x414ec6(0x17a)]=![];[a0_0x414ec6(0x15d)]=![];#closeCode_NORMAL=0xfa0;#closeCode_NOPONG=0xfa1;#closeCode_CLIENTKILL=0xfa2;#closeCode_UNHANDLEDERROR=0xfa3;#closedReason='';#defaultOptions={'name':v4(),'key':a0_0x414ec6(0x17d),'secret':'none','pingInterval':0x3a98,'autoReconnectOnError':![],'autoReconnectOnClose':![],'retryNumber':0x0,'maxRetries':this.#defaultMaxReconnectTries,'timestampPings':![]};[a0_0x414ec6(0x156)]={};constructor(_0x2960c5){const _0xd6ad=a0_0x414ec6;let _0x5463d0=_0x2960c5?_0x2960c5['url']||'':'';super(_0x5463d0),this[_0xd6ad(0x1a6)](),this.#url=_0x5463d0,this.#options={...this.#defaultOptions,..._0x2960c5},this.#options[_0xd6ad(0x18e)]=this[_0xd6ad(0x18e)],!this.#options['maxRetries']&&(this.#options['maxRetries']=this.#defaultMaxReconnectTries);}[a0_0x414ec6(0x170)](){const _0x4550b4=a0_0x414ec6;return this.#options[_0x4550b4(0x184)];}[a0_0x414ec6(0x1a9)](){return this.#url;}['getPingInterval'](){return this.#options['pingInterval']||this.#defaultPingInterval;}[a0_0x414ec6(0x182)](){return this.#options['autoReconnect']||!![];}[a0_0x414ec6(0x168)](){return this['readyState'];}[a0_0x414ec6(0x15a)](){return this.#options;}[a0_0x414ec6(0x192)](){const _0x4a4e73=a0_0x414ec6;return this.#options[_0x4a4e73(0x1a7)];}[a0_0x414ec6(0x153)](){return this.#closedReason;}[a0_0x414ec6(0x15f)](){return this['subscriptions'];}[a0_0x414ec6(0x1ae)](){const _0x4ce056=a0_0x414ec6;return this[_0x4ce056(0x17a)]==!![];}[a0_0x414ec6(0x157)](){const _0x55707c=a0_0x414ec6;this[_0x55707c(0x17a)]=![];}[a0_0x414ec6(0x1b2)](){const _0x3d05c1=a0_0x414ec6;return this[_0x3d05c1(0x16d)];}['getPrivateChannels'](){const _0xfd655=a0_0x414ec6;return this[_0xfd655(0x185)];}[a0_0x414ec6(0x1af)](_0x2375fc){const _0x49d7d3=a0_0x414ec6;return this[_0x49d7d3(0x16d)][_0x49d7d3(0x1b3)](_0x2375fc);}[a0_0x414ec6(0x19b)](_0x4e458e){const _0x5a605c=a0_0x414ec6,_0x4a56ba=JSON[_0x5a605c(0x18b)](_0x4e458e),_0x1f6322=a0_0x57ea1c[_0x5a605c(0x171)](_0x5a605c(0x18f),this.#options[_0x5a605c(0x173)])[_0x5a605c(0x155)](_0x4a56ba)[_0x5a605c(0x1a3)]('hex');return _0x1f6322;}#heartbeat(){const _0x1a6748=a0_0x414ec6;let _0x173ca8=this[_0x1a6748(0x16f)][0x0];if(_0x173ca8['readyState']==_0x173ca8['OPEN']){if(_0x173ca8.#pongs<_0x173ca8.#pings){if(_0x1a6748(0x188)!==_0x1a6748(0x188))return this[_0x1a6748(0x16d)];else _0x173ca8.#disconnect({'code':_0x173ca8.#closeCode_NOPONG,'msg':_0x1a6748(0x176),'socketObject':_0x173ca8},!![]);}else _0x173ca8.#pings=_0x173ca8.#pings+0x1,_0x173ca8.#options[_0x1a6748(0x1a5)]===!![]?_0x1a6748(0x1ad)!==_0x1a6748(0x159)?console[_0x1a6748(0x190)](_0x1a6748(0x16e)+_0x173ca8.#pings+':\x20'+new Date()['toUTCString']()):this[_0x1a6748(0x19a)](_0x348431,_0x4b6754):console['log'](_0x1a6748(0x16e)+_0x173ca8.#pings),_0x173ca8['ping'](),_0x173ca8.#options[_0x1a6748(0x1a8)]&&_0x173ca8.#options['customPing']();}}['connect'](){const _0x5883b5=a0_0x414ec6;this['on']('open',this[_0x5883b5(0x16c)]),this['on'](_0x5883b5(0x19a),this[_0x5883b5(0x15b)]),this['on'](_0x5883b5(0x191),this['onError']),this['on'](_0x5883b5(0x189),this['onMessage']),this['on'](_0x5883b5(0x161),this.#onPong);}[a0_0x414ec6(0x195)](_0x3a17c4,_0x3279c8){const _0x1dc90d=a0_0x414ec6;let _0x1698d6,_0x2011ef;if(_0x3a17c4){if(_0x1dc90d(0x180)!==_0x1dc90d(0x193))_0x1698d6=_0x3a17c4,_0x2011ef=_0x3279c8||![];else return this[_0x1dc90d(0x1aa)];}else{if(this['_timerArgs']&&this['_timerArgs'][_0x1dc90d(0x177)]>0x0)_0x1dc90d(0x181)==='lrYvt'?(_0x1698d6=this['_timerArgs'][0x0],_0x2011ef=this['_timerArgs'][0x1]||![]):_0x3a9edb[_0x1dc90d(0x190)](_0x391e7f);else{if(_0x1dc90d(0x198)!==_0x1dc90d(0x19d))throw'kill()\x20called\x20with\x20no\x20source';else _0x466b9d=_0x471815,_0x1409ec=_0x2340e8||![];}}_0x1698d6.#disconnect({'code':_0x1698d6.#closeCode_CLIENTKILL,'msg':_0x1dc90d(0x16b),'socketObject':_0x1698d6},_0x2011ef);}['onOpen'](){const _0x480950=a0_0x414ec6;this.#options[_0x480950(0x15c)]=this,console[_0x480950(0x190)](_0x480950(0x169)),this.#startPingTimer(),this[_0x480950(0x15d)]=!![];if(this.#options[_0x480950(0x18c)])this.#options['subclassOnOpen'](this.#options);else this.#options[_0x480950(0x1a2)]&&this.#options['clientOnOpen'](this.#options);}[a0_0x414ec6(0x15b)](_0x4ee3be,_0x419ae5){const _0x417e63=a0_0x414ec6;this.#pingIntervalTimer&&(clearInterval(this.#pingIntervalTimer),this.#pingIntervalTimer=undefined);this.#options[_0x417e63(0x178)]&&_0x4ee3be!==this.#closeCode_NORMAL&&this.#options['clientReconnect']&&(this['bumpRetries'](),this.#startReconnectTimer(_0x4ee3be));if(this.#options['subclassOnClose'])this.#options[_0x417e63(0x164)](_0x4ee3be,_0x419ae5,this.#options);else this.#options[_0x417e63(0x17f)]?_0x417e63(0x158)===_0x417e63(0x165)?_0x5ecfbc[_0x417e63(0x190)](_0x417e63(0x162)+_0x54aa94+_0x417e63(0x163)+_0x44b0b4):this.#options[_0x417e63(0x17f)](_0x4ee3be,_0x419ae5,this.#options):console[_0x417e63(0x190)](_0x417e63(0x162)+_0x4ee3be+_0x417e63(0x163)+_0x419ae5);this[_0x417e63(0x15d)]=![],this[_0x417e63(0x17a)]=![];}[a0_0x414ec6(0x154)](_0x382e38){const _0x3d95ec=a0_0x414ec6;this.#pingIntervalTimer&&(clearInterval(this.#pingIntervalTimer),this.#pingIntervalTimer=undefined);if(this.#options[_0x3d95ec(0x15e)]===!![]&&this.#options[_0x3d95ec(0x19c)]){if(_0x3d95ec(0x186)==='LTJVY')return this[_0x3d95ec(0x17a)]==!![];else this[_0x3d95ec(0x1a4)](),this.#startReconnectTimer();}if(this.#options[_0x3d95ec(0x199)])this.#options[_0x3d95ec(0x199)](_0x382e38,this.#options);else this.#options['clientOnError']?this.#options[_0x3d95ec(0x17b)](_0x382e38,this.#options):console[_0x3d95ec(0x190)](_0x382e38);this[_0x3d95ec(0x15d)]=![],this[_0x3d95ec(0x17a)]=![];}['onMessage'](_0x434042){const _0xcf6bb1=a0_0x414ec6;if(this.#options[_0xcf6bb1(0x196)])this.#options['subclassOnMessage'](this,_0x434042,this.#options);else{if(this.#options[_0xcf6bb1(0x1a1)]){if(_0xcf6bb1(0x166)!==_0xcf6bb1(0x175))this.#options[_0xcf6bb1(0x17b)](_0x434042,this.#options);else return this[_0xcf6bb1(0x185)];}}}#onPong(_0x449a89){const _0x302ce6=a0_0x414ec6;this.#options[_0x302ce6(0x187)]?'MSMaJ'===_0x302ce6(0x1a0)?this.#options[_0x302ce6(0x187)](this,_0x449a89,this.#options):this[_0x302ce6(0x17a)]=![]:(this.#pongs=this.#pongs+0x1,console[_0x302ce6(0x190)](_0x302ce6(0x183)+this.#pongs));}#disconnect(_0x35d54b,_0x33c12f){const _0xcfd7c7=a0_0x414ec6;let _0x4c6fa4=parseInt(_0x35d54b[_0xcfd7c7(0x179)])||0x0,_0x41173c=_0x35d54b[_0xcfd7c7(0x197)]||'';this.#closedReason=_0x41173c,_0x33c12f?_0xcfd7c7(0x1ab)!==_0xcfd7c7(0x160)?this[_0xcfd7c7(0x16a)]():(_0x538ba2=this[_0xcfd7c7(0x16f)][0x0],_0x1cc16b=this[_0xcfd7c7(0x16f)][0x1]||![]):this[_0xcfd7c7(0x19a)](_0x4c6fa4,_0x41173c);}['bumpRetries'](){const _0x539ff6=a0_0x414ec6;this.#options[_0x539ff6(0x1a7)]=this.#options[_0x539ff6(0x1a7)]+0x1;}[a0_0x414ec6(0x18a)](){const _0x459b35=a0_0x414ec6;this.#options[_0x459b35(0x1a7)]=0x0;}#startPingTimer(){const _0x493715=a0_0x414ec6;this.#pingIntervalTimer=setInterval(this.#heartbeat,this.#options[_0x493715(0x19f)]||this.#defaultPingInterval,this);}#startReconnectTimer(_0x39f7f1){const _0x2ce76c=a0_0x414ec6;if(this.#options[_0x2ce76c(0x19c)]){if(_0x2ce76c(0x18d)!=='pXDto')return this[_0x2ce76c(0x156)];else setTimeout(this.#options[_0x2ce76c(0x19c)],this.#options['reconnectWaitTime']||this.#defaultReconnectWaitTime,this,_0x39f7f1);}}}
{
"name": "@compendiumfi/pendax",
"version": "1.1.19",
"version": "1.1.20",
"description": "connector for centralized cryptocurrency exchanges",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,1 +0,1 @@

const a0_0xde353f=a0_0x45bb;function a0_0x45bb(_0x3f8029,_0x43c57c){const _0x3bce02=a0_0x3bce();return a0_0x45bb=function(_0x45bbf5,_0x1504a8){_0x45bbf5=_0x45bbf5-0xa2;let _0x4ee0f1=_0x3bce02[_0x45bbf5];return _0x4ee0f1;},a0_0x45bb(_0x3f8029,_0x43c57c);}(function(_0x2e7c39,_0x498242){const _0x5d3944=a0_0x45bb,_0x9ea3d3=_0x2e7c39();while(!![]){try{const _0x362290=-parseInt(_0x5d3944(0xa7))/0x1+parseInt(_0x5d3944(0xb9))/0x2*(-parseInt(_0x5d3944(0xa2))/0x3)+parseInt(_0x5d3944(0xc5))/0x4*(parseInt(_0x5d3944(0xbd))/0x5)+parseInt(_0x5d3944(0xb2))/0x6+parseInt(_0x5d3944(0xbb))/0x7*(-parseInt(_0x5d3944(0xcf))/0x8)+parseInt(_0x5d3944(0xd0))/0x9+parseInt(_0x5d3944(0xaa))/0xa*(parseInt(_0x5d3944(0xcc))/0xb);if(_0x362290===_0x498242)break;else _0x9ea3d3['push'](_0x9ea3d3['shift']());}catch(_0x46bf46){_0x9ea3d3['push'](_0x9ea3d3['shift']());}}}(a0_0x3bce,0x45e82));import a0_0x5d47eb from'axios';import a0_0x43f8a1 from'crypto';import{BinanceSocket}from'../sockets/binancesocket.js';function a0_0x3bce(){const _0x430fc6=['keys','120wyDFdR','2809413fZCiWr','filter','update','label','Hmac','81417eLWwjI','futuresMarginType','now','exchange','exchangename','420500hvSUAG','/api/v3/ping?','exchangeid','338020fwUiod','length','name','key','recvWindow','secret','queryString','timestamp','2708376JPPjOy','createSignature','formatQuery','digest','apiSecret','binance','&timestamp=','22dyhhNf','join','30716dSjhxw','log','105320IfwTbl','&signature=','authenticate','sockets','https://api.binance.com','apiKey','recvWindow=','TRADE','52bkzkZc','margintype','createHeader','url','getServerTime','publicApis','testConnectivity','11YyEbYN','Missing\x20params:\x20'];a0_0x3bce=function(){return _0x430fc6;};return a0_0x3bce();}import a0_0x34c661 from'short-unique-id';export class Binance{[a0_0xde353f(0xca)]=new Array();[a0_0xde353f(0xc0)]={};constructor(_0x497bea){const _0x39e7af=a0_0xde353f;this[_0x39e7af(0xc8)]=_0x39e7af(0xc1),this[_0x39e7af(0xbf)]=_0x497bea['authenticate']==undefined?!![]:_0x497bea['authenticate'],this[_0x39e7af(0xac)]=_0x497bea[_0x39e7af(0xa5)][_0x39e7af(0xa6)]==undefined?_0x39e7af(0xb7):_0x497bea['exchange']['exchangename'],this[_0x39e7af(0xa9)]=_0x497bea[_0x39e7af(0xa5)]['id'],this[_0x39e7af(0xc2)]=_0x497bea[_0x39e7af(0xad)]==undefined?'':_0x497bea[_0x39e7af(0xad)],this[_0x39e7af(0xb6)]=_0x497bea[_0x39e7af(0xaf)]==undefined?'':_0x497bea[_0x39e7af(0xaf)],this[_0x39e7af(0xd3)]=_0x497bea[_0x39e7af(0xd3)],this[_0x39e7af(0xa3)]=_0x497bea[_0x39e7af(0xc6)]?_0x497bea[_0x39e7af(0xc6)]:'usdt',this['publicApis']['push']([_0x39e7af(0xcb),_0x39e7af(0xc9)]);}async[a0_0xde353f(0xc7)](){const _0x4fedf2=a0_0xde353f;let _0x459cdb={'X-MBX-APIKEY':this[_0x4fedf2(0xc2)]};return _0x459cdb;}[a0_0xde353f(0xb3)](_0xa5f265,_0x3b9eb9){const _0x543c0c=a0_0xde353f;return a0_0x43f8a1[_0x543c0c(0xd4)]('sha256',_0x3b9eb9)[_0x543c0c(0xd2)](_0xa5f265)[_0x543c0c(0xb5)]('hex');}async['executeRequest'](_0x1acee7,_0x4e1a07,_0x35e803,_0x3afd45){const _0x2c72a5=a0_0xde353f;let _0x2d7a92=Date[_0x2c72a5(0xa4)](),_0x2d987a=await this[_0x2c72a5(0xc7)]();const _0x4159d1=0x1388;let _0x2f4522=_0x3afd45!=null?_0x35e803[_0x2c72a5(0xd1)](_0x37f795=>!Object[_0x2c72a5(0xce)](_0x3afd45)['includes'](_0x37f795)):_0x35e803;if(_0x2f4522[_0x2c72a5(0xab)]==0x0){let _0x3f2880=new Array();for(const _0x96a266 in _0x3afd45){_0x3f2880['push'](_0x96a266+'='+_0x3afd45[_0x96a266]);}let _0x5a2244=this[_0x2c72a5(0xb4)]({'timestamp':_0x2d7a92,'recvWindow':_0x4159d1,'queryString':_0x3f2880},_0x2c72a5(0xc4)),_0x3325d7={'baseURL':this[_0x2c72a5(0xc8)],'url':_0x1acee7+_0x5a2244,'method':_0x4e1a07,'headers':_0x2d987a};console[_0x2c72a5(0xbc)](_0x3325d7);const _0x486c11=await a0_0x5d47eb(_0x3325d7);return _0x486c11;}else throw{'message':_0x2c72a5(0xcd)+_0x2f4522['join'](',')};}async[a0_0xde353f(0xcb)](){const _0x468f21=a0_0xde353f,_0x213dea=await this['executeRequest'](_0x468f21(0xa8),'GET',[]);return _0x213dea;}[a0_0xde353f(0xb4)](_0x1da47e){const _0x3ba1c5=a0_0xde353f;let _0x1bc309=_0x1da47e[_0x3ba1c5(0xb0)][_0x3ba1c5(0xba)]('&');_0x1bc309!=''&&(_0x1bc309=_0x1bc309+'&');_0x1bc309=_0x1bc309+_0x3ba1c5(0xc3)+_0x1da47e[_0x3ba1c5(0xae)]+_0x3ba1c5(0xb8)+_0x1da47e[_0x3ba1c5(0xb1)];let _0x2b1eb4=this[_0x3ba1c5(0xb3)](_0x1bc309,this[_0x3ba1c5(0xb6)]);return _0x1bc309=_0x1bc309+_0x3ba1c5(0xbe)+_0x2b1eb4,_0x1bc309;}}
const a0_0x772d48=a0_0x173f;(function(_0x44b183,_0x117484){const _0xe4bbb5=a0_0x173f,_0x15f59d=_0x44b183();while(!![]){try{const _0x107414=parseInt(_0xe4bbb5(0x11d))/0x1*(-parseInt(_0xe4bbb5(0x112))/0x2)+-parseInt(_0xe4bbb5(0x11e))/0x3+-parseInt(_0xe4bbb5(0xfa))/0x4*(-parseInt(_0xe4bbb5(0x11a))/0x5)+-parseInt(_0xe4bbb5(0xf5))/0x6+parseInt(_0xe4bbb5(0x120))/0x7+-parseInt(_0xe4bbb5(0x10a))/0x8+-parseInt(_0xe4bbb5(0x10d))/0x9*(-parseInt(_0xe4bbb5(0xf6))/0xa);if(_0x107414===_0x117484)break;else _0x15f59d['push'](_0x15f59d['shift']());}catch(_0x20642c){_0x15f59d['push'](_0x15f59d['shift']());}}}(a0_0x565a,0xbba9c));import a0_0x2adac7 from'axios';function a0_0x173f(_0x4358c1,_0x180010){const _0x565aaa=a0_0x565a();return a0_0x173f=function(_0x173f91,_0x41f28f){_0x173f91=_0x173f91-0xf4;let _0x308672=_0x565aaa[_0x173f91];return _0x308672;},a0_0x173f(_0x4358c1,_0x180010);}import a0_0x54cb17 from'crypto';import{BinanceSocket}from'../sockets/binancesocket.js';function a0_0x565a(){const _0x4d691c=['678620ZvaIeZ','https://api.binance.com','createHeader','53191RSptjb','4095894PbTZAD','GET','10434655tzHOnw','&signature=','TRADE','filter','apiKey','2310978raXCyj','162090mdglcI','futuresMarginType','label','push','36izOloC','formatQuery','log','Hmac','hex','queryString','sockets','executeRequest','binance','url','createSignature','update','testConnectivity','timestamp','join','length','6455576ztDLir','digest','sha256','459ywtAjj','includes','secret','exchange','recvWindow=','8daFYVJ','publicApis','margintype','authenticate','usdt','&timestamp=','key','keys'];a0_0x565a=function(){return _0x4d691c;};return a0_0x565a();}import a0_0x12ee2e from'short-unique-id';export class Binance{[a0_0x772d48(0x113)]=new Array();[a0_0x772d48(0x100)]={};constructor(_0x1a15a4){const _0x29b081=a0_0x772d48;this['url']=_0x29b081(0x11b),this['authenticate']=_0x1a15a4[_0x29b081(0x115)]==undefined?!![]:_0x1a15a4[_0x29b081(0x115)],this['name']=_0x1a15a4['exchange']['exchangename']==undefined?_0x29b081(0x102):_0x1a15a4['exchange']['exchangename'],this['exchangeid']=_0x1a15a4[_0x29b081(0x110)]['id'],this[_0x29b081(0xf4)]=_0x1a15a4[_0x29b081(0x118)]==undefined?'':_0x1a15a4[_0x29b081(0x118)],this['apiSecret']=_0x1a15a4[_0x29b081(0x10f)]==undefined?'':_0x1a15a4[_0x29b081(0x10f)],this['label']=_0x1a15a4[_0x29b081(0xf8)],this[_0x29b081(0xf7)]=_0x1a15a4[_0x29b081(0x114)]?_0x1a15a4[_0x29b081(0x114)]:_0x29b081(0x116),this['publicApis'][_0x29b081(0xf9)]([_0x29b081(0x106),'getServerTime']);}async[a0_0x772d48(0x11c)](){let _0x35634c={'X-MBX-APIKEY':this['apiKey']};return _0x35634c;}[a0_0x772d48(0x104)](_0x594997,_0x54f07f){const _0x256222=a0_0x772d48;return a0_0x54cb17[_0x256222(0xfd)](_0x256222(0x10c),_0x54f07f)[_0x256222(0x105)](_0x594997)[_0x256222(0x10b)](_0x256222(0xfe));}async[a0_0x772d48(0x101)](_0x30f1f3,_0x82c29e,_0x5bd4f4,_0x82ce77){const _0x1d7e2c=a0_0x772d48;let _0x245b63=Date['now'](),_0x5cad25=await this['createHeader']();const _0x451cb5=0x1388;let _0x2a7eb9=_0x82ce77!=null?_0x5bd4f4[_0x1d7e2c(0x123)](_0x38b91d=>!Object[_0x1d7e2c(0x119)](_0x82ce77)[_0x1d7e2c(0x10e)](_0x38b91d)):_0x5bd4f4;if(_0x2a7eb9[_0x1d7e2c(0x109)]==0x0){let _0x34d1f5=new Array();for(const _0xf3fdd9 in _0x82ce77){_0x34d1f5[_0x1d7e2c(0xf9)](_0xf3fdd9+'='+_0x82ce77[_0xf3fdd9]);}let _0x382880=this[_0x1d7e2c(0xfb)]({'timestamp':_0x245b63,'recvWindow':_0x451cb5,'queryString':_0x34d1f5},_0x1d7e2c(0x122)),_0x5cadfc={'baseURL':this[_0x1d7e2c(0x103)],'url':_0x30f1f3+_0x382880,'method':_0x82c29e,'headers':_0x5cad25};console[_0x1d7e2c(0xfc)](_0x5cadfc);const _0x33fc6b=await a0_0x2adac7(_0x5cadfc);return _0x33fc6b;}else throw{'message':'Missing\x20params:\x20'+_0x2a7eb9[_0x1d7e2c(0x108)](',')};}async[a0_0x772d48(0x106)](){const _0x6bcdd9=a0_0x772d48,_0x2abca6=await this[_0x6bcdd9(0x101)]('/api/v3/ping?',_0x6bcdd9(0x11f),[]);return _0x2abca6;}[a0_0x772d48(0xfb)](_0x3d40f0){const _0x4daa2e=a0_0x772d48;let _0x4b8178=_0x3d40f0[_0x4daa2e(0xff)][_0x4daa2e(0x108)]('&');_0x4b8178!=''&&(_0x4b8178=_0x4b8178+'&');_0x4b8178=_0x4b8178+_0x4daa2e(0x111)+_0x3d40f0['recvWindow']+_0x4daa2e(0x117)+_0x3d40f0[_0x4daa2e(0x107)];let _0x21afee=this[_0x4daa2e(0x104)](_0x4b8178,this['apiSecret']);return _0x4b8178=_0x4b8178+_0x4daa2e(0x121)+_0x21afee,_0x4b8178;}}

@@ -1,1 +0,1 @@

const a2_0x2ad6a9=a2_0x31e2;(function(_0x3671a7,_0x24697f){const _0x25622a=a2_0x31e2,_0x1c3971=_0x3671a7();while(!![]){try{const _0x5b6783=-parseInt(_0x25622a(0x1e4))/0x1*(parseInt(_0x25622a(0x250))/0x2)+parseInt(_0x25622a(0x1f2))/0x3+-parseInt(_0x25622a(0x215))/0x4+parseInt(_0x25622a(0x1e5))/0x5*(parseInt(_0x25622a(0x1ec))/0x6)+-parseInt(_0x25622a(0x22e))/0x7+-parseInt(_0x25622a(0x258))/0x8+-parseInt(_0x25622a(0x223))/0x9*(-parseInt(_0x25622a(0x26f))/0xa);if(_0x5b6783===_0x24697f)break;else _0x1c3971['push'](_0x1c3971['shift']());}catch(_0x6ad383){_0x1c3971['push'](_0x1c3971['shift']());}}}(a2_0x4009,0x86295));import a2_0x4416a1 from'axios';import a2_0xdaaca4 from'crypto';import a2_0xa9e476 from'short-unique-id';import a2_0xc8be72 from'crypto-js';import{midnight,dateDifferenceInMonths}from'../utils/date_utils.js';function a2_0x31e2(_0x5e8963,_0x5b356b){const _0x40090a=a2_0x4009();return a2_0x31e2=function(_0x31e268,_0x321784){_0x31e268=_0x31e268-0x1dd;let _0x348d4b=_0x40090a[_0x31e268];return _0x348d4b;},a2_0x31e2(_0x5e8963,_0x5b356b);}function a2_0x4009(){const _0x43eef0=['size','/api/v1/account/positions','getAffiliateInfo','oaBdw','JCHSY','getTPSLOrderHistory','placeMultipleOrders','getFundingRateHistory','isMain','Missing\x20params:\x20','9JELqOb','testnet','OcHXt','orderId','margintype','auystrAAS2iW85#s2@jdDC','/api/v1/affiliate/sub-invitees','enc','/api/v1/market/instruments','decrypt','stringify','6228313mnTcQf','orderType','label','fundsTransfer','getInstruments','getFuturesAccountBalance','getFundsTranferHistory','/api/v1/account/set-margin-mode','push','Utf8','positionSide','doLog','/api/v1/trade/cancel-order','name','usdt','HmacSHA256','parse','instId','sockets','getMarkPrice','VLoWO','placeOrder','/api/v1/account/batch-leverage-info','etkMb','includes','getMarginMode','getBalance','now','/api/v1/market/funding-rate-history','logGets','cYZfE','/api/v1/asset/withdrawal-history','getWithdrawHistory','/api/v1/trade/batch-orders','14194koOQls','getCandleSticks','getDepositHistory','getTickers','dhsyTW5!ysh8IuysQKcG45','toString','WEwWa','proxyPass','2803792OvVepi','getFundingRate','getOrderBook','/api/v1/user/query-apikey','getTrades','currency','testnet\x20option\x20set\x20to\x20true,\x20Blofin\x20currently\x20does\x20not\x20include\x20a\x20testnet\x20festure','/api/v1/market/trades','getActiveTPSLOrders','checkParams','fromAccount','exchange','marginMode','amount','subaccount','tpTriggerPrice','vzgnJ','key','kksKw','join','hgitF','https://openapi.blofin.com','getPositions','25252080riWevE','useProxy','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','brokerId','qDFBQ','data','setMarginMode','proxyUser','/api/v1/market/candles','side','/api/v1/trade/order','authenticate','nPnet','/api/v1/trade/orders-tpsl-pending','getMultipleLeverage','https','getTradeHistory','qVsFW','getActiveOrders','getApiKeyInfo','/api/v1/market/books','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','/api/v1/trade/close-position','leverage','publicApis','futuresMarginType','addProxyObject','129nWulTR','730PTiRHY','createAuthHeader','filter','proxy','apiKey','accountType','/api/v1/account/position-mode','4968spoeyR','passphrase','POST','executeCall','getOrderHistory','setLeverage','2484648xlXEtl','msg','createSignature','/api/v1/asset/deposit-history','zojXT','status','/api/v1/trade/order-tpsl','/api/v1/trade/fills-history','GET','statusText','keys','/api/v1/account/margin-mode','proxyPort','Base64','exchangename','/api/v1/asset/transfer','placeTPSLOrder','AES','ukTSp','/api/v1/affiliate/invitees','positionMode','getReferralCode','5388cb1f51cec2e3','/api/v1/market/funding-rate','/api/v1/trade/cancel-batch-orders','setPositionMode','/api/v1/asset/balances','blofin','getPositionMode','default','closePositions','proxyAuth','apiSecret','TyuJr','/api/v1/trade/orders-pending','3076164Vdbbsf','/api/v1/market/mark-price','url','secret'];a2_0x4009=function(){return _0x43eef0;};return a2_0x4009();}export class Blofin{[a2_0x2ad6a9(0x1e1)]=new Array();['ky']=a2_0x2ad6a9(0x228);['i']=a2_0x2ad6a9(0x254);[a2_0x2ad6a9(0x240)]={};[a2_0x2ad6a9(0x24b)]=![];['logPosts']=![];['logDeletes']=![];constructor(_0x4fc5cd){const _0x2bb4b0=a2_0x2ad6a9;this[_0x2bb4b0(0x217)]=_0x2bb4b0(0x26d);if(!(_0x4fc5cd[_0x2bb4b0(0x224)]===null)&&_0x4fc5cd[_0x2bb4b0(0x224)]===!![]){if(_0x2bb4b0(0x204)===_0x2bb4b0(0x204))throw _0x2bb4b0(0x25e);else{if(this[_0x2bb4b0(0x270)]){let _0x3c87e5={'protocol':_0x2bb4b0(0x27e),'host':this[_0x2bb4b0(0x1e8)],'port':this[_0x2bb4b0(0x1fe)]};this['proxyAuth']===!![]&&(_0x3c87e5['auth']={'username':this[_0x2bb4b0(0x276)],'password':this[_0x2bb4b0(0x257)]}),_0x4a25f1['proxy']=_0x3c87e5;}return _0x245706;}}this[_0x2bb4b0(0x27a)]=_0x4fc5cd[_0x2bb4b0(0x27a)]===null?!![]:_0x4fc5cd[_0x2bb4b0(0x27a)],this[_0x2bb4b0(0x23b)]=_0x4fc5cd[_0x2bb4b0(0x263)][_0x2bb4b0(0x200)]==undefined?_0x2bb4b0(0x20d):_0x4fc5cd[_0x2bb4b0(0x263)]['exchangename'],this['exchangeid']=_0x4fc5cd[_0x2bb4b0(0x263)]['id'],this[_0x2bb4b0(0x230)]=_0x4fc5cd[_0x2bb4b0(0x230)];if(this[_0x2bb4b0(0x27a)]===!![]){if(!_0x4fc5cd[_0x2bb4b0(0x269)]||!_0x4fc5cd[_0x2bb4b0(0x218)]||_0x4fc5cd[_0x2bb4b0(0x269)]==''||_0x4fc5cd[_0x2bb4b0(0x218)]=='')throw _0x2bb4b0(0x1de);this[_0x2bb4b0(0x1e9)]=_0x4fc5cd['key'],this[_0x2bb4b0(0x212)]=_0x4fc5cd[_0x2bb4b0(0x218)],this[_0x2bb4b0(0x221)]=_0x4fc5cd['subaccount']==undefined,this['subaccount']=this[_0x2bb4b0(0x221)]?'':_0x4fc5cd[_0x2bb4b0(0x266)],this['passphrase']=_0x4fc5cd[_0x2bb4b0(0x1ed)];}this[_0x2bb4b0(0x1e2)]=_0x4fc5cd[_0x2bb4b0(0x227)]?_0x4fc5cd[_0x2bb4b0(0x227)]:_0x2bb4b0(0x23c),this[_0x2bb4b0(0x270)]=![];if(_0x4fc5cd[_0x2bb4b0(0x270)]){if(_0x4fc5cd[_0x2bb4b0(0x1e8)]&&_0x4fc5cd['proxy']!=''){this[_0x2bb4b0(0x270)]=!![],this[_0x2bb4b0(0x1e8)]=this['url'],this[_0x2bb4b0(0x1e8)]=_0x4fc5cd[_0x2bb4b0(0x1e8)];if(_0x4fc5cd[_0x2bb4b0(0x1fe)])this[_0x2bb4b0(0x1fe)]=_0x4fc5cd[_0x2bb4b0(0x1fe)];else throw'Proxy\x20port\x20required';}_0x4fc5cd[_0x2bb4b0(0x276)]&&(this[_0x2bb4b0(0x276)]=_0x4fc5cd[_0x2bb4b0(0x276)]);if(_0x4fc5cd[_0x2bb4b0(0x257)]){if(_0x2bb4b0(0x242)===_0x2bb4b0(0x27b))throw'authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret';else this[_0x2bb4b0(0x257)]=_0x4fc5cd[_0x2bb4b0(0x257)];}_0x4fc5cd[_0x2bb4b0(0x211)]===!![]?this['proxyAuth']=!![]:this[_0x2bb4b0(0x211)]=![];}this[_0x2bb4b0(0x1e1)]['push'](_0x2bb4b0(0x232),_0x2bb4b0(0x253),_0x2bb4b0(0x25a),'getTrades',_0x2bb4b0(0x241),_0x2bb4b0(0x259),_0x2bb4b0(0x220),_0x2bb4b0(0x251));const _0x538536=[[_0x2bb4b0(0x232),'GET',_0x2bb4b0(0x22b),[]],[_0x2bb4b0(0x253),'GET','/api/v1/market/tickers',[]],[_0x2bb4b0(0x25a),_0x2bb4b0(0x1fa),_0x2bb4b0(0x1dd),[]],[_0x2bb4b0(0x25c),'GET',_0x2bb4b0(0x25f),['instId']],[_0x2bb4b0(0x241),_0x2bb4b0(0x1fa),_0x2bb4b0(0x216),[_0x2bb4b0(0x23f)]],[_0x2bb4b0(0x259),_0x2bb4b0(0x1fa),_0x2bb4b0(0x209),[_0x2bb4b0(0x23f)]],['getFundingRateHistory','GET',_0x2bb4b0(0x24a),[_0x2bb4b0(0x23f)]],[_0x2bb4b0(0x251),_0x2bb4b0(0x1fa),_0x2bb4b0(0x277),[_0x2bb4b0(0x23f)]],[_0x2bb4b0(0x248),'GET',_0x2bb4b0(0x20c),[_0x2bb4b0(0x1ea)]],[_0x2bb4b0(0x231),_0x2bb4b0(0x1ee),_0x2bb4b0(0x201),[_0x2bb4b0(0x25d),_0x2bb4b0(0x262),'toAccount',_0x2bb4b0(0x265)]],[_0x2bb4b0(0x234),'GET','/api/v1/asset/bills',[]],[_0x2bb4b0(0x24e),_0x2bb4b0(0x1fa),_0x2bb4b0(0x24d),[]],[_0x2bb4b0(0x252),_0x2bb4b0(0x1fa),_0x2bb4b0(0x1f5),[]],[_0x2bb4b0(0x233),'GET','/api/v1/account/balance',[]],[_0x2bb4b0(0x26e),'GET',_0x2bb4b0(0x21a),[]],[_0x2bb4b0(0x247),'GET',_0x2bb4b0(0x1fd),[]],[_0x2bb4b0(0x275),'POST',_0x2bb4b0(0x235),[_0x2bb4b0(0x264)]],[_0x2bb4b0(0x20e),'GET',_0x2bb4b0(0x1eb),[]],[_0x2bb4b0(0x20b),'POST',_0x2bb4b0(0x1eb),[_0x2bb4b0(0x206)]],[_0x2bb4b0(0x27d),_0x2bb4b0(0x1fa),_0x2bb4b0(0x244),[]],[_0x2bb4b0(0x1f1),_0x2bb4b0(0x1ee),'/api/v1/account/set-leverage',[_0x2bb4b0(0x23f),_0x2bb4b0(0x1e0)]],['cancelOrder',_0x2bb4b0(0x1ee),_0x2bb4b0(0x23a),[_0x2bb4b0(0x226)]],['cancelMultipleOrders','POST',_0x2bb4b0(0x20a),[]],['cancelTPSLOrder',_0x2bb4b0(0x1ee),'/api/v1/trade/cancel-tpsl',[]],[_0x2bb4b0(0x281),_0x2bb4b0(0x1fa),_0x2bb4b0(0x214),[]],[_0x2bb4b0(0x260),_0x2bb4b0(0x1fa),_0x2bb4b0(0x27c),[]],[_0x2bb4b0(0x210),_0x2bb4b0(0x1ee),_0x2bb4b0(0x1df),[_0x2bb4b0(0x23f),_0x2bb4b0(0x264)]],[_0x2bb4b0(0x1f0),'GET','/api/v1/trade/orders-history',[]],[_0x2bb4b0(0x21e),_0x2bb4b0(0x1fa),'/api/v1/trade/orders-tpsl-history',[]],[_0x2bb4b0(0x27f),_0x2bb4b0(0x1fa),_0x2bb4b0(0x1f9),[]],[_0x2bb4b0(0x21b),'GET','/api/v1/affiliate/basic',[]],[_0x2bb4b0(0x207),_0x2bb4b0(0x1fa),'/api/v1/affiliate/referral-code',[]],['getDirectInvites',_0x2bb4b0(0x1fa),_0x2bb4b0(0x205),[]],['getSubInvitees',_0x2bb4b0(0x1fa),_0x2bb4b0(0x229),[]],['getSubAffiliates','GET','/api/v1/affiliate/sub-affiliates',[]],[_0x2bb4b0(0x282),_0x2bb4b0(0x1fa),_0x2bb4b0(0x25b),[]]],_0x58724e=[[_0x2bb4b0(0x243),_0x2bb4b0(0x1ee),_0x2bb4b0(0x279),[_0x2bb4b0(0x23f),'marginMode',_0x2bb4b0(0x278),_0x2bb4b0(0x22f),_0x2bb4b0(0x219)]],[_0x2bb4b0(0x21f),_0x2bb4b0(0x1ee),_0x2bb4b0(0x24f),[]],[_0x2bb4b0(0x202),_0x2bb4b0(0x1ee),_0x2bb4b0(0x1f8),[_0x2bb4b0(0x23f),'marginMode',_0x2bb4b0(0x238),_0x2bb4b0(0x278),_0x2bb4b0(0x267)]]];for(const _0x5a1ee9 in _0x538536){if(_0x2bb4b0(0x24c)!==_0x2bb4b0(0x280))this[_0x538536[_0x5a1ee9][0x0]]=async _0x34d5ec=>{const _0x1b97bd=_0x2bb4b0;let _0x38efac=await this[_0x1b97bd(0x1ef)](_0x34d5ec,_0x538536[_0x5a1ee9][0x1],_0x538536[_0x5a1ee9][0x2],_0x538536[_0x5a1ee9][0x3]);return _0x38efac;};else{this[_0x2bb4b0(0x24b)]==!![]&&_0x2fc058(_0x2bb4b0(0x271));throw _0x2bb4b0(0x271);}}for(const _0x20bff3 in _0x58724e){'hgitF'===_0x2bb4b0(0x26c)?this[_0x58724e[_0x20bff3][0x0]]=async _0x557004=>{const _0x3c026f=_0x2bb4b0;if(_0x3c026f(0x21c)!==_0x3c026f(0x21c))this['proxyAuth']=!![];else{_0x557004[_0x3c026f(0x272)]=_0x3c026f(0x208);let _0x12fa42=await this[_0x3c026f(0x1ef)](_0x557004,_0x58724e[_0x20bff3][0x1],_0x58724e[_0x20bff3][0x2],_0x58724e[_0x20bff3][0x3]);return _0x12fa42;}}:this[_0x2bb4b0(0x257)]=_0x2612a1[_0x2bb4b0(0x257)];}}['dec']=_0x2208ba=>{const _0x2bb6a5=a2_0x2ad6a9;if(_0x2208ba==null){if(_0x2bb6a5(0x268)==='vzgnJ')return undefined;else this['proxyUser']=_0x3471c1['proxyUser'];}const _0x1c98b4=a2_0xc8be72['enc']['Base64'][_0x2bb6a5(0x23e)](this['ky']),_0x230937=a2_0xc8be72['enc'][_0x2bb6a5(0x1ff)][_0x2bb6a5(0x23e)](this['i']);return a2_0xc8be72[_0x2bb6a5(0x203)][_0x2bb6a5(0x22c)](_0x2208ba,_0x1c98b4,{'iv':_0x230937})[_0x2bb6a5(0x255)](a2_0xc8be72[_0x2bb6a5(0x22a)][_0x2bb6a5(0x237)]);};async[a2_0x2ad6a9(0x1e6)](_0xa2bd5,_0x4820a9,_0x150505,_0x5b4692){const _0x2a30f7=a2_0x2ad6a9;let _0x104d26=Date[_0x2a30f7(0x249)]();const {randomUUID:_0x3987a8}=new a2_0xa9e476({'length':0x14});let _0x166b5e=_0x3987a8(),_0x1548e5=await this[_0x2a30f7(0x1f4)](_0xa2bd5,_0x4820a9,_0x104d26,_0x166b5e,_0x5b4692,_0x150505),_0x338716={'ACCESS-KEY':this[_0x2a30f7(0x1e9)],'ACCESS-PASSPHRASE':this[_0x2a30f7(0x1ed)],'ACCESS-NONCE':_0x166b5e,'ACCESS-TIMESTAMP':String(_0x104d26),'ACCESS-SIGN':_0x1548e5};return _0x338716;}async[a2_0x2ad6a9(0x1f4)](_0xa25d28,_0x1a07c2,_0x27781f,_0x3d53cb,_0x45a761,_0x1c53d5){const _0x334b7a=a2_0x2ad6a9;let _0x42e8b5=_0xa25d28+_0x1a07c2+_0x45a761+_0x27781f+_0x3d53cb+_0x1c53d5,_0x4031d2=a2_0xc8be72[_0x334b7a(0x22a)][_0x334b7a(0x1ff)]['stringify'](a2_0xc8be72['enc'][_0x334b7a(0x237)][_0x334b7a(0x23e)](a2_0xc8be72[_0x334b7a(0x23d)](_0x42e8b5,this[_0x334b7a(0x212)])));return _0x4031d2;}[a2_0x2ad6a9(0x1e3)](_0x3d9d6e){const _0x2b119c=a2_0x2ad6a9;if(this[_0x2b119c(0x270)]){let _0x1ec6b6={'protocol':_0x2b119c(0x27e),'host':this['proxy'],'port':this['proxyPort']};this[_0x2b119c(0x211)]===!![]&&(_0x1ec6b6['auth']={'username':this[_0x2b119c(0x276)],'password':this['proxyPass']}),_0x3d9d6e[_0x2b119c(0x1e8)]=_0x1ec6b6;}return _0x3d9d6e;}async[a2_0x2ad6a9(0x261)](_0xad9516,_0x1a34a4){const _0x23dd14=a2_0x2ad6a9;let _0x1a6591=_0xad9516!=null?_0x1a34a4[_0x23dd14(0x1e7)](_0xd50e6=>!Object[_0x23dd14(0x1fc)](_0xad9516)[_0x23dd14(0x246)](_0xd50e6)):_0x1a34a4;if(_0x1a6591['length']!=0x0)throw{'message':_0x23dd14(0x222)+_0x1a6591[_0x23dd14(0x26b)](',')};}async[a2_0x2ad6a9(0x1ef)](_0x201b1c,_0x9b3eec,_0x117f65,_0x424853){const _0x174fd3=a2_0x2ad6a9;await this[_0x174fd3(0x261)](_0x201b1c,_0x424853);let _0x251d59='',_0x428eec='';if(_0x9b3eec==_0x174fd3(0x1fa)){let _0x3ffe74=[];for(let _0x307ac0 in _0x201b1c){_0x3ffe74[_0x174fd3(0x236)](_0x307ac0+'='+_0x201b1c[_0x307ac0]);}_0x251d59=_0x3ffe74['join']('&'),_0x251d59!=''&&(_0x251d59='?'+_0x251d59);}else _0x428eec=JSON[_0x174fd3(0x22d)](_0x201b1c);let _0x1e4006={};if(this[_0x174fd3(0x27a)]===!![]){if(_0x174fd3(0x21d)==='ftOhp'){if(_0x16b417==null)return _0xe4038b;const _0x572f9d=_0x4875f2[_0x174fd3(0x22a)]['Base64']['parse'](this['ky']),_0x2b4cd1=_0x1d8a7d['enc'][_0x174fd3(0x1ff)]['parse'](this['i']);return _0x4d3072[_0x174fd3(0x203)][_0x174fd3(0x22c)](_0x9400e1,_0x572f9d,{'iv':_0x2b4cd1})[_0x174fd3(0x255)](_0x47fc64[_0x174fd3(0x22a)][_0x174fd3(0x237)]);}else _0x1e4006=await this[_0x174fd3(0x1e6)](_0x117f65,_0x251d59,_0x428eec,_0x9b3eec);}let _0x4630c9={'baseURL':this['url'],'url':_0x117f65+_0x251d59,'method':_0x9b3eec,'headers':_0x1e4006,'data':_0x9b3eec==_0x174fd3(0x1fa)?{}:_0x201b1c};_0x4630c9=this[_0x174fd3(0x1e3)](_0x4630c9);try{if(_0x174fd3(0x26a)!=='bLLeZ'){const _0x19dc68=await a2_0x4416a1(_0x4630c9);if(!_0x19dc68){if(_0x174fd3(0x273)!==_0x174fd3(0x273))throw{'message':_0x174fd3(0x222)+_0x11f54a[_0x174fd3(0x26b)](',')};else{if(this[_0x174fd3(0x24b)]==!![]){if('etkMb'!==_0x174fd3(0x245)){let _0x9afb0f=[];for(let _0x57e31c in _0x1948a7){_0x9afb0f[_0x174fd3(0x236)](_0x57e31c+'='+_0x4857bd[_0x57e31c]);}_0x1b8074=_0x9afb0f['join']('&'),_0x5f74e5!=''&&(_0x2f4f08='?'+_0x341985);}else doLog(_0x174fd3(0x271));}throw _0x174fd3(0x271);}}if(this[_0x174fd3(0x24b)]==!![]){if(_0x174fd3(0x225)!==_0x174fd3(0x1f6))this[_0x174fd3(0x239)]({'send':_0x4630c9,'level':_0x174fd3(0x20f),'receive':{'code':_0x19dc68[_0x174fd3(0x274)]['code'],'data':JSON[_0x174fd3(0x22d)](_0x19dc68[_0x174fd3(0x274)][_0x174fd3(0x274)]),'msg':_0x19dc68['data'][_0x174fd3(0x1f3)]}});else return _0xf822e1;}return{'code':_0x19dc68[_0x174fd3(0x1f7)],'data':_0x19dc68[_0x174fd3(0x274)],'msg':_0x19dc68[_0x174fd3(0x1fb)]};}else throw'testnet\x20option\x20set\x20to\x20true,\x20Blofin\x20currently\x20does\x20not\x20include\x20a\x20testnet\x20festure';}catch(_0x3b538d){if(_0x174fd3(0x256)!==_0x174fd3(0x213))return _0x3b538d;else _0x52e432='?'+_0x2a5a4a;}}}
const a2_0x7a02b5=a2_0x11b7;(function(_0x227d01,_0x5f2ee9){const _0x4d0782=a2_0x11b7,_0x439973=_0x227d01();while(!![]){try{const _0x1fcd87=parseInt(_0x4d0782(0xe1))/0x1*(parseInt(_0x4d0782(0x160))/0x2)+parseInt(_0x4d0782(0x11f))/0x3+-parseInt(_0x4d0782(0x13d))/0x4+-parseInt(_0x4d0782(0xfa))/0x5*(parseInt(_0x4d0782(0x118))/0x6)+parseInt(_0x4d0782(0xee))/0x7*(-parseInt(_0x4d0782(0x161))/0x8)+parseInt(_0x4d0782(0x13a))/0x9*(parseInt(_0x4d0782(0x119))/0xa)+-parseInt(_0x4d0782(0x10a))/0xb;if(_0x1fcd87===_0x5f2ee9)break;else _0x439973['push'](_0x439973['shift']());}catch(_0x4406d3){_0x439973['push'](_0x439973['shift']());}}}(a2_0x3b48,0xc94ad));import a2_0x9fa191 from'axios';import a2_0x1e050f from'crypto';import a2_0x266eb8 from'short-unique-id';import a2_0x69181c from'crypto-js';function a2_0x11b7(_0xb0af2c,_0x31ebb2){const _0x3b483f=a2_0x3b48();return a2_0x11b7=function(_0x11b70c,_0x12c801){_0x11b70c=_0x11b70c-0xd9;let _0x413506=_0x3b483f[_0x11b70c];return _0x413506;},a2_0x11b7(_0xb0af2c,_0x31ebb2);}import{midnight,dateDifferenceInMonths}from'../utils/date_utils.js';function a2_0x3b48(){const _0x27ec20=['stringify','getPositions','length','logPosts','orderId','kCQyl','placeTPSLOrder','logGets','4460vYhYDB','getFundsTranferHistory','/api/v1/market/mark-price','yDLYf','/api/v1/trade/cancel-tpsl','positionMode','GET','data','Utf8','NMOcj','getWithdrawHistory','EFMWJ','HmacSHA256','/api/v1/user/query-apikey','/api/v1/trade/batch-orders','amount','1569964cgraRm','/api/v1/market/funding-rate-history','margintype','sockets','instId','join','parse','exchangeid','authenticate','side','getMultipleLeverage','decrypt','/api/v1/trade/orders-pending','closePositions','4362YylGlN','1694310NxpuOX','getAffiliateInfo','key','dhsyTW5!ysh8IuysQKcG45','futuresMarginType','setPositionMode','4857591tWxprz','DKVgw','getActiveTPSLOrders','brokerId','getFundingRate','getOrderBook','usdt','getDepositHistory','placeMultipleOrders','exchangename','REIxO','kCgGU','enc','auystrAAS2iW85#s2@jdDC','getCandleSticks','placeOrder','fWFmQ','POST','PeuJr','/api/v1/trade/orders-history','getMarkPrice','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','exchange','getMarginMode','currency','size','name','81Nouvxn','VHJSc','push','5112216jBfhir','useProxy','addProxyObject','tpTriggerPrice','orderType','default','label','/api/v1/account/margin-mode','Proxy\x20port\x20required','checkParams','setLeverage','cancelOrder','lbMkQ','proxyUser','accountType','/api/v1/trade/close-position','setMarginMode','executeCall','/api/v1/trade/order-tpsl','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','secret','createSignature','cancelTPSLOrder','dec','getReferralCode','testnet','/api/v1/market/trades','proxy','proxyPort','auth','isMain','getApiKeyInfo','now','/api/v1/affiliate/invitees','FlVpz','100bgSKMw','8TxnIZl','url','createAuthHeader','/api/v1/trade/orders-tpsl-history','apiKey','/api/v1/market/books','getSubInvitees','/api/v1/affiliate/basic','/api/v1/affiliate/sub-invitees','passphrase','EgOEm','getTickers','/api/v1/trade/fills-history','getDirectInvites','getFundingRateHistory','/api/v1/account/positions','getTPSLOrderHistory','doLog','Base64','/api/v1/account/position-mode','getInstruments','filter','proxyAuth','1603gDciXm','apiSecret','publicApis','marginMode','/api/v1/asset/balances','getFuturesAccountBalance','5388cb1f51cec2e3','/api/v1/market/funding-rate','fromAccount','getPositionMode','proxyPass','getTrades','toAccount','2313297IuAQtZ','/api/v1/trade/cancel-order','ekMYh','subaccount'];a2_0x3b48=function(){return _0x27ec20;};return a2_0x3b48();}export class Blofin{['publicApis']=new Array();['ky']=a2_0x7a02b5(0x12c);['i']=a2_0x7a02b5(0x11c);[a2_0x7a02b5(0x10d)]={};['logGets']=![];[a2_0x7a02b5(0xf5)]=![];['logDeletes']=![];constructor(_0x4e3671){const _0x23f507=a2_0x7a02b5;this[_0x23f507(0x162)]='https://openapi.blofin.com';if(!(_0x4e3671[_0x23f507(0x156)]===null)&&_0x4e3671[_0x23f507(0x156)]===!![]){if(_0x23f507(0x149)==='dRoQO')return _0x546a69;else throw'testnet\x20option\x20set\x20to\x20true,\x20Blofin\x20currently\x20does\x20not\x20include\x20a\x20testnet\x20festure';}this[_0x23f507(0x112)]=_0x4e3671[_0x23f507(0x112)]===null?!![]:_0x4e3671['authenticate'],this[_0x23f507(0x139)]=_0x4e3671[_0x23f507(0x135)]['exchangename']==undefined?'blofin':_0x4e3671['exchange'][_0x23f507(0x128)],this[_0x23f507(0x111)]=_0x4e3671[_0x23f507(0x135)]['id'],this[_0x23f507(0x143)]=_0x4e3671[_0x23f507(0x143)];if(this[_0x23f507(0x112)]===!![]){if(!_0x4e3671[_0x23f507(0x11b)]||!_0x4e3671[_0x23f507(0x151)]||_0x4e3671[_0x23f507(0x11b)]==''||_0x4e3671[_0x23f507(0x151)]=='')throw _0x23f507(0x134);this[_0x23f507(0x165)]=_0x4e3671['key'],this[_0x23f507(0xe2)]=_0x4e3671[_0x23f507(0x151)],this['isMain']=_0x4e3671['subaccount']==undefined,this[_0x23f507(0xf1)]=this[_0x23f507(0x15b)]?'':_0x4e3671[_0x23f507(0xf1)],this['passphrase']=_0x4e3671[_0x23f507(0x16a)];}this[_0x23f507(0x11d)]=_0x4e3671['margintype']?_0x4e3671[_0x23f507(0x10c)]:_0x23f507(0x125),this[_0x23f507(0x13e)]=![];if(_0x4e3671[_0x23f507(0x13e)]){if(_0x4e3671[_0x23f507(0x158)]&&_0x4e3671[_0x23f507(0x158)]!=''){this[_0x23f507(0x13e)]=!![],this[_0x23f507(0x158)]=this[_0x23f507(0x162)],this['proxy']=_0x4e3671[_0x23f507(0x158)];if(_0x4e3671['proxyPort'])this[_0x23f507(0x159)]=_0x4e3671[_0x23f507(0x159)];else throw _0x23f507(0x145);}_0x4e3671[_0x23f507(0x14a)]&&(_0x23f507(0x13b)!==_0x23f507(0x13b)?_0x39be63(_0x23f507(0x150)):this[_0x23f507(0x14a)]=_0x4e3671[_0x23f507(0x14a)]),_0x4e3671[_0x23f507(0xeb)]&&(_0x23f507(0x15f)===_0x23f507(0x15f)?this['proxyPass']=_0x4e3671[_0x23f507(0xeb)]:_0x498ce5[_0x23f507(0x13c)](_0x3db60a+'='+_0x3a5963[_0x52d406])),_0x4e3671[_0x23f507(0xe0)]===!![]?this[_0x23f507(0xe0)]=!![]:this[_0x23f507(0xe0)]=![];}this[_0x23f507(0xe3)][_0x23f507(0x13c)](_0x23f507(0xde),_0x23f507(0x16c),_0x23f507(0x124),_0x23f507(0xec),_0x23f507(0x133),_0x23f507(0x123),'getFundingRateHistory',_0x23f507(0x12d));const _0x53aaac=[['getInstruments',_0x23f507(0x100),'/api/v1/market/instruments',[]],['getTickers',_0x23f507(0x100),'/api/v1/market/tickers',[]],[_0x23f507(0x124),_0x23f507(0x100),_0x23f507(0x166),[]],[_0x23f507(0xec),'GET',_0x23f507(0x157),[_0x23f507(0x10e)]],[_0x23f507(0x133),_0x23f507(0x100),_0x23f507(0xfc),['instId']],[_0x23f507(0x123),_0x23f507(0x100),_0x23f507(0xe8),[_0x23f507(0x10e)]],[_0x23f507(0x16f),_0x23f507(0x100),_0x23f507(0x10b),[_0x23f507(0x10e)]],[_0x23f507(0x12d),'GET','/api/v1/market/candles',[_0x23f507(0x10e)]],['getBalance',_0x23f507(0x100),_0x23f507(0xe5),[_0x23f507(0x14b)]],['fundsTransfer',_0x23f507(0x130),'/api/v1/asset/transfer',[_0x23f507(0x137),_0x23f507(0xe9),_0x23f507(0xed),_0x23f507(0x109)]],[_0x23f507(0xfb),_0x23f507(0x100),'/api/v1/asset/bills',[]],[_0x23f507(0x104),_0x23f507(0x100),'/api/v1/asset/withdrawal-history',[]],[_0x23f507(0x126),_0x23f507(0x100),'/api/v1/asset/deposit-history',[]],[_0x23f507(0xe6),_0x23f507(0x100),'/api/v1/account/balance',[]],[_0x23f507(0xf3),_0x23f507(0x100),_0x23f507(0xd9),[]],[_0x23f507(0x136),_0x23f507(0x100),_0x23f507(0x144),[]],[_0x23f507(0x14d),_0x23f507(0x130),'/api/v1/account/set-margin-mode',['marginMode']],[_0x23f507(0xea),_0x23f507(0x100),_0x23f507(0xdd),[]],[_0x23f507(0x11e),'POST',_0x23f507(0xdd),[_0x23f507(0xff)]],[_0x23f507(0x114),'GET','/api/v1/account/batch-leverage-info',[]],[_0x23f507(0x147),_0x23f507(0x130),'/api/v1/account/set-leverage',[_0x23f507(0x10e),'leverage']],[_0x23f507(0x148),_0x23f507(0x130),_0x23f507(0xef),[_0x23f507(0xf6)]],['cancelMultipleOrders','POST','/api/v1/trade/cancel-batch-orders',[]],[_0x23f507(0x153),'POST',_0x23f507(0xfe),[]],['getActiveOrders',_0x23f507(0x100),_0x23f507(0x116),[]],[_0x23f507(0x121),_0x23f507(0x100),'/api/v1/trade/orders-tpsl-pending',[]],[_0x23f507(0x117),'POST',_0x23f507(0x14c),['instId',_0x23f507(0xe4)]],['getOrderHistory',_0x23f507(0x100),_0x23f507(0x132),[]],[_0x23f507(0xda),_0x23f507(0x100),_0x23f507(0x164),[]],['getTradeHistory',_0x23f507(0x100),_0x23f507(0x16d),[]],[_0x23f507(0x11a),_0x23f507(0x100),_0x23f507(0x168),[]],[_0x23f507(0x155),'GET','/api/v1/affiliate/referral-code',[]],[_0x23f507(0x16e),_0x23f507(0x100),_0x23f507(0x15e),[]],[_0x23f507(0x167),_0x23f507(0x100),_0x23f507(0x169),[]],['getSubAffiliates',_0x23f507(0x100),'/api/v1/affiliate/sub-affiliates',[]],[_0x23f507(0x15c),_0x23f507(0x100),_0x23f507(0x107),[]]],_0x4feabd=[[_0x23f507(0x12e),'POST','/api/v1/trade/order',[_0x23f507(0x10e),_0x23f507(0xe4),_0x23f507(0x113),_0x23f507(0x141),_0x23f507(0x138)]],[_0x23f507(0x127),_0x23f507(0x130),_0x23f507(0x108),[]],[_0x23f507(0xf8),'POST',_0x23f507(0x14f),[_0x23f507(0x10e),_0x23f507(0xe4),'positionSide',_0x23f507(0x113),_0x23f507(0x140)]]];for(const _0x41b838 in _0x53aaac){if(_0x23f507(0x131)!==_0x23f507(0x105))this[_0x53aaac[_0x41b838][0x0]]=async _0x145df9=>{const _0x150a83=_0x23f507;if(_0x150a83(0x120)!==_0x150a83(0x120))this['proxyAuth']=!![];else{let _0x4a7159=await this[_0x150a83(0x14e)](_0x145df9,_0x53aaac[_0x41b838][0x1],_0x53aaac[_0x41b838][0x2],_0x53aaac[_0x41b838][0x3]);return _0x4a7159;}};else{if(this[_0x23f507(0x13e)]){let _0x1eabb0={'protocol':'https','host':this[_0x23f507(0x158)],'port':this[_0x23f507(0x159)]};this[_0x23f507(0xe0)]===!![]&&(_0x1eabb0[_0x23f507(0x15a)]={'username':this[_0x23f507(0x14a)],'password':this[_0x23f507(0xeb)]}),_0x1dc764[_0x23f507(0x158)]=_0x1eabb0;}return _0x4cae08;}}for(const _0x80a892 in _0x4feabd){this[_0x4feabd[_0x80a892][0x0]]=async _0x337751=>{const _0x5414c2=_0x23f507;_0x337751[_0x5414c2(0x122)]=_0x5414c2(0xe7);let _0x184d9b=await this[_0x5414c2(0x14e)](_0x337751,_0x4feabd[_0x80a892][0x1],_0x4feabd[_0x80a892][0x2],_0x4feabd[_0x80a892][0x3]);return _0x184d9b;};}}[a2_0x7a02b5(0x154)]=_0x40ec77=>{const _0x26e413=a2_0x7a02b5;if(_0x40ec77==null)return _0x26e413(0x16b)===_0x26e413(0xfd)?_0x29e963:undefined;const _0x575c2e=a2_0x69181c[_0x26e413(0x12b)][_0x26e413(0xdc)]['parse'](this['ky']),_0x1d9ce1=a2_0x69181c[_0x26e413(0x12b)][_0x26e413(0xdc)][_0x26e413(0x110)](this['i']);return a2_0x69181c['AES'][_0x26e413(0x115)](_0x40ec77,_0x575c2e,{'iv':_0x1d9ce1})['toString'](a2_0x69181c['enc'][_0x26e413(0x102)]);};async[a2_0x7a02b5(0x163)](_0x1cdcdd,_0x3e3734,_0x9ecb4f,_0x15a758){const _0x27dd5e=a2_0x7a02b5;let _0x4e1137=Date[_0x27dd5e(0x15d)]();const {randomUUID:_0x2c0d3b}=new a2_0x266eb8({'length':0x14});let _0x231a54=_0x2c0d3b(),_0x7c958d=await this['createSignature'](_0x1cdcdd,_0x3e3734,_0x4e1137,_0x231a54,_0x15a758,_0x9ecb4f),_0x4ff9b5={'ACCESS-KEY':this[_0x27dd5e(0x165)],'ACCESS-PASSPHRASE':this[_0x27dd5e(0x16a)],'ACCESS-NONCE':_0x231a54,'ACCESS-TIMESTAMP':String(_0x4e1137),'ACCESS-SIGN':_0x7c958d};return _0x4ff9b5;}async[a2_0x7a02b5(0x152)](_0xf606b3,_0x3ca801,_0x1d8f1d,_0x4b388b,_0x43bdc4,_0x58ce8e){const _0xef8d14=a2_0x7a02b5;let _0x2cd357=_0xf606b3+_0x3ca801+_0x43bdc4+_0x1d8f1d+_0x4b388b+_0x58ce8e,_0x31fab5=a2_0x69181c['enc']['Base64']['stringify'](a2_0x69181c['enc'][_0xef8d14(0x102)][_0xef8d14(0x110)](a2_0x69181c[_0xef8d14(0x106)](_0x2cd357,this[_0xef8d14(0xe2)])));return _0x31fab5;}['addProxyObject'](_0x103653){const _0x5c27e8=a2_0x7a02b5;if(this[_0x5c27e8(0x13e)]){if(_0x5c27e8(0x12f)!==_0x5c27e8(0x12a)){let _0xcc473c={'protocol':'https','host':this[_0x5c27e8(0x158)],'port':this[_0x5c27e8(0x159)]};this[_0x5c27e8(0xe0)]===!![]&&(_0xcc473c[_0x5c27e8(0x15a)]={'username':this[_0x5c27e8(0x14a)],'password':this[_0x5c27e8(0xeb)]}),_0x103653[_0x5c27e8(0x158)]=_0xcc473c;}else throw _0x5c27e8(0x145);}return _0x103653;}async[a2_0x7a02b5(0x146)](_0x264087,_0x4ec753){const _0x4ccfdc=a2_0x7a02b5;let _0x173527=_0x264087!=null?_0x4ec753[_0x4ccfdc(0xdf)](_0x47e8ff=>!Object['keys'](_0x264087)['includes'](_0x47e8ff)):_0x4ec753;if(_0x173527[_0x4ccfdc(0xf4)]!=0x0)throw{'message':'Missing\x20params:\x20'+_0x173527[_0x4ccfdc(0x10f)](',')};}async[a2_0x7a02b5(0x14e)](_0x2c63d0,_0x1ae7ef,_0x593343,_0x3919a1){const _0x2547f6=a2_0x7a02b5;await this['checkParams'](_0x2c63d0,_0x3919a1);let _0x37f341='',_0x3eeaaf='';if(_0x1ae7ef==_0x2547f6(0x100)){if(_0x2547f6(0xf7)===_0x2547f6(0xf0))throw{'message':'Missing\x20params:\x20'+_0x21e074[_0x2547f6(0x10f)](',')};else{let _0x2a0855=[];for(let _0x2a67f7 in _0x2c63d0){_0x2a0855[_0x2547f6(0x13c)](_0x2a67f7+'='+_0x2c63d0[_0x2a67f7]);}_0x37f341=_0x2a0855[_0x2547f6(0x10f)]('&'),_0x37f341!=''&&('NMOcj'!==_0x2547f6(0x103)?this[_0x2547f6(0xe0)]=![]:_0x37f341='?'+_0x37f341);}}else _0x3eeaaf=JSON[_0x2547f6(0xf2)](_0x2c63d0);let _0x4b1901={};this[_0x2547f6(0x112)]===!![]&&(_0x4b1901=await this[_0x2547f6(0x163)](_0x593343,_0x37f341,_0x3eeaaf,_0x1ae7ef));let _0x169dcd={'baseURL':this[_0x2547f6(0x162)],'url':_0x593343+_0x37f341,'method':_0x1ae7ef,'headers':_0x4b1901,'data':_0x1ae7ef==_0x2547f6(0x100)?{}:_0x2c63d0};_0x169dcd=this[_0x2547f6(0x13f)](_0x169dcd);try{if(_0x2547f6(0x129)===_0x2547f6(0x129)){const _0x41df06=await a2_0x9fa191(_0x169dcd);if(!_0x41df06){this[_0x2547f6(0xf9)]==!![]&&doLog(_0x2547f6(0x150));throw _0x2547f6(0x150);}return this[_0x2547f6(0xf9)]==!![]&&this[_0x2547f6(0xdb)]({'send':_0x169dcd,'level':_0x2547f6(0x142),'receive':{'code':_0x41df06[_0x2547f6(0x101)]['code'],'data':JSON[_0x2547f6(0xf2)](_0x41df06[_0x2547f6(0x101)][_0x2547f6(0x101)]),'msg':_0x41df06[_0x2547f6(0x101)]['msg']}}),{'code':_0x41df06['status'],'data':_0x41df06['data'],'msg':_0x41df06['statusText']};}else throw _0x2547f6(0x134);}catch(_0x29aae1){return _0x29aae1;}}}

@@ -1,1 +0,1 @@

const a6_0x5bcf5a=a6_0x1fb3;(function(_0x472146,_0x5c01be){const _0x15582e=a6_0x1fb3,_0x3a4982=_0x472146();while(!![]){try{const _0x26fe92=parseInt(_0x15582e(0xb3))/0x1*(parseInt(_0x15582e(0xab))/0x2)+-parseInt(_0x15582e(0xa5))/0x3+parseInt(_0x15582e(0x10a))/0x4+parseInt(_0x15582e(0x14b))/0x5*(parseInt(_0x15582e(0x142))/0x6)+parseInt(_0x15582e(0x16d))/0x7*(parseInt(_0x15582e(0x129))/0x8)+-parseInt(_0x15582e(0x160))/0x9+parseInt(_0x15582e(0x148))/0xa;if(_0x26fe92===_0x5c01be)break;else _0x3a4982['push'](_0x3a4982['shift']());}catch(_0x251851){_0x3a4982['push'](_0x3a4982['shift']());}}}(a6_0x5487,0xa345c));import a6_0x294154 from'axios';import a6_0x3966f8 from'crypto';function a6_0x5487(){const _0x4affa0=['apiKey','orderType','3962130nbvccq','PzcKc','getPositions','432770AIJcdD','orders/','baseURL','cancelAllOrders','markets/','/modify','rrGSy','start_time=','market_name','coin','target','NCrAj','kidbH','indexOf','triggerOrder','GET','cancelOrderByClientId','orders/history','includes','getFills','tokens','11155536dvtLvR','modifyOrder','useProxy','price','createGetHeader','market','VZsPx','createSubaccount','createPlaceBody','conditional_orders','ftxus','getOrderbook','end_time','7819ViXHrM','hex','requires\x20clientId','entries','depth','subaccount','Utf8','XEmSS','/orderbook?depth=','FTXUS-SIGN','market=','FTXUS-TS','secret','NEvvf','order','3943122QhfaLU','getOrderStatus','exchange','hHDWA','Base64','orderId','1320676gMkhus','cancelOpenTriggerOrder','parameter\x20must\x20be\x20an\x20array\x20of\x20tokens','decrypt','vnkDI','getHistoricalPrices','isMain','WdiCx','2PKmksE','YFMkW','key','getAllSubaccounts','hyQna','getMarket','XyKxp','lyQBz2wseWT6vT7XDyp9DQ==','side=','subaccounts/update_name','wLdJg','toString','zvlLS','balancer','DELETE','dec','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','/trades','qeQEV','getAllBalances','name','kdnwT','modifyTriggerOrderBody','ykFZq','rEdjn','Array','NJQpH','markets','EZxXZ','dhsyTW5!ysh8IuysQKcG45','update','authenticate','bAtFM','/api/','ojGLp','getBalances','push','changeSubaccountName','CyoeZ','fills','type=','executeGetRequest','body','deleteRequest','WkJbh','Akbog','createTriggerBody','GET/api/','HhebE','AES','length','yRvyM','BJEsI','gvnFH','/balances','getTrades','apiSecret','YLNwF','TIhhV','getSubaccountBalances','subaccounts','QencF','baseUrl','orders/by_client_id/','deleteSubaccount','getTriggerOrderTriggers','GHPRO','headers','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','url','qYWcH','transferBetweenSubaccounts','conditional_orders/','http://','auystrAAS2iW85#s2@jdDC','end_time=','changeSubaccountNameBody','side','orders','orderId=','knHbK','EBwot','sockets','modifyTriggerOrder','proxy','https://ftx.us/api/','jmGdt','3900928jkasBv','nickname','type','executeOrder','size','wallet/coins','digest','join','now','createPostHeader','result','/proxy/post','deleteSubaccountData','placeOrder','pHTNN','hHuSM','IwdWK','createSubaccountBody','muSMZ','uVTGx','getOpenTriggerOrders','enc','HOkdY','resolution','stringify','GnjWO','YMuUU','sha256','start_time','proxyPort','requires\x20orderId','1320aZNlbL','subaccounts/transfer','Hmac','modifyOrderByClientId','/triggers','/proxy/get','getMarkets','UbizP','UyZtf','/candles?resolution=','data','conditional_orders/history','/proxy/delete','requires\x20price\x20or\x20size\x20or\x20both','publicApis','order_id','uri','epWqA','map','POST','UiOQI','clientId','muFXF','parse','getOrderStatusByClientId','24TqogcJ','WYLoO','exchangename','MeCBV'];a6_0x5487=function(){return _0x4affa0;};return a6_0x5487();}import a6_0x2e19b0 from'crypto-js';function a6_0x1fb3(_0x269ad1,_0x51a23f){const _0x5487c6=a6_0x5487();return a6_0x1fb3=function(_0x1fb37f,_0x1f4a4b){_0x1fb37f=_0x1fb37f-0x9b;let _0x12c54d=_0x5487c6[_0x1fb37f];return _0x12c54d;},a6_0x1fb3(_0x269ad1,_0x51a23f);}export class FtxUs{['publicApis']=new Array();['ky']=a6_0x5bcf5a(0xfd);['i']=a6_0x5bcf5a(0xd0);[a6_0x5bcf5a(0x105)]={};constructor(_0x45daa9){const _0x57ec36=a6_0x5bcf5a;this[_0x57ec36(0xf8)]=_0x57ec36(0x108),this[_0x57ec36(0xd2)]=_0x45daa9[_0x57ec36(0xd2)]==undefined?!![]:_0x45daa9[_0x57ec36(0xd2)],this[_0x57ec36(0xc7)]=_0x45daa9[_0x57ec36(0xa7)][_0x57ec36(0x144)]==undefined?_0x57ec36(0x16a):_0x45daa9['exchange'][_0x57ec36(0x144)],this['exchangeid']=_0x45daa9[_0x57ec36(0xa7)]['id'],this['label']=_0x45daa9['label'];if(this['authenticate']){if(_0x57ec36(0xca)===_0x57ec36(0xca)){if(!_0x45daa9[_0x57ec36(0xb5)]||!_0x45daa9[_0x57ec36(0xa2)]||_0x45daa9['key']==''||_0x45daa9[_0x57ec36(0xa2)]=='')throw _0x57ec36(0xf7);this['apiKey']=_0x45daa9[_0x57ec36(0xb5)],this[_0x57ec36(0xeb)]=_0x45daa9[_0x57ec36(0xa2)],this[_0x57ec36(0xb1)]=_0x45daa9['subaccount']==undefined,this[_0x57ec36(0x9b)]=this[_0x57ec36(0xb1)]?'':_0x45daa9[_0x57ec36(0x9b)];}else return _0x5d249c['data'][_0x57ec36(0x114)];}this[_0x57ec36(0x162)]=![],this[_0x57ec36(0xc0)]=_0x45daa9['balancer']||undefined;if(_0x45daa9[_0x57ec36(0x162)]){if(_0x57ec36(0xcd)===_0x57ec36(0xcb))_0x56a31e={'FTXUS-KEY':this[_0x57ec36(0x146)],'FTXUS-TS':_0x69c09c};else{if(_0x45daa9[_0x57ec36(0x107)]&&_0x45daa9['proxy']!=''||_0x45daa9[_0x57ec36(0xc0)]&&_0x45daa9[_0x57ec36(0xc0)]!=''){if(_0x57ec36(0xe6)===_0x57ec36(0x130))return _0x6db09f[_0x57ec36(0x133)][_0x57ec36(0x133)]['result'];else this[_0x57ec36(0x162)]=!![],this['proxy']=_0x45daa9[_0x57ec36(0x107)],_0x45daa9['proxyPort']?'kidbH'===_0x57ec36(0x157)?this[_0x57ec36(0x127)]=_0x45daa9['proxyPort']:_0x374d2c=_0x5409a6+_0x57ec36(0xfe)+_0x326447[_0x57ec36(0x16c)]:_0x57ec36(0x109)!==_0x57ec36(0x156)?this[_0x57ec36(0x127)]=0xbb8:_0x2c32c2['data']=_0x156a37;}}}this['ri']=_0x57ec36(0xba),this[_0x57ec36(0x137)][_0x57ec36(0xd7)]('getTrades',_0x57ec36(0xb0),_0x57ec36(0x12f),_0x57ec36(0xb8));}[a6_0x5bcf5a(0xc2)]=_0xc553e4=>{const _0x20e574=a6_0x5bcf5a;if(_0xc553e4==null)return undefined;const _0x39efd7=a6_0x2e19b0[_0x20e574(0x11f)]['Base64'][_0x20e574(0x140)](this['ky']),_0x3b79c6=a6_0x2e19b0[_0x20e574(0x11f)][_0x20e574(0xa9)][_0x20e574(0x140)](this['i']);return a6_0x2e19b0[_0x20e574(0xe4)][_0x20e574(0xae)](_0xc553e4,_0x39efd7,{'iv':_0x3b79c6})[_0x20e574(0xbe)](a6_0x2e19b0['enc'][_0x20e574(0x9c)]);};[a6_0x5bcf5a(0x113)](_0x42e329){const _0x40754d=a6_0x5bcf5a;let _0x1c0839=Date[_0x40754d(0x112)](),_0x51821a;if(this[_0x40754d(0xb1)]&&_0x42e329&&_0x42e329[_0x40754d(0x9b)])_0x51821a={'FTXUS-KEY':this[_0x40754d(0x146)],'FTXUS-TS':_0x1c0839,'FTXUS-SUBACCOUNT':_0x42e329[_0x40754d(0x9b)]};else{if(!this[_0x40754d(0xb1)]&&_0x42e329&&_0x42e329[_0x40754d(0x9b)]&&_0x42e329[_0x40754d(0x9b)]==this[_0x40754d(0x9b)])'ojGLp'!==_0x40754d(0xd5)?(_0x2ced32[_0x40754d(0x107)]&&_0x2a7981[_0x40754d(0x107)]!=''||_0x5583da['balancer']&&_0x1c5879['balancer']!='')&&(this['useProxy']=!![],this['proxy']=_0x4508f8[_0x40754d(0x107)],_0xafcfba[_0x40754d(0x127)]?this[_0x40754d(0x127)]=_0x49331e[_0x40754d(0x127)]:this[_0x40754d(0x127)]=0xbb8):_0x51821a={'FTXUS-KEY':this[_0x40754d(0x146)],'FTXUS-TS':_0x1c0839,'FTXUS-SUBACCOUNT':_0x42e329[_0x40754d(0x9b)]};else{if(!this[_0x40754d(0xb1)]&&(!_0x42e329||!_0x42e329[_0x40754d(0x9b)]))_0x40754d(0xe7)===_0x40754d(0xe7)?_0x51821a={'FTXUS-KEY':this[_0x40754d(0x146)],'FTXUS-TS':_0x1c0839,'FTXUS-SUBACCOUNT':this[_0x40754d(0x9b)]}:(_0x2e10c6=_0x49a497+'?',_0x4ffdb6=_0x3dc612+_0x276bb0[_0x40754d(0x111)]('&'));else this[_0x40754d(0xb1)]&&(_0x40754d(0xf9)===_0x40754d(0xf9)?_0x51821a={'FTXUS-KEY':this[_0x40754d(0x146)],'FTXUS-TS':_0x1c0839}:_0x593894[_0x40754d(0x14d)]=_0x40754d(0xfc)+this[_0x40754d(0x107)]+':'+this['proxyPort']);}}return _0x51821a;}[a6_0x5bcf5a(0x164)](_0x2be8cf){const _0x403313=a6_0x5bcf5a;let _0x109bc1=Date[_0x403313(0x112)](),_0x498f9e;if(this['isMain']&&_0x2be8cf&&_0x2be8cf['subaccount'])_0x498f9e={'FTXUS-KEY':this[_0x403313(0x146)],'FTXUS-TS':_0x109bc1,'FTXUS-SUBACCOUNT':_0x2be8cf[_0x403313(0x9b)]};else{if(!this[_0x403313(0xb1)]&&_0x2be8cf&&_0x2be8cf[_0x403313(0x9b)]&&_0x2be8cf[_0x403313(0x9b)]==this[_0x403313(0x9b)])_0x498f9e={'FTXUS-KEY':this[_0x403313(0x146)],'FTXUS-TS':_0x109bc1,'FTXUS-SUBACCOUNT':_0x2be8cf[_0x403313(0x9b)]};else{if(!this[_0x403313(0xb1)]&&(!_0x2be8cf||!_0x2be8cf[_0x403313(0x9b)]))_0x498f9e={'FTXUS-KEY':this[_0x403313(0x146)],'FTXUS-TS':_0x109bc1,'FTXUS-SUBACCOUNT':this[_0x403313(0x9b)]};else this[_0x403313(0xb1)]&&(_0x498f9e={'FTXUS-KEY':this[_0x403313(0x146)],'FTXUS-TS':_0x109bc1});}}return _0x498f9e;}async[a6_0x5bcf5a(0x10d)](_0x53464e,_0x4d8943,_0x4583e3,_0x6e225c){const _0x219775=a6_0x5bcf5a;let _0x211183={'baseURL':this['url'],'url':_0x4583e3,'method':'POST','headers':_0x53464e};const _0x392eec=_0x4d8943?JSON[_0x219775(0x122)](_0x4d8943):'';if(this['useProxy']){if(_0x219775(0x11d)===_0x219775(0xd9)){if(_0x4e5d30==null)return _0xacc2e7;const _0x2d2ac6=_0x24f2c1[_0x219775(0x11f)]['Base64']['parse'](this['ky']),_0x2ff35b=_0x69deda[_0x219775(0x11f)][_0x219775(0xa9)][_0x219775(0x140)](this['i']);return _0x4b4ae6[_0x219775(0xe4)][_0x219775(0xae)](_0x3e52ce,_0x2d2ac6,{'iv':_0x2ff35b})[_0x219775(0xbe)](_0x298fd6[_0x219775(0x11f)][_0x219775(0x9c)]);}else{if(_0x53464e=='')_0x211183[_0x219775(0xf6)]={'target':this['url'],'uri':_0x211183[_0x219775(0xf8)],'body':_0x392eec};else{if(_0x219775(0x120)===_0x219775(0x120))_0x211183[_0x219775(0xf6)][_0x219775(0x155)]=this['url'],_0x211183[_0x219775(0xf6)][_0x219775(0x139)]=_0x211183['url'],_0x211183[_0x219775(0xf6)][_0x219775(0xdd)]=_0x392eec;else throw'requires\x20clientId';}if(this[_0x219775(0xc0)]){if(_0x219775(0xe0)!==_0x219775(0xed))_0x211183[_0x219775(0xf6)]['baseUrl']=this[_0x219775(0xf8)],_0x211183[_0x219775(0x14d)]=_0x219775(0xfc)+this['balancer']+':'+this[_0x219775(0x127)];else return _0x245eeb[_0x219775(0x133)]['data'];}else'muFXF'!==_0x219775(0x13f)?(_0x3aa43d=_0xf8a2e4+_0x219775(0x152)+_0x5023fa[_0x219775(0x126)],_0x259e1b[_0x219775(0x16c)]&&(_0x5139d9=_0x45af00+'&'+_0x219775(0xfe)+_0x105718['end_time'])):_0x211183[_0x219775(0x14d)]=_0x219775(0xfc)+this[_0x219775(0x107)]+':'+this[_0x219775(0x127)];_0x211183[_0x219775(0xf8)]=_0x219775(0x115);}}else{if('emkYY'!=='VfHWv')_0x211183['data']=_0x4d8943;else throw _0x219775(0xf7);}try{const _0x3f7d8a=await a6_0x294154(_0x211183);if(!_0x3f7d8a)throw _0x219775(0xc3);if(this[_0x219775(0x162)]){if(_0x219775(0xe3)===_0x219775(0xe3)){let _0x526c46=_0x3f7d8a[_0x219775(0x133)][_0x219775(0x133)]?_0x3f7d8a[_0x219775(0x133)][_0x219775(0x133)]:_0x3f7d8a[_0x219775(0x133)];delete _0x3f7d8a['data'],_0x3f7d8a[_0x219775(0x133)]=_0x526c46;}else throw _0x219775(0x136);}if(_0x6e225c&&['1','2','3','4','5','6'][_0x219775(0x15d)](_0x6e225c)){if(_0x219775(0x145)===_0x219775(0x11c))return{'result':_0x2d6217[_0x219775(0x133)][_0x219775(0x133)],'body':_0x2a4eb5};else switch(_0x6e225c){case'1':if(_0x3f7d8a['data']['data']){if(_0x219775(0xb7)!=='hyQna'){if(_0x3a24f5[_0x219775(0x133)]&&_0x5435cd[_0x219775(0x133)]['result'])for(let _0x17dbd2=0x0;_0x17dbd2<_0x219e45['data']['result']['length'];_0x17dbd2++){let _0x31c065=_0xcd7d02[_0x219775(0x133)][_0x219775(0x114)][_0x17dbd2][_0x219775(0x154)];_0x33a404[_0x219775(0x15d)](_0x31c065)&&_0x9a6430[_0x219775(0xd7)](_0xb70e22['data']['result'][_0x17dbd2]);}}else return _0x3f7d8a[_0x219775(0x133)][_0x219775(0x133)];}else return _0x3f7d8a[_0x219775(0x133)];break;case'2':return _0x3f7d8a[_0x219775(0x133)];break;case'3':return _0x3f7d8a;break;case'4':return _0x3f7d8a[_0x219775(0x133)]['data']?{'result':_0x3f7d8a[_0x219775(0x133)][_0x219775(0x133)],'body':_0x4d8943}:{'result':_0x3f7d8a[_0x219775(0x133)],'body':_0x4d8943};break;case'5':return{'result':_0x3f7d8a[_0x219775(0x133)],'body':_0x4d8943};break;case'6':return{'result':_0x3f7d8a,'body':_0x4d8943};break;}}if(_0x3f7d8a[_0x219775(0x133)][_0x219775(0x133)]){if(_0x219775(0xf0)===_0x219775(0xcf)){let _0xe49307=_0x585374;return _0xe49307[_0x219775(0x10c)]==_0x219775(0x165)&&(_0xe49307['price']=null),_0xe49307;}else return{'result':_0x3f7d8a[_0x219775(0x133)][_0x219775(0x133)],'body':_0x4d8943};}else return{'result':_0x3f7d8a['data'],'body':_0x4d8943};}catch(_0x5b285e){return _0x5b285e;}}async[a6_0x5bcf5a(0xdc)](_0x5b1a82,_0x29a01e,_0x1d7189){const _0x303abe=a6_0x5bcf5a;let _0x38a3b3={'baseURL':this[_0x303abe(0xf8)],'url':_0x29a01e,'method':_0x303abe(0x15a),'headers':_0x5b1a82};if(this[_0x303abe(0x162)]){if(_0x5b1a82==''){if(_0x303abe(0xbf)===_0x303abe(0xb9)){let _0x2409a3=_0x56eb2d;return delete _0x292d46[_0x303abe(0x138)],_0x2409a3;}else _0x38a3b3[_0x303abe(0xf6)]={'target':this[_0x303abe(0xf8)],'uri':_0x38a3b3[_0x303abe(0xf8)]};}else _0x38a3b3[_0x303abe(0xf6)][_0x303abe(0x155)]=this[_0x303abe(0xf8)],_0x38a3b3['headers'][_0x303abe(0x139)]=_0x38a3b3[_0x303abe(0xf8)];this[_0x303abe(0xc0)]?_0x303abe(0xc5)===_0x303abe(0x13a)?(_0x2d154b['headers'][_0x303abe(0x155)]=this[_0x303abe(0xf8)],_0x5f4b45[_0x303abe(0xf6)]['uri']=_0x726fa3['url']):(_0x38a3b3['headers'][_0x303abe(0xf1)]=this[_0x303abe(0xf8)],_0x38a3b3[_0x303abe(0x14d)]='http://'+this[_0x303abe(0xc0)]+':'+this[_0x303abe(0x127)]):_0x38a3b3[_0x303abe(0x14d)]='http://'+this[_0x303abe(0x107)]+':'+this[_0x303abe(0x127)],_0x38a3b3[_0x303abe(0xf8)]=_0x303abe(0x12e);}try{const _0xcb058e=await a6_0x294154(_0x38a3b3);if(!_0xcb058e)throw _0x303abe(0xc3);if(_0x1d7189&&['1','2','3']['includes'](_0x1d7189))switch(_0x1d7189){case'1':if(_0xcb058e[_0x303abe(0x133)][_0x303abe(0x133)])return _0xcb058e[_0x303abe(0x133)]['data'];else _0xcb058e[_0x303abe(0x133)][_0x303abe(0x114)]&&_0xcb058e[_0x303abe(0x133)][_0x303abe(0x114)];break;case'2':return _0xcb058e[_0x303abe(0x133)];break;case'3':return _0xcb058e;break;}if(_0xcb058e[_0x303abe(0x133)][_0x303abe(0x133)]){if(_0xcb058e[_0x303abe(0x133)][_0x303abe(0x133)][_0x303abe(0x114)]){if('LwtWn'!==_0x303abe(0xb4))return _0xcb058e[_0x303abe(0x133)][_0x303abe(0x133)][_0x303abe(0x114)];else _0x1c2ca0[_0x303abe(0xf6)][_0x303abe(0x155)]=this[_0x303abe(0xf8)],_0x5f5548[_0x303abe(0xf6)][_0x303abe(0x139)]=_0x3c5439['url'],_0x34c3d1['headers'][_0x303abe(0xdd)]=_0x29cf3a;}else return _0xcb058e[_0x303abe(0x133)][_0x303abe(0x133)];}else{if(_0xcb058e[_0x303abe(0x133)][_0x303abe(0x114)])return _0xcb058e[_0x303abe(0x133)][_0x303abe(0x114)];}}catch(_0x7f888c){return _0x7f888c;}}async[a6_0x5bcf5a(0xde)](_0x3b44f7,_0x138c68,_0x560fa9,_0x1942a7){const _0x323b95=a6_0x5bcf5a;let _0x14b111={'baseURL':this[_0x323b95(0xf8)],'url':_0x560fa9,'method':_0x323b95(0xc1),'headers':_0x3b44f7};const _0x1810bb=_0x138c68?JSON['stringify'](_0x138c68):'';this[_0x323b95(0x162)]?_0x323b95(0x103)==='knHbK'?(_0x3b44f7==''?_0x14b111[_0x323b95(0xf6)]={'target':this[_0x323b95(0xf8)],'uri':_0x14b111[_0x323b95(0xf8)],'body':_0x1810bb}:(_0x14b111[_0x323b95(0xf6)][_0x323b95(0x155)]=this[_0x323b95(0xf8)],_0x14b111[_0x323b95(0xf6)][_0x323b95(0x139)]=_0x14b111[_0x323b95(0xf8)],_0x14b111['headers'][_0x323b95(0xdd)]=_0x1810bb),this['balancer']?(_0x14b111[_0x323b95(0xf6)][_0x323b95(0xf1)]=this[_0x323b95(0xf8)],_0x14b111['baseURL']=_0x323b95(0xfc)+this[_0x323b95(0xc0)]+':'+this[_0x323b95(0x127)]):_0x14b111[_0x323b95(0x14d)]='http://'+this[_0x323b95(0x107)]+':'+this[_0x323b95(0x127)],_0x14b111[_0x323b95(0xf8)]=_0x323b95(0x135)):(_0x322836=_0xbba850+(_0x34b5c1=='?'?'':'&'),_0x1d74a8=_0x5b7b16+_0x323b95(0xfe)+_0x50aac7[_0x323b95(0x16c)]):_0x323b95(0x151)==='rrGSy'?_0x138c68&&(_0x14b111['data']=_0x138c68):_0x21a87e[_0x323b95(0xf6)]={'target':this[_0x323b95(0xf8)],'uri':_0x26bd1f[_0x323b95(0xf8)],'body':_0x56e041};try{if(_0x323b95(0x11a)!==_0x323b95(0xf5)){const _0x143a68=await a6_0x294154(_0x14b111);if(!_0x143a68)throw _0x323b95(0xc3);if(this['useProxy']){let _0x43056e=_0x143a68[_0x323b95(0x133)]['data']?_0x143a68['data'][_0x323b95(0x133)]:_0x143a68[_0x323b95(0x133)];delete _0x143a68[_0x323b95(0x133)],_0x143a68[_0x323b95(0x133)]=_0x43056e;}if(_0x1942a7&&['1','2'][_0x323b95(0x15d)](_0x1942a7))switch(_0x1942a7){case'1':return _0x143a68[_0x323b95(0x133)];break;case'2':return _0x143a68;break;}return _0x143a68['data'];}else return _0x3e795e[_0x323b95(0x133)][_0x323b95(0x133)]['result']?_0x2c1fa1[_0x323b95(0x133)][_0x323b95(0x133)][_0x323b95(0x114)]:_0xf94900['data']['data'];}catch(_0x40d21b){return _0x40d21b;}}async[a6_0x5bcf5a(0xb6)](_0x45fa3b){const _0x27270d=a6_0x5bcf5a;let _0x4ee1b9=this[_0x27270d(0x164)](),_0x1c1203=_0x27270d(0xef),_0x4aed85=_0x4ee1b9[_0x27270d(0xa1)]+_0x27270d(0xe2)+_0x1c1203;const _0xbe753=a6_0x3966f8[_0x27270d(0x12b)](_0x27270d(0x125),this['apiSecret'])['update'](_0x4aed85)['digest']('hex');return _0x4ee1b9[_0x27270d(0x9f)]=_0xbe753,await(await this['executeGetRequest'](_0x4ee1b9,_0x1c1203,_0x45fa3b||undefined))[_0x27270d(0x133)];}[a6_0x5bcf5a(0x11b)](_0x162888){let _0x3d917d=_0x162888;return _0x3d917d;}async[a6_0x5bcf5a(0x167)](_0x553c53,_0x170c2a){const _0x553a97=a6_0x5bcf5a;let _0x3a83d5=this[_0x553a97(0x113)](),_0x4a31ae=this['createSubaccountBody'](_0x553c53),_0x2ef480=_0x553a97(0xef),_0x58a1d6=_0x3a83d5[_0x553a97(0xa1)]+'POST'+_0x553a97(0xd4)+_0x2ef480+JSON[_0x553a97(0x122)](_0x4a31ae);const _0x29ac45=a6_0x3966f8['Hmac']('sha256',this['apiSecret'])['update'](_0x58a1d6)[_0x553a97(0x110)](_0x553a97(0x16e));return _0x3a83d5[_0x553a97(0x9f)]=_0x29ac45,await(await this[_0x553a97(0x10d)](_0x3a83d5,_0x4a31ae,_0x2ef480,_0x170c2a||undefined))[_0x553a97(0x133)];}[a6_0x5bcf5a(0xff)](_0x1b5f94){let _0x34055b=_0x1b5f94;return _0x34055b;}async[a6_0x5bcf5a(0xd8)](_0x502bc8,_0x1436de){const _0x508060=a6_0x5bcf5a;let _0x1dcce2=this[_0x508060(0x113)](),_0x348c5b=this[_0x508060(0xff)](_0x502bc8),_0xee7f8d=_0x508060(0xbc),_0x1fc90e=_0x1dcce2['FTXUS-TS']+_0x508060(0x13c)+_0x508060(0xd4)+_0xee7f8d+JSON[_0x508060(0x122)](_0x348c5b);const _0x4042ee=a6_0x3966f8['Hmac'](_0x508060(0x125),this[_0x508060(0xeb)])[_0x508060(0xd1)](_0x1fc90e)['digest'](_0x508060(0x16e));return _0x1dcce2[_0x508060(0x9f)]=_0x4042ee,await(await this[_0x508060(0x10d)](_0x1dcce2,_0x348c5b,_0xee7f8d,_0x1436de||undefined))[_0x508060(0x133)];}[a6_0x5bcf5a(0x116)](_0x41de05){let _0x3036f7=_0x41de05;return _0x3036f7;}async[a6_0x5bcf5a(0xf3)](_0x36b42b,_0x269dc8){const _0x477198=a6_0x5bcf5a;let _0x554dce=this[_0x477198(0x113)](_0x36b42b),_0x61a0ea=this['deleteSubaccountData'](_0x36b42b),_0x40aad9=_0x477198(0xef),_0x426de7=_0x554dce[_0x477198(0xa1)]+'DELETE'+_0x477198(0xd4)+_0x40aad9+JSON['stringify'](_0x61a0ea);const _0x105f6b=a6_0x3966f8[_0x477198(0x12b)](_0x477198(0x125),this[_0x477198(0xeb)])[_0x477198(0xd1)](_0x426de7)['digest'](_0x477198(0x16e));return _0x554dce[_0x477198(0x9f)]=_0x105f6b,await this[_0x477198(0xde)](_0x554dce,_0x61a0ea,_0x40aad9,_0x269dc8||undefined);}async[a6_0x5bcf5a(0xee)](_0x27c1a2,_0xe3254a){const _0x5ec816=a6_0x5bcf5a;let _0x5b31c1=this['createGetHeader'](),_0x45474b=_0x27c1a2[_0x5ec816(0x10b)],_0x290d4b='subaccounts/'+_0x45474b+_0x5ec816(0xe9),_0x2e8e3a=_0x5b31c1[_0x5ec816(0xa1)]+_0x5ec816(0xe2)+_0x290d4b;const _0x59877f=a6_0x3966f8[_0x5ec816(0x12b)](_0x5ec816(0x125),this[_0x5ec816(0xeb)])[_0x5ec816(0xd1)](_0x2e8e3a)[_0x5ec816(0x110)]('hex');return _0x5b31c1[_0x5ec816(0x9f)]=_0x59877f,await this[_0x5ec816(0xdc)](_0x5b31c1,_0x290d4b,_0xe3254a||undefined);}async[a6_0x5bcf5a(0xfa)](_0x651f47,_0x498a3f){const _0x263dd1=a6_0x5bcf5a;let _0x53c4d7=this['createPostHeader'](),_0x2eef6d=_0x651f47,_0x5d9d13=_0x263dd1(0x12a),_0x3b52f3=_0x53c4d7['FTXUS-TS']+_0x263dd1(0x13c)+_0x263dd1(0xd4)+_0x5d9d13+JSON['stringify'](_0x2eef6d);const _0x2dcd8c=a6_0x3966f8[_0x263dd1(0x12b)](_0x263dd1(0x125),this['apiSecret'])[_0x263dd1(0xd1)](_0x3b52f3)[_0x263dd1(0x110)](_0x263dd1(0x16e));return _0x53c4d7[_0x263dd1(0x9f)]=_0x2dcd8c,await this[_0x263dd1(0x10d)](_0x53c4d7,_0x2eef6d,_0x5d9d13,_0x498a3f||undefined);}async[a6_0x5bcf5a(0x12f)](_0x385349){const _0x4a19a3=a6_0x5bcf5a;let _0x29c809=_0x4a19a3(0xce),_0x94d0f5=this[_0x4a19a3(0xf8)]+_0x29c809;return await this[_0x4a19a3(0xdc)]('',_0x94d0f5,_0x385349||undefined);}async[a6_0x5bcf5a(0xb8)](_0x31993c,_0x204f47){const _0x18bb35=a6_0x5bcf5a;let _0x54f222=_0x18bb35(0x14f),_0x52a578=this[_0x18bb35(0xf8)]+_0x54f222+_0x31993c;return await this['executeGetRequest']('',_0x52a578,_0x204f47||undefined);}async[a6_0x5bcf5a(0x16b)](_0x488896,_0x42dd45){const _0x5e05d6=a6_0x5bcf5a;let _0x4bbffe='?';return _0x488896[_0x5e05d6(0x171)]==null?_0x4bbffe=this['url']+_0x5e05d6(0x14f)+_0x488896[_0x5e05d6(0x153)]+'/orderbook':_0x4bbffe=this[_0x5e05d6(0xf8)]+_0x5e05d6(0x14f)+_0x488896[_0x5e05d6(0x153)]+_0x5e05d6(0x9e)+_0x488896[_0x5e05d6(0x171)],await this[_0x5e05d6(0xdc)]('',_0x4bbffe,_0x42dd45||undefined);}async[a6_0x5bcf5a(0xea)](_0x38f7f8,_0x1eb44a){const _0x3a2aa5=a6_0x5bcf5a;let _0x546c86=this[_0x3a2aa5(0xf8)]+'markets/'+_0x38f7f8['market_name']+_0x3a2aa5(0xc4);if(_0x38f7f8['start_time']||_0x38f7f8['end_time']){_0x546c86=_0x546c86+'?';if(_0x38f7f8['start_time'])_0x546c86=_0x546c86+_0x3a2aa5(0x152)+_0x38f7f8['start_time'],_0x38f7f8[_0x3a2aa5(0x16c)]&&(_0x3a2aa5(0xc8)===_0x3a2aa5(0xc8)?_0x546c86=_0x546c86+'&'+'end_time='+_0x38f7f8[_0x3a2aa5(0x16c)]:this['proxyPort']=0xbb8);else _0x38f7f8[_0x3a2aa5(0x16c)]&&(_0x546c86=_0x546c86+_0x3a2aa5(0xfe)+_0x38f7f8[_0x3a2aa5(0x16c)]);}return await this[_0x3a2aa5(0xdc)]('',_0x546c86,_0x1eb44a||undefined);}async[a6_0x5bcf5a(0xb0)](_0x4ea962,_0x406698){const _0xf3009d=a6_0x5bcf5a;let _0x24c1ce=this[_0xf3009d(0xf8)]+'markets/'+_0x4ea962['market_name']+_0xf3009d(0x132)+_0x4ea962[_0xf3009d(0x121)];if(_0x4ea962[_0xf3009d(0x126)]||_0x4ea962[_0xf3009d(0x16c)]){if('pmXoo'==='tXsKI')_0x4cb126=_0x4971cc+(_0x33610c=='?'?'':'&'),_0x41cc69=_0x5155b1+_0xf3009d(0x102)+_0x28d920[_0xf3009d(0xaa)];else{_0x24c1ce=_0x24c1ce+'&';if(_0x4ea962[_0xf3009d(0x126)]){if(_0xf3009d(0x131)===_0xf3009d(0x166))_0x11efcb=_0x2c73d8+(_0x45cafb=='?'?'':'&'),_0x1ca265=_0x6cdab9+'end_time='+_0x38c517[_0xf3009d(0x16c)];else{_0x24c1ce=_0x24c1ce+_0xf3009d(0x152)+_0x4ea962[_0xf3009d(0x126)];if(_0x4ea962[_0xf3009d(0x16c)]){if('GnjWO'!==_0xf3009d(0x123))return{'result':_0x516616[_0xf3009d(0x133)],'body':_0x1c943d};else _0x24c1ce=_0x24c1ce+'&'+_0xf3009d(0x16c)+_0x4ea962['end_time'];}}}else _0x4ea962[_0xf3009d(0x16c)]&&(_0x24c1ce=_0x24c1ce+_0xf3009d(0xfe)+_0x4ea962[_0xf3009d(0x16c)]);}}return await this['executeGetRequest']('',_0x24c1ce,_0x406698||undefined);}async['getCoins'](_0x7d9bd2,_0x36ad1c){const _0x8421d1=a6_0x5bcf5a;let _0x2f220a=this[_0x8421d1(0x164)](_0x7d9bd2),_0x541ec1=_0x8421d1(0x10f),_0x9f6d2f=_0x2f220a[_0x8421d1(0xa1)]+_0x8421d1(0xe2)+_0x541ec1;const _0x2bb833=a6_0x3966f8[_0x8421d1(0x12b)](_0x8421d1(0x125),this['apiSecret'])[_0x8421d1(0xd1)](_0x9f6d2f)['digest'](_0x8421d1(0x16e));return _0x2f220a[_0x8421d1(0x9f)]=_0x2bb833,await this[_0x8421d1(0xdc)](_0x2f220a,_0x541ec1,_0x36ad1c||undefined);}async[a6_0x5bcf5a(0x14a)](_0x6f970c,_0x51aa0f){const _0x4c24fa=a6_0x5bcf5a;return await this[_0x4c24fa(0xd6)](_0x6f970c,_0x51aa0f||undefined);}async[a6_0x5bcf5a(0xd6)](_0x4d62bc,_0x1aa4bc){const _0x15231e=a6_0x5bcf5a;let _0x526076=this[_0x15231e(0x164)](_0x4d62bc),_0x289053;if(_0x4d62bc&&_0x4d62bc[_0x15231e(0x15f)]){_0x289053=_0x4d62bc[_0x15231e(0x15f)];if(!_0x289053['constructor'][_0x15231e(0xbe)]()[_0x15231e(0x158)](_0x15231e(0xcc))>0x1)throw'parameter\x20must\x20be\x20an\x20array\x20of\x20tokens';}let _0x1460ad='wallet/balances',_0x40a317=_0x526076['FTXUS-TS']+'GET/api/'+_0x1460ad;const _0x507f99=a6_0x3966f8[_0x15231e(0x12b)](_0x15231e(0x125),this[_0x15231e(0xeb)])[_0x15231e(0xd1)](_0x40a317)[_0x15231e(0x110)]('hex');_0x526076['FTXUS-SIGN']=_0x507f99;let _0x55668a=await this[_0x15231e(0xdc)](_0x526076,_0x1460ad,_0x1aa4bc||undefined),_0x2301c5=new Array();if(_0x289053){if(_0x15231e(0xaf)!==_0x15231e(0xaf))throw _0x15231e(0x128);else{if(_0x55668a[_0x15231e(0x133)]&&_0x55668a[_0x15231e(0x133)][_0x15231e(0x114)])for(let _0x4a35dd=0x0;_0x4a35dd<_0x55668a[_0x15231e(0x133)][_0x15231e(0x114)][_0x15231e(0xe5)];_0x4a35dd++){let _0xf7d74b=_0x55668a[_0x15231e(0x133)][_0x15231e(0x114)][_0x4a35dd][_0x15231e(0x154)];if(_0x289053['includes'](_0xf7d74b)){if(_0x15231e(0xb2)===_0x15231e(0x118))return _0x27a17b[_0x15231e(0x133)];else _0x2301c5[_0x15231e(0xd7)](_0x55668a[_0x15231e(0x133)][_0x15231e(0x114)][_0x4a35dd]);}}}}else _0x2301c5=_0x55668a[_0x15231e(0x133)];return _0x2301c5;}async[a6_0x5bcf5a(0xc6)](_0x153c81,_0x54f408){const _0x1237fd=a6_0x5bcf5a;let _0x2665c4=this[_0x1237fd(0x164)](_0x153c81),_0x555edb='wallet/all_balances',_0x187aa4=_0x2665c4[_0x1237fd(0xa1)]+'GET/api/'+_0x555edb;const _0x27347e=a6_0x3966f8[_0x1237fd(0x12b)](_0x1237fd(0x125),this['apiSecret'])[_0x1237fd(0xd1)](_0x187aa4)[_0x1237fd(0x110)](_0x1237fd(0x16e));return _0x2665c4[_0x1237fd(0x9f)]=_0x27347e,await this[_0x1237fd(0xdc)](_0x2665c4,_0x555edb,_0x54f408||undefined);}async['getOpenOrders'](_0x1c0832,_0x256ecb){const _0x5af02b=a6_0x5bcf5a;let _0x2e0bd0=this[_0x5af02b(0x164)](),_0x1f8f04=_0x5af02b(0x101);_0x1c0832&&(_0x1f8f04=_0x1f8f04+'?market='+_0x1c0832);let _0x18f7cf=_0x2e0bd0[_0x5af02b(0xa1)]+_0x5af02b(0xe2)+_0x1f8f04;const _0x79240e=a6_0x3966f8[_0x5af02b(0x12b)]('sha256',this[_0x5af02b(0xeb)])[_0x5af02b(0xd1)](_0x18f7cf)[_0x5af02b(0x110)](_0x5af02b(0x16e));return _0x2e0bd0[_0x5af02b(0x9f)]=_0x79240e,await this[_0x5af02b(0xdc)](_0x2e0bd0,_0x1f8f04,_0x256ecb||undefined);}async['getOrderHistory'](_0x5d8c09,_0x191247){const _0x252960=a6_0x5bcf5a;let _0x4befdb=this[_0x252960(0x164)](),_0x1b257d=_0x252960(0x15c),_0x36d946=Object['entries'](_0x5d8c09)[_0x252960(0x13b)](_0x1bf988=>_0x1bf988[_0x252960(0x111)]('='));_0x36d946[_0x252960(0xe5)]>0x0&&(_0x1b257d=_0x1b257d+'?',_0x1b257d=_0x1b257d+_0x36d946[_0x252960(0x111)]('&'));let _0x464394=_0x1b257d,_0xc7d9ab=_0x4befdb[_0x252960(0xa1)]+_0x252960(0xe2)+_0x1b257d;const _0x1adc38=a6_0x3966f8[_0x252960(0x12b)](_0x252960(0x125),this['apiSecret'])['update'](_0xc7d9ab)[_0x252960(0x110)](_0x252960(0x16e));return _0x4befdb[_0x252960(0x9f)]=_0x1adc38,await this[_0x252960(0xdc)](_0x4befdb,_0x464394,_0x191247||undefined);}async[a6_0x5bcf5a(0x11e)](_0x420e46,_0x542ce1){const _0x5b85cf=a6_0x5bcf5a;_0x420e46=_0x420e46||{};let _0x20482b=this[_0x5b85cf(0x164)](),_0x12a907=_0x5b85cf(0x169),_0x27fe86=Object[_0x5b85cf(0x170)](_0x420e46)[_0x5b85cf(0x13b)](_0x1e94b8=>_0x1e94b8[_0x5b85cf(0x111)]('='));_0x27fe86[_0x5b85cf(0xe5)]>0x0&&(_0x12a907=_0x12a907+'?',_0x12a907=_0x12a907+_0x27fe86[_0x5b85cf(0x111)]('&'));let _0x4f6bcf=_0x12a907,_0x3290ca=_0x20482b['FTXUS-TS']+'GET/api/'+_0x4f6bcf;const _0x69f426=a6_0x3966f8['Hmac'](_0x5b85cf(0x125),this[_0x5b85cf(0xeb)])[_0x5b85cf(0xd1)](_0x3290ca)[_0x5b85cf(0x110)](_0x5b85cf(0x16e));return _0x20482b[_0x5b85cf(0x9f)]=_0x69f426,await this[_0x5b85cf(0xdc)](_0x20482b,_0x4f6bcf,_0x542ce1||undefined);}async[a6_0x5bcf5a(0xf4)](_0xde8882,_0x3c8601){const _0x3d2168=a6_0x5bcf5a;let _0x59a820=this['createGetHeader']();if(!_0xde8882||!_0xde8882['orderId']){if(_0x3d2168(0x143)===_0x3d2168(0x143))throw _0x3d2168(0x128);else _0x436075=_0x4d8645+(_0x2cf2aa=='?'?'':'&'),_0x298e13=_0x1ea29e+_0x3d2168(0xbb)+_0x5088ee[_0x3d2168(0x100)];}let _0x25d165=_0x3d2168(0xfb)+_0xde8882[_0x3d2168(0xaa)]+_0x3d2168(0x12d),_0x2662f8=_0x25d165,_0x1d06d1=_0x59a820[_0x3d2168(0xa1)]+_0x3d2168(0xe2)+_0x2662f8;const _0x533eae=a6_0x3966f8[_0x3d2168(0x12b)](_0x3d2168(0x125),this['apiSecret'])[_0x3d2168(0xd1)](_0x1d06d1)[_0x3d2168(0x110)](_0x3d2168(0x16e));return _0x59a820[_0x3d2168(0x9f)]=_0x533eae,await this[_0x3d2168(0xdc)](_0x59a820,_0x2662f8,_0x3c8601||undefined);}async['getTriggerOrderHistory'](_0x3072a1,_0x3ad787){const _0x4581ea=a6_0x5bcf5a;let _0xd7b5c4=this[_0x4581ea(0x164)](),_0x22aced='?';_0x3072a1=_0x3072a1||{};_0x3072a1['market']&&(_0x22aced=_0x22aced+_0x4581ea(0xa0)+_0x3072a1[_0x4581ea(0x165)]);_0x3072a1[_0x4581ea(0x126)]&&(_0x4581ea(0xec)===_0x4581ea(0xec)?(_0x22aced=_0x22aced+(_0x22aced=='?'?'':'&'),_0x22aced=_0x22aced+'start_time='+_0x3072a1[_0x4581ea(0x126)]):_0x4cfc6e[_0x4581ea(0xf6)]={'target':this[_0x4581ea(0xf8)],'uri':_0x4e6657[_0x4581ea(0xf8)]});_0x3072a1['end_time']&&(_0x22aced=_0x22aced+(_0x22aced=='?'?'':'&'),_0x22aced=_0x22aced+_0x4581ea(0xfe)+_0x3072a1[_0x4581ea(0x16c)]);if(_0x3072a1[_0x4581ea(0x100)]){if(_0x4581ea(0x13d)!==_0x4581ea(0x13d)){if(!_0x18fa7b['key']||!_0x52b2ef['secret']||_0x57494f[_0x4581ea(0xb5)]==''||_0x3c8bf8[_0x4581ea(0xa2)]=='')throw _0x4581ea(0xf7);this[_0x4581ea(0x146)]=_0x18bb9f[_0x4581ea(0xb5)],this['apiSecret']=_0xbaad3b[_0x4581ea(0xa2)],this[_0x4581ea(0xb1)]=_0x3e083b[_0x4581ea(0x9b)]==_0x348bff,this[_0x4581ea(0x9b)]=this[_0x4581ea(0xb1)]?'':_0xd84c0e[_0x4581ea(0x9b)];}else _0x22aced=_0x22aced+(_0x22aced=='?'?'':'&'),_0x22aced=_0x22aced+_0x4581ea(0xbb)+_0x3072a1[_0x4581ea(0x100)];}if(_0x3072a1[_0x4581ea(0x10c)]){if('pumgl'==='klmrF')throw _0x4581ea(0xad);else _0x22aced=_0x22aced+(_0x22aced=='?'?'':'&'),_0x22aced=_0x22aced+_0x4581ea(0xdb)+_0x3072a1[_0x4581ea(0x10c)];}if(_0x3072a1[_0x4581ea(0x147)]){if('XEmSS'===_0x4581ea(0x9d))_0x22aced=_0x22aced+(_0x22aced=='?'?'':'&'),_0x22aced=_0x22aced+'orderType='+_0x3072a1[_0x4581ea(0x147)];else throw'requires\x20orderId';}let _0x1c95ff=_0x4581ea(0x134)+(_0x22aced=='?'?'':_0x22aced),_0x1423b1=_0xd7b5c4['FTXUS-TS']+_0x4581ea(0xe2)+_0x1c95ff;const _0x967679=a6_0x3966f8[_0x4581ea(0x12b)](_0x4581ea(0x125),this[_0x4581ea(0xeb)])['update'](_0x1423b1)[_0x4581ea(0x110)](_0x4581ea(0x16e));return _0xd7b5c4[_0x4581ea(0x9f)]=_0x967679,await this[_0x4581ea(0xdc)](_0xd7b5c4,_0x1c95ff,_0x3ad787||undefined);}['createPlaceBody'](_0x367afa){const _0x58da8b=a6_0x5bcf5a;let _0x3c1e17=_0x367afa;return _0x3c1e17[_0x58da8b(0x10c)]=='market'&&(_0x3c1e17[_0x58da8b(0x163)]=null),_0x3c1e17;}async[a6_0x5bcf5a(0x117)](_0x4d62d3,_0x2dea94){const _0x1fdb60=a6_0x5bcf5a;let _0x137f15=this['createPostHeader'](_0x4d62d3),_0x173cfc=this[_0x1fdb60(0x168)](_0x4d62d3),_0x5824ba=_0x1fdb60(0x101),_0x1e5946=_0x137f15[_0x1fdb60(0xa1)]+_0x1fdb60(0x13c)+_0x1fdb60(0xd4)+_0x5824ba+JSON[_0x1fdb60(0x122)](_0x173cfc);const _0x31bb76=a6_0x3966f8[_0x1fdb60(0x12b)](_0x1fdb60(0x125),this[_0x1fdb60(0xeb)])[_0x1fdb60(0xd1)](_0x1e5946)[_0x1fdb60(0x110)](_0x1fdb60(0x16e));_0x137f15[_0x1fdb60(0x9f)]=_0x31bb76,await this[_0x1fdb60(0x10d)](_0x137f15,_0x173cfc,_0x5824ba,_0x2dea94||undefined);}[a6_0x5bcf5a(0xe1)](_0x3cafe7){let _0x5312d5=_0x3cafe7;return _0x5312d5;}async[a6_0x5bcf5a(0x159)](_0x87ef27,_0x5cba12){const _0x444edc=a6_0x5bcf5a;let _0x21a6a9=this['createPostHeader'](_0x87ef27),_0x1798e0=this[_0x444edc(0xe1)](_0x87ef27),_0x4cc153=_0x444edc(0x169),_0x2a382e=_0x21a6a9[_0x444edc(0xa1)]+_0x444edc(0x13c)+_0x444edc(0xd4)+_0x4cc153+JSON[_0x444edc(0x122)](_0x1798e0);const _0x216f1e=a6_0x3966f8[_0x444edc(0x12b)](_0x444edc(0x125),this['apiSecret'])[_0x444edc(0xd1)](_0x2a382e)[_0x444edc(0x110)](_0x444edc(0x16e));_0x21a6a9[_0x444edc(0x9f)]=_0x216f1e,await this[_0x444edc(0x10d)](_0x21a6a9,_0x1798e0,_0x4cc153,_0x5cba12||undefined);}async[a6_0x5bcf5a(0xac)](_0x6234a,_0x4cfd42){const _0x4afa82=a6_0x5bcf5a;if(!_0x6234a||!_0x6234a[_0x4afa82(0xaa)])throw'requires\x20orderId';let _0x4200ea=this[_0x4afa82(0x113)](_0x6234a),_0x43a484=_0x4afa82(0xfb)+_0x6234a[_0x4afa82(0xaa)],_0x37eebb=_0x4200ea[_0x4afa82(0xa1)]+_0x4afa82(0xc1)+_0x4afa82(0xd4)+_0x43a484+(_0x6234a?JSON[_0x4afa82(0x122)](_0x6234a):'');const _0x47d06c=a6_0x3966f8['Hmac'](_0x4afa82(0x125),this[_0x4afa82(0xeb)])[_0x4afa82(0xd1)](_0x37eebb)[_0x4afa82(0x110)](_0x4afa82(0x16e));return _0x4200ea['FTXUS-SIGN']=_0x47d06c,await this['deleteRequest'](_0x4200ea,_0x6234a,_0x43a484,_0x4cfd42||undefined);}async[a6_0x5bcf5a(0x14e)](_0x5b3d75,_0x5f4c0d){const _0x4e4bd9=a6_0x5bcf5a;let _0x34dfc2=this[_0x4e4bd9(0x113)](_0x5b3d75),_0x562972=_0x4e4bd9(0x101),_0x292d76=_0x34dfc2[_0x4e4bd9(0xa1)]+_0x4e4bd9(0xc1)+_0x4e4bd9(0xd4)+_0x562972+(_0x5b3d75?JSON['stringify'](_0x5b3d75):'');const _0x492615=a6_0x3966f8[_0x4e4bd9(0x12b)](_0x4e4bd9(0x125),this['apiSecret'])[_0x4e4bd9(0xd1)](_0x292d76)[_0x4e4bd9(0x110)](_0x4e4bd9(0x16e));return _0x34dfc2['FTXUS-SIGN']=_0x492615,await this[_0x4e4bd9(0xde)](_0x34dfc2,_0x5b3d75,_0x562972,_0x5f4c0d||undefined);}async[a6_0x5bcf5a(0x161)](_0x397672,_0x5a6da9){const _0x4932f5=a6_0x5bcf5a;if(!_0x397672||!_0x397672['orderId']){if(_0x4932f5(0xd3)!=='bAtFM')_0x2a372e=_0x369080+'&'+'end_time='+_0x19f948[_0x4932f5(0x16c)];else throw _0x4932f5(0x128);}if(!_0x397672[_0x4932f5(0x10e)]&&!_0x397672[_0x4932f5(0x163)]){if(_0x4932f5(0x104)!==_0x4932f5(0xa8))throw _0x4932f5(0x136);else{_0x3a34da=_0x585cb7+'&';if(_0xbc72e8[_0x4932f5(0x126)])_0x5a1f2c=_0x56ca74+_0x4932f5(0x152)+_0x5e3189[_0x4932f5(0x126)],_0x268e05[_0x4932f5(0x16c)]&&(_0x417c4b=_0x1deaaf+'&'+_0x4932f5(0x16c)+_0x31977f[_0x4932f5(0x16c)]);else _0x4e3867['end_time']&&(_0x56dcf8=_0x2ba62c+_0x4932f5(0xfe)+_0x5d58e5[_0x4932f5(0x16c)]);}}let _0x1cf6a1=_0x397672,_0x5c905f=this[_0x4932f5(0x113)](_0x397672),_0x56cb03='orders/'+_0x397672[_0x4932f5(0xaa)]+'/modify';delete _0x397672[_0x4932f5(0xaa)];let _0x2b19d2=_0x5c905f[_0x4932f5(0xa1)]+'POST'+_0x4932f5(0xd4)+_0x56cb03+JSON['stringify'](_0x1cf6a1);const _0xbfa176=a6_0x3966f8[_0x4932f5(0x12b)]('sha256',this[_0x4932f5(0xeb)])[_0x4932f5(0xd1)](_0x2b19d2)[_0x4932f5(0x110)]('hex');return _0x5c905f[_0x4932f5(0x9f)]=_0xbfa176,await this[_0x4932f5(0x10d)](_0x5c905f,_0x1cf6a1,_0x56cb03,_0x5a6da9||undefined);}async[a6_0x5bcf5a(0x12c)](_0x1263aa,_0x33c45d){const _0x3db5af=a6_0x5bcf5a;if(!_0x1263aa||!_0x1263aa[_0x3db5af(0x13e)]){if(_0x3db5af(0x149)===_0x3db5af(0x119))_0x3683ad&&(_0x183556[_0x3db5af(0x133)]=_0x30e73b);else throw _0x3db5af(0x16f);}if(!_0x1263aa[_0x3db5af(0x10e)]&&!_0x1263aa[_0x3db5af(0x163)])throw'requires\x20price\x20or\x20size\x20or\x20both';let _0x325ddf=_0x1263aa,_0x5a9966=this['createPostHeader'](_0x325ddf),_0x5ea9ec='orders/by_client_id/'+_0x325ddf['clientId']+_0x3db5af(0x150);delete _0x325ddf[_0x3db5af(0x13e)];let _0x44d9a3=_0x5a9966[_0x3db5af(0xa1)]+_0x3db5af(0x13c)+_0x3db5af(0xd4)+_0x5ea9ec+JSON[_0x3db5af(0x122)](_0x325ddf);const _0x586829=a6_0x3966f8['Hmac'](_0x3db5af(0x125),this[_0x3db5af(0xeb)])[_0x3db5af(0xd1)](_0x44d9a3)[_0x3db5af(0x110)]('hex');return _0x5a9966[_0x3db5af(0x9f)]=_0x586829,await this[_0x3db5af(0x10d)](_0x5a9966,_0x325ddf,_0x5ea9ec,_0x33c45d||undefined);}[a6_0x5bcf5a(0xc9)](_0x35c596){const _0x2ead2b=a6_0x5bcf5a;let _0x441043=_0x35c596;return delete _0x35c596[_0x2ead2b(0x138)],_0x441043;}async[a6_0x5bcf5a(0x106)](_0x48f402,_0x59c4d5){const _0x2068c5=a6_0x5bcf5a;let _0x229ec1=_0x48f402,_0x55f42f=_0x229ec1[_0x2068c5(0xaa)];delete _0x229ec1[_0x2068c5(0xaa)];let _0x1d7b86=this[_0x2068c5(0x113)](_0x229ec1),_0x1c3f1b=_0x2068c5(0xfb)+_0x55f42f+_0x2068c5(0x150),_0x46c223=_0x1d7b86[_0x2068c5(0xa1)]+_0x2068c5(0x13c)+_0x2068c5(0xd4)+_0x1c3f1b+JSON[_0x2068c5(0x122)](_0x229ec1);const _0x2503ca=a6_0x3966f8[_0x2068c5(0x12b)](_0x2068c5(0x125),this[_0x2068c5(0xeb)])[_0x2068c5(0xd1)](_0x46c223)['digest'](_0x2068c5(0x16e));return _0x1d7b86[_0x2068c5(0x9f)]=_0x2503ca,await this[_0x2068c5(0x10d)](_0x1d7b86,_0x229ec1,_0x1c3f1b,_0x59c4d5||undefined);}async[a6_0x5bcf5a(0xa6)](_0x373d80,_0x40aff1){const _0x46592d=a6_0x5bcf5a;let _0x1f8019=this['createGetHeader']();if(!_0x373d80||!_0x373d80[_0x46592d(0xaa)])throw _0x46592d(0x128);let _0x1ab6d5=_0x46592d(0x14c)+_0x373d80[_0x46592d(0xaa)],_0x39001c=_0x1f8019[_0x46592d(0xa1)]+_0x46592d(0xe2)+_0x1ab6d5;const _0x59ba6a=a6_0x3966f8[_0x46592d(0x12b)](_0x46592d(0x125),this['apiSecret'])[_0x46592d(0xd1)](_0x39001c)[_0x46592d(0x110)](_0x46592d(0x16e));return _0x1f8019[_0x46592d(0x9f)]=_0x59ba6a,await this['executeGetRequest'](_0x1f8019,_0x1ab6d5,_0x40aff1||undefined);}async[a6_0x5bcf5a(0x141)](_0x4a4241,_0x33e86d){const _0x4447e6=a6_0x5bcf5a;if(!_0x4a4241||!_0x4a4241['clientId'])throw _0x4447e6(0x16f);let _0x2fd223=this[_0x4447e6(0x164)](),_0x40665d='orders/by_client_id/'+_0x4a4241['clientId'],_0x2367f6=_0x2fd223[_0x4447e6(0xa1)]+_0x4447e6(0xe2)+_0x40665d;const _0x55ef87=a6_0x3966f8[_0x4447e6(0x12b)]('sha256',this[_0x4447e6(0xeb)])[_0x4447e6(0xd1)](_0x2367f6)[_0x4447e6(0x110)](_0x4447e6(0x16e));return _0x2fd223[_0x4447e6(0x9f)]=_0x55ef87,await this[_0x4447e6(0xdc)](_0x2fd223,_0x40665d,_0x33e86d||undefined);}async['cancelOrder'](_0x1b5d8e,_0x5a88da){const _0x2a9787=a6_0x5bcf5a;if(!_0x1b5d8e||!_0x1b5d8e[_0x2a9787(0xaa)]){if(_0x2a9787(0xdf)!==_0x2a9787(0x124))throw _0x2a9787(0x128);else{let _0x115511=_0x1aba14;return _0x115511;}}let _0x2e7b28=this[_0x2a9787(0x113)](_0x1b5d8e),_0x3e2094=_0x2a9787(0x14c)+_0x1b5d8e[_0x2a9787(0xaa)],_0x16fd7c=_0x2e7b28[_0x2a9787(0xa1)]+'DELETE'+_0x2a9787(0xd4)+_0x3e2094+(_0x1b5d8e?JSON[_0x2a9787(0x122)](_0x1b5d8e):'');const _0x261ddd=a6_0x3966f8[_0x2a9787(0x12b)](_0x2a9787(0x125),this['apiSecret'])[_0x2a9787(0xd1)](_0x16fd7c)[_0x2a9787(0x110)]('hex');return _0x2e7b28[_0x2a9787(0x9f)]=_0x261ddd,await this[_0x2a9787(0xde)](_0x2e7b28,_0x1b5d8e,_0x3e2094,_0x5a88da||undefined);}async[a6_0x5bcf5a(0x15b)](_0x13e19d,_0x201c23){const _0x3066f3=a6_0x5bcf5a;if(!_0x13e19d||!_0x13e19d[_0x3066f3(0x13e)])throw _0x3066f3(0x16f);let _0x3e8281=this[_0x3066f3(0x113)](_0x13e19d),_0x2dc6c2=_0x3066f3(0xf2)+_0x13e19d[_0x3066f3(0x13e)],_0x287e12=_0x3e8281['FTXUS-TS']+_0x3066f3(0xc1)+'/api/'+_0x2dc6c2+(_0x13e19d?JSON[_0x3066f3(0x122)](_0x13e19d):'');const _0x1e0972=a6_0x3966f8[_0x3066f3(0x12b)](_0x3066f3(0x125),this[_0x3066f3(0xeb)])[_0x3066f3(0xd1)](_0x287e12)[_0x3066f3(0x110)](_0x3066f3(0x16e));return _0x3e8281[_0x3066f3(0x9f)]=_0x1e0972,await this['deleteRequest'](_0x3e8281,_0x13e19d,_0x2dc6c2,_0x201c23||undefined);}async[a6_0x5bcf5a(0x15e)](_0x3b7d14,_0x1452de){const _0x2b3bbd=a6_0x5bcf5a;let _0x25a664=this[_0x2b3bbd(0x164)](),_0x155df6='?';if(_0x3b7d14['market']){if('gvnFH'===_0x2b3bbd(0xe8))_0x155df6=_0x155df6+_0x2b3bbd(0xa0)+_0x3b7d14[_0x2b3bbd(0x165)];else throw _0x2b3bbd(0xc3);}_0x3b7d14[_0x2b3bbd(0x126)]&&(_0x155df6=_0x155df6+(_0x155df6=='?'?'':'&'),_0x155df6=_0x155df6+_0x2b3bbd(0x152)+_0x3b7d14[_0x2b3bbd(0x126)]);if(_0x3b7d14[_0x2b3bbd(0x16c)]){if(_0x2b3bbd(0xbd)!=='YNBBf')_0x155df6=_0x155df6+(_0x155df6=='?'?'':'&'),_0x155df6=_0x155df6+'end_time='+_0x3b7d14['end_time'];else{let _0x4c8774=_0x3a48e4[_0x2b3bbd(0x133)][_0x2b3bbd(0x114)][_0x1ecee3][_0x2b3bbd(0x154)];_0x5e3120[_0x2b3bbd(0x15d)](_0x4c8774)&&_0x41ce53['push'](_0xd7e1e5[_0x2b3bbd(0x133)][_0x2b3bbd(0x114)][_0x2ceeb2]);}}_0x3b7d14[_0x2b3bbd(0xa4)]&&(_0x2b3bbd(0xa3)!==_0x2b3bbd(0xa3)?_0x428b72={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0xf41ba7,'FTXUS-SUBACCOUNT':_0x1e5f13[_0x2b3bbd(0x9b)]}:(_0x155df6=_0x155df6+(_0x155df6=='?'?'':'&'),_0x155df6=_0x155df6+'order='+_0x3b7d14['order']));_0x3b7d14[_0x2b3bbd(0xaa)]&&('QzYLW'!=='wsAgo'?(_0x155df6=_0x155df6+(_0x155df6=='?'?'':'&'),_0x155df6=_0x155df6+_0x2b3bbd(0x102)+_0x3b7d14[_0x2b3bbd(0xaa)]):(_0x5825a8[_0x2b3bbd(0xf6)][_0x2b3bbd(0xf1)]=this[_0x2b3bbd(0xf8)],_0x385f98[_0x2b3bbd(0x14d)]='http://'+this[_0x2b3bbd(0xc0)]+':'+this['proxyPort']));let _0x1a74e8=_0x2b3bbd(0xda)+(_0x155df6=='?'?'':_0x155df6),_0x25c4e=_0x25a664[_0x2b3bbd(0xa1)]+_0x2b3bbd(0xe2)+_0x1a74e8;const _0x23dc5f=a6_0x3966f8[_0x2b3bbd(0x12b)](_0x2b3bbd(0x125),this[_0x2b3bbd(0xeb)])[_0x2b3bbd(0xd1)](_0x25c4e)['digest'](_0x2b3bbd(0x16e));return _0x25a664[_0x2b3bbd(0x9f)]=_0x23dc5f,await this[_0x2b3bbd(0xdc)](_0x25a664,_0x1a74e8,_0x1452de||undefined);}}
const a6_0x354e6f=a6_0x59af;(function(_0x406276,_0x193547){const _0x5928a4=a6_0x59af,_0x6e504e=_0x406276();while(!![]){try{const _0x5b2f5a=parseInt(_0x5928a4(0x29f))/0x1*(parseInt(_0x5928a4(0x291))/0x2)+-parseInt(_0x5928a4(0x222))/0x3*(parseInt(_0x5928a4(0x263))/0x4)+-parseInt(_0x5928a4(0x29a))/0x5+parseInt(_0x5928a4(0x244))/0x6*(parseInt(_0x5928a4(0x29b))/0x7)+-parseInt(_0x5928a4(0x1f5))/0x8*(-parseInt(_0x5928a4(0x2ac))/0x9)+parseInt(_0x5928a4(0x1fd))/0xa*(parseInt(_0x5928a4(0x254))/0xb)+-parseInt(_0x5928a4(0x24c))/0xc;if(_0x5b2f5a===_0x193547)break;else _0x6e504e['push'](_0x6e504e['shift']());}catch(_0x3a1f0f){_0x6e504e['push'](_0x6e504e['shift']());}}}(a6_0x19b8,0x204d1));function a6_0x59af(_0x3bca3c,_0x5b1d95){const _0x19b8a2=a6_0x19b8();return a6_0x59af=function(_0x59afa6,_0x526e9e){_0x59afa6=_0x59afa6-0x1ee;let _0x590800=_0x19b8a2[_0x59afa6];return _0x590800;},a6_0x59af(_0x3bca3c,_0x5b1d95);}import a6_0x1aea5e from'axios';import a6_0x54c7cd from'crypto';function a6_0x19b8(){const _0x2ffed0=['DELETE','getOrderHistory','/api/','coin','subaccounts/','xcOgz','enc','market','cancelOrder','orderId=','/trades','312ziwfVf','modifyOrder','hex','/balances','FTXUS-SIGN','createSubaccount','auystrAAS2iW85#s2@jdDC','uHvUS','3482328GEDGlw','wallet/all_balances','size','start_time=','toString','deleteSubaccountData','Array','cBgdw','231oqXlrM','orderType=','subaccounts','dypER','KWNfe','BeMII','cGiGB','bgBof','conditional_orders/history','orders/','side=','Hmac','requires\x20clientId','getOpenOrders','nickname','520yWRNWt','balancer','getTriggerOrderHistory','createTriggerBody','start_time','parameter\x20must\x20be\x20an\x20array\x20of\x20tokens','qYYkR','exchangename','EXlST','gQKzM','apiSecret','getAllBalances','XzPDJ','getHistoricalPrices','sockets','createPostHeader','deleteRequest','markets/','order_id','getAllSubaccounts','DAKmH','DBnqG','stringify','Base64','wallet/balances','wallet/coins','TpdqD','subaccounts/transfer','tokens','getOrderStatusByClientId','getMarkets','WitXH','rOsOQ','getMarket','jNavm','update','result','requires\x20orderId','ewIqS','/proxy/post','sha256','url','useProxy','QKEXg','getOpenTriggerOrders','body','31134dZYffq','transferBetweenSubaccounts','modifyTriggerOrderBody','FTXUS-TS','tCMKC','target','/proxy/delete','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','publicApis','544105tkIjey','34279YwTFDy','push','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','KasNe','4yzzYCl','createPlaceBody','baseURL','label','deKKD','?market=','getCoins','NVZFM','orders/by_client_id/','ilDZf','end_time=','proxyPort','now','35244qhyJqw','UduGH','digest','secret','placeOrder','parse','ssroY','hXDax','nRRrC','modifyOrderByClientId','/candles?resolution=','bUWLb','map','uri','executeOrder','conditional_orders','length','bReag','zburd','mFzds','executeGetRequest','decrypt','bNEZn','QYjhP','fRCDj','160oBZyGZ','triggerOrder','GET/api/','resolution','conditional_orders/','baseUrl','changeSubaccountNameBody','getSubaccountBalances','117980sbJsiq','apiKey','authenticate','createGetHeader','getOrderbook','entries','proxy','join','clientId','ggzka','markets','isMain','exchange','createSubaccountBody','PjTjl','http://','BPIUX','getTriggerOrderTriggers','price','data','cancelOrderByClientId','getFills','side','CaObX','/modify','subaccount','headers','key','includes','cancelOpenTriggerOrder','lyQBz2wseWT6vT7XDyp9DQ==','indexOf','depth','getTrades','getOrderStatus','requires\x20price\x20or\x20size\x20or\x20both','ZlXvg','2577RczgXw','dhsyTW5!ysh8IuysQKcG45','/proxy/get','mObGj','orderType','/orderbook','type','XFdGi','JhLYt','orders','subaccounts/update_name','XaXjn','sZfFG','https://ftx.us/api/','GlxwT','tuQas','POST','changeSubaccountName','market_name','end_time','JTuQU','orderId','market='];a6_0x19b8=function(){return _0x2ffed0;};return a6_0x19b8();}import a6_0x30daf4 from'crypto-js';export class FtxUs{[a6_0x354e6f(0x299)]=new Array();['ky']=a6_0x354e6f(0x24a);['i']=a6_0x354e6f(0x223);[a6_0x354e6f(0x271)]={};constructor(_0x406aa1){const _0x555cbe=a6_0x354e6f;this[_0x555cbe(0x28c)]=_0x555cbe(0x22f),this['authenticate']=_0x406aa1[_0x555cbe(0x1ff)]==undefined?!![]:_0x406aa1['authenticate'],this['name']=_0x406aa1['exchange'][_0x555cbe(0x26a)]==undefined?'ftxus':_0x406aa1[_0x555cbe(0x209)][_0x555cbe(0x26a)],this['exchangeid']=_0x406aa1['exchange']['id'],this[_0x555cbe(0x2a2)]=_0x406aa1[_0x555cbe(0x2a2)];if(this['authenticate']){if(_0x555cbe(0x2ad)!=='WAEvO'){if(!_0x406aa1[_0x555cbe(0x218)]||!_0x406aa1[_0x555cbe(0x2af)]||_0x406aa1[_0x555cbe(0x218)]==''||_0x406aa1[_0x555cbe(0x2af)]=='')throw _0x555cbe(0x29d);this[_0x555cbe(0x1fe)]=_0x406aa1[_0x555cbe(0x218)],this['apiSecret']=_0x406aa1[_0x555cbe(0x2af)],this[_0x555cbe(0x208)]=_0x406aa1[_0x555cbe(0x216)]==undefined,this[_0x555cbe(0x216)]=this['isMain']?'':_0x406aa1[_0x555cbe(0x216)];}else return _0x33c6b4;}this[_0x555cbe(0x28d)]=![],this[_0x555cbe(0x264)]=_0x406aa1['balancer']||undefined,_0x406aa1[_0x555cbe(0x28d)]&&((_0x406aa1['proxy']&&_0x406aa1[_0x555cbe(0x203)]!=''||_0x406aa1['balancer']&&_0x406aa1[_0x555cbe(0x264)]!='')&&(_0x555cbe(0x23e)==='nfEPG'?(_0x54234a=_0x3ba940+(_0x187d3b=='?'?'':'&'),_0x1eab7d=_0x521e8b+_0x555cbe(0x2a9)+_0x44c7e4['end_time']):(this['useProxy']=!![],this['proxy']=_0x406aa1[_0x555cbe(0x203)],_0x406aa1[_0x555cbe(0x2aa)]?this[_0x555cbe(0x2aa)]=_0x406aa1[_0x555cbe(0x2aa)]:_0x555cbe(0x253)!==_0x555cbe(0x253)?_0x4ba67c={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0x216b38,'FTXUS-SUBACCOUNT':_0x38bf4d[_0x555cbe(0x216)]}:this['proxyPort']=0xbb8))),this['ri']=_0x555cbe(0x21b),this[_0x555cbe(0x299)][_0x555cbe(0x29c)](_0x555cbe(0x21e),'getHistoricalPrices',_0x555cbe(0x281),_0x555cbe(0x284));}['dec']=_0x862602=>{const _0x50348c=a6_0x354e6f;if(_0x862602==null){if('Hotmt'!==_0x50348c(0x259))return undefined;else _0xe6849f=_0x49853a+'start_time='+_0x20e3f7[_0x50348c(0x267)],_0x2e88b1[_0x50348c(0x235)]&&(_0x3521c2=_0x4936f6+'&'+_0x50348c(0x2a9)+_0x43aa7c[_0x50348c(0x235)]);}const _0x39ba87=a6_0x30daf4[_0x50348c(0x23f)][_0x50348c(0x27a)][_0x50348c(0x2b1)](this['ky']),_0x217006=a6_0x30daf4[_0x50348c(0x23f)][_0x50348c(0x27a)][_0x50348c(0x2b1)](this['i']);return a6_0x30daf4['AES']['decrypt'](_0x862602,_0x39ba87,{'iv':_0x217006})['toString'](a6_0x30daf4[_0x50348c(0x23f)]['Utf8']);};['createPostHeader'](_0x299f24){const _0x2af3cb=a6_0x354e6f;let _0x1e459f=Date[_0x2af3cb(0x2ab)](),_0x5d07da;if(this[_0x2af3cb(0x208)]&&_0x299f24&&_0x299f24['subaccount'])_0x5d07da={'FTXUS-KEY':this[_0x2af3cb(0x1fe)],'FTXUS-TS':_0x1e459f,'FTXUS-SUBACCOUNT':_0x299f24['subaccount']};else{if(!this[_0x2af3cb(0x208)]&&_0x299f24&&_0x299f24[_0x2af3cb(0x216)]&&_0x299f24[_0x2af3cb(0x216)]==this['subaccount'])_0x5d07da={'FTXUS-KEY':this[_0x2af3cb(0x1fe)],'FTXUS-TS':_0x1e459f,'FTXUS-SUBACCOUNT':_0x299f24[_0x2af3cb(0x216)]};else{if(!this[_0x2af3cb(0x208)]&&(!_0x299f24||!_0x299f24[_0x2af3cb(0x216)]))_0x5d07da={'FTXUS-KEY':this[_0x2af3cb(0x1fe)],'FTXUS-TS':_0x1e459f,'FTXUS-SUBACCOUNT':this[_0x2af3cb(0x216)]};else this['isMain']&&(_0x5d07da={'FTXUS-KEY':this[_0x2af3cb(0x1fe)],'FTXUS-TS':_0x1e459f});}}return _0x5d07da;}['createGetHeader'](_0x3667a5){const _0x17ee9f=a6_0x354e6f;let _0x49c780=Date[_0x17ee9f(0x2ab)](),_0xf60536;if(this[_0x17ee9f(0x208)]&&_0x3667a5&&_0x3667a5[_0x17ee9f(0x216)])_0xf60536={'FTXUS-KEY':this[_0x17ee9f(0x1fe)],'FTXUS-TS':_0x49c780,'FTXUS-SUBACCOUNT':_0x3667a5[_0x17ee9f(0x216)]};else{if(!this[_0x17ee9f(0x208)]&&_0x3667a5&&_0x3667a5['subaccount']&&_0x3667a5[_0x17ee9f(0x216)]==this['subaccount']){if(_0x17ee9f(0x26f)!=='OwvOU')_0xf60536={'FTXUS-KEY':this[_0x17ee9f(0x1fe)],'FTXUS-TS':_0x49c780,'FTXUS-SUBACCOUNT':_0x3667a5['subaccount']};else throw'No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters';}else{if(!this[_0x17ee9f(0x208)]&&(!_0x3667a5||!_0x3667a5[_0x17ee9f(0x216)]))'bNEZn'===_0x17ee9f(0x1f2)?_0xf60536={'FTXUS-KEY':this[_0x17ee9f(0x1fe)],'FTXUS-TS':_0x49c780,'FTXUS-SUBACCOUNT':this['subaccount']}:(_0x1a1dda[_0x17ee9f(0x217)][_0x17ee9f(0x1fa)]=this[_0x17ee9f(0x28c)],_0x24ba7f[_0x17ee9f(0x2a1)]='http://'+this[_0x17ee9f(0x264)]+':'+this[_0x17ee9f(0x2aa)]);else this[_0x17ee9f(0x208)]&&(_0x17ee9f(0x28e)==='XruFI'?(_0x2696d8[_0x17ee9f(0x217)]['target']=this[_0x17ee9f(0x28c)],_0x3580f1[_0x17ee9f(0x217)][_0x17ee9f(0x2b9)]=_0x234abd[_0x17ee9f(0x28c)],_0x2ae639[_0x17ee9f(0x217)][_0x17ee9f(0x290)]=_0x298ad9):_0xf60536={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0x49c780});}}return _0xf60536;}async[a6_0x354e6f(0x2ba)](_0x39d929,_0x2c2a3a,_0x2abcc9,_0x132d67){const _0x366145=a6_0x354e6f;let _0x19cdc3={'baseURL':this[_0x366145(0x28c)],'url':_0x2abcc9,'method':_0x366145(0x232),'headers':_0x39d929};const _0x490cce=_0x2c2a3a?JSON['stringify'](_0x2c2a3a):'';if(this[_0x366145(0x28d)]){if(_0x366145(0x1f3)===_0x366145(0x258)){let _0x4c9dfb=_0x17ecee[_0x366145(0x210)][_0x366145(0x287)][_0x3ebfc6][_0x366145(0x23c)];_0x2c9845['includes'](_0x4c9dfb)&&_0x3b0a51[_0x366145(0x29c)](_0x2a596[_0x366145(0x210)]['result'][_0x5d0427]);}else _0x39d929==''?_0x19cdc3[_0x366145(0x217)]={'target':this[_0x366145(0x28c)],'uri':_0x19cdc3[_0x366145(0x28c)],'body':_0x490cce}:(_0x19cdc3['headers']['target']=this[_0x366145(0x28c)],_0x19cdc3[_0x366145(0x217)][_0x366145(0x2b9)]=_0x19cdc3[_0x366145(0x28c)],_0x19cdc3[_0x366145(0x217)][_0x366145(0x290)]=_0x490cce),this[_0x366145(0x264)]?(_0x19cdc3[_0x366145(0x217)][_0x366145(0x1fa)]=this['url'],_0x19cdc3[_0x366145(0x2a1)]=_0x366145(0x20c)+this[_0x366145(0x264)]+':'+this[_0x366145(0x2aa)]):_0x19cdc3[_0x366145(0x2a1)]=_0x366145(0x20c)+this['proxy']+':'+this['proxyPort'],_0x19cdc3[_0x366145(0x28c)]=_0x366145(0x28a);}else _0x366145(0x25b)===_0x366145(0x2b2)?_0x593bc4[_0x366145(0x29c)](_0x1a1374[_0x366145(0x210)]['result'][_0x4bc742]):_0x19cdc3[_0x366145(0x210)]=_0x2c2a3a;try{const _0x1e22b9=await a6_0x1aea5e(_0x19cdc3);if(!_0x1e22b9){if('kHYlp'!==_0x366145(0x20b))throw _0x366145(0x298);else throw'requires\x20orderId';}if(this['useProxy']){let _0x28ebb5=_0x1e22b9[_0x366145(0x210)][_0x366145(0x210)]?_0x1e22b9['data'][_0x366145(0x210)]:_0x1e22b9[_0x366145(0x210)];delete _0x1e22b9[_0x366145(0x210)],_0x1e22b9['data']=_0x28ebb5;}if(_0x132d67&&['1','2','3','4','5','6']['includes'](_0x132d67)){if('qYYkR'===_0x366145(0x269))switch(_0x132d67){case'1':if(_0x1e22b9[_0x366145(0x210)][_0x366145(0x210)]){if(_0x366145(0x2a6)===_0x366145(0x2b3))_0x52415d={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0x1d0f04};else return _0x1e22b9[_0x366145(0x210)]['data'];}else return _0x1e22b9[_0x366145(0x210)];break;case'2':return _0x1e22b9[_0x366145(0x210)];break;case'3':return _0x1e22b9;break;case'4':return _0x1e22b9[_0x366145(0x210)][_0x366145(0x210)]?{'result':_0x1e22b9[_0x366145(0x210)][_0x366145(0x210)],'body':_0x2c2a3a}:{'result':_0x1e22b9[_0x366145(0x210)],'body':_0x2c2a3a};break;case'5':return{'result':_0x1e22b9[_0x366145(0x210)],'body':_0x2c2a3a};break;case'6':return{'result':_0x1e22b9,'body':_0x2c2a3a};break;}else _0xb68bf9=_0x15a9ff+(_0x553823=='?'?'':'&'),_0x25b16c=_0x470650+_0x366145(0x25e)+_0x5945c4[_0x366145(0x213)];}if(_0x1e22b9['data'][_0x366145(0x210)]){if(_0x366145(0x277)===_0x366145(0x277))return{'result':_0x1e22b9['data'][_0x366145(0x210)],'body':_0x2c2a3a};else _0x12d22d[_0x366145(0x217)][_0x366145(0x296)]=this[_0x366145(0x28c)],_0x11422c[_0x366145(0x217)][_0x366145(0x2b9)]=_0x48dc52[_0x366145(0x28c)];}else return{'result':_0x1e22b9[_0x366145(0x210)],'body':_0x2c2a3a};}catch(_0x443cb5){return _0x443cb5;}}async[a6_0x354e6f(0x1f0)](_0x14424e,_0x4fc73d,_0x11d32d){const _0x4c5e11=a6_0x354e6f;let _0x2bacf6={'baseURL':this[_0x4c5e11(0x28c)],'url':_0x4fc73d,'method':'GET','headers':_0x14424e};if(this[_0x4c5e11(0x28d)]){if(_0x4c5e11(0x2a3)!==_0x4c5e11(0x2a3)){if(_0x5fc739==null)return _0x3c25ee;const _0x267389=_0x24baeb[_0x4c5e11(0x23f)][_0x4c5e11(0x27a)][_0x4c5e11(0x2b1)](this['ky']),_0x10c72b=_0x4ebfde['enc'][_0x4c5e11(0x27a)][_0x4c5e11(0x2b1)](this['i']);return _0x10b53f['AES'][_0x4c5e11(0x1f1)](_0x5663b2,_0x267389,{'iv':_0x10c72b})[_0x4c5e11(0x250)](_0x4a7b2d[_0x4c5e11(0x23f)]['Utf8']);}else _0x14424e==''?_0x4c5e11(0x289)==='gieim'?_0x17484f={'FTXUS-KEY':this[_0x4c5e11(0x1fe)],'FTXUS-TS':_0x5b670b,'FTXUS-SUBACCOUNT':_0x4e931b[_0x4c5e11(0x216)]}:_0x2bacf6['headers']={'target':this['url'],'uri':_0x2bacf6[_0x4c5e11(0x28c)]}:(_0x2bacf6[_0x4c5e11(0x217)][_0x4c5e11(0x296)]=this[_0x4c5e11(0x28c)],_0x2bacf6[_0x4c5e11(0x217)][_0x4c5e11(0x2b9)]=_0x2bacf6['url']),this[_0x4c5e11(0x264)]?(_0x2bacf6['headers'][_0x4c5e11(0x1fa)]=this['url'],_0x2bacf6['baseURL']=_0x4c5e11(0x20c)+this[_0x4c5e11(0x264)]+':'+this[_0x4c5e11(0x2aa)]):_0x2bacf6[_0x4c5e11(0x2a1)]='http://'+this[_0x4c5e11(0x203)]+':'+this[_0x4c5e11(0x2aa)],_0x2bacf6[_0x4c5e11(0x28c)]=_0x4c5e11(0x224);}try{if(_0x4c5e11(0x214)!=='CaObX')_0x5bf3de={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0x495474};else{const _0x1a1d8f=await a6_0x1aea5e(_0x2bacf6);if(!_0x1a1d8f)throw _0x4c5e11(0x298);if(_0x11d32d&&['1','2','3'][_0x4c5e11(0x219)](_0x11d32d))switch(_0x11d32d){case'1':if(_0x1a1d8f['data']['data']){if(_0x4c5e11(0x2b4)===_0x4c5e11(0x2b4))return _0x1a1d8f[_0x4c5e11(0x210)]['data'];else _0x3395bd[_0x4c5e11(0x217)][_0x4c5e11(0x1fa)]=this[_0x4c5e11(0x28c)],_0x4eb0ed[_0x4c5e11(0x2a1)]=_0x4c5e11(0x20c)+this[_0x4c5e11(0x264)]+':'+this[_0x4c5e11(0x2aa)];}else _0x1a1d8f[_0x4c5e11(0x210)][_0x4c5e11(0x287)]&&_0x1a1d8f[_0x4c5e11(0x210)][_0x4c5e11(0x287)];break;case'2':return _0x1a1d8f['data'];break;case'3':return _0x1a1d8f;break;}if(_0x1a1d8f['data']['data']){if(_0x1a1d8f['data'][_0x4c5e11(0x210)]['result']){if(_0x4c5e11(0x24b)!==_0x4c5e11(0x24b))_0x2f3516=_0x53390c+(_0x20073e=='?'?'':'&'),_0x20f26e=_0x29e4b3+'end_time='+_0x845e92[_0x4c5e11(0x235)];else return _0x1a1d8f[_0x4c5e11(0x210)]['data'][_0x4c5e11(0x287)];}else{if(_0x4c5e11(0x1ee)===_0x4c5e11(0x1ee))return _0x1a1d8f['data']['data'];else _0x294840&&(_0x1ebc56[_0x4c5e11(0x210)]=_0x11b813);}}else{if(_0x1a1d8f[_0x4c5e11(0x210)]['result']){if(_0x4c5e11(0x221)===_0x4c5e11(0x206))throw _0x4c5e11(0x268);else return _0x1a1d8f[_0x4c5e11(0x210)]['result'];}}}}catch(_0x292a6a){return _0x292a6a;}}async[a6_0x354e6f(0x273)](_0x582778,_0x25ae37,_0x3d7c10,_0x429deb){const _0x4c17c7=a6_0x354e6f;let _0x10ec71={'baseURL':this[_0x4c17c7(0x28c)],'url':_0x3d7c10,'method':'DELETE','headers':_0x582778};const _0x27f3c9=_0x25ae37?JSON[_0x4c17c7(0x279)](_0x25ae37):'';if(this[_0x4c17c7(0x28d)]){if('UjVNd'!=='YOeSI'){if(_0x582778==''){if(_0x4c17c7(0x295)!==_0x4c17c7(0x295)){let _0x3c6a82=_0x328733;return _0x3c6a82;}else _0x10ec71[_0x4c17c7(0x217)]={'target':this[_0x4c17c7(0x28c)],'uri':_0x10ec71[_0x4c17c7(0x28c)],'body':_0x27f3c9};}else _0x10ec71[_0x4c17c7(0x217)]['target']=this[_0x4c17c7(0x28c)],_0x10ec71[_0x4c17c7(0x217)][_0x4c17c7(0x2b9)]=_0x10ec71[_0x4c17c7(0x28c)],_0x10ec71['headers'][_0x4c17c7(0x290)]=_0x27f3c9;this[_0x4c17c7(0x264)]?(_0x10ec71[_0x4c17c7(0x217)]['baseUrl']=this['url'],_0x10ec71[_0x4c17c7(0x2a1)]=_0x4c17c7(0x20c)+this[_0x4c17c7(0x264)]+':'+this[_0x4c17c7(0x2aa)]):_0x4c17c7(0x229)==='XFdGi'?_0x10ec71['baseURL']=_0x4c17c7(0x20c)+this[_0x4c17c7(0x203)]+':'+this[_0x4c17c7(0x2aa)]:_0x546e91[_0x4c17c7(0x210)]=_0x20eac2,_0x10ec71[_0x4c17c7(0x28c)]=_0x4c17c7(0x297);}else _0x2c8ff3[_0x4c17c7(0x217)]={'target':this['url'],'uri':_0x2d7662[_0x4c17c7(0x28c)],'body':_0x56f832};}else{if(_0x25ae37){if('BPIUX'===_0x4c17c7(0x20d))_0x10ec71['data']=_0x25ae37;else throw'requires\x20price\x20or\x20size\x20or\x20both';}}try{if('RYCIt'!=='PLMPi'){const _0x24bf6a=await a6_0x1aea5e(_0x10ec71);if(!_0x24bf6a){if(_0x4c17c7(0x230)===_0x4c17c7(0x230))throw _0x4c17c7(0x298);else _0x4adb86[_0x4c17c7(0x217)][_0x4c17c7(0x296)]=this[_0x4c17c7(0x28c)],_0x46ee46[_0x4c17c7(0x217)][_0x4c17c7(0x2b9)]=_0x413f6e[_0x4c17c7(0x28c)],_0x350141['headers'][_0x4c17c7(0x290)]=_0x27003f;}if(this[_0x4c17c7(0x28d)]){if(_0x4c17c7(0x26c)!==_0x4c17c7(0x26c))_0x162cb1[_0x4c17c7(0x2a1)]='http://'+this['proxy']+':'+this['proxyPort'];else{let _0x1f9294=_0x24bf6a[_0x4c17c7(0x210)]['data']?_0x24bf6a['data'][_0x4c17c7(0x210)]:_0x24bf6a[_0x4c17c7(0x210)];delete _0x24bf6a[_0x4c17c7(0x210)],_0x24bf6a[_0x4c17c7(0x210)]=_0x1f9294;}}if(_0x429deb&&['1','2'][_0x4c17c7(0x219)](_0x429deb))switch(_0x429deb){case'1':return _0x24bf6a[_0x4c17c7(0x210)];break;case'2':return _0x24bf6a;break;}return _0x24bf6a['data'];}else _0x4b9cfc=_0x328582+_0x4c17c7(0x238)+_0x502298[_0x4c17c7(0x240)];}catch(_0x10cd40){return _0x10cd40;}}async[a6_0x354e6f(0x276)](_0x3c6fe5){const _0x28e756=a6_0x354e6f;let _0x385869=this[_0x28e756(0x200)](),_0x42abef='subaccounts',_0x117a59=_0x385869[_0x28e756(0x294)]+_0x28e756(0x1f7)+_0x42abef;const _0x237bfe=a6_0x54c7cd[_0x28e756(0x25f)](_0x28e756(0x28b),this[_0x28e756(0x26d)])[_0x28e756(0x286)](_0x117a59)[_0x28e756(0x2ae)](_0x28e756(0x246));return _0x385869[_0x28e756(0x248)]=_0x237bfe,await(await this[_0x28e756(0x1f0)](_0x385869,_0x42abef,_0x3c6fe5||undefined))[_0x28e756(0x210)];}[a6_0x354e6f(0x20a)](_0xe1d491){let _0x2d1e01=_0xe1d491;return _0x2d1e01;}async[a6_0x354e6f(0x249)](_0x51b2e4,_0x41df14){const _0x17404d=a6_0x354e6f;let _0x3b09a2=this[_0x17404d(0x272)](),_0x44759f=this[_0x17404d(0x20a)](_0x51b2e4),_0x122488='subaccounts',_0x2f0b5f=_0x3b09a2[_0x17404d(0x294)]+_0x17404d(0x232)+'/api/'+_0x122488+JSON[_0x17404d(0x279)](_0x44759f);const _0x28bb7a=a6_0x54c7cd[_0x17404d(0x25f)](_0x17404d(0x28b),this['apiSecret'])['update'](_0x2f0b5f)[_0x17404d(0x2ae)](_0x17404d(0x246));return _0x3b09a2[_0x17404d(0x248)]=_0x28bb7a,await(await this[_0x17404d(0x2ba)](_0x3b09a2,_0x44759f,_0x122488,_0x41df14||undefined))[_0x17404d(0x210)];}[a6_0x354e6f(0x1fb)](_0x4ef25f){let _0x72d3c5=_0x4ef25f;return _0x72d3c5;}async[a6_0x354e6f(0x233)](_0x1c4d78,_0x47ffb1){const _0x102c35=a6_0x354e6f;let _0x44074c=this['createPostHeader'](),_0x2e4fae=this['changeSubaccountNameBody'](_0x1c4d78),_0x251a40=_0x102c35(0x22c),_0x50543d=_0x44074c['FTXUS-TS']+_0x102c35(0x232)+_0x102c35(0x23b)+_0x251a40+JSON[_0x102c35(0x279)](_0x2e4fae);const _0x8e1ad7=a6_0x54c7cd['Hmac'](_0x102c35(0x28b),this['apiSecret'])['update'](_0x50543d)[_0x102c35(0x2ae)]('hex');return _0x44074c[_0x102c35(0x248)]=_0x8e1ad7,await(await this[_0x102c35(0x2ba)](_0x44074c,_0x2e4fae,_0x251a40,_0x47ffb1||undefined))[_0x102c35(0x210)];}[a6_0x354e6f(0x251)](_0x12c730){let _0x40812e=_0x12c730;return _0x40812e;}async['deleteSubaccount'](_0x136e4b,_0x5be358){const _0x881172=a6_0x354e6f;let _0x85c6b=this[_0x881172(0x272)](_0x136e4b),_0x1c999b=this[_0x881172(0x251)](_0x136e4b),_0xe9ff96=_0x881172(0x256),_0x2d5f42=_0x85c6b['FTXUS-TS']+_0x881172(0x239)+_0x881172(0x23b)+_0xe9ff96+JSON[_0x881172(0x279)](_0x1c999b);const _0x5a0abc=a6_0x54c7cd['Hmac']('sha256',this['apiSecret'])[_0x881172(0x286)](_0x2d5f42)[_0x881172(0x2ae)](_0x881172(0x246));return _0x85c6b[_0x881172(0x248)]=_0x5a0abc,await this['deleteRequest'](_0x85c6b,_0x1c999b,_0xe9ff96,_0x5be358||undefined);}async[a6_0x354e6f(0x1fc)](_0x1043eb,_0x14f974){const _0xd80710=a6_0x354e6f;let _0x5cc569=this[_0xd80710(0x200)](),_0x4023e9=_0x1043eb[_0xd80710(0x262)],_0x2e6000=_0xd80710(0x23d)+_0x4023e9+_0xd80710(0x247),_0x1da28a=_0x5cc569['FTXUS-TS']+_0xd80710(0x1f7)+_0x2e6000;const _0xc33e37=a6_0x54c7cd[_0xd80710(0x25f)](_0xd80710(0x28b),this[_0xd80710(0x26d)])['update'](_0x1da28a)[_0xd80710(0x2ae)](_0xd80710(0x246));return _0x5cc569['FTXUS-SIGN']=_0xc33e37,await this[_0xd80710(0x1f0)](_0x5cc569,_0x2e6000,_0x14f974||undefined);}async[a6_0x354e6f(0x292)](_0x517623,_0x5c0fc1){const _0x599321=a6_0x354e6f;let _0x5cfebc=this[_0x599321(0x272)](),_0x1830c8=_0x517623,_0x3bb0b1=_0x599321(0x27e),_0x5538f6=_0x5cfebc[_0x599321(0x294)]+_0x599321(0x232)+_0x599321(0x23b)+_0x3bb0b1+JSON[_0x599321(0x279)](_0x1830c8);const _0x1d7b0b=a6_0x54c7cd[_0x599321(0x25f)](_0x599321(0x28b),this[_0x599321(0x26d)])[_0x599321(0x286)](_0x5538f6)[_0x599321(0x2ae)](_0x599321(0x246));return _0x5cfebc['FTXUS-SIGN']=_0x1d7b0b,await this['executeOrder'](_0x5cfebc,_0x1830c8,_0x3bb0b1,_0x5c0fc1||undefined);}async['getMarkets'](_0x3b06c2){const _0x3d0198=a6_0x354e6f;let _0x40ccbf=_0x3d0198(0x207),_0x123327=this[_0x3d0198(0x28c)]+_0x40ccbf;return await this[_0x3d0198(0x1f0)]('',_0x123327,_0x3b06c2||undefined);}async[a6_0x354e6f(0x284)](_0x3d0217,_0xc0a299){const _0x40c8c0=a6_0x354e6f;let _0x14cf94=_0x40c8c0(0x274),_0x39cf0e=this[_0x40c8c0(0x28c)]+_0x14cf94+_0x3d0217;return await this['executeGetRequest']('',_0x39cf0e,_0xc0a299||undefined);}async[a6_0x354e6f(0x201)](_0x513e3b,_0x3ca188){const _0x2b9257=a6_0x354e6f;let _0x212360='?';if(_0x513e3b[_0x2b9257(0x21d)]==null){if('JWayE'!==_0x2b9257(0x278))_0x212360=this[_0x2b9257(0x28c)]+_0x2b9257(0x274)+_0x513e3b[_0x2b9257(0x234)]+_0x2b9257(0x227);else{let _0x4674a5=_0x12f00b;return delete _0x19065c[_0x2b9257(0x275)],_0x4674a5;}}else _0x212360=this[_0x2b9257(0x28c)]+_0x2b9257(0x274)+_0x513e3b['market_name']+'/orderbook?depth='+_0x513e3b[_0x2b9257(0x21d)];return await this[_0x2b9257(0x1f0)]('',_0x212360,_0x3ca188||undefined);}async['getTrades'](_0x51c931,_0x3e6605){const _0x4c9769=a6_0x354e6f;let _0x52d8a8=this[_0x4c9769(0x28c)]+_0x4c9769(0x274)+_0x51c931[_0x4c9769(0x234)]+_0x4c9769(0x243);if(_0x51c931[_0x4c9769(0x267)]||_0x51c931[_0x4c9769(0x235)]){_0x52d8a8=_0x52d8a8+'?';if(_0x51c931[_0x4c9769(0x267)]){if(_0x4c9769(0x1ef)!==_0x4c9769(0x1ef)){if(_0x3d25f1[_0x4c9769(0x210)]&&_0x2ebd32[_0x4c9769(0x210)][_0x4c9769(0x287)])for(let _0x5b8040=0x0;_0x5b8040<_0x4a3124[_0x4c9769(0x210)][_0x4c9769(0x287)][_0x4c9769(0x2bc)];_0x5b8040++){let _0x268df9=_0x5d83ba[_0x4c9769(0x210)][_0x4c9769(0x287)][_0x5b8040]['coin'];_0x53b108[_0x4c9769(0x219)](_0x268df9)&&_0x1b4ba6[_0x4c9769(0x29c)](_0x39ee06['data'][_0x4c9769(0x287)][_0x5b8040]);}}else _0x52d8a8=_0x52d8a8+_0x4c9769(0x24f)+_0x51c931['start_time'],_0x51c931['end_time']&&(_0x52d8a8=_0x52d8a8+'&'+_0x4c9769(0x2a9)+_0x51c931['end_time']);}else{if(_0x51c931[_0x4c9769(0x235)]){if(_0x4c9769(0x25a)!==_0x4c9769(0x25a))throw _0x4c9769(0x29d);else _0x52d8a8=_0x52d8a8+'end_time='+_0x51c931['end_time'];}}}return await this[_0x4c9769(0x1f0)]('',_0x52d8a8,_0x3e6605||undefined);}async[a6_0x354e6f(0x270)](_0x1bdb4d,_0xdbd13f){const _0x222d77=a6_0x354e6f;let _0x128f47=this[_0x222d77(0x28c)]+'markets/'+_0x1bdb4d[_0x222d77(0x234)]+_0x222d77(0x2b6)+_0x1bdb4d[_0x222d77(0x1f8)];if(_0x1bdb4d['start_time']||_0x1bdb4d[_0x222d77(0x235)]){_0x128f47=_0x128f47+'&';if(_0x1bdb4d[_0x222d77(0x267)]){if(_0x222d77(0x257)==='dypER')_0x128f47=_0x128f47+_0x222d77(0x24f)+_0x1bdb4d['start_time'],_0x1bdb4d['end_time']&&(_0x128f47=_0x128f47+'&'+_0x222d77(0x235)+_0x1bdb4d['end_time']);else{let _0x41e93=_0xb18ab6;return _0x41e93[_0x222d77(0x228)]=='market'&&(_0x41e93[_0x222d77(0x20f)]=null),_0x41e93;}}else _0x1bdb4d[_0x222d77(0x235)]&&(_0x128f47=_0x128f47+_0x222d77(0x2a9)+_0x1bdb4d['end_time']);}return await this['executeGetRequest']('',_0x128f47,_0xdbd13f||undefined);}async[a6_0x354e6f(0x2a5)](_0x37f46c,_0x17a8cc){const _0x3ef8ff=a6_0x354e6f;let _0x700ec8=this[_0x3ef8ff(0x200)](_0x37f46c),_0x32e073=_0x3ef8ff(0x27c),_0x11f71d=_0x700ec8['FTXUS-TS']+'GET/api/'+_0x32e073;const _0x389e7e=a6_0x54c7cd['Hmac']('sha256',this[_0x3ef8ff(0x26d)])[_0x3ef8ff(0x286)](_0x11f71d)['digest'](_0x3ef8ff(0x246));return _0x700ec8[_0x3ef8ff(0x248)]=_0x389e7e,await this[_0x3ef8ff(0x1f0)](_0x700ec8,_0x32e073,_0x17a8cc||undefined);}async['getPositions'](_0x5c8933,_0x454673){return await this['getBalances'](_0x5c8933,_0x454673||undefined);}async['getBalances'](_0x3f1100,_0x3b67b5){const _0x141644=a6_0x354e6f;let _0x43807f=this['createGetHeader'](_0x3f1100),_0x930596;if(_0x3f1100&&_0x3f1100[_0x141644(0x27f)]){if(_0x141644(0x2b7)!=='yUqcZ'){_0x930596=_0x3f1100[_0x141644(0x27f)];if(!_0x930596['constructor'][_0x141644(0x250)]()[_0x141644(0x21c)](_0x141644(0x252))>0x1)throw _0x141644(0x268);}else return{'result':_0x5698ee[_0x141644(0x210)],'body':_0x377489};}let _0x2a0eaa=_0x141644(0x27b),_0x1eb0da=_0x43807f[_0x141644(0x294)]+_0x141644(0x1f7)+_0x2a0eaa;const _0x19935f=a6_0x54c7cd['Hmac'](_0x141644(0x28b),this[_0x141644(0x26d)])['update'](_0x1eb0da)[_0x141644(0x2ae)](_0x141644(0x246));_0x43807f[_0x141644(0x248)]=_0x19935f;let _0xf7eef6=await this['executeGetRequest'](_0x43807f,_0x2a0eaa,_0x3b67b5||undefined),_0x4263d3=new Array();if(_0x930596){if(_0xf7eef6[_0x141644(0x210)]&&_0xf7eef6['data'][_0x141644(0x287)])for(let _0x5d7846=0x0;_0x5d7846<_0xf7eef6[_0x141644(0x210)]['result'][_0x141644(0x2bc)];_0x5d7846++){let _0x156d81=_0xf7eef6[_0x141644(0x210)][_0x141644(0x287)][_0x5d7846][_0x141644(0x23c)];if(_0x930596[_0x141644(0x219)](_0x156d81)){if(_0x141644(0x283)!==_0x141644(0x283))return _0x4d0e2b;else _0x4263d3['push'](_0xf7eef6[_0x141644(0x210)]['result'][_0x5d7846]);}}}else _0x4263d3=_0xf7eef6['data'];return _0x4263d3;}async[a6_0x354e6f(0x26e)](_0x1241f4,_0x483679){const _0x308d12=a6_0x354e6f;let _0x84a4bc=this['createGetHeader'](_0x1241f4),_0x168571=_0x308d12(0x24d),_0x4f614c=_0x84a4bc[_0x308d12(0x294)]+_0x308d12(0x1f7)+_0x168571;const _0x41db54=a6_0x54c7cd[_0x308d12(0x25f)](_0x308d12(0x28b),this[_0x308d12(0x26d)])[_0x308d12(0x286)](_0x4f614c)[_0x308d12(0x2ae)]('hex');return _0x84a4bc['FTXUS-SIGN']=_0x41db54,await this[_0x308d12(0x1f0)](_0x84a4bc,_0x168571,_0x483679||undefined);}async[a6_0x354e6f(0x261)](_0x2d7598,_0x4b18a1){const _0x3d2e7f=a6_0x354e6f;let _0x3ec592=this[_0x3d2e7f(0x200)](),_0x230332=_0x3d2e7f(0x22b);_0x2d7598&&(_0x230332=_0x230332+'?market='+_0x2d7598);let _0x4f341b=_0x3ec592[_0x3d2e7f(0x294)]+'GET/api/'+_0x230332;const _0x16d14f=a6_0x54c7cd[_0x3d2e7f(0x25f)](_0x3d2e7f(0x28b),this[_0x3d2e7f(0x26d)])[_0x3d2e7f(0x286)](_0x4f341b)[_0x3d2e7f(0x2ae)](_0x3d2e7f(0x246));return _0x3ec592[_0x3d2e7f(0x248)]=_0x16d14f,await this[_0x3d2e7f(0x1f0)](_0x3ec592,_0x230332,_0x4b18a1||undefined);}async[a6_0x354e6f(0x23a)](_0x3216b8,_0x5c0cc3){const _0xb81ec5=a6_0x354e6f;let _0x22fb7e=this['createGetHeader'](),_0x54efc2='orders/history',_0xef24c4=Object[_0xb81ec5(0x202)](_0x3216b8)[_0xb81ec5(0x2b8)](_0x51b758=>_0x51b758[_0xb81ec5(0x204)]('='));_0xef24c4['length']>0x0&&(_0x54efc2=_0x54efc2+'?',_0x54efc2=_0x54efc2+_0xef24c4[_0xb81ec5(0x204)]('&'));let _0x335e2b=_0x54efc2,_0x1e04d9=_0x22fb7e[_0xb81ec5(0x294)]+_0xb81ec5(0x1f7)+_0x54efc2;const _0x51b79f=a6_0x54c7cd[_0xb81ec5(0x25f)](_0xb81ec5(0x28b),this[_0xb81ec5(0x26d)])[_0xb81ec5(0x286)](_0x1e04d9)[_0xb81ec5(0x2ae)](_0xb81ec5(0x246));return _0x22fb7e['FTXUS-SIGN']=_0x51b79f,await this[_0xb81ec5(0x1f0)](_0x22fb7e,_0x335e2b,_0x5c0cc3||undefined);}async[a6_0x354e6f(0x28f)](_0x6787d7,_0x1c10cf){const _0x32af92=a6_0x354e6f;_0x6787d7=_0x6787d7||{};let _0x5a8ca4=this[_0x32af92(0x200)](),_0x5af6d9='conditional_orders',_0x28eda3=Object['entries'](_0x6787d7)[_0x32af92(0x2b8)](_0x296ec2=>_0x296ec2['join']('='));_0x28eda3[_0x32af92(0x2bc)]>0x0&&(_0x5af6d9=_0x5af6d9+'?',_0x5af6d9=_0x5af6d9+_0x28eda3['join']('&'));let _0x26e385=_0x5af6d9,_0x356f9a=_0x5a8ca4[_0x32af92(0x294)]+_0x32af92(0x1f7)+_0x26e385;const _0x195d75=a6_0x54c7cd[_0x32af92(0x25f)](_0x32af92(0x28b),this[_0x32af92(0x26d)])[_0x32af92(0x286)](_0x356f9a)['digest'](_0x32af92(0x246));return _0x5a8ca4[_0x32af92(0x248)]=_0x195d75,await this['executeGetRequest'](_0x5a8ca4,_0x26e385,_0x1c10cf||undefined);}async[a6_0x354e6f(0x20e)](_0x363af6,_0x54d165){const _0x37ffbc=a6_0x354e6f;let _0x33f152=this['createGetHeader']();if(!_0x363af6||!_0x363af6[_0x37ffbc(0x237)]){if(_0x37ffbc(0x26b)!==_0x37ffbc(0x26b))throw _0x37ffbc(0x260);else throw _0x37ffbc(0x288);}let _0x43fffb=_0x37ffbc(0x1f9)+_0x363af6['orderId']+'/triggers',_0x1c50f8=_0x43fffb,_0xd6077c=_0x33f152[_0x37ffbc(0x294)]+_0x37ffbc(0x1f7)+_0x1c50f8;const _0xb919b3=a6_0x54c7cd[_0x37ffbc(0x25f)](_0x37ffbc(0x28b),this[_0x37ffbc(0x26d)])[_0x37ffbc(0x286)](_0xd6077c)[_0x37ffbc(0x2ae)](_0x37ffbc(0x246));return _0x33f152[_0x37ffbc(0x248)]=_0xb919b3,await this[_0x37ffbc(0x1f0)](_0x33f152,_0x1c50f8,_0x54d165||undefined);}async[a6_0x354e6f(0x265)](_0x194e73,_0x19791b){const _0x33901f=a6_0x354e6f;let _0x56504d=this[_0x33901f(0x200)](),_0x3b838d='?';_0x194e73=_0x194e73||{};_0x194e73[_0x33901f(0x240)]&&(_0x3b838d=_0x3b838d+_0x33901f(0x238)+_0x194e73[_0x33901f(0x240)]);_0x194e73[_0x33901f(0x267)]&&(_0x3b838d=_0x3b838d+(_0x3b838d=='?'?'':'&'),_0x3b838d=_0x3b838d+'start_time='+_0x194e73[_0x33901f(0x267)]);_0x194e73[_0x33901f(0x235)]&&(_0x3b838d=_0x3b838d+(_0x3b838d=='?'?'':'&'),_0x3b838d=_0x3b838d+_0x33901f(0x2a9)+_0x194e73[_0x33901f(0x235)]);if(_0x194e73['side']){if('szrEM'!==_0x33901f(0x29e))_0x3b838d=_0x3b838d+(_0x3b838d=='?'?'':'&'),_0x3b838d=_0x3b838d+_0x33901f(0x25e)+_0x194e73[_0x33901f(0x213)];else return _0x1c70c4;}_0x194e73[_0x33901f(0x228)]&&(_0x3b838d=_0x3b838d+(_0x3b838d=='?'?'':'&'),_0x3b838d=_0x3b838d+'type='+_0x194e73[_0x33901f(0x228)]);_0x194e73[_0x33901f(0x226)]&&(_0x3b838d=_0x3b838d+(_0x3b838d=='?'?'':'&'),_0x3b838d=_0x3b838d+_0x33901f(0x255)+_0x194e73['orderType']);let _0x41be36=_0x33901f(0x25c)+(_0x3b838d=='?'?'':_0x3b838d),_0x445786=_0x56504d['FTXUS-TS']+_0x33901f(0x1f7)+_0x41be36;const _0x5f5b9f=a6_0x54c7cd[_0x33901f(0x25f)](_0x33901f(0x28b),this['apiSecret'])[_0x33901f(0x286)](_0x445786)[_0x33901f(0x2ae)](_0x33901f(0x246));return _0x56504d['FTXUS-SIGN']=_0x5f5b9f,await this['executeGetRequest'](_0x56504d,_0x41be36,_0x19791b||undefined);}[a6_0x354e6f(0x2a0)](_0x5d9502){const _0x19e084=a6_0x354e6f;let _0x4e8b63=_0x5d9502;return _0x4e8b63[_0x19e084(0x228)]==_0x19e084(0x240)&&(_0x19e084(0x282)!=='Syxrh'?_0x4e8b63['price']=null:(_0x2b4b63=_0x4064c9+(_0x23557e=='?'?'':'&'),_0x2fe999=_0x36f6bf+_0x19e084(0x255)+_0x40df1b[_0x19e084(0x226)])),_0x4e8b63;}async[a6_0x354e6f(0x2b0)](_0x549d1b,_0x698bc2){const _0x2b8763=a6_0x354e6f;let _0x2eaef9=this[_0x2b8763(0x272)](_0x549d1b),_0x46e3cc=this[_0x2b8763(0x2a0)](_0x549d1b),_0x588c8b=_0x2b8763(0x22b),_0x218685=_0x2eaef9[_0x2b8763(0x294)]+_0x2b8763(0x232)+_0x2b8763(0x23b)+_0x588c8b+JSON['stringify'](_0x46e3cc);const _0x2100f9=a6_0x54c7cd[_0x2b8763(0x25f)](_0x2b8763(0x28b),this[_0x2b8763(0x26d)])[_0x2b8763(0x286)](_0x218685)[_0x2b8763(0x2ae)]('hex');_0x2eaef9[_0x2b8763(0x248)]=_0x2100f9,await this['executeOrder'](_0x2eaef9,_0x46e3cc,_0x588c8b,_0x698bc2||undefined);}[a6_0x354e6f(0x266)](_0x15c12e){let _0xafaa82=_0x15c12e;return _0xafaa82;}async[a6_0x354e6f(0x1f6)](_0x112e3d,_0x44a317){const _0x275353=a6_0x354e6f;let _0x1b1fdb=this[_0x275353(0x272)](_0x112e3d),_0x57adb9=this[_0x275353(0x266)](_0x112e3d),_0x50eeda=_0x275353(0x2bb),_0x191da8=_0x1b1fdb[_0x275353(0x294)]+'POST'+_0x275353(0x23b)+_0x50eeda+JSON[_0x275353(0x279)](_0x57adb9);const _0x58e727=a6_0x54c7cd[_0x275353(0x25f)](_0x275353(0x28b),this[_0x275353(0x26d)])[_0x275353(0x286)](_0x191da8)[_0x275353(0x2ae)](_0x275353(0x246));_0x1b1fdb[_0x275353(0x248)]=_0x58e727,await this[_0x275353(0x2ba)](_0x1b1fdb,_0x57adb9,_0x50eeda,_0x44a317||undefined);}async[a6_0x354e6f(0x21a)](_0x8200f8,_0xd4fcf5){const _0x46bcdc=a6_0x354e6f;if(!_0x8200f8||!_0x8200f8[_0x46bcdc(0x237)])throw _0x46bcdc(0x288);let _0x3d6fca=this[_0x46bcdc(0x272)](_0x8200f8),_0x3179c6=_0x46bcdc(0x1f9)+_0x8200f8[_0x46bcdc(0x237)],_0x969ff9=_0x3d6fca[_0x46bcdc(0x294)]+_0x46bcdc(0x239)+'/api/'+_0x3179c6+(_0x8200f8?JSON[_0x46bcdc(0x279)](_0x8200f8):'');const _0x2e0b0e=a6_0x54c7cd['Hmac'](_0x46bcdc(0x28b),this[_0x46bcdc(0x26d)])[_0x46bcdc(0x286)](_0x969ff9)[_0x46bcdc(0x2ae)](_0x46bcdc(0x246));return _0x3d6fca['FTXUS-SIGN']=_0x2e0b0e,await this[_0x46bcdc(0x273)](_0x3d6fca,_0x8200f8,_0x3179c6,_0xd4fcf5||undefined);}async['cancelAllOrders'](_0x260dcc,_0x54e77b){const _0x50f374=a6_0x354e6f;let _0x283957=this[_0x50f374(0x272)](_0x260dcc),_0x449e91=_0x50f374(0x22b),_0x29e6ec=_0x283957[_0x50f374(0x294)]+'DELETE'+_0x50f374(0x23b)+_0x449e91+(_0x260dcc?JSON[_0x50f374(0x279)](_0x260dcc):'');const _0x1e93aa=a6_0x54c7cd[_0x50f374(0x25f)](_0x50f374(0x28b),this[_0x50f374(0x26d)])['update'](_0x29e6ec)[_0x50f374(0x2ae)](_0x50f374(0x246));return _0x283957[_0x50f374(0x248)]=_0x1e93aa,await this[_0x50f374(0x273)](_0x283957,_0x260dcc,_0x449e91,_0x54e77b||undefined);}async[a6_0x354e6f(0x245)](_0x3ecef1,_0x6d18e2){const _0x73126b=a6_0x354e6f;if(!_0x3ecef1||!_0x3ecef1[_0x73126b(0x237)]){if(_0x73126b(0x27d)!==_0x73126b(0x285))throw _0x73126b(0x288);else throw _0x73126b(0x298);}if(!_0x3ecef1[_0x73126b(0x24e)]&&!_0x3ecef1[_0x73126b(0x20f)])throw _0x73126b(0x220);let _0x9c4b17=_0x3ecef1,_0x323457=this['createPostHeader'](_0x3ecef1),_0x4073d3='orders/'+_0x3ecef1[_0x73126b(0x237)]+'/modify';delete _0x3ecef1['orderId'];let _0x3cf7a6=_0x323457[_0x73126b(0x294)]+_0x73126b(0x232)+_0x73126b(0x23b)+_0x4073d3+JSON[_0x73126b(0x279)](_0x9c4b17);const _0x295709=a6_0x54c7cd[_0x73126b(0x25f)]('sha256',this['apiSecret'])[_0x73126b(0x286)](_0x3cf7a6)[_0x73126b(0x2ae)](_0x73126b(0x246));return _0x323457['FTXUS-SIGN']=_0x295709,await this[_0x73126b(0x2ba)](_0x323457,_0x9c4b17,_0x4073d3,_0x6d18e2||undefined);}async[a6_0x354e6f(0x2b5)](_0x32a10a,_0x376676){const _0x5ec5fb=a6_0x354e6f;if(!_0x32a10a||!_0x32a10a['clientId'])throw _0x5ec5fb(0x260);if(!_0x32a10a[_0x5ec5fb(0x24e)]&&!_0x32a10a[_0x5ec5fb(0x20f)]){if(_0x5ec5fb(0x236)===_0x5ec5fb(0x236))throw _0x5ec5fb(0x220);else throw _0x5ec5fb(0x288);}let _0x1aa4f8=_0x32a10a,_0x2e4777=this[_0x5ec5fb(0x272)](_0x1aa4f8),_0x38ffbf=_0x5ec5fb(0x2a7)+_0x1aa4f8[_0x5ec5fb(0x205)]+'/modify';delete _0x1aa4f8[_0x5ec5fb(0x205)];let _0x39a6a3=_0x2e4777['FTXUS-TS']+'POST'+_0x5ec5fb(0x23b)+_0x38ffbf+JSON[_0x5ec5fb(0x279)](_0x1aa4f8);const _0x32ffc7=a6_0x54c7cd[_0x5ec5fb(0x25f)](_0x5ec5fb(0x28b),this['apiSecret'])[_0x5ec5fb(0x286)](_0x39a6a3)[_0x5ec5fb(0x2ae)](_0x5ec5fb(0x246));return _0x2e4777[_0x5ec5fb(0x248)]=_0x32ffc7,await this['executeOrder'](_0x2e4777,_0x1aa4f8,_0x38ffbf,_0x376676||undefined);}[a6_0x354e6f(0x293)](_0x3935ff){const _0x3cd2e8=a6_0x354e6f;let _0xbc563e=_0x3935ff;return delete _0x3935ff[_0x3cd2e8(0x275)],_0xbc563e;}async['modifyTriggerOrder'](_0x1e70b7,_0x4fda14){const _0x1fe039=a6_0x354e6f;let _0x343168=_0x1e70b7,_0x1f7ef1=_0x343168['orderId'];delete _0x343168[_0x1fe039(0x237)];let _0x299269=this[_0x1fe039(0x272)](_0x343168),_0x435900='conditional_orders/'+_0x1f7ef1+_0x1fe039(0x215),_0x544115=_0x299269['FTXUS-TS']+_0x1fe039(0x232)+_0x1fe039(0x23b)+_0x435900+JSON['stringify'](_0x343168);const _0x33c724=a6_0x54c7cd['Hmac'](_0x1fe039(0x28b),this['apiSecret'])['update'](_0x544115)[_0x1fe039(0x2ae)](_0x1fe039(0x246));return _0x299269[_0x1fe039(0x248)]=_0x33c724,await this[_0x1fe039(0x2ba)](_0x299269,_0x343168,_0x435900,_0x4fda14||undefined);}async[a6_0x354e6f(0x21f)](_0x17f80e,_0x465beb){const _0x450236=a6_0x354e6f;let _0x3d6c82=this[_0x450236(0x200)]();if(!_0x17f80e||!_0x17f80e[_0x450236(0x237)])throw _0x450236(0x288);let _0x2833f3=_0x450236(0x25d)+_0x17f80e[_0x450236(0x237)],_0x1768e8=_0x3d6c82[_0x450236(0x294)]+_0x450236(0x1f7)+_0x2833f3;const _0x117442=a6_0x54c7cd[_0x450236(0x25f)](_0x450236(0x28b),this[_0x450236(0x26d)])[_0x450236(0x286)](_0x1768e8)[_0x450236(0x2ae)](_0x450236(0x246));return _0x3d6c82[_0x450236(0x248)]=_0x117442,await this[_0x450236(0x1f0)](_0x3d6c82,_0x2833f3,_0x465beb||undefined);}async[a6_0x354e6f(0x280)](_0x1aa447,_0x3f0d62){const _0x22ddaf=a6_0x354e6f;if(!_0x1aa447||!_0x1aa447[_0x22ddaf(0x205)]){if(_0x22ddaf(0x2bd)!==_0x22ddaf(0x231))throw _0x22ddaf(0x260);else this[_0x22ddaf(0x28d)]=!![],this[_0x22ddaf(0x203)]=_0x30a7e3[_0x22ddaf(0x203)],_0x141299[_0x22ddaf(0x2aa)]?this[_0x22ddaf(0x2aa)]=_0x1ea2c4[_0x22ddaf(0x2aa)]:this[_0x22ddaf(0x2aa)]=0xbb8;}let _0x5d54f5=this[_0x22ddaf(0x200)](),_0x24ae83=_0x22ddaf(0x2a7)+_0x1aa447['clientId'],_0x43a889=_0x5d54f5['FTXUS-TS']+'GET/api/'+_0x24ae83;const _0x1e7de7=a6_0x54c7cd[_0x22ddaf(0x25f)](_0x22ddaf(0x28b),this[_0x22ddaf(0x26d)])[_0x22ddaf(0x286)](_0x43a889)[_0x22ddaf(0x2ae)](_0x22ddaf(0x246));return _0x5d54f5[_0x22ddaf(0x248)]=_0x1e7de7,await this['executeGetRequest'](_0x5d54f5,_0x24ae83,_0x3f0d62||undefined);}async[a6_0x354e6f(0x241)](_0x201130,_0x2de35f){const _0x19edbb=a6_0x354e6f;if(!_0x201130||!_0x201130[_0x19edbb(0x237)])throw _0x19edbb(0x288);let _0x4a7a7b=this[_0x19edbb(0x272)](_0x201130),_0xf2a49e=_0x19edbb(0x25d)+_0x201130['orderId'],_0x46d701=_0x4a7a7b[_0x19edbb(0x294)]+_0x19edbb(0x239)+_0x19edbb(0x23b)+_0xf2a49e+(_0x201130?JSON[_0x19edbb(0x279)](_0x201130):'');const _0x5f3f31=a6_0x54c7cd[_0x19edbb(0x25f)](_0x19edbb(0x28b),this[_0x19edbb(0x26d)])['update'](_0x46d701)[_0x19edbb(0x2ae)](_0x19edbb(0x246));return _0x4a7a7b[_0x19edbb(0x248)]=_0x5f3f31,await this['deleteRequest'](_0x4a7a7b,_0x201130,_0xf2a49e,_0x2de35f||undefined);}async[a6_0x354e6f(0x211)](_0x2900aa,_0x2ae2d8){const _0x181757=a6_0x354e6f;if(!_0x2900aa||!_0x2900aa[_0x181757(0x205)]){if(_0x181757(0x225)!==_0x181757(0x225)){_0x25a230=_0x317fac+'?';if(_0x12a510[_0x181757(0x267)])_0x4729c0=_0x3b8623+_0x181757(0x24f)+_0x41409b[_0x181757(0x267)],_0x181131['end_time']&&(_0x51cb7a=_0xf9067a+'&'+_0x181757(0x2a9)+_0x3f0539[_0x181757(0x235)]);else _0x21e3ed[_0x181757(0x235)]&&(_0x258281=_0x9912fc+_0x181757(0x2a9)+_0x4db654[_0x181757(0x235)]);}else throw'requires\x20clientId';}let _0x5e844e=this[_0x181757(0x272)](_0x2900aa),_0x402123='orders/by_client_id/'+_0x2900aa[_0x181757(0x205)],_0x55b95e=_0x5e844e[_0x181757(0x294)]+_0x181757(0x239)+_0x181757(0x23b)+_0x402123+(_0x2900aa?JSON[_0x181757(0x279)](_0x2900aa):'');const _0x1b7b47=a6_0x54c7cd[_0x181757(0x25f)](_0x181757(0x28b),this['apiSecret'])[_0x181757(0x286)](_0x55b95e)[_0x181757(0x2ae)](_0x181757(0x246));return _0x5e844e['FTXUS-SIGN']=_0x1b7b47,await this[_0x181757(0x273)](_0x5e844e,_0x2900aa,_0x402123,_0x2ae2d8||undefined);}async[a6_0x354e6f(0x212)](_0x192cbb,_0x30e752){const _0x33ea9e=a6_0x354e6f;let _0x58fe26=this[_0x33ea9e(0x200)](),_0x1bd34b='?';if(_0x192cbb[_0x33ea9e(0x240)]){if(_0x33ea9e(0x22e)!=='NeXZL')_0x1bd34b=_0x1bd34b+_0x33ea9e(0x238)+_0x192cbb[_0x33ea9e(0x240)];else{let _0x3ed9d4=_0x24e716;return _0x3ed9d4;}}if(_0x192cbb[_0x33ea9e(0x267)]){if(_0x33ea9e(0x2a8)===_0x33ea9e(0x2a8))_0x1bd34b=_0x1bd34b+(_0x1bd34b=='?'?'':'&'),_0x1bd34b=_0x1bd34b+_0x33ea9e(0x24f)+_0x192cbb[_0x33ea9e(0x267)];else return _0xc8c681[_0x33ea9e(0x210)];}_0x192cbb[_0x33ea9e(0x235)]&&(_0x33ea9e(0x22d)===_0x33ea9e(0x1f4)?_0x12e878=_0x139f84+_0x33ea9e(0x2a4)+_0xf324d1:(_0x1bd34b=_0x1bd34b+(_0x1bd34b=='?'?'':'&'),_0x1bd34b=_0x1bd34b+_0x33ea9e(0x2a9)+_0x192cbb[_0x33ea9e(0x235)]));if(_0x192cbb['order']){if(_0x33ea9e(0x22a)==='JhLYt')_0x1bd34b=_0x1bd34b+(_0x1bd34b=='?'?'':'&'),_0x1bd34b=_0x1bd34b+'order='+_0x192cbb['order'];else return _0x8746a7['data']['data'];}_0x192cbb[_0x33ea9e(0x237)]&&(_0x1bd34b=_0x1bd34b+(_0x1bd34b=='?'?'':'&'),_0x1bd34b=_0x1bd34b+_0x33ea9e(0x242)+_0x192cbb['orderId']);let _0x10764a='fills'+(_0x1bd34b=='?'?'':_0x1bd34b),_0xc40a4f=_0x58fe26[_0x33ea9e(0x294)]+_0x33ea9e(0x1f7)+_0x10764a;const _0xfa7e0e=a6_0x54c7cd[_0x33ea9e(0x25f)](_0x33ea9e(0x28b),this[_0x33ea9e(0x26d)])[_0x33ea9e(0x286)](_0xc40a4f)['digest']('hex');return _0x58fe26[_0x33ea9e(0x248)]=_0xfa7e0e,await this[_0x33ea9e(0x1f0)](_0x58fe26,_0x10764a,_0x30e752||undefined);}}

@@ -1,1 +0,1 @@

const a7_0x237ab5=a7_0x38e6;(function(_0x10feca,_0x38614d){const _0xab3210=a7_0x38e6,_0x51471f=_0x10feca();while(!![]){try{const _0xa781d4=-parseInt(_0xab3210(0x92))/0x1*(parseInt(_0xab3210(0x93))/0x2)+-parseInt(_0xab3210(0xb3))/0x3*(-parseInt(_0xab3210(0x9a))/0x4)+parseInt(_0xab3210(0xa1))/0x5+parseInt(_0xab3210(0xb7))/0x6*(-parseInt(_0xab3210(0x98))/0x7)+parseInt(_0xab3210(0xb0))/0x8+parseInt(_0xab3210(0xb6))/0x9+-parseInt(_0xab3210(0xa5))/0xa;if(_0xa781d4===_0x38614d)break;else _0x51471f['push'](_0x51471f['shift']());}catch(_0x1d0627){_0x51471f['push'](_0x51471f['shift']());}}}(a7_0x4b06,0x597e8));import a7_0x187003 from'axios';import a7_0x281562 from'dateformat';import a7_0x30ed96 from'crypto-js';function a7_0x38e6(_0x254d4a,_0x210728){const _0x4b06e6=a7_0x4b06();return a7_0x38e6=function(_0x38e644,_0x403b5e){_0x38e644=_0x38e644-0x92;let _0x161233=_0x4b06e6[_0x38e644];return _0x161233;},a7_0x38e6(_0x254d4a,_0x210728);}function a7_0x4b06(){const _0x44f386=['subaccount','dec','length','nLgGI','secret','executeOrder','wqNMC','forEach','getServerTime','sha256','1137880vthAaR','getWalletBalance','exchangename','3KfQUNW','parse','main','3685752XVxuMh','318pGdTMc','/v1/account/accounts','GET','sort','exchangeid','UTC:yyyy-mm-dd\x27T\x27HH:MM:ss','Signature=','api.huobi.pro','HmacSHA256','executeGetRequest','decrypt','huobi','url','name','/api/v1/timestamp','6XgZqqO','14048vWWSKs','digest','exchange','Utf8','substring','23079hXLNwE','baseUrl','1085976ppeoyx','apiSecret','keys','toString','enc','apiKey','authenticate','331765oFRUhS','label','assembleRequest','Base64','3061570aYYVfl'];a7_0x4b06=function(){return _0x44f386;};return a7_0x4b06();}export class Huobi{['publicApis']=new Array();constructor(_0x3ffdf0){const _0x5e2d75=a7_0x38e6;this[_0x5e2d75(0xc3)]='https://api.huobi.pro',this[_0x5e2d75(0xa0)]=_0x3ffdf0[_0x5e2d75(0xa0)]==undefined?!![]:_0x3ffdf0['authenticate'],this[_0x5e2d75(0x99)]=_0x5e2d75(0xbe),this[_0x5e2d75(0xc4)]=_0x3ffdf0[_0x5e2d75(0x95)][_0x5e2d75(0xb2)]==undefined?_0x5e2d75(0xc2):_0x3ffdf0[_0x5e2d75(0x95)][_0x5e2d75(0xb2)],this[_0x5e2d75(0xbb)]=_0x3ffdf0[_0x5e2d75(0x95)]['id'],this[_0x5e2d75(0x9f)]=_0x3ffdf0['key']==undefined?'':_0x3ffdf0['key'],this[_0x5e2d75(0x9b)]=_0x3ffdf0[_0x5e2d75(0xaa)]==undefined?'':_0x3ffdf0[_0x5e2d75(0xaa)],this[_0x5e2d75(0xa6)]=_0x3ffdf0[_0x5e2d75(0xa6)]==undefined?_0x5e2d75(0xb5):_0x3ffdf0['subaccount'],this['label']=_0x3ffdf0[_0x5e2d75(0xa2)],this['publicApis']['push'](_0x5e2d75(0xae));}[a7_0x237ab5(0xa7)]=_0x1c3fc3=>{const _0x5b5872=a7_0x237ab5;if(_0x1c3fc3==null)return undefined;const _0x442383=a7_0x30ed96[_0x5b5872(0x9e)][_0x5b5872(0xa4)][_0x5b5872(0xb4)](envkeys['ky']),_0x5bf3a7=a7_0x30ed96[_0x5b5872(0x9e)][_0x5b5872(0xa4)][_0x5b5872(0xb4)](envkeys['i']);return a7_0x30ed96['AES'][_0x5b5872(0xc1)](_0x1c3fc3,_0x442383,{'iv':_0x5bf3a7})[_0x5b5872(0x9d)](a7_0x30ed96[_0x5b5872(0x9e)][_0x5b5872(0x96)]);};async[a7_0x237ab5(0xab)](_0x5a5456,_0x5de1d1,_0x5ee2ea){let _0x41d0e2=this['url']+_0x5ee2ea;const _0x9f623a=await a7_0x187003['post'](_0x41d0e2,_0x5de1d1,{'headers':_0x5a5456});return _0x9f623a;}async[a7_0x237ab5(0xc0)](_0x1d94cb){const _0x3fbbfa=a7_0x237ab5;let _0x3baa24={'baseURL':this['url'],'url':_0x1d94cb,'method':_0x3fbbfa(0xb9)};const _0xc2038f=await a7_0x187003(_0x3baa24);return _0xc2038f;}async['assembleRequest'](_0x1b5f31,_0x34255e,_0x4ae43e){const _0x486bc9=a7_0x237ab5;let _0x1bd2c8=await this[_0x486bc9(0xae)](),_0x30b4be=encodeURIComponent(a7_0x281562(new Date(_0x1bd2c8['data']['ts']),_0x486bc9(0xbc))),_0x1ec861={'AccessKeyId':this[_0x486bc9(0x9f)],'SignatureMethod':_0x486bc9(0xbf),'SignatureVersion':'2','Timestamp':_0x30b4be};if(_0x4ae43e&&typeof _0x4ae43e==='object'){if(_0x486bc9(0xa9)==='nLgGI')Object['keys'](_0x4ae43e)['forEach'](function(_0xdc8968){_0x1ec861[_0xdc8968]=_0x4ae43e[_0xdc8968];});else return _0x56e5c1;}let _0x1770ae=Object[_0x486bc9(0x9c)](_0x1ec861)['sort'](),_0xf20218='\x0a',_0x1244d7=_0x34255e+_0xf20218+this['baseUrl']+_0xf20218+_0x1b5f31+_0xf20218;_0x1770ae[_0x486bc9(0xad)](_0x3beb93=>{_0x1244d7=_0x1244d7+(_0x1244d7[_0x1244d7['length']-0x1]==_0xf20218?'':'&')+_0x3beb93+'='+_0x1ec861[_0x3beb93];});const _0x2fcd44=a7_0x30ed96['HmacSHA256'](_0x1244d7,this[_0x486bc9(0x9b)]),_0x141eee=a7_0x30ed96['enc'][_0x486bc9(0xa4)]['stringify'](_0x2fcd44);let _0x6f357b=_0x1b5f31,_0x15011d='?';return _0x1770ae['forEach'](_0x3b88ab=>{const _0x2f8050=_0x486bc9;if(_0x2f8050(0xac)===_0x2f8050(0xac))_0x15011d=_0x15011d+(_0x15011d[_0x15011d['length']-0x1]=='?'?'':'&')+_0x3b88ab+'='+_0x1ec861[_0x3b88ab];else{if(_0x5752c2==null)return _0x1f8da2;const _0x3a9bcb=_0x2f8b72[_0x2f8050(0x9e)][_0x2f8050(0xa4)][_0x2f8050(0xb4)](_0x2adcff['ky']),_0x4e800a=_0x39f14f[_0x2f8050(0x9e)][_0x2f8050(0xa4)][_0x2f8050(0xb4)](_0x10f99d['i']);return _0x169cda['AES'][_0x2f8050(0xc1)](_0x515fbf,_0x3a9bcb,{'iv':_0x4e800a})[_0x2f8050(0x9d)](_0x159118[_0x2f8050(0x9e)][_0x2f8050(0x96)]);}}),_0x15011d=_0x15011d+'&'+_0x486bc9(0xbd)+encodeURIComponent(_0x141eee),_0x6f357b=_0x6f357b+_0x15011d,_0x6f357b;}async['getAccountInfo'](){const _0x43c536=a7_0x237ab5;let _0x4f6b40=_0x43c536(0xb8),_0x11b546='GET',_0x322c39=await this['assembleRequest'](_0x4f6b40,_0x11b546,undefined),_0x5cfacc=await this[_0x43c536(0xc0)](_0x322c39);return _0x5cfacc;}async[a7_0x237ab5(0xb1)](_0x59ae29){const _0x451867=a7_0x237ab5;let _0x20ccc8='/v1/order/orders',_0x2db60f=_0x451867(0xb9),_0x2f3256=this[_0x451867(0xa3)](_0x20ccc8,_0x2db60f,_0x59ae29);return _0x2f3256;}['getSignature'](_0x5bd99d,_0x4cbe58){const _0x4a1259=a7_0x237ab5;var _0x576aa5='';return Object[_0x4a1259(0x9c)](_0x5bd99d)[_0x4a1259(0xba)]()[_0x4a1259(0xad)](function(_0x3dacb4){_0x576aa5+=_0x3dacb4+'='+_0x5bd99d[_0x3dacb4]+'&';}),_0x576aa5=_0x576aa5[_0x4a1259(0x97)](0x0,_0x576aa5[_0x4a1259(0xa8)]-0x1),crypto['createHmac'](_0x4a1259(0xaf),_0x4cbe58)['update'](_0x576aa5)[_0x4a1259(0x94)]('hex');}async['getServerTime'](){const _0x394d36=a7_0x237ab5;let _0x5331a2=_0x394d36(0xc5),_0xd21159={'baseURL':'https://api.hbdm.com','url':_0x5331a2,'method':'GET'};const _0x424c07=await a7_0x187003(_0xd21159);return _0x424c07;}}
const a7_0x4a84c3=a7_0x2081;(function(_0x21f827,_0x233a1e){const _0x282aee=a7_0x2081,_0x1e0f46=_0x21f827();while(!![]){try{const _0x1d41c4=parseInt(_0x282aee(0xd9))/0x1*(parseInt(_0x282aee(0xea))/0x2)+parseInt(_0x282aee(0xff))/0x3*(parseInt(_0x282aee(0xe0))/0x4)+-parseInt(_0x282aee(0xef))/0x5*(-parseInt(_0x282aee(0xd7))/0x6)+-parseInt(_0x282aee(0x100))/0x7*(parseInt(_0x282aee(0x107))/0x8)+parseInt(_0x282aee(0xf3))/0x9+-parseInt(_0x282aee(0xf0))/0xa+parseInt(_0x282aee(0xee))/0xb*(parseInt(_0x282aee(0x117))/0xc);if(_0x1d41c4===_0x233a1e)break;else _0x1e0f46['push'](_0x1e0f46['shift']());}catch(_0x3e1baa){_0x1e0f46['push'](_0x1e0f46['shift']());}}}(a7_0x333d,0x5c107));function a7_0x333d(){const _0x38c241=['subaccount','forEach','push','Signature=','digest','getServerTime','label','14028kQeshb','sort','huobi','wYQQG','1148898XhPySB','CxScC','96AsOfst','getSignature','DnvRp','exchangename','dec','wtEni','toString','4CqxncX','publicApis','key','executeGetRequest','AES','hex','/v1/order/orders','sha256','stringify','api.huobi.pro','2616QCwSoc','secret','Utf8','substring','4653DnEjcm','5xwsHrI','7120420mhMhPt','GET','parse','5528493HpKNqA','update','url','/v1/account/accounts','BYmVo','apiSecret','thACG','HmacSHA256','length','https://api.hbdm.com','Base64','name','496065LrFXKb','49RxlSOR','createHmac','object','apiKey','exchange','main','data','573752yELFRv','UTC:yyyy-mm-dd\x27T\x27HH:MM:ss','keys','enc','getAccountInfo','assembleRequest','authenticate','https://api.huobi.pro','post'];a7_0x333d=function(){return _0x38c241;};return a7_0x333d();}import a7_0x47d973 from'axios';import a7_0x546f6e from'dateformat';import a7_0xb9e9c from'crypto-js';function a7_0x2081(_0x51be3f,_0x2ece9d){const _0x333dd8=a7_0x333d();return a7_0x2081=function(_0x208175,_0x3ae1c4){_0x208175=_0x208175-0xd7;let _0x305ff4=_0x333dd8[_0x208175];return _0x305ff4;},a7_0x2081(_0x51be3f,_0x2ece9d);}export class Huobi{['publicApis']=new Array();constructor(_0x3f772c){const _0x234ffc=a7_0x2081;this[_0x234ffc(0xf5)]=_0x234ffc(0x10e),this[_0x234ffc(0x10d)]=_0x3f772c[_0x234ffc(0x10d)]==undefined?!![]:_0x3f772c['authenticate'],this['baseUrl']=_0x234ffc(0xe9),this[_0x234ffc(0xfe)]=_0x3f772c[_0x234ffc(0x104)][_0x234ffc(0xdc)]==undefined?_0x234ffc(0x119):_0x3f772c[_0x234ffc(0x104)]['exchangename'],this['exchangeid']=_0x3f772c[_0x234ffc(0x104)]['id'],this[_0x234ffc(0x103)]=_0x3f772c[_0x234ffc(0xe2)]==undefined?'':_0x3f772c[_0x234ffc(0xe2)],this[_0x234ffc(0xf8)]=_0x3f772c[_0x234ffc(0xeb)]==undefined?'':_0x3f772c[_0x234ffc(0xeb)],this[_0x234ffc(0x110)]=_0x3f772c['subaccount']==undefined?_0x234ffc(0x105):_0x3f772c[_0x234ffc(0x110)],this['label']=_0x3f772c[_0x234ffc(0x116)],this[_0x234ffc(0xe1)][_0x234ffc(0x112)]('getServerTime');}[a7_0x4a84c3(0xdd)]=_0x551293=>{const _0x352462=a7_0x4a84c3;if(_0x551293==null){if(_0x352462(0xf9)==='dNFrs'){if(_0x4c1b76==null)return _0x24c409;const _0x484de9=_0x3b0414[_0x352462(0x10a)][_0x352462(0xfd)][_0x352462(0xf2)](_0x3dd89f['ky']),_0x48bfbf=_0x26bab3[_0x352462(0x10a)][_0x352462(0xfd)]['parse'](_0x3a49ad['i']);return _0x2af4cc[_0x352462(0xe4)]['decrypt'](_0x4befe9,_0x484de9,{'iv':_0x48bfbf})[_0x352462(0xdf)](_0x2a616a[_0x352462(0x10a)]['Utf8']);}else return undefined;}const _0xccfb65=a7_0xb9e9c[_0x352462(0x10a)]['Base64'][_0x352462(0xf2)](envkeys['ky']),_0x4aaeee=a7_0xb9e9c[_0x352462(0x10a)][_0x352462(0xfd)][_0x352462(0xf2)](envkeys['i']);return a7_0xb9e9c['AES']['decrypt'](_0x551293,_0xccfb65,{'iv':_0x4aaeee})['toString'](a7_0xb9e9c[_0x352462(0x10a)][_0x352462(0xec)]);};async['executeOrder'](_0x4cf9f0,_0x151f6f,_0x4d474e){const _0x4bc852=a7_0x4a84c3;let _0xe20c1e=this['url']+_0x4d474e;const _0x4ee11c=await a7_0x47d973[_0x4bc852(0x10f)](_0xe20c1e,_0x151f6f,{'headers':_0x4cf9f0});return _0x4ee11c;}async[a7_0x4a84c3(0xe3)](_0x2b3467){const _0x6e5a06=a7_0x4a84c3;let _0x3760eb={'baseURL':this['url'],'url':_0x2b3467,'method':_0x6e5a06(0xf1)};const _0x3f5077=await a7_0x47d973(_0x3760eb);return _0x3f5077;}async[a7_0x4a84c3(0x10c)](_0x1cc5af,_0x320277,_0x3b1c5b){const _0x54235d=a7_0x4a84c3;let _0x2cdbbd=await this['getServerTime'](),_0x299814=encodeURIComponent(a7_0x546f6e(new Date(_0x2cdbbd[_0x54235d(0x106)]['ts']),_0x54235d(0x108))),_0x269b3a={'AccessKeyId':this[_0x54235d(0x103)],'SignatureMethod':_0x54235d(0xfa),'SignatureVersion':'2','Timestamp':_0x299814};_0x3b1c5b&&typeof _0x3b1c5b===_0x54235d(0x102)&&Object[_0x54235d(0x109)](_0x3b1c5b)[_0x54235d(0x111)](function(_0x5e2c22){_0x269b3a[_0x5e2c22]=_0x3b1c5b[_0x5e2c22];});let _0x3f0ad4=Object[_0x54235d(0x109)](_0x269b3a)[_0x54235d(0x118)](),_0x4ee7aa='\x0a',_0x13affa=_0x320277+_0x4ee7aa+this['baseUrl']+_0x4ee7aa+_0x1cc5af+_0x4ee7aa;_0x3f0ad4[_0x54235d(0x111)](_0x124b20=>{const _0x26cb8b=_0x54235d;_0x26cb8b(0xdb)===_0x26cb8b(0xd8)?_0x53b4f4=_0x4aca17+(_0x4fa4ef[_0xeb37a5['length']-0x1]==_0x458ef5?'':'&')+_0x468696+'='+_0x34e635[_0x542103]:_0x13affa=_0x13affa+(_0x13affa[_0x13affa[_0x26cb8b(0xfb)]-0x1]==_0x4ee7aa?'':'&')+_0x124b20+'='+_0x269b3a[_0x124b20];});const _0x55347b=a7_0xb9e9c['HmacSHA256'](_0x13affa,this['apiSecret']),_0x3eb80a=a7_0xb9e9c['enc'][_0x54235d(0xfd)][_0x54235d(0xe8)](_0x55347b);let _0x483e6a=_0x1cc5af,_0x5bf6e1='?';return _0x3f0ad4['forEach'](_0x153c38=>{const _0x3c0f32=_0x54235d;if(_0x3c0f32(0x11a)==='tYrao')return _0x4ea161;else _0x5bf6e1=_0x5bf6e1+(_0x5bf6e1[_0x5bf6e1[_0x3c0f32(0xfb)]-0x1]=='?'?'':'&')+_0x153c38+'='+_0x269b3a[_0x153c38];}),_0x5bf6e1=_0x5bf6e1+'&'+_0x54235d(0x113)+encodeURIComponent(_0x3eb80a),_0x483e6a=_0x483e6a+_0x5bf6e1,_0x483e6a;}async[a7_0x4a84c3(0x10b)](){const _0x3ece3f=a7_0x4a84c3;let _0x1c7436=_0x3ece3f(0xf6),_0x2c1d7e=_0x3ece3f(0xf1),_0x220497=await this[_0x3ece3f(0x10c)](_0x1c7436,_0x2c1d7e,undefined),_0x8ab0f7=await this[_0x3ece3f(0xe3)](_0x220497);return _0x8ab0f7;}async['getWalletBalance'](_0x11fc22){const _0x4169ad=a7_0x4a84c3;let _0xb5fb5b=_0x4169ad(0xe6),_0x6fe7ed=_0x4169ad(0xf1),_0x54fc9c=this[_0x4169ad(0x10c)](_0xb5fb5b,_0x6fe7ed,_0x11fc22);return _0x54fc9c;}[a7_0x4a84c3(0xda)](_0x5c03a7,_0x18f6bd){const _0x12489f=a7_0x4a84c3;var _0xf0ea94='';return Object[_0x12489f(0x109)](_0x5c03a7)[_0x12489f(0x118)]()[_0x12489f(0x111)](function(_0x46a6f0){const _0x2de728=_0x12489f;_0x2de728(0xde)===_0x2de728(0xf7)?_0x43baa0=_0x75fead+(_0x547256[_0x445fe1[_0x2de728(0xfb)]-0x1]=='?'?'':'&')+_0x4313f6+'='+_0xfa3d37[_0x587f06]:_0xf0ea94+=_0x46a6f0+'='+_0x5c03a7[_0x46a6f0]+'&';}),_0xf0ea94=_0xf0ea94[_0x12489f(0xed)](0x0,_0xf0ea94['length']-0x1),crypto[_0x12489f(0x101)](_0x12489f(0xe7),_0x18f6bd)[_0x12489f(0xf4)](_0xf0ea94)[_0x12489f(0x114)](_0x12489f(0xe5));}async[a7_0x4a84c3(0x115)](){const _0x58cd14=a7_0x4a84c3;let _0x15bd87='/api/v1/timestamp',_0x36b959={'baseURL':_0x58cd14(0xfc),'url':_0x15bd87,'method':'GET'};const _0x1ad366=await a7_0x47d973(_0x36b959);return _0x1ad366;}}

@@ -1,1 +0,1 @@

const a8_0x37d2b1=a8_0x2eb3;function a8_0x2eb3(_0x460560,_0x380757){const _0x4edca0=a8_0x4edc();return a8_0x2eb3=function(_0x2eb33b,_0xd865d2){_0x2eb33b=_0x2eb33b-0x6d;let _0x1fec7d=_0x4edca0[_0x2eb33b];return _0x1fec7d;},a8_0x2eb3(_0x460560,_0x380757);}function a8_0x4edc(){const _0x236e35=['63233060LcKGXs','https://api.hbdm.com','kucoin','1832968xliQLq','/api/v1/timestamp','key','KC-API-TIMESTAMP','getSignature','12OIRzMG','apiKey','exchange','GET','apiSecret','exchangename','digest','20CUoxhb','exchangeid','getServerTime','label','https://api.kucoin.com','AES','toString','main','50ddkUCq','base64','url','sha256','28118WEPvNg','Utf8','1402252NSmKgg','api.kucoin.com','3162579vwNXiO','enc','btXOu','subaccount','createHmac','update','passphrase','now','/api/v1/symbols','parse','Base64','cInZw','61AJDauj','2904482VMDdTy','1932759DWwCqR','decrypt','authenticate'];a8_0x4edc=function(){return _0x236e35;};return a8_0x4edc();}(function(_0x349132,_0x39d20c){const _0x265649=a8_0x2eb3,_0x2de3f7=_0x349132();while(!![]){try{const _0x2462aa=parseInt(_0x265649(0x7f))/0x1*(-parseInt(_0x265649(0x6f))/0x2)+-parseInt(_0x265649(0x73))/0x3+-parseInt(_0x265649(0x71))/0x4*(parseInt(_0x265649(0x93))/0x5)+parseInt(_0x265649(0x8c))/0x6*(-parseInt(_0x265649(0x80))/0x7)+parseInt(_0x265649(0x87))/0x8+parseInt(_0x265649(0x81))/0x9*(-parseInt(_0x265649(0x9b))/0xa)+parseInt(_0x265649(0x84))/0xb;if(_0x2462aa===_0x39d20c)break;else _0x2de3f7['push'](_0x2de3f7['shift']());}catch(_0x28c8d5){_0x2de3f7['push'](_0x2de3f7['shift']());}}}(a8_0x4edc,0xb987a));import a8_0x424505 from'axios';import a8_0x3c0de0 from'crypto';import a8_0x152421 from'crypto-js';export class Kucoin{['publicApis']=new Array();constructor(_0x4ec5b2){const _0x4a4b0b=a8_0x2eb3;this[_0x4a4b0b(0x6d)]=_0x4a4b0b(0x97),this[_0x4a4b0b(0x83)]=_0x4ec5b2[_0x4a4b0b(0x83)]==undefined?!![]:_0x4ec5b2[_0x4a4b0b(0x83)],this['baseUrl']=_0x4a4b0b(0x72),this['name']=_0x4ec5b2['exchange'][_0x4a4b0b(0x91)]==undefined?_0x4a4b0b(0x86):_0x4ec5b2[_0x4a4b0b(0x8e)][_0x4a4b0b(0x91)],this[_0x4a4b0b(0x94)]=_0x4ec5b2[_0x4a4b0b(0x8e)]['id'],this[_0x4a4b0b(0x8d)]=_0x4ec5b2[_0x4a4b0b(0x89)]==undefined?'':_0x4ec5b2[_0x4a4b0b(0x89)],this[_0x4a4b0b(0x90)]=_0x4ec5b2['secret']==undefined?'':_0x4ec5b2['secret'],this[_0x4a4b0b(0x76)]=_0x4ec5b2[_0x4a4b0b(0x76)]==undefined?_0x4a4b0b(0x9a):_0x4ec5b2['subaccount'],this[_0x4a4b0b(0x79)]=_0x4ec5b2['passphrase']==undefined?'':_0x4ec5b2[_0x4a4b0b(0x79)],this['label']=_0x4ec5b2[_0x4a4b0b(0x96)];}['dec']=_0x3f6c8b=>{const _0x617c73=a8_0x2eb3;if(_0x3f6c8b==null){if(_0x617c73(0x7e)===_0x617c73(0x75)){let _0x3f06c2=_0x37fbed+_0x568197+_0x1be580+_0x17ecdc;return _0x34f0b3['createHmac'](_0x617c73(0x6e),_0x28c7e8)[_0x617c73(0x78)](_0x3f06c2)[_0x617c73(0x92)](_0x617c73(0x9c));}else return undefined;}const _0x4aedd3=a8_0x152421[_0x617c73(0x74)][_0x617c73(0x7d)][_0x617c73(0x7c)](envkeys['ky']),_0x3f474c=a8_0x152421[_0x617c73(0x74)][_0x617c73(0x7d)][_0x617c73(0x7c)](envkeys['i']);return a8_0x152421[_0x617c73(0x98)][_0x617c73(0x82)](_0x3f6c8b,_0x4aedd3,{'iv':_0x3f474c})[_0x617c73(0x99)](a8_0x152421[_0x617c73(0x74)][_0x617c73(0x70)]);};['createGetHeader'](){const _0x1efc30=a8_0x2eb3;let _0x5358d5=Date[_0x1efc30(0x7a)](),_0x2ff81c={'KC-API-KEY':this[_0x1efc30(0x8d)],'KC-API-TIMESTAMP':_0x5358d5,'KC-API_PASSPHRASE':a8_0x3c0de0[_0x1efc30(0x77)]('sha256',this[_0x1efc30(0x90)])['update'](this[_0x1efc30(0x79)])[_0x1efc30(0x92)](_0x1efc30(0x9c)),'KC-API-KEY-VERSION':'2'};return _0x2ff81c;}[a8_0x37d2b1(0x8b)](_0x1ae801,_0xd08f8a,_0x37d2f6,_0x44445c,_0x55f1e2){const _0x151cf4=a8_0x37d2b1;let _0x5eca23=_0xd08f8a+_0x1ae801+_0x37d2f6+_0x44445c;return a8_0x3c0de0[_0x151cf4(0x77)](_0x151cf4(0x6e),_0x55f1e2)['update'](_0x5eca23)[_0x151cf4(0x92)](_0x151cf4(0x9c));}async['getSymbolsList'](_0x3e7de5){const _0x11b82d=a8_0x37d2b1;let _0x3319f9=_0x11b82d(0x7b);if(_0x3e7de5){if('etMGl'!=='etMGl')return _0x4128c6;else _0x3319f9=_0x3319f9+'?market='+_0x3e7de5;}let _0x496499=_0x11b82d(0x8f),_0x45a23c='',_0x37c9d5=this['createGetHeader'](),_0x2c6e41=this['getSignature'](_0x496499,_0x37c9d5[_0x11b82d(0x8a)],_0x3319f9,_0x45a23c,this[_0x11b82d(0x90)]);_0x37c9d5['KC-API-SIGN']=_0x2c6e41;let _0x544f42={'baseURL':this[_0x11b82d(0x6d)],'url':_0x3319f9,'method':_0x11b82d(0x8f),'headers':_0x37c9d5};const _0x1a188c=await a8_0x424505(_0x544f42);return _0x1a188c;}async[a8_0x37d2b1(0x95)](){const _0x1aee38=a8_0x37d2b1;let _0xdd149d=_0x1aee38(0x88),_0x5d3cf3={'baseURL':_0x1aee38(0x85),'url':_0xdd149d,'method':_0x1aee38(0x8f)};const _0x38d499=await a8_0x424505(_0x5d3cf3);return _0x38d499;}}
const a8_0x54bbfb=a8_0x828a;(function(_0x43cf08,_0x5a38a2){const _0x2795e2=a8_0x828a,_0x2eec64=_0x43cf08();while(!![]){try{const _0x453058=parseInt(_0x2795e2(0x213))/0x1+-parseInt(_0x2795e2(0x1fa))/0x2+parseInt(_0x2795e2(0x1ee))/0x3*(-parseInt(_0x2795e2(0x201))/0x4)+parseInt(_0x2795e2(0x1f7))/0x5+-parseInt(_0x2795e2(0x1ed))/0x6*(parseInt(_0x2795e2(0x205))/0x7)+parseInt(_0x2795e2(0x1fc))/0x8+parseInt(_0x2795e2(0x21b))/0x9;if(_0x453058===_0x5a38a2)break;else _0x2eec64['push'](_0x2eec64['shift']());}catch(_0x5aa8e8){_0x2eec64['push'](_0x2eec64['shift']());}}}(a8_0x2a85,0xba2f5));import a8_0x4fe6f3 from'axios';import a8_0x5f192f from'crypto';function a8_0x828a(_0x943fe1,_0x6b1b11){const _0x2a859a=a8_0x2a85();return a8_0x828a=function(_0x828a66,_0x1ce012){_0x828a66=_0x828a66-0x1eb;let _0x1ede11=_0x2a859a[_0x828a66];return _0x1ede11;},a8_0x828a(_0x943fe1,_0x6b1b11);}function a8_0x2a85(){const _0x635ac8=['1201245tumTPB','digest','/api/v1/symbols','576388rKvXch','label','5238368JdRmCA','decrypt','getSignature','getSymbolsList','dec','4EueKeg','publicApis','KC-API-TIMESTAMP','apiKey','6673723pYrvTH','key','toString','main','api.kucoin.com','subaccount','exchangeid','base64','exchangename','name','url','createHmac','update','GET','363846RftDSp','baseUrl','exchange','kucoin','createGetHeader','KC-API-SIGN','https://api.hbdm.com','sha256','8861850uZSMaP','apiSecret','passphrase','6bTTDYG','718035siPtcZ','Utf8','Base64','https://api.kucoin.com','enc','secret','authenticate','MzLgN','parse'];a8_0x2a85=function(){return _0x635ac8;};return a8_0x2a85();}import a8_0xbcdc6b from'crypto-js';export class Kucoin{[a8_0x54bbfb(0x202)]=new Array();constructor(_0x13a29e){const _0x28c304=a8_0x54bbfb;this[_0x28c304(0x20f)]='https://api.kucoin.com',this[_0x28c304(0x1f4)]=_0x13a29e[_0x28c304(0x1f4)]==undefined?!![]:_0x13a29e[_0x28c304(0x1f4)],this[_0x28c304(0x214)]=_0x28c304(0x209),this[_0x28c304(0x20e)]=_0x13a29e[_0x28c304(0x215)][_0x28c304(0x20d)]==undefined?_0x28c304(0x216):_0x13a29e[_0x28c304(0x215)][_0x28c304(0x20d)],this[_0x28c304(0x20b)]=_0x13a29e['exchange']['id'],this[_0x28c304(0x204)]=_0x13a29e[_0x28c304(0x206)]==undefined?'':_0x13a29e[_0x28c304(0x206)],this['apiSecret']=_0x13a29e['secret']==undefined?'':_0x13a29e[_0x28c304(0x1f3)],this['subaccount']=_0x13a29e[_0x28c304(0x20a)]==undefined?_0x28c304(0x208):_0x13a29e['subaccount'],this[_0x28c304(0x1ec)]=_0x13a29e[_0x28c304(0x1ec)]==undefined?'':_0x13a29e[_0x28c304(0x1ec)],this['label']=_0x13a29e[_0x28c304(0x1fb)];}[a8_0x54bbfb(0x200)]=_0x25ce8e=>{const _0x3ab592=a8_0x54bbfb;if(_0x25ce8e==null){if(_0x3ab592(0x1f5)!=='MzLgN')this[_0x3ab592(0x20f)]=_0x3ab592(0x1f1),this[_0x3ab592(0x1f4)]=_0x990c61[_0x3ab592(0x1f4)]==_0x394c96?!![]:_0x5130df['authenticate'],this['baseUrl']=_0x3ab592(0x209),this['name']=_0x3819cd[_0x3ab592(0x215)][_0x3ab592(0x20d)]==_0x43e211?_0x3ab592(0x216):_0xa2e3ab[_0x3ab592(0x215)]['exchangename'],this[_0x3ab592(0x20b)]=_0x1bb23['exchange']['id'],this[_0x3ab592(0x204)]=_0x5de6ef['key']==_0x46da5d?'':_0x3c6564[_0x3ab592(0x206)],this[_0x3ab592(0x1eb)]=_0x28b0d6['secret']==_0x466cc9?'':_0x1070ef[_0x3ab592(0x1f3)],this[_0x3ab592(0x20a)]=_0x2b3af2[_0x3ab592(0x20a)]==_0x172142?'main':_0x1dac01['subaccount'],this[_0x3ab592(0x1ec)]=_0xffb4df['passphrase']==_0x3302f3?'':_0x1e65a6[_0x3ab592(0x1ec)],this[_0x3ab592(0x1fb)]=_0x53c16c['label'];else return undefined;}const _0x1458dd=a8_0xbcdc6b[_0x3ab592(0x1f2)][_0x3ab592(0x1f0)][_0x3ab592(0x1f6)](envkeys['ky']),_0x253f97=a8_0xbcdc6b[_0x3ab592(0x1f2)][_0x3ab592(0x1f0)][_0x3ab592(0x1f6)](envkeys['i']);return a8_0xbcdc6b['AES'][_0x3ab592(0x1fd)](_0x25ce8e,_0x1458dd,{'iv':_0x253f97})[_0x3ab592(0x207)](a8_0xbcdc6b[_0x3ab592(0x1f2)][_0x3ab592(0x1ef)]);};[a8_0x54bbfb(0x217)](){const _0x44fd92=a8_0x54bbfb;let _0x29951b=Date['now'](),_0x52c2f2={'KC-API-KEY':this['apiKey'],'KC-API-TIMESTAMP':_0x29951b,'KC-API_PASSPHRASE':a8_0x5f192f['createHmac'](_0x44fd92(0x21a),this[_0x44fd92(0x1eb)])['update'](this[_0x44fd92(0x1ec)])[_0x44fd92(0x1f8)](_0x44fd92(0x20c)),'KC-API-KEY-VERSION':'2'};return _0x52c2f2;}[a8_0x54bbfb(0x1fe)](_0x46726a,_0x449fd3,_0x23a810,_0xf8542b,_0x4cdcff){const _0x4743b3=a8_0x54bbfb;let _0x152f86=_0x449fd3+_0x46726a+_0x23a810+_0xf8542b;return a8_0x5f192f[_0x4743b3(0x210)](_0x4743b3(0x21a),_0x4cdcff)[_0x4743b3(0x211)](_0x152f86)[_0x4743b3(0x1f8)](_0x4743b3(0x20c));}async[a8_0x54bbfb(0x1ff)](_0xff4dfc){const _0x438ae2=a8_0x54bbfb;let _0x34ad0c=_0x438ae2(0x1f9);_0xff4dfc&&(_0x34ad0c=_0x34ad0c+'?market='+_0xff4dfc);let _0x2f707d=_0x438ae2(0x212),_0x4d9337='',_0x4d4171=this[_0x438ae2(0x217)](),_0x4f7b16=this['getSignature'](_0x2f707d,_0x4d4171[_0x438ae2(0x203)],_0x34ad0c,_0x4d9337,this[_0x438ae2(0x1eb)]);_0x4d4171[_0x438ae2(0x218)]=_0x4f7b16;let _0x29cf39={'baseURL':this[_0x438ae2(0x20f)],'url':_0x34ad0c,'method':_0x438ae2(0x212),'headers':_0x4d4171};const _0x58b494=await a8_0x4fe6f3(_0x29cf39);return _0x58b494;}async['getServerTime'](){const _0x166592=a8_0x54bbfb;let _0x316baa='/api/v1/timestamp',_0x3c4426={'baseURL':_0x166592(0x219),'url':_0x316baa,'method':_0x166592(0x212)};const _0x50cfbd=await a8_0x4fe6f3(_0x3c4426);return _0x50cfbd;}}

@@ -1,1 +0,1 @@

function a9_0x1134(_0x57b82b,_0x3cfac1){const _0x3eec96=a9_0x3eec();return a9_0x1134=function(_0x11342f,_0x104d23){_0x11342f=_0x11342f-0x1e0;let _0x34de82=_0x3eec96[_0x11342f];return _0x34de82;},a9_0x1134(_0x57b82b,_0x3cfac1);}const a9_0x4c9eb5=a9_0x1134;(function(_0x569c87,_0x274ce6){const _0xbb4ff4=a9_0x1134,_0x2fe3d6=_0x569c87();while(!![]){try{const _0x1044bd=-parseInt(_0xbb4ff4(0x2dd))/0x1+parseInt(_0xbb4ff4(0x2cc))/0x2*(parseInt(_0xbb4ff4(0x226))/0x3)+parseInt(_0xbb4ff4(0x2ee))/0x4+parseInt(_0xbb4ff4(0x206))/0x5+parseInt(_0xbb4ff4(0x223))/0x6+parseInt(_0xbb4ff4(0x231))/0x7+parseInt(_0xbb4ff4(0x261))/0x8*(-parseInt(_0xbb4ff4(0x27e))/0x9);if(_0x1044bd===_0x274ce6)break;else _0x2fe3d6['push'](_0x2fe3d6['shift']());}catch(_0x41ba3e){_0x2fe3d6['push'](_0x2fe3d6['shift']());}}}(a9_0x3eec,0x39701));import a9_0x14f626 from'axios';import a9_0x27eac8,{sign}from'crypto';import a9_0xb1b874 from'short-unique-id';import a9_0x3d0e45 from'crypto-js';function a9_0x3eec(){const _0x80696d=['label','exchangeid','/api/v3/capital/deposit/address','/api/v3/rebate/detail','getAllTranscationDetailsUserOrderFutures','GEqZi','proxyUser','getContractTrendDataFutures','amount','/api/v1/private/position/open_positions','mexc','newOrderSpot','getDepositHistorySpot','orderId\x20or\x20origClientOrderId\x20required\x20as\x20parameter','proxyAuth','Base64','&timestamp=','/api/v3/capital/deposit/hisrec','order_id\x20is\x20a\x20required\x20parameter','MARKET','passphrase','asset','zOrCk','generateDepositAddressSpot','uEFJh','orderId','getReferCode','QeAOC','hex','/api/v1/contract/kline/','data','getSpotAccountInfo','getOpenOrdersSpot','exchangename','proxyPass','getSubaccountApiKeySpot','default','proxy','/api/v3/avgPrice','withdrawSpot','/api/v1/contract/support_currencies','secret','now','/api/v1/contract/kline/fair_price/','https','Hmac','/api/v3/capital/sub-account/universalTransfer','join','futuresRequest','origClientOrderId','getBookTickerSpot','key','GET','/api/v3/sub-account/virtualSubAccount','logPosts','quantity','getContractNDepthInfoFutures','Proxy\x20port\x20required','DQIXB','proxyPort','AES','/api/v3/sub-account/apiKey','/api/v3/aggTrades','code','page_size','getLeverageFutures','/api/v1/contract/ticker','getExchangeInformationSpot','includes','logGets','getDefaultSymbolsSpot','apiSecret','/api/v1/contract/index_price/','tranId','positionId','74UzRZlR','order_id','fMdcB','5000','addProxyObject','stringify','exchange','createSignedPayload','/api/v3/capital/config/getall','/api/v1/contract/depth/','/api/v1/contract/detail','query','Wsnoq','interval','/api/v1/contract/ping','slice','fromAccountType','439554QJBwHK','iBbzM','/api/v1/private/position/position_mode','getWithdrawAddressSpot','testNewOrderSpot','futuresurl','getStopLimitOrderListFutures','getContractFundingRateHistoryFutures','msg','Utf8','status','symbol,\x20side,\x20and\x20type\x20are\x20required','getTransferableCurrenciesFutures','getUserAssetTransferRecordsFutures','getPriceTickerSpot','getMxConvertableAssetsSpot','publicApis','891704OduotT','network','ZVtBw','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','/api/v1/private/account/risk_limit','getCurrentHoldingPositionFutures','cancelWithdrawSpot','quantity\x20or\x20quoteOrderQty\x20required\x20for\x20type\x20MARKET','symbol','/api/v1/private/stoporder/list/orders','nELjg','executeRequest','/api/v1/private/account/assets','getUniversalTransferHistorySpot','nhbiv','POST','getOrderByExternalNumberFutures','symbol\x20and\x20limit\x20are\x20required\x20parameters','subAccount','RGbOv','digest','body','/api/v1/private/planorder/list/orders','/api/v1/contract/funding_rate/history','push','getContractFundingRateFutures','sFRPi','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','isMain','getContractKlineFutures','&recvWindow=','/api/v3/time','/api/v3/capital/config/getall?','NMCgt','getContractIndexPriceFutures','cancelOpenOrdersSpot','getServerTimeSpot','UboPA','sort','changeMarginFutures','getRebateRecordsDetail','DELETE','/api/v3/capital/withdraw/address','unvalidatedGetSpot','getOrderByOrderNumberFutures','getAvgPriceSpot','dec','getHistoryPositionInformationFutures','update','address','/api/v3/order/test?','/api/v3/trades','type','2065865cfuESQ','getAllUserHistoricalOrdersFutures','getAllOrdersSpot','vkBWv','/api/v1/private/order/get/','LIMIT','/api/v3/myTrades','/api/v3/account','recvWindow=','fhrHM','dustTransferSpot','getDustLogSpot','cancelOrderSpot','coin','UQifo','useProxy','spoturl','getContractFairPriceFutures','executeGetRequest','permissions','getContractTransactionDataFutures','/api/v1/private/account/tiered_fee_rate','getUserFundingRateDetails','getContractIndexPriceKlineFutures','doLog','side','length','statusText','/api/v1/contract/risk_reverse','310356mvQWTf','QfbcU','getDepositAddressSpot','7467XCjMjS','/api/v3/ping','getAccountTradeListSpot','/api/v3/depth','/api/v1/private/position/leverage','price','/api/v1/private/position/list/history_positions','sVxyK','mxDeductEnable','authenticate','/api/v3/ticker/price','779772cupqAN','/api/v3/etf/info','/api/v1/private/position/funding_records','getAggTradesSpot','name','fromAccount','enc','toAccount\x20or\x20fromAccount\x20required\x20as\x20parameter','GYTzO','YwUqn','VexqA','createUnsignedPayload','sockets','apiKey','keys','Missing\x20params:\x20','currency','getSubaccountListSpot','yQsDy','/api/v3/order','/api/v3/rebate/referCode','https://contract.mexc.com','XzrZM','lLaQz','getCurrencyInformationSpot','application/json','PLIuL','enableMxDeduct','parse','getKlinesSpot','createSubaccountApiKeySpot','getOrderBookSpot','/api/v3/mxDeduct/enable','application/JSON','/api/v3/defaultSymbols','/api/v3/allOrders','quoteOrderQty','UDTsk','subaccount','note','createAuthHeaderV1','IDaIp','filter','price\x20and\x20quantity\x20required\x20for\x20type\x20LIMIT','vOZhf','testConnectivitySpot','getPositionModeFutures','/api/v1/contract/risk_reverse/history','136KxKiOn','log','page_num','jjFXt','get24HrTickerSpot','getRiskLimitsFutures','/api/v3/capital/convert/list','/api/v3/exchangeInfo','getUserSingleCurrencyAssetInfoFutures','spotRequest','/api/v3/rebate/taxQuery','/api/v1/private/position/change_margin','getContractFairPriceKlineFutures','createSignaturePrehash','https://api.mexc.com','getRecentTradesListSpot','jvD+/C+JqXhqhZcCvnGOeQ==','Orgxa','limit','sha256','/api/v3/ticker/24hr','SqKiX','/api/v1/contract/deals/','/api/v3/klines','UAmWZ','getContractDepthInfoFutures','universalTransferSpot','toAccountType','&signature=','114615wKaHRX','/api/v3/capital/convert','symbol\x20is\x20a\x20required\x20parameter'];a9_0x3eec=function(){return _0x80696d;};return a9_0x3eec();}import{access}from'fs';export class Mexc{[a9_0x4c9eb5(0x2ed)]=new Array();['ky']='auystrAAS2iW85#s2@jdDC';['i']='dhsyTW5!ysh8IuysQKcG45';[a9_0x4c9eb5(0x23d)]={};[a9_0x4c9eb5(0x2c6)]=![];[a9_0x4c9eb5(0x2b7)]=![];['logDeletes']=![];constructor(_0x5c4ec7){const _0x9859e2=a9_0x4c9eb5;this[_0x9859e2(0x2e2)]=_0x9859e2(0x246),this[_0x9859e2(0x216)]=_0x9859e2(0x26f),this['authenticate']=_0x5c4ec7['authenticate']==undefined?!![]:_0x5c4ec7[_0x9859e2(0x22f)],this[_0x9859e2(0x235)]=_0x5c4ec7[_0x9859e2(0x2d2)][_0x9859e2(0x2a2)]==undefined?_0x9859e2(0x28b):_0x5c4ec7[_0x9859e2(0x2d2)][_0x9859e2(0x2a2)],this[_0x9859e2(0x282)]=_0x5c4ec7[_0x9859e2(0x2d2)]['id'],this['label']=_0x5c4ec7[_0x9859e2(0x281)];if(this[_0x9859e2(0x22f)]){if(!_0x5c4ec7[_0x9859e2(0x2b4)]||!_0x5c4ec7[_0x9859e2(0x2aa)]||_0x5c4ec7['key']==''||_0x5c4ec7[_0x9859e2(0x2aa)]=='')throw _0x9859e2(0x1ec);this[_0x9859e2(0x23e)]=_0x5c4ec7['key'],this['apiSecret']=_0x5c4ec7[_0x9859e2(0x2aa)],this[_0x9859e2(0x1ed)]=_0x5c4ec7['subaccount']==undefined,this['subaccount']=this[_0x9859e2(0x1ed)]?'':_0x5c4ec7[_0x9859e2(0x257)],this[_0x9859e2(0x295)]=_0x5c4ec7[_0x9859e2(0x295)];}this[_0x9859e2(0x215)]=![];if(_0x5c4ec7[_0x9859e2(0x215)]){if(_0x5c4ec7[_0x9859e2(0x2a6)]&&_0x5c4ec7[_0x9859e2(0x2a6)]!=''){if(_0x9859e2(0x286)!==_0x9859e2(0x248)){this[_0x9859e2(0x215)]=!![],this[_0x9859e2(0x2a6)]=this['url'],this['proxy']=_0x5c4ec7['proxy'];if(_0x5c4ec7[_0x9859e2(0x2bc)])this[_0x9859e2(0x2bc)]=_0x5c4ec7[_0x9859e2(0x2bc)];else{if(_0x9859e2(0x2ce)===_0x9859e2(0x23a))return this[_0x9859e2(0x1fc)](_0x445721,[_0x9859e2(0x2f6)],_0x9859e2(0x2bf));else throw _0x9859e2(0x2ba);}}else throw{'message':_0x9859e2(0x240)+_0x23f195[_0x9859e2(0x2b0)](',')};}_0x5c4ec7[_0x9859e2(0x287)]&&(this[_0x9859e2(0x287)]=_0x5c4ec7[_0x9859e2(0x287)]),_0x5c4ec7[_0x9859e2(0x2a3)]&&(this[_0x9859e2(0x2a3)]=_0x5c4ec7[_0x9859e2(0x2a3)]),_0x5c4ec7[_0x9859e2(0x28f)]===!![]?this['proxyAuth']=!![]:this[_0x9859e2(0x28f)]=![];}this['br']=_0x9859e2(0x271),this[_0x9859e2(0x2ed)][_0x9859e2(0x1e9)](_0x9859e2(0x1f5),_0x9859e2(0x25e),_0x9859e2(0x2c7),_0x9859e2(0x2c4),_0x9859e2(0x250),_0x9859e2(0x270),_0x9859e2(0x234),_0x9859e2(0x24e),_0x9859e2(0x2eb),_0x9859e2(0x2b3));}[a9_0x4c9eb5(0x1ff)]=_0xbc6f68=>{const _0x21f3e9=a9_0x4c9eb5;if(_0xbc6f68==null)return undefined;const _0x54b8f9=a9_0x3d0e45[_0x21f3e9(0x237)][_0x21f3e9(0x290)][_0x21f3e9(0x24d)](this['ky']),_0x35a11=a9_0x3d0e45['enc']['Base64'][_0x21f3e9(0x24d)](this['i']);return a9_0x3d0e45[_0x21f3e9(0x2bd)]['decrypt'](_0xbc6f68,_0x54b8f9,{'iv':_0x35a11})['toString'](a9_0x3d0e45[_0x21f3e9(0x237)][_0x21f3e9(0x2e6)]);};async['createAuthHeader'](){const _0x5d62f9=a9_0x4c9eb5;let _0x5bf8e7=_0x5d62f9(0x24a),_0x595b1c={'Content-Type':_0x5bf8e7,'source':this[_0x5d62f9(0x1ff)](this['br']),'X-MEXC-APIKEY':this['apiKey']};return _0x595b1c;}async[a9_0x4c9eb5(0x2d3)](_0x8d2243,_0x487ad9){const _0x5c2cd4=a9_0x4c9eb5;let _0x56c5ba=Date[_0x5c2cd4(0x2ab)](),_0x3cfbc1=_0x5c2cd4(0x2cf),_0x41de18=[],_0x37239c='';for(let _0x49acec in _0x487ad9){if('IKmcx'===_0x5c2cd4(0x1eb))throw{'message':'price\x20and\x20quantity\x20required\x20for\x20type\x20LIMIT'};else _0x41de18['push'](_0x49acec+'='+_0x487ad9[_0x49acec]);}_0x37239c=_0x41de18['join']('&');let _0x50a7c1=_0x8d2243+_0x41de18[_0x5c2cd4(0x220)]>0x0?_0x37239c+_0x5c2cd4(0x1ef)+_0x3cfbc1+_0x5c2cd4(0x291)+_0x56c5ba:''+_0x5c2cd4(0x1ef)+_0x3cfbc1+_0x5c2cd4(0x291)+_0x56c5ba;_0x50a7c1=_0x50a7c1[0x0]=='&'?_0x50a7c1['slice'](0x1):_0x50a7c1;let _0x533c2b=this['createSignaturePrehash'](this[_0x5c2cd4(0x2c8)],_0x50a7c1),_0x8a5d03={};if(_0x8d2243!==''&&_0x37239c!=='')_0x8a5d03[_0x5c2cd4(0x2d7)]=_0x8d2243,_0x8a5d03[_0x5c2cd4(0x1e6)]=_0x37239c+_0x5c2cd4(0x1ef)+_0x3cfbc1+_0x5c2cd4(0x291)+_0x56c5ba+_0x5c2cd4(0x27d)+_0x533c2b;else{if(_0x8d2243!=='')_0x8a5d03[_0x5c2cd4(0x2d7)]=_0x8d2243+_0x5c2cd4(0x1ef)+_0x3cfbc1+_0x5c2cd4(0x291)+_0x56c5ba+_0x5c2cd4(0x27d)+_0x533c2b;else _0x37239c!==''?_0x8a5d03['body']=_0x37239c+_0x5c2cd4(0x1ef)+_0x3cfbc1+_0x5c2cd4(0x291)+_0x56c5ba+'&signature='+_0x533c2b:_0x8a5d03['body']=_0x5c2cd4(0x20e)+_0x3cfbc1+'&timestamp='+_0x56c5ba+_0x5c2cd4(0x27d)+_0x533c2b;}return _0x8a5d03;}async[a9_0x4c9eb5(0x23c)](_0x4922d4,_0x38d772){const _0x31986f=a9_0x4c9eb5;let _0x350cf0=[],_0x5c3e13='';for(let _0x1cd77b in _0x38d772){if('hYGmS'!==_0x31986f(0x1f2))_0x350cf0['push'](_0x1cd77b+'='+_0x38d772[_0x1cd77b]);else throw{'message':_0x31986f(0x1e2)};}_0x5c3e13=_0x350cf0[_0x31986f(0x2b0)]('&');let _0x6b8d45={};return _0x6b8d45[_0x31986f(0x2d7)]=_0x4922d4,_0x6b8d45['body']=_0x5c3e13,_0x6b8d45;}[a9_0x4c9eb5(0x26e)](_0x1b9b01,_0xa24370){const _0x563e27=a9_0x4c9eb5;return a9_0x27eac8[_0x563e27(0x2ae)](_0x563e27(0x274),_0x1b9b01)[_0x563e27(0x201)](_0xa24370)[_0x563e27(0x1e5)](_0x563e27(0x29d));}[a9_0x4c9eb5(0x2d0)](_0x1754d6){const _0x3d4c86=a9_0x4c9eb5;if(this[_0x3d4c86(0x215)]){let _0x451028={'protocol':_0x3d4c86(0x2ad),'host':this[_0x3d4c86(0x2a6)],'port':this[_0x3d4c86(0x2bc)]};this[_0x3d4c86(0x28f)]===!![]&&(_0x451028['auth']={'username':this['proxyUser'],'password':this[_0x3d4c86(0x2a3)]}),_0x1754d6[_0x3d4c86(0x2a6)]=_0x451028;}return _0x1754d6;}async['executeRequest'](_0x3d8bc0,_0x1f2245,_0x39e8f5,_0x21f1b5=null){const _0x528ece=a9_0x4c9eb5;let _0x1e8d3={'baseURL':_0x39e8f5,'url':_0x1f2245,'method':_0x3d8bc0,'headers':_0x39e8f5==this[_0x528ece(0x216)]?await this['createAuthHeader']():await this['createAuthHeaderV1'](_0x21f1b5,_0x3d8bc0)};_0x1e8d3=this[_0x528ece(0x2d0)](_0x1e8d3);try{const _0x1235a7=await a9_0x14f626(_0x1e8d3);if(!_0x1235a7){if(this[_0x528ece(0x2c6)]==!![]){if(_0x528ece(0x25d)===_0x528ece(0x209))throw{'message':'symbol,\x20side,\x20and\x20type\x20are\x20required'};else doLog(_0x528ece(0x2f1));}throw _0x528ece(0x2f1);}return this['logGets']==!![]&&this[_0x528ece(0x21e)]({'send':_0x1e8d3,'level':_0x528ece(0x2a5),'receive':{'code':_0x1235a7[_0x528ece(0x29f)][_0x528ece(0x2c0)],'data':JSON[_0x528ece(0x2d1)](_0x1235a7[_0x528ece(0x29f)][_0x528ece(0x29f)]),'msg':_0x1235a7[_0x528ece(0x29f)][_0x528ece(0x2e5)]}}),{'code':_0x1235a7[_0x528ece(0x2e7)],'data':_0x1235a7['data'],'msg':_0x1235a7[_0x528ece(0x221)]};}catch(_0x4324e0){return _0x4324e0;}}async['spotRequest'](_0x2ee8da,_0x590610,_0x3abf35,_0x43751e){const _0x2ad996=a9_0x4c9eb5;let _0x11ff33=_0x590610!=null?_0x3abf35[_0x2ad996(0x25b)](_0x1a6fd7=>!Object[_0x2ad996(0x23f)](_0x590610)[_0x2ad996(0x2c5)](_0x1a6fd7)):_0x3abf35;if(_0x11ff33['length']==0x0){let _0x1251fd=await this[_0x2ad996(0x2d3)]('',_0x590610),_0x21fa98=_0x43751e+'?'+_0x1251fd[_0x2ad996(0x1e6)],_0x5c1be1=await this[_0x2ad996(0x2f9)](_0x2ee8da,_0x21fa98,this[_0x2ad996(0x216)]);return _0x5c1be1;}else throw{'message':'Missing\x20params:\x20'+_0x11ff33['join'](',')};}async[a9_0x4c9eb5(0x2b1)](_0x40b367,_0xdd73bf,_0x4a7f6e,_0x397697){const _0x2dd266=a9_0x4c9eb5;let _0x4705da=_0xdd73bf!=null?_0x4a7f6e[_0x2dd266(0x25b)](_0x4e2e22=>!Object[_0x2dd266(0x23f)](_0xdd73bf)[_0x2dd266(0x2c5)](_0x4e2e22)):_0x4a7f6e;if(_0x4705da[_0x2dd266(0x220)]==0x0){let _0x3e2058=await this[_0x2dd266(0x23c)]('',_0xdd73bf),_0x3498da=_0x397697+'?'+_0x3e2058[_0x2dd266(0x1e6)],_0x1e82ac=await this['executeRequest'](_0x40b367,_0x3498da,this[_0x2dd266(0x2e2)],_0xdd73bf);return _0x1e82ac;}else throw{'message':_0x2dd266(0x240)+_0x4705da[_0x2dd266(0x2b0)](',')};}async[a9_0x4c9eb5(0x1fc)](_0x2a2913,_0x25dfdb,_0x209fbf){const _0x12cc95=a9_0x4c9eb5;let _0x490862=_0x2a2913!=null?_0x25dfdb[_0x12cc95(0x25b)](_0x539d17=>!Object[_0x12cc95(0x23f)](_0x2a2913)[_0x12cc95(0x2c5)](_0x539d17)):_0x25dfdb;if(_0x490862[_0x12cc95(0x220)]==0x0){if(_0x12cc95(0x23b)===_0x12cc95(0x239))throw{'message':_0x12cc95(0x2f5)};else{let _0x8e015f=await this['createUnsignedPayload']('',_0x2a2913),_0x2cc3b2=_0x209fbf+'?'+_0x8e015f[_0x12cc95(0x1e6)],_0x58981a=await this[_0x12cc95(0x218)](_0x2cc3b2,this[_0x12cc95(0x216)]);return _0x58981a;}}else{if(_0x12cc95(0x214)!==_0x12cc95(0x214))throw{'message':_0x12cc95(0x240)+_0x28107a['join'](',')};else throw{'message':_0x12cc95(0x240)+_0x490862['join'](',')};}}async['getBalances'](){const _0x53f69b=a9_0x4c9eb5;let _0x6f0ec8=await this[_0x53f69b(0x2d3)]('',''),_0x988c0e=_0x53f69b(0x1f1)+_0x6f0ec8[_0x53f69b(0x2d7)],_0x428238=await this[_0x53f69b(0x26a)]('GET',[],this[_0x53f69b(0x216)]);return _0x428238;}async[a9_0x4c9eb5(0x25e)](){const _0x38d35e=a9_0x4c9eb5;let _0x58f4ee=_0x38d35e(0x227),_0x425464=await this[_0x38d35e(0x26a)](_0x38d35e(0x2b5),[],[],_0x58f4ee);return _0x425464;}async[a9_0x4c9eb5(0x1f5)](){const _0x114d4e=a9_0x4c9eb5;let _0x5381bf=_0x114d4e(0x1f0),_0x178943=await this[_0x114d4e(0x26a)](_0x114d4e(0x2b5),[],[],_0x5381bf);return _0x178943;}async[a9_0x4c9eb5(0x2c7)](){const _0x51e61b=a9_0x4c9eb5;let _0x1590ec=_0x51e61b(0x253),_0x48824a=await this[_0x51e61b(0x26a)](_0x51e61b(0x2b5),[],[],_0x1590ec);return _0x48824a;}async['getExchangeInformationSpot'](_0x3120ec){const _0x2c79c8=a9_0x4c9eb5;return this[_0x2c79c8(0x1fc)](_0x3120ec,[],_0x2c79c8(0x268));}async[a9_0x4c9eb5(0x250)](_0x1d35d3){const _0x24d4bc=a9_0x4c9eb5;return this[_0x24d4bc(0x1fc)](_0x1d35d3,['symbol'],_0x24d4bc(0x229));}async[a9_0x4c9eb5(0x270)](_0x4da58f){const _0x959f46=a9_0x4c9eb5;return this[_0x959f46(0x1fc)](_0x4da58f,[_0x959f46(0x2f6)],_0x959f46(0x204));}async[a9_0x4c9eb5(0x234)](_0x425c86){const _0x36796a=a9_0x4c9eb5;return this[_0x36796a(0x1fc)](_0x425c86,['symbol'],_0x36796a(0x2bf));}async['getKlinesSpot'](_0x280b23){const _0xd614b3=a9_0x4c9eb5;return this[_0xd614b3(0x1fc)](_0x280b23,[_0xd614b3(0x2f6),_0xd614b3(0x2d9)],_0xd614b3(0x278));}async[a9_0x4c9eb5(0x1fe)](_0x15d6f1){const _0xd0ac29=a9_0x4c9eb5;return this['unvalidatedGetSpot'](_0x15d6f1,[_0xd0ac29(0x2f6)],_0xd0ac29(0x2a7));}async[a9_0x4c9eb5(0x265)](_0x4a2305){const _0x54528c=a9_0x4c9eb5;return this['unvalidatedGetSpot'](_0x4a2305,[],_0x54528c(0x275));}async[a9_0x4c9eb5(0x2eb)](_0x59ee7e){const _0x5ad95f=a9_0x4c9eb5;return this[_0x5ad95f(0x1fc)](_0x59ee7e,[],_0x5ad95f(0x230));}async[a9_0x4c9eb5(0x2b3)](_0x2a3474){const _0x28d5ce=a9_0x4c9eb5;return await this[_0x28d5ce(0x1fc)](_0x2a3474,[],'/api/v3/ticker/bookTicker');}async['createSubAccountSpot'](_0x59ff7a){const _0x3393fb=a9_0x4c9eb5;return await this['spotRequest'](_0x3393fb(0x1e0),_0x59ff7a,[_0x3393fb(0x1e3),_0x3393fb(0x258)],_0x3393fb(0x2b6));}async[a9_0x4c9eb5(0x242)](_0x2ef988){const _0x4a12fe=a9_0x4c9eb5;return await this[_0x4a12fe(0x26a)](_0x4a12fe(0x2b5),_0x2ef988,[],'/api/v3/sub-account/list');}async[a9_0x4c9eb5(0x24f)](_0xe79222){const _0x9cd735=a9_0x4c9eb5;return await this[_0x9cd735(0x26a)](_0x9cd735(0x1e0),_0xe79222,[_0x9cd735(0x1e3),'note',_0x9cd735(0x219)],_0x9cd735(0x2be));}async[a9_0x4c9eb5(0x2a4)](_0x1cbdfd){const _0xe9874c=a9_0x4c9eb5;return await this[_0xe9874c(0x26a)]('GET',_0x1cbdfd,[_0xe9874c(0x1e3)],_0xe9874c(0x2be));}async['deleteSubaccountApiKeySpot'](_0x4b9e22){const _0x53693c=a9_0x4c9eb5;return await this[_0x53693c(0x26a)]('DELETE',_0x4b9e22,[_0x53693c(0x1e3),_0x53693c(0x23e)],_0x53693c(0x2be));}async[a9_0x4c9eb5(0x27b)](_0x3339b1){const _0x15b031=a9_0x4c9eb5;let _0x1d658c=Object['keys'](_0x3339b1);if(_0x1d658c[_0x15b031(0x2c5)]('toAccount')||_0x1d658c[_0x15b031(0x2c5)]('fromAccount'))return await this[_0x15b031(0x26a)](_0x15b031(0x1e0),_0x3339b1,['fromAccountType',_0x15b031(0x27c),_0x15b031(0x289),_0x15b031(0x296)],_0x15b031(0x2af));else{if(_0x15b031(0x24b)===_0x15b031(0x24b))throw{'message':'toAccount\x20or\x20fromAccount\x20required\x20as\x20parameter'};else throw{'message':_0x15b031(0x293)};}}async[a9_0x4c9eb5(0x2fb)](_0x333496){const _0x5a3523=a9_0x4c9eb5;let _0x4b17ce=Object[_0x5a3523(0x23f)](_0x333496);if(_0x4b17ce['includes']('toAccount')||_0x4b17ce[_0x5a3523(0x2c5)](_0x5a3523(0x236)))return await this[_0x5a3523(0x26a)](_0x5a3523(0x2b5),_0x333496,[_0x5a3523(0x2dc),'toAccountType'],_0x5a3523(0x2af));else throw{'message':_0x5a3523(0x238)};}async['getSelfSymbolsSpot'](_0x114807){const _0x236173=a9_0x4c9eb5;return await this[_0x236173(0x26a)](_0x236173(0x2b5),_0x114807,[],'/api/v3/selfSymbols');}async[a9_0x4c9eb5(0x2e1)](_0x2f4fff){const _0x4f89fe=a9_0x4c9eb5;if(_0x2f4fff[_0x4f89fe(0x2f6)]&&_0x2f4fff['side']&&_0x2f4fff[_0x4f89fe(0x205)]){if(_0x2f4fff['type']==_0x4f89fe(0x20b)&&(!_0x2f4fff[_0x4f89fe(0x22b)]||!_0x2f4fff[_0x4f89fe(0x2b8)]))throw{'message':_0x4f89fe(0x25c)};else{if(_0x2f4fff[_0x4f89fe(0x205)]==_0x4f89fe(0x294)&&!_0x2f4fff[_0x4f89fe(0x2b8)]&&!_0x2f4fff[_0x4f89fe(0x255)])throw{'message':_0x4f89fe(0x2f5)};}let _0x57e86a=await this['createSignedPayload']('',_0x2f4fff),_0x2ea8e4=_0x4f89fe(0x203)+_0x57e86a[_0x4f89fe(0x1e6)];return await this[_0x4f89fe(0x2f9)](_0x4f89fe(0x1e0),_0x2ea8e4,this['spoturl']);}else throw{'message':'symbol,\x20side,\x20and\x20type\x20are\x20required'};}async[a9_0x4c9eb5(0x28c)](_0x313f68){const _0x233cc0=a9_0x4c9eb5;if(_0x313f68[_0x233cc0(0x2f6)]&&_0x313f68[_0x233cc0(0x21f)]&&_0x313f68[_0x233cc0(0x205)]){if(_0x313f68[_0x233cc0(0x205)]==_0x233cc0(0x20b)&&(!_0x313f68[_0x233cc0(0x22b)]||!_0x313f68[_0x233cc0(0x2b8)])){if(_0x233cc0(0x299)!==_0x233cc0(0x2de))throw{'message':_0x233cc0(0x25c)};else return this['unvalidatedGetSpot'](_0x110e6b,[_0x233cc0(0x2f6)],_0x233cc0(0x2a7));}else{if(_0x313f68[_0x233cc0(0x205)]==_0x233cc0(0x294)&&!_0x313f68[_0x233cc0(0x2b8)]&&!_0x313f68[_0x233cc0(0x255)]){if(_0x233cc0(0x1e4)!==_0x233cc0(0x1e4))_0x3901a3[_0x233cc0(0x1e6)]=_0x233cc0(0x20e)+_0x2f3497+'&timestamp='+_0x66bafe+_0x233cc0(0x27d)+_0x2edf86;else throw{'message':'quantity\x20or\x20quoteOrderQty\x20required\x20for\x20type\x20MARKET'};}}let _0x4bb9e3=await this[_0x233cc0(0x2d3)]('',_0x313f68),_0x31d0e7='/api/v3/order?'+_0x4bb9e3['body'];return await this['executeRequest']('POST',_0x31d0e7,this[_0x233cc0(0x216)]);}else throw{'message':_0x233cc0(0x2e8)};}async[a9_0x4c9eb5(0x212)](_0x46a942){const _0x352cad=a9_0x4c9eb5;let _0x1badee=Object[_0x352cad(0x23f)](_0x46a942);if(_0x1badee['includes'](_0x352cad(0x29a))||_0x1badee['includes'](_0x352cad(0x2b2))){if(_0x352cad(0x224)==='QfbcU')return await this[_0x352cad(0x26a)](_0x352cad(0x1fa),_0x46a942,[_0x352cad(0x2f6)],_0x352cad(0x244));else throw{'message':_0x352cad(0x280)};}else throw{'message':_0x352cad(0x28e)};}async[a9_0x4c9eb5(0x1f4)](_0x10b799){const _0x4508f5=a9_0x4c9eb5;return await this['spotRequest'](_0x4508f5(0x1fa),_0x10b799,[_0x4508f5(0x2f6)],'/api/v3/openOrders');}async['getOrderSpot'](_0x37db55){const _0x19c1c4=a9_0x4c9eb5;let _0x5d4546=Object[_0x19c1c4(0x23f)](_0x37db55);if(_0x5d4546[_0x19c1c4(0x2c5)](_0x19c1c4(0x29a))||_0x5d4546['includes'](_0x19c1c4(0x2b2)))return await this[_0x19c1c4(0x26a)]('GET',_0x37db55,['symbol'],_0x19c1c4(0x244));else{if(_0x19c1c4(0x20f)!==_0x19c1c4(0x1f6))throw{'message':_0x19c1c4(0x28e)};else throw{'message':_0x19c1c4(0x280)};}}async[a9_0x4c9eb5(0x2a1)](_0x4b292f){const _0x5d6ace=a9_0x4c9eb5;return await this[_0x5d6ace(0x26a)]('GET',_0x4b292f,[_0x5d6ace(0x2f6)],'/api/v3/openOrders');}async[a9_0x4c9eb5(0x208)](_0x480eca){const _0x2d2eb5=a9_0x4c9eb5;return await this[_0x2d2eb5(0x26a)](_0x2d2eb5(0x2b5),_0x480eca,[_0x2d2eb5(0x2f6)],_0x2d2eb5(0x254));}async[a9_0x4c9eb5(0x2a0)](_0xeeea8f){const _0x1fa4c4=a9_0x4c9eb5;return await this['spotRequest'](_0x1fa4c4(0x2b5),_0xeeea8f,[],_0x1fa4c4(0x20d));}async[a9_0x4c9eb5(0x228)](_0x1d11a4){const _0x92afeb=a9_0x4c9eb5;return await this[_0x92afeb(0x26a)](_0x92afeb(0x2b5),_0x1d11a4,[_0x92afeb(0x2f6)],_0x92afeb(0x20c));}async[a9_0x4c9eb5(0x24c)](_0x5aa312){const _0x589f9a=a9_0x4c9eb5;return await this['spotRequest'](_0x589f9a(0x1e0),_0x5aa312,[_0x589f9a(0x22e)],_0x589f9a(0x251));}async['getMxDeductStatus'](_0x38ae16){const _0x348896=a9_0x4c9eb5;return await this[_0x348896(0x26a)](_0x348896(0x2b5),_0x38ae16,[],'/api/v3/mxDeduct/enable');}async[a9_0x4c9eb5(0x249)](_0x366a4c){const _0x32238b=a9_0x4c9eb5;return await this[_0x32238b(0x26a)]('GET',_0x366a4c,[],_0x32238b(0x2d4));}async[a9_0x4c9eb5(0x2a8)](_0x29d402){const _0x5d2426=a9_0x4c9eb5;return await this[_0x5d2426(0x26a)](_0x5d2426(0x1e0),_0x29d402,['coin',_0x5d2426(0x202),_0x5d2426(0x289)],'/api/v3/capital/withdraw/apply');}async[a9_0x4c9eb5(0x2f4)](_0x191370){const _0x5ebf3e=a9_0x4c9eb5;return await this[_0x5ebf3e(0x26a)]('DELETE',_0x191370,['id'],'/api/v3/capital/withdraw');}async[a9_0x4c9eb5(0x28d)](_0x483a40){const _0xc54803=a9_0x4c9eb5;return await this['spotRequest'](_0xc54803(0x2b5),_0x483a40,[],_0xc54803(0x292));}async['getWithdrawHistorySpot'](_0x392891){const _0x441868=a9_0x4c9eb5;return await this[_0x441868(0x26a)](_0x441868(0x2b5),_0x392891,[],'/api/v3/capital/withdraw/history');}async[a9_0x4c9eb5(0x298)](_0x3c3e03){const _0x557382=a9_0x4c9eb5;return await this[_0x557382(0x26a)](_0x557382(0x1e0),_0x3c3e03,['coin',_0x557382(0x2ef)],_0x557382(0x283));}async[a9_0x4c9eb5(0x225)](_0xecb925){const _0x482c32=a9_0x4c9eb5;return await this[_0x482c32(0x26a)](_0x482c32(0x2b5),_0xecb925,[_0x482c32(0x213)],_0x482c32(0x283));}async[a9_0x4c9eb5(0x2e0)](_0x3bfa06){const _0x4e1e54=a9_0x4c9eb5;return await this['spotRequest'](_0x4e1e54(0x2b5),_0x3bfa06,[],_0x4e1e54(0x1fb));}async['userUniversalTransferSpot'](_0x125864){const _0x1bba42=a9_0x4c9eb5;return await this[_0x1bba42(0x26a)](_0x1bba42(0x1e0),_0x125864,[_0x1bba42(0x2dc),'toAccountType',_0x1bba42(0x296),_0x1bba42(0x289)],'/api/v3/capital/transfer');}async['getUniversalTransferHistorySpot'](_0x405fb1){const _0x1bb813=a9_0x4c9eb5;return await this[_0x1bb813(0x26a)](_0x1bb813(0x2b5),_0x405fb1,[_0x1bb813(0x2dc),_0x1bb813(0x27c)],'/api/v3/capital/transfer');}async['getUniversalTransferHistoryTranIdSpot'](_0x52fe91){const _0x4631b2=a9_0x4c9eb5;return await this[_0x4631b2(0x26a)]('GET',_0x52fe91,[_0x4631b2(0x2ca)],'/api/v3/capital/transfer/tranId');}async[a9_0x4c9eb5(0x2ec)](_0x144ab8){const _0x3ca1eb=a9_0x4c9eb5;return await this[_0x3ca1eb(0x26a)]('GET',_0x144ab8,[],_0x3ca1eb(0x267));}async[a9_0x4c9eb5(0x210)](_0x3aaf5d){const _0x182b57=a9_0x4c9eb5;return await this[_0x182b57(0x26a)](_0x182b57(0x1e0),_0x3aaf5d,[_0x182b57(0x296)],'/api/v3/capital/convert');}async[a9_0x4c9eb5(0x211)](_0x52c5e9){const _0x304080=a9_0x4c9eb5;return await this[_0x304080(0x26a)](_0x304080(0x2b5),_0x52c5e9,[],_0x304080(0x27f));}async['getEtfInfo'](_0x60ca6){const _0x44506f=a9_0x4c9eb5;return await this[_0x44506f(0x26a)](_0x44506f(0x2b5),_0x60ca6,[],_0x44506f(0x232));}async['getRebateHistoryRecords'](_0x517890){const _0x3a3280=a9_0x4c9eb5;return await this['spotRequest'](_0x3a3280(0x2b5),_0x517890,[],_0x3a3280(0x26b));}async[a9_0x4c9eb5(0x1f9)](_0x1fbdd7){const _0x10b47a=a9_0x4c9eb5;return await this['spotRequest'](_0x10b47a(0x2b5),_0x1fbdd7,[],_0x10b47a(0x284));}async['getSelfRebateRecordsDetail'](_0x46c8b8){const _0x3310da=a9_0x4c9eb5;return await this[_0x3310da(0x26a)](_0x3310da(0x2b5),_0x46c8b8,[],'/api/v3/rebate/detail/kickback');}async[a9_0x4c9eb5(0x29b)](_0x26c429){const _0x4ff9e4=a9_0x4c9eb5;return await this[_0x4ff9e4(0x26a)]('GET',_0x26c429,[],_0x4ff9e4(0x245));}async[a9_0x4c9eb5(0x259)](_0x355cb7,_0x4dc3bd){const _0x1a0447=a9_0x4c9eb5;let _0x47302c=_0x1a0447(0x252),_0x41620a='';if(_0x4dc3bd==_0x1a0447(0x1e0))_0x41620a=JSON[_0x1a0447(0x2d1)](_0x355cb7);else{if(_0x355cb7!=null&&Object[_0x1a0447(0x23f)](_0x355cb7)[_0x1a0447(0x220)]>0x0){for(let _0x36ff68 of Object[_0x1a0447(0x23f)](_0x355cb7)['sort']()){if(_0x1a0447(0x276)===_0x1a0447(0x276))_0x41620a=_0x41620a+_0x36ff68+'='+_0x355cb7[_0x36ff68]+'&';else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}_0x41620a=_0x41620a['slice'](0x0,-0x1);}}console[_0x1a0447(0x262)](_0x41620a);let _0xf50136=Date[_0x1a0447(0x2ab)](),_0x3a9e81={'Content-Type':_0x47302c,'Request-Time':_0xf50136,'ApiKey':this[_0x1a0447(0x23e)],'Signature':await this[_0x1a0447(0x26e)](this[_0x1a0447(0x2c8)],this['apiKey']+_0xf50136+_0x41620a)};return _0x3a9e81;}async['getServerTimeFutures'](_0x2e259a){const _0x52a81d=a9_0x4c9eb5;return await this[_0x52a81d(0x2b1)]('GET',_0x2e259a,[],_0x52a81d(0x2da));}async['getContractDetailFutures'](_0x33d50f){const _0x4fc6dc=a9_0x4c9eb5;return await this[_0x4fc6dc(0x2b1)](_0x4fc6dc(0x2b5),_0x33d50f,[],_0x4fc6dc(0x2d6));}async[a9_0x4c9eb5(0x2e9)](_0x56f259){const _0x4985f5=a9_0x4c9eb5;return await this[_0x4985f5(0x2b1)](_0x4985f5(0x2b5),_0x56f259,[],_0x4985f5(0x2a9));}async[a9_0x4c9eb5(0x27a)](_0x4aa7f6){const _0x2c95da=a9_0x4c9eb5;if(Object['keys'](_0x4aa7f6)[_0x2c95da(0x2c5)](_0x2c95da(0x2f6)))return await this[_0x2c95da(0x2b1)](_0x2c95da(0x2b5),_0x4aa7f6,[],_0x2c95da(0x2d5)+_0x4aa7f6[_0x2c95da(0x2f6)]);else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}async[a9_0x4c9eb5(0x2b9)](_0x3f7969){const _0x417012=a9_0x4c9eb5;if(Object[_0x417012(0x23f)](_0x3f7969)[_0x417012(0x2c5)](_0x417012(0x2f6))&&Object['keys'](_0x3f7969)[_0x417012(0x2c5)](_0x417012(0x273)))return await this[_0x417012(0x2b1)](_0x417012(0x2b5),_0x3f7969,[],'/api/v1/contract/depth_commits/'+_0x3f7969[_0x417012(0x2f6)]+'/'+_0x3f7969[_0x417012(0x273)]);else{if(_0x417012(0x247)===_0x417012(0x297)){this[_0x417012(0x2c6)]==!![]&&_0x3eaa7a(_0x417012(0x2f1));throw _0x417012(0x2f1);}else throw{'message':_0x417012(0x1e2)};}}async[a9_0x4c9eb5(0x1f3)](_0x492665){const _0x1396fc=a9_0x4c9eb5;if(Object[_0x1396fc(0x23f)](_0x492665)[_0x1396fc(0x2c5)]('symbol'))return await this[_0x1396fc(0x2b1)](_0x1396fc(0x2b5),_0x492665,[],_0x1396fc(0x2c9)+_0x492665['symbol']);else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}async[a9_0x4c9eb5(0x217)](_0x5b49f4){const _0x6b50f2=a9_0x4c9eb5;if(Object[_0x6b50f2(0x23f)](_0x5b49f4)[_0x6b50f2(0x2c5)]('symbol'))return await this[_0x6b50f2(0x2b1)](_0x6b50f2(0x2b5),_0x5b49f4,[],'/api/v1/contract/fair_price/'+_0x5b49f4[_0x6b50f2(0x2f6)]);else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}async[a9_0x4c9eb5(0x1ea)](_0x20ab2c){const _0x536592=a9_0x4c9eb5;if(Object[_0x536592(0x23f)](_0x20ab2c)['includes']('symbol'))return await this['futuresRequest'](_0x536592(0x2b5),_0x20ab2c,[],'/api/v1/contract/funding_rate/'+_0x20ab2c['symbol']);else{if(_0x536592(0x272)===_0x536592(0x272))throw{'message':_0x536592(0x280)};else _0x53a849[_0x536592(0x1e9)](_0x26a132+'='+_0x47c9e0[_0x36ca4]);}}async[a9_0x4c9eb5(0x1ee)](_0x2078a5){const _0x4daad3=a9_0x4c9eb5;if(Object[_0x4daad3(0x23f)](_0x2078a5)[_0x4daad3(0x2c5)](_0x4daad3(0x2f6))){if(_0x4daad3(0x2d8)==='GCbin'){for(let _0x59dfe8 of _0x25209e[_0x4daad3(0x23f)](_0x29e18b)[_0x4daad3(0x1f7)]()){_0x548ade=_0x24d353+_0x59dfe8+'='+_0x5a1e90[_0x59dfe8]+'&';}_0x5ee8a0=_0x1f0622[_0x4daad3(0x2db)](0x0,-0x1);}else return await this[_0x4daad3(0x2b1)](_0x4daad3(0x2b5),_0x2078a5,[],_0x4daad3(0x29e)+_0x2078a5[_0x4daad3(0x2f6)]);}else{if(_0x4daad3(0x29c)===_0x4daad3(0x29c))throw{'message':_0x4daad3(0x280)};else throw{'message':_0x4daad3(0x238)};}}async[a9_0x4c9eb5(0x21d)](_0x1e50ba){const _0x520a60=a9_0x4c9eb5;if(Object['keys'](_0x1e50ba)[_0x520a60(0x2c5)](_0x520a60(0x2f6)))return await this['futuresRequest'](_0x520a60(0x2b5),_0x1e50ba,[],'/api/v1/contract/kline/index_price/'+_0x1e50ba[_0x520a60(0x2f6)]);else throw{'message':_0x520a60(0x280)};}async[a9_0x4c9eb5(0x26d)](_0x1615d7){const _0x58fd71=a9_0x4c9eb5;if(Object[_0x58fd71(0x23f)](_0x1615d7)[_0x58fd71(0x2c5)](_0x58fd71(0x2f6)))return await this['futuresRequest'](_0x58fd71(0x2b5),_0x1615d7,[],_0x58fd71(0x2ac)+_0x1615d7['symbol']);else{if(_0x58fd71(0x22d)==='oENZS')throw{'message':_0x58fd71(0x28e)};else throw{'message':_0x58fd71(0x280)};}}async[a9_0x4c9eb5(0x21a)](_0x1c2bcb){const _0x4919f8=a9_0x4c9eb5;if(Object[_0x4919f8(0x23f)](_0x1c2bcb)['includes'](_0x4919f8(0x2f6)))return await this[_0x4919f8(0x2b1)](_0x4919f8(0x2b5),_0x1c2bcb,[],_0x4919f8(0x277)+_0x1c2bcb[_0x4919f8(0x2f6)]);else{if(_0x4919f8(0x264)!==_0x4919f8(0x264))return this[_0x4919f8(0x1fc)](_0x2b21aa,[],_0x4919f8(0x275));else throw{'message':_0x4919f8(0x280)};}}async[a9_0x4c9eb5(0x288)](_0x47ed1d){const _0x1b7731=a9_0x4c9eb5;return await this[_0x1b7731(0x2b1)](_0x1b7731(0x2b5),_0x47ed1d,[],_0x1b7731(0x2c3));}async['getAllContractRiskFundBalanceFutures'](_0x3226b8){const _0x4d623e=a9_0x4c9eb5;return await this[_0x4d623e(0x2b1)](_0x4d623e(0x2b5),_0x3226b8,[],_0x4d623e(0x222));}async['getContractRiskFundBalanceHistoryFutures'](_0x3b3cc2){const _0xfc2f19=a9_0x4c9eb5;return await this[_0xfc2f19(0x2b1)](_0xfc2f19(0x2b5),_0x3b3cc2,[_0xfc2f19(0x2f6),_0xfc2f19(0x263),_0xfc2f19(0x2c1)],_0xfc2f19(0x260));}async[a9_0x4c9eb5(0x2e4)](_0x331e3b){const _0x55d079=a9_0x4c9eb5;return await this[_0x55d079(0x2b1)]('GET',_0x331e3b,[_0x55d079(0x2f6),_0x55d079(0x263),_0x55d079(0x2c1)],_0x55d079(0x1e8));}async['getUserAssetInfoFutures'](_0x553161){const _0x17b7cc=a9_0x4c9eb5;return await this['futuresRequest'](_0x17b7cc(0x2b5),_0x553161,[],_0x17b7cc(0x2fa));}async[a9_0x4c9eb5(0x2ea)](_0xcb3f30){const _0xf9af8e=a9_0x4c9eb5;return await this[_0xf9af8e(0x2b1)](_0xf9af8e(0x2b5),_0xcb3f30,[],'/api/v1/private/account/transfer_record');}async[a9_0x4c9eb5(0x269)](_0xab396f){const _0x22b84a=a9_0x4c9eb5;if(Object['keys'](_0xab396f)[_0x22b84a(0x2c5)](_0x22b84a(0x241))){if(_0x22b84a(0x256)!==_0x22b84a(0x279))return await this['futuresRequest'](_0x22b84a(0x2b5),_0xab396f,[],'/api/v1/private/account/asset/'+_0xab396f[_0x22b84a(0x241)]);else _0x523fbc=_0x4215d2+_0xdc292a+'='+_0x704236[_0x5698a6]+'&';}else{if(_0x22b84a(0x2bb)!==_0x22b84a(0x2bb))_0x269006(_0x22b84a(0x2f1));else throw{'message':'currency\x20is\x20a\x20required\x20parameter'};}}async[a9_0x4c9eb5(0x200)](_0x5cd5ba){const _0x17c10d=a9_0x4c9eb5;return await this[_0x17c10d(0x2b1)](_0x17c10d(0x2b5),_0x5cd5ba,[],_0x17c10d(0x22c));}async[a9_0x4c9eb5(0x2f3)](_0x450956){const _0x241ebc=a9_0x4c9eb5;return await this['futuresRequest'](_0x241ebc(0x2b5),_0x450956,[],_0x241ebc(0x28a));}async[a9_0x4c9eb5(0x21c)](_0x4bace3){const _0x36fbba=a9_0x4c9eb5;return await this['futuresRequest']('GET',_0x4bace3,[],_0x36fbba(0x233));}async['getUserCurrentPendingOrderFutures'](_0x40e5b2){const _0x7117a3=a9_0x4c9eb5;if(Object[_0x7117a3(0x23f)](_0x40e5b2)[_0x7117a3(0x2c5)](_0x7117a3(0x2f6)))return await this[_0x7117a3(0x2b1)](_0x7117a3(0x2b5),_0x40e5b2,[],'/api/v1/private/order/list/open_orders/'+_0x40e5b2[_0x7117a3(0x2f6)]);else{if('rWVMh'!==_0x7117a3(0x2f0))throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};else return _0x48dc84['Hmac'](_0x7117a3(0x274),_0x1ca86c)['update'](_0x565364)['digest'](_0x7117a3(0x29d));}}async[a9_0x4c9eb5(0x207)](_0x20e5ce){const _0x594c3c=a9_0x4c9eb5;return await this[_0x594c3c(0x2b1)](_0x594c3c(0x2b5),_0x20e5ce,[],'/api/v1/private/order/list/history_orders');}async[a9_0x4c9eb5(0x1e1)](_0x5bcbd7){const _0x848ea9=a9_0x4c9eb5;if(Object['keys'](_0x5bcbd7)[_0x848ea9(0x2c5)](_0x848ea9(0x2f6))&&Object[_0x848ea9(0x23f)](_0x5bcbd7)['includes']('external_oid')){if('yQsDy'===_0x848ea9(0x243))return await this[_0x848ea9(0x2b1)](_0x848ea9(0x2b5),_0x5bcbd7,[],'/api/v1/private/order/external/'+_0x5bcbd7[_0x848ea9(0x2f6)]+'/'+_0x5bcbd7[_0x848ea9(0x273)]);else throw{'message':_0x848ea9(0x280)};}else{if(_0x848ea9(0x2f8)===_0x848ea9(0x2fc))throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};else throw{'message':_0x848ea9(0x1e2)};}}async[a9_0x4c9eb5(0x1fd)](_0x804f0){const _0x1ee740=a9_0x4c9eb5;if(Object['keys'](_0x804f0)[_0x1ee740(0x2c5)](_0x1ee740(0x2cd)))return await this['futuresRequest']('GET',_0x804f0,[],_0x1ee740(0x20a)+_0x804f0[_0x1ee740(0x2cd)]);else{if(_0x1ee740(0x25a)!==_0x1ee740(0x25a))this['proxyUser']=_0x58b23b[_0x1ee740(0x287)];else throw{'message':'order_id\x20is\x20a\x20required\x20parameter'};}}async['getOrderTransactionDetailsByOIDFutures'](_0x29be14){const _0x25b4a6=a9_0x4c9eb5;if(Object[_0x25b4a6(0x23f)](_0x29be14)['includes']('order_id'))return await this['futuresRequest'](_0x25b4a6(0x2b5),_0x29be14,[],'/api/v1/private/order/deal_details/'+_0x29be14[_0x25b4a6(0x2cd)]);else throw{'message':'order_id\x20is\x20a\x20required\x20parameter'};}async[a9_0x4c9eb5(0x285)](_0x37625b){const _0x1110fd=a9_0x4c9eb5;return await this[_0x1110fd(0x2b1)](_0x1110fd(0x2b5),_0x37625b,[],'/api/v1/private/order/list/order_deals');}async['getTriggerOrderListFutures'](_0x4e0bd6){const _0x2adb9d=a9_0x4c9eb5;return await this[_0x2adb9d(0x2b1)](_0x2adb9d(0x2b5),_0x4e0bd6,[],_0x2adb9d(0x1e7));}async[a9_0x4c9eb5(0x2e3)](_0x525545){const _0x45d668=a9_0x4c9eb5;return await this[_0x45d668(0x2b1)]('GET',_0x525545,[],_0x45d668(0x2f7));}async[a9_0x4c9eb5(0x266)](_0x44cecb){const _0x31c486=a9_0x4c9eb5;return await this[_0x31c486(0x2b1)](_0x31c486(0x2b5),_0x44cecb,[],_0x31c486(0x2f2));}async['getUserCurrentTradingFeeRateFutures'](_0x5e5d6e){const _0x5c72f4=a9_0x4c9eb5;return await this['futuresRequest'](_0x5c72f4(0x2b5),_0x5e5d6e,[],_0x5c72f4(0x21b));}async[a9_0x4c9eb5(0x1f8)](_0x390daf){const _0x33d146=a9_0x4c9eb5;return await this[_0x33d146(0x2b1)](_0x33d146(0x1e0),_0x390daf,[_0x33d146(0x2cb),'amount',_0x33d146(0x205)],_0x33d146(0x26c));}async[a9_0x4c9eb5(0x25f)](_0x497637){const _0xcd2f47=a9_0x4c9eb5;return await this[_0xcd2f47(0x2b1)](_0xcd2f47(0x2b5),_0x497637,[],_0xcd2f47(0x2df));}async[a9_0x4c9eb5(0x2c2)](_0xc6d8f7){const _0x31e3d8=a9_0x4c9eb5;return await this[_0x31e3d8(0x2b1)](_0x31e3d8(0x2b5),_0xc6d8f7,[_0x31e3d8(0x2f6)],_0x31e3d8(0x22a));}}
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));}}

@@ -1,1 +0,1 @@

const a11_0x327964=a11_0x4ba7;function a11_0x4f29(){const _0x2413f9=['22YQuSGy','fromCurrency','getChainInfo','getOrderHistory','normalize','posSide','/margin/orders/trades','/margin/payback','qtyType','default','setRiskLimit','6uaqsEF','/positions/riskLimit','label','cancelBatchOrderHedged','/api-data/futures/funding-fees','/exchange/order/v2/orderList','subToMainTransferFutures','Missing\x20params:\x20','offset','3260bcLVbm','/api-data/spots/fee-rate','amendOrderHedged','toCurrency','/assets/quote','chainName','gLAPk','/exchange/order','/orders/replace','getOpenOrdersPerp','riskLimitRv','data','276456ONlVVT','object','subToMainTransferSpot','DELETE','tickSize','fromAmountEv','getOpenOrders','convert','SQsTF','settleCurrency','vgaPg','/md/v2/trade','/md/spot/ticker/24hr/all','/g-orders/replace','key','getKlineHedged','getUserOrderPerp','symbol','marginBorrow','get24HourTicker','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','normalizeRec','/exchange/order/list','balancer','getKline','length','/md/orderbook','/spot/orders','statusText','exchangeid','cancelAllOrdersMargin','/api-data/futures/fee-rate','cancelOrderPerp','getClosedOrdersPerp','/exchange/order/trade','amount','targetPosMode','secret','/api-data/futures/v2/tradeAccountDetail','3630516gQrrXX','getTradeHedged','balanceEv','isArray','digest','clOrdID','/api-data/g-futures/trades','/g-orders/activeList','placeOrderHedged','join','412710CdGQlr','wGKdL','addProxyObject','/exchange/public/cfg/chain-settings','/api-data/g-futures/funding-fees','placeOrderPerp','withdraw','PUT','getMarginPaybackHistory','orderID','getClosedOrdersHedged','currency','testnet','cqYvW','proxyPort','cancelAllOrdersPerp','placeOrderMargin','proxyUser','amountRv','get24HourTickerHedged','/api-data/spots/orders/by-order-id','setLeverage','getTradingAccountPerp','/margin/borrow/interests','/spot/orders/create','amendOrder','getMarginBorrowInterestHistory','/api-data/spots/funds','/assets/transfer','/api-data/public/data/funding-rate-history','stringify','assignPositionBalance','getProductInfo','getMarginBorrowHistory','placeOrder','getPnL','/md/v2/orderbook','/api-data/spots/trades','getSubToMainTransfersSpot','apiSecret','update','/phemex-withdraw/wallets/api/cancelWithdraw','/public/products','createSignature','/orders/activeList','getOrdersHistoryHedged','119563jEpOck','normalizeData','GmeNb','code','GET','/phemex-deposit/wallets/api/depositHist','executeOrder','endsWith','get24HourTickerAllSymbolsPerp','orderQty','/md/v1/ticker/24hr/all','name','9UkOizE','push','sockets','/assets/spots/sub-accounts/transfer','apiKey','/md/spot/ticker/24hr','/positions/assign','https://testnet-api.phemex.com','switchPositionModeSynchronously','amountEv','/public/time','amendOrderPerp','/orders/create','1502230oiYFZr','/g-accounts/accountPositions','SjcVt','/margin-trade/orders','quoteCurrency','getDepositHistory','getFundsDetail','setRiskLimitHedged','useProxy','isMain','/api-data/g-futures/orders','OrderQty','/positions/leverage','doLog','url','getWalletsMargin','/margin/borrow','moveOp','cancelBatchOrderPerp','1232688ofrwgS','ewxsq','uFFXY','cancelOrderHedged','/orders/all','dhsyTW5!ysh8IuysQKcG45','/exchange/public/md/v2/kline','getOpenOrdersHedged','/g-positions/leverage','/md/trade','/exchange/wallets/withdrawList','/md/v2/ticker/24hr/all','getWallets','getUserTradeHedged','/exchange/wallets/v2/depositAddress','map','/g-orders/cancel','getFundingRateHistory','sha256','/spot/orders/active','getOrdersByIdHedged','/assets/convert','subaccount','resolution','auth','proxyPass','/exchange/public/md/v2/kline/last','getConvertHistory','/phemex-deposit/wallets/api/depositAddress','exchange','getMarginOrdersDetails','keys','proxy','filter','Hmac','authenticate','getTradeHistoryHedged','1756esiOEm','/g-accounts/positions','/phemex-withdraw/wallets/api/createWithdraw','getTradesHistory','get24HourTickerPerp','NjHdS','getHistoryTradePerp','side','ulXRU','address','getOpenOrderActive','YYTFJ','/accounts/accountPositions','getMarginOrderTradesDetails','/exchange/order/v2/tradingList','getWithdrawHistory','marginPayback','getFundsHistory','publicApis','getOrderBookFull','getTransferHistory','exchangename','/exchange/wallets/depositList','checkParams','/g-orders/create','lYETv','createAuthHeader','valueScale','setLeverageHedged','limit','logGets','/orders/cancel','POST','49UeQMWm','products','/margin/orders','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters'];a11_0x4f29=function(){return _0x2413f9;};return a11_0x4f29();}(function(_0x59caa4,_0x358e54){const _0x155f63=a11_0x4ba7,_0x9a8b85=_0x59caa4();while(!![]){try{const _0x25d173=parseInt(_0x155f63(0xc8))/0x1+parseInt(_0x155f63(0x149))/0x2*(parseInt(_0x155f63(0x18f))/0x3)+parseInt(_0x155f63(0x119))/0x4*(-parseInt(_0x155f63(0x152))/0x5)+-parseInt(_0x155f63(0xf4))/0x6+-parseInt(_0x155f63(0x13a))/0x7*(parseInt(_0x155f63(0x15e))/0x8)+parseInt(_0x155f63(0xd4))/0x9*(-parseInt(_0x155f63(0xe1))/0xa)+parseInt(_0x155f63(0x13e))/0xb*(parseInt(_0x155f63(0x185))/0xc);if(_0x25d173===_0x358e54)break;else _0x9a8b85['push'](_0x9a8b85['shift']());}catch(_0x16e52b){_0x9a8b85['push'](_0x9a8b85['shift']());}}}(a11_0x4f29,0x3de79));function a11_0x4ba7(_0x4f9b47,_0x4ac29b){const _0x4f29dd=a11_0x4f29();return a11_0x4ba7=function(_0x4ba7eb,_0x190772){_0x4ba7eb=_0x4ba7eb-0xb1;let _0x517d36=_0x4f29dd[_0x4ba7eb];return _0x517d36;},a11_0x4ba7(_0x4f9b47,_0x4ac29b);}import a11_0xf7046d from'axios';import a11_0x2ada17 from'crypto-js';import a11_0x5894db,{sign}from'crypto';import a11_0xecdfc2 from'crypto-js/enc-base64url.js';export class Phemex{[a11_0x327964(0x12b)]=new Array();['ky']='auystrAAS2iW85#s2@jdDC';['i']=a11_0x327964(0xf9);[a11_0x327964(0xd6)]={};constructor(_0x2688ad){const _0x1a7fd5=a11_0x327964;_0x2688ad[_0x1a7fd5(0x19b)]?_0x1a7fd5(0xf5)===_0x1a7fd5(0xf5)?this['url']=_0x1a7fd5(0xdb):_0x453e05['clOrdID']='cmfi'+_0x379d23['clOrdID']:this['url']='https://api.phemex.com';this[_0x1a7fd5(0x117)]=_0x2688ad['authenticate']==undefined?!![]:_0x2688ad[_0x1a7fd5(0x117)],this[_0x1a7fd5(0xd3)]=_0x2688ad['exchange'][_0x1a7fd5(0x12e)]==undefined?'phemex':_0x2688ad[_0x1a7fd5(0x111)][_0x1a7fd5(0x12e)],this[_0x1a7fd5(0x17b)]=_0x2688ad[_0x1a7fd5(0x111)]['id'],this[_0x1a7fd5(0x14b)]=_0x2688ad['label'],this[_0x1a7fd5(0x142)]=_0x2688ad[_0x1a7fd5(0x142)]==undefined?![]:_0x2688ad[_0x1a7fd5(0x142)];if(this[_0x1a7fd5(0x117)]){if(_0x1a7fd5(0x158)!==_0x1a7fd5(0x158))_0x23b487[_0x266d66]=_0x333001;else{if(!_0x2688ad[_0x1a7fd5(0x16c)]||!_0x2688ad[_0x1a7fd5(0x183)]||_0x2688ad[_0x1a7fd5(0x16c)]==''||_0x2688ad[_0x1a7fd5(0x183)]=='')throw _0x1a7fd5(0x172);this[_0x1a7fd5(0xd8)]=_0x2688ad[_0x1a7fd5(0x16c)],this['apiSecret']=_0x2688ad[_0x1a7fd5(0x183)],this[_0x1a7fd5(0xea)]=_0x2688ad[_0x1a7fd5(0x10a)]==undefined,this['subaccount']=this[_0x1a7fd5(0xea)]?'':_0x2688ad[_0x1a7fd5(0x10a)];}}this[_0x1a7fd5(0xe9)]=![],this[_0x1a7fd5(0x175)]=_0x2688ad[_0x1a7fd5(0x175)]||undefined;if(_0x2688ad[_0x1a7fd5(0xe9)]){if(_0x2688ad['proxy']&&_0x2688ad[_0x1a7fd5(0x114)]!=''||_0x2688ad['balancer']&&_0x2688ad['balancer']!=''){this[_0x1a7fd5(0xe9)]=!![],this['proxy']=_0x2688ad[_0x1a7fd5(0x114)];if(_0x2688ad['proxyPort']){if(_0x1a7fd5(0xca)===_0x1a7fd5(0xe3)){const _0x45d248=_0x16a05b['currencies'][_0x1a7fd5(0x115)](_0x3cc57e=>_0x3cc57e[_0x1a7fd5(0x19a)]===_0x58aeaf[_0x1a7fd5(0x19a)])[0x0];let _0x29f477=_0x3dec20/0xa**_0x45d248[_0x1a7fd5(0x134)];_0x3e67c5[_0x2162ea]=_0x29f477;}else this[_0x1a7fd5(0x19d)]=_0x2688ad['proxyPort'];}else this[_0x1a7fd5(0x19d)]=0xbb8;}}this[_0x1a7fd5(0x12b)][_0x1a7fd5(0xd5)]();}async[a11_0x327964(0x133)](_0x4416f6,_0x2cac61){const _0x7bf2e5=a11_0x327964;let _0xa3ed57=Date['now']()+0x1770,_0x524dd9=await this[_0x7bf2e5(0xc5)](_0x4416f6,_0x2cac61,_0xa3ed57),_0x50976b={'x-phemex-access-token':this[_0x7bf2e5(0xd8)],'x-phemex-request-expiry':_0xa3ed57,'x-phemex-request-signature':_0x524dd9};return _0x50976b;}async[a11_0x327964(0xc5)](_0x445cfd,_0x2983ec,_0x3b45c4){const _0x43d732=a11_0x327964;let _0x1a792a=_0x445cfd+_0x2983ec+_0x3b45c4,_0x2863bf=a11_0x5894db[_0x43d732(0x116)](_0x43d732(0x106),this[_0x43d732(0xc1)])[_0x43d732(0xc2)](_0x1a792a)[_0x43d732(0x189)]('hex');return _0x2863bf;}[a11_0x327964(0x191)](_0x5d96e5){const _0x26daa2=a11_0x327964;if(this[_0x26daa2(0xe9)]){let _0x6a49ef={'protocol':'https','host':this['proxy'],'port':this[_0x26daa2(0x19d)]};if(this['proxyAuth']===!![]){if(_0x26daa2(0x121)===_0x26daa2(0x132)){if(!_0x51058a['key']||!_0x347d2e[_0x26daa2(0x183)]||_0x47773d[_0x26daa2(0x16c)]==''||_0x3b4a23[_0x26daa2(0x183)]=='')throw'authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret';this[_0x26daa2(0xd8)]=_0x3beb14[_0x26daa2(0x16c)],this[_0x26daa2(0xc1)]=_0x33cc5e[_0x26daa2(0x183)],this[_0x26daa2(0xea)]=_0x26bf4e[_0x26daa2(0x10a)]==_0x9e13fd,this[_0x26daa2(0x10a)]=this['isMain']?'':_0x554b25[_0x26daa2(0x10a)];}else _0x6a49ef[_0x26daa2(0x10c)]={'username':this[_0x26daa2(0x1a0)],'password':this['proxyPass']};}_0x5d96e5[_0x26daa2(0x114)]=_0x6a49ef;}return _0x5d96e5;}async['checkParams'](_0x3fa2aa,_0x442e86){const _0x335059=a11_0x327964;let _0x5f16cc=_0x3fa2aa!=null?_0x442e86[_0x335059(0x115)](_0x2a3420=>!Object[_0x335059(0x113)](_0x3fa2aa)['includes'](_0x2a3420)):_0x442e86;if(_0x5f16cc[_0x335059(0x177)]!=0x0){if(_0x335059(0x168)===_0x335059(0x168))throw{'message':_0x335059(0x150)+_0x5f16cc[_0x335059(0x18e)](',')};else _0x26a937[_0x1c3cd7]=_0x153f7a;}}async[a11_0x327964(0xce)](_0x496a3e,_0x524a3a,_0x4c80ac,_0x744db3){const _0x5e7496=a11_0x327964;await this[_0x5e7496(0x130)](_0x496a3e,_0x744db3);let _0x2caad4=[],_0x971544='';for(let _0x2f3045 in _0x496a3e){_0x2caad4[_0x5e7496(0xd5)](_0x2f3045+'='+_0x496a3e[_0x2f3045]);}_0x971544=_0x2caad4[_0x5e7496(0x18e)]('&');let _0x55c902={'baseURL':this[_0x5e7496(0xef)],'url':_0x4c80ac+'?'+_0x971544,'method':_0x524a3a,'headers':await this[_0x5e7496(0x133)](_0x4c80ac,_0x971544)};_0x55c902=this[_0x5e7496(0x191)](_0x55c902);try{if(_0x5e7496(0x19c)===_0x5e7496(0xf6)){let _0x2fa40b=_0x5ec77d[_0x5e7496(0x103)](_0x168edb=>this[_0x5e7496(0x173)](_0x168edb,_0x9af0e0));_0x2fa40b!=[]&&(_0x1b4d3c[_0x88fc1f]=_0x2fa40b);}else{const _0x4dcd90=await a11_0xf7046d(_0x55c902);if(!_0x4dcd90){this[_0x5e7496(0x137)]==!![]&&doLog('No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters');throw _0x5e7496(0x13d);}if(this[_0x5e7496(0x137)]==!![]){if(_0x5e7496(0x11e)!==_0x5e7496(0x11e))return _0xbaaaf;else this[_0x5e7496(0xee)]({'send':_0x55c902,'level':_0x5e7496(0x147),'receive':{'code':_0x4dcd90[_0x5e7496(0x15d)]['code'],'data':JSON[_0x5e7496(0xb8)](_0x4dcd90[_0x5e7496(0x15d)]['data']),'msg':_0x4dcd90[_0x5e7496(0x15d)]['msg']}});}if(this[_0x5e7496(0x142)]&&_0x4c80ac!=_0x5e7496(0xc4)){if('UvWus'!==_0x5e7496(0x190)){let _0x2de1c9=await this[_0x5e7496(0xc9)](_0x4dcd90['data']);return{'code':_0x4dcd90['status'],'data':_0x4dcd90[_0x5e7496(0x15d)],'msg':_0x4dcd90[_0x5e7496(0x17a)],'normalized':_0x2de1c9};}else{let _0x283e14=this[_0x5e7496(0x173)](_0x518c28,_0x48d18b);_0x283e14!={}&&(_0x4b2bd0[_0x157957]=_0x283e14);}}else return{'code':_0x4dcd90['status'],'data':_0x4dcd90[_0x5e7496(0x15d)],'msg':_0x4dcd90['statusText']};}}catch(_0x20a658){return _0x20a658;}}async[a11_0x327964(0xc9)](_0x1ea772){const _0x44c2f4=a11_0x327964;let _0x3f678e=await this['getProductInfo']();return this[_0x44c2f4(0x173)](_0x1ea772,_0x3f678e[_0x44c2f4(0x15d)][_0x44c2f4(0x15d)]);}['normalizeRec'](_0x5ca525,_0x3fda33){const _0x11e8e4=a11_0x327964;let _0xdffad8={};return Object[_0x11e8e4(0x113)](_0x5ca525)['forEach'](_0xbd8646=>{const _0x45733d=_0x11e8e4;let _0x3b3e7b=_0x5ca525[_0xbd8646];if(Array[_0x45733d(0x188)](_0x3b3e7b)){let _0x4acfb3=_0x3b3e7b['map'](_0x267129=>this['normalizeRec'](_0x267129,_0x3fda33));_0x4acfb3!=[]&&(_0xdffad8[_0xbd8646]=_0x4acfb3);}else{if(typeof _0x3b3e7b===_0x45733d(0x15f)&&_0x3b3e7b!=null){let _0x4457ea=this[_0x45733d(0x173)](_0x3b3e7b,_0x3fda33);_0x4457ea!={}&&(_0xdffad8[_0xbd8646]=_0x4457ea);}else{if((_0xbd8646[_0x45733d(0xcf)](_0x45733d(0x187))||_0xbd8646[_0x45733d(0xcf)]('BalanceEv'))&&_0x5ca525[_0x45733d(0x19a)]){const _0x47b72e=_0x3fda33['currencies'][_0x45733d(0x115)](_0x576897=>_0x576897[_0x45733d(0x19a)]===_0x5ca525['currency'])[0x0];let _0x48ece3=_0x3b3e7b/0xa**_0x47b72e[_0x45733d(0x134)];_0xdffad8[_0xbd8646]=_0x48ece3;}else{if((_0xbd8646[_0x45733d(0xcf)](_0x45733d(0xec))||_0xbd8646['endsWith'](_0x45733d(0xd1)))&&_0x5ca525['symbol']){if(_0x45733d(0x166)!==_0x45733d(0x124)){const _0x1bb57f=_0x3fda33[_0x45733d(0x13b)][_0x45733d(0x115)](_0x138a9c=>_0x138a9c['symbol']===_0x5ca525['symbol']);if(_0x1bb57f['length']!=0x0){const _0x540c7e=_0x1bb57f[0x0];_0xdffad8[_0xbd8646]=_0x3b3e7b*_0x540c7e[_0x45733d(0x162)];}}else _0x37aa0e['auth']={'username':this['proxyUser'],'password':this[_0x45733d(0x10d)]};}else _0xdffad8[_0xbd8646]=_0x3b3e7b;}}}}),console['log'](_0xdffad8),_0xdffad8;}async['getServerTime'](_0x23b1c6){const _0x401531=a11_0x327964;let _0x211ac5=await this[_0x401531(0xce)](_0x23b1c6,_0x401531(0xcc),_0x401531(0xde),[]);return _0x211ac5;}async[a11_0x327964(0xba)](_0x2a3e14){const _0x57912b=a11_0x327964;let _0xf3314d=await this[_0x57912b(0xce)](_0x2a3e14,_0x57912b(0xcc),_0x57912b(0xc4),[]);return _0xf3314d;}async[a11_0x327964(0xbc)](_0x4e9843){const _0x1c0b3c=a11_0x327964;let _0x1e521c=await this[_0x1c0b3c(0xce)](_0x4e9843,_0x1c0b3c(0x196),_0x1c0b3c(0xb2),[_0x1c0b3c(0x16f),_0x1c0b3c(0x120),_0x1c0b3c(0x146)]);return _0x1e521c;}async[a11_0x327964(0xb3)](_0x3619b6){const _0x753fce=a11_0x327964;let _0x16158c=await this['executeOrder'](_0x3619b6,'PUT',_0x753fce(0x179),[_0x753fce(0x16f)]);return _0x16158c;}async['cancelOrder'](_0x1222fe){const _0x56def8=a11_0x327964;let _0x3a044f=await this['executeOrder'](_0x1222fe,'DELETE','/spot/orders',['symbol',_0x56def8(0x198)]);return _0x3a044f;}async['cancelAllOrders'](_0x541fec){const _0x3ecf2b=a11_0x327964;let _0x2664bc=await this[_0x3ecf2b(0xce)](_0x541fec,_0x3ecf2b(0x161),'/spot/orders/all',[_0x3ecf2b(0x16f)]);return _0x2664bc;}async[a11_0x327964(0x164)](_0x17ecc4){const _0xe64324=a11_0x327964;let _0x3cc38e=await this[_0xe64324(0xce)](_0x17ecc4,'GET',_0xe64324(0x179),[_0xe64324(0x16f)]);return _0x3cc38e;}async[a11_0x327964(0x123)](_0x420b42){const _0x4cbc0c=a11_0x327964;let _0x10bacb=await this[_0x4cbc0c(0xce)](_0x420b42,'GET',_0x4cbc0c(0x107),[_0x4cbc0c(0x198),_0x4cbc0c(0x16f)]);return _0x10bacb;}async['getOrder'](_0x40c560){const _0x22cf4c=a11_0x327964;let _0x368096=await this[_0x22cf4c(0xce)](_0x40c560,_0x22cf4c(0xcc),_0x22cf4c(0x1a3),[_0x22cf4c(0x198),_0x22cf4c(0x16f)]);return _0x368096;}async[a11_0x327964(0x100)](_0x31282b){const _0x2c60ac=a11_0x327964;let _0x52b106=await this[_0x2c60ac(0xce)](_0x31282b,'GET','/spot/wallets',[]);return _0x52b106;}async[a11_0x327964(0x141)](_0x125b56){const _0x214126=a11_0x327964;let _0x4c1dbc=await this['executeOrder'](_0x125b56,'GET','/api-data/spots/orders',[_0x214126(0x16f)]);return _0x4c1dbc;}async[a11_0x327964(0x11c)](_0x1e1af4){const _0x13b800=a11_0x327964;let _0x3542d0=await this[_0x13b800(0xce)](_0x1e1af4,_0x13b800(0xcc),_0x13b800(0xbf),['symbol']);return _0x3542d0;}async[a11_0x327964(0xbd)](_0x146f82){const _0x44d6ac=a11_0x327964;let _0x2121b5=await this[_0x44d6ac(0xce)](_0x146f82,_0x44d6ac(0xcc),'/api-data/spots/pnls',[]);return _0x2121b5;}async[a11_0x327964(0x140)](_0x55cb70){const _0x59a1ea=a11_0x327964;let _0x1a4e93=await this['executeOrder'](_0x55cb70,'GET',_0x59a1ea(0x192),[_0x59a1ea(0x19a)]);return _0x1a4e93;}async['getDepositAddress'](_0x179768){const _0x3fe0eb=a11_0x327964;let _0x3cd17c=await this['executeOrder'](_0x179768,_0x3fe0eb(0xcc),_0x3fe0eb(0x102),[_0x3fe0eb(0x19a),_0x3fe0eb(0x157)]);return _0x3cd17c;}async[a11_0x327964(0xe6)](_0x2284cf){const _0x4ceeab=a11_0x327964;let _0x468133=await this[_0x4ceeab(0xce)](_0x2284cf,'GET',_0x4ceeab(0x12f),[_0x4ceeab(0x19a)]);return _0x468133;}async[a11_0x327964(0x128)](_0x45753e){const _0x31ca4e=a11_0x327964;let _0x1ba045=await this[_0x31ca4e(0xce)](_0x45753e,_0x31ca4e(0xcc),_0x31ca4e(0xfe),[_0x31ca4e(0x19a)]);return _0x1ba045;}async[a11_0x327964(0x12a)](_0x1f6c0d){const _0x2395fe=a11_0x327964;let _0x421cd7=await this['executeOrder'](_0x1f6c0d,_0x2395fe(0xcc),_0x2395fe(0xb5),[_0x2395fe(0x19a)]);return _0x421cd7;}async['getFeeRate'](_0xaa495e){const _0x2d6aac=a11_0x327964;let _0x3d200a=await this[_0x2d6aac(0xce)](_0xaa495e,_0x2d6aac(0xcc),_0x2d6aac(0x153),[_0x2d6aac(0xe5)]);return _0x3d200a;}async['getOrderBook'](_0x4f58e5){const _0x4391aa=a11_0x327964;let _0x2bf545=await this[_0x4391aa(0xce)](_0x4f58e5,_0x4391aa(0xcc),_0x4391aa(0x178),['symbol']);return _0x2bf545;}async[a11_0x327964(0x12c)](_0x29e497){const _0x32a12d=a11_0x327964;let _0x5d0d64=await this[_0x32a12d(0xce)](_0x29e497,'GET','/md/fullbook',['symbol']);return _0x5d0d64;}async['getRecentTrades'](_0x4e06f6){const _0x6ba54d=a11_0x327964;let _0x567d91=await this[_0x6ba54d(0xce)](_0x4e06f6,'GET',_0x6ba54d(0xfd),['symbol']);return _0x567d91;}async['get24HourTickerAllSymbols'](_0xa59af6){const _0x3c475f=a11_0x327964;let _0x1f9d12=await this[_0x3c475f(0xce)](_0xa59af6,'GET',_0x3c475f(0x16a),[]);return _0x1f9d12;}async[a11_0x327964(0x171)](_0xccc53e){const _0x520a21=a11_0x327964;let _0x5daa89=await this['executeOrder'](_0xccc53e,_0x520a21(0xcc),_0x520a21(0xd9),[_0x520a21(0x16f)]);return _0x5daa89;}async[a11_0x327964(0x194)](_0x2951c0){const _0x359f7e=a11_0x327964;_0x2951c0['clOrdID']&&(_0x2951c0[_0x359f7e(0x18a)]='cmfi'+_0x2951c0['clOrdID']);let _0x47b804=await this[_0x359f7e(0xce)](_0x2951c0,_0x359f7e(0x196),_0x359f7e(0xe0),[_0x359f7e(0x16f),_0x359f7e(0x18a),_0x359f7e(0x120),'orderQty']);return _0x47b804;}async[a11_0x327964(0xdf)](_0x31b7b3){const _0x4e9719=a11_0x327964;let _0x1e7df8=await this[_0x4e9719(0xce)](_0x31b7b3,_0x4e9719(0x196),_0x4e9719(0x15a),[_0x4e9719(0x16f)]);return _0x1e7df8;}async[a11_0x327964(0x17e)](_0x5b9b7a){const _0x3e3df3=a11_0x327964;let _0x6b7623=await this[_0x3e3df3(0xce)](_0x5b9b7a,_0x3e3df3(0x161),_0x3e3df3(0x138),[_0x3e3df3(0x16f)]);return _0x6b7623;}async[a11_0x327964(0xf3)](_0x5f3eb4){const _0x5bef1d=a11_0x327964;let _0x4a1dc1=await this[_0x5bef1d(0xce)](_0x5f3eb4,_0x5bef1d(0x161),'/orders',[_0x5bef1d(0x16f),_0x5bef1d(0x198)]);return _0x4a1dc1;}async[a11_0x327964(0x19e)](_0x5c0eeb){const _0x11bb58=a11_0x327964;let _0xe49c39=await this[_0x11bb58(0xce)](_0x5c0eeb,_0x11bb58(0x161),_0x11bb58(0xf8),[_0x11bb58(0x16f)]);return _0xe49c39;}async[a11_0x327964(0x1a5)](_0x410c59,_0x39527f){const _0x5a91c9=a11_0x327964;let _0x247afe=await this['executeOrder'](_0x410c59,_0x5a91c9(0xcc),_0x5a91c9(0x125),[_0x5a91c9(0x19a)]);return _0x247afe;}async['getTradingAccountUnPnLPerp'](_0x3ff729){const _0x2ea4f4=a11_0x327964;let _0x402552=await this['executeOrder'](_0x3ff729,_0x2ea4f4(0xcc),'/accounts/positions',[_0x2ea4f4(0x19a)]);return _0x402552;}async[a11_0x327964(0x15b)](_0x1f0363){const _0x21bc57=a11_0x327964;let _0x1946a1=await this[_0x21bc57(0xce)](_0x1f0363,_0x21bc57(0xcc),_0x21bc57(0xc6),[_0x21bc57(0x16f)]);return _0x1946a1;}async[a11_0x327964(0x17f)](_0x452a22){const _0x949417=a11_0x327964;let _0x5d096a=await this[_0x949417(0xce)](_0x452a22,_0x949417(0xcc),_0x949417(0x174),[_0x949417(0x16f)]);return _0x5d096a;}async[a11_0x327964(0x1a4)](_0x50fa34){const _0x24d560=a11_0x327964;let _0x473ab3=await this[_0x24d560(0xce)](_0x50fa34,_0x24d560(0x196),_0x24d560(0xed),['symbol']);return _0x473ab3;}async[a11_0x327964(0x148)](_0x3e2d07){const _0x1a089f=a11_0x327964;let _0x59ba5d=await this[_0x1a089f(0xce)](_0x3e2d07,_0x1a089f(0x196),_0x1a089f(0x14a),[_0x1a089f(0x16f)]);return _0x59ba5d;}async[a11_0x327964(0xb9)](_0x96399b){const _0x51f254=a11_0x327964;let _0x2f9e5b=await this[_0x51f254(0xce)](_0x96399b,_0x51f254(0x139),_0x51f254(0xda),['symbol']);return _0x2f9e5b;}async[a11_0x327964(0x16e)](_0x150975){const _0x46b441=a11_0x327964;let _0x170fd5=await this[_0x46b441(0xce)](_0x150975,'GET',_0x46b441(0x159),['symbol']);return _0x170fd5;}async['getUserTradePerp'](_0x2bf94d){const _0x452a5f=a11_0x327964;let _0x484f25=await this[_0x452a5f(0xce)](_0x2bf94d,_0x452a5f(0xcc),_0x452a5f(0x180),[_0x452a5f(0x16f)]);return _0x484f25;}async[a11_0x327964(0x176)](_0x1b6def){const _0x24a215=a11_0x327964;let _0x344892=await this['executeOrder'](_0x1b6def,_0x24a215(0xcc),_0x24a215(0xfa),[_0x24a215(0x16f),'resolution']);return _0x344892;}async[a11_0x327964(0x11d)](_0x50f915){const _0x6e44d5=a11_0x327964;let _0xb5c67c=await this[_0x6e44d5(0xce)](_0x50f915,'GET','/md/v1/ticker/24hr',['symbol']);return _0xb5c67c;}async[a11_0x327964(0xd0)](_0x318b98){const _0x32c422=a11_0x327964;let _0x278d28=await this[_0x32c422(0xce)](_0x318b98,_0x32c422(0xcc),_0x32c422(0xd2),[]);return _0x278d28;}async[a11_0x327964(0x11f)](_0x40f814){const _0x250dd6=a11_0x327964;let _0x50e9a5=await this['executeOrder'](_0x40f814,_0x250dd6(0xcc),'/exchange/public/nomics/trades',['market']);return _0x50e9a5;}async[a11_0x327964(0x105)](_0x2b1f20){const _0x4a63ad=a11_0x327964;let _0x12474b=await this[_0x4a63ad(0xce)](_0x2b1f20,_0x4a63ad(0xcc),_0x4a63ad(0xb7),[_0x4a63ad(0x16f)]);return _0x12474b;}async['getFundingFeeHistory'](_0x194756){const _0x5a5c1=a11_0x327964;let _0x26688d=await this['executeOrder'](_0x194756,'GET',_0x5a5c1(0x14d),['symbol']);return _0x26688d;}async['getContractFeeRate'](_0x5c78c4){const _0x1c89f9=a11_0x327964;let _0x1399ed=await this[_0x1c89f9(0xce)](_0x5c78c4,_0x1c89f9(0xcc),_0x1c89f9(0x17d),[_0x1c89f9(0x167)]);return _0x1399ed;}async[a11_0x327964(0xe7)](_0x1df00f){const _0x44ce2e=a11_0x327964;let _0x4ec745=await this[_0x44ce2e(0xce)](_0x1df00f,_0x44ce2e(0xcc),_0x44ce2e(0x184),[]);return _0x4ec745;}async['spotFuturesTransfer'](_0x4dc2fa){const _0xa0c6eb=a11_0x327964;let _0x2e8974=await this[_0xa0c6eb(0xce)](_0x4dc2fa,_0xa0c6eb(0x139),_0xa0c6eb(0xb6),['amountEv',_0xa0c6eb(0xf2),_0xa0c6eb(0x19a)]);return _0x2e8974;}async[a11_0x327964(0x12d)](_0x3e99dd){const _0x23580f=a11_0x327964;let _0x22959a=await this[_0x23580f(0xce)](_0x3e99dd,_0x23580f(0xcc),_0x23580f(0xb6),[_0x23580f(0x19a)]);return _0x22959a;}async[a11_0x327964(0x18d)](_0x57db81){const _0x438448=a11_0x327964;let _0x2599e4=await this['executeOrder'](_0x57db81,_0x438448(0x196),_0x438448(0x131),[_0x438448(0x16f),_0x438448(0x120),_0x438448(0x143)]);return _0x2599e4;}async[a11_0x327964(0x154)](_0x557ae0){const _0x2690a2=a11_0x327964;let _0x415c02=await this['executeOrder'](_0x557ae0,_0x2690a2(0x196),_0x2690a2(0x16b),[_0x2690a2(0x16f),_0x2690a2(0x143)]);return _0x415c02;}async[a11_0x327964(0xf7)](_0x59cc5c){const _0x43a2e3=a11_0x327964;let _0x493040=await this[_0x43a2e3(0xce)](_0x59cc5c,'DELETE',_0x43a2e3(0x104),[_0x43a2e3(0x16f),_0x43a2e3(0x143)]);return _0x493040;}async[a11_0x327964(0x14c)](_0x264410){const _0x1bb31d=a11_0x327964;let _0x52fe8c=await this[_0x1bb31d(0xce)](_0x264410,_0x1bb31d(0x161),'/g-orders',[_0x1bb31d(0x16f),_0x1bb31d(0x143)]);return _0x52fe8c;}async['cancelAllOrdersHedged'](_0x800e59){const _0x53c8b4=a11_0x327964;let _0x279032=await this[_0x53c8b4(0xce)](_0x800e59,_0x53c8b4(0x161),'/g-orders/all',[_0x53c8b4(0x16f),_0x53c8b4(0x143)]);return _0x279032;}async[a11_0x327964(0xfb)](_0x1ca53c){const _0x560ba4=a11_0x327964;let _0x4b53c7=await this['executeOrder'](_0x1ca53c,_0x560ba4(0xcc),_0x560ba4(0x18c),[_0x560ba4(0x16f)]);return _0x4b53c7;}async[a11_0x327964(0x199)](_0x105d38){const _0x3c36c9=a11_0x327964;let _0x1591da=await this[_0x3c36c9(0xce)](_0x105d38,'GET',_0x3c36c9(0x14e),[_0x3c36c9(0x19a)]);return _0x1591da;}async[a11_0x327964(0x101)](_0x38d3e9){const _0x43518d=a11_0x327964;let _0x25b087=await this[_0x43518d(0xce)](_0x38d3e9,_0x43518d(0xcc),_0x43518d(0x127),[_0x43518d(0x19a),_0x43518d(0x151),_0x43518d(0x136)]);return _0x25b087;}async['getOrderBookHedged'](_0x997709){const _0x1a765f=a11_0x327964;let _0x19da84=await this['executeOrder'](_0x997709,_0x1a765f(0xcc),_0x1a765f(0xbe),[_0x1a765f(0x16f)]);return _0x19da84;}async[a11_0x327964(0x16d)](_0x28ebe6){const _0x5e1f68=a11_0x327964;let _0xc5a66=await this[_0x5e1f68(0xce)](_0x28ebe6,'GET',_0x5e1f68(0x10e),[_0x5e1f68(0x16f),_0x5e1f68(0x10b)]);return _0xc5a66;}async[a11_0x327964(0x186)](_0x2d3d86){const _0x448bd8=a11_0x327964;let _0x44f01f=await this[_0x448bd8(0xce)](_0x2d3d86,'GET',_0x448bd8(0x169),[_0x448bd8(0x16f)]);return _0x44f01f;}async[a11_0x327964(0x1a2)](_0x530a98){const _0x413a70=a11_0x327964;let _0x341d0f=await this[_0x413a70(0xce)](_0x530a98,'GET','/md/v2/ticker/24hr',[_0x413a70(0x16f)]);return _0x341d0f;}async['get24HourTickerAllSymbolsHedged'](_0x4ce761){const _0x7f3d64=a11_0x327964;let _0x2e6d79=await this[_0x7f3d64(0xce)](_0x4ce761,_0x7f3d64(0xcc),_0x7f3d64(0xff),[]);return _0x2e6d79;}async[a11_0x327964(0xc7)](_0x530d3a){const _0x1c39eb=a11_0x327964;let _0x253c32=await this[_0x1c39eb(0xce)](_0x530d3a,_0x1c39eb(0xcc),_0x1c39eb(0xeb),[_0x1c39eb(0x16f)]);return _0x253c32;}async['getAccountPositionsHedged'](_0xd7c3a7){const _0xcd562b=a11_0x327964;let _0x31609f=await this[_0xcd562b(0xce)](_0xd7c3a7,'GET',_0xcd562b(0xe2),['currency']);return _0x31609f;}async['getAccountPositionsUnPnLHedged'](_0x289a4c){const _0x30093e=a11_0x327964;let _0x20b586=await this['executeOrder'](_0x289a4c,_0x30093e(0xcc),_0x30093e(0x11a),[_0x30093e(0x19a)]);return _0x20b586;}async[a11_0x327964(0x108)](_0x2210be){const _0x6e1e81=a11_0x327964;let _0x26c026=await this[_0x6e1e81(0xce)](_0x2210be,_0x6e1e81(0xcc),'/api-data/g-futures/orders/by-order-id',[_0x6e1e81(0x16f)]);return _0x26c026;}async[a11_0x327964(0x118)](_0x4c466f){const _0x50eb0d=a11_0x327964;let _0x3b710b=await this['executeOrder'](_0x4c466f,'GET',_0x50eb0d(0x18b),[]);return _0x3b710b;}async['getFundingRateHistoryHedged'](_0x5df4b7){const _0x452630=a11_0x327964;let _0x188f6b=await this['executeOrder'](_0x5df4b7,_0x452630(0xcc),_0x452630(0xb7),[_0x452630(0x16f)]);return _0x188f6b;}async['getFundingFeeHistoryHedged'](_0x39c8f2){const _0x281fb8=a11_0x327964;let _0x184ea0=await this[_0x281fb8(0xce)](_0x39c8f2,'GET',_0x281fb8(0x193),[_0x281fb8(0x19a)]);return _0x184ea0;}async[a11_0x327964(0xdc)](_0x532702){const _0x478aac=a11_0x327964;let _0x3f12ca=await this[_0x478aac(0xce)](_0x532702,_0x478aac(0x196),'/g-positions/switch-pos-mode-sync',[_0x478aac(0x16f),_0x478aac(0x182)]);return _0x3f12ca;}async[a11_0x327964(0x135)](_0x2a5b1b){const _0x549a01=a11_0x327964;let _0x13ba7e=await this[_0x549a01(0xce)](_0x2a5b1b,'PUT',_0x549a01(0xfc),[_0x549a01(0x16f)]);return _0x13ba7e;}async[a11_0x327964(0xe8)](_0x54c688){const _0x13e4eb=a11_0x327964;let _0x4a170a=await this[_0x13e4eb(0xce)](_0x54c688,_0x13e4eb(0x196),'/g-positions/riskLimit',['symbol',_0x13e4eb(0x15c),'posSide']);return _0x4a170a;}async[a11_0x327964(0x19f)](_0x10e88d){const _0x1498e0=a11_0x327964;let _0xfbdab1=await this[_0x1498e0(0xce)](_0x10e88d,_0x1498e0(0x196),'/margin-trade/orders/create',[_0x1498e0(0x16f),_0x1498e0(0x120),_0x1498e0(0x146)]);return _0xfbdab1;}async['cancelOrderMargin'](_0x3e1ddd){const _0x5f398c=a11_0x327964;let _0x1c2081=await this[_0x5f398c(0xce)](_0x3e1ddd,_0x5f398c(0x161),_0x5f398c(0xe4),['symbol']);return _0x1c2081;}async[a11_0x327964(0x17c)](_0x357064){let _0x39b301=await this['executeOrder'](_0x357064,'DELETE','/margin-trade/orders/all',['symbol']);return _0x39b301;}async['getOpenOrderMargin'](_0x50c8e3){const _0x2bc2f1=a11_0x327964;let _0x194d94=await this['executeOrder'](_0x50c8e3,_0x2bc2f1(0xcc),'/margin-trade/orders/active',[_0x2bc2f1(0x16f)]);return _0x194d94;}async['getAllOpenOrdersMargin'](_0x2e0fab){const _0x423c6a=a11_0x327964;let _0x3873a6=await this[_0x423c6a(0xce)](_0x2e0fab,_0x423c6a(0xcc),_0x423c6a(0xe4),[]);return _0x3873a6;}async[a11_0x327964(0x112)](_0x2f442b){const _0x347586=a11_0x327964;let _0x2628b7=await this[_0x347586(0xce)](_0x2f442b,_0x347586(0xcc),_0x347586(0x13c),[]);return _0x2628b7;}async[a11_0x327964(0x126)](_0x46ecb3){const _0xdf0b1a=a11_0x327964;let _0x31597c=await this['executeOrder'](_0x46ecb3,_0xdf0b1a(0xcc),_0xdf0b1a(0x144),[]);return _0x31597c;}async[a11_0x327964(0xb4)](_0x16ef6f){const _0x275888=a11_0x327964;let _0x43d931=await this[_0x275888(0xce)](_0x16ef6f,_0x275888(0xcc),_0x275888(0xb1),[]);return _0x43d931;}async[a11_0x327964(0xbb)](_0x48bc0d){const _0x32e255=a11_0x327964;let _0x56a96b=await this[_0x32e255(0xce)](_0x48bc0d,'GET',_0x32e255(0xf1),[]);return _0x56a96b;}async[a11_0x327964(0x197)](_0x111758){const _0x281632=a11_0x327964;let _0x15534c=await this['executeOrder'](_0x111758,_0x281632(0xcc),'/margin/payback',[]);return _0x15534c;}async[a11_0x327964(0xf0)](_0xb93c3f){const _0x4d9044=a11_0x327964;let _0x478a7c=await this['executeOrder'](_0xb93c3f,_0x4d9044(0xcc),'/margin-trade/wallets',[]);return _0x478a7c;}async[a11_0x327964(0x170)](_0x17a537){const _0x2ebe73=a11_0x327964;let _0x5b6126=await this[_0x2ebe73(0xce)](_0x17a537,_0x2ebe73(0x139),'/margin/borrow',[_0x2ebe73(0x19a),'amountRv']);return _0x5b6126;}async[a11_0x327964(0x129)](_0x5c0cd2){const _0x14f03d=a11_0x327964;let _0x596926=await this[_0x14f03d(0xce)](_0x5c0cd2,_0x14f03d(0x139),_0x14f03d(0x145),[_0x14f03d(0x19a),_0x14f03d(0x1a1)]);return _0x596926;}async[a11_0x327964(0xe6)](_0x112a04){const _0x566fd7=a11_0x327964;let _0x1a3f55=await this[_0x566fd7(0xce)](_0x112a04,_0x566fd7(0xcc),_0x566fd7(0xcd),[]);return _0x1a3f55;}async['getDepositAddress'](_0x6c7bd2){const _0x4d7df4=a11_0x327964;let _0x101777=await this['executeOrder'](_0x6c7bd2,_0x4d7df4(0xcc),_0x4d7df4(0x110),['currency','chainName']);return _0x101777;}async['getDepositChainSettings'](_0x5108e4){const _0x4b0cb2=a11_0x327964;let _0x54837f=await this[_0x4b0cb2(0xce)](_0x5108e4,'GET','/phemex-deposit/wallets/api/chainCfg',[_0x4b0cb2(0x19a)]);return _0x54837f;}async[a11_0x327964(0x128)](_0x5a2c78){const _0x2a031d=a11_0x327964;let _0x2bd0d3=await this[_0x2a031d(0xce)](_0x5a2c78,_0x2a031d(0xcc),'/phemex-withdraw/wallets/api/withdrawHist',[]);return _0x2bd0d3;}async['getWithdrawChainSettings'](_0x4d8aed){const _0x223c00=a11_0x327964;let _0x54bdbd=await this['executeOrder'](_0x4d8aed,_0x223c00(0xcc),'/phemex-withdraw/wallets/api/asset/info',['currency']);return _0x54bdbd;}async[a11_0x327964(0x12d)](_0x2970f0){const _0xc51927=a11_0x327964;let _0x11c202=await this['executeOrder'](_0x2970f0,_0xc51927(0xcc),_0xc51927(0xb6),['currency']);return _0x11c202;}async[a11_0x327964(0x160)](_0x2aafdf){const _0x4c2305=a11_0x327964;let _0x3af25d=await this[_0x4c2305(0xce)](_0x2aafdf,_0x4c2305(0x139),_0x4c2305(0xd7),[_0x4c2305(0x19a),_0x4c2305(0xdd)]);return _0x3af25d;}async[a11_0x327964(0xc0)](_0x930e3b){const _0x363a5b=a11_0x327964;let _0x59f1e2=await this['executeOrder'](_0x930e3b,_0x363a5b(0xcc),_0x363a5b(0xd7),[_0x363a5b(0x19a)]);return _0x59f1e2;}async[a11_0x327964(0x14f)](_0x3d9feb){const _0x410275=a11_0x327964;let _0x593888=await this[_0x410275(0xce)](_0x3d9feb,_0x410275(0x139),'/assets/futures/sub-accounts/transfer',['currency',_0x410275(0xdd)]);return _0x593888;}async['rfqQuote'](_0x4fd728){const _0x1e8781=a11_0x327964;let _0x28f868=await this[_0x1e8781(0xce)](_0x4fd728,'GET',_0x1e8781(0x156),['fromCurrency',_0x1e8781(0x155),_0x1e8781(0x163)]);return _0x28f868;}async[a11_0x327964(0x165)](_0x210b84){const _0x3d53dc=a11_0x327964;let _0x53edb9=await this[_0x3d53dc(0xce)](_0x210b84,_0x3d53dc(0x139),'/assets/convert',[_0x3d53dc(0x13f),'toCurrency',_0x3d53dc(0x163),_0x3d53dc(0xcb)]);return _0x53edb9;}async[a11_0x327964(0x10f)](_0x40b930){const _0xb84896=a11_0x327964;let _0x4d0ff0=await this[_0xb84896(0xce)](_0x40b930,_0xb84896(0xcc),_0xb84896(0x109),[]);return _0x4d0ff0;}async[a11_0x327964(0x195)](_0x511ec5){const _0x376d6a=a11_0x327964;let _0x5ef066=await this[_0x376d6a(0xce)](_0x511ec5,_0x376d6a(0x139),_0x376d6a(0x11b),[_0x376d6a(0x19a),_0x376d6a(0x181),_0x376d6a(0x122),_0x376d6a(0x157)]);return _0x5ef066;}async['cancelWithdraw'](_0x34a0f1){const _0xb316e1=a11_0x327964;let _0x4467e5=await this[_0xb316e1(0xce)](_0x34a0f1,_0xb316e1(0x139),_0xb316e1(0xc3),['id']);return _0x4467e5;}}
function a11_0x1aa6(){const _0x2d98df=['SuHNG','https://api.phemex.com','/exchange/order','/api-data/spots/pnls','/phemex-withdraw/wallets/api/cancelWithdraw','qyeET','getOrderBook','/assets/transfer','/api-data/g-futures/orders','/spot/orders/active','/positions/riskLimit','getFundingFeeHistory','/md/v2/trade','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','getMarginBorrowHistory','rfqQuote','/margin/payback','getContractFeeRate','/api-data/g-futures/funding-fees','cancelBatchOrderHedged','digest','getTradingAccountUnPnLPerp','/exchange/wallets/v2/depositAddress','get24HourTickerAllSymbols','/g-accounts/accountPositions','setLeverageHedged','/assets/spots/sub-accounts/transfer','getOpenOrders','amendOrder','getTradingAccountPerp','createSignature','fromCurrency','sha256','406TXbQKf','/api-data/g-futures/orders/by-order-id','/g-positions/switch-pos-mode-sync','/md/spot/ticker/24hr','/api-data/spots/orders/by-order-id','/g-orders/activeList','/md/spot/ticker/24hr/all','secret','resolution','getAccountPositionsUnPnLHedged','dhsyTW5!ysh8IuysQKcG45','/orders/cancel','length','/exchange/wallets/withdrawList','getOrdersByIdHedged','/margin/borrow/interests','forEach','publicApis','clOrdID','/margin/orders/trades','/md/fullbook','/api-data/futures/v2/tradeAccountDetail','getOrderBookFull','exchange','setRiskLimitHedged','getWallets','/public/products','getTransferHistory','17313gGVZpN','includes','/api-data/g-futures/trades','getUserOrderPerp','/assets/convert','/api-data/spots/fee-rate','/margin-trade/wallets','/g-positions/riskLimit','/md/v1/ticker/24hr/all','qtyType','/phemex-withdraw/wallets/api/createWithdraw','getDepositAddress','/api-data/futures/fee-rate','/phemex-deposit/wallets/api/chainCfg','/accounts/positions','getChainInfo','getClosedOrdersHedged','/api-data/public/data/funding-rate-history','keys','/api-data/spots/orders','useProxy','/orders/activeList','PUT','getRecentTrades','balancer','filter','/positions/assign','HXvnZ','/md/v2/ticker/24hr/all','wHLWj','/orders/all','/g-positions/leverage','/margin-trade/orders','hex','/exchange/order/list','object','get24HourTickerAllSymbolsPerp','push','cancelOrderPerp','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','orderQty','Missing\x20params:\x20','/g-orders/replace','market','https://testnet-api.phemex.com','4331292iginPg','executeOrder','ZDXAZ','/orders','normalizeData','getFeeRate','orderID','getOpenOrdersPerp','get24HourTickerHedged','POST','label','proxyAuth','code','auth','symbol','getMarginOrdersDetails','/margin-trade/orders/create','getMarginBorrowInterestHistory','/phemex-withdraw/wallets/api/withdrawHist','proxy','createAuthHeader','895004YmlwNH','address','data','withdraw','oGiLd','/margin/borrow','/positions/leverage','sSbFb','cancelBatchOrderPerp','products','/exchange/public/md/v2/kline','get24HourTickerPerp','limit','addProxyObject','checkParams','fromAmountEv','status','setLeverage','ULHJp','targetPosMode','/exchange/public/cfg/chain-settings','amountRv','chainName','join','VudVq','getHistoryTradePerp','jyPTk','logGets','GET','snfWx','stringify','YRBog','eoBkg','phemex','log','valueScale','getOrderBookHedged','apiKey','key','/exchange/order/v2/tradingList','offset','3299wUJOMy','getTradeHistoryHedged','/g-orders/cancel','posSide','default','/md/v2/orderbook','marginBorrow','https','normalizeRec','get24HourTicker','getServerTime','/g-accounts/positions','getOpenOrdersHedged','/md/v2/ticker/24hr','cancelWithdraw','/phemex-deposit/wallets/api/depositHist','getKlineHedged','tickSize','getDepositHistory','/assets/futures/sub-accounts/transfer','getWalletsMargin','getOpenOrderMargin','subToMainTransferSpot','proxyPass','nkrPN','placeOrderMargin','cmfi','testnet','normalize','cancelOrder','1386080NMBMHv','quoteCurrency','subaccount','getOpenOrderActive','name','hUZhN','getTradeHedged','endsWith','/api-data/futures/funding-fees','getOrderHistory','url','/exchange/order/trade','amendOrderHedged','riskLimitRv','cancelOrderHedged','amountEv','cancelAllOrdersPerp','getWithdrawChainSettings','assignPositionBalance','cancelAllOrdersHedged','getDepositChainSettings','getTradesHistory','isArray','10197872fBjlmQ','/g-orders/create','authenticate','subToMainTransferFutures','side','doLog','/exchange/wallets/depositList','amount','auystrAAS2iW85#s2@jdDC','/spot/orders','getClosedOrdersPerp','cancelAllOrders','/orders/replace','CjQys','getOrdersHistoryHedged','getFundsHistory','placeOrder','msg','getOrder','getKline','placeOrderHedged','currency','update','proxyPort','currencies','DELETE','/orders/create','exchangename','Hmac','getFundsDetail','getAccountPositionsHedged','statusText','apiSecret','placeOrderPerp','marginPayback','5608148ZonegV','amendOrderPerp','getMarginOrderTradesDetails','proxyUser','zWEee','/spot/orders/all','/phemex-withdraw/wallets/api/asset/info','toCurrency'];a11_0x1aa6=function(){return _0x2d98df;};return a11_0x1aa6();}const a11_0x275a9c=a11_0x1027;(function(_0x20ccd1,_0xec4987){const _0x43ef3a=a11_0x1027,_0x3b0eb5=_0x20ccd1();while(!![]){try{const _0x1579aa=-parseInt(_0x43ef3a(0x15a))/0x1*(-parseInt(_0x43ef3a(0x1db))/0x2)+-parseInt(_0x43ef3a(0x1f7))/0x3+-parseInt(_0x43ef3a(0x131))/0x4+parseInt(_0x43ef3a(0x178))/0x5+-parseInt(_0x43ef3a(0x11c))/0x6+-parseInt(_0x43ef3a(0x1b2))/0x7+parseInt(_0x43ef3a(0x18f))/0x8;if(_0x1579aa===_0xec4987)break;else _0x3b0eb5['push'](_0x3b0eb5['shift']());}catch(_0x13a861){_0x3b0eb5['push'](_0x3b0eb5['shift']());}}}(a11_0x1aa6,0x72857));import a11_0x490d07 from'axios';import a11_0x125495 from'crypto-js';import a11_0x4ea152,{sign}from'crypto';import a11_0x5dd01d from'crypto-js/enc-base64url.js';function a11_0x1027(_0x35b296,_0x1f8d43){const _0x1aa6f4=a11_0x1aa6();return a11_0x1027=function(_0x1027d3,_0x369a55){_0x1027d3=_0x1027d3-0x112;let _0x226751=_0x1aa6f4[_0x1027d3];return _0x226751;},a11_0x1027(_0x35b296,_0x1f8d43);}export class Phemex{[a11_0x275a9c(0x1ec)]=new Array();['ky']=a11_0x275a9c(0x197);['i']=a11_0x275a9c(0x1e5);['sockets']={};constructor(_0x4b2160){const _0x5d57cf=a11_0x275a9c;_0x4b2160[_0x5d57cf(0x175)]?_0x5d57cf(0x14e)!==_0x5d57cf(0x1ba)?this[_0x5d57cf(0x182)]=_0x5d57cf(0x11b):this[_0x5d57cf(0x182)]=_0x5d57cf(0x1bb):this[_0x5d57cf(0x182)]='https://api.phemex.com';this[_0x5d57cf(0x191)]=_0x4b2160[_0x5d57cf(0x191)]==undefined?!![]:_0x4b2160['authenticate'],this[_0x5d57cf(0x17c)]=_0x4b2160['exchange'][_0x5d57cf(0x1aa)]==undefined?_0x5d57cf(0x152):_0x4b2160['exchange'][_0x5d57cf(0x1aa)],this['exchangeid']=_0x4b2160[_0x5d57cf(0x1f2)]['id'],this[_0x5d57cf(0x126)]=_0x4b2160[_0x5d57cf(0x126)],this[_0x5d57cf(0x176)]=_0x4b2160['normalize']==undefined?![]:_0x4b2160[_0x5d57cf(0x176)];if(this[_0x5d57cf(0x191)]){if(!_0x4b2160[_0x5d57cf(0x157)]||!_0x4b2160['secret']||_0x4b2160[_0x5d57cf(0x157)]==''||_0x4b2160[_0x5d57cf(0x1e2)]==''){if(_0x5d57cf(0x138)!==_0x5d57cf(0x135))throw _0x5d57cf(0x116);else{let _0x10fefa=_0x4d3f0d+_0x5913aa+_0x58f31a,_0x20a19e=_0x58c85f[_0x5d57cf(0x1ab)](_0x5d57cf(0x1da),this[_0x5d57cf(0x1af)])[_0x5d57cf(0x1a5)](_0x10fefa)['digest'](_0x5d57cf(0x218));return _0x20a19e;}}this['apiKey']=_0x4b2160[_0x5d57cf(0x157)],this[_0x5d57cf(0x1af)]=_0x4b2160[_0x5d57cf(0x1e2)],this['isMain']=_0x4b2160[_0x5d57cf(0x17a)]==undefined,this['subaccount']=this['isMain']?'':_0x4b2160[_0x5d57cf(0x17a)];}this[_0x5d57cf(0x20b)]=![],this[_0x5d57cf(0x20f)]=_0x4b2160[_0x5d57cf(0x20f)]||undefined;if(_0x4b2160[_0x5d57cf(0x20b)]){if(_0x4b2160[_0x5d57cf(0x12f)]&&_0x4b2160[_0x5d57cf(0x12f)]!=''||_0x4b2160[_0x5d57cf(0x20f)]&&_0x4b2160[_0x5d57cf(0x20f)]!=''){if(_0x5d57cf(0x17d)===_0x5d57cf(0x1bf)){let _0x189641=this['normalizeRec'](_0x180e4c,_0xceb0fe);_0x189641!={}&&(_0x4c6729[_0x58c095]=_0x189641);}else this['useProxy']=!![],this[_0x5d57cf(0x12f)]=_0x4b2160['proxy'],_0x4b2160[_0x5d57cf(0x1a6)]?this[_0x5d57cf(0x1a6)]=_0x4b2160['proxyPort']:_0x5d57cf(0x1b6)!==_0x5d57cf(0x214)?this[_0x5d57cf(0x1a6)]=0xbb8:_0x38af27[_0x5d57cf(0x129)]={'username':this[_0x5d57cf(0x1b5)],'password':this[_0x5d57cf(0x171)]};}}this['publicApis'][_0x5d57cf(0x114)]();}async['createAuthHeader'](_0x147ee0,_0x4557fb){const _0x3608a9=a11_0x275a9c;let _0x4ea1a0=Date['now']()+0x1770,_0x2b8902=await this[_0x3608a9(0x1d8)](_0x147ee0,_0x4557fb,_0x4ea1a0),_0x5d43e4={'x-phemex-access-token':this[_0x3608a9(0x156)],'x-phemex-request-expiry':_0x4ea1a0,'x-phemex-request-signature':_0x2b8902};return _0x5d43e4;}async['createSignature'](_0x178f08,_0x4428c7,_0x4fc6ac){const _0xe22371=a11_0x275a9c;let _0x2352ee=_0x178f08+_0x4428c7+_0x4fc6ac,_0x52a7ba=a11_0x4ea152['Hmac'](_0xe22371(0x1da),this[_0xe22371(0x1af)])[_0xe22371(0x1a5)](_0x2352ee)[_0xe22371(0x1ce)](_0xe22371(0x218));return _0x52a7ba;}[a11_0x275a9c(0x13e)](_0x20705b){const _0x11a27f=a11_0x275a9c;if(this[_0x11a27f(0x20b)]){if(_0x11a27f(0x150)!==_0x11a27f(0x150)){const _0x156128=_0x1bf676['products'][_0x11a27f(0x210)](_0x24b025=>_0x24b025[_0x11a27f(0x12a)]===_0x16d917[_0x11a27f(0x12a)]);if(_0x156128[_0x11a27f(0x1e7)]!=0x0){const _0x568f15=_0x156128[0x0];_0x479ccb[_0x4b7ada]=_0x429359*_0x568f15[_0x11a27f(0x16b)];}}else{let _0x36d35c={'protocol':_0x11a27f(0x161),'host':this[_0x11a27f(0x12f)],'port':this[_0x11a27f(0x1a6)]};if(this[_0x11a27f(0x127)]===!![]){if(_0x11a27f(0x172)!==_0x11a27f(0x172)){const _0x19a92a=_0x23cda2[_0x11a27f(0x1a7)][_0x11a27f(0x210)](_0x274fd3=>_0x274fd3[_0x11a27f(0x1a4)]===_0x4f956b['currency'])[0x0];let _0xccc2a9=_0x9d8668/0xa**_0x19a92a[_0x11a27f(0x154)];_0x2de52d[_0xf5856f]=_0xccc2a9;}else _0x36d35c[_0x11a27f(0x129)]={'username':this['proxyUser'],'password':this['proxyPass']};}_0x20705b[_0x11a27f(0x12f)]=_0x36d35c;}}return _0x20705b;}async[a11_0x275a9c(0x13f)](_0x321f23,_0x1ad251){const _0xc9eb51=a11_0x275a9c;let _0x9536ac=_0x321f23!=null?_0x1ad251[_0xc9eb51(0x210)](_0x1916df=>!Object[_0xc9eb51(0x209)](_0x321f23)[_0xc9eb51(0x1f8)](_0x1916df)):_0x1ad251;if(_0x9536ac[_0xc9eb51(0x1e7)]!=0x0)throw{'message':_0xc9eb51(0x118)+_0x9536ac[_0xc9eb51(0x148)](',')};}async[a11_0x275a9c(0x11d)](_0x89e715,_0x2912b4,_0x2886f8,_0xedec09){const _0xb6d2f7=a11_0x275a9c;await this[_0xb6d2f7(0x13f)](_0x89e715,_0xedec09);let _0x83b27b=[],_0xba49c4='';for(let _0x40ab6d in _0x89e715){'jyPTk'!==_0xb6d2f7(0x14b)?_0x34ed5a(_0xb6d2f7(0x1c7)):_0x83b27b[_0xb6d2f7(0x114)](_0x40ab6d+'='+_0x89e715[_0x40ab6d]);}_0xba49c4=_0x83b27b[_0xb6d2f7(0x148)]('&');let _0x4b8869={'baseURL':this[_0xb6d2f7(0x182)],'url':_0x2886f8+'?'+_0xba49c4,'method':_0x2912b4,'headers':await this[_0xb6d2f7(0x130)](_0x2886f8,_0xba49c4)};_0x4b8869=this[_0xb6d2f7(0x13e)](_0x4b8869);try{if(_0xb6d2f7(0x151)==='eoBkg'){const _0x5ee004=await a11_0x490d07(_0x4b8869);if(!_0x5ee004){if(_0xb6d2f7(0x149)===_0xb6d2f7(0x149)){this['logGets']==!![]&&doLog(_0xb6d2f7(0x1c7));throw _0xb6d2f7(0x1c7);}else{if(this[_0xb6d2f7(0x20b)]){let _0x5c80bc={'protocol':_0xb6d2f7(0x161),'host':this[_0xb6d2f7(0x12f)],'port':this[_0xb6d2f7(0x1a6)]};this[_0xb6d2f7(0x127)]===!![]&&(_0x5c80bc[_0xb6d2f7(0x129)]={'username':this[_0xb6d2f7(0x1b5)],'password':this['proxyPass']}),_0x456d53[_0xb6d2f7(0x12f)]=_0x5c80bc;}return _0x478827;}}this[_0xb6d2f7(0x14c)]==!![]&&this[_0xb6d2f7(0x194)]({'send':_0x4b8869,'level':_0xb6d2f7(0x15e),'receive':{'code':_0x5ee004[_0xb6d2f7(0x133)]['code'],'data':JSON[_0xb6d2f7(0x14f)](_0x5ee004[_0xb6d2f7(0x133)][_0xb6d2f7(0x133)]),'msg':_0x5ee004['data'][_0xb6d2f7(0x1a0)]}});if(this['normalize']&&_0x2886f8!=_0xb6d2f7(0x1f5)){let _0x5c46cf=await this[_0xb6d2f7(0x120)](_0x5ee004[_0xb6d2f7(0x133)]);return{'code':_0x5ee004[_0xb6d2f7(0x141)],'data':_0x5ee004[_0xb6d2f7(0x133)],'msg':_0x5ee004[_0xb6d2f7(0x1ae)],'normalized':_0x5c46cf};}else{if(_0xb6d2f7(0x212)!==_0xb6d2f7(0x19c))return{'code':_0x5ee004['status'],'data':_0x5ee004[_0xb6d2f7(0x133)],'msg':_0x5ee004['statusText']};else{let _0x23e359=_0x46269d!=null?_0x77400e[_0xb6d2f7(0x210)](_0x3e13d3=>!_0xa40194['keys'](_0x46ccfe)[_0xb6d2f7(0x1f8)](_0x3e13d3)):_0x2128e3;if(_0x23e359[_0xb6d2f7(0x1e7)]!=0x0)throw{'message':_0xb6d2f7(0x118)+_0x23e359['join'](',')};}}}else _0x691060['push'](_0x302083+'='+_0x56393f[_0x542160]);}catch(_0x1d0b9e){if(_0xb6d2f7(0x143)!==_0xb6d2f7(0x143))this[_0xb6d2f7(0x194)]({'send':_0x116e70,'level':'default','receive':{'code':_0x15aa21[_0xb6d2f7(0x133)][_0xb6d2f7(0x128)],'data':_0x5cb7de[_0xb6d2f7(0x14f)](_0x5f1bf0['data'][_0xb6d2f7(0x133)]),'msg':_0x3a097c['data'][_0xb6d2f7(0x1a0)]}});else return _0x1d0b9e;}}async['normalizeData'](_0x332cb1){const _0x2b2427=a11_0x275a9c;let _0x2de598=await this['getProductInfo']();return this[_0x2b2427(0x162)](_0x332cb1,_0x2de598[_0x2b2427(0x133)][_0x2b2427(0x133)]);}[a11_0x275a9c(0x162)](_0x47d878,_0x5ba482){const _0x304434=a11_0x275a9c;let _0x2b0edf={};return Object[_0x304434(0x209)](_0x47d878)[_0x304434(0x1eb)](_0x16c49b=>{const _0x470cfb=_0x304434;let _0xc77560=_0x47d878[_0x16c49b];if(Array[_0x470cfb(0x18e)](_0xc77560)){let _0x29f733=_0xc77560['map'](_0x8163b=>this['normalizeRec'](_0x8163b,_0x5ba482));_0x29f733!=[]&&(_0x2b0edf[_0x16c49b]=_0x29f733);}else{if(typeof _0xc77560===_0x470cfb(0x112)&&_0xc77560!=null){let _0x3aa8d8=this[_0x470cfb(0x162)](_0xc77560,_0x5ba482);_0x3aa8d8!={}&&(_0x2b0edf[_0x16c49b]=_0x3aa8d8);}else{if((_0x16c49b[_0x470cfb(0x17f)]('balanceEv')||_0x16c49b['endsWith']('BalanceEv'))&&_0x47d878[_0x470cfb(0x1a4)]){const _0x19848c=_0x5ba482[_0x470cfb(0x1a7)][_0x470cfb(0x210)](_0x20582f=>_0x20582f[_0x470cfb(0x1a4)]===_0x47d878[_0x470cfb(0x1a4)])[0x0];let _0x25e3c8=_0xc77560/0xa**_0x19848c[_0x470cfb(0x154)];_0x2b0edf[_0x16c49b]=_0x25e3c8;}else{if((_0x16c49b['endsWith']('OrderQty')||_0x16c49b[_0x470cfb(0x17f)](_0x470cfb(0x117)))&&_0x47d878[_0x470cfb(0x12a)]){const _0xcfb1d6=_0x5ba482[_0x470cfb(0x13a)][_0x470cfb(0x210)](_0x373c75=>_0x373c75[_0x470cfb(0x12a)]===_0x47d878[_0x470cfb(0x12a)]);if(_0xcfb1d6[_0x470cfb(0x1e7)]!=0x0){if(_0x470cfb(0x11e)!=='ZDXAZ'){this[_0x470cfb(0x14c)]==!![]&&_0x1fb4ed(_0x470cfb(0x1c7));throw _0x470cfb(0x1c7);}else{const _0x1b1c8c=_0xcfb1d6[0x0];_0x2b0edf[_0x16c49b]=_0xc77560*_0x1b1c8c[_0x470cfb(0x16b)];}}}else _0x2b0edf[_0x16c49b]=_0xc77560;}}}}),console[_0x304434(0x153)](_0x2b0edf),_0x2b0edf;}async[a11_0x275a9c(0x164)](_0x53fac8){const _0xb5820c=a11_0x275a9c;let _0x380e57=await this[_0xb5820c(0x11d)](_0x53fac8,_0xb5820c(0x14d),'/public/time',[]);return _0x380e57;}async['getProductInfo'](_0x566d0e){const _0x2036d2=a11_0x275a9c;let _0x1b1385=await this[_0x2036d2(0x11d)](_0x566d0e,_0x2036d2(0x14d),'/public/products',[]);return _0x1b1385;}async[a11_0x275a9c(0x19f)](_0x2ab701){const _0x1f9ba3=a11_0x275a9c;let _0x7e8370=await this['executeOrder'](_0x2ab701,_0x1f9ba3(0x20d),'/spot/orders/create',[_0x1f9ba3(0x12a),'side','qtyType']);return _0x7e8370;}async[a11_0x275a9c(0x1d6)](_0x4500e0){const _0x49f36f=a11_0x275a9c;let _0x179fcc=await this[_0x49f36f(0x11d)](_0x4500e0,_0x49f36f(0x20d),_0x49f36f(0x198),[_0x49f36f(0x12a)]);return _0x179fcc;}async[a11_0x275a9c(0x177)](_0x6dfccf){const _0x3cc3bb=a11_0x275a9c;let _0x56d9f5=await this[_0x3cc3bb(0x11d)](_0x6dfccf,'DELETE','/spot/orders',[_0x3cc3bb(0x12a),'orderID']);return _0x56d9f5;}async[a11_0x275a9c(0x19a)](_0x458221){const _0x47efee=a11_0x275a9c;let _0x3bb5ef=await this[_0x47efee(0x11d)](_0x458221,_0x47efee(0x1a8),_0x47efee(0x1b7),[_0x47efee(0x12a)]);return _0x3bb5ef;}async[a11_0x275a9c(0x1d5)](_0x47ed52){const _0x11025b=a11_0x275a9c;let _0xa0d112=await this[_0x11025b(0x11d)](_0x47ed52,'GET',_0x11025b(0x198),[_0x11025b(0x12a)]);return _0xa0d112;}async[a11_0x275a9c(0x17b)](_0xaac1cb){const _0x52ceba=a11_0x275a9c;let _0x4e8063=await this['executeOrder'](_0xaac1cb,_0x52ceba(0x14d),_0x52ceba(0x1c3),[_0x52ceba(0x122),_0x52ceba(0x12a)]);return _0x4e8063;}async[a11_0x275a9c(0x1a1)](_0x3289be){const _0x2b2f93=a11_0x275a9c;let _0x5abb36=await this[_0x2b2f93(0x11d)](_0x3289be,_0x2b2f93(0x14d),_0x2b2f93(0x1df),[_0x2b2f93(0x122),_0x2b2f93(0x12a)]);return _0x5abb36;}async[a11_0x275a9c(0x1f4)](_0x505254){const _0x3d3525=a11_0x275a9c;let _0x2c8904=await this[_0x3d3525(0x11d)](_0x505254,_0x3d3525(0x14d),'/spot/wallets',[]);return _0x2c8904;}async[a11_0x275a9c(0x181)](_0x1739d5){const _0x299e23=a11_0x275a9c;let _0x5d8b20=await this[_0x299e23(0x11d)](_0x1739d5,_0x299e23(0x14d),_0x299e23(0x20a),[_0x299e23(0x12a)]);return _0x5d8b20;}async[a11_0x275a9c(0x18d)](_0x56f197){const _0x2385ad=a11_0x275a9c;let _0x27e341=await this[_0x2385ad(0x11d)](_0x56f197,_0x2385ad(0x14d),'/api-data/spots/trades',[_0x2385ad(0x12a)]);return _0x27e341;}async['getPnL'](_0x395111){const _0x1d2ab3=a11_0x275a9c;let _0x7def9c=await this['executeOrder'](_0x395111,_0x1d2ab3(0x14d),_0x1d2ab3(0x1bd),[]);return _0x7def9c;}async[a11_0x275a9c(0x206)](_0x3b019b){const _0x3788e9=a11_0x275a9c;let _0x4781de=await this['executeOrder'](_0x3b019b,_0x3788e9(0x14d),_0x3788e9(0x145),['currency']);return _0x4781de;}async[a11_0x275a9c(0x202)](_0x164e26){const _0x57c8e5=a11_0x275a9c;let _0x4f10dd=await this['executeOrder'](_0x164e26,_0x57c8e5(0x14d),_0x57c8e5(0x1d0),[_0x57c8e5(0x1a4),_0x57c8e5(0x147)]);return _0x4f10dd;}async[a11_0x275a9c(0x16c)](_0x359c1b){const _0x369936=a11_0x275a9c;let _0x2bead3=await this[_0x369936(0x11d)](_0x359c1b,_0x369936(0x14d),_0x369936(0x195),[_0x369936(0x1a4)]);return _0x2bead3;}async['getWithdrawHistory'](_0x6843b){const _0x219dc3=a11_0x275a9c;let _0x569836=await this[_0x219dc3(0x11d)](_0x6843b,_0x219dc3(0x14d),_0x219dc3(0x1e8),[_0x219dc3(0x1a4)]);return _0x569836;}async[a11_0x275a9c(0x19e)](_0x54729a){const _0x172360=a11_0x275a9c;let _0x3d5e6b=await this[_0x172360(0x11d)](_0x54729a,_0x172360(0x14d),'/api-data/spots/funds',[_0x172360(0x1a4)]);return _0x3d5e6b;}async[a11_0x275a9c(0x121)](_0x2876fe){const _0x301864=a11_0x275a9c;let _0x28fb5e=await this[_0x301864(0x11d)](_0x2876fe,_0x301864(0x14d),_0x301864(0x1fc),[_0x301864(0x179)]);return _0x28fb5e;}async[a11_0x275a9c(0x1c0)](_0x9c399a){const _0x59338a=a11_0x275a9c;let _0xb01d8f=await this[_0x59338a(0x11d)](_0x9c399a,_0x59338a(0x14d),'/md/orderbook',[_0x59338a(0x12a)]);return _0xb01d8f;}async[a11_0x275a9c(0x1f1)](_0x4145de){const _0x57b01f=a11_0x275a9c;let _0x673550=await this[_0x57b01f(0x11d)](_0x4145de,_0x57b01f(0x14d),_0x57b01f(0x1ef),['symbol']);return _0x673550;}async[a11_0x275a9c(0x20e)](_0xeb7910){const _0x428083=a11_0x275a9c;let _0x4e8453=await this[_0x428083(0x11d)](_0xeb7910,_0x428083(0x14d),'/md/trade',['symbol']);return _0x4e8453;}async[a11_0x275a9c(0x1d1)](_0x2c8b09){const _0x62b3cc=a11_0x275a9c;let _0x153f0d=await this[_0x62b3cc(0x11d)](_0x2c8b09,_0x62b3cc(0x14d),_0x62b3cc(0x1e1),[]);return _0x153f0d;}async[a11_0x275a9c(0x163)](_0x2f823a){const _0x5e93dc=a11_0x275a9c;let _0x9e1947=await this[_0x5e93dc(0x11d)](_0x2f823a,_0x5e93dc(0x14d),_0x5e93dc(0x1de),['symbol']);return _0x9e1947;}async[a11_0x275a9c(0x1b0)](_0x5d7801){const _0x515c6b=a11_0x275a9c;_0x5d7801[_0x515c6b(0x1ed)]&&(_0x5d7801[_0x515c6b(0x1ed)]=_0x515c6b(0x174)+_0x5d7801[_0x515c6b(0x1ed)]);let _0x5b12f6=await this[_0x515c6b(0x11d)](_0x5d7801,_0x515c6b(0x20d),_0x515c6b(0x1a9),[_0x515c6b(0x12a),_0x515c6b(0x1ed),_0x515c6b(0x193),_0x515c6b(0x117)]);return _0x5b12f6;}async[a11_0x275a9c(0x1b3)](_0x5e1460){const _0x2401c0=a11_0x275a9c;let _0x2aa76a=await this[_0x2401c0(0x11d)](_0x5e1460,_0x2401c0(0x20d),_0x2401c0(0x19b),[_0x2401c0(0x12a)]);return _0x2aa76a;}async[a11_0x275a9c(0x115)](_0x545b5c){const _0xf915ea=a11_0x275a9c;let _0x3c0b40=await this[_0xf915ea(0x11d)](_0x545b5c,_0xf915ea(0x1a8),_0xf915ea(0x1e6),[_0xf915ea(0x12a)]);return _0x3c0b40;}async[a11_0x275a9c(0x139)](_0x322b00){const _0x398166=a11_0x275a9c;let _0x192a2b=await this[_0x398166(0x11d)](_0x322b00,_0x398166(0x1a8),_0x398166(0x11f),[_0x398166(0x12a),_0x398166(0x122)]);return _0x192a2b;}async[a11_0x275a9c(0x188)](_0x2a0275){const _0x435e32=a11_0x275a9c;let _0xa41b21=await this['executeOrder'](_0x2a0275,_0x435e32(0x1a8),_0x435e32(0x215),[_0x435e32(0x12a)]);return _0xa41b21;}async[a11_0x275a9c(0x1d7)](_0x51500b,_0x5c00fb){const _0x1ed6f5=a11_0x275a9c;let _0x558644=await this[_0x1ed6f5(0x11d)](_0x51500b,_0x1ed6f5(0x14d),'/accounts/accountPositions',['currency']);return _0x558644;}async[a11_0x275a9c(0x1cf)](_0xcf16db){const _0x4bf821=a11_0x275a9c;let _0x4a957d=await this[_0x4bf821(0x11d)](_0xcf16db,_0x4bf821(0x14d),_0x4bf821(0x205),[_0x4bf821(0x1a4)]);return _0x4a957d;}async[a11_0x275a9c(0x123)](_0xdb8ea2){const _0x4759e6=a11_0x275a9c;let _0x47459b=await this[_0x4759e6(0x11d)](_0xdb8ea2,'GET',_0x4759e6(0x20c),[_0x4759e6(0x12a)]);return _0x47459b;}async[a11_0x275a9c(0x199)](_0x31b0b2){const _0x58da9d=a11_0x275a9c;let _0x5d9216=await this[_0x58da9d(0x11d)](_0x31b0b2,'GET',_0x58da9d(0x219),[_0x58da9d(0x12a)]);return _0x5d9216;}async[a11_0x275a9c(0x142)](_0x5499fa){const _0x39c5a6=a11_0x275a9c;let _0xca5d9c=await this[_0x39c5a6(0x11d)](_0x5499fa,'PUT',_0x39c5a6(0x137),[_0x39c5a6(0x12a)]);return _0xca5d9c;}async['setRiskLimit'](_0x238f42){const _0x1ff4ce=a11_0x275a9c;let _0x3a2a17=await this[_0x1ff4ce(0x11d)](_0x238f42,_0x1ff4ce(0x20d),_0x1ff4ce(0x1c4),[_0x1ff4ce(0x12a)]);return _0x3a2a17;}async[a11_0x275a9c(0x18a)](_0x4ce5a5){const _0x368e3a=a11_0x275a9c;let _0x43cb1e=await this[_0x368e3a(0x11d)](_0x4ce5a5,_0x368e3a(0x125),_0x368e3a(0x211),[_0x368e3a(0x12a)]);return _0x43cb1e;}async[a11_0x275a9c(0x1fa)](_0x37ae2d){const _0x2e987e=a11_0x275a9c;let _0x4b69ec=await this[_0x2e987e(0x11d)](_0x37ae2d,_0x2e987e(0x14d),_0x2e987e(0x1bc),['symbol']);return _0x4b69ec;}async['getUserTradePerp'](_0x18a779){const _0x2e4ad7=a11_0x275a9c;let _0x49819a=await this[_0x2e4ad7(0x11d)](_0x18a779,_0x2e4ad7(0x14d),_0x2e4ad7(0x183),['symbol']);return _0x49819a;}async[a11_0x275a9c(0x1a2)](_0x539906){const _0x5a7a36=a11_0x275a9c;let _0x4d2a2b=await this[_0x5a7a36(0x11d)](_0x539906,_0x5a7a36(0x14d),_0x5a7a36(0x13b),[_0x5a7a36(0x12a),_0x5a7a36(0x1e3)]);return _0x4d2a2b;}async[a11_0x275a9c(0x13c)](_0x24105d){const _0x2e8caf=a11_0x275a9c;let _0x4a422e=await this[_0x2e8caf(0x11d)](_0x24105d,'GET','/md/v1/ticker/24hr',[_0x2e8caf(0x12a)]);return _0x4a422e;}async[a11_0x275a9c(0x113)](_0xea1253){const _0x41e96e=a11_0x275a9c;let _0x1971de=await this[_0x41e96e(0x11d)](_0xea1253,_0x41e96e(0x14d),_0x41e96e(0x1ff),[]);return _0x1971de;}async[a11_0x275a9c(0x14a)](_0x5d18d9){const _0x3880f8=a11_0x275a9c;let _0x4fa241=await this[_0x3880f8(0x11d)](_0x5d18d9,_0x3880f8(0x14d),'/exchange/public/nomics/trades',[_0x3880f8(0x11a)]);return _0x4fa241;}async['getFundingRateHistory'](_0x26e2ea){const _0x2f4fc7=a11_0x275a9c;let _0x169fe6=await this[_0x2f4fc7(0x11d)](_0x26e2ea,_0x2f4fc7(0x14d),_0x2f4fc7(0x208),['symbol']);return _0x169fe6;}async[a11_0x275a9c(0x1c5)](_0x2439f9){const _0x3d07ed=a11_0x275a9c;let _0x5c9a9f=await this[_0x3d07ed(0x11d)](_0x2439f9,_0x3d07ed(0x14d),_0x3d07ed(0x180),[_0x3d07ed(0x12a)]);return _0x5c9a9f;}async[a11_0x275a9c(0x1cb)](_0x42759e){const _0x1d7b68=a11_0x275a9c;let _0x5a8f2a=await this[_0x1d7b68(0x11d)](_0x42759e,_0x1d7b68(0x14d),_0x1d7b68(0x203),['settleCurrency']);return _0x5a8f2a;}async[a11_0x275a9c(0x1ac)](_0x2dca9f){const _0x2aa7fb=a11_0x275a9c;let _0x55a80d=await this[_0x2aa7fb(0x11d)](_0x2dca9f,_0x2aa7fb(0x14d),_0x2aa7fb(0x1f0),[]);return _0x55a80d;}async['spotFuturesTransfer'](_0x251f38){const _0x1dd8ed=a11_0x275a9c;let _0x10714d=await this[_0x1dd8ed(0x11d)](_0x251f38,_0x1dd8ed(0x125),_0x1dd8ed(0x1c1),['amountEv','moveOp',_0x1dd8ed(0x1a4)]);return _0x10714d;}async[a11_0x275a9c(0x1f6)](_0x2f8b1a){const _0x3cdac9=a11_0x275a9c;let _0x38cc46=await this[_0x3cdac9(0x11d)](_0x2f8b1a,_0x3cdac9(0x14d),_0x3cdac9(0x1c1),[_0x3cdac9(0x1a4)]);return _0x38cc46;}async[a11_0x275a9c(0x1a3)](_0x133014){const _0x2cb179=a11_0x275a9c;let _0x3e0a2a=await this[_0x2cb179(0x11d)](_0x133014,'PUT',_0x2cb179(0x190),[_0x2cb179(0x12a),_0x2cb179(0x193),'posSide']);return _0x3e0a2a;}async[a11_0x275a9c(0x184)](_0x28e787){const _0x34ab79=a11_0x275a9c;let _0x3c541e=await this[_0x34ab79(0x11d)](_0x28e787,_0x34ab79(0x20d),_0x34ab79(0x119),[_0x34ab79(0x12a),'posSide']);return _0x3c541e;}async[a11_0x275a9c(0x186)](_0x4176ff){const _0x1b5482=a11_0x275a9c;let _0x5abde7=await this[_0x1b5482(0x11d)](_0x4176ff,_0x1b5482(0x1a8),_0x1b5482(0x15c),[_0x1b5482(0x12a),_0x1b5482(0x15d)]);return _0x5abde7;}async[a11_0x275a9c(0x1cd)](_0x4bdc27){const _0x30e897=a11_0x275a9c;let _0x6c6f21=await this[_0x30e897(0x11d)](_0x4bdc27,_0x30e897(0x1a8),'/g-orders',[_0x30e897(0x12a),_0x30e897(0x15d)]);return _0x6c6f21;}async[a11_0x275a9c(0x18b)](_0x1e9956){const _0x4fdc04=a11_0x275a9c;let _0x2dfaf4=await this['executeOrder'](_0x1e9956,'DELETE','/g-orders/all',[_0x4fdc04(0x12a),_0x4fdc04(0x15d)]);return _0x2dfaf4;}async[a11_0x275a9c(0x166)](_0xbb3ac6){const _0x3e748a=a11_0x275a9c;let _0x39bc3e=await this[_0x3e748a(0x11d)](_0xbb3ac6,'GET',_0x3e748a(0x1e0),[_0x3e748a(0x12a)]);return _0x39bc3e;}async[a11_0x275a9c(0x207)](_0x3aee0e){const _0x40da08=a11_0x275a9c;let _0x393835=await this[_0x40da08(0x11d)](_0x3aee0e,'GET','/exchange/order/v2/orderList',[_0x40da08(0x1a4)]);return _0x393835;}async['getUserTradeHedged'](_0x6111e9){const _0x365c22=a11_0x275a9c;let _0x197b2b=await this[_0x365c22(0x11d)](_0x6111e9,_0x365c22(0x14d),_0x365c22(0x158),[_0x365c22(0x1a4),_0x365c22(0x159),_0x365c22(0x13d)]);return _0x197b2b;}async[a11_0x275a9c(0x155)](_0x5e0907){const _0x534bfc=a11_0x275a9c;let _0x247cae=await this[_0x534bfc(0x11d)](_0x5e0907,_0x534bfc(0x14d),_0x534bfc(0x15f),[_0x534bfc(0x12a)]);return _0x247cae;}async[a11_0x275a9c(0x16a)](_0x410614){const _0x67bad6=a11_0x275a9c;let _0x55b649=await this[_0x67bad6(0x11d)](_0x410614,_0x67bad6(0x14d),'/exchange/public/md/v2/kline/last',[_0x67bad6(0x12a),_0x67bad6(0x1e3)]);return _0x55b649;}async[a11_0x275a9c(0x17e)](_0x54c169){const _0x4a67b7=a11_0x275a9c;let _0x5210b0=await this[_0x4a67b7(0x11d)](_0x54c169,'GET',_0x4a67b7(0x1c6),[_0x4a67b7(0x12a)]);return _0x5210b0;}async[a11_0x275a9c(0x124)](_0x1642b8){const _0x2a441a=a11_0x275a9c;let _0x244066=await this[_0x2a441a(0x11d)](_0x1642b8,_0x2a441a(0x14d),_0x2a441a(0x167),[_0x2a441a(0x12a)]);return _0x244066;}async['get24HourTickerAllSymbolsHedged'](_0x46c674){const _0x5ac37a=a11_0x275a9c;let _0x2ec935=await this[_0x5ac37a(0x11d)](_0x46c674,_0x5ac37a(0x14d),_0x5ac37a(0x213),[]);return _0x2ec935;}async[a11_0x275a9c(0x19d)](_0x3d1a9a){const _0x40aafa=a11_0x275a9c;let _0xb1830c=await this['executeOrder'](_0x3d1a9a,_0x40aafa(0x14d),_0x40aafa(0x1c2),[_0x40aafa(0x12a)]);return _0xb1830c;}async[a11_0x275a9c(0x1ad)](_0x3c7256){const _0x47c2c8=a11_0x275a9c;let _0x483813=await this[_0x47c2c8(0x11d)](_0x3c7256,_0x47c2c8(0x14d),_0x47c2c8(0x1d2),['currency']);return _0x483813;}async[a11_0x275a9c(0x1e4)](_0x2f2ae3){const _0x1c52b4=a11_0x275a9c;let _0x3875e9=await this[_0x1c52b4(0x11d)](_0x2f2ae3,_0x1c52b4(0x14d),_0x1c52b4(0x165),['currency']);return _0x3875e9;}async[a11_0x275a9c(0x1e9)](_0xcbe00){const _0x298fce=a11_0x275a9c;let _0x1147fe=await this[_0x298fce(0x11d)](_0xcbe00,_0x298fce(0x14d),_0x298fce(0x1dc),[_0x298fce(0x12a)]);return _0x1147fe;}async[a11_0x275a9c(0x15b)](_0x34cb1e){const _0x2fd3d6=a11_0x275a9c;let _0x21b955=await this[_0x2fd3d6(0x11d)](_0x34cb1e,_0x2fd3d6(0x14d),_0x2fd3d6(0x1f9),[]);return _0x21b955;}async['getFundingRateHistoryHedged'](_0xa765e8){const _0xee56c4=a11_0x275a9c;let _0x512ee0=await this[_0xee56c4(0x11d)](_0xa765e8,_0xee56c4(0x14d),_0xee56c4(0x208),[_0xee56c4(0x12a)]);return _0x512ee0;}async['getFundingFeeHistoryHedged'](_0x3d4d13){const _0x5b14d6=a11_0x275a9c;let _0x355358=await this['executeOrder'](_0x3d4d13,_0x5b14d6(0x14d),_0x5b14d6(0x1cc),[_0x5b14d6(0x1a4)]);return _0x355358;}async['switchPositionModeSynchronously'](_0x5a027a){const _0x3297bd=a11_0x275a9c;let _0x367745=await this['executeOrder'](_0x5a027a,_0x3297bd(0x20d),_0x3297bd(0x1dd),[_0x3297bd(0x12a),_0x3297bd(0x144)]);return _0x367745;}async[a11_0x275a9c(0x1d3)](_0x3c7991){const _0x1b2892=a11_0x275a9c;let _0xea04e6=await this[_0x1b2892(0x11d)](_0x3c7991,_0x1b2892(0x20d),_0x1b2892(0x216),[_0x1b2892(0x12a)]);return _0xea04e6;}async[a11_0x275a9c(0x1f3)](_0x1e1076){const _0x2337ae=a11_0x275a9c;let _0x91be71=await this[_0x2337ae(0x11d)](_0x1e1076,_0x2337ae(0x20d),_0x2337ae(0x1fe),['symbol',_0x2337ae(0x185),_0x2337ae(0x15d)]);return _0x91be71;}async[a11_0x275a9c(0x173)](_0x14d3ee){const _0x3d2f0b=a11_0x275a9c;let _0x428d5f=await this[_0x3d2f0b(0x11d)](_0x14d3ee,_0x3d2f0b(0x20d),_0x3d2f0b(0x12c),[_0x3d2f0b(0x12a),'side',_0x3d2f0b(0x200)]);return _0x428d5f;}async['cancelOrderMargin'](_0x12e37c){const _0x28bf28=a11_0x275a9c;let _0xc44e2d=await this['executeOrder'](_0x12e37c,_0x28bf28(0x1a8),_0x28bf28(0x217),[_0x28bf28(0x12a)]);return _0xc44e2d;}async['cancelAllOrdersMargin'](_0x47b939){const _0x37ad4e=a11_0x275a9c;let _0x21a28f=await this[_0x37ad4e(0x11d)](_0x47b939,_0x37ad4e(0x1a8),'/margin-trade/orders/all',[_0x37ad4e(0x12a)]);return _0x21a28f;}async[a11_0x275a9c(0x16f)](_0x369d52){const _0xd1c79b=a11_0x275a9c;let _0x1eb5e9=await this['executeOrder'](_0x369d52,'GET','/margin-trade/orders/active',[_0xd1c79b(0x12a)]);return _0x1eb5e9;}async['getAllOpenOrdersMargin'](_0x374734){const _0x36072e=a11_0x275a9c;let _0x513d6c=await this[_0x36072e(0x11d)](_0x374734,_0x36072e(0x14d),'/margin-trade/orders',[]);return _0x513d6c;}async[a11_0x275a9c(0x12b)](_0x5a0ea9){const _0x3fef6b=a11_0x275a9c;let _0xe53bef=await this[_0x3fef6b(0x11d)](_0x5a0ea9,'GET','/margin/orders',[]);return _0xe53bef;}async[a11_0x275a9c(0x1b4)](_0x1dadc3){const _0x4b0e97=a11_0x275a9c;let _0x50a585=await this[_0x4b0e97(0x11d)](_0x1dadc3,_0x4b0e97(0x14d),_0x4b0e97(0x1ee),[]);return _0x50a585;}async[a11_0x275a9c(0x12d)](_0x5cb730){const _0x29616c=a11_0x275a9c;let _0x4067d1=await this['executeOrder'](_0x5cb730,_0x29616c(0x14d),_0x29616c(0x1ea),[]);return _0x4067d1;}async[a11_0x275a9c(0x1c8)](_0xafa6da){const _0x160132=a11_0x275a9c;let _0x18ca5d=await this[_0x160132(0x11d)](_0xafa6da,_0x160132(0x14d),_0x160132(0x136),[]);return _0x18ca5d;}async['getMarginPaybackHistory'](_0x34d978){const _0x13b471=a11_0x275a9c;let _0x278460=await this['executeOrder'](_0x34d978,_0x13b471(0x14d),'/margin/payback',[]);return _0x278460;}async[a11_0x275a9c(0x16e)](_0x3c044d){const _0x534ece=a11_0x275a9c;let _0x29dc71=await this[_0x534ece(0x11d)](_0x3c044d,_0x534ece(0x14d),_0x534ece(0x1fd),[]);return _0x29dc71;}async[a11_0x275a9c(0x160)](_0x364488){const _0x2a7911=a11_0x275a9c;let _0x514945=await this[_0x2a7911(0x11d)](_0x364488,_0x2a7911(0x125),_0x2a7911(0x136),[_0x2a7911(0x1a4),_0x2a7911(0x146)]);return _0x514945;}async[a11_0x275a9c(0x1b1)](_0x413cf4){const _0x2e0b67=a11_0x275a9c;let _0x5f2d61=await this[_0x2e0b67(0x11d)](_0x413cf4,_0x2e0b67(0x125),_0x2e0b67(0x1ca),['currency',_0x2e0b67(0x146)]);return _0x5f2d61;}async[a11_0x275a9c(0x16c)](_0x486c94){const _0x586559=a11_0x275a9c;let _0x265229=await this[_0x586559(0x11d)](_0x486c94,_0x586559(0x14d),_0x586559(0x169),[]);return _0x265229;}async[a11_0x275a9c(0x202)](_0x55e382){const _0x38e18f=a11_0x275a9c;let _0x3a5aca=await this['executeOrder'](_0x55e382,_0x38e18f(0x14d),'/phemex-deposit/wallets/api/depositAddress',[_0x38e18f(0x1a4),_0x38e18f(0x147)]);return _0x3a5aca;}async[a11_0x275a9c(0x18c)](_0x1bca2c){const _0x1a48ff=a11_0x275a9c;let _0x3d4eb6=await this['executeOrder'](_0x1bca2c,'GET',_0x1a48ff(0x204),['currency']);return _0x3d4eb6;}async['getWithdrawHistory'](_0x2636f4){const _0x4db4ea=a11_0x275a9c;let _0x414359=await this['executeOrder'](_0x2636f4,_0x4db4ea(0x14d),_0x4db4ea(0x12e),[]);return _0x414359;}async[a11_0x275a9c(0x189)](_0x5e1a2a){const _0x3c3436=a11_0x275a9c;let _0x2ad36d=await this[_0x3c3436(0x11d)](_0x5e1a2a,_0x3c3436(0x14d),_0x3c3436(0x1b8),[_0x3c3436(0x1a4)]);return _0x2ad36d;}async[a11_0x275a9c(0x1f6)](_0x4b2ce1){const _0x261b6e=a11_0x275a9c;let _0x1ee11d=await this[_0x261b6e(0x11d)](_0x4b2ce1,'GET',_0x261b6e(0x1c1),[_0x261b6e(0x1a4)]);return _0x1ee11d;}async[a11_0x275a9c(0x170)](_0x444c48){const _0x193b04=a11_0x275a9c;let _0x2f6d12=await this['executeOrder'](_0x444c48,_0x193b04(0x125),_0x193b04(0x1d4),[_0x193b04(0x1a4),_0x193b04(0x187)]);return _0x2f6d12;}async['getSubToMainTransfersSpot'](_0x2f7ccb){const _0x31c28f=a11_0x275a9c;let _0x411a9b=await this['executeOrder'](_0x2f7ccb,_0x31c28f(0x14d),_0x31c28f(0x1d4),[_0x31c28f(0x1a4)]);return _0x411a9b;}async[a11_0x275a9c(0x192)](_0x42168b){const _0x5a77a7=a11_0x275a9c;let _0x4c5eb8=await this[_0x5a77a7(0x11d)](_0x42168b,_0x5a77a7(0x125),_0x5a77a7(0x16d),['currency',_0x5a77a7(0x187)]);return _0x4c5eb8;}async[a11_0x275a9c(0x1c9)](_0x45ccac){const _0x18dce9=a11_0x275a9c;let _0x5eeecf=await this[_0x18dce9(0x11d)](_0x45ccac,_0x18dce9(0x14d),'/assets/quote',[_0x18dce9(0x1d9),_0x18dce9(0x1b9),_0x18dce9(0x140)]);return _0x5eeecf;}async['convert'](_0x5b7889){const _0x5d39f2=a11_0x275a9c;let _0x3347a7=await this['executeOrder'](_0x5b7889,_0x5d39f2(0x125),'/assets/convert',[_0x5d39f2(0x1d9),'toCurrency',_0x5d39f2(0x140),_0x5d39f2(0x128)]);return _0x3347a7;}async['getConvertHistory'](_0x4b3ba0){const _0x390519=a11_0x275a9c;let _0x1ab4fe=await this[_0x390519(0x11d)](_0x4b3ba0,'GET',_0x390519(0x1fb),[]);return _0x1ab4fe;}async[a11_0x275a9c(0x134)](_0x1e9165){const _0x495068=a11_0x275a9c;let _0x5cf6cb=await this[_0x495068(0x11d)](_0x1e9165,_0x495068(0x125),_0x495068(0x201),['currency',_0x495068(0x196),_0x495068(0x132),_0x495068(0x147)]);return _0x5cf6cb;}async[a11_0x275a9c(0x168)](_0x3a3c6b){const _0x1ca503=a11_0x275a9c;let _0x4486d1=await this[_0x1ca503(0x11d)](_0x3a3c6b,_0x1ca503(0x125),_0x1ca503(0x1be),['id']);return _0x4486d1;}}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc