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.13 to 1.1.14

utils/date_utils.js

2

common/pendaxsocket.js

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

const a0_0x24a833=a0_0x5e0e;(function(_0x7e40fc,_0x21380e){const _0x26ada2=a0_0x5e0e,_0x5ce1f0=_0x7e40fc();while(!![]){try{const _0x237215=parseInt(_0x26ada2(0x199))/0x1*(-parseInt(_0x26ada2(0x1a7))/0x2)+parseInt(_0x26ada2(0x1ee))/0x3+parseInt(_0x26ada2(0x1ce))/0x4+parseInt(_0x26ada2(0x1bd))/0x5*(-parseInt(_0x26ada2(0x1dc))/0x6)+parseInt(_0x26ada2(0x1a8))/0x7*(-parseInt(_0x26ada2(0x1c7))/0x8)+parseInt(_0x26ada2(0x1e0))/0x9*(parseInt(_0x26ada2(0x1d9))/0xa)+parseInt(_0x26ada2(0x1ab))/0xb*(parseInt(_0x26ada2(0x194))/0xc);if(_0x237215===_0x21380e)break;else _0x5ce1f0['push'](_0x5ce1f0['shift']());}catch(_0x2ec421){_0x5ce1f0['push'](_0x5ce1f0['shift']());}}}(a0_0x5e9d,0xaceeb));function a0_0x5e0e(_0x47879d,_0x3c0ade){const _0x5e9df9=a0_0x5e9d();return a0_0x5e0e=function(_0x5e0ed0,_0x3a8ba2){_0x5e0ed0=_0x5e0ed0-0x18f;let _0x2afa15=_0x5e9df9[_0x5e0ed0];return _0x2afa15;},a0_0x5e0e(_0x47879d,_0x3c0ade);}import a0_0x24a4a3 from'ws';import*as a0_0x2e0baa from'crypto';function a0_0x5e9d(){const _0x350fcf=['JkaHS','kill','576OOcEpm','loggedIn','closed:\x20code\x20=\x20','ZRVmz','joCkn','819503FJXJul','getConnectionUrl','secret','getSocketState','isPublic','log','swbUd','VwOOp','onError','autoReconnectOnClose','pong','zNpBI','sha256','subclassOnMessage','2TOzKxU','7SrNrQU','subscriptions','OfOFC','135531mvtQuy','bumpRetries','Hmac','clientOnMessage','closed\x20from\x20ping()','clientOnError','VDfPn','getSubscriptions','pong:\x20','subclassOnError','onOpen','removeSubscriptionHavingArgs','none','getRetryNumber','privateChannels','terminate','code','isLoggedIn','718220NAjSAd','ApMXR','update','msg','connected','getAutoReconnect','close','loggedOut','hex','ping\x20','8487320rQDefs','UWcQQ','ELAhQ','getPingInterval','url','customPing','oHbNw','2315476vojNwI','HWoeG','getPrivateChannels','includes','getConnectionName','message','connect','open','kill()\x20called\x20with\x20no\x20source','retryNumber','reconnectWaitTime','520060FUttvC','xZZQX','onClose','6FjWpxp','clientOnOpen','stringify','subclassOnOpen','63fsDbxu','timestampPings','maxRetries','readyState','_timerArgs','getClosedReason','onMessage','AIApW','OPEN','publicChannels','clientReconnect','resetRetries','nsuYv','subclassOnClose','3594222hbAJot','subclassOnPong','ufZZH','autoReconnectOnError','clientOnClose','pingInterval'];a0_0x5e9d=function(){return _0x350fcf;};return a0_0x5e9d();}import{v4}from'uuid';export class PendaxSocket extends a0_0x24a4a3{#pings=0x0;#pongs=0x0;#pingIntervalTimer;#defaultPingInterval=0x3a98;#defaultReconnectWaitTime=0x1f4;#reconnectTries=0x0;#defaultMaxReconnectTries=-0x1;#options={};#url='';['loggedIn']=![];[a0_0x24a833(0x1c1)]=![];#closeCode_NORMAL=0xfa0;#closeCode_NOPONG=0xfa1;#closeCode_CLIENTKILL=0xfa2;#closeCode_UNHANDLEDERROR=0xfa3;#closedReason='';#defaultOptions={'name':v4(),'key':a0_0x24a833(0x1b7),'secret':a0_0x24a833(0x1b7),'pingInterval':0x3a98,'autoReconnectOnError':![],'autoReconnectOnClose':![],'retryNumber':0x0,'maxRetries':this.#defaultMaxReconnectTries,'timestampPings':![]};[a0_0x24a833(0x1a9)]={};constructor(_0x36386a){const _0x31080e=a0_0x24a833;let _0x221e48=_0x36386a?_0x36386a[_0x31080e(0x1cb)]||'':'';super(_0x221e48),this[_0x31080e(0x1d4)](),this.#url=_0x221e48,this.#options={...this.#defaultOptions,..._0x36386a},this.#options[_0x31080e(0x1b6)]=this[_0x31080e(0x1b6)],!this.#options[_0x31080e(0x1e2)]&&(_0x31080e(0x1cf)==='YkQTZ'?this[_0x31080e(0x1ba)]():this.#options[_0x31080e(0x1e2)]=this.#defaultMaxReconnectTries);}[a0_0x24a833(0x1d2)](){return this.#options['name'];}[a0_0x24a833(0x19a)](){return this.#url;}[a0_0x24a833(0x1ca)](){const _0x435408=a0_0x24a833;return this.#options[_0x435408(0x191)]||this.#defaultPingInterval;}[a0_0x24a833(0x1c2)](){return this.#options['autoReconnect']||!![];}[a0_0x24a833(0x19c)](){const _0x385786=a0_0x24a833;return this[_0x385786(0x1e3)];}['getOptions'](){return this.#options;}[a0_0x24a833(0x1b8)](){const _0x175fb0=a0_0x24a833;return this.#options[_0x175fb0(0x1d7)];}[a0_0x24a833(0x1e5)](){return this.#closedReason;}[a0_0x24a833(0x1b2)](){const _0x4f12b6=a0_0x24a833;return this[_0x4f12b6(0x1a9)];}[a0_0x24a833(0x1bc)](){return this['loggedIn']==!![];}[a0_0x24a833(0x1c4)](){const _0x574f90=a0_0x24a833;this[_0x574f90(0x195)]=![];}['getPublicChannels'](){return this['publicChannels'];}[a0_0x24a833(0x1d0)](){const _0xebe533=a0_0x24a833;return this[_0xebe533(0x1b9)];}[a0_0x24a833(0x19d)](_0x5be7c0){const _0x11bd42=a0_0x24a833;return this['publicChannels'][_0x11bd42(0x1d1)](_0x5be7c0);}['getSubscriptionArgsHash'](_0x3c5ff0){const _0x569b03=a0_0x24a833,_0x1de952=JSON[_0x569b03(0x1de)](_0x3c5ff0),_0x2b9ce0=a0_0x2e0baa[_0x569b03(0x1ad)](_0x569b03(0x1a5),this.#options[_0x569b03(0x19b)])[_0x569b03(0x1bf)](_0x1de952)['digest'](_0x569b03(0x1c5));return _0x2b9ce0;}#heartbeat(){const _0x5bc259=a0_0x24a833;let _0x45e409=this[_0x5bc259(0x1e4)][0x0];if(_0x45e409[_0x5bc259(0x1e3)]==_0x45e409[_0x5bc259(0x1e8)]){if(_0x5bc259(0x1cd)===_0x5bc259(0x1cd)){if(_0x45e409.#pongs<_0x45e409.#pings){if(_0x5bc259(0x19f)==='ZQzDM')return this[_0x5bc259(0x195)]==!![];else _0x45e409.#disconnect({'code':_0x45e409.#closeCode_NOPONG,'msg':_0x5bc259(0x1af),'socketObject':_0x45e409},!![]);}else _0x45e409.#pings=_0x45e409.#pings+0x1,_0x45e409.#options[_0x5bc259(0x1e1)]===!![]?console[_0x5bc259(0x19e)](_0x5bc259(0x1c6)+_0x45e409.#pings+':\x20'+new Date()['toUTCString']()):_0x5bc259(0x198)===_0x5bc259(0x198)?console[_0x5bc259(0x19e)]('ping\x20'+_0x45e409.#pings):_0x176cfb[_0x5bc259(0x19e)]('closed:\x20code\x20=\x20'+_0x3719ab+',\x20msg\x20=\x20'+_0x443686),_0x45e409['ping'](),_0x45e409.#options['customPing']&&_0x45e409.#options[_0x5bc259(0x1cc)]();}else return this[_0x5bc259(0x1e9)];}}['connect'](){const _0x328665=a0_0x24a833;this['on'](_0x328665(0x1d5),this[_0x328665(0x1b5)]),this['on'](_0x328665(0x1c3),this['onClose']),this['on']('error',this[_0x328665(0x1a1)]),this['on'](_0x328665(0x1d3),this[_0x328665(0x1e6)]),this['on'](_0x328665(0x1a3),this.#onPong);}[a0_0x24a833(0x193)](_0x297a85,_0x414dd1){const _0x57c67e=a0_0x24a833;let _0x3cf7b0,_0x2ee1d7;if(_0x297a85)_0x3cf7b0=_0x297a85,_0x2ee1d7=_0x414dd1||![];else{if(this[_0x57c67e(0x1e4)]&&this[_0x57c67e(0x1e4)]['length']>0x0)_0x3cf7b0=this[_0x57c67e(0x1e4)][0x0],_0x2ee1d7=this[_0x57c67e(0x1e4)][0x1]||![];else throw _0x57c67e(0x1d6);}_0x3cf7b0.#disconnect({'code':_0x3cf7b0.#closeCode_CLIENTKILL,'msg':'closed\x20from\x20client','socketObject':_0x3cf7b0},_0x2ee1d7);}[a0_0x24a833(0x1b5)](){const _0x31d8e2=a0_0x24a833;this.#options['socket']=this,console['log']('opened'),this.#startPingTimer(),this['connected']=!![];if(this.#options['subclassOnOpen'])this.#options[_0x31d8e2(0x1df)](this.#options);else{if(this.#options['clientOnOpen']){if(_0x31d8e2(0x1ec)!==_0x31d8e2(0x1ec))return this[_0x31d8e2(0x1a9)];else this.#options[_0x31d8e2(0x1dd)](this.#options);}}}[a0_0x24a833(0x1db)](_0x3cab9e,_0x31ab44){const _0x5e9b0d=a0_0x24a833;if(this.#pingIntervalTimer){if('uIlKp'===_0x5e9b0d(0x1a4))return this['privateChannels'];else clearInterval(this.#pingIntervalTimer),this.#pingIntervalTimer=undefined;}this.#options[_0x5e9b0d(0x1a2)]&&_0x3cab9e!==this.#closeCode_NORMAL&&this.#options['clientReconnect']&&(this[_0x5e9b0d(0x1ac)](),this.#startReconnectTimer(_0x3cab9e));if(this.#options['subclassOnClose'])this.#options[_0x5e9b0d(0x1ed)](_0x3cab9e,_0x31ab44,this.#options);else this.#options[_0x5e9b0d(0x190)]?this.#options['clientOnClose'](_0x3cab9e,_0x31ab44,this.#options):_0x5e9b0d(0x1c9)===_0x5e9b0d(0x1c9)?console[_0x5e9b0d(0x19e)](_0x5e9b0d(0x196)+_0x3cab9e+',\x20msg\x20=\x20'+_0x31ab44):this[_0x5e9b0d(0x195)]=![];this['connected']=![],this[_0x5e9b0d(0x195)]=![];}[a0_0x24a833(0x1a1)](_0x2c3956){const _0x38da2d=a0_0x24a833;this.#pingIntervalTimer&&(clearInterval(this.#pingIntervalTimer),this.#pingIntervalTimer=undefined);if(this.#options[_0x38da2d(0x18f)]===!![]&&this.#options[_0x38da2d(0x1ea)]){if(_0x38da2d(0x1da)===_0x38da2d(0x1aa))return this[_0x38da2d(0x1e9)]['includes'](_0x439203);else this[_0x38da2d(0x1ac)](),this.#startReconnectTimer();}if(this.#options[_0x38da2d(0x1b4)])_0x38da2d(0x1f0)!==_0x38da2d(0x1f0)?this[_0x38da2d(0x1c3)](_0x5e365d,_0x3c6df5):this.#options['subclassOnError'](_0x2c3956,this.#options);else{if(this.#options[_0x38da2d(0x1b0)])this.#options['clientOnError'](_0x2c3956,this.#options);else{if('XdrWt'!==_0x38da2d(0x1c8))console[_0x38da2d(0x19e)](_0x2c3956);else return this[_0x38da2d(0x1e3)];}}this['connected']=![],this[_0x38da2d(0x195)]=![];}[a0_0x24a833(0x1e6)](_0x4fe11a){const _0x4b0a2a=a0_0x24a833;if(this.#options[_0x4b0a2a(0x1a6)])_0x4b0a2a(0x197)==='ZRVmz'?this.#options['subclassOnMessage'](this,_0x4fe11a,this.#options):(_0x40076e=_0x564377,_0x1a8f29=_0x5d54f9||![]);else this.#options[_0x4b0a2a(0x1ae)]&&(_0x4b0a2a(0x1b1)!==_0x4b0a2a(0x1b1)?_0x1f40c5[_0x4b0a2a(0x19e)](_0x16bf64):this.#options[_0x4b0a2a(0x1b0)](_0x4fe11a,this.#options));}#onPong(_0x4eda87){const _0x5c7658=a0_0x24a833;this.#options[_0x5c7658(0x1ef)]?_0x5c7658(0x1a0)===_0x5c7658(0x1e7)?(_0x39558a=this['_timerArgs'][0x0],_0x5469cc=this[_0x5c7658(0x1e4)][0x1]||![]):this.#options[_0x5c7658(0x1ef)](this,_0x4eda87,this.#options):(this.#pongs=this.#pongs+0x1,console[_0x5c7658(0x19e)](_0x5c7658(0x1b3)+this.#pongs));}#disconnect(_0x28649a,_0x40f659){const _0x355817=a0_0x24a833;let _0x318bd5=parseInt(_0x28649a[_0x355817(0x1bb)])||0x0,_0x44f634=_0x28649a[_0x355817(0x1c0)]||'';this.#closedReason=_0x44f634;if(_0x40f659)this[_0x355817(0x1ba)]();else{if(_0x355817(0x192)!==_0x355817(0x1be))this[_0x355817(0x1c3)](_0x318bd5,_0x44f634);else throw _0x355817(0x1d6);}}[a0_0x24a833(0x1ac)](){this.#options['retryNumber']=this.#options['retryNumber']+0x1;}[a0_0x24a833(0x1eb)](){this.#options['retryNumber']=0x0;}#startPingTimer(){this.#pingIntervalTimer=setInterval(this.#heartbeat,this.#options['pingInterval']||this.#defaultPingInterval,this);}#startReconnectTimer(_0x1ca7ca){const _0x4711b2=a0_0x24a833;this.#options['clientReconnect']&&setTimeout(this.#options['clientReconnect'],this.#options[_0x4711b2(0x1d8)]||this.#defaultReconnectWaitTime,this,_0x1ca7ca);}}
function a0_0x12ac(){const _0x4805f=['connected','customPing','onClose','hex','ecCNL','loggedOut','getSubscriptionArgsHash','1669355zkuaxC','subclassOnMessage','bumpRetries','url','getClosedReason','clientOnClose','loggedIn','LRkaW','YDowq','connect','autoReconnectOnError','SeRhZ','close','resetRetries','2006872EciNQE','pong:\x20','sha256','secret','QOxcR','update','maxRetries','closed\x20from\x20client','_timerArgs','code','51320QNgAFy','ping','clientOnError','terminate','digest','8xzTYSk','oMPft','stringify','subclassOnOpen','onMessage','autoReconnectOnClose','retryNumber','subclassOnPong','getAutoReconnect','log','subclassOnClose','pong','PptYi','getRetryNumber','767395RmAYAY','removeSubscriptionHavingArgs','714501ihgytg','getSocketState','kill()\x20called\x20with\x20no\x20source','clientReconnect','msg','aIzJJ','OPEN','onError','subclassOnError','getConnectionUrl','onOpen','wPLVJ','closed:\x20code\x20=\x20','12OcKGnG','opened','ping\x20','384BQOUnT','18945uSAJwI','isLoggedIn','name','readyState','yIImM','error','subscriptions','toUTCString','reconnectWaitTime','timestampPings','clientOnOpen','15380640rTzZnk','clientOnMessage','autoReconnect','getPrivateChannels','privateChannels','schxw',',\x20msg\x20=\x20','isPublic','length','mmfmT'];a0_0x12ac=function(){return _0x4805f;};return a0_0x12ac();}const a0_0x142380=a0_0x3936;function a0_0x3936(_0x2d75cf,_0x556545){const _0x12acd4=a0_0x12ac();return a0_0x3936=function(_0x39362f,_0x30674c){_0x39362f=_0x39362f-0x87;let _0x39eb34=_0x12acd4[_0x39362f];return _0x39eb34;},a0_0x3936(_0x2d75cf,_0x556545);}(function(_0x23f229,_0xb1b025){const _0x5418ce=a0_0x3936,_0xfae82f=_0x23f229();while(!![]){try{const _0x5aa0bf=parseInt(_0x5418ce(0x97))/0x1+parseInt(_0x5418ce(0xde))/0x2+parseInt(_0x5418ce(0xaa))/0x3*(parseInt(_0x5418ce(0xa9))/0x4)+parseInt(_0x5418ce(0xc6))/0x5*(parseInt(_0x5418ce(0xa6))/0x6)+-parseInt(_0x5418ce(0xd4))/0x7*(-parseInt(_0x5418ce(0x89))/0x8)+parseInt(_0x5418ce(0x99))/0x9+-parseInt(_0x5418ce(0xb5))/0xa;if(_0x5aa0bf===_0xb1b025)break;else _0xfae82f['push'](_0xfae82f['shift']());}catch(_0x59880a){_0xfae82f['push'](_0xfae82f['shift']());}}}(a0_0x12ac,0xda852));import a0_0x3035cf from'ws';import*as a0_0x53deb3 from'crypto';import{v4}from'uuid';export class PendaxSocket extends a0_0x3035cf{#pings=0x0;#pongs=0x0;#pingIntervalTimer;#defaultPingInterval=0x3a98;#defaultReconnectWaitTime=0x1f4;#reconnectTries=0x0;#defaultMaxReconnectTries=-0x1;#options={};#url='';[a0_0x142380(0xcc)]=![];[a0_0x142380(0xbf)]=![];#closeCode_NORMAL=0xfa0;#closeCode_NOPONG=0xfa1;#closeCode_CLIENTKILL=0xfa2;#closeCode_UNHANDLEDERROR=0xfa3;#closedReason='';#defaultOptions={'name':v4(),'key':'none','secret':'none','pingInterval':0x3a98,'autoReconnectOnError':![],'autoReconnectOnClose':![],'retryNumber':0x0,'maxRetries':this.#defaultMaxReconnectTries,'timestampPings':![]};['subscriptions']={};constructor(_0x32ec0d){const _0x517359=a0_0x142380;let _0x368382=_0x32ec0d?_0x32ec0d[_0x517359(0xc9)]||'':'';super(_0x368382),this[_0x517359(0xcf)](),this.#url=_0x368382,this.#options={...this.#defaultOptions,..._0x32ec0d},this.#options['removeSubscriptionHavingArgs']=this[_0x517359(0x98)],!this.#options[_0x517359(0xda)]&&(this.#options[_0x517359(0xda)]=this.#defaultMaxReconnectTries);}['getConnectionName'](){const _0x17463f=a0_0x142380;return this.#options[_0x17463f(0xac)];}[a0_0x142380(0xa2)](){return this.#url;}['getPingInterval'](){return this.#options['pingInterval']||this.#defaultPingInterval;}[a0_0x142380(0x91)](){const _0x2e1eaf=a0_0x142380;return this.#options[_0x2e1eaf(0xb7)]||!![];}[a0_0x142380(0x9a)](){const _0x22ef9a=a0_0x142380;return this[_0x22ef9a(0xad)];}['getOptions'](){return this.#options;}[a0_0x142380(0x96)](){const _0x50a15c=a0_0x142380;return this.#options[_0x50a15c(0x8f)];}[a0_0x142380(0xca)](){return this.#closedReason;}['getSubscriptions'](){const _0x51e053=a0_0x142380;return this[_0x51e053(0xb0)];}[a0_0x142380(0xab)](){const _0x345ed3=a0_0x142380;return this[_0x345ed3(0xcc)]==!![];}[a0_0x142380(0xc4)](){const _0x39e1b1=a0_0x142380;this[_0x39e1b1(0xcc)]=![];}['getPublicChannels'](){return this['publicChannels'];}[a0_0x142380(0xb8)](){const _0x33fa9d=a0_0x142380;return this[_0x33fa9d(0xb9)];}[a0_0x142380(0xbc)](_0x1d5a9b){return this['publicChannels']['includes'](_0x1d5a9b);}[a0_0x142380(0xc5)](_0x2eb6a7){const _0x56a210=a0_0x142380,_0x2de4f4=JSON[_0x56a210(0x8b)](_0x2eb6a7),_0x288c69=a0_0x53deb3['Hmac'](_0x56a210(0xd6),this.#options[_0x56a210(0xd7)])[_0x56a210(0xd9)](_0x2de4f4)[_0x56a210(0x88)](_0x56a210(0xc2));return _0x288c69;}#heartbeat(){const _0x16e390=a0_0x142380;let _0x1065dc=this[_0x16e390(0xdc)][0x0];if(_0x1065dc[_0x16e390(0xad)]==_0x1065dc[_0x16e390(0x9f)]){if(_0x16e390(0xd1)===_0x16e390(0xd1))_0x1065dc.#pongs<_0x1065dc.#pings?_0x1065dc.#disconnect({'code':_0x1065dc.#closeCode_NOPONG,'msg':'closed\x20from\x20ping()','socketObject':_0x1065dc},!![]):'YDowq'!==_0x16e390(0xce)?this['terminate']():(_0x1065dc.#pings=_0x1065dc.#pings+0x1,_0x1065dc.#options[_0x16e390(0xb3)]===!![]?console['log']('ping\x20'+_0x1065dc.#pings+':\x20'+new Date()[_0x16e390(0xb1)]()):console[_0x16e390(0x92)](_0x16e390(0xa8)+_0x1065dc.#pings),_0x1065dc[_0x16e390(0xdf)](),_0x1065dc.#options[_0x16e390(0xc0)]&&_0x1065dc.#options[_0x16e390(0xc0)]());else return this['publicChannels']['includes'](_0x73fbc2);}}[a0_0x142380(0xcf)](){const _0x1f8202=a0_0x142380;this['on']('open',this[_0x1f8202(0xa3)]),this['on'](_0x1f8202(0xd2),this[_0x1f8202(0xc1)]),this['on'](_0x1f8202(0xaf),this[_0x1f8202(0xa0)]),this['on']('message',this[_0x1f8202(0x8d)]),this['on'](_0x1f8202(0x94),this.#onPong);}['kill'](_0x720427,_0x1871a7){const _0x9ddf8c=a0_0x142380;let _0x266287,_0x76a33b;if(_0x720427)'jjYig'!==_0x9ddf8c(0x9e)?(_0x266287=_0x720427,_0x76a33b=_0x1871a7||![]):this[_0x9ddf8c(0xcc)]=![];else{if(this[_0x9ddf8c(0xdc)]&&this[_0x9ddf8c(0xdc)][_0x9ddf8c(0xbd)]>0x0)'tLnql'===_0x9ddf8c(0xcd)?_0x1d606e[_0x9ddf8c(0x92)](_0x4279f4):(_0x266287=this[_0x9ddf8c(0xdc)][0x0],_0x76a33b=this[_0x9ddf8c(0xdc)][0x1]||![]);else throw _0x9ddf8c(0x9b);}_0x266287.#disconnect({'code':_0x266287.#closeCode_CLIENTKILL,'msg':_0x9ddf8c(0xdb),'socketObject':_0x266287},_0x76a33b);}[a0_0x142380(0xa3)](){const _0x1b5612=a0_0x142380;this.#options['socket']=this,console[_0x1b5612(0x92)](_0x1b5612(0xa7)),this.#startPingTimer(),this[_0x1b5612(0xbf)]=!![];if(this.#options[_0x1b5612(0x8c)])this.#options[_0x1b5612(0x8c)](this.#options);else this.#options[_0x1b5612(0xb4)]&&this.#options['clientOnOpen'](this.#options);}[a0_0x142380(0xc1)](_0xabe3e7,_0x3bee14){const _0x5385bb=a0_0x142380;this.#pingIntervalTimer&&(clearInterval(this.#pingIntervalTimer),this.#pingIntervalTimer=undefined);this.#options[_0x5385bb(0x8e)]&&_0xabe3e7!==this.#closeCode_NORMAL&&this.#options[_0x5385bb(0x9c)]&&(this[_0x5385bb(0xc8)](),this.#startReconnectTimer(_0xabe3e7));if(this.#options[_0x5385bb(0x93)]){if(_0x5385bb(0xbe)!==_0x5385bb(0xbe))return this[_0x5385bb(0xcc)]==!![];else this.#options[_0x5385bb(0x93)](_0xabe3e7,_0x3bee14,this.#options);}else this.#options[_0x5385bb(0xcb)]?this.#options[_0x5385bb(0xcb)](_0xabe3e7,_0x3bee14,this.#options):console[_0x5385bb(0x92)]('closed:\x20code\x20=\x20'+_0xabe3e7+_0x5385bb(0xbb)+_0x3bee14);this[_0x5385bb(0xbf)]=![],this[_0x5385bb(0xcc)]=![];}[a0_0x142380(0xa0)](_0x34d732){const _0x4add22=a0_0x142380;this.#pingIntervalTimer&&(clearInterval(this.#pingIntervalTimer),this.#pingIntervalTimer=undefined);this.#options[_0x4add22(0xd0)]===!![]&&this.#options[_0x4add22(0x9c)]&&(this[_0x4add22(0xc8)](),this.#startReconnectTimer());if(this.#options[_0x4add22(0xa1)])this.#options['subclassOnError'](_0x34d732,this.#options);else{if(this.#options[_0x4add22(0xe0)]){if(_0x4add22(0xae)===_0x4add22(0x95))return this[_0x4add22(0xad)];else this.#options[_0x4add22(0xe0)](_0x34d732,this.#options);}else'eJhQQ'===_0x4add22(0xc3)?(_0x154820=this[_0x4add22(0xdc)][0x0],_0x1bfe4c=this[_0x4add22(0xdc)][0x1]||![]):console[_0x4add22(0x92)](_0x34d732);}this['connected']=![],this[_0x4add22(0xcc)]=![];}['onMessage'](_0x10a8e4){const _0x31e3b2=a0_0x142380;if(this.#options['subclassOnMessage']){if(_0x31e3b2(0xd8)!==_0x31e3b2(0xd8))return this['privateChannels'];else this.#options[_0x31e3b2(0xc7)](this,_0x10a8e4,this.#options);}else this.#options[_0x31e3b2(0xb6)]&&(_0x31e3b2(0x8a)===_0x31e3b2(0xba)?this['close'](_0x28d38b,_0x1c9216):this.#options[_0x31e3b2(0xe0)](_0x10a8e4,this.#options));}#onPong(_0x5d1ce5){const _0x180b97=a0_0x142380;this.#options[_0x180b97(0x90)]?this.#options['subclassOnPong'](this,_0x5d1ce5,this.#options):(this.#pongs=this.#pongs+0x1,console[_0x180b97(0x92)](_0x180b97(0xd5)+this.#pongs));}#disconnect(_0x54dcca,_0x3e9e59){const _0x4780eb=a0_0x142380;let _0x711c4b=parseInt(_0x54dcca[_0x4780eb(0xdd)])||0x0,_0x473855=_0x54dcca[_0x4780eb(0x9d)]||'';this.#closedReason=_0x473855,_0x3e9e59?'dWwNP'==='dWwNP'?this[_0x4780eb(0x87)]():_0x36e6ce['log'](_0x4780eb(0xa5)+_0x4232f3+_0x4780eb(0xbb)+_0x5ce6c4):this[_0x4780eb(0xd2)](_0x711c4b,_0x473855);}[a0_0x142380(0xc8)](){const _0x1184dc=a0_0x142380;this.#options[_0x1184dc(0x8f)]=this.#options[_0x1184dc(0x8f)]+0x1;}[a0_0x142380(0xd3)](){this.#options['retryNumber']=0x0;}#startPingTimer(){this.#pingIntervalTimer=setInterval(this.#heartbeat,this.#options['pingInterval']||this.#defaultPingInterval,this);}#startReconnectTimer(_0x587224){const _0x5012bd=a0_0x142380;this.#options[_0x5012bd(0x9c)]&&('cmGez'===_0x5012bd(0xa4)?(_0x2e73dd=_0xce7aa6,_0x51a501=_0x13f9ea||![]):setTimeout(this.#options[_0x5012bd(0x9c)],this.#options[_0x5012bd(0xb2)]||this.#defaultReconnectWaitTime,this,_0x587224));}}

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

const a0_0x736dd7=a0_0x17f0;function a0_0x17f0(_0x4fc8db,_0xa42c89){const _0x269581=a0_0x2695();return a0_0x17f0=function(_0x17f07d,_0x197607){_0x17f07d=_0x17f07d-0xc9;let _0x588d10=_0x269581[_0x17f07d];return _0x588d10;},a0_0x17f0(_0x4fc8db,_0xa42c89);}(function(_0x1a5d99,_0x2861ed){const _0x478721=a0_0x17f0,_0x81a5d1=_0x1a5d99();while(!![]){try{const _0x497bdd=-parseInt(_0x478721(0x107))/0x1+-parseInt(_0x478721(0xff))/0x2*(-parseInt(_0x478721(0xcc))/0x3)+-parseInt(_0x478721(0x10b))/0x4*(-parseInt(_0x478721(0xd2))/0x5)+parseInt(_0x478721(0xe9))/0x6*(-parseInt(_0x478721(0xd1))/0x7)+parseInt(_0x478721(0x12b))/0x8+parseInt(_0x478721(0xd6))/0x9+parseInt(_0x478721(0xdd))/0xa*(parseInt(_0x478721(0xf9))/0xb);if(_0x497bdd===_0x2861ed)break;else _0x81a5d1['push'](_0x81a5d1['shift']());}catch(_0x180dbf){_0x81a5d1['push'](_0x81a5d1['shift']());}}}(a0_0x2695,0x7064b));function a0_0x2695(){const _0x7dcbc0=['createHeader','executeRequest','requires\x20symbol\x20to\x20be\x20submitted','/fapi/v1/allOpenOrders?','deleteRequest','IoOYq','name','exchangename','testConnectivity','STOP','18384kvopWy','/fapi/v2/balance?','recvWindow=','publicApis','TAKE_PROFIT','update','callbackRate','LxHdu','requires\x20symbol\x20and\x20either\x20orderId\x20or\x20origClientOrderId\x20to\x20be\x20submitted','side','dJGZn','/fapi/v1/positionMargin/history?','orderId','keys','apiSecret','createSignature','5726204zYjWil','executeGetRequest','type\x20\x27STOP\x20requires\x20quantity,\x20price\x20and\x20stopPrice\x20to\x20be\x20submitted','type\x20\x27LIMIT\x20requires\x20timeInForce,\x20quantity\x20and\x20price\x20to\x20be\x20submitted','eThGc','apiKey','2KNsACr','sha256','Hmac','tDzcb','symbol','type\x20\x27TAKE_PROFIT_MARKET\x20requires\x20stopPrice\x20to\x20be\x20submitted','TRAILING_STOP_MARKET','price','390623Mwvgvq','dyznb','executePost','POST','4TstTRh','/fapi/v1/time','usdt','getServerTime','MARKET','options\x20required','includes','LIMIT','formatQuery','bFcvd','quantity','TRADE','&timestamp=','getFuturesAccountBalance','type\x20\x27TRAILING_STOP_MARKET\x20requires\x20callbackRate\x20to\x20be\x20submitted','secret','recvWindow','Missing\x20params:\x20','&signature=','margintype','/fapi/v1/order?','hnApy','htHFg','timestamp','DXTLH','WkpxN','type\x20\x27MARKET\x20requires\x20quantity\x20to\x20be\x20submitted','hbbrn','type\x20\x27STOP_MARKET\x20requires\x20stopPrice\x20to\x20be\x20submitted','getPositionMarginChangeHistory','cancelOrder','origClientOrderId','1684072FiUGll','type\x20\x27TAKE_PROFIT\x20requires\x20quantity,\x20price\x20and\x20stopPrice\x20to\x20be\x20submitted','log','dSIIK','type','requires\x20symbol,\x20side,\x20and\x20type\x20to\x20be\x20submitted','exchange','join','key','https://api.binance.com','2163531PrxUDf','digest','TAKE_PROFIT_MARKET','STOP_MARKET','binance','2072xQkoKh','796085DGteUw','fsEEM','formatBody','authenticate','1318167uOzHYE','stopPrice','timeInForce','DELETE','now','length','url','10pUioPk','push'];a0_0x2695=function(){return _0x7dcbc0;};return a0_0x2695();}import a0_0x246640 from'axios';import a0_0x333be3 from'crypto';import{BinanceSocket}from'../sockets/binancesocket.js';import a0_0x126aa4 from'short-unique-id';export class Binance{[a0_0x736dd7(0xec)]=new Array();['sockets']={};constructor(_0x112c9e){const _0x39f258=a0_0x736dd7;this[_0x39f258(0xdc)]=_0x39f258(0xcb),this[_0x39f258(0xd5)]=_0x112c9e[_0x39f258(0xd5)]==undefined?!![]:_0x112c9e[_0x39f258(0xd5)],this[_0x39f258(0xe5)]=_0x112c9e[_0x39f258(0x131)][_0x39f258(0xe6)]==undefined?_0x39f258(0xd0):_0x112c9e[_0x39f258(0x131)]['exchangename'],this['exchangeid']=_0x112c9e[_0x39f258(0x131)]['id'],this['apiKey']=_0x112c9e[_0x39f258(0xca)]==undefined?'':_0x112c9e[_0x39f258(0xca)],this[_0x39f258(0xf7)]=_0x112c9e[_0x39f258(0x11a)]==undefined?'':_0x112c9e['secret'],this['label']=_0x112c9e['label'],this['futuresMarginType']=_0x112c9e['margintype']?_0x112c9e[_0x39f258(0x11e)]:_0x39f258(0x10d),this[_0x39f258(0xec)]['push']([_0x39f258(0xe7),_0x39f258(0x10e)]);}async[a0_0x736dd7(0xdf)](){const _0x87eafa=a0_0x736dd7;let _0x49d7e7={'X-MBX-APIKEY':this[_0x87eafa(0xfe)]};return _0x49d7e7;}[a0_0x736dd7(0xf8)](_0x51e085,_0xdded61){const _0x1339a8=a0_0x736dd7;return a0_0x333be3[_0x1339a8(0x101)](_0x1339a8(0x100),_0xdded61)[_0x1339a8(0xee)](_0x51e085)[_0x1339a8(0xcd)]('hex');}async[a0_0x736dd7(0xe0)](_0xcc887e,_0x5def8a,_0x3c088b,_0x2e98f7){const _0xbf8cbf=a0_0x736dd7;let _0x223cbf=Date[_0xbf8cbf(0xda)](),_0x4da603=await this[_0xbf8cbf(0xdf)]();const _0x25963d=0x1388;let _0x5e722=_0x2e98f7!=null?_0x3c088b['filter'](_0x3e5b6f=>!Object[_0xbf8cbf(0xf6)](_0x2e98f7)[_0xbf8cbf(0x111)](_0x3e5b6f)):_0x3c088b;if(_0x5e722[_0xbf8cbf(0xdb)]==0x0){let _0xba6a11=new Array();for(const _0x423a95 in _0x2e98f7){_0xba6a11[_0xbf8cbf(0xde)](_0x423a95+'='+_0x2e98f7[_0x423a95]);}let _0xf9594b=this['formatQuery']({'timestamp':_0x223cbf,'recvWindow':_0x25963d,'queryString':_0xba6a11},_0xbf8cbf(0x116)),_0x296637={'baseURL':this['url'],'url':_0xcc887e,'method':_0x5def8a,'headers':_0x4da603};console[_0xbf8cbf(0x12d)](_0x296637);const _0xbaac21=await a0_0x246640(_0x296637);return console[_0xbf8cbf(0x12d)](_0xbaac21),_0xbaac21;}else{if(_0xbf8cbf(0x120)!=='kahNp')throw{'message':_0xbf8cbf(0x11c)+_0x5e722['join'](',')};else _0x511891[_0xbf8cbf(0xde)](_0x2b9c00+'='+_0x52641f[_0xafa0bc]);}}async[a0_0x736dd7(0xe3)](_0x359ba8,_0x2bf86e){const _0x2b015e=a0_0x736dd7;let _0x22e264={'baseURL':this[_0x2b015e(0xdc)],'url':_0x2bf86e,'method':_0x2b015e(0xd9),'headers':_0x359ba8};const _0x58fee2=await a0_0x246640(_0x22e264);return _0x58fee2;}async['executePost'](_0x6e5216,_0x2192bf){const _0xe64ffd=a0_0x736dd7;let _0x5f0f24={'baseURL':this[_0xe64ffd(0xdc)],'url':_0x2192bf,'method':_0xe64ffd(0x10a),'headers':_0x6e5216};const _0xd0c023=await a0_0x246640(_0x5f0f24);return _0xd0c023;}async[a0_0x736dd7(0xe7)](){const _0x50c20f=a0_0x736dd7,_0x463ecf=await this[_0x50c20f(0xe0)]('/api/v3/ping','GET',[]);return _0x463ecf;}async[a0_0x736dd7(0x10e)](){const _0x961ccc=a0_0x736dd7;let _0x2eb297=_0x961ccc(0x10c),_0x5cd58a=await this[_0x961ccc(0xdf)]();const _0xfcde0a=await this[_0x961ccc(0xe0)](_0x5cd58a,_0x2eb297);return console[_0x961ccc(0x12d)](_0xfcde0a),_0xfcde0a;}async[a0_0x736dd7(0x118)](_0x19012d){const _0x5ce519=a0_0x736dd7;let _0x47eb20=_0x5ce519(0xea),_0x3d0dc0=Date[_0x5ce519(0xda)](),_0x211bbc=await this[_0x5ce519(0xdf)]();const _0xf3fbf1=_0x19012d&&_0x19012d[_0x5ce519(0x11b)]?_0x19012d[_0x5ce519(0x11b)]:0x1388,_0x2550f2=this['formatQuery']({'timestamp':_0x3d0dc0,'recvWindow':_0xf3fbf1,'queryString':[]},'USER_DATA'),_0x2bfc5a=await this[_0x5ce519(0xfa)](_0x211bbc,_0x47eb20+_0x2550f2);return console[_0x5ce519(0x12d)](_0x2bfc5a),_0x2bfc5a;}async[a0_0x736dd7(0x128)](_0x17656e){const _0x46b8d0=a0_0x736dd7;let _0x18274b=_0x46b8d0(0xf4),_0x9fe247=Date[_0x46b8d0(0xda)](),_0x2d9cfb=await this[_0x46b8d0(0xdf)]();if(_0x17656e){if(_0x46b8d0(0x114)!==_0x46b8d0(0xd3)){const _0x1e0162=_0x17656e[_0x46b8d0(0x11b)]?_0x17656e[_0x46b8d0(0x11b)]:0x1388;if(_0x17656e[_0x46b8d0(0x103)]){let _0x5183ef=new Array();for(const _0x24c774 in _0x17656e){_0x5183ef[_0x46b8d0(0xde)](_0x24c774+'='+_0x17656e[_0x24c774]);}let _0x47722c=this[_0x46b8d0(0x113)]({'timestamp':_0x9fe247,'recvWindow':_0x1e0162,'queryString':_0x5183ef},'TRADE');const _0x4cf670=await this[_0x46b8d0(0xfa)](_0x2d9cfb,_0x18274b+_0x47722c);return console[_0x46b8d0(0x12d)](_0x4cf670),_0x4cf670;}else throw{'message':_0x46b8d0(0xe1)};}else throw{'message':_0x46b8d0(0x119)};}else throw _0x46b8d0(0x110);}async['cancelAllOpenOrders'](_0x431f07){const _0xc73104=a0_0x736dd7;let _0x1c8d48=_0xc73104(0xe2),_0x46ee3a=Date[_0xc73104(0xda)](),_0x44d0fd=await this[_0xc73104(0xdf)]();if(_0x431f07){const _0x359058=_0x431f07[_0xc73104(0x11b)]?_0x431f07[_0xc73104(0x11b)]:0x1388;if(_0x431f07[_0xc73104(0x103)]){if(_0xc73104(0x102)===_0xc73104(0xf3))_0x3246da['push'](_0x1ff85e+'='+_0x4acb6e[_0x6868d5]);else{let _0x2c4f1d=new Array();for(const _0x3cf33f in _0x431f07){if(_0xc73104(0x12e)===_0xc73104(0x12e))_0x2c4f1d[_0xc73104(0xde)](_0x3cf33f+'='+_0x431f07[_0x3cf33f]);else throw'options\x20required';}let _0x4e6820=this['formatQuery']({'timestamp':_0x46ee3a,'recvWindow':_0x359058,'queryString':_0x2c4f1d},'TRADE');const _0x3fb107=await this['deleteRequest'](_0x44d0fd,_0x1c8d48+_0x4e6820);return console[_0xc73104(0x12d)](_0x3fb107),_0x3fb107;}}else{if(_0xc73104(0xe4)==='IoOYq')throw{'message':'requires\x20symbol\x20to\x20be\x20submitted'};else _0x481398=_0x2af2e4+'&';}}else throw'options\x20required';}async[a0_0x736dd7(0x129)](_0x12a49d){const _0x454458=a0_0x736dd7;let _0x6a9f62=_0x454458(0x11f),_0x589730=Date[_0x454458(0xda)](),_0x398db2=await this[_0x454458(0xdf)]();if(_0x12a49d){const _0x3dbbe5=_0x12a49d['recvWindow']?_0x12a49d[_0x454458(0x11b)]:0x1388;if(_0x12a49d['symbol']&&(_0x12a49d[_0x454458(0xf5)]||_0x12a49d[_0x454458(0x12a)])){if(_0x454458(0x121)!==_0x454458(0x108)){let _0x2ecdbf=new Array();for(const _0x1eda54 in _0x12a49d){if(_0x454458(0x124)!=='WkpxN')throw{'message':_0x454458(0xfc)};else _0x2ecdbf[_0x454458(0xde)](_0x1eda54+'='+_0x12a49d[_0x1eda54]);}let _0x4d6881=this[_0x454458(0x113)]({'timestamp':_0x589730,'recvWindow':_0x3dbbe5,'queryString':_0x2ecdbf},_0x454458(0x116));const _0x3a9ae0=await this['deleteRequest'](_0x398db2,_0x6a9f62+_0x4d6881);return console[_0x454458(0x12d)](_0x3a9ae0),_0x3a9ae0;}else throw _0x454458(0x110);}else throw{'message':_0x454458(0xf1)};}else throw _0x454458(0x110);}async['placeOrder'](_0x225f29){const _0x34726b=a0_0x736dd7;let _0x3e5788=_0x34726b(0x11f),_0x1fd142=Date[_0x34726b(0xda)](),_0x247fe6=await this['createHeader']();if(_0x225f29){const _0x4923e7=_0x225f29[_0x34726b(0x11b)]?_0x225f29[_0x34726b(0x11b)]:0x1388;if(_0x225f29[_0x34726b(0x103)]&&_0x225f29[_0x34726b(0xf2)]&&_0x225f29[_0x34726b(0x12f)]){if(_0x34726b(0x123)==='FqVeo')throw _0x34726b(0x110);else{switch(_0x225f29['type']){case _0x34726b(0x112):if(!_0x225f29[_0x34726b(0xd8)]||!_0x225f29[_0x34726b(0x115)]||!_0x225f29[_0x34726b(0x106)]){if('aXYWq'!==_0x34726b(0xf0))throw{'message':_0x34726b(0xfc)};else throw{'message':_0x34726b(0x127)};}break;case _0x34726b(0x10f):if(!_0x225f29[_0x34726b(0x115)])throw{'message':_0x34726b(0x125)};break;case _0x34726b(0xe8):if(!_0x225f29[_0x34726b(0x115)]||!_0x225f29['price']||!_0x225f29[_0x34726b(0xd7)])throw{'message':_0x34726b(0xfb)};break;case _0x34726b(0xed):if(!_0x225f29['quantity']||!_0x225f29[_0x34726b(0x106)]||!_0x225f29['stopPrice'])throw{'message':'type\x20\x27TAKE_PROFIT\x20requires\x20quantity,\x20price\x20and\x20stopPrice\x20to\x20be\x20submitted'};break;case _0x34726b(0xcf):if(!_0x225f29[_0x34726b(0xd7)])throw{'message':_0x34726b(0x127)};break;case _0x34726b(0xce):if(!_0x225f29[_0x34726b(0xd7)])throw{'message':_0x34726b(0x104)};break;case _0x34726b(0x105):if(!_0x225f29[_0x34726b(0xef)]){if(_0x34726b(0x126)==='hbbrn')throw{'message':'type\x20\x27TRAILING_STOP_MARKET\x20requires\x20callbackRate\x20to\x20be\x20submitted'};else throw{'message':_0x34726b(0xe1)};}break;}let _0x5e219e=new Array();for(const _0x4e0b3e in _0x225f29){if(_0x34726b(0xfd)==='Lspgc')throw{'message':_0x34726b(0x12c)};else _0x5e219e['push'](_0x4e0b3e+'='+_0x225f29[_0x4e0b3e]);}let _0x3444ba=this[_0x34726b(0xd4)]({'timestamp':_0x1fd142,'recvWindow':_0x4923e7,'bodyString':_0x5e219e},'TRADE');const _0xce0e96=await this[_0x34726b(0x109)](_0x247fe6,_0x3e5788+_0x3444ba);return console[_0x34726b(0x12d)](_0xce0e96),_0xce0e96;}}else throw{'message':_0x34726b(0x130)};}else throw _0x34726b(0x110);}[a0_0x736dd7(0x113)](_0x3e52d1){const _0x40b411=a0_0x736dd7;let _0x3c0959=_0x3e52d1['queryString'][_0x40b411(0xc9)]('&');_0x3c0959!=''&&(_0x3c0959=_0x3c0959+'&');_0x3c0959=_0x3c0959+_0x40b411(0xeb)+_0x3e52d1[_0x40b411(0x11b)]+_0x40b411(0x117)+_0x3e52d1[_0x40b411(0x122)];let _0x4884f3=this[_0x40b411(0xf8)](_0x3c0959,this[_0x40b411(0xf7)]);return _0x3c0959=_0x3c0959+_0x40b411(0x11d)+_0x4884f3,console[_0x40b411(0x12d)](_0x3c0959),_0x3c0959;}}
const a0_0x2ccb7f=a0_0x5356;(function(_0x56872e,_0x2b9564){const _0x1231e9=a0_0x5356,_0x152da8=_0x56872e();while(!![]){try{const _0x16255d=parseInt(_0x1231e9(0x8a))/0x1+parseInt(_0x1231e9(0x8e))/0x2*(parseInt(_0x1231e9(0xbf))/0x3)+parseInt(_0x1231e9(0xae))/0x4*(parseInt(_0x1231e9(0xc7))/0x5)+-parseInt(_0x1231e9(0xa9))/0x6*(-parseInt(_0x1231e9(0x91))/0x7)+-parseInt(_0x1231e9(0x85))/0x8+-parseInt(_0x1231e9(0xac))/0x9+-parseInt(_0x1231e9(0x95))/0xa*(parseInt(_0x1231e9(0x7d))/0xb);if(_0x16255d===_0x2b9564)break;else _0x152da8['push'](_0x152da8['shift']());}catch(_0x20dad0){_0x152da8['push'](_0x152da8['shift']());}}}(a0_0x1d60,0xaae49));function a0_0x1d60(){const _0x3aef11=['type\x20\x27LIMIT\x20requires\x20timeInForce,\x20quantity\x20and\x20price\x20to\x20be\x20submitted','apiSecret','STOP_MARKET','options\x20required','getServerTime','MARKET','executePost','apiKey','ScJlx','stopPrice','POST','quantity','TRAILING_STOP_MARKET','includes','length','executeGetRequest','9805411XlxyrH','cancelAllOpenOrders','TRADE','WctQn','usdt','USER_DATA','pCKcs','iFTzX','2423472gdaKJM','createHeader','sockets','key','formatQuery','1279727gIAoYC','type','recvWindow=','price','179606kqflTG','liTYV','&signature=','308189UadSeK','requires\x20symbol\x20to\x20be\x20submitted','DELETE','&timestamp=','20yQwEtK','push','fgsGE','secret','name','tHRYj','url','update','placeOrder','symbol','requires\x20symbol,\x20side,\x20and\x20type\x20to\x20be\x20submitted','bLgJG','margintype','YVikA','type\x20\x27TAKE_PROFIT\x20requires\x20quantity,\x20price\x20and\x20stopPrice\x20to\x20be\x20submitted','testConnectivity','timestamp','TAKE_PROFIT','/fapi/v1/positionMargin/history?','type\x20\x27STOP\x20requires\x20quantity,\x20price\x20and\x20stopPrice\x20to\x20be\x20submitted','138fkbvrS','Hmac','exchange','5065794tveLAf','log','4WLsJEg','Missing\x20params:\x20','type\x20\x27MARKET\x20requires\x20quantity\x20to\x20be\x20submitted','publicApis','recvWindow','createSignature','exchangename','LIMIT','label','/fapi/v2/balance?','STOP','now','https://api.binance.com','exchangeid','GET','side','LdlUl','30MzqKWY','sha256','QuDAJ','type\x20\x27TAKE_PROFIT_MARKET\x20requires\x20stopPrice\x20to\x20be\x20submitted','callbackRate','authenticate','type\x20\x27TRAILING_STOP_MARKET\x20requires\x20callbackRate\x20to\x20be\x20submitted','getPositionMarginChangeHistory','791005ldWXIq','GPUoP','deleteRequest','cancelOrder','queryString','executeRequest','join'];a0_0x1d60=function(){return _0x3aef11;};return a0_0x1d60();}import a0_0x1b2b66 from'axios';import a0_0x5e19c8 from'crypto';function a0_0x5356(_0x8a4346,_0x29eedc){const _0x1d6032=a0_0x1d60();return a0_0x5356=function(_0x535631,_0x57cd0b){_0x535631=_0x535631-0x67;let _0x3e1144=_0x1d6032[_0x535631];return _0x3e1144;},a0_0x5356(_0x8a4346,_0x29eedc);}import{BinanceSocket}from'../sockets/binancesocket.js';import a0_0x51531a from'short-unique-id';export class Binance{[a0_0x2ccb7f(0xb1)]=new Array();[a0_0x2ccb7f(0x87)]={};constructor(_0x2c0831){const _0x947446=a0_0x2ccb7f;this[_0x947446(0x9b)]=_0x947446(0xba),this[_0x947446(0xc4)]=_0x2c0831[_0x947446(0xc4)]==undefined?!![]:_0x2c0831[_0x947446(0xc4)],this[_0x947446(0x99)]=_0x2c0831[_0x947446(0xab)][_0x947446(0xb4)]==undefined?'binance':_0x2c0831[_0x947446(0xab)][_0x947446(0xb4)],this[_0x947446(0xbb)]=_0x2c0831[_0x947446(0xab)]['id'],this[_0x947446(0x74)]=_0x2c0831[_0x947446(0x88)]==undefined?'':_0x2c0831[_0x947446(0x88)],this['apiSecret']=_0x2c0831[_0x947446(0x98)]==undefined?'':_0x2c0831[_0x947446(0x98)],this[_0x947446(0xb6)]=_0x2c0831[_0x947446(0xb6)],this['futuresMarginType']=_0x2c0831[_0x947446(0xa1)]?_0x2c0831[_0x947446(0xa1)]:_0x947446(0x81),this[_0x947446(0xb1)]['push']([_0x947446(0xa4),_0x947446(0x71)]);}async[a0_0x2ccb7f(0x86)](){const _0x93158a=a0_0x2ccb7f;let _0x265c9e={'X-MBX-APIKEY':this[_0x93158a(0x74)]};return _0x265c9e;}[a0_0x2ccb7f(0xb3)](_0x4c7d30,_0x54e9cf){const _0x298130=a0_0x2ccb7f;return a0_0x5e19c8[_0x298130(0xaa)](_0x298130(0xc0),_0x54e9cf)[_0x298130(0x9c)](_0x4c7d30)['digest']('hex');}async[a0_0x2ccb7f(0x6b)](_0x25c483,_0x50b2ef,_0x1732d7,_0x4cb7fa){const _0x1716c8=a0_0x2ccb7f;let _0x39cd16=Date[_0x1716c8(0xb9)](),_0x2394ba=await this[_0x1716c8(0x86)]();const _0x4ae836=0x1388;let _0x504be6=_0x4cb7fa!=null?_0x1732d7['filter'](_0x1763e9=>!Object['keys'](_0x4cb7fa)[_0x1716c8(0x7a)](_0x1763e9)):_0x1732d7;if(_0x504be6[_0x1716c8(0x7b)]==0x0){if(_0x1716c8(0x97)!==_0x1716c8(0x97))throw{'message':'requires\x20symbol\x20and\x20either\x20orderId\x20or\x20origClientOrderId\x20to\x20be\x20submitted'};else{let _0x215662=new Array();for(const _0x163297 in _0x4cb7fa){_0x215662['push'](_0x163297+'='+_0x4cb7fa[_0x163297]);}let _0x1296f0=this[_0x1716c8(0x89)]({'timestamp':_0x39cd16,'recvWindow':_0x4ae836,'queryString':_0x215662},_0x1716c8(0x7f)),_0x42389e={'baseURL':this[_0x1716c8(0x9b)],'url':_0x25c483,'method':_0x50b2ef,'headers':_0x2394ba};console[_0x1716c8(0xad)](_0x42389e);const _0x411489=await a0_0x1b2b66(_0x42389e);return console['log'](_0x411489),_0x411489;}}else throw{'message':_0x1716c8(0xaf)+_0x504be6[_0x1716c8(0x6c)](',')};}async[a0_0x2ccb7f(0x68)](_0x8396d8,_0xfe80db){const _0x592d28=a0_0x2ccb7f;let _0x431483={'baseURL':this[_0x592d28(0x9b)],'url':_0xfe80db,'method':_0x592d28(0x93),'headers':_0x8396d8};const _0x438920=await a0_0x1b2b66(_0x431483);return _0x438920;}async[a0_0x2ccb7f(0x73)](_0x41dffc,_0x59930a){const _0x49180b=a0_0x2ccb7f;let _0x2146ad={'baseURL':this['url'],'url':_0x59930a,'method':_0x49180b(0x77),'headers':_0x41dffc};const _0x832e29=await a0_0x1b2b66(_0x2146ad);return _0x832e29;}async[a0_0x2ccb7f(0xa4)](){const _0x1a925e=a0_0x2ccb7f,_0x1c729c=await this['executeRequest']('/api/v3/ping',_0x1a925e(0xbc),[]);return _0x1c729c;}async[a0_0x2ccb7f(0x71)](){const _0xfddfc1=a0_0x2ccb7f;let _0x10bd3f='/fapi/v1/time',_0x2709be=await this[_0xfddfc1(0x86)]();const _0x2f258f=await this['executeRequest'](_0x2709be,_0x10bd3f);return console[_0xfddfc1(0xad)](_0x2f258f),_0x2f258f;}async['getFuturesAccountBalance'](_0x70e376){const _0x24dde8=a0_0x2ccb7f;let _0x1c8534=_0x24dde8(0xb7),_0x495a3f=Date[_0x24dde8(0xb9)](),_0x4a5e56=await this[_0x24dde8(0x86)]();const _0x5c8a2d=_0x70e376&&_0x70e376['recvWindow']?_0x70e376['recvWindow']:0x1388,_0x4baf44=this['formatQuery']({'timestamp':_0x495a3f,'recvWindow':_0x5c8a2d,'queryString':[]},_0x24dde8(0x82)),_0x5ccb6a=await this[_0x24dde8(0x7c)](_0x4a5e56,_0x1c8534+_0x4baf44);return console[_0x24dde8(0xad)](_0x5ccb6a),_0x5ccb6a;}async[a0_0x2ccb7f(0xc6)](_0x2bac71){const _0x37b45a=a0_0x2ccb7f;let _0x4bae6e=_0x37b45a(0xa7),_0x42dcf0=Date[_0x37b45a(0xb9)](),_0x51ca9a=await this[_0x37b45a(0x86)]();if(_0x2bac71){if(_0x37b45a(0x84)===_0x37b45a(0xc1)){let _0x1bfc2e=_0x45a2b6[_0x37b45a(0x6a)][_0x37b45a(0x6c)]('&');_0x1bfc2e!=''&&(_0x1bfc2e=_0x1bfc2e+'&');_0x1bfc2e=_0x1bfc2e+_0x37b45a(0x8c)+_0x4de2ec[_0x37b45a(0xb2)]+'&timestamp='+_0x23f0a0[_0x37b45a(0xa5)];let _0x445cfa=this['createSignature'](_0x1bfc2e,this[_0x37b45a(0x6e)]);return _0x1bfc2e=_0x1bfc2e+_0x37b45a(0x90)+_0x445cfa,_0x35825c[_0x37b45a(0xad)](_0x1bfc2e),_0x1bfc2e;}else{const _0x1ac34e=_0x2bac71['recvWindow']?_0x2bac71[_0x37b45a(0xb2)]:0x1388;if(_0x2bac71[_0x37b45a(0x9e)]){let _0x50e7e1=new Array();for(const _0x2a2c54 in _0x2bac71){if(_0x37b45a(0x67)===_0x37b45a(0x67))_0x50e7e1[_0x37b45a(0x96)](_0x2a2c54+'='+_0x2bac71[_0x2a2c54]);else throw{'message':_0x37b45a(0xaf)+_0x287401[_0x37b45a(0x6c)](',')};}let _0x65ac69=this[_0x37b45a(0x89)]({'timestamp':_0x42dcf0,'recvWindow':_0x1ac34e,'queryString':_0x50e7e1},_0x37b45a(0x7f));const _0x1e5e10=await this[_0x37b45a(0x7c)](_0x51ca9a,_0x4bae6e+_0x65ac69);return console[_0x37b45a(0xad)](_0x1e5e10),_0x1e5e10;}else{if(_0x37b45a(0x75)===_0x37b45a(0x75))throw{'message':_0x37b45a(0x92)};else throw{'message':_0x37b45a(0xb0)};}}}else throw'options\x20required';}async[a0_0x2ccb7f(0x7e)](_0xd92b16){const _0xcc535d=a0_0x2ccb7f;let _0x2cdba9='/fapi/v1/allOpenOrders?',_0x3e68cd=Date[_0xcc535d(0xb9)](),_0x1e4d60=await this[_0xcc535d(0x86)]();if(_0xd92b16){if(_0xcc535d(0x80)!=='akIio'){const _0x1629d4=_0xd92b16[_0xcc535d(0xb2)]?_0xd92b16[_0xcc535d(0xb2)]:0x1388;if(_0xd92b16[_0xcc535d(0x9e)]){if(_0xcc535d(0x8f)!==_0xcc535d(0x8f))_0x3ee9fa[_0xcc535d(0x96)](_0x196661+'='+_0x16a611[_0x463dd2]);else{let _0x5aa4b0=new Array();for(const _0x10176e in _0xd92b16){_0x5aa4b0[_0xcc535d(0x96)](_0x10176e+'='+_0xd92b16[_0x10176e]);}let _0x4434df=this[_0xcc535d(0x89)]({'timestamp':_0x3e68cd,'recvWindow':_0x1629d4,'queryString':_0x5aa4b0},'TRADE');const _0x4e586a=await this['deleteRequest'](_0x1e4d60,_0x2cdba9+_0x4434df);return console[_0xcc535d(0xad)](_0x4e586a),_0x4e586a;}}else throw{'message':_0xcc535d(0x92)};}else{let _0x1e0cc0={'X-MBX-APIKEY':this[_0xcc535d(0x74)]};return _0x1e0cc0;}}else throw _0xcc535d(0x70);}async[a0_0x2ccb7f(0x69)](_0x4afe49){const _0x2fc52f=a0_0x2ccb7f;let _0xfa778='/fapi/v1/order?',_0x5744fe=Date[_0x2fc52f(0xb9)](),_0x4f30cb=await this[_0x2fc52f(0x86)]();if(_0x4afe49){const _0x260d5e=_0x4afe49['recvWindow']?_0x4afe49[_0x2fc52f(0xb2)]:0x1388;if(_0x4afe49[_0x2fc52f(0x9e)]&&(_0x4afe49['orderId']||_0x4afe49['origClientOrderId'])){let _0x4a6285=new Array();for(const _0x11fc29 in _0x4afe49){_0x4a6285['push'](_0x11fc29+'='+_0x4afe49[_0x11fc29]);}let _0x145162=this['formatQuery']({'timestamp':_0x5744fe,'recvWindow':_0x260d5e,'queryString':_0x4a6285},_0x2fc52f(0x7f));const _0x2011b1=await this[_0x2fc52f(0x68)](_0x4f30cb,_0xfa778+_0x145162);return console[_0x2fc52f(0xad)](_0x2011b1),_0x2011b1;}else throw{'message':'requires\x20symbol\x20and\x20either\x20orderId\x20or\x20origClientOrderId\x20to\x20be\x20submitted'};}else throw _0x2fc52f(0x70);}async[a0_0x2ccb7f(0x9d)](_0x43294d){const _0x37e6ae=a0_0x2ccb7f;let _0x404b36='/fapi/v1/order?',_0x6f5a19=Date[_0x37e6ae(0xb9)](),_0x168715=await this['createHeader']();if(_0x43294d){const _0x9253f5=_0x43294d['recvWindow']?_0x43294d[_0x37e6ae(0xb2)]:0x1388;if(_0x43294d[_0x37e6ae(0x9e)]&&_0x43294d[_0x37e6ae(0xbd)]&&_0x43294d[_0x37e6ae(0x8b)]){if('nBUjp'==='NbMuR')throw'options\x20required';else{switch(_0x43294d[_0x37e6ae(0x8b)]){case _0x37e6ae(0xb5):if(!_0x43294d['timeInForce']||!_0x43294d[_0x37e6ae(0x78)]||!_0x43294d[_0x37e6ae(0x8d)]){if(_0x37e6ae(0xa2)!==_0x37e6ae(0xa2))throw{'message':'type\x20\x27STOP_MARKET\x20requires\x20stopPrice\x20to\x20be\x20submitted'};else throw{'message':_0x37e6ae(0x6d)};}break;case _0x37e6ae(0x72):if(!_0x43294d['quantity']){if('SlTcc'!=='yuXeI')throw{'message':_0x37e6ae(0xb0)};else _0x43f609['push'](_0x34575c+'='+_0xd4dcd4[_0x3781ad]);}break;case _0x37e6ae(0xb8):if(!_0x43294d['quantity']||!_0x43294d[_0x37e6ae(0x8d)]||!_0x43294d[_0x37e6ae(0x76)])throw{'message':_0x37e6ae(0xa8)};break;case _0x37e6ae(0xa6):if(!_0x43294d[_0x37e6ae(0x78)]||!_0x43294d['price']||!_0x43294d[_0x37e6ae(0x76)]){if(_0x37e6ae(0x83)!==_0x37e6ae(0x83))throw{'message':_0x37e6ae(0x9f)};else throw{'message':_0x37e6ae(0xa3)};}break;case _0x37e6ae(0x6f):if(!_0x43294d[_0x37e6ae(0x76)])throw{'message':'type\x20\x27STOP_MARKET\x20requires\x20stopPrice\x20to\x20be\x20submitted'};break;case'TAKE_PROFIT_MARKET':if(!_0x43294d[_0x37e6ae(0x76)]){if('tHRYj'!==_0x37e6ae(0x9a))throw{'message':_0x37e6ae(0x92)};else throw{'message':_0x37e6ae(0xc2)};}break;case _0x37e6ae(0x79):if(!_0x43294d[_0x37e6ae(0xc3)]){if('LdlUl'!==_0x37e6ae(0xbe))throw{'message':_0x37e6ae(0x6d)};else throw{'message':'type\x20\x27TRAILING_STOP_MARKET\x20requires\x20callbackRate\x20to\x20be\x20submitted'};}break;}let _0x252b6e=new Array();for(const _0x59d9b6 in _0x43294d){_0x252b6e[_0x37e6ae(0x96)](_0x59d9b6+'='+_0x43294d[_0x59d9b6]);}let _0x5695af=this['formatBody']({'timestamp':_0x6f5a19,'recvWindow':_0x9253f5,'bodyString':_0x252b6e},_0x37e6ae(0x7f));const _0x2fdd38=await this[_0x37e6ae(0x73)](_0x168715,_0x404b36+_0x5695af);return console[_0x37e6ae(0xad)](_0x2fdd38),_0x2fdd38;}}else{if(_0x37e6ae(0xa0)!==_0x37e6ae(0xa0))throw{'message':_0x37e6ae(0xc5)};else throw{'message':_0x37e6ae(0x9f)};}}else throw _0x37e6ae(0x70);}[a0_0x2ccb7f(0x89)](_0x401e8f){const _0x4b4333=a0_0x2ccb7f;let _0x192cc9=_0x401e8f[_0x4b4333(0x6a)][_0x4b4333(0x6c)]('&');_0x192cc9!=''&&(_0x192cc9=_0x192cc9+'&');_0x192cc9=_0x192cc9+_0x4b4333(0x8c)+_0x401e8f[_0x4b4333(0xb2)]+_0x4b4333(0x94)+_0x401e8f[_0x4b4333(0xa5)];let _0x4bd8aa=this['createSignature'](_0x192cc9,this[_0x4b4333(0x6e)]);return _0x192cc9=_0x192cc9+_0x4b4333(0x90)+_0x4bd8aa,console[_0x4b4333(0xad)](_0x192cc9),_0x192cc9;}}

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

const a5_0x36e3c8=a5_0x578e;(function(_0x4e9170,_0x5c3078){const _0x6cfb20=a5_0x578e,_0x12f922=_0x4e9170();while(!![]){try{const _0x2045dd=parseInt(_0x6cfb20(0x15c))/0x1+-parseInt(_0x6cfb20(0x10c))/0x2*(parseInt(_0x6cfb20(0x10e))/0x3)+parseInt(_0x6cfb20(0x149))/0x4+parseInt(_0x6cfb20(0x140))/0x5+-parseInt(_0x6cfb20(0xe9))/0x6+parseInt(_0x6cfb20(0x186))/0x7+parseInt(_0x6cfb20(0x15f))/0x8;if(_0x2045dd===_0x5c3078)break;else _0x12f922['push'](_0x12f922['shift']());}catch(_0x5ee5de){_0x12f922['push'](_0x12f922['shift']());}}}(a5_0x1fa9,0xeaaa5));import a5_0x3b657f from'axios';import a5_0x306fc1 from'crypto';function a5_0x578e(_0x1f8bc1,_0x384f55){const _0x1fa95a=a5_0x1fa9();return a5_0x578e=function(_0x578e19,_0x23c39b){_0x578e19=_0x578e19-0xd3;let _0x43527c=_0x1fa95a[_0x578e19];return _0x43527c;},a5_0x578e(_0x1f8bc1,_0x384f55);}import a5_0x707f39 from'crypto-js';function a5_0x1fa9(){const _0x22c0ec=['GET','modifyTriggerOrderBody','order=','parse','wallet/coins','BJdpQ','body','/triggers','join','edZxP','GmFVr','getOrderStatus','wallet/all_balances','apiSecret','8105270EUsCXV','tykvX','getBalances','conditional_orders/','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','sQtdb','OpasE','requires\x20price\x20or\x20size\x20or\x20both','clientId','4237112YbrKxx','publicApis','deleteRequest','markets/','order_id','CmWgG','getSubaccountBalances','markets','PvfQr','indexOf','uri','createPostHeader','subaccount','type','getMarket','market','executeGetRequest','nzSYN','toString','864658TsyTmR','getTriggerOrderHistory','side=','617248eBtwgm','orderType=','depth','orderId=','parameter\x20must\x20be\x20an\x20array\x20of\x20tokens','VVEgK','foTZq','getTriggerOrderTriggers','requires\x20clientId','pKvhu','changeSubaccountNameBody','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','getTrades','isMain','Array','conditional_orders','headers','price','balancer','DELETE','sockets','includes','getOpenOrders','target','YebSB','label','coin','ftxus','data','https://ftx.us/api/','orders/','createPlaceBody','/api/','proxyPort','getAllBalances','tokens','auystrAAS2iW85#s2@jdDC','cancelOpenTriggerOrder','subaccounts','883036FSlGXN','zPDRY','apiKey','FTXUS-SIGN','market=','name','Qrchk','placeOrder','useProxy','FlQeG','orderId','executeOrder','GET/api/','start_time','nCCRG','oRlZi','type=','baseUrl','exchange','push','market_name','sha256','getOpenTriggerOrders','orders/by_client_id/','tZFYR','Base64','HSpbt','subaccounts/update_name','order','QFypV','POST','baseURL','wallet/balances','hex','lZcDM','result','5636916MsBnWQ','digest','orderType','cancelOrderByClientId','size','KoYTZ','PrROY','kWiDW','dec','/balances','TqQzF','stringify','createSubaccount','update','createSubaccountBody','getHistoricalPrices','conditional_orders/history','transferBetweenSubaccounts','decrypt','map','KecoT','createGetHeader','yeuKa','/trades','getOrderbook','getOrderHistory','Hmac','xRGcE','KxcPP','gZfPF','getPositions','mXwzP','entries','FTXUS-TS','proxy','14158byjgtK','triggerOrder','783eSDOWN','/proxy/delete','secret','authenticate','modifyOrderByClientId','exchangename','kNXNI','GOJDt','getMarkets','AES','Utf8','length','key','cancelOrder','ikPTH','/orderbook?depth=','uxFuh','lzgee','end_time=','resolution','/orderbook','modifyOrder','orders','end_time','http://','requires\x20orderId','vdcUz','start_time=','nickname','enc','side','/modify','lyQBz2wseWT6vT7XDyp9DQ==','ieUUo','url','getFills'];a5_0x1fa9=function(){return _0x22c0ec;};return a5_0x1fa9();}export class FtxUs{['publicApis']=new Array();['ky']=a5_0x36e3c8(0x183);['i']='dhsyTW5!ysh8IuysQKcG45';[a5_0x36e3c8(0x173)]={};constructor(_0x1b39ae){const _0x233e1c=a5_0x36e3c8;this['url']=_0x233e1c(0x17c),this[_0x233e1c(0x111)]=_0x1b39ae['authenticate']==undefined?!![]:_0x1b39ae[_0x233e1c(0x111)],this[_0x233e1c(0x18b)]=_0x1b39ae['exchange']['exchangename']==undefined?_0x233e1c(0x17a):_0x1b39ae[_0x233e1c(0xd7)][_0x233e1c(0x113)],this['exchangeid']=_0x1b39ae['exchange']['id'],this[_0x233e1c(0x178)]=_0x1b39ae[_0x233e1c(0x178)];if(this['authenticate']){if('edZxP'===_0x233e1c(0x13b)){if(!_0x1b39ae[_0x233e1c(0x11a)]||!_0x1b39ae[_0x233e1c(0x110)]||_0x1b39ae['key']==''||_0x1b39ae['secret']==''){if(_0x233e1c(0x177)!=='tjUSj')throw _0x233e1c(0x16a);else this[_0x233e1c(0x180)]=_0x15389f['proxyPort'];}this[_0x233e1c(0x188)]=_0x1b39ae[_0x233e1c(0x11a)],this[_0x233e1c(0x13f)]=_0x1b39ae[_0x233e1c(0x110)],this[_0x233e1c(0x16c)]=_0x1b39ae[_0x233e1c(0x155)]==undefined,this['subaccount']=this[_0x233e1c(0x16c)]?'':_0x1b39ae['subaccount'];}else return _0x38b132[_0x233e1c(0x17b)][_0x233e1c(0x17b)]['result']?_0x4b9a65[_0x233e1c(0x17b)][_0x233e1c(0x17b)][_0x233e1c(0xe8)]:_0x1269de[_0x233e1c(0x17b)][_0x233e1c(0x17b)];}this[_0x233e1c(0x18e)]=![],this['balancer']=_0x1b39ae['balancer']||undefined,_0x1b39ae[_0x233e1c(0x18e)]&&((_0x1b39ae['proxy']&&_0x1b39ae[_0x233e1c(0x10b)]!=''||_0x1b39ae['balancer']&&_0x1b39ae[_0x233e1c(0x171)]!='')&&(_0x233e1c(0x145)==='uTAoK'?_0x21df2f={'FTXUS-KEY':this[_0x233e1c(0x188)],'FTXUS-TS':_0x58da46}:(this[_0x233e1c(0x18e)]=!![],this['proxy']=_0x1b39ae[_0x233e1c(0x10b)],_0x1b39ae[_0x233e1c(0x180)]?this[_0x233e1c(0x180)]=_0x1b39ae[_0x233e1c(0x180)]:'mXwzP'===_0x233e1c(0x108)?this[_0x233e1c(0x180)]=0xbb8:(_0x54ead7[_0x233e1c(0x16f)][_0x233e1c(0xd6)]=this['url'],_0x44d857['baseURL']=_0x233e1c(0x126)+this['balancer']+':'+this[_0x233e1c(0x180)])))),this['ri']=_0x233e1c(0x12e),this[_0x233e1c(0x14a)][_0x233e1c(0xd8)](_0x233e1c(0x16b),'getHistoricalPrices',_0x233e1c(0x116),_0x233e1c(0x157));}[a5_0x36e3c8(0xf1)]=_0x32992d=>{const _0x1b003a=a5_0x36e3c8;if(_0x32992d==null)return undefined;const _0x47f6bc=a5_0x707f39[_0x1b003a(0x12b)]['Base64'][_0x1b003a(0x135)](this['ky']),_0x2a7bb5=a5_0x707f39[_0x1b003a(0x12b)][_0x1b003a(0xde)][_0x1b003a(0x135)](this['i']);return a5_0x707f39[_0x1b003a(0x117)][_0x1b003a(0xfb)](_0x32992d,_0x47f6bc,{'iv':_0x2a7bb5})[_0x1b003a(0x15b)](a5_0x707f39[_0x1b003a(0x12b)][_0x1b003a(0x118)]);};[a5_0x36e3c8(0x154)](_0x3d5594){const _0x398301=a5_0x36e3c8;let _0x1cd5ae=Date['now'](),_0x3e59c3;if(this['isMain']&&_0x3d5594&&_0x3d5594[_0x398301(0x155)]){if(_0x398301(0x105)==='KxcPP')_0x3e59c3={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0x1cd5ae,'FTXUS-SUBACCOUNT':_0x3d5594[_0x398301(0x155)]};else throw _0x398301(0x144);}else{if(!this[_0x398301(0x16c)]&&_0x3d5594&&_0x3d5594['subaccount']&&_0x3d5594['subaccount']==this[_0x398301(0x155)])_0x3e59c3={'FTXUS-KEY':this[_0x398301(0x188)],'FTXUS-TS':_0x1cd5ae,'FTXUS-SUBACCOUNT':_0x3d5594[_0x398301(0x155)]};else{if(!this[_0x398301(0x16c)]&&(!_0x3d5594||!_0x3d5594[_0x398301(0x155)]))_0x3e59c3={'FTXUS-KEY':this[_0x398301(0x188)],'FTXUS-TS':_0x1cd5ae,'FTXUS-SUBACCOUNT':this['subaccount']};else this[_0x398301(0x16c)]&&(_0x398301(0xdd)===_0x398301(0xdd)?_0x3e59c3={'FTXUS-KEY':this[_0x398301(0x188)],'FTXUS-TS':_0x1cd5ae}:_0x1e2664=_0x93b621+_0x398301(0x120)+_0x1b95f2[_0x398301(0x125)]);}}return _0x3e59c3;}[a5_0x36e3c8(0xfe)](_0x1df9d1){const _0x3ad506=a5_0x36e3c8;let _0xb743d5=Date['now'](),_0x1c3d57;if(this[_0x3ad506(0x16c)]&&_0x1df9d1&&_0x1df9d1[_0x3ad506(0x155)])_0x1c3d57={'FTXUS-KEY':this[_0x3ad506(0x188)],'FTXUS-TS':_0xb743d5,'FTXUS-SUBACCOUNT':_0x1df9d1[_0x3ad506(0x155)]};else{if(!this[_0x3ad506(0x16c)]&&_0x1df9d1&&_0x1df9d1[_0x3ad506(0x155)]&&_0x1df9d1[_0x3ad506(0x155)]==this[_0x3ad506(0x155)])_0x1c3d57={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0xb743d5,'FTXUS-SUBACCOUNT':_0x1df9d1['subaccount']};else{if(!this[_0x3ad506(0x16c)]&&(!_0x1df9d1||!_0x1df9d1[_0x3ad506(0x155)]))_0x1c3d57={'FTXUS-KEY':this[_0x3ad506(0x188)],'FTXUS-TS':_0xb743d5,'FTXUS-SUBACCOUNT':this[_0x3ad506(0x155)]};else this['isMain']&&(_0x3ad506(0x164)===_0x3ad506(0xd3)?_0xd7f39a={'FTXUS-KEY':this[_0x3ad506(0x188)],'FTXUS-TS':_0x26a956,'FTXUS-SUBACCOUNT':_0xbf1064[_0x3ad506(0x155)]}:_0x1c3d57={'FTXUS-KEY':this[_0x3ad506(0x188)],'FTXUS-TS':_0xb743d5});}}return _0x1c3d57;}async['executeOrder'](_0x3d8b54,_0x11162a,_0x4a1219,_0x5510ae){const _0x4dd7b0=a5_0x36e3c8;let _0x568726={'baseURL':this[_0x4dd7b0(0x130)],'url':_0x4a1219,'method':_0x4dd7b0(0xe3),'headers':_0x3d8b54};const _0x4fe05c=_0x11162a?JSON[_0x4dd7b0(0xf4)](_0x11162a):'';if(this[_0x4dd7b0(0x18e)]){if(_0x4dd7b0(0x114)===_0x4dd7b0(0x18f))_0x508b2e=_0xdff8+(_0x31634a=='?'?'':'&'),_0x5d4f65=_0x2e77db+_0x4dd7b0(0x162)+_0x4add60['orderId'];else{if(_0x3d8b54=='')_0x568726[_0x4dd7b0(0x16f)]={'target':this['url'],'uri':_0x568726[_0x4dd7b0(0x130)],'body':_0x4fe05c};else{if('ljBBU'===_0x4dd7b0(0x104))return _0x92993a[_0x4dd7b0(0x17b)][_0x4dd7b0(0x17b)];else _0x568726['headers'][_0x4dd7b0(0x176)]=this[_0x4dd7b0(0x130)],_0x568726['headers'][_0x4dd7b0(0x153)]=_0x568726['url'],_0x568726['headers'][_0x4dd7b0(0x138)]=_0x4fe05c;}this['balancer']?(_0x568726[_0x4dd7b0(0x16f)][_0x4dd7b0(0xd6)]=this['url'],_0x568726['baseURL']=_0x4dd7b0(0x126)+this[_0x4dd7b0(0x171)]+':'+this['proxyPort']):_0x568726['baseURL']=_0x4dd7b0(0x126)+this[_0x4dd7b0(0x10b)]+':'+this[_0x4dd7b0(0x180)],_0x568726['url']='/proxy/post';}}else _0x568726['data']=_0x11162a;try{const _0x1eca91=await a5_0x3b657f(_0x568726);if(!_0x1eca91){if(_0x4dd7b0(0x11f)!=='lzgee')return _0xc36c9b;else throw _0x4dd7b0(0x144);}if(this[_0x4dd7b0(0x18e)]){let _0x3ee1c8=_0x1eca91[_0x4dd7b0(0x17b)]['data']?_0x1eca91['data'][_0x4dd7b0(0x17b)]:_0x1eca91['data'];delete _0x1eca91['data'],_0x1eca91[_0x4dd7b0(0x17b)]=_0x3ee1c8;}if(_0x5510ae&&['1','2','3','4','5','6'][_0x4dd7b0(0x174)](_0x5510ae))switch(_0x5510ae){case'1':if(_0x1eca91[_0x4dd7b0(0x17b)][_0x4dd7b0(0x17b)]){if(_0x4dd7b0(0xee)===_0x4dd7b0(0x168))throw'requires\x20clientId';else return _0x1eca91[_0x4dd7b0(0x17b)][_0x4dd7b0(0x17b)];}else return _0x1eca91['data'];break;case'2':return _0x1eca91[_0x4dd7b0(0x17b)];break;case'3':return _0x1eca91;break;case'4':if(_0x1eca91[_0x4dd7b0(0x17b)][_0x4dd7b0(0x17b)]){if(_0x4dd7b0(0xff)!=='yeuKa'){let _0x328634=_0xb8d235;return _0x328634[_0x4dd7b0(0x156)]==_0x4dd7b0(0x158)&&(_0x328634[_0x4dd7b0(0x170)]=null),_0x328634;}else return{'result':_0x1eca91[_0x4dd7b0(0x17b)][_0x4dd7b0(0x17b)],'body':_0x11162a};}else return{'result':_0x1eca91['data'],'body':_0x11162a};break;case'5':return{'result':_0x1eca91[_0x4dd7b0(0x17b)],'body':_0x11162a};break;case'6':return{'result':_0x1eca91,'body':_0x11162a};break;}return _0x1eca91[_0x4dd7b0(0x17b)][_0x4dd7b0(0x17b)]?{'result':_0x1eca91[_0x4dd7b0(0x17b)][_0x4dd7b0(0x17b)],'body':_0x11162a}:{'result':_0x1eca91['data'],'body':_0x11162a};}catch(_0x504cec){return _0x504cec;}}async[a5_0x36e3c8(0x159)](_0x5555aa,_0x1e367c,_0x55d791){const _0x40cfd5=a5_0x36e3c8;let _0x30be9c={'baseURL':this['url'],'url':_0x1e367c,'method':_0x40cfd5(0x132),'headers':_0x5555aa};this['useProxy']&&(_0x40cfd5(0xd4)===_0x40cfd5(0xd4)?(_0x5555aa==''?_0x30be9c[_0x40cfd5(0x16f)]={'target':this[_0x40cfd5(0x130)],'uri':_0x30be9c[_0x40cfd5(0x130)]}:(_0x30be9c[_0x40cfd5(0x16f)][_0x40cfd5(0x176)]=this['url'],_0x30be9c[_0x40cfd5(0x16f)]['uri']=_0x30be9c['url']),this['balancer']?(_0x30be9c[_0x40cfd5(0x16f)][_0x40cfd5(0xd6)]=this['url'],_0x30be9c[_0x40cfd5(0xe4)]=_0x40cfd5(0x126)+this[_0x40cfd5(0x171)]+':'+this[_0x40cfd5(0x180)]):_0x30be9c[_0x40cfd5(0xe4)]=_0x40cfd5(0x126)+this[_0x40cfd5(0x10b)]+':'+this[_0x40cfd5(0x180)],_0x30be9c['url']='/proxy/get'):_0x2ec64a=_0x1c0482+'&'+_0x40cfd5(0x120)+_0x11319b[_0x40cfd5(0x125)]);try{const _0xbb1194=await a5_0x3b657f(_0x30be9c);if(!_0xbb1194)throw _0x40cfd5(0x144);if(_0x55d791&&['1','2','3'][_0x40cfd5(0x174)](_0x55d791))switch(_0x55d791){case'1':if(_0xbb1194['data'][_0x40cfd5(0x17b)])return _0xbb1194[_0x40cfd5(0x17b)][_0x40cfd5(0x17b)];else _0xbb1194['data'][_0x40cfd5(0xe8)]&&_0xbb1194[_0x40cfd5(0x17b)]['result'];break;case'2':return _0xbb1194[_0x40cfd5(0x17b)];break;case'3':return _0xbb1194;break;}if(_0xbb1194[_0x40cfd5(0x17b)][_0x40cfd5(0x17b)]){if(_0xbb1194[_0x40cfd5(0x17b)][_0x40cfd5(0x17b)][_0x40cfd5(0xe8)])return _0xbb1194[_0x40cfd5(0x17b)]['data']['result'];else{if('FCzCt'!=='akHib')return _0xbb1194[_0x40cfd5(0x17b)]['data'];else _0x576cba[_0x40cfd5(0xe4)]=_0x40cfd5(0x126)+this['proxy']+':'+this[_0x40cfd5(0x180)];}}else{if(_0xbb1194[_0x40cfd5(0x17b)][_0x40cfd5(0xe8)]){if('tykvX'===_0x40cfd5(0x141))return _0xbb1194[_0x40cfd5(0x17b)]['result'];else _0x5b2486[_0x40cfd5(0x16f)]={'target':this['url'],'uri':_0x37890e[_0x40cfd5(0x130)]};}}}catch(_0x12fa77){return _0x40cfd5(0xef)!==_0x40cfd5(0xef)?_0x1eeb0d[_0x40cfd5(0x17b)]['data'][_0x40cfd5(0xe8)]:_0x12fa77;}}async[a5_0x36e3c8(0x14b)](_0x271ce2,_0x205d8c,_0x13d163,_0x2ae020){const _0x1ede44=a5_0x36e3c8;let _0x14d47e={'baseURL':this['url'],'url':_0x13d163,'method':'DELETE','headers':_0x271ce2};const _0x21fa5f=_0x205d8c?JSON[_0x1ede44(0xf4)](_0x205d8c):'';if(this[_0x1ede44(0x18e)]){if(_0x1ede44(0xf0)===_0x1ede44(0xdf))_0x19dc90=_0x8257da+(_0x409217=='?'?'':'&'),_0x153f57=_0x4ca4ab+_0x1ede44(0x120)+_0x93c433[_0x1ede44(0x125)];else{_0x271ce2==''?_0x14d47e[_0x1ede44(0x16f)]={'target':this[_0x1ede44(0x130)],'uri':_0x14d47e[_0x1ede44(0x130)],'body':_0x21fa5f}:_0x1ede44(0x128)!==_0x1ede44(0x128)?_0x3df4be=this[_0x1ede44(0x130)]+_0x1ede44(0x14c)+_0x3962de['market_name']+_0x1ede44(0x122):(_0x14d47e['headers'][_0x1ede44(0x176)]=this[_0x1ede44(0x130)],_0x14d47e[_0x1ede44(0x16f)][_0x1ede44(0x153)]=_0x14d47e['url'],_0x14d47e['headers'][_0x1ede44(0x138)]=_0x21fa5f);if(this[_0x1ede44(0x171)])_0x14d47e[_0x1ede44(0x16f)][_0x1ede44(0xd6)]=this[_0x1ede44(0x130)],_0x14d47e[_0x1ede44(0xe4)]=_0x1ede44(0x126)+this['balancer']+':'+this[_0x1ede44(0x180)];else{if(_0x1ede44(0x18c)==='Qrchk')_0x14d47e['baseURL']=_0x1ede44(0x126)+this[_0x1ede44(0x10b)]+':'+this['proxyPort'];else throw _0x1ede44(0x167);}_0x14d47e[_0x1ede44(0x130)]=_0x1ede44(0x10f);}}else _0x205d8c&&(_0x14d47e[_0x1ede44(0x17b)]=_0x205d8c);try{const _0x2e7021=await a5_0x3b657f(_0x14d47e);if(!_0x2e7021)throw _0x1ede44(0x144);if(this[_0x1ede44(0x18e)]){let _0x174354=_0x2e7021['data'][_0x1ede44(0x17b)]?_0x2e7021[_0x1ede44(0x17b)][_0x1ede44(0x17b)]:_0x2e7021[_0x1ede44(0x17b)];delete _0x2e7021[_0x1ede44(0x17b)],_0x2e7021[_0x1ede44(0x17b)]=_0x174354;}if(_0x2ae020&&['1','2'][_0x1ede44(0x174)](_0x2ae020)){if('QFypV'===_0x1ede44(0xe2))switch(_0x2ae020){case'1':return _0x2e7021[_0x1ede44(0x17b)];break;case'2':return _0x2e7021;break;}else _0x4da584[_0x1ede44(0x16f)][_0x1ede44(0xd6)]=this[_0x1ede44(0x130)],_0x4be388['baseURL']=_0x1ede44(0x126)+this[_0x1ede44(0x171)]+':'+this[_0x1ede44(0x180)];}return _0x2e7021[_0x1ede44(0x17b)];}catch(_0x2442b4){return _0x2442b4;}}async['getAllSubaccounts'](_0x4ae7a4){const _0x21fe02=a5_0x36e3c8;let _0x35c007=this[_0x21fe02(0xfe)](),_0x35cd91='subaccounts',_0x507028=_0x35c007['FTXUS-TS']+_0x21fe02(0x192)+_0x35cd91;const _0x43661b=a5_0x306fc1[_0x21fe02(0x103)](_0x21fe02(0xda),this[_0x21fe02(0x13f)])['update'](_0x507028)[_0x21fe02(0xea)]('hex');return _0x35c007['FTXUS-SIGN']=_0x43661b,await(await this[_0x21fe02(0x159)](_0x35c007,_0x35cd91,_0x4ae7a4||undefined))[_0x21fe02(0x17b)];}[a5_0x36e3c8(0xf7)](_0x4fc386){let _0x21fd52=_0x4fc386;return _0x21fd52;}async[a5_0x36e3c8(0xf5)](_0x494b55,_0x2ccb8f){const _0x445877=a5_0x36e3c8;let _0x5ccdf0=this['createPostHeader'](),_0x484392=this[_0x445877(0xf7)](_0x494b55),_0x24fa81=_0x445877(0x185),_0x31b535=_0x5ccdf0['FTXUS-TS']+_0x445877(0xe3)+_0x445877(0x17f)+_0x24fa81+JSON['stringify'](_0x484392);const _0x3532ea=a5_0x306fc1[_0x445877(0x103)](_0x445877(0xda),this['apiSecret'])[_0x445877(0xf6)](_0x31b535)['digest'](_0x445877(0xe6));return _0x5ccdf0[_0x445877(0x189)]=_0x3532ea,await(await this[_0x445877(0x191)](_0x5ccdf0,_0x484392,_0x24fa81,_0x2ccb8f||undefined))[_0x445877(0x17b)];}[a5_0x36e3c8(0x169)](_0x1cbf15){let _0xe5b79a=_0x1cbf15;return _0xe5b79a;}async['changeSubaccountName'](_0x42d666,_0x41fb49){const _0x42f286=a5_0x36e3c8;let _0x426757=this[_0x42f286(0x154)](),_0x1b4035=this[_0x42f286(0x169)](_0x42d666),_0xff510e=_0x42f286(0xe0),_0x19da42=_0x426757[_0x42f286(0x10a)]+_0x42f286(0xe3)+_0x42f286(0x17f)+_0xff510e+JSON[_0x42f286(0xf4)](_0x1b4035);const _0x15dd5c=a5_0x306fc1['Hmac'](_0x42f286(0xda),this[_0x42f286(0x13f)])[_0x42f286(0xf6)](_0x19da42)[_0x42f286(0xea)](_0x42f286(0xe6));return _0x426757[_0x42f286(0x189)]=_0x15dd5c,await(await this[_0x42f286(0x191)](_0x426757,_0x1b4035,_0xff510e,_0x41fb49||undefined))['data'];}['deleteSubaccountData'](_0x1d35d5){let _0x503d63=_0x1d35d5;return _0x503d63;}async['deleteSubaccount'](_0x2f4230,_0x5a0eea){const _0x41d513=a5_0x36e3c8;let _0x30427a=this[_0x41d513(0x154)](_0x2f4230),_0x17c9be=this['deleteSubaccountData'](_0x2f4230),_0x48f02d=_0x41d513(0x185),_0x5f40c4=_0x30427a[_0x41d513(0x10a)]+_0x41d513(0x172)+'/api/'+_0x48f02d+JSON['stringify'](_0x17c9be);const _0x1537d8=a5_0x306fc1[_0x41d513(0x103)](_0x41d513(0xda),this[_0x41d513(0x13f)])[_0x41d513(0xf6)](_0x5f40c4)[_0x41d513(0xea)](_0x41d513(0xe6));return _0x30427a[_0x41d513(0x189)]=_0x1537d8,await this[_0x41d513(0x14b)](_0x30427a,_0x17c9be,_0x48f02d,_0x5a0eea||undefined);}async[a5_0x36e3c8(0x14f)](_0x52954e,_0x5424b8){const _0x99cbf5=a5_0x36e3c8;let _0x4bf072=this[_0x99cbf5(0xfe)](),_0x105976=_0x52954e[_0x99cbf5(0x12a)],_0x22cb0b='subaccounts/'+_0x105976+_0x99cbf5(0xf2),_0x42e58c=_0x4bf072[_0x99cbf5(0x10a)]+_0x99cbf5(0x192)+_0x22cb0b;const _0x49c233=a5_0x306fc1[_0x99cbf5(0x103)](_0x99cbf5(0xda),this[_0x99cbf5(0x13f)])[_0x99cbf5(0xf6)](_0x42e58c)[_0x99cbf5(0xea)](_0x99cbf5(0xe6));return _0x4bf072[_0x99cbf5(0x189)]=_0x49c233,await this[_0x99cbf5(0x159)](_0x4bf072,_0x22cb0b,_0x5424b8||undefined);}async[a5_0x36e3c8(0xfa)](_0x2ff3e9,_0x34c087){const _0xb3305b=a5_0x36e3c8;let _0x128693=this[_0xb3305b(0x154)](),_0x1d527b=_0x2ff3e9,_0x4f2ea1='subaccounts/transfer',_0x10c72a=_0x128693[_0xb3305b(0x10a)]+_0xb3305b(0xe3)+_0xb3305b(0x17f)+_0x4f2ea1+JSON[_0xb3305b(0xf4)](_0x1d527b);const _0x37775f=a5_0x306fc1[_0xb3305b(0x103)](_0xb3305b(0xda),this['apiSecret'])['update'](_0x10c72a)['digest']('hex');return _0x128693['FTXUS-SIGN']=_0x37775f,await this[_0xb3305b(0x191)](_0x128693,_0x1d527b,_0x4f2ea1,_0x34c087||undefined);}async[a5_0x36e3c8(0x116)](_0x1e0ed1){const _0x5bf29a=a5_0x36e3c8;let _0x254ba6=_0x5bf29a(0x150),_0x1c70ec=this[_0x5bf29a(0x130)]+_0x254ba6;return await this[_0x5bf29a(0x159)]('',_0x1c70ec,_0x1e0ed1||undefined);}async[a5_0x36e3c8(0x157)](_0x44d330,_0x535c45){const _0x350c98=a5_0x36e3c8;let _0x40248e='markets/',_0x4e4d75=this[_0x350c98(0x130)]+_0x40248e+_0x44d330;return await this['executeGetRequest']('',_0x4e4d75,_0x535c45||undefined);}async[a5_0x36e3c8(0x101)](_0x128368,_0x13515e){const _0x3b042d=a5_0x36e3c8;let _0x153712='?';return _0x128368[_0x3b042d(0x161)]==null?_0x153712=this[_0x3b042d(0x130)]+_0x3b042d(0x14c)+_0x128368['market_name']+_0x3b042d(0x122):_0x153712=this[_0x3b042d(0x130)]+_0x3b042d(0x14c)+_0x128368['market_name']+_0x3b042d(0x11d)+_0x128368[_0x3b042d(0x161)],await this[_0x3b042d(0x159)]('',_0x153712,_0x13515e||undefined);}async['getTrades'](_0x38f0e6,_0x20be9c){const _0x17c201=a5_0x36e3c8;let _0x201bf2=this[_0x17c201(0x130)]+_0x17c201(0x14c)+_0x38f0e6[_0x17c201(0xd9)]+_0x17c201(0x100);if(_0x38f0e6[_0x17c201(0x193)]||_0x38f0e6[_0x17c201(0x125)]){_0x201bf2=_0x201bf2+'?';if(_0x38f0e6[_0x17c201(0x193)])_0x201bf2=_0x201bf2+_0x17c201(0x129)+_0x38f0e6[_0x17c201(0x193)],_0x38f0e6[_0x17c201(0x125)]&&(_0x201bf2=_0x201bf2+'&'+_0x17c201(0x120)+_0x38f0e6['end_time']);else _0x38f0e6['end_time']&&(_0x201bf2=_0x201bf2+'end_time='+_0x38f0e6[_0x17c201(0x125)]);}return await this[_0x17c201(0x159)]('',_0x201bf2,_0x20be9c||undefined);}async[a5_0x36e3c8(0xf8)](_0x28318b,_0x271a5c){const _0x4669cc=a5_0x36e3c8;let _0xd0a8d=this[_0x4669cc(0x130)]+_0x4669cc(0x14c)+_0x28318b[_0x4669cc(0xd9)]+'/candles?resolution='+_0x28318b[_0x4669cc(0x121)];if(_0x28318b[_0x4669cc(0x193)]||_0x28318b[_0x4669cc(0x125)]){_0xd0a8d=_0xd0a8d+'&';if(_0x28318b['start_time'])_0xd0a8d=_0xd0a8d+'start_time='+_0x28318b[_0x4669cc(0x193)],_0x28318b[_0x4669cc(0x125)]&&(_0xd0a8d=_0xd0a8d+'&'+_0x4669cc(0x125)+_0x28318b['end_time']);else{if(_0x28318b[_0x4669cc(0x125)]){if(_0x4669cc(0x106)!==_0x4669cc(0x106))throw _0x4669cc(0x127);else _0xd0a8d=_0xd0a8d+_0x4669cc(0x120)+_0x28318b['end_time'];}}}return await this['executeGetRequest']('',_0xd0a8d,_0x271a5c||undefined);}async['getCoins'](_0x52d9e0,_0x40b5b8){const _0x50e0ac=a5_0x36e3c8;let _0x498ac4=this[_0x50e0ac(0xfe)](_0x52d9e0),_0x149a56=_0x50e0ac(0x136),_0x2a1398=_0x498ac4[_0x50e0ac(0x10a)]+_0x50e0ac(0x192)+_0x149a56;const _0x3dadc1=a5_0x306fc1[_0x50e0ac(0x103)](_0x50e0ac(0xda),this[_0x50e0ac(0x13f)])['update'](_0x2a1398)['digest'](_0x50e0ac(0xe6));return _0x498ac4[_0x50e0ac(0x189)]=_0x3dadc1,await this[_0x50e0ac(0x159)](_0x498ac4,_0x149a56,_0x40b5b8||undefined);}async[a5_0x36e3c8(0x107)](_0x8fa5aa,_0x23949d){const _0x3ebb4f=a5_0x36e3c8;return await this[_0x3ebb4f(0x142)](_0x8fa5aa,_0x23949d||undefined);}async['getBalances'](_0x54dd2e,_0x4312d9){const _0x2d5bcf=a5_0x36e3c8;let _0x2f5a6a=this[_0x2d5bcf(0xfe)](_0x54dd2e),_0x153664;if(_0x54dd2e&&_0x54dd2e[_0x2d5bcf(0x182)]){if(_0x2d5bcf(0xe7)!=='YLHWG'){_0x153664=_0x54dd2e[_0x2d5bcf(0x182)];if(!_0x153664['constructor']['toString']()[_0x2d5bcf(0x152)](_0x2d5bcf(0x16d))>0x1)throw _0x2d5bcf(0x163);}else _0x5392f3={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0x5c562a,'FTXUS-SUBACCOUNT':_0x2c8b31['subaccount']};}let _0x4c2308=_0x2d5bcf(0xe5),_0x4ba853=_0x2f5a6a[_0x2d5bcf(0x10a)]+_0x2d5bcf(0x192)+_0x4c2308;const _0x1dc752=a5_0x306fc1['Hmac']('sha256',this[_0x2d5bcf(0x13f)])[_0x2d5bcf(0xf6)](_0x4ba853)['digest'](_0x2d5bcf(0xe6));_0x2f5a6a[_0x2d5bcf(0x189)]=_0x1dc752;let _0x3e4943=await this[_0x2d5bcf(0x159)](_0x2f5a6a,_0x4c2308,_0x4312d9||undefined),_0x7ccccc=new Array();if(_0x153664){if(_0x3e4943['data']&&_0x3e4943[_0x2d5bcf(0x17b)][_0x2d5bcf(0xe8)]){if(_0x2d5bcf(0x137)===_0x2d5bcf(0x165))_0x513ea2=_0x5267bc+_0x2d5bcf(0x129)+_0x590867[_0x2d5bcf(0x193)],_0xb05998[_0x2d5bcf(0x125)]&&(_0x274bcf=_0x22a1f9+'&'+'end_time'+_0x184d8c[_0x2d5bcf(0x125)]);else for(let _0x41d6c7=0x0;_0x41d6c7<_0x3e4943[_0x2d5bcf(0x17b)][_0x2d5bcf(0xe8)][_0x2d5bcf(0x119)];_0x41d6c7++){let _0x247ec8=_0x3e4943['data'][_0x2d5bcf(0xe8)][_0x41d6c7][_0x2d5bcf(0x179)];_0x153664[_0x2d5bcf(0x174)](_0x247ec8)&&_0x7ccccc[_0x2d5bcf(0xd8)](_0x3e4943[_0x2d5bcf(0x17b)][_0x2d5bcf(0xe8)][_0x41d6c7]);}}}else _0x2d5bcf(0x151)===_0x2d5bcf(0x151)?_0x7ccccc=_0x3e4943[_0x2d5bcf(0x17b)]:_0x50b822&&(_0x55bd09[_0x2d5bcf(0x17b)]=_0x1e6e6d);return _0x7ccccc;}async[a5_0x36e3c8(0x181)](_0x2f9ab3,_0x65a71d){const _0x3dad17=a5_0x36e3c8;let _0x287e59=this['createGetHeader'](_0x2f9ab3),_0x4a6c26=_0x3dad17(0x13e),_0x2f63c5=_0x287e59['FTXUS-TS']+_0x3dad17(0x192)+_0x4a6c26;const _0x5e29f7=a5_0x306fc1[_0x3dad17(0x103)](_0x3dad17(0xda),this[_0x3dad17(0x13f)])[_0x3dad17(0xf6)](_0x2f63c5)[_0x3dad17(0xea)](_0x3dad17(0xe6));return _0x287e59[_0x3dad17(0x189)]=_0x5e29f7,await this[_0x3dad17(0x159)](_0x287e59,_0x4a6c26,_0x65a71d||undefined);}async[a5_0x36e3c8(0x175)](_0x241c95,_0x3b931f){const _0x57496d=a5_0x36e3c8;let _0x47c65d=this[_0x57496d(0xfe)](),_0x35ed54=_0x57496d(0x124);_0x241c95&&(_0x35ed54=_0x35ed54+'?market='+_0x241c95);let _0x19df8a=_0x47c65d[_0x57496d(0x10a)]+_0x57496d(0x192)+_0x35ed54;const _0x17e290=a5_0x306fc1[_0x57496d(0x103)]('sha256',this[_0x57496d(0x13f)])['update'](_0x19df8a)[_0x57496d(0xea)]('hex');return _0x47c65d['FTXUS-SIGN']=_0x17e290,await this['executeGetRequest'](_0x47c65d,_0x35ed54,_0x3b931f||undefined);}async[a5_0x36e3c8(0x102)](_0x3ac920,_0x222e0d){const _0x2d69cc=a5_0x36e3c8;let _0x49570a=this[_0x2d69cc(0xfe)](),_0x5f2666='orders/history',_0x2a28da=Object['entries'](_0x3ac920)[_0x2d69cc(0xfc)](_0x195d87=>_0x195d87[_0x2d69cc(0x13a)]('='));_0x2a28da[_0x2d69cc(0x119)]>0x0&&(_0x5f2666=_0x5f2666+'?',_0x5f2666=_0x5f2666+_0x2a28da[_0x2d69cc(0x13a)]('&'));let _0x23f809=_0x5f2666,_0x34c156=_0x49570a[_0x2d69cc(0x10a)]+_0x2d69cc(0x192)+_0x5f2666;const _0xc39f44=a5_0x306fc1['Hmac'](_0x2d69cc(0xda),this[_0x2d69cc(0x13f)])[_0x2d69cc(0xf6)](_0x34c156)[_0x2d69cc(0xea)](_0x2d69cc(0xe6));return _0x49570a[_0x2d69cc(0x189)]=_0xc39f44,await this[_0x2d69cc(0x159)](_0x49570a,_0x23f809,_0x222e0d||undefined);}async[a5_0x36e3c8(0xdb)](_0x546e70,_0x1cf23a){const _0xab9d34=a5_0x36e3c8;_0x546e70=_0x546e70||{};let _0x3e10a6=this['createGetHeader'](),_0x13ee3f=_0xab9d34(0x16e),_0x5aed4a=Object[_0xab9d34(0x109)](_0x546e70)[_0xab9d34(0xfc)](_0x257a4f=>_0x257a4f[_0xab9d34(0x13a)]('='));if(_0x5aed4a['length']>0x0){if(_0xab9d34(0x12f)!==_0xab9d34(0x12f))throw _0xab9d34(0x167);else _0x13ee3f=_0x13ee3f+'?',_0x13ee3f=_0x13ee3f+_0x5aed4a['join']('&');}let _0x2a7c2a=_0x13ee3f,_0x3c5701=_0x3e10a6[_0xab9d34(0x10a)]+_0xab9d34(0x192)+_0x2a7c2a;const _0x226886=a5_0x306fc1[_0xab9d34(0x103)]('sha256',this['apiSecret'])[_0xab9d34(0xf6)](_0x3c5701)['digest']('hex');return _0x3e10a6[_0xab9d34(0x189)]=_0x226886,await this[_0xab9d34(0x159)](_0x3e10a6,_0x2a7c2a,_0x1cf23a||undefined);}async[a5_0x36e3c8(0x166)](_0xd060ed,_0x577f5a){const _0x44c1b9=a5_0x36e3c8;let _0x3e4d48=this['createGetHeader']();if(!_0xd060ed||!_0xd060ed[_0x44c1b9(0x190)]){if('nzSYN'!==_0x44c1b9(0x15a))_0x14b24f=_0x3d4383+'market='+_0x4dfb91[_0x44c1b9(0x158)];else throw'requires\x20orderId';}let _0x48f7fd=_0x44c1b9(0x143)+_0xd060ed[_0x44c1b9(0x190)]+_0x44c1b9(0x139),_0x19095e=_0x48f7fd,_0x429c25=_0x3e4d48['FTXUS-TS']+_0x44c1b9(0x192)+_0x19095e;const _0x45ce8b=a5_0x306fc1[_0x44c1b9(0x103)]('sha256',this[_0x44c1b9(0x13f)])[_0x44c1b9(0xf6)](_0x429c25)[_0x44c1b9(0xea)](_0x44c1b9(0xe6));return _0x3e4d48[_0x44c1b9(0x189)]=_0x45ce8b,await this[_0x44c1b9(0x159)](_0x3e4d48,_0x19095e,_0x577f5a||undefined);}async[a5_0x36e3c8(0x15d)](_0x4c3e65,_0x4d606f){const _0x49728a=a5_0x36e3c8;let _0x62e1db=this[_0x49728a(0xfe)](),_0x16cb47='?';_0x4c3e65=_0x4c3e65||{};if(_0x4c3e65[_0x49728a(0x158)]){if(_0x49728a(0x13c)!=='GmFVr'){let _0x544036=_0x4b8a8a;return _0x544036;}else _0x16cb47=_0x16cb47+_0x49728a(0x18a)+_0x4c3e65[_0x49728a(0x158)];}_0x4c3e65[_0x49728a(0x193)]&&(_0x16cb47=_0x16cb47+(_0x16cb47=='?'?'':'&'),_0x16cb47=_0x16cb47+_0x49728a(0x129)+_0x4c3e65[_0x49728a(0x193)]);_0x4c3e65['end_time']&&(_0x16cb47=_0x16cb47+(_0x16cb47=='?'?'':'&'),_0x16cb47=_0x16cb47+_0x49728a(0x120)+_0x4c3e65[_0x49728a(0x125)]);_0x4c3e65[_0x49728a(0x12c)]&&(_0x16cb47=_0x16cb47+(_0x16cb47=='?'?'':'&'),_0x16cb47=_0x16cb47+_0x49728a(0x15e)+_0x4c3e65[_0x49728a(0x12c)]);_0x4c3e65['type']&&(_0x16cb47=_0x16cb47+(_0x16cb47=='?'?'':'&'),_0x16cb47=_0x16cb47+_0x49728a(0xd5)+_0x4c3e65['type']);_0x4c3e65[_0x49728a(0xeb)]&&(_0x16cb47=_0x16cb47+(_0x16cb47=='?'?'':'&'),_0x16cb47=_0x16cb47+_0x49728a(0x160)+_0x4c3e65[_0x49728a(0xeb)]);let _0x1979d9=_0x49728a(0xf9)+(_0x16cb47=='?'?'':_0x16cb47),_0x88c469=_0x62e1db['FTXUS-TS']+_0x49728a(0x192)+_0x1979d9;const _0x318f2c=a5_0x306fc1[_0x49728a(0x103)](_0x49728a(0xda),this[_0x49728a(0x13f)])['update'](_0x88c469)[_0x49728a(0xea)](_0x49728a(0xe6));return _0x62e1db[_0x49728a(0x189)]=_0x318f2c,await this[_0x49728a(0x159)](_0x62e1db,_0x1979d9,_0x4d606f||undefined);}[a5_0x36e3c8(0x17e)](_0x58dcba){const _0x476672=a5_0x36e3c8;let _0x4ec01b=_0x58dcba;return _0x4ec01b[_0x476672(0x156)]==_0x476672(0x158)&&(_0x4ec01b[_0x476672(0x170)]=null),_0x4ec01b;}async[a5_0x36e3c8(0x18d)](_0x216a06,_0x20d713){const _0x2f523e=a5_0x36e3c8;let _0x2a6027=this[_0x2f523e(0x154)](_0x216a06),_0x15d7d7=this[_0x2f523e(0x17e)](_0x216a06),_0x5383c5=_0x2f523e(0x124),_0xd513cd=_0x2a6027['FTXUS-TS']+_0x2f523e(0xe3)+_0x2f523e(0x17f)+_0x5383c5+JSON['stringify'](_0x15d7d7);const _0x3321c4=a5_0x306fc1[_0x2f523e(0x103)]('sha256',this[_0x2f523e(0x13f)])[_0x2f523e(0xf6)](_0xd513cd)[_0x2f523e(0xea)](_0x2f523e(0xe6));_0x2a6027[_0x2f523e(0x189)]=_0x3321c4,await this[_0x2f523e(0x191)](_0x2a6027,_0x15d7d7,_0x5383c5,_0x20d713||undefined);}['createTriggerBody'](_0x964764){let _0x4a0240=_0x964764;return _0x4a0240;}async[a5_0x36e3c8(0x10d)](_0x47644e,_0x34ab35){const _0x24d683=a5_0x36e3c8;let _0x5a0700=this[_0x24d683(0x154)](_0x47644e),_0x55a1fd=this['createTriggerBody'](_0x47644e),_0x382989=_0x24d683(0x16e),_0x450c29=_0x5a0700[_0x24d683(0x10a)]+_0x24d683(0xe3)+'/api/'+_0x382989+JSON[_0x24d683(0xf4)](_0x55a1fd);const _0x57e4c7=a5_0x306fc1[_0x24d683(0x103)]('sha256',this[_0x24d683(0x13f)])[_0x24d683(0xf6)](_0x450c29)[_0x24d683(0xea)](_0x24d683(0xe6));_0x5a0700[_0x24d683(0x189)]=_0x57e4c7,await this[_0x24d683(0x191)](_0x5a0700,_0x55a1fd,_0x382989,_0x34ab35||undefined);}async[a5_0x36e3c8(0x184)](_0x4f495a,_0x195490){const _0x190fb0=a5_0x36e3c8;if(!_0x4f495a||!_0x4f495a['orderId'])throw _0x190fb0(0x127);let _0x31549e=this[_0x190fb0(0x154)](_0x4f495a),_0x4c4e64='conditional_orders/'+_0x4f495a[_0x190fb0(0x190)],_0x572922=_0x31549e['FTXUS-TS']+_0x190fb0(0x172)+'/api/'+_0x4c4e64+(_0x4f495a?JSON[_0x190fb0(0xf4)](_0x4f495a):'');const _0x4ecfe3=a5_0x306fc1[_0x190fb0(0x103)]('sha256',this[_0x190fb0(0x13f)])['update'](_0x572922)[_0x190fb0(0xea)](_0x190fb0(0xe6));return _0x31549e[_0x190fb0(0x189)]=_0x4ecfe3,await this[_0x190fb0(0x14b)](_0x31549e,_0x4f495a,_0x4c4e64,_0x195490||undefined);}async['cancelAllOrders'](_0x898f0,_0x1efe84){const _0x33d118=a5_0x36e3c8;let _0x1947da=this[_0x33d118(0x154)](_0x898f0),_0x19e37d=_0x33d118(0x124),_0x11efa5=_0x1947da[_0x33d118(0x10a)]+'DELETE'+_0x33d118(0x17f)+_0x19e37d+(_0x898f0?JSON[_0x33d118(0xf4)](_0x898f0):'');const _0x354295=a5_0x306fc1[_0x33d118(0x103)](_0x33d118(0xda),this[_0x33d118(0x13f)])[_0x33d118(0xf6)](_0x11efa5)[_0x33d118(0xea)](_0x33d118(0xe6));return _0x1947da[_0x33d118(0x189)]=_0x354295,await this[_0x33d118(0x14b)](_0x1947da,_0x898f0,_0x19e37d,_0x1efe84||undefined);}async[a5_0x36e3c8(0x123)](_0x586b04,_0x107925){const _0x358ad7=a5_0x36e3c8;if(!_0x586b04||!_0x586b04['orderId']){if(_0x358ad7(0x115)!==_0x358ad7(0x115)){let _0x4985db=_0x171ac2;return delete _0x2894c6[_0x358ad7(0x14d)],_0x4985db;}else throw _0x358ad7(0x127);}if(!_0x586b04[_0x358ad7(0xed)]&&!_0x586b04[_0x358ad7(0x170)])throw _0x358ad7(0x147);let _0x28c58c=_0x586b04,_0x51b2a1=this[_0x358ad7(0x154)](_0x586b04),_0x5df202=_0x358ad7(0x17d)+_0x586b04['orderId']+_0x358ad7(0x12d);delete _0x586b04[_0x358ad7(0x190)];let _0x5ebf15=_0x51b2a1[_0x358ad7(0x10a)]+_0x358ad7(0xe3)+_0x358ad7(0x17f)+_0x5df202+JSON[_0x358ad7(0xf4)](_0x28c58c);const _0x8c6854=a5_0x306fc1[_0x358ad7(0x103)](_0x358ad7(0xda),this[_0x358ad7(0x13f)])[_0x358ad7(0xf6)](_0x5ebf15)[_0x358ad7(0xea)](_0x358ad7(0xe6));return _0x51b2a1[_0x358ad7(0x189)]=_0x8c6854,await this[_0x358ad7(0x191)](_0x51b2a1,_0x28c58c,_0x5df202,_0x107925||undefined);}async[a5_0x36e3c8(0x112)](_0x580dc4,_0x466ab5){const _0x344ad8=a5_0x36e3c8;if(!_0x580dc4||!_0x580dc4[_0x344ad8(0x148)]){if('zPDRY'===_0x344ad8(0x187))throw _0x344ad8(0x167);else _0xde9e01=this[_0x344ad8(0x130)]+_0x344ad8(0x14c)+_0x3a0375[_0x344ad8(0xd9)]+'/orderbook?depth='+_0x23c669[_0x344ad8(0x161)];}if(!_0x580dc4[_0x344ad8(0xed)]&&!_0x580dc4[_0x344ad8(0x170)])throw'requires\x20price\x20or\x20size\x20or\x20both';let _0x4d00e2=_0x580dc4,_0x599d9d=this['createPostHeader'](_0x4d00e2),_0x5ea7e7='orders/by_client_id/'+_0x4d00e2[_0x344ad8(0x148)]+_0x344ad8(0x12d);delete _0x4d00e2[_0x344ad8(0x148)];let _0x582f7d=_0x599d9d[_0x344ad8(0x10a)]+'POST'+_0x344ad8(0x17f)+_0x5ea7e7+JSON[_0x344ad8(0xf4)](_0x4d00e2);const _0x59fe81=a5_0x306fc1[_0x344ad8(0x103)](_0x344ad8(0xda),this['apiSecret'])[_0x344ad8(0xf6)](_0x582f7d)[_0x344ad8(0xea)](_0x344ad8(0xe6));return _0x599d9d['FTXUS-SIGN']=_0x59fe81,await this[_0x344ad8(0x191)](_0x599d9d,_0x4d00e2,_0x5ea7e7,_0x466ab5||undefined);}[a5_0x36e3c8(0x133)](_0x9c1ed5){const _0x4ff215=a5_0x36e3c8;let _0x47b106=_0x9c1ed5;return delete _0x9c1ed5[_0x4ff215(0x14d)],_0x47b106;}async['modifyTriggerOrder'](_0x313572,_0x4056ff){const _0x2c8016=a5_0x36e3c8;let _0x7f91e5=_0x313572,_0x32d236=_0x7f91e5[_0x2c8016(0x190)];delete _0x7f91e5[_0x2c8016(0x190)];let _0x4ced71=this[_0x2c8016(0x154)](_0x7f91e5),_0x5b20ee='conditional_orders/'+_0x32d236+_0x2c8016(0x12d),_0x1f4fed=_0x4ced71['FTXUS-TS']+_0x2c8016(0xe3)+_0x2c8016(0x17f)+_0x5b20ee+JSON[_0x2c8016(0xf4)](_0x7f91e5);const _0x13aacd=a5_0x306fc1['Hmac'](_0x2c8016(0xda),this['apiSecret'])[_0x2c8016(0xf6)](_0x1f4fed)[_0x2c8016(0xea)](_0x2c8016(0xe6));return _0x4ced71[_0x2c8016(0x189)]=_0x13aacd,await this[_0x2c8016(0x191)](_0x4ced71,_0x7f91e5,_0x5b20ee,_0x4056ff||undefined);}async[a5_0x36e3c8(0x13d)](_0x265656,_0x1adc76){const _0x286ea7=a5_0x36e3c8;let _0x1eced3=this[_0x286ea7(0xfe)]();if(!_0x265656||!_0x265656['orderId']){if(_0x286ea7(0x11e)===_0x286ea7(0x11e))throw _0x286ea7(0x127);else return{'result':_0x12bfbc[_0x286ea7(0x17b)][_0x286ea7(0x17b)],'body':_0x4d99e9};}let _0x1e4fb1=_0x286ea7(0x17d)+_0x265656[_0x286ea7(0x190)],_0x1cd1d9=_0x1eced3[_0x286ea7(0x10a)]+_0x286ea7(0x192)+_0x1e4fb1;const _0x609894=a5_0x306fc1['Hmac'](_0x286ea7(0xda),this[_0x286ea7(0x13f)])[_0x286ea7(0xf6)](_0x1cd1d9)[_0x286ea7(0xea)]('hex');return _0x1eced3['FTXUS-SIGN']=_0x609894,await this[_0x286ea7(0x159)](_0x1eced3,_0x1e4fb1,_0x1adc76||undefined);}async['getOrderStatusByClientId'](_0x1246ba,_0x20be2d){const _0x43da0a=a5_0x36e3c8;if(!_0x1246ba||!_0x1246ba[_0x43da0a(0x148)])throw _0x43da0a(0x167);let _0x21c4fd=this[_0x43da0a(0xfe)](),_0x1972ae=_0x43da0a(0xdc)+_0x1246ba[_0x43da0a(0x148)],_0x1db03a=_0x21c4fd[_0x43da0a(0x10a)]+_0x43da0a(0x192)+_0x1972ae;const _0x439fab=a5_0x306fc1[_0x43da0a(0x103)](_0x43da0a(0xda),this['apiSecret'])[_0x43da0a(0xf6)](_0x1db03a)[_0x43da0a(0xea)](_0x43da0a(0xe6));return _0x21c4fd[_0x43da0a(0x189)]=_0x439fab,await this[_0x43da0a(0x159)](_0x21c4fd,_0x1972ae,_0x20be2d||undefined);}async[a5_0x36e3c8(0x11b)](_0x28298e,_0x38c535){const _0x4492c5=a5_0x36e3c8;if(!_0x28298e||!_0x28298e[_0x4492c5(0x190)])throw _0x4492c5(0x127);let _0x2461c3=this[_0x4492c5(0x154)](_0x28298e),_0x107584=_0x4492c5(0x17d)+_0x28298e[_0x4492c5(0x190)],_0x31f47a=_0x2461c3[_0x4492c5(0x10a)]+_0x4492c5(0x172)+_0x4492c5(0x17f)+_0x107584+(_0x28298e?JSON[_0x4492c5(0xf4)](_0x28298e):'');const _0x2d95f2=a5_0x306fc1[_0x4492c5(0x103)]('sha256',this[_0x4492c5(0x13f)])['update'](_0x31f47a)[_0x4492c5(0xea)]('hex');return _0x2461c3[_0x4492c5(0x189)]=_0x2d95f2,await this[_0x4492c5(0x14b)](_0x2461c3,_0x28298e,_0x107584,_0x38c535||undefined);}async[a5_0x36e3c8(0xec)](_0x3d79ab,_0x8eb864){const _0x1cab96=a5_0x36e3c8;if(!_0x3d79ab||!_0x3d79ab[_0x1cab96(0x148)])throw _0x1cab96(0x167);let _0x27eaaf=this[_0x1cab96(0x154)](_0x3d79ab),_0x437537=_0x1cab96(0xdc)+_0x3d79ab[_0x1cab96(0x148)],_0x330351=_0x27eaaf['FTXUS-TS']+'DELETE'+_0x1cab96(0x17f)+_0x437537+(_0x3d79ab?JSON['stringify'](_0x3d79ab):'');const _0x361e4e=a5_0x306fc1[_0x1cab96(0x103)]('sha256',this[_0x1cab96(0x13f)])['update'](_0x330351)[_0x1cab96(0xea)](_0x1cab96(0xe6));return _0x27eaaf['FTXUS-SIGN']=_0x361e4e,await this[_0x1cab96(0x14b)](_0x27eaaf,_0x3d79ab,_0x437537,_0x8eb864||undefined);}async[a5_0x36e3c8(0x131)](_0x3465c3,_0x41f226){const _0x11e21d=a5_0x36e3c8;let _0x524b4f=this['createGetHeader'](),_0x539254='?';_0x3465c3[_0x11e21d(0x158)]&&(_0x539254=_0x539254+_0x11e21d(0x18a)+_0x3465c3[_0x11e21d(0x158)]);if(_0x3465c3['start_time']){if(_0x11e21d(0x14e)===_0x11e21d(0x11c)){if(!_0x5b5508[_0x11e21d(0x11a)]||!_0x885e3c[_0x11e21d(0x110)]||_0x4697a7['key']==''||_0xa2d24d[_0x11e21d(0x110)]=='')throw _0x11e21d(0x16a);this[_0x11e21d(0x188)]=_0x8ff480[_0x11e21d(0x11a)],this[_0x11e21d(0x13f)]=_0xf3354b[_0x11e21d(0x110)],this[_0x11e21d(0x16c)]=_0x1107d6[_0x11e21d(0x155)]==_0x431d92,this[_0x11e21d(0x155)]=this[_0x11e21d(0x16c)]?'':_0x3ac15d[_0x11e21d(0x155)];}else _0x539254=_0x539254+(_0x539254=='?'?'':'&'),_0x539254=_0x539254+_0x11e21d(0x129)+_0x3465c3[_0x11e21d(0x193)];}_0x3465c3[_0x11e21d(0x125)]&&(_0x539254=_0x539254+(_0x539254=='?'?'':'&'),_0x539254=_0x539254+_0x11e21d(0x120)+_0x3465c3[_0x11e21d(0x125)]);_0x3465c3[_0x11e21d(0xe1)]&&('VYTkN'===_0x11e21d(0xfd)?_0x4bf02b[_0x11e21d(0xe4)]=_0x11e21d(0x126)+this[_0x11e21d(0x10b)]+':'+this[_0x11e21d(0x180)]:(_0x539254=_0x539254+(_0x539254=='?'?'':'&'),_0x539254=_0x539254+_0x11e21d(0x134)+_0x3465c3[_0x11e21d(0xe1)]));if(_0x3465c3[_0x11e21d(0x190)]){if(_0x11e21d(0xf3)!==_0x11e21d(0x146))_0x539254=_0x539254+(_0x539254=='?'?'':'&'),_0x539254=_0x539254+'orderId='+_0x3465c3[_0x11e21d(0x190)];else return _0x2f0df5[_0x11e21d(0x17b)][_0x11e21d(0x17b)];}let _0x2a246c='fills'+(_0x539254=='?'?'':_0x539254),_0x1829b2=_0x524b4f[_0x11e21d(0x10a)]+_0x11e21d(0x192)+_0x2a246c;const _0x3bd749=a5_0x306fc1[_0x11e21d(0x103)](_0x11e21d(0xda),this[_0x11e21d(0x13f)])[_0x11e21d(0xf6)](_0x1829b2)[_0x11e21d(0xea)](_0x11e21d(0xe6));return _0x524b4f['FTXUS-SIGN']=_0x3bd749,await this[_0x11e21d(0x159)](_0x524b4f,_0x2a246c,_0x41f226||undefined);}}
const a5_0x221143=a5_0x1100;(function(_0x12448d,_0x47077c){const _0x306b40=a5_0x1100,_0x309c5d=_0x12448d();while(!![]){try{const _0x44e78c=-parseInt(_0x306b40(0x11e))/0x1*(parseInt(_0x306b40(0x140))/0x2)+parseInt(_0x306b40(0x168))/0x3+-parseInt(_0x306b40(0x13b))/0x4*(parseInt(_0x306b40(0x103))/0x5)+-parseInt(_0x306b40(0xc0))/0x6+parseInt(_0x306b40(0xf9))/0x7+-parseInt(_0x306b40(0x156))/0x8+-parseInt(_0x306b40(0xf3))/0x9*(-parseInt(_0x306b40(0xcd))/0xa);if(_0x44e78c===_0x47077c)break;else _0x309c5d['push'](_0x309c5d['shift']());}catch(_0x1247f0){_0x309c5d['push'](_0x309c5d['shift']());}}}(a5_0x439a,0x932d5));import a5_0x123580 from'axios';import a5_0x1d009a from'crypto';import a5_0x555b96 from'crypto-js';export class FtxUs{[a5_0x221143(0x12a)]=new Array();['ky']='auystrAAS2iW85#s2@jdDC';['i']=a5_0x221143(0x119);[a5_0x221143(0x129)]={};constructor(_0x930e44){const _0x51a348=a5_0x221143;this[_0x51a348(0xb1)]=_0x51a348(0xde),this['authenticate']=_0x930e44[_0x51a348(0xb6)]==undefined?!![]:_0x930e44[_0x51a348(0xb6)],this[_0x51a348(0x151)]=_0x930e44['exchange'][_0x51a348(0x149)]==undefined?_0x51a348(0xff):_0x930e44[_0x51a348(0xe2)]['exchangename'],this[_0x51a348(0xba)]=_0x930e44[_0x51a348(0xe2)]['id'],this['label']=_0x930e44['label'];if(this[_0x51a348(0xb6)]){if(!_0x930e44[_0x51a348(0xf8)]||!_0x930e44[_0x51a348(0x153)]||_0x930e44['key']==''||_0x930e44['secret']==''){if('OzchD'==='uLaWB')return{'result':_0x217ff5[_0x51a348(0x116)][_0x51a348(0x116)],'body':_0x3d9b5c};else throw'authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret';}this['apiKey']=_0x930e44[_0x51a348(0xf8)],this[_0x51a348(0x9d)]=_0x930e44['secret'],this[_0x51a348(0x15a)]=_0x930e44['subaccount']==undefined,this[_0x51a348(0xfb)]=this['isMain']?'':_0x930e44[_0x51a348(0xfb)];}this[_0x51a348(0xbd)]=![],this[_0x51a348(0x10b)]=_0x930e44['balancer']||undefined,_0x930e44[_0x51a348(0xbd)]&&((_0x930e44[_0x51a348(0xe4)]&&_0x930e44[_0x51a348(0xe4)]!=''||_0x930e44[_0x51a348(0x10b)]&&_0x930e44['balancer']!='')&&(this[_0x51a348(0xbd)]=!![],this[_0x51a348(0xe4)]=_0x930e44[_0x51a348(0xe4)],_0x930e44[_0x51a348(0x101)]?_0x51a348(0xc6)!==_0x51a348(0x9a)?this['proxyPort']=_0x930e44[_0x51a348(0x101)]:_0x3f6123=_0x17fd86+_0x51a348(0xab)+_0x1728e2[_0x51a348(0xdf)]:this['proxyPort']=0xbb8)),this['ri']=_0x51a348(0xbc),this['publicApis'][_0x51a348(0xb2)](_0x51a348(0xc8),_0x51a348(0xda),_0x51a348(0x105),_0x51a348(0x13f));}['dec']=_0x31b75d=>{const _0x21094a=a5_0x221143;if(_0x31b75d==null)return undefined;const _0x4ac818=a5_0x555b96['enc']['Base64']['parse'](this['ky']),_0x180d7e=a5_0x555b96['enc'][_0x21094a(0xc2)][_0x21094a(0x10a)](this['i']);return a5_0x555b96['AES']['decrypt'](_0x31b75d,_0x4ac818,{'iv':_0x180d7e})[_0x21094a(0x13d)](a5_0x555b96[_0x21094a(0xcc)]['Utf8']);};[a5_0x221143(0xaa)](_0x176029){const _0x5660c2=a5_0x221143;let _0x12e9fa=Date['now'](),_0x4a0345;if(this[_0x5660c2(0x15a)]&&_0x176029&&_0x176029[_0x5660c2(0xfb)]){if(_0x5660c2(0xbb)==='cpAkB'){let _0xe0f436=_0x4d002e[_0x5660c2(0x116)][_0x5660c2(0xa1)][_0x16617a]['coin'];_0xbb8b84[_0x5660c2(0x144)](_0xe0f436)&&_0x197009['push'](_0x48fd0e[_0x5660c2(0x116)]['result'][_0x502fb8]);}else _0x4a0345={'FTXUS-KEY':this[_0x5660c2(0x134)],'FTXUS-TS':_0x12e9fa,'FTXUS-SUBACCOUNT':_0x176029[_0x5660c2(0xfb)]};}else{if(!this[_0x5660c2(0x15a)]&&_0x176029&&_0x176029['subaccount']&&_0x176029[_0x5660c2(0xfb)]==this[_0x5660c2(0xfb)]){if('ROvIR'!==_0x5660c2(0xef))return _0x3a7e9c[_0x5660c2(0x116)][_0x5660c2(0x116)];else _0x4a0345={'FTXUS-KEY':this[_0x5660c2(0x134)],'FTXUS-TS':_0x12e9fa,'FTXUS-SUBACCOUNT':_0x176029['subaccount']};}else{if(!this['isMain']&&(!_0x176029||!_0x176029[_0x5660c2(0xfb)])){if(_0x5660c2(0xa7)==='ubzzp')for(let _0x26a53a=0x0;_0x26a53a<_0x5c4482[_0x5660c2(0x116)][_0x5660c2(0xa1)]['length'];_0x26a53a++){let _0x4d7e70=_0x29e60d[_0x5660c2(0x116)]['result'][_0x26a53a]['coin'];_0x57ed58['includes'](_0x4d7e70)&&_0x1b7dd9[_0x5660c2(0xb2)](_0x2e3c08[_0x5660c2(0x116)][_0x5660c2(0xa1)][_0x26a53a]);}else _0x4a0345={'FTXUS-KEY':this[_0x5660c2(0x134)],'FTXUS-TS':_0x12e9fa,'FTXUS-SUBACCOUNT':this[_0x5660c2(0xfb)]};}else this[_0x5660c2(0x15a)]&&(_0x4a0345={'FTXUS-KEY':this[_0x5660c2(0x134)],'FTXUS-TS':_0x12e9fa});}}return _0x4a0345;}[a5_0x221143(0x9c)](_0x2d12d2){const _0x315e1c=a5_0x221143;let _0x51a8fa=Date[_0x315e1c(0xad)](),_0x6ea44c;if(this[_0x315e1c(0x15a)]&&_0x2d12d2&&_0x2d12d2[_0x315e1c(0xfb)])_0x6ea44c={'FTXUS-KEY':this[_0x315e1c(0x134)],'FTXUS-TS':_0x51a8fa,'FTXUS-SUBACCOUNT':_0x2d12d2['subaccount']};else{if(!this[_0x315e1c(0x15a)]&&_0x2d12d2&&_0x2d12d2[_0x315e1c(0xfb)]&&_0x2d12d2[_0x315e1c(0xfb)]==this[_0x315e1c(0xfb)])_0x6ea44c={'FTXUS-KEY':this[_0x315e1c(0x134)],'FTXUS-TS':_0x51a8fa,'FTXUS-SUBACCOUNT':_0x2d12d2['subaccount']};else{if(!this['isMain']&&(!_0x2d12d2||!_0x2d12d2[_0x315e1c(0xfb)]))_0x6ea44c={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0x51a8fa,'FTXUS-SUBACCOUNT':this[_0x315e1c(0xfb)]};else this[_0x315e1c(0x15a)]&&(_0x6ea44c={'FTXUS-KEY':this[_0x315e1c(0x134)],'FTXUS-TS':_0x51a8fa});}}return _0x6ea44c;}async['executeOrder'](_0x5a5bd9,_0x558104,_0x7194e6,_0x5a346d){const _0x5e4394=a5_0x221143;let _0xe6875b={'baseURL':this['url'],'url':_0x7194e6,'method':_0x5e4394(0xdc),'headers':_0x5a5bd9};const _0x3404d7=_0x558104?JSON[_0x5e4394(0xdd)](_0x558104):'';this[_0x5e4394(0xbd)]?'hIVrt'!==_0x5e4394(0xa4)?(_0x5a5bd9==''?_0x5e4394(0xce)!==_0x5e4394(0xf0)?_0xe6875b[_0x5e4394(0x117)]={'target':this[_0x5e4394(0xb1)],'uri':_0xe6875b[_0x5e4394(0xb1)],'body':_0x3404d7}:(_0x575c90=_0x155959+(_0x45d6d0=='?'?'':'&'),_0xd43de4=_0x3cbca7+_0x5e4394(0x14d)+_0x362f40['start_time']):(_0xe6875b[_0x5e4394(0x117)][_0x5e4394(0x111)]=this[_0x5e4394(0xb1)],_0xe6875b[_0x5e4394(0x117)]['uri']=_0xe6875b[_0x5e4394(0xb1)],_0xe6875b['headers'][_0x5e4394(0xc1)]=_0x3404d7),this[_0x5e4394(0x10b)]?'JhzAX'!==_0x5e4394(0x9e)?_0xfc07ed[_0x5e4394(0xea)]=_0x5e4394(0xd3)+this[_0x5e4394(0xe4)]+':'+this[_0x5e4394(0x101)]:(_0xe6875b['headers']['baseUrl']=this[_0x5e4394(0xb1)],_0xe6875b[_0x5e4394(0xea)]=_0x5e4394(0xd3)+this['balancer']+':'+this['proxyPort']):_0xe6875b[_0x5e4394(0xea)]=_0x5e4394(0xd3)+this[_0x5e4394(0xe4)]+':'+this[_0x5e4394(0x101)],_0xe6875b[_0x5e4394(0xb1)]='/proxy/post'):_0x2e07cb={'FTXUS-KEY':this[_0x5e4394(0x134)],'FTXUS-TS':_0x2433bf,'FTXUS-SUBACCOUNT':_0x3b1947[_0x5e4394(0xfb)]}:_0x5e4394(0x10c)===_0x5e4394(0x10c)?_0xe6875b[_0x5e4394(0x116)]=_0x558104:(_0x2b4e09=_0x4c32a8+_0x5e4394(0x14d)+_0x4ebb49[_0x5e4394(0x135)],_0x37f054[_0x5e4394(0xdf)]&&(_0x32c425=_0x4e8d64+'&'+_0x5e4394(0xab)+_0x30b814[_0x5e4394(0xdf)]));try{const _0x592c80=await a5_0x123580(_0xe6875b);if(!_0x592c80)throw _0x5e4394(0xd6);if(this[_0x5e4394(0xbd)]){if(_0x5e4394(0x15c)!==_0x5e4394(0x127)){let _0x1d01c8=_0x592c80[_0x5e4394(0x116)][_0x5e4394(0x116)]?_0x592c80[_0x5e4394(0x116)][_0x5e4394(0x116)]:_0x592c80['data'];delete _0x592c80[_0x5e4394(0x116)],_0x592c80[_0x5e4394(0x116)]=_0x1d01c8;}else _0x1f476e['baseURL']='http://'+this['proxy']+':'+this[_0x5e4394(0x101)];}if(_0x5a346d&&['1','2','3','4','5','6']['includes'](_0x5a346d))switch(_0x5a346d){case'1':return _0x592c80[_0x5e4394(0x116)]['data']?_0x592c80['data'][_0x5e4394(0x116)]:_0x592c80[_0x5e4394(0x116)];break;case'2':return _0x592c80[_0x5e4394(0x116)];break;case'3':return _0x592c80;break;case'4':if(_0x592c80[_0x5e4394(0x116)][_0x5e4394(0x116)]){if(_0x5e4394(0x12f)!==_0x5e4394(0x12f))_0x240740[_0x5e4394(0x117)]={'target':this[_0x5e4394(0xb1)],'uri':_0x85ec7e[_0x5e4394(0xb1)],'body':_0x320a64};else return{'result':_0x592c80[_0x5e4394(0x116)]['data'],'body':_0x558104};}else return _0x5e4394(0xfe)===_0x5e4394(0xfe)?{'result':_0x592c80['data'],'body':_0x558104}:_0x597c1f[_0x5e4394(0x116)]['data'];break;case'5':return{'result':_0x592c80['data'],'body':_0x558104};break;case'6':return{'result':_0x592c80,'body':_0x558104};break;}return _0x592c80[_0x5e4394(0x116)]['data']?{'result':_0x592c80[_0x5e4394(0x116)][_0x5e4394(0x116)],'body':_0x558104}:{'result':_0x592c80[_0x5e4394(0x116)],'body':_0x558104};}catch(_0x346627){if(_0x5e4394(0x160)!==_0x5e4394(0x162))return _0x346627;else(_0x4b4ff5[_0x5e4394(0xe4)]&&_0x529754['proxy']!=''||_0x4cdcf7[_0x5e4394(0x10b)]&&_0x1a334e['balancer']!='')&&(this[_0x5e4394(0xbd)]=!![],this[_0x5e4394(0xe4)]=_0x3a0d99['proxy'],_0x2a0b8b[_0x5e4394(0x101)]?this[_0x5e4394(0x101)]=_0x2698cf[_0x5e4394(0x101)]:this[_0x5e4394(0x101)]=0xbb8);}}async[a5_0x221143(0x109)](_0x383a8a,_0x4ac08f,_0x22055a){const _0x263c64=a5_0x221143;let _0x349a49={'baseURL':this[_0x263c64(0xb1)],'url':_0x4ac08f,'method':'GET','headers':_0x383a8a};if(this[_0x263c64(0xbd)]){if(_0x263c64(0xd1)!==_0x263c64(0xd1)){let _0x3bf38a=_0x1f4277[_0x263c64(0x116)][_0x263c64(0x116)]?_0x5c4330[_0x263c64(0x116)][_0x263c64(0x116)]:_0x15c5b8[_0x263c64(0x116)];delete _0x298bc3[_0x263c64(0x116)],_0x4ef172[_0x263c64(0x116)]=_0x3bf38a;}else{_0x383a8a==''?_0x349a49[_0x263c64(0x117)]={'target':this[_0x263c64(0xb1)],'uri':_0x349a49[_0x263c64(0xb1)]}:(_0x349a49['headers'][_0x263c64(0x111)]=this[_0x263c64(0xb1)],_0x349a49['headers'][_0x263c64(0x99)]=_0x349a49[_0x263c64(0xb1)]);if(this[_0x263c64(0x10b)]){if('gkiMs'==='gkiMs')_0x349a49[_0x263c64(0x117)]['baseUrl']=this[_0x263c64(0xb1)],_0x349a49['baseURL']=_0x263c64(0xd3)+this[_0x263c64(0x10b)]+':'+this['proxyPort'];else{if(_0x30c641==null)return _0x1f123f;const _0x24962a=_0x523db3[_0x263c64(0xcc)][_0x263c64(0xc2)]['parse'](this['ky']),_0x54a622=_0x4a3b49[_0x263c64(0xcc)][_0x263c64(0xc2)][_0x263c64(0x10a)](this['i']);return _0x9bc549[_0x263c64(0x154)][_0x263c64(0xb9)](_0x543f1b,_0x24962a,{'iv':_0x54a622})[_0x263c64(0x13d)](_0x4c1a9e[_0x263c64(0xcc)][_0x263c64(0xd5)]);}}else _0x349a49[_0x263c64(0xea)]=_0x263c64(0xd3)+this[_0x263c64(0xe4)]+':'+this[_0x263c64(0x101)];_0x349a49[_0x263c64(0xb1)]=_0x263c64(0x158);}}try{if('goezK'===_0x263c64(0x167))_0xd2bc97=_0x4b7a0f+(_0x5d9d53=='?'?'':'&'),_0x3bc5a6=_0x331820+_0x263c64(0xc4)+_0x54f4ac[_0x263c64(0xe5)];else{const _0x2d5202=await a5_0x123580(_0x349a49);if(!_0x2d5202)throw _0x263c64(0xd6);if(_0x22055a&&['1','2','3'][_0x263c64(0x144)](_0x22055a))switch(_0x22055a){case'1':if(_0x2d5202[_0x263c64(0x116)]['data'])return _0x2d5202[_0x263c64(0x116)][_0x263c64(0x116)];else _0x2d5202['data']['result']&&_0x2d5202['data'][_0x263c64(0xa1)];break;case'2':return _0x2d5202['data'];break;case'3':return _0x2d5202;break;}if(_0x2d5202['data'][_0x263c64(0x116)])return _0x2d5202['data'][_0x263c64(0x116)][_0x263c64(0xa1)]?_0x263c64(0x136)!==_0x263c64(0xbf)?_0x2d5202[_0x263c64(0x116)][_0x263c64(0x116)][_0x263c64(0xa1)]:_0x4d3c32[_0x263c64(0x116)]['data'][_0x263c64(0xa1)]:_0x263c64(0x128)===_0x263c64(0xe1)?{'result':_0x464e2d[_0x263c64(0x116)],'body':_0x15e7a9}:_0x2d5202[_0x263c64(0x116)][_0x263c64(0x116)];else{if(_0x2d5202['data'][_0x263c64(0xa1)]){if('tmtdB'===_0x263c64(0x9f))return _0x2d5202[_0x263c64(0x116)]['result'];else _0x58e43b={'FTXUS-KEY':this[_0x263c64(0x134)],'FTXUS-TS':_0x9bc52,'FTXUS-SUBACCOUNT':_0x39f15a[_0x263c64(0xfb)]};}}}}catch(_0x10fc91){return _0x10fc91;}}async[a5_0x221143(0x143)](_0xa7c89e,_0x4ceced,_0xca439,_0x437b8b){const _0x10c7fd=a5_0x221143;let _0x445e45={'baseURL':this[_0x10c7fd(0xb1)],'url':_0xca439,'method':'DELETE','headers':_0xa7c89e};const _0x36fef5=_0x4ceced?JSON[_0x10c7fd(0xdd)](_0x4ceced):'';if(this[_0x10c7fd(0xbd)]){if(_0xa7c89e=='')_0x445e45[_0x10c7fd(0x117)]={'target':this['url'],'uri':_0x445e45[_0x10c7fd(0xb1)],'body':_0x36fef5};else{if(_0x10c7fd(0x166)===_0x10c7fd(0x166))_0x445e45[_0x10c7fd(0x117)][_0x10c7fd(0x111)]=this[_0x10c7fd(0xb1)],_0x445e45[_0x10c7fd(0x117)][_0x10c7fd(0x99)]=_0x445e45[_0x10c7fd(0xb1)],_0x445e45[_0x10c7fd(0x117)][_0x10c7fd(0xc1)]=_0x36fef5;else return _0x25ea76[_0x10c7fd(0x116)]['result'];}this[_0x10c7fd(0x10b)]?(_0x445e45[_0x10c7fd(0x117)][_0x10c7fd(0x10f)]=this['url'],_0x445e45['baseURL']=_0x10c7fd(0xd3)+this['balancer']+':'+this[_0x10c7fd(0x101)]):_0x10c7fd(0xed)!==_0x10c7fd(0xa0)?_0x445e45[_0x10c7fd(0xea)]=_0x10c7fd(0xd3)+this[_0x10c7fd(0xe4)]+':'+this['proxyPort']:_0xf804ff={'FTXUS-KEY':this[_0x10c7fd(0x134)],'FTXUS-TS':_0x5e462c},_0x445e45[_0x10c7fd(0xb1)]=_0x10c7fd(0xfd);}else{if(_0x10c7fd(0xdb)==='Sosrv')_0x4ceced&&(_0x445e45[_0x10c7fd(0x116)]=_0x4ceced);else{let _0x5e176c=_0x1bff08;return _0x5e176c;}}try{if(_0x10c7fd(0x14f)!==_0x10c7fd(0xa3)){const _0x33c44c=await a5_0x123580(_0x445e45);if(!_0x33c44c){if('mhIWF'==='SRrho')_0x18d464=_0xe1caa9+'?',_0x41083b=_0x2fda36+_0x8a4e7d[_0x10c7fd(0x11d)]('&');else throw _0x10c7fd(0xd6);}if(this[_0x10c7fd(0xbd)]){let _0x3dc1b8=_0x33c44c[_0x10c7fd(0x116)][_0x10c7fd(0x116)]?_0x33c44c[_0x10c7fd(0x116)]['data']:_0x33c44c['data'];delete _0x33c44c[_0x10c7fd(0x116)],_0x33c44c['data']=_0x3dc1b8;}if(_0x437b8b&&['1','2'][_0x10c7fd(0x144)](_0x437b8b))switch(_0x437b8b){case'1':return _0x33c44c[_0x10c7fd(0x116)];break;case'2':return _0x33c44c;break;}return _0x33c44c[_0x10c7fd(0x116)];}else _0x3bb55d={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0x223806,'FTXUS-SUBACCOUNT':_0xf63785['subaccount']};}catch(_0x26c008){if(_0x10c7fd(0x161)===_0x10c7fd(0x106))_0x19a53a=_0x86b0a2+(_0x4c224d=='?'?'':'&'),_0x48cdc7=_0x176387+'end_time='+_0x4e9541[_0x10c7fd(0xdf)];else return _0x26c008;}}async[a5_0x221143(0xa2)](_0x4ab0f7){const _0xb9bc59=a5_0x221143;let _0x3942b0=this[_0xb9bc59(0x9c)](),_0x1d592f=_0xb9bc59(0x141),_0x5a605a=_0x3942b0['FTXUS-TS']+'GET/api/'+_0x1d592f;const _0x4fcd58=a5_0x1d009a[_0xb9bc59(0x14e)](_0xb9bc59(0xf1),this[_0xb9bc59(0x9d)])[_0xb9bc59(0xcf)](_0x5a605a)[_0xb9bc59(0x138)](_0xb9bc59(0xb8));return _0x3942b0[_0xb9bc59(0x11c)]=_0x4fcd58,await(await this[_0xb9bc59(0x109)](_0x3942b0,_0x1d592f,_0x4ab0f7||undefined))[_0xb9bc59(0x116)];}[a5_0x221143(0xf4)](_0x407d17){let _0x36a93f=_0x407d17;return _0x36a93f;}async[a5_0x221143(0xa5)](_0x2764d6,_0x217326){const _0x510b14=a5_0x221143;let _0x521355=this['createPostHeader'](),_0xce75bc=this[_0x510b14(0xf4)](_0x2764d6),_0x588c17=_0x510b14(0x141),_0x45af68=_0x521355[_0x510b14(0xb0)]+_0x510b14(0xdc)+_0x510b14(0x14a)+_0x588c17+JSON[_0x510b14(0xdd)](_0xce75bc);const _0x2f2d9c=a5_0x1d009a[_0x510b14(0x14e)](_0x510b14(0xf1),this['apiSecret'])[_0x510b14(0xcf)](_0x45af68)['digest']('hex');return _0x521355[_0x510b14(0x11c)]=_0x2f2d9c,await(await this[_0x510b14(0x11b)](_0x521355,_0xce75bc,_0x588c17,_0x217326||undefined))[_0x510b14(0x116)];}[a5_0x221143(0x157)](_0x41440b){let _0x5d348b=_0x41440b;return _0x5d348b;}async['changeSubaccountName'](_0x509a7e,_0x502e11){const _0x67f1fa=a5_0x221143;let _0x3970a9=this[_0x67f1fa(0xaa)](),_0x15f020=this[_0x67f1fa(0x157)](_0x509a7e),_0x5278e8=_0x67f1fa(0x14c),_0x92d4a3=_0x3970a9[_0x67f1fa(0xb0)]+_0x67f1fa(0xdc)+_0x67f1fa(0x14a)+_0x5278e8+JSON['stringify'](_0x15f020);const _0x5022a3=a5_0x1d009a[_0x67f1fa(0x14e)](_0x67f1fa(0xf1),this[_0x67f1fa(0x9d)])[_0x67f1fa(0xcf)](_0x92d4a3)['digest'](_0x67f1fa(0xb8));return _0x3970a9[_0x67f1fa(0x11c)]=_0x5022a3,await(await this[_0x67f1fa(0x11b)](_0x3970a9,_0x15f020,_0x5278e8,_0x502e11||undefined))[_0x67f1fa(0x116)];}[a5_0x221143(0xc7)](_0x470cbe){let _0x592dcb=_0x470cbe;return _0x592dcb;}async['deleteSubaccount'](_0x43b48b,_0x2dea88){const _0x23f813=a5_0x221143;let _0x10a5bc=this[_0x23f813(0xaa)](_0x43b48b),_0x713309=this[_0x23f813(0xc7)](_0x43b48b),_0x1f4a85=_0x23f813(0x141),_0x5775b8=_0x10a5bc[_0x23f813(0xb0)]+_0x23f813(0xbe)+_0x23f813(0x14a)+_0x1f4a85+JSON[_0x23f813(0xdd)](_0x713309);const _0x306baf=a5_0x1d009a[_0x23f813(0x14e)](_0x23f813(0xf1),this[_0x23f813(0x9d)])['update'](_0x5775b8)[_0x23f813(0x138)](_0x23f813(0xb8));return _0x10a5bc['FTXUS-SIGN']=_0x306baf,await this['deleteRequest'](_0x10a5bc,_0x713309,_0x1f4a85,_0x2dea88||undefined);}async[a5_0x221143(0xe9)](_0x400c89,_0x4bae68){const _0x2e5857=a5_0x221143;let _0x535e90=this[_0x2e5857(0x9c)](),_0x244092=_0x400c89[_0x2e5857(0x118)],_0x2f9b06=_0x2e5857(0x112)+_0x244092+_0x2e5857(0xa8),_0x1eb4bd=_0x535e90[_0x2e5857(0xb0)]+'GET/api/'+_0x2f9b06;const _0x1f7efe=a5_0x1d009a['Hmac'](_0x2e5857(0xf1),this[_0x2e5857(0x9d)])[_0x2e5857(0xcf)](_0x1eb4bd)[_0x2e5857(0x138)]('hex');return _0x535e90['FTXUS-SIGN']=_0x1f7efe,await this[_0x2e5857(0x109)](_0x535e90,_0x2f9b06,_0x4bae68||undefined);}async[a5_0x221143(0x108)](_0x21ddb5,_0x39a871){const _0xd5bf05=a5_0x221143;let _0x13a129=this[_0xd5bf05(0xaa)](),_0x31aff0=_0x21ddb5,_0x139fd3='subaccounts/transfer',_0x188c82=_0x13a129[_0xd5bf05(0xb0)]+'POST'+_0xd5bf05(0x14a)+_0x139fd3+JSON[_0xd5bf05(0xdd)](_0x31aff0);const _0xeb935e=a5_0x1d009a[_0xd5bf05(0x14e)]('sha256',this[_0xd5bf05(0x9d)])[_0xd5bf05(0xcf)](_0x188c82)['digest'](_0xd5bf05(0xb8));return _0x13a129['FTXUS-SIGN']=_0xeb935e,await this['executeOrder'](_0x13a129,_0x31aff0,_0x139fd3,_0x39a871||undefined);}async['getMarkets'](_0x48401d){const _0x393b04=a5_0x221143;let _0x4f7d63=_0x393b04(0x102),_0x55f487=this[_0x393b04(0xb1)]+_0x4f7d63;return await this['executeGetRequest']('',_0x55f487,_0x48401d||undefined);}async[a5_0x221143(0x13f)](_0x186426,_0x274729){const _0x5d1d8d=a5_0x221143;let _0x987367=_0x5d1d8d(0x11f),_0x44d7b0=this[_0x5d1d8d(0xb1)]+_0x987367+_0x186426;return await this[_0x5d1d8d(0x109)]('',_0x44d7b0,_0x274729||undefined);}async[a5_0x221143(0xd0)](_0x604f88,_0x4ab584){const _0x387a73=a5_0x221143;let _0x4ddf39='?';return _0x604f88['depth']==null?_0x387a73(0xae)==='vFAUT'?_0x4ddf39=this[_0x387a73(0xb1)]+'markets/'+_0x604f88[_0x387a73(0xf2)]+_0x387a73(0xac):_0x293241=this[_0x387a73(0xb1)]+_0x387a73(0x11f)+_0x2b5547[_0x387a73(0xf2)]+_0x387a73(0xcb)+_0x107e35['depth']:_0x387a73(0xa6)===_0x387a73(0xa6)?_0x4ddf39=this[_0x387a73(0xb1)]+_0x387a73(0x11f)+_0x604f88['market_name']+'/orderbook?depth='+_0x604f88[_0x387a73(0x164)]:_0x380225[_0x387a73(0x117)]={'target':this[_0x387a73(0xb1)],'uri':_0x2ffa3e['url'],'body':_0x3b15fb},await this[_0x387a73(0x109)]('',_0x4ddf39,_0x4ab584||undefined);}async[a5_0x221143(0xc8)](_0x35e4de,_0x5212ed){const _0x1ae712=a5_0x221143;let _0x304f70=this['url']+_0x1ae712(0x11f)+_0x35e4de[_0x1ae712(0xf2)]+_0x1ae712(0x104);if(_0x35e4de[_0x1ae712(0x135)]||_0x35e4de['end_time']){if(_0x1ae712(0xc5)!==_0x1ae712(0x126)){_0x304f70=_0x304f70+'?';if(_0x35e4de['start_time'])_0x304f70=_0x304f70+'start_time='+_0x35e4de[_0x1ae712(0x135)],_0x35e4de[_0x1ae712(0xdf)]&&(_0x1ae712(0xb5)!==_0x1ae712(0xb5)?_0x5afd84[_0x1ae712(0xb2)](_0x4a303e[_0x1ae712(0x116)][_0x1ae712(0xa1)][_0x4ec291]):_0x304f70=_0x304f70+'&'+_0x1ae712(0xab)+_0x35e4de['end_time']);else _0x35e4de[_0x1ae712(0xdf)]&&(_0x304f70=_0x304f70+_0x1ae712(0xab)+_0x35e4de['end_time']);}else _0x293c1a={'FTXUS-KEY':this[_0x1ae712(0x134)],'FTXUS-TS':_0x5012bc,'FTXUS-SUBACCOUNT':_0x1e63ba[_0x1ae712(0xfb)]};}return await this[_0x1ae712(0x109)]('',_0x304f70,_0x5212ed||undefined);}async[a5_0x221143(0xda)](_0x88f2e9,_0x452728){const _0x569122=a5_0x221143;let _0x26e625=this[_0x569122(0xb1)]+_0x569122(0x11f)+_0x88f2e9[_0x569122(0xf2)]+'/candles?resolution='+_0x88f2e9[_0x569122(0x13c)];if(_0x88f2e9[_0x569122(0x135)]||_0x88f2e9[_0x569122(0xdf)]){_0x26e625=_0x26e625+'&';if(_0x88f2e9[_0x569122(0x135)])_0x26e625=_0x26e625+_0x569122(0x14d)+_0x88f2e9['start_time'],_0x88f2e9[_0x569122(0xdf)]&&(_0x569122(0xfc)===_0x569122(0xc9)?_0x164889[_0x569122(0x12c)]=null:_0x26e625=_0x26e625+'&'+'end_time'+_0x88f2e9[_0x569122(0xdf)]);else _0x88f2e9[_0x569122(0xdf)]&&(_0x26e625=_0x26e625+_0x569122(0xab)+_0x88f2e9['end_time']);}return await this[_0x569122(0x109)]('',_0x26e625,_0x452728||undefined);}async[a5_0x221143(0xe3)](_0x5ca560,_0x5878d4){const _0x3bc222=a5_0x221143;let _0x22481e=this['createGetHeader'](_0x5ca560),_0x3f8155=_0x3bc222(0xee),_0x53fc15=_0x22481e[_0x3bc222(0xb0)]+_0x3bc222(0xaf)+_0x3f8155;const _0xfa9639=a5_0x1d009a[_0x3bc222(0x14e)](_0x3bc222(0xf1),this[_0x3bc222(0x9d)])[_0x3bc222(0xcf)](_0x53fc15)[_0x3bc222(0x138)](_0x3bc222(0xb8));return _0x22481e[_0x3bc222(0x11c)]=_0xfa9639,await this[_0x3bc222(0x109)](_0x22481e,_0x3f8155,_0x5878d4||undefined);}async[a5_0x221143(0xd4)](_0x35fbbb,_0xe9cae4){const _0x54ba79=a5_0x221143;return await this[_0x54ba79(0xca)](_0x35fbbb,_0xe9cae4||undefined);}async[a5_0x221143(0xca)](_0x533a6c,_0x1527ca){const _0x23c8ef=a5_0x221143;let _0x4ae405=this['createGetHeader'](_0x533a6c),_0x1aba69;if(_0x533a6c&&_0x533a6c[_0x23c8ef(0x131)]){_0x1aba69=_0x533a6c[_0x23c8ef(0x131)];if(!_0x1aba69['constructor'][_0x23c8ef(0x13d)]()[_0x23c8ef(0x124)](_0x23c8ef(0x9b))>0x1){if(_0x23c8ef(0xa9)!==_0x23c8ef(0x148))throw _0x23c8ef(0xeb);else throw _0x23c8ef(0x10e);}}let _0x172dae=_0x23c8ef(0xe6),_0xfb6844=_0x4ae405[_0x23c8ef(0xb0)]+_0x23c8ef(0xaf)+_0x172dae;const _0x195e5a=a5_0x1d009a['Hmac'](_0x23c8ef(0xf1),this['apiSecret'])[_0x23c8ef(0xcf)](_0xfb6844)[_0x23c8ef(0x138)]('hex');_0x4ae405['FTXUS-SIGN']=_0x195e5a;let _0x45d255=await this[_0x23c8ef(0x109)](_0x4ae405,_0x172dae,_0x1527ca||undefined),_0x38bafb=new Array();if(_0x1aba69){if('nDpSH'!==_0x23c8ef(0x120)){if(_0x45d255[_0x23c8ef(0x116)]&&_0x45d255['data'][_0x23c8ef(0xa1)])for(let _0x4aefb6=0x0;_0x4aefb6<_0x45d255[_0x23c8ef(0x116)][_0x23c8ef(0xa1)]['length'];_0x4aefb6++){let _0x59dba3=_0x45d255[_0x23c8ef(0x116)][_0x23c8ef(0xa1)][_0x4aefb6][_0x23c8ef(0x147)];_0x1aba69[_0x23c8ef(0x144)](_0x59dba3)&&_0x38bafb[_0x23c8ef(0xb2)](_0x45d255[_0x23c8ef(0x116)][_0x23c8ef(0xa1)][_0x4aefb6]);}}else _0x335914=_0x41e613+(_0x24a1e3=='?'?'':'&'),_0xe0ce3c=_0x562728+'orderId='+_0x3dd3ce[_0x23c8ef(0xb7)];}else _0x38bafb=_0x45d255[_0x23c8ef(0x116)];return _0x38bafb;}async[a5_0x221143(0x155)](_0x3a463d,_0x4857ee){const _0x580294=a5_0x221143;let _0x42fe96=this[_0x580294(0x9c)](_0x3a463d),_0x5f16ff='wallet/all_balances',_0x21f5fa=_0x42fe96[_0x580294(0xb0)]+_0x580294(0xaf)+_0x5f16ff;const _0x2dfbf9=a5_0x1d009a[_0x580294(0x14e)](_0x580294(0xf1),this[_0x580294(0x9d)])['update'](_0x21f5fa)[_0x580294(0x138)](_0x580294(0xb8));return _0x42fe96[_0x580294(0x11c)]=_0x2dfbf9,await this['executeGetRequest'](_0x42fe96,_0x5f16ff,_0x4857ee||undefined);}async[a5_0x221143(0x165)](_0x13420e,_0x49be29){const _0x352fe8=a5_0x221143;let _0x153aa8=this[_0x352fe8(0x9c)](),_0x14b7e0=_0x352fe8(0x13e);if(_0x13420e){if(_0x352fe8(0xb4)===_0x352fe8(0x95))return _0x595bfc[_0x352fe8(0x116)];else _0x14b7e0=_0x14b7e0+_0x352fe8(0xfa)+_0x13420e;}let _0x22c795=_0x153aa8[_0x352fe8(0xb0)]+_0x352fe8(0xaf)+_0x14b7e0;const _0x120a57=a5_0x1d009a[_0x352fe8(0x14e)](_0x352fe8(0xf1),this[_0x352fe8(0x9d)])[_0x352fe8(0xcf)](_0x22c795)[_0x352fe8(0x138)](_0x352fe8(0xb8));return _0x153aa8[_0x352fe8(0x11c)]=_0x120a57,await this['executeGetRequest'](_0x153aa8,_0x14b7e0,_0x49be29||undefined);}async[a5_0x221143(0x110)](_0x10645c,_0x894616){const _0x39467a=a5_0x221143;let _0x4549b6=this[_0x39467a(0x9c)](),_0x55fafc='orders/history',_0x53dac4=Object[_0x39467a(0xc3)](_0x10645c)['map'](_0x3a1b7d=>_0x3a1b7d['join']('='));_0x53dac4[_0x39467a(0x115)]>0x0&&(_0x55fafc=_0x55fafc+'?',_0x55fafc=_0x55fafc+_0x53dac4[_0x39467a(0x11d)]('&'));let _0x243e1e=_0x55fafc,_0x4cdfbd=_0x4549b6['FTXUS-TS']+_0x39467a(0xaf)+_0x55fafc;const _0x5cd6a3=a5_0x1d009a['Hmac']('sha256',this[_0x39467a(0x9d)])[_0x39467a(0xcf)](_0x4cdfbd)[_0x39467a(0x138)](_0x39467a(0xb8));return _0x4549b6[_0x39467a(0x11c)]=_0x5cd6a3,await this[_0x39467a(0x109)](_0x4549b6,_0x243e1e,_0x894616||undefined);}async['getOpenTriggerOrders'](_0x509ed2,_0x1897d3){const _0x5e8b72=a5_0x221143;_0x509ed2=_0x509ed2||{};let _0x2f1360=this['createGetHeader'](),_0xf61d5f=_0x5e8b72(0xb3),_0x3f38f3=Object[_0x5e8b72(0xc3)](_0x509ed2)[_0x5e8b72(0x163)](_0x2774fe=>_0x2774fe['join']('='));_0x3f38f3['length']>0x0&&(_0xf61d5f=_0xf61d5f+'?',_0xf61d5f=_0xf61d5f+_0x3f38f3[_0x5e8b72(0x11d)]('&'));let _0x16e9c8=_0xf61d5f,_0x4902e7=_0x2f1360[_0x5e8b72(0xb0)]+_0x5e8b72(0xaf)+_0x16e9c8;const _0x3a0702=a5_0x1d009a[_0x5e8b72(0x14e)]('sha256',this[_0x5e8b72(0x9d)])[_0x5e8b72(0xcf)](_0x4902e7)[_0x5e8b72(0x138)](_0x5e8b72(0xb8));return _0x2f1360['FTXUS-SIGN']=_0x3a0702,await this['executeGetRequest'](_0x2f1360,_0x16e9c8,_0x1897d3||undefined);}async[a5_0x221143(0x97)](_0x188aff,_0x1459a1){const _0x23896d=a5_0x221143;let _0x59cbf4=this['createGetHeader']();if(!_0x188aff||!_0x188aff[_0x23896d(0xb7)]){if('pjZsw'===_0x23896d(0xec)){let _0x3e7deb=_0x1e80f3;return _0x3e7deb;}else throw _0x23896d(0x10e);}let _0xf59dd0=_0x23896d(0x12e)+_0x188aff[_0x23896d(0xb7)]+_0x23896d(0x123),_0x2de306=_0xf59dd0,_0x16b631=_0x59cbf4[_0x23896d(0xb0)]+_0x23896d(0xaf)+_0x2de306;const _0x4206a7=a5_0x1d009a[_0x23896d(0x14e)](_0x23896d(0xf1),this[_0x23896d(0x9d)])[_0x23896d(0xcf)](_0x16b631)[_0x23896d(0x138)]('hex');return _0x59cbf4[_0x23896d(0x11c)]=_0x4206a7,await this['executeGetRequest'](_0x59cbf4,_0x2de306,_0x1459a1||undefined);}async[a5_0x221143(0x152)](_0x2dafd6,_0x4abb11){const _0x375085=a5_0x221143;let _0x46ff07=this[_0x375085(0x9c)](),_0x306dd7='?';_0x2dafd6=_0x2dafd6||{};_0x2dafd6[_0x375085(0x13a)]&&(_0x375085(0x15e)===_0x375085(0x15e)?_0x306dd7=_0x306dd7+_0x375085(0x96)+_0x2dafd6[_0x375085(0x13a)]:_0x342556={'FTXUS-KEY':this['apiKey'],'FTXUS-TS':_0x52d51c,'FTXUS-SUBACCOUNT':this[_0x375085(0xfb)]});_0x2dafd6[_0x375085(0x135)]&&(_0x375085(0x132)===_0x375085(0x114)?(_0x209545=_0x375ac0+(_0x354f21=='?'?'':'&'),_0x5069ed=_0x3907b9+'orderType='+_0x144c60[_0x375085(0xf7)]):(_0x306dd7=_0x306dd7+(_0x306dd7=='?'?'':'&'),_0x306dd7=_0x306dd7+_0x375085(0x14d)+_0x2dafd6[_0x375085(0x135)]));if(_0x2dafd6['end_time']){if(_0x375085(0x122)===_0x375085(0xf5))throw _0x375085(0x10e);else _0x306dd7=_0x306dd7+(_0x306dd7=='?'?'':'&'),_0x306dd7=_0x306dd7+_0x375085(0xab)+_0x2dafd6[_0x375085(0xdf)];}_0x2dafd6['side']&&(_0x375085(0x145)===_0x375085(0x145)?(_0x306dd7=_0x306dd7+(_0x306dd7=='?'?'':'&'),_0x306dd7=_0x306dd7+'side='+_0x2dafd6['side']):_0x5e1041={'FTXUS-KEY':this[_0x375085(0x134)],'FTXUS-TS':_0x5eb257});_0x2dafd6[_0x375085(0x146)]&&(_0x306dd7=_0x306dd7+(_0x306dd7=='?'?'':'&'),_0x306dd7=_0x306dd7+_0x375085(0x15b)+_0x2dafd6[_0x375085(0x146)]);_0x2dafd6[_0x375085(0xf7)]&&(_0x306dd7=_0x306dd7+(_0x306dd7=='?'?'':'&'),_0x306dd7=_0x306dd7+'orderType='+_0x2dafd6['orderType']);let _0x2e3959=_0x375085(0x15d)+(_0x306dd7=='?'?'':_0x306dd7),_0x2f5438=_0x46ff07[_0x375085(0xb0)]+_0x375085(0xaf)+_0x2e3959;const _0xaf9e71=a5_0x1d009a['Hmac']('sha256',this[_0x375085(0x9d)])['update'](_0x2f5438)[_0x375085(0x138)](_0x375085(0xb8));return _0x46ff07[_0x375085(0x11c)]=_0xaf9e71,await this[_0x375085(0x109)](_0x46ff07,_0x2e3959,_0x4abb11||undefined);}[a5_0x221143(0x150)](_0x428e89){const _0x3844b1=a5_0x221143;let _0x2d039e=_0x428e89;return _0x2d039e[_0x3844b1(0x146)]==_0x3844b1(0x13a)&&(_0x2d039e[_0x3844b1(0x12c)]=null),_0x2d039e;}async[a5_0x221143(0x14b)](_0x2c5d04,_0x14f4d8){const _0x2ced8a=a5_0x221143;let _0x295729=this[_0x2ced8a(0xaa)](_0x2c5d04),_0xc0a62a=this['createPlaceBody'](_0x2c5d04),_0x2ec2f8=_0x2ced8a(0x13e),_0x11e27e=_0x295729[_0x2ced8a(0xb0)]+'POST'+_0x2ced8a(0x14a)+_0x2ec2f8+JSON[_0x2ced8a(0xdd)](_0xc0a62a);const _0x57eaa8=a5_0x1d009a[_0x2ced8a(0x14e)]('sha256',this[_0x2ced8a(0x9d)])[_0x2ced8a(0xcf)](_0x11e27e)[_0x2ced8a(0x138)](_0x2ced8a(0xb8));_0x295729[_0x2ced8a(0x11c)]=_0x57eaa8,await this[_0x2ced8a(0x11b)](_0x295729,_0xc0a62a,_0x2ec2f8,_0x14f4d8||undefined);}[a5_0x221143(0xe0)](_0x511565){let _0x1dfa4e=_0x511565;return _0x1dfa4e;}async['triggerOrder'](_0x565b69,_0x11812e){const _0x157717=a5_0x221143;let _0x140451=this[_0x157717(0xaa)](_0x565b69),_0x27dd26=this[_0x157717(0xe0)](_0x565b69),_0x240157=_0x157717(0xb3),_0x1b0357=_0x140451['FTXUS-TS']+_0x157717(0xdc)+_0x157717(0x14a)+_0x240157+JSON[_0x157717(0xdd)](_0x27dd26);const _0x38d841=a5_0x1d009a['Hmac'](_0x157717(0xf1),this[_0x157717(0x9d)])[_0x157717(0xcf)](_0x1b0357)[_0x157717(0x138)](_0x157717(0xb8));_0x140451[_0x157717(0x11c)]=_0x38d841,await this[_0x157717(0x11b)](_0x140451,_0x27dd26,_0x240157,_0x11812e||undefined);}async[a5_0x221143(0x125)](_0x4d3fa0,_0xeed5aa){const _0x5e46fb=a5_0x221143;if(!_0x4d3fa0||!_0x4d3fa0[_0x5e46fb(0xb7)])throw _0x5e46fb(0x10e);let _0x4c4c67=this[_0x5e46fb(0xaa)](_0x4d3fa0),_0x5de98a=_0x5e46fb(0x12e)+_0x4d3fa0[_0x5e46fb(0xb7)],_0x549d03=_0x4c4c67[_0x5e46fb(0xb0)]+'DELETE'+_0x5e46fb(0x14a)+_0x5de98a+(_0x4d3fa0?JSON[_0x5e46fb(0xdd)](_0x4d3fa0):'');const _0x295a02=a5_0x1d009a[_0x5e46fb(0x14e)](_0x5e46fb(0xf1),this['apiSecret'])[_0x5e46fb(0xcf)](_0x549d03)[_0x5e46fb(0x138)](_0x5e46fb(0xb8));return _0x4c4c67[_0x5e46fb(0x11c)]=_0x295a02,await this[_0x5e46fb(0x143)](_0x4c4c67,_0x4d3fa0,_0x5de98a,_0xeed5aa||undefined);}async['cancelAllOrders'](_0x5a7483,_0x5b17f4){const _0x5f165b=a5_0x221143;let _0x20f53b=this[_0x5f165b(0xaa)](_0x5a7483),_0x2b45ed=_0x5f165b(0x13e),_0x479852=_0x20f53b['FTXUS-TS']+'DELETE'+_0x5f165b(0x14a)+_0x2b45ed+(_0x5a7483?JSON['stringify'](_0x5a7483):'');const _0x54d795=a5_0x1d009a[_0x5f165b(0x14e)](_0x5f165b(0xf1),this['apiSecret'])[_0x5f165b(0xcf)](_0x479852)['digest']('hex');return _0x20f53b[_0x5f165b(0x11c)]=_0x54d795,await this[_0x5f165b(0x143)](_0x20f53b,_0x5a7483,_0x2b45ed,_0x5b17f4||undefined);}async['modifyOrder'](_0x41693d,_0x2bfc14){const _0x328165=a5_0x221143;if(!_0x41693d||!_0x41693d[_0x328165(0xb7)]){if(_0x328165(0x15f)!==_0x328165(0x12d))throw _0x328165(0x10e);else _0xffadbf[_0x328165(0x117)][_0x328165(0x10f)]=this[_0x328165(0xb1)],_0x1c8868[_0x328165(0xea)]='http://'+this[_0x328165(0x10b)]+':'+this[_0x328165(0x101)];}if(!_0x41693d[_0x328165(0xd8)]&&!_0x41693d[_0x328165(0x12c)]){if(_0x328165(0x10d)==='pKfoo')throw _0x328165(0x113);else this[_0x328165(0xbd)]=!![],this[_0x328165(0xe4)]=_0x2c0c25[_0x328165(0xe4)],_0x443c0c[_0x328165(0x101)]?this[_0x328165(0x101)]=_0x559f80['proxyPort']:this[_0x328165(0x101)]=0xbb8;}let _0x1e8278=_0x41693d,_0x299ddb=this[_0x328165(0xaa)](_0x41693d),_0x3b1d2e=_0x328165(0xe8)+_0x41693d[_0x328165(0xb7)]+_0x328165(0x130);delete _0x41693d[_0x328165(0xb7)];let _0x47d3be=_0x299ddb[_0x328165(0xb0)]+_0x328165(0xdc)+_0x328165(0x14a)+_0x3b1d2e+JSON[_0x328165(0xdd)](_0x1e8278);const _0x447622=a5_0x1d009a[_0x328165(0x14e)](_0x328165(0xf1),this[_0x328165(0x9d)])[_0x328165(0xcf)](_0x47d3be)['digest'](_0x328165(0xb8));return _0x299ddb[_0x328165(0x11c)]=_0x447622,await this[_0x328165(0x11b)](_0x299ddb,_0x1e8278,_0x3b1d2e,_0x2bfc14||undefined);}async['modifyOrderByClientId'](_0x59d830,_0x490516){const _0x1ffb00=a5_0x221143;if(!_0x59d830||!_0x59d830[_0x1ffb00(0xd9)]){if(_0x1ffb00(0xd7)===_0x1ffb00(0xd7))throw _0x1ffb00(0x159);else _0x4494d3=_0x249ea0[_0x1ffb00(0x116)];}if(!_0x59d830[_0x1ffb00(0xd8)]&&!_0x59d830[_0x1ffb00(0x12c)])throw _0x1ffb00(0x113);let _0x144a16=_0x59d830,_0x4da17c=this[_0x1ffb00(0xaa)](_0x144a16),_0x3607ed='orders/by_client_id/'+_0x144a16[_0x1ffb00(0xd9)]+_0x1ffb00(0x130);delete _0x144a16['clientId'];let _0x19b60f=_0x4da17c[_0x1ffb00(0xb0)]+_0x1ffb00(0xdc)+_0x1ffb00(0x14a)+_0x3607ed+JSON['stringify'](_0x144a16);const _0x44532a=a5_0x1d009a[_0x1ffb00(0x14e)](_0x1ffb00(0xf1),this['apiSecret'])[_0x1ffb00(0xcf)](_0x19b60f)[_0x1ffb00(0x138)](_0x1ffb00(0xb8));return _0x4da17c['FTXUS-SIGN']=_0x44532a,await this[_0x1ffb00(0x11b)](_0x4da17c,_0x144a16,_0x3607ed,_0x490516||undefined);}[a5_0x221143(0x11a)](_0x1f829d){const _0x1ce665=a5_0x221143;let _0x151842=_0x1f829d;return delete _0x1f829d[_0x1ce665(0x100)],_0x151842;}async[a5_0x221143(0x121)](_0x3f216b,_0xef847b){const _0x3d5f17=a5_0x221143;let _0x805720=_0x3f216b,_0xbc0aac=_0x805720[_0x3d5f17(0xb7)];delete _0x805720[_0x3d5f17(0xb7)];let _0x563e05=this[_0x3d5f17(0xaa)](_0x805720),_0x47931a='conditional_orders/'+_0xbc0aac+_0x3d5f17(0x130),_0xfca011=_0x563e05[_0x3d5f17(0xb0)]+_0x3d5f17(0xdc)+'/api/'+_0x47931a+JSON[_0x3d5f17(0xdd)](_0x805720);const _0x34f1d1=a5_0x1d009a[_0x3d5f17(0x14e)](_0x3d5f17(0xf1),this['apiSecret'])['update'](_0xfca011)[_0x3d5f17(0x138)](_0x3d5f17(0xb8));return _0x563e05[_0x3d5f17(0x11c)]=_0x34f1d1,await this[_0x3d5f17(0x11b)](_0x563e05,_0x805720,_0x47931a,_0xef847b||undefined);}async[a5_0x221143(0x133)](_0x413e59,_0x1966d7){const _0x26401b=a5_0x221143;let _0x55463e=this[_0x26401b(0x9c)]();if(!_0x413e59||!_0x413e59[_0x26401b(0xb7)])throw _0x26401b(0x10e);let _0x4d1166=_0x26401b(0xe8)+_0x413e59[_0x26401b(0xb7)],_0x7c41d5=_0x55463e['FTXUS-TS']+_0x26401b(0xaf)+_0x4d1166;const _0x4e7470=a5_0x1d009a[_0x26401b(0x14e)](_0x26401b(0xf1),this['apiSecret'])[_0x26401b(0xcf)](_0x7c41d5)[_0x26401b(0x138)](_0x26401b(0xb8));return _0x55463e['FTXUS-SIGN']=_0x4e7470,await this['executeGetRequest'](_0x55463e,_0x4d1166,_0x1966d7||undefined);}async['getOrderStatusByClientId'](_0x216f21,_0x59791a){const _0x4d0a77=a5_0x221143;if(!_0x216f21||!_0x216f21['clientId'])throw'requires\x20clientId';let _0x2c530c=this[_0x4d0a77(0x9c)](),_0x1dcb14='orders/by_client_id/'+_0x216f21['clientId'],_0xe751f1=_0x2c530c[_0x4d0a77(0xb0)]+_0x4d0a77(0xaf)+_0x1dcb14;const _0x211e3d=a5_0x1d009a['Hmac']('sha256',this[_0x4d0a77(0x9d)])[_0x4d0a77(0xcf)](_0xe751f1)[_0x4d0a77(0x138)](_0x4d0a77(0xb8));return _0x2c530c[_0x4d0a77(0x11c)]=_0x211e3d,await this[_0x4d0a77(0x109)](_0x2c530c,_0x1dcb14,_0x59791a||undefined);}async[a5_0x221143(0xe7)](_0x475c14,_0x5c1042){const _0x247e02=a5_0x221143;if(!_0x475c14||!_0x475c14['orderId'])throw'requires\x20orderId';let _0x45b564=this[_0x247e02(0xaa)](_0x475c14),_0x1860de='orders/'+_0x475c14[_0x247e02(0xb7)],_0x882efd=_0x45b564[_0x247e02(0xb0)]+_0x247e02(0xbe)+'/api/'+_0x1860de+(_0x475c14?JSON[_0x247e02(0xdd)](_0x475c14):'');const _0x40fdbf=a5_0x1d009a[_0x247e02(0x14e)](_0x247e02(0xf1),this[_0x247e02(0x9d)])['update'](_0x882efd)['digest'](_0x247e02(0xb8));return _0x45b564['FTXUS-SIGN']=_0x40fdbf,await this['deleteRequest'](_0x45b564,_0x475c14,_0x1860de,_0x5c1042||undefined);}async[a5_0x221143(0x142)](_0xbe8a9a,_0x50d966){const _0xaebaaa=a5_0x221143;if(!_0xbe8a9a||!_0xbe8a9a[_0xaebaaa(0xd9)])throw'requires\x20clientId';let _0x442533=this[_0xaebaaa(0xaa)](_0xbe8a9a),_0x372af3=_0xaebaaa(0x107)+_0xbe8a9a[_0xaebaaa(0xd9)],_0x165ae4=_0x442533[_0xaebaaa(0xb0)]+'DELETE'+_0xaebaaa(0x14a)+_0x372af3+(_0xbe8a9a?JSON[_0xaebaaa(0xdd)](_0xbe8a9a):'');const _0x2dfc3a=a5_0x1d009a[_0xaebaaa(0x14e)]('sha256',this[_0xaebaaa(0x9d)])[_0xaebaaa(0xcf)](_0x165ae4)['digest'](_0xaebaaa(0xb8));return _0x442533[_0xaebaaa(0x11c)]=_0x2dfc3a,await this[_0xaebaaa(0x143)](_0x442533,_0xbe8a9a,_0x372af3,_0x50d966||undefined);}async['getFills'](_0x25c66b,_0x54ccaf){const _0x59e98c=a5_0x221143;let _0xfb7544=this[_0x59e98c(0x9c)](),_0x258386='?';_0x25c66b[_0x59e98c(0x13a)]&&(_0x258386=_0x258386+'market='+_0x25c66b[_0x59e98c(0x13a)]);_0x25c66b[_0x59e98c(0x135)]&&(_0x59e98c(0xd2)===_0x59e98c(0x137)?_0x5480cd=_0x2819be+_0x59e98c(0x96)+_0x1bd483[_0x59e98c(0x13a)]:(_0x258386=_0x258386+(_0x258386=='?'?'':'&'),_0x258386=_0x258386+_0x59e98c(0x14d)+_0x25c66b['start_time']));_0x25c66b[_0x59e98c(0xdf)]&&(_0x258386=_0x258386+(_0x258386=='?'?'':'&'),_0x258386=_0x258386+'end_time='+_0x25c66b['end_time']);_0x25c66b[_0x59e98c(0x98)]&&(_0x258386=_0x258386+(_0x258386=='?'?'':'&'),_0x258386=_0x258386+'order='+_0x25c66b[_0x59e98c(0x98)]);if(_0x25c66b[_0x59e98c(0xb7)]){if(_0x59e98c(0x139)!=='qbuPd')_0x258386=_0x258386+(_0x258386=='?'?'':'&'),_0x258386=_0x258386+_0x59e98c(0x12b)+_0x25c66b['orderId'];else return _0x1c4c77;}let _0x902b3e=_0x59e98c(0xf6)+(_0x258386=='?'?'':_0x258386),_0x3a127c=_0xfb7544[_0x59e98c(0xb0)]+_0x59e98c(0xaf)+_0x902b3e;const _0xbbf427=a5_0x1d009a[_0x59e98c(0x14e)](_0x59e98c(0xf1),this[_0x59e98c(0x9d)])[_0x59e98c(0xcf)](_0x3a127c)[_0x59e98c(0x138)](_0x59e98c(0xb8));return _0xfb7544[_0x59e98c(0x11c)]=_0xbbf427,await this['executeGetRequest'](_0xfb7544,_0x902b3e,_0x54ccaf||undefined);}}function a5_0x1100(_0xb52437,_0x1b9540){const _0x439ae1=a5_0x439a();return a5_0x1100=function(_0x1100f7,_0x1e7ae8){_0x1100f7=_0x1100f7-0x95;let _0xcd0f7c=_0x439ae1[_0x1100f7];return _0xcd0f7c;},a5_0x1100(_0xb52437,_0x1b9540);}function a5_0x439a(){const _0xa5d0a3=['uri','qlaRK','Array','createGetHeader','apiSecret','JhzAX','tmtdB','OtFKN','result','getAllSubaccounts','VzYZA','plJGI','createSubaccount','KqZTp','CWqfR','/balances','uSZkx','createPostHeader','end_time=','/orderbook','now','vFAUT','GET/api/','FTXUS-TS','url','push','conditional_orders','UNKlU','WnBuV','authenticate','orderId','hex','decrypt','exchangeid','amhle','lyQBz2wseWT6vT7XDyp9DQ==','useProxy','DELETE','VIKHg','3275100XiLfwX','body','Base64','entries','side=','AFOVs','aPWBy','deleteSubaccountData','getTrades','sEuzh','getBalances','/orderbook?depth=','enc','20LUxarr','JLJyT','update','getOrderbook','sOXkZ','eKWjJ','http://','getPositions','Utf8','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','mejIT','size','clientId','getHistoricalPrices','Sosrv','POST','stringify','https://ftx.us/api/','end_time','createTriggerBody','mDGMq','exchange','getCoins','proxy','side','wallet/balances','cancelOrder','orders/','getSubaccountBalances','baseURL','parameter\x20must\x20be\x20an\x20array\x20of\x20tokens','JKQty','EDzQU','wallet/coins','ROvIR','tJxSM','sha256','market_name','11914173oNluoW','createSubaccountBody','zzOBu','fills','orderType','key','1332800yGOqbp','?market=','subaccount','FyWlz','/proxy/delete','LpmIZ','ftxus','order_id','proxyPort','markets','520zwQZAW','/trades','getMarkets','ZiGpK','orders/by_client_id/','transferBetweenSubaccounts','executeGetRequest','parse','balancer','fKykt','pKfoo','requires\x20orderId','baseUrl','getOrderHistory','target','subaccounts/','requires\x20price\x20or\x20size\x20or\x20both','TVpmY','length','data','headers','nickname','dhsyTW5!ysh8IuysQKcG45','modifyTriggerOrderBody','executeOrder','FTXUS-SIGN','join','1ugPEFk','markets/','uZHaj','modifyTriggerOrder','FhUjj','/triggers','indexOf','cancelOpenTriggerOrder','NZtfI','yaQJN','xabiv','sockets','publicApis','orderId=','price','hDgiB','conditional_orders/','QczhV','/modify','tokens','fNaSo','getOrderStatus','apiKey','start_time','llnHp','GTpZx','digest','BrrHF','market','36124RMtPXb','resolution','toString','orders','getMarket','1882974orkMDT','subaccounts','cancelOrderByClientId','deleteRequest','includes','Grpli','type','coin','DWeOM','exchangename','/api/','placeOrder','subaccounts/update_name','start_time=','Hmac','EfeNI','createPlaceBody','name','getTriggerOrderHistory','secret','AES','getAllBalances','2704592mCyFlQ','changeSubaccountNameBody','/proxy/get','requires\x20clientId','isMain','type=','xedGX','conditional_orders/history','PEnGF','QWKkI','mDKWi','tQRFg','XeiZX','map','depth','getOpenOrders','eDUmf','QuhXY','1588434lUDzvy','JYOWu','market=','getTriggerOrderTriggers','order'];a5_0x439a=function(){return _0xa5d0a3;};return a5_0x439a();}

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

const a6_0x40b7ef=a6_0x5c4d;function a6_0x5c4d(_0x3a8851,_0x2ff472){const _0x7ac6f4=a6_0x7ac6();return a6_0x5c4d=function(_0x5c4ddc,_0x519a78){_0x5c4ddc=_0x5c4ddc-0xa1;let _0x394536=_0x7ac6f4[_0x5c4ddc];return _0x394536;},a6_0x5c4d(_0x3a8851,_0x2ff472);}(function(_0x1a5efa,_0x955dd1){const _0xeb2b84=a6_0x5c4d,_0x1092f1=_0x1a5efa();while(!![]){try{const _0x3e4275=-parseInt(_0xeb2b84(0xa2))/0x1*(parseInt(_0xeb2b84(0xaa))/0x2)+-parseInt(_0xeb2b84(0xd3))/0x3+parseInt(_0xeb2b84(0xca))/0x4*(parseInt(_0xeb2b84(0xb4))/0x5)+-parseInt(_0xeb2b84(0xda))/0x6+parseInt(_0xeb2b84(0xd5))/0x7*(parseInt(_0xeb2b84(0xd4))/0x8)+-parseInt(_0xeb2b84(0xa3))/0x9*(parseInt(_0xeb2b84(0xad))/0xa)+parseInt(_0xeb2b84(0xb9))/0xb;if(_0x3e4275===_0x955dd1)break;else _0x1092f1['push'](_0x1092f1['shift']());}catch(_0x53d3fe){_0x1092f1['push'](_0x1092f1['shift']());}}}(a6_0x7ac6,0xc4d2d));import a6_0x1b4f8f from'axios';import a6_0x100914 from'dateformat';import a6_0x5487e2 from'crypto-js';function a6_0x7ac6(){const _0x3b5a85=['push','baseUrl','decrypt','1682832MlmtBI','length','HmacSHA256','substring','enc','255709XMcmQB','53919wUZxiE','apiSecret','getAccountInfo','AES','label','post','secret','4hiSVfT','getServerTime','digest','2550hLkwac','exchange','sXuop','sort','forEach','/api/v1/timestamp','authenticate','45dfFQpL','key','exchangeid','GET','executeGetRequest','26779984bjhPWD','publicApis','toString','mGNyK','getWalletBalance','object','Base64','exchangename','assembleRequest','parse','subaccount','sha256','url','XPXOA','cRsfb','/v1/order/orders','Utf8','119924IQWArV','/v1/account/accounts','stringify','apiKey','keys','cTgmg','UTC:yyyy-mm-dd\x27T\x27HH:MM:ss','dec','name','2095893DdphIR','784DxKQZW','80003nmEPnF','Signature='];a6_0x7ac6=function(){return _0x3b5a85;};return a6_0x7ac6();}export class Huobi{[a6_0x40b7ef(0xba)]=new Array();constructor(_0x2725f1){const _0x11845a=a6_0x40b7ef;this[_0x11845a(0xc5)]='https://api.huobi.pro',this[_0x11845a(0xb3)]=_0x2725f1[_0x11845a(0xb3)]==undefined?!![]:_0x2725f1['authenticate'],this['baseUrl']='api.huobi.pro',this[_0x11845a(0xd2)]=_0x2725f1['exchange'][_0x11845a(0xc0)]==undefined?'huobi':_0x2725f1[_0x11845a(0xae)][_0x11845a(0xc0)],this[_0x11845a(0xb6)]=_0x2725f1[_0x11845a(0xae)]['id'],this[_0x11845a(0xcd)]=_0x2725f1[_0x11845a(0xb5)]==undefined?'':_0x2725f1[_0x11845a(0xb5)],this[_0x11845a(0xa4)]=_0x2725f1[_0x11845a(0xa9)]==undefined?'':_0x2725f1[_0x11845a(0xa9)],this[_0x11845a(0xc3)]=_0x2725f1[_0x11845a(0xc3)]==undefined?'main':_0x2725f1[_0x11845a(0xc3)],this[_0x11845a(0xa7)]=_0x2725f1[_0x11845a(0xa7)],this['publicApis'][_0x11845a(0xd7)](_0x11845a(0xab));}[a6_0x40b7ef(0xd1)]=_0x2a88e1=>{const _0x30b1e4=a6_0x40b7ef;if(_0x2a88e1==null){if(_0x30b1e4(0xcf)!==_0x30b1e4(0xcf))_0x50d436+=_0x2f6e2d+'='+_0x1139af[_0x31bc1b]+'&';else return undefined;}const _0x38379e=a6_0x5487e2['enc'][_0x30b1e4(0xbf)]['parse'](envkeys['ky']),_0xd1ea08=a6_0x5487e2[_0x30b1e4(0xa1)][_0x30b1e4(0xbf)][_0x30b1e4(0xc2)](envkeys['i']);return a6_0x5487e2[_0x30b1e4(0xa6)][_0x30b1e4(0xd9)](_0x2a88e1,_0x38379e,{'iv':_0xd1ea08})[_0x30b1e4(0xbb)](a6_0x5487e2[_0x30b1e4(0xa1)][_0x30b1e4(0xc9)]);};async['executeOrder'](_0x1b73cb,_0x384b94,_0x5f3879){const _0x3e9851=a6_0x40b7ef;let _0x3d6484=this[_0x3e9851(0xc5)]+_0x5f3879;const _0x3f8683=await a6_0x1b4f8f[_0x3e9851(0xa8)](_0x3d6484,_0x384b94,{'headers':_0x1b73cb});return _0x3f8683;}async['executeGetRequest'](_0x20ad84){const _0x215783=a6_0x40b7ef;let _0x5e904b={'baseURL':this[_0x215783(0xc5)],'url':_0x20ad84,'method':_0x215783(0xb7)};const _0x1dd04e=await a6_0x1b4f8f(_0x5e904b);return _0x1dd04e;}async[a6_0x40b7ef(0xc1)](_0x52cabe,_0xbaf3dd,_0x32f03b){const _0x563966=a6_0x40b7ef;let _0x1f8a8a=await this[_0x563966(0xab)](),_0x5390c9=encodeURIComponent(a6_0x100914(new Date(_0x1f8a8a['data']['ts']),_0x563966(0xd0))),_0xcbe87e={'AccessKeyId':this[_0x563966(0xcd)],'SignatureMethod':'HmacSHA256','SignatureVersion':'2','Timestamp':_0x5390c9};_0x32f03b&&typeof _0x32f03b===_0x563966(0xbe)&&(_0x563966(0xbc)!==_0x563966(0xc7)?Object['keys'](_0x32f03b)[_0x563966(0xb1)](function(_0x5c09fe){const _0x162a7a=_0x563966;if('wKhiC'===_0x162a7a(0xaf)){if(_0x5a2802==null)return _0x39ab06;const _0x423393=_0x300642[_0x162a7a(0xa1)][_0x162a7a(0xbf)][_0x162a7a(0xc2)](_0x1bc51e['ky']),_0x5cfdcd=_0x47f3de[_0x162a7a(0xa1)]['Base64'][_0x162a7a(0xc2)](_0x4508b7['i']);return _0x3e5804[_0x162a7a(0xa6)][_0x162a7a(0xd9)](_0x2eab65,_0x423393,{'iv':_0x5cfdcd})[_0x162a7a(0xbb)](_0x3ab07d[_0x162a7a(0xa1)][_0x162a7a(0xc9)]);}else _0xcbe87e[_0x5c09fe]=_0x32f03b[_0x5c09fe];}):_0x2eaae6[_0x563966(0xce)](_0x72cd36)['forEach'](function(_0x14e9aa){_0x96535e[_0x14e9aa]=_0xbc2e2f[_0x14e9aa];}));let _0x489b0e=Object[_0x563966(0xce)](_0xcbe87e)['sort'](),_0x374b1d='\x0a',_0x208fa4=_0xbaf3dd+_0x374b1d+this[_0x563966(0xd8)]+_0x374b1d+_0x52cabe+_0x374b1d;_0x489b0e[_0x563966(0xb1)](_0xe07333=>{const _0x2a3210=_0x563966;_0x208fa4=_0x208fa4+(_0x208fa4[_0x208fa4[_0x2a3210(0xdb)]-0x1]==_0x374b1d?'':'&')+_0xe07333+'='+_0xcbe87e[_0xe07333];});const _0x3c43cc=a6_0x5487e2[_0x563966(0xdc)](_0x208fa4,this[_0x563966(0xa4)]),_0xdc0c38=a6_0x5487e2['enc']['Base64'][_0x563966(0xcc)](_0x3c43cc);let _0x52493b=_0x52cabe,_0x59aa40='?';return _0x489b0e[_0x563966(0xb1)](_0x1b896f=>{const _0x3c390d=_0x563966;'TTcUq'!==_0x3c390d(0xc6)?_0x59aa40=_0x59aa40+(_0x59aa40[_0x59aa40[_0x3c390d(0xdb)]-0x1]=='?'?'':'&')+_0x1b896f+'='+_0xcbe87e[_0x1b896f]:_0x415646=_0x3b8960+(_0x3b358e[_0x35799f['length']-0x1]=='?'?'':'&')+_0x5af8e7+'='+_0x35ac46[_0x3501b0];}),_0x59aa40=_0x59aa40+'&'+_0x563966(0xd6)+encodeURIComponent(_0xdc0c38),_0x52493b=_0x52493b+_0x59aa40,_0x52493b;}async[a6_0x40b7ef(0xa5)](){const _0xce0a9b=a6_0x40b7ef;let _0xb29f63=_0xce0a9b(0xcb),_0x24319c='GET',_0x3c6582=await this[_0xce0a9b(0xc1)](_0xb29f63,_0x24319c,undefined),_0x1b237d=await this[_0xce0a9b(0xb8)](_0x3c6582);return _0x1b237d;}async[a6_0x40b7ef(0xbd)](_0x4c4598){const _0x148308=a6_0x40b7ef;let _0x4e44d9=_0x148308(0xc8),_0xbac58f='GET',_0x230010=this['assembleRequest'](_0x4e44d9,_0xbac58f,_0x4c4598);return _0x230010;}['getSignature'](_0x103275,_0x18c066){const _0x409446=a6_0x40b7ef;var _0x3b3aba='';return Object[_0x409446(0xce)](_0x103275)[_0x409446(0xb0)]()[_0x409446(0xb1)](function(_0x26f30c){_0x3b3aba+=_0x26f30c+'='+_0x103275[_0x26f30c]+'&';}),_0x3b3aba=_0x3b3aba[_0x409446(0xdd)](0x0,_0x3b3aba[_0x409446(0xdb)]-0x1),crypto['createHmac'](_0x409446(0xc4),_0x18c066)['update'](_0x3b3aba)[_0x409446(0xac)]('hex');}async['getServerTime'](){const _0x428010=a6_0x40b7ef;let _0xa5fdb=_0x428010(0xb2),_0x180a72={'baseURL':'https://api.hbdm.com','url':_0xa5fdb,'method':_0x428010(0xb7)};const _0x3a9794=await a6_0x1b4f8f(_0x180a72);return _0x3a9794;}}
const a6_0x22d575=a6_0x1b72;(function(_0x6f8838,_0xb71c88){const _0x44e268=a6_0x1b72,_0x11b168=_0x6f8838();while(!![]){try{const _0x4919ad=-parseInt(_0x44e268(0xd8))/0x1+parseInt(_0x44e268(0xe1))/0x2*(parseInt(_0x44e268(0xb5))/0x3)+-parseInt(_0x44e268(0xdc))/0x4+parseInt(_0x44e268(0xb7))/0x5+-parseInt(_0x44e268(0xc7))/0x6+parseInt(_0x44e268(0xcd))/0x7*(parseInt(_0x44e268(0xd7))/0x8)+-parseInt(_0x44e268(0xe0))/0x9*(-parseInt(_0x44e268(0xab))/0xa);if(_0x4919ad===_0xb71c88)break;else _0x11b168['push'](_0x11b168['shift']());}catch(_0x2b1078){_0x11b168['push'](_0x11b168['shift']());}}}(a6_0x53ba,0x237af));import a6_0x18026d from'axios';function a6_0x1b72(_0x2d2ae5,_0xb588f2){const _0x53baf7=a6_0x53ba();return a6_0x1b72=function(_0x1b726e,_0x39388f){_0x1b726e=_0x1b726e-0xa9;let _0x2a07e6=_0x53baf7[_0x1b726e];return _0x2a07e6;},a6_0x1b72(_0x2d2ae5,_0xb588f2);}import a6_0x3460ee from'dateformat';function a6_0x53ba(){const _0x50c899=['380044JgVjLl','update','sha256','apiKey','268614FEYZLo','2zsgAZb','post','api.huobi.pro','forEach','substring','decrypt','https://api.huobi.pro','subaccount','executeGetRequest','30BtcsPy','toString','GET','nhMAr','sort','getWalletBalance','keys','oLHTT','key','hex','847272BPvHYZ','/v1/account/accounts','346765VtjfaN','url','/api/v1/timestamp','exchangeid','xesPu','stringify','parse','push','Utf8','main','createHmac','HmacSHA256','secret','name','getSignature','Signature=','1305708tDiHWD','apiSecret','authenticate','UTC:yyyy-mm-dd\x27T\x27HH:MM:ss','/v1/order/orders','getAccountInfo','23401xXbdAV','enc','data','publicApis','digest','length','AES','https://api.hbdm.com','exchange','getServerTime','296raaTtp','107050PIkcpL','assembleRequest','Base64','baseUrl'];a6_0x53ba=function(){return _0x50c899;};return a6_0x53ba();}import a6_0x594315 from'crypto-js';export class Huobi{[a6_0x22d575(0xd0)]=new Array();constructor(_0x5e6bda){const _0x12d20d=a6_0x22d575;this[_0x12d20d(0xb8)]=_0x12d20d(0xe7),this[_0x12d20d(0xc9)]=_0x5e6bda[_0x12d20d(0xc9)]==undefined?!![]:_0x5e6bda['authenticate'],this[_0x12d20d(0xdb)]=_0x12d20d(0xe3),this[_0x12d20d(0xc4)]=_0x5e6bda[_0x12d20d(0xd5)]['exchangename']==undefined?'huobi':_0x5e6bda['exchange']['exchangename'],this[_0x12d20d(0xba)]=_0x5e6bda[_0x12d20d(0xd5)]['id'],this[_0x12d20d(0xdf)]=_0x5e6bda[_0x12d20d(0xb3)]==undefined?'':_0x5e6bda[_0x12d20d(0xb3)],this[_0x12d20d(0xc8)]=_0x5e6bda[_0x12d20d(0xc3)]==undefined?'':_0x5e6bda['secret'],this['subaccount']=_0x5e6bda[_0x12d20d(0xa9)]==undefined?_0x12d20d(0xc0):_0x5e6bda[_0x12d20d(0xa9)],this['label']=_0x5e6bda['label'],this[_0x12d20d(0xd0)][_0x12d20d(0xbe)](_0x12d20d(0xd6));}['dec']=_0x3429d5=>{const _0x1f3e57=a6_0x22d575;if(_0x3429d5==null){if('nhMAr'===_0x1f3e57(0xae))return undefined;else{if(_0xa4b5c==null)return _0x508b30;const _0x16fff8=_0x3be377[_0x1f3e57(0xce)]['Base64'][_0x1f3e57(0xbd)](_0x387e4a['ky']),_0x2e3066=_0x34846a['enc'][_0x1f3e57(0xda)][_0x1f3e57(0xbd)](_0x17b01e['i']);return _0x56968c[_0x1f3e57(0xd3)]['decrypt'](_0x3813bc,_0x16fff8,{'iv':_0x2e3066})[_0x1f3e57(0xac)](_0x4de6e3['enc'][_0x1f3e57(0xbf)]);}}const _0x12204f=a6_0x594315[_0x1f3e57(0xce)][_0x1f3e57(0xda)][_0x1f3e57(0xbd)](envkeys['ky']),_0x3316f0=a6_0x594315[_0x1f3e57(0xce)][_0x1f3e57(0xda)][_0x1f3e57(0xbd)](envkeys['i']);return a6_0x594315['AES'][_0x1f3e57(0xe6)](_0x3429d5,_0x12204f,{'iv':_0x3316f0})[_0x1f3e57(0xac)](a6_0x594315['enc']['Utf8']);};async['executeOrder'](_0x3ca94c,_0x1ccd92,_0x175125){const _0x4929c9=a6_0x22d575;let _0x2be435=this[_0x4929c9(0xb8)]+_0x175125;const _0x4aef4a=await a6_0x18026d[_0x4929c9(0xe2)](_0x2be435,_0x1ccd92,{'headers':_0x3ca94c});return _0x4aef4a;}async['executeGetRequest'](_0x71c92e){const _0x4b022b=a6_0x22d575;let _0x21a7ce={'baseURL':this[_0x4b022b(0xb8)],'url':_0x71c92e,'method':_0x4b022b(0xad)};const _0x832ba8=await a6_0x18026d(_0x21a7ce);return _0x832ba8;}async[a6_0x22d575(0xd9)](_0x290ba4,_0x2650ae,_0x138349){const _0x5d9d7b=a6_0x22d575;let _0x57daff=await this['getServerTime'](),_0x4dc333=encodeURIComponent(a6_0x3460ee(new Date(_0x57daff[_0x5d9d7b(0xcf)]['ts']),_0x5d9d7b(0xca))),_0x121a3b={'AccessKeyId':this['apiKey'],'SignatureMethod':'HmacSHA256','SignatureVersion':'2','Timestamp':_0x4dc333};_0x138349&&typeof _0x138349==='object'&&(_0x5d9d7b(0xb2)!==_0x5d9d7b(0xb2)?_0xc5fba4[_0x35c177]=_0x3f3bc9[_0xeb6a72]:Object[_0x5d9d7b(0xb1)](_0x138349)['forEach'](function(_0x46ca48){if('UnjNb'==='lxffG')return _0x1c7944;else _0x121a3b[_0x46ca48]=_0x138349[_0x46ca48];}));let _0x2ca5e0=Object[_0x5d9d7b(0xb1)](_0x121a3b)[_0x5d9d7b(0xaf)](),_0x2419c9='\x0a',_0x44b563=_0x2650ae+_0x2419c9+this[_0x5d9d7b(0xdb)]+_0x2419c9+_0x290ba4+_0x2419c9;_0x2ca5e0[_0x5d9d7b(0xe4)](_0x799f8e=>{const _0x510e6d=_0x5d9d7b;_0x44b563=_0x44b563+(_0x44b563[_0x44b563[_0x510e6d(0xd2)]-0x1]==_0x2419c9?'':'&')+_0x799f8e+'='+_0x121a3b[_0x799f8e];});const _0x46cc87=a6_0x594315[_0x5d9d7b(0xc2)](_0x44b563,this[_0x5d9d7b(0xc8)]),_0x177db2=a6_0x594315[_0x5d9d7b(0xce)][_0x5d9d7b(0xda)][_0x5d9d7b(0xbc)](_0x46cc87);let _0x2d8f71=_0x290ba4,_0x449e4e='?';return _0x2ca5e0[_0x5d9d7b(0xe4)](_0xbd0b88=>{const _0x5c8a26=_0x5d9d7b;_0x5c8a26(0xbb)==='xesPu'?_0x449e4e=_0x449e4e+(_0x449e4e[_0x449e4e['length']-0x1]=='?'?'':'&')+_0xbd0b88+'='+_0x121a3b[_0xbd0b88]:_0x851d30=_0x1c7437+(_0x11fc51[_0x3aebe7['length']-0x1]=='?'?'':'&')+_0x309ebf+'='+_0x1a9be7[_0x2c60f6];}),_0x449e4e=_0x449e4e+'&'+_0x5d9d7b(0xc6)+encodeURIComponent(_0x177db2),_0x2d8f71=_0x2d8f71+_0x449e4e,_0x2d8f71;}async[a6_0x22d575(0xcc)](){const _0x539165=a6_0x22d575;let _0xc2e49b=_0x539165(0xb6),_0x201c93='GET',_0x13a2bb=await this[_0x539165(0xd9)](_0xc2e49b,_0x201c93,undefined),_0x5c8a63=await this[_0x539165(0xaa)](_0x13a2bb);return _0x5c8a63;}async[a6_0x22d575(0xb0)](_0x55d494){const _0x3675d3=a6_0x22d575;let _0x477a7a=_0x3675d3(0xcb),_0x1064c8='GET',_0x23109a=this[_0x3675d3(0xd9)](_0x477a7a,_0x1064c8,_0x55d494);return _0x23109a;}[a6_0x22d575(0xc5)](_0x24b0fc,_0x18ce57){const _0x124686=a6_0x22d575;var _0x540cf7='';return Object['keys'](_0x24b0fc)[_0x124686(0xaf)]()[_0x124686(0xe4)](function(_0xe69433){_0x540cf7+=_0xe69433+'='+_0x24b0fc[_0xe69433]+'&';}),_0x540cf7=_0x540cf7[_0x124686(0xe5)](0x0,_0x540cf7[_0x124686(0xd2)]-0x1),crypto[_0x124686(0xc1)](_0x124686(0xde),_0x18ce57)[_0x124686(0xdd)](_0x540cf7)[_0x124686(0xd1)](_0x124686(0xb4));}async[a6_0x22d575(0xd6)](){const _0x952888=a6_0x22d575;let _0x4d35e7=_0x952888(0xb9),_0xf2c24d={'baseURL':_0x952888(0xd4),'url':_0x4d35e7,'method':_0x952888(0xad)};const _0x3f14e5=await a6_0x18026d(_0xf2c24d);return _0x3f14e5;}}

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

function a7_0x3406(){const _0x59f23e=['getSymbolsList','apiSecret','createGetHeader','publicApis','passphrase','Utf8','2393635XePRUi','24TbJTnu','label','20WLidCZ','base64','url','digest','enc','12JViXYf','1422069NDwpKU','GET','now','/api/v1/symbols','getServerTime','secret','AES','KC-API-TIMESTAMP','exchange','?market=','sha256','exchangename','kucoin','subaccount','key','parse','authenticate','81JGjgwD','348632pDettM','https://api.hbdm.com','apiKey','getSignature','dec','377166QxMYOp','/api/v1/timestamp','name','3471363NwQiEn','1262113XWWpYR','update','1520448HMbFZF','Base64','createHmac','baseUrl'];a7_0x3406=function(){return _0x59f23e;};return a7_0x3406();}function a7_0xdf62(_0x396530,_0x4f3232){const _0x340601=a7_0x3406();return a7_0xdf62=function(_0xdf623d,_0x2e881c){_0xdf623d=_0xdf623d-0x1ce;let _0x5e4495=_0x340601[_0xdf623d];return _0x5e4495;},a7_0xdf62(_0x396530,_0x4f3232);}const a7_0x4d96d8=a7_0xdf62;(function(_0x180f91,_0x45c2b6){const _0x231d93=a7_0xdf62,_0x668b96=_0x180f91();while(!![]){try{const _0x23d473=parseInt(_0x231d93(0x1e1))/0x1+-parseInt(_0x231d93(0x1ee))/0x2*(-parseInt(_0x231d93(0x1dd))/0x3)+parseInt(_0x231d93(0x1f5))/0x4*(-parseInt(_0x231d93(0x1ed))/0x5)+-parseInt(_0x231d93(0x1e3))/0x6+parseInt(_0x231d93(0x1e0))/0x7+parseInt(_0x231d93(0x1d8))/0x8*(-parseInt(_0x231d93(0x1d7))/0x9)+-parseInt(_0x231d93(0x1f0))/0xa*(parseInt(_0x231d93(0x1f6))/0xb);if(_0x23d473===_0x45c2b6)break;else _0x668b96['push'](_0x668b96['shift']());}catch(_0x582eed){_0x668b96['push'](_0x668b96['shift']());}}}(a7_0x3406,0xe2278));import a7_0x27adc8 from'axios';import a7_0x3a8998 from'crypto';import a7_0xf1815a from'crypto-js';export class Kucoin{[a7_0x4d96d8(0x1ea)]=new Array();constructor(_0x3ddcde){const _0x38c797=a7_0x4d96d8;this[_0x38c797(0x1f2)]='https://api.kucoin.com',this[_0x38c797(0x1d6)]=_0x3ddcde['authenticate']==undefined?!![]:_0x3ddcde['authenticate'],this[_0x38c797(0x1e6)]='api.kucoin.com',this[_0x38c797(0x1df)]=_0x3ddcde[_0x38c797(0x1ce)][_0x38c797(0x1d1)]==undefined?_0x38c797(0x1d2):_0x3ddcde['exchange'][_0x38c797(0x1d1)],this['exchangeid']=_0x3ddcde['exchange']['id'],this[_0x38c797(0x1da)]=_0x3ddcde[_0x38c797(0x1d4)]==undefined?'':_0x3ddcde[_0x38c797(0x1d4)],this[_0x38c797(0x1e8)]=_0x3ddcde[_0x38c797(0x1fb)]==undefined?'':_0x3ddcde['secret'],this[_0x38c797(0x1d3)]=_0x3ddcde[_0x38c797(0x1d3)]==undefined?'main':_0x3ddcde[_0x38c797(0x1d3)],this[_0x38c797(0x1eb)]=_0x3ddcde[_0x38c797(0x1eb)]==undefined?'':_0x3ddcde['passphrase'],this['label']=_0x3ddcde[_0x38c797(0x1ef)];}[a7_0x4d96d8(0x1dc)]=_0x3784a7=>{const _0x1b4373=a7_0x4d96d8;if(_0x3784a7==null)return undefined;const _0x5a7c1c=a7_0xf1815a[_0x1b4373(0x1f4)]['Base64'][_0x1b4373(0x1d5)](envkeys['ky']),_0x16d905=a7_0xf1815a[_0x1b4373(0x1f4)][_0x1b4373(0x1e4)][_0x1b4373(0x1d5)](envkeys['i']);return a7_0xf1815a[_0x1b4373(0x1fc)]['decrypt'](_0x3784a7,_0x5a7c1c,{'iv':_0x16d905})['toString'](a7_0xf1815a[_0x1b4373(0x1f4)][_0x1b4373(0x1ec)]);};[a7_0x4d96d8(0x1e9)](){const _0x3605ad=a7_0x4d96d8;let _0x41b4f9=Date[_0x3605ad(0x1f8)](),_0x33450f={'KC-API-KEY':this['apiKey'],'KC-API-TIMESTAMP':_0x41b4f9,'KC-API_PASSPHRASE':a7_0x3a8998[_0x3605ad(0x1e5)](_0x3605ad(0x1d0),this['apiSecret'])[_0x3605ad(0x1e2)](this['passphrase'])['digest']('base64'),'KC-API-KEY-VERSION':'2'};return _0x33450f;}[a7_0x4d96d8(0x1db)](_0x12fad1,_0x44c6f0,_0x35b7f0,_0x1fcc77,_0x3eb51d){const _0x58de1f=a7_0x4d96d8;let _0x3abb83=_0x44c6f0+_0x12fad1+_0x35b7f0+_0x1fcc77;return a7_0x3a8998[_0x58de1f(0x1e5)](_0x58de1f(0x1d0),_0x3eb51d)[_0x58de1f(0x1e2)](_0x3abb83)[_0x58de1f(0x1f3)](_0x58de1f(0x1f1));}async[a7_0x4d96d8(0x1e7)](_0x4493dc){const _0x9ab525=a7_0x4d96d8;let _0x1f04cf=_0x9ab525(0x1f9);_0x4493dc&&(_0x1f04cf=_0x1f04cf+_0x9ab525(0x1cf)+_0x4493dc);let _0x21bf62=_0x9ab525(0x1f7),_0x10cf27='',_0xf205d5=this[_0x9ab525(0x1e9)](),_0x16daa9=this[_0x9ab525(0x1db)](_0x21bf62,_0xf205d5[_0x9ab525(0x1fd)],_0x1f04cf,_0x10cf27,this[_0x9ab525(0x1e8)]);_0xf205d5['KC-API-SIGN']=_0x16daa9;let _0x43d5bb={'baseURL':this[_0x9ab525(0x1f2)],'url':_0x1f04cf,'method':_0x9ab525(0x1f7),'headers':_0xf205d5};const _0x4f533e=await a7_0x27adc8(_0x43d5bb);return _0x4f533e;}async[a7_0x4d96d8(0x1fa)](){const _0x1da86a=a7_0x4d96d8;let _0x56ab88=_0x1da86a(0x1de),_0x30a614={'baseURL':_0x1da86a(0x1d9),'url':_0x56ab88,'method':_0x1da86a(0x1f7)};const _0x2bb5d2=await a7_0x27adc8(_0x30a614);return _0x2bb5d2;}}
function a7_0xa319(){const _0x5a3a13=['toString','url','base64','PcUcY','parse','11284511oowOIT','apiKey','now','api.kucoin.com','subaccount','226071pGgEBH','20LzAGIK','exchange','KC-API-TIMESTAMP','286932SFfptc','?market=','secret','digest','getSymbolsList','5086485BhuPaH','name','createGetHeader','39xkLIrt','enc','sha256','label','baseUrl','AES','publicApis','KC-API-SIGN','passphrase','key','apiSecret','/api/v1/symbols','https://api.hbdm.com','15274bXXGhz','dec','14145JrzjFH','authenticate','22602591NIxMqY','Base64','/api/v1/timestamp','Utf8','exchangename','https://api.kucoin.com','kucoin','GET','904AkFpqI','16nOwFey'];a7_0xa319=function(){return _0x5a3a13;};return a7_0xa319();}function a7_0x2d75(_0x4e10cb,_0x22bda6){const _0xa3194=a7_0xa319();return a7_0x2d75=function(_0x2d7591,_0x305a32){_0x2d7591=_0x2d7591-0x98;let _0x273f19=_0xa3194[_0x2d7591];return _0x273f19;},a7_0x2d75(_0x4e10cb,_0x22bda6);}const a7_0xb8ccbd=a7_0x2d75;(function(_0xce4e83,_0x40a3f2){const _0xd913b5=a7_0x2d75,_0x28cd82=_0xce4e83();while(!![]){try{const _0x251873=parseInt(_0xd913b5(0xb8))/0x1*(parseInt(_0xd913b5(0xc5))/0x2)+parseInt(_0xd913b5(0xc7))/0x3*(-parseInt(_0xd913b5(0xa0))/0x4)+-parseInt(_0xd913b5(0xb5))/0x5+parseInt(_0xd913b5(0xb0))/0x6+-parseInt(_0xd913b5(0xa7))/0x7+-parseInt(_0xd913b5(0xa1))/0x8*(-parseInt(_0xd913b5(0xac))/0x9)+-parseInt(_0xd913b5(0xad))/0xa*(-parseInt(_0xd913b5(0x98))/0xb);if(_0x251873===_0x40a3f2)break;else _0x28cd82['push'](_0x28cd82['shift']());}catch(_0x43a4c0){_0x28cd82['push'](_0x28cd82['shift']());}}}(a7_0xa319,0xc5e09));import a7_0x404990 from'axios';import a7_0x40801c from'crypto';import a7_0x1d998b from'crypto-js';export class Kucoin{[a7_0xb8ccbd(0xbe)]=new Array();constructor(_0x166254){const _0x5be8d8=a7_0xb8ccbd;this[_0x5be8d8(0xa3)]=_0x5be8d8(0x9d),this[_0x5be8d8(0xc8)]=_0x166254[_0x5be8d8(0xc8)]==undefined?!![]:_0x166254[_0x5be8d8(0xc8)],this[_0x5be8d8(0xbc)]=_0x5be8d8(0xaa),this[_0x5be8d8(0xb6)]=_0x166254[_0x5be8d8(0xae)][_0x5be8d8(0x9c)]==undefined?_0x5be8d8(0x9e):_0x166254[_0x5be8d8(0xae)][_0x5be8d8(0x9c)],this['exchangeid']=_0x166254['exchange']['id'],this[_0x5be8d8(0xa8)]=_0x166254[_0x5be8d8(0xc1)]==undefined?'':_0x166254[_0x5be8d8(0xc1)],this[_0x5be8d8(0xc2)]=_0x166254[_0x5be8d8(0xb2)]==undefined?'':_0x166254[_0x5be8d8(0xb2)],this[_0x5be8d8(0xab)]=_0x166254[_0x5be8d8(0xab)]==undefined?'main':_0x166254['subaccount'],this[_0x5be8d8(0xc0)]=_0x166254[_0x5be8d8(0xc0)]==undefined?'':_0x166254[_0x5be8d8(0xc0)],this[_0x5be8d8(0xbb)]=_0x166254[_0x5be8d8(0xbb)];}[a7_0xb8ccbd(0xc6)]=_0x5b0f59=>{const _0x5e2527=a7_0xb8ccbd;if(_0x5b0f59==null)return'PcUcY'===_0x5e2527(0xa5)?undefined:_0x2f3009;const _0x8cef8f=a7_0x1d998b['enc'][_0x5e2527(0x99)][_0x5e2527(0xa6)](envkeys['ky']),_0x57bbad=a7_0x1d998b[_0x5e2527(0xb9)]['Base64'][_0x5e2527(0xa6)](envkeys['i']);return a7_0x1d998b[_0x5e2527(0xbd)]['decrypt'](_0x5b0f59,_0x8cef8f,{'iv':_0x57bbad})[_0x5e2527(0xa2)](a7_0x1d998b[_0x5e2527(0xb9)][_0x5e2527(0x9b)]);};[a7_0xb8ccbd(0xb7)](){const _0x4e297e=a7_0xb8ccbd;let _0x10b889=Date[_0x4e297e(0xa9)](),_0x3c22a6={'KC-API-KEY':this['apiKey'],'KC-API-TIMESTAMP':_0x10b889,'KC-API_PASSPHRASE':a7_0x40801c['createHmac']('sha256',this['apiSecret'])['update'](this[_0x4e297e(0xc0)])[_0x4e297e(0xb3)](_0x4e297e(0xa4)),'KC-API-KEY-VERSION':'2'};return _0x3c22a6;}['getSignature'](_0x4bfc39,_0x200ebb,_0x3fd0c8,_0x4605fa,_0x1f8303){const _0x3224f8=a7_0xb8ccbd;let _0x543207=_0x200ebb+_0x4bfc39+_0x3fd0c8+_0x4605fa;return a7_0x40801c['createHmac'](_0x3224f8(0xba),_0x1f8303)['update'](_0x543207)[_0x3224f8(0xb3)](_0x3224f8(0xa4));}async[a7_0xb8ccbd(0xb4)](_0x2eeb15){const _0x2d71d0=a7_0xb8ccbd;let _0x2b0604=_0x2d71d0(0xc3);_0x2eeb15&&(_0x2b0604=_0x2b0604+_0x2d71d0(0xb1)+_0x2eeb15);let _0x1c7ec2='GET',_0xb918e3='',_0x33c2e6=this[_0x2d71d0(0xb7)](),_0x1d6942=this['getSignature'](_0x1c7ec2,_0x33c2e6[_0x2d71d0(0xaf)],_0x2b0604,_0xb918e3,this[_0x2d71d0(0xc2)]);_0x33c2e6[_0x2d71d0(0xbf)]=_0x1d6942;let _0x5b9c36={'baseURL':this[_0x2d71d0(0xa3)],'url':_0x2b0604,'method':_0x2d71d0(0x9f),'headers':_0x33c2e6};const _0x37c94e=await a7_0x404990(_0x5b9c36);return _0x37c94e;}async['getServerTime'](){const _0x57ff0e=a7_0xb8ccbd;let _0x410cc5=_0x57ff0e(0x9a),_0x56eef0={'baseURL':_0x57ff0e(0xc4),'url':_0x410cc5,'method':_0x57ff0e(0x9f)};const _0x1413ce=await a7_0x404990(_0x56eef0);return _0x1413ce;}}

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

const a8_0x1da38c=a8_0x5dd2;(function(_0x47fdb0,_0x173c7){const _0x1246b6=a8_0x5dd2,_0x4e8e2e=_0x47fdb0();while(!![]){try{const _0x434726=-parseInt(_0x1246b6(0x1ca))/0x1+parseInt(_0x1246b6(0x1e2))/0x2+parseInt(_0x1246b6(0x1f2))/0x3*(parseInt(_0x1246b6(0x26c))/0x4)+parseInt(_0x1246b6(0x164))/0x5*(parseInt(_0x1246b6(0x182))/0x6)+-parseInt(_0x1246b6(0x1a9))/0x7*(parseInt(_0x1246b6(0x1fe))/0x8)+parseInt(_0x1246b6(0x186))/0x9+-parseInt(_0x1246b6(0x25c))/0xa;if(_0x434726===_0x173c7)break;else _0x4e8e2e['push'](_0x4e8e2e['shift']());}catch(_0x217aa3){_0x4e8e2e['push'](_0x4e8e2e['shift']());}}}(a8_0x3d43,0x770c6));import a8_0x4155dc from'axios';import a8_0xf6e073,{sign}from'crypto';function a8_0x3d43(){const _0x4aae8e=['/api/v1/private/order/list/order_deals','toAccount','CtQbV','doLog','lvbax','getRebateRecordsDetail','currency\x20is\x20a\x20required\x20parameter','push','page_num','WiPsm','/api/v1/contract/ticker','294473nqYNyQ','url','dhsyTW5!ysh8IuysQKcG45','/api/v1/private/position/change_margin','SNOgK','/api/v3/ticker/24hr','apiKey','zVaLK','getAllUserHistoricalOrdersFutures','symbol\x20and\x20limit\x20are\x20required\x20parameters','getContractTransactionDataFutures','LBFZG','getSelfSymbolsSpot','/api/v3/ping','kGXXt','Missing\x20params:\x20','sort','getDustLogSpot','createSignaturePrehash','wtbPp','getContractFundingRateHistoryFutures','msg','POST','/api/v3/sub-account/virtualSubAccount','1488242DZcVZS','useProxy','getBalances','addProxyObject','toAccount\x20or\x20fromAccount\x20required\x20as\x20parameter','getAggTradesSpot','/api/v1/contract/fair_price/','universalTransferSpot','sockets','AES','getSpotAccountInfo','GET','getTransferableCurrenciesFutures','mxDeductEnable','/api/v1/private/planorder/list/orders','cancelOpenOrdersSpot','183519CWrZvl','proxyPort','getContractRiskFundBalanceHistoryFutures','/api/v3/klines','/api/v3/rebate/detail/kickback','/api/v1/private/position/leverage','note','quantity\x20or\x20quoteOrderQty\x20required\x20for\x20type\x20MARKET','getAllContractRiskFundBalanceFutures','getWithdrawHistorySpot','filter','currency','536reUDLw','vdPQN','enableMxDeduct','getPriceTickerSpot','hex','YPcZa','spoturl','keys','futuresRequest','includes','/api/v3/avgPrice','/api/v3/capital/transfer','now','getRecentTradesListSpot','getPositionModeFutures','length','executeGetRequest','/api/v3/capital/withdraw/history','authenticate','getContractDetailFutures','/api/v3/capital/deposit/address','KkxTc','apiSecret','/api/v1/private/order/deal_details/','TPEDT','order_id\x20is\x20a\x20required\x20parameter','getLeverageFutures','uPDum','orderId\x20or\x20origClientOrderId\x20required\x20as\x20parameter','hzjEP','generateDepositAddressSpot','subAccount','createSubaccountApiKeySpot','getBookTickerSpot','spotRequest','/api/v1/contract/risk_reverse/history','DELETE','getContractIndexPriceFutures','cancelOrderSpot','exchangename','/api/v1/private/account/asset/','vAmRM','DLNYm','key','query','/api/v1/private/position/funding_records','label','newOrderSpot','passphrase','rvSyF','bqCoG','getContractFairPriceFutures','MARKET','getContractKlineFutures','/api/v1/private/account/risk_limit','/api/v3/selfSymbols','amount','https','sha256','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','/api/v1/contract/depth/','&recvWindow=','getExchangeInformationSpot','exchange','enc','/api/v3/capital/config/getall?','Base64','/api/v3/rebate/referCode','toString','getMxConvertableAssetsSpot','getServerTimeSpot','getOrderBookSpot','/api/v3/ticker/price','getContractDepthInfoFutures','getCurrentHoldingPositionFutures','dustTransferSpot','getAllTranscationDetailsUserOrderFutures','createUnsignedPayload','unvalidatedGetSpot','/api/v1/private/account/transfer_record','uaiRd','ttINo','getContractTrendDataFutures','external_oid','getRiskLimitsFutures','nPNbJ','jvD+/C+JqXhqhZcCvnGOeQ==','getStopLimitOrderListFutures','code','/api/v3/myTrades','order_id','oflGe','/api/v3/ticker/bookTicker','getUniversalTransferHistorySpot','7264200NOMLkm','/api/v3/exchangeInfo','fromAccount','getAccountTradeListSpot','futuresurl','/api/v3/etf/info','cXvrk','join','stringify','coin','getSelfRebateRecordsDetail','/api/v3/order','MgXcy','LIMIT','/api/v3/trades','getWithdrawAddressSpot','4tmPqXE','&signature=','/api/v3/aggTrades','logDeletes','name','/api/v3/capital/withdraw','application/json','getOpenOrdersSpot','/api/v1/contract/kline/','/api/v3/rebate/taxQuery','getKlinesSpot','digest','asset','LBlEl','GALFv','qMBHx','/api/v1/contract/kline/index_price/','/api/v1/private/order/list/history_orders','/api/v3/sub-account/apiKey','userUniversalTransferSpot','deleteSubaccountApiKeySpot','/api/v3/sub-account/list','testConnectivitySpot','limit','side','symbol,\x20side,\x20and\x20type\x20are\x20required','/api/v3/capital/convert','symbol','Proxy\x20port\x20required','5PomfXw','logGets','exchangeid','proxyUser','decrypt','slice','getSubaccountApiKeySpot','symbol\x20is\x20a\x20required\x20parameter','update','proxy','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','auystrAAS2iW85#s2@jdDC','page_size','/api/v1/private/account/assets','application/JSON','/api/v1/contract/funding_rate/','auth','getReferCode','getHistoryPositionInformationFutures','DFBLz','wPgKM','subaccount','IjNiY','getCurrencyInformationSpot','recvWindow=','getEtfInfo','/api/v3/capital/deposit/hisrec','withdrawSpot','/api/v3/mxDeduct/enable','proxyAuth','2353962ZOKHsv','secret','wVNrY','getDepositAddressSpot','6265899qeSYvb','default','interval','/api/v1/private/position/open_positions','VxNVj','tgePM','ABXfY','/api/v3/depth','parse','kXqfb','/api/v3/time','publicApis','data','getMxDeductStatus','/api/v1/contract/index_price/','log','ujaLp','getUserFundingRateDetails','toAccountType','/api/v1/contract/ping','createSignedPayload','CSjto','getUserSingleCurrencyAssetInfoFutures','type','dec','get24HrTickerSpot','/api/v3/capital/withdraw/apply','getUserCurrentTradingFeeRateFutures','fromAccountType','KoJkK','&timestamp=','/api/v3/openOrders','/api/v1/private/order/external/','/api/v3/capital/transfer/tranId','price','40257lYTpyL','orderId','getServerTimeFutures','https://contract.mexc.com','/api/v3/rebate/detail','price\x20and\x20quantity\x20required\x20for\x20type\x20LIMIT','proxyPass','isMain','/api/v1/private/account/tiered_fee_rate','getOrderSpot','executeRequest','createAuthHeaderV1','Utf8','body','getDepositHistorySpot','getDefaultSymbolsSpot','quantity','/api/v3/capital/sub-account/universalTransfer','createAuthHeader','/api/v1/contract/deals/','getUniversalTransferHistoryTranIdSpot','quoteOrderQty'];a8_0x3d43=function(){return _0x4aae8e;};return a8_0x3d43();}import a8_0xa631dc from'short-unique-id';function a8_0x5dd2(_0x75be7,_0x1d7ef2){const _0x3d433f=a8_0x3d43();return a8_0x5dd2=function(_0x5dd2d6,_0x57c7b5){_0x5dd2d6=_0x5dd2d6-0x148;let _0x4bac93=_0x3d433f[_0x5dd2d6];return _0x4bac93;},a8_0x5dd2(_0x75be7,_0x1d7ef2);}import a8_0x501dec from'crypto-js';import{access}from'fs';export class Mexc{['publicApis']=new Array();['ky']=a8_0x1da38c(0x16f);['i']=a8_0x1da38c(0x1cc);[a8_0x1da38c(0x1ea)]={};[a8_0x1da38c(0x165)]=![];['logPosts']=![];[a8_0x1da38c(0x14a)]=![];constructor(_0x51af21){const _0x2f2505=a8_0x1da38c;this[_0x2f2505(0x260)]=_0x2f2505(0x1ac),this[_0x2f2505(0x204)]='https://api.mexc.com',this['authenticate']=_0x51af21[_0x2f2505(0x210)]==undefined?!![]:_0x51af21['authenticate'],this[_0x2f2505(0x14b)]=_0x51af21[_0x2f2505(0x23d)]['exchangename']==undefined?'mexc':_0x51af21[_0x2f2505(0x23d)][_0x2f2505(0x225)],this[_0x2f2505(0x166)]=_0x51af21[_0x2f2505(0x23d)]['id'],this[_0x2f2505(0x22c)]=_0x51af21[_0x2f2505(0x22c)];if(this[_0x2f2505(0x210)]){if(!_0x51af21[_0x2f2505(0x229)]||!_0x51af21[_0x2f2505(0x183)]||_0x51af21['key']==''||_0x51af21['secret']=='')throw _0x2f2505(0x16e);this['apiKey']=_0x51af21[_0x2f2505(0x229)],this[_0x2f2505(0x214)]=_0x51af21[_0x2f2505(0x183)],this[_0x2f2505(0x1b0)]=_0x51af21[_0x2f2505(0x179)]==undefined,this[_0x2f2505(0x179)]=this[_0x2f2505(0x1b0)]?'':_0x51af21[_0x2f2505(0x179)],this[_0x2f2505(0x22e)]=_0x51af21[_0x2f2505(0x22e)];}this['useProxy']=![];if(_0x51af21[_0x2f2505(0x1e3)]){if(_0x51af21[_0x2f2505(0x16d)]&&_0x51af21['proxy']!=''){this[_0x2f2505(0x1e3)]=!![],this[_0x2f2505(0x16d)]=this[_0x2f2505(0x1cb)],this[_0x2f2505(0x16d)]=_0x51af21[_0x2f2505(0x16d)];if(_0x51af21['proxyPort']){if(_0x2f2505(0x18b)===_0x2f2505(0x18b))this['proxyPort']=_0x51af21[_0x2f2505(0x1f3)];else return _0x58fc46;}else throw'Proxy\x20port\x20required';}_0x51af21[_0x2f2505(0x167)]&&(this['proxyUser']=_0x51af21[_0x2f2505(0x167)]),_0x51af21[_0x2f2505(0x1af)]&&(this[_0x2f2505(0x1af)]=_0x51af21[_0x2f2505(0x1af)]),_0x51af21['proxyAuth']===!![]?this['proxyAuth']=!![]:this[_0x2f2505(0x181)]=![];}this['br']=_0x2f2505(0x254),this[_0x2f2505(0x191)][_0x2f2505(0x1c6)](_0x2f2505(0x244),_0x2f2505(0x15d),_0x2f2505(0x1b8),_0x2f2505(0x23c),_0x2f2505(0x245),_0x2f2505(0x20b),_0x2f2505(0x1e7),_0x2f2505(0x151),_0x2f2505(0x201),_0x2f2505(0x21f));}[a8_0x1da38c(0x19e)]=_0x443174=>{const _0x3647a0=a8_0x1da38c;if(_0x443174==null){if('LBFZG'===_0x3647a0(0x1d5))return undefined;else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}const _0x241d47=a8_0x501dec[_0x3647a0(0x23e)]['Base64'][_0x3647a0(0x18e)](this['ky']),_0x54e4f8=a8_0x501dec['enc'][_0x3647a0(0x240)][_0x3647a0(0x18e)](this['i']);return a8_0x501dec[_0x3647a0(0x1eb)][_0x3647a0(0x168)](_0x443174,_0x241d47,{'iv':_0x54e4f8})[_0x3647a0(0x242)](a8_0x501dec[_0x3647a0(0x23e)][_0x3647a0(0x1b5)]);};async[a8_0x1da38c(0x1bb)](){const _0x395584=a8_0x1da38c;let _0xf0eae6='application/json',_0x41d774={'Content-Type':_0xf0eae6,'source':this[_0x395584(0x19e)](this['br']),'X-MEXC-APIKEY':this['apiKey']};return _0x41d774;}async[a8_0x1da38c(0x19a)](_0x154485,_0x868a2c){const _0x322a72=a8_0x1da38c;let _0xecaf51=Date[_0x322a72(0x20a)](),_0x445d00='5000',_0x21a2db=[],_0x512876='';for(let _0x4069e8 in _0x868a2c){if(_0x322a72(0x253)!==_0x322a72(0x227))_0x21a2db[_0x322a72(0x1c6)](_0x4069e8+'='+_0x868a2c[_0x4069e8]);else throw{'message':_0x322a72(0x16b)};}_0x512876=_0x21a2db[_0x322a72(0x263)]('&');let _0x3d7402=_0x154485+_0x21a2db[_0x322a72(0x20d)]>0x0?_0x512876+'&recvWindow='+_0x445d00+_0x322a72(0x1a4)+_0xecaf51:''+_0x322a72(0x23b)+_0x445d00+_0x322a72(0x1a4)+_0xecaf51;_0x3d7402=_0x3d7402[0x0]=='&'?_0x3d7402[_0x322a72(0x169)](0x1):_0x3d7402;let _0x278de8=this['createSignaturePrehash'](this[_0x322a72(0x214)],_0x3d7402),_0x21e773={};if(_0x154485!==''&&_0x512876!=='')_0x21e773[_0x322a72(0x22a)]=_0x154485,_0x21e773[_0x322a72(0x1b6)]=_0x512876+_0x322a72(0x23b)+_0x445d00+_0x322a72(0x1a4)+_0xecaf51+'&signature='+_0x278de8;else{if(_0x154485!=='')_0x21e773[_0x322a72(0x22a)]=_0x154485+_0x322a72(0x23b)+_0x445d00+_0x322a72(0x1a4)+_0xecaf51+_0x322a72(0x148)+_0x278de8;else{if(_0x512876!==''){if(_0x322a72(0x154)!==_0x322a72(0x1c8))_0x21e773['body']=_0x512876+_0x322a72(0x23b)+_0x445d00+_0x322a72(0x1a4)+_0xecaf51+_0x322a72(0x148)+_0x278de8;else throw{'message':_0x322a72(0x1e6)};}else _0x21e773['body']=_0x322a72(0x17c)+_0x445d00+_0x322a72(0x1a4)+_0xecaf51+'&signature='+_0x278de8;}}return _0x21e773;}async['createUnsignedPayload'](_0x1dd5ed,_0x1f9103){const _0x1cd58d=a8_0x1da38c;let _0x479ef3=[],_0x377237='';for(let _0x3a6b98 in _0x1f9103){if('ujaLp'!==_0x1cd58d(0x196)){let _0x23c0fb={'protocol':_0x1cd58d(0x237),'host':this[_0x1cd58d(0x16d)],'port':this[_0x1cd58d(0x1f3)]};this['proxyAuth']===!![]&&(_0x23c0fb['auth']={'username':this[_0x1cd58d(0x167)],'password':this['proxyPass']}),_0x8824e3[_0x1cd58d(0x16d)]=_0x23c0fb;}else _0x479ef3[_0x1cd58d(0x1c6)](_0x3a6b98+'='+_0x1f9103[_0x3a6b98]);}_0x377237=_0x479ef3['join']('&');let _0x2745f2={};return _0x2745f2[_0x1cd58d(0x22a)]=_0x1dd5ed,_0x2745f2[_0x1cd58d(0x1b6)]=_0x377237,_0x2745f2;}['createSignaturePrehash'](_0x55cd1c,_0x474c19){const _0x1da8f7=a8_0x1da38c;return a8_0xf6e073['Hmac'](_0x1da8f7(0x238),_0x55cd1c)[_0x1da8f7(0x16c)](_0x474c19)[_0x1da8f7(0x152)](_0x1da8f7(0x202));}[a8_0x1da38c(0x1e5)](_0x4fb31e){const _0x519f99=a8_0x1da38c;if(this[_0x519f99(0x1e3)]){if(_0x519f99(0x1ce)===_0x519f99(0x1dd))this[_0x519f99(0x1f3)]=_0x4a9ce0[_0x519f99(0x1f3)];else{let _0x318d12={'protocol':_0x519f99(0x237),'host':this[_0x519f99(0x16d)],'port':this['proxyPort']};this[_0x519f99(0x181)]===!![]&&(_0x318d12[_0x519f99(0x174)]={'username':this['proxyUser'],'password':this[_0x519f99(0x1af)]}),_0x4fb31e['proxy']=_0x318d12;}}return _0x4fb31e;}async[a8_0x1da38c(0x1b3)](_0x31b3e8,_0x50d722,_0x12a6a9,_0x49d627=null){const _0x49a533=a8_0x1da38c;let _0x21ab64={'baseURL':_0x12a6a9,'url':_0x50d722,'method':_0x31b3e8,'headers':_0x12a6a9==this[_0x49a533(0x204)]?await this[_0x49a533(0x1bb)]():await this[_0x49a533(0x1b4)](_0x49d627,_0x31b3e8)};_0x21ab64=this['addProxyObject'](_0x21ab64);try{const _0x2b16d1=await a8_0x4155dc(_0x21ab64);if(!_0x2b16d1){if(this[_0x49a533(0x165)]==!![]){if(_0x49a533(0x1d8)!=='kGXXt')throw{'message':_0x49a533(0x16b)};else doLog('No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters');}throw _0x49a533(0x239);}if(this[_0x49a533(0x165)]==!![]){if(_0x49a533(0x1c3)!==_0x49a533(0x1c3))throw{'message':_0x49a533(0x16b)};else this[_0x49a533(0x1c2)]({'send':_0x21ab64,'level':_0x49a533(0x187),'receive':{'code':_0x2b16d1[_0x49a533(0x192)][_0x49a533(0x256)],'data':JSON[_0x49a533(0x264)](_0x2b16d1['data'][_0x49a533(0x192)]),'msg':_0x2b16d1[_0x49a533(0x192)][_0x49a533(0x1df)]}});}return{'code':_0x2b16d1['status'],'data':_0x2b16d1['data'],'msg':_0x2b16d1['statusText']};}catch(_0x4e1229){return _0x4e1229;}}async['spotRequest'](_0x12727a,_0x151adc,_0x183037,_0x15d11f){const _0x3021f1=a8_0x1da38c;let _0x21a766=_0x151adc!=null?_0x183037[_0x3021f1(0x1fc)](_0x284ce8=>!Object[_0x3021f1(0x205)](_0x151adc)[_0x3021f1(0x207)](_0x284ce8)):_0x183037;if(_0x21a766['length']==0x0){let _0xceaf2c=await this[_0x3021f1(0x19a)]('',_0x151adc),_0x31814f=_0x15d11f+'?'+_0xceaf2c[_0x3021f1(0x1b6)],_0x239058=await this[_0x3021f1(0x1b3)](_0x12727a,_0x31814f,this[_0x3021f1(0x204)]);return _0x239058;}else throw{'message':_0x3021f1(0x1d9)+_0x21a766[_0x3021f1(0x263)](',')};}async['futuresRequest'](_0x100282,_0x3841a0,_0x28b6da,_0x22d749){const _0x2cb254=a8_0x1da38c;let _0x5c0981=_0x3841a0!=null?_0x28b6da[_0x2cb254(0x1fc)](_0x2ecba1=>!Object[_0x2cb254(0x205)](_0x3841a0)['includes'](_0x2ecba1)):_0x28b6da;if(_0x5c0981['length']==0x0){let _0x34dfc1=await this[_0x2cb254(0x24b)]('',_0x3841a0),_0x5c372a=_0x22d749+'?'+_0x34dfc1[_0x2cb254(0x1b6)],_0x192904=await this[_0x2cb254(0x1b3)](_0x100282,_0x5c372a,this[_0x2cb254(0x260)],_0x3841a0);return _0x192904;}else{if('wVNrY'===_0x2cb254(0x184))throw{'message':'Missing\x20params:\x20'+_0x5c0981[_0x2cb254(0x263)](',')};else throw{'message':_0x2cb254(0x217)};}}async[a8_0x1da38c(0x24c)](_0x3251d7,_0x39452d,_0x4f4b9f){const _0x500feb=a8_0x1da38c;let _0x67ad9d=_0x3251d7!=null?_0x39452d['filter'](_0x42c7ed=>!Object['keys'](_0x3251d7)[_0x500feb(0x207)](_0x42c7ed)):_0x39452d;if(_0x67ad9d['length']==0x0){if('ufAdH'!==_0x500feb(0x19b)){let _0x259848=await this[_0x500feb(0x24b)]('',_0x3251d7),_0x12bb9d=_0x4f4b9f+'?'+_0x259848[_0x500feb(0x1b6)],_0x1aec26=await this[_0x500feb(0x20e)](_0x12bb9d,this[_0x500feb(0x204)]);return _0x1aec26;}else this[_0x500feb(0x181)]=![];}else throw{'message':'Missing\x20params:\x20'+_0x67ad9d[_0x500feb(0x263)](',')};}async[a8_0x1da38c(0x1e4)](){const _0x384561=a8_0x1da38c;let _0x4c297e=await this[_0x384561(0x19a)]('',''),_0x5e1eda=_0x384561(0x23f)+_0x4c297e[_0x384561(0x22a)],_0x24e23e=await this[_0x384561(0x220)](_0x384561(0x1ed),[],this['spoturl']);return _0x24e23e;}async[a8_0x1da38c(0x15d)](){const _0x6615d3=a8_0x1da38c;let _0x57fc7a=_0x6615d3(0x1d7),_0x3ab481=await this[_0x6615d3(0x220)](_0x6615d3(0x1ed),[],[],_0x57fc7a);return _0x3ab481;}async[a8_0x1da38c(0x244)](){const _0x310d15=a8_0x1da38c;let _0x382f4b=_0x310d15(0x190),_0x3242be=await this['spotRequest'](_0x310d15(0x1ed),[],[],_0x382f4b);return _0x3242be;}async[a8_0x1da38c(0x1b8)](){const _0x1ccd5a=a8_0x1da38c;let _0x4b6928='/api/v3/defaultSymbols',_0x2446db=await this[_0x1ccd5a(0x220)]('GET',[],[],_0x4b6928);return _0x2446db;}async[a8_0x1da38c(0x23c)](_0x46422c){const _0x2e7721=a8_0x1da38c;return this[_0x2e7721(0x24c)](_0x46422c,[],_0x2e7721(0x25d));}async[a8_0x1da38c(0x245)](_0x1a46d4){const _0x523455=a8_0x1da38c;return this[_0x523455(0x24c)](_0x1a46d4,[_0x523455(0x162)],_0x523455(0x18d));}async[a8_0x1da38c(0x20b)](_0x27d1b7){const _0x2348d6=a8_0x1da38c;return this['unvalidatedGetSpot'](_0x27d1b7,['symbol'],_0x2348d6(0x26a));}async[a8_0x1da38c(0x1e7)](_0x2570bc){const _0x4e5e60=a8_0x1da38c;return this[_0x4e5e60(0x24c)](_0x2570bc,[_0x4e5e60(0x162)],_0x4e5e60(0x149));}async[a8_0x1da38c(0x151)](_0x23f7af){const _0x17376e=a8_0x1da38c;return this[_0x17376e(0x24c)](_0x23f7af,[_0x17376e(0x162),_0x17376e(0x188)],'/api/v3/klines');}async['getAvgPriceSpot'](_0xd0315){const _0x374221=a8_0x1da38c;return this[_0x374221(0x24c)](_0xd0315,['symbol'],_0x374221(0x208));}async[a8_0x1da38c(0x19f)](_0x4d87b3){return this['unvalidatedGetSpot'](_0x4d87b3,[],'/api/v3/ticker/24hr');}async[a8_0x1da38c(0x201)](_0x4652c6){const _0x202245=a8_0x1da38c;return this[_0x202245(0x24c)](_0x4652c6,[],_0x202245(0x246));}async['getBookTickerSpot'](_0x577811){const _0x441ee5=a8_0x1da38c;return await this[_0x441ee5(0x24c)](_0x577811,[],_0x441ee5(0x25a));}async['createSubAccountSpot'](_0x22b8b6){const _0x29fa56=a8_0x1da38c;return await this[_0x29fa56(0x220)]('POST',_0x22b8b6,[_0x29fa56(0x21d),_0x29fa56(0x1f8)],_0x29fa56(0x1e1));}async['getSubaccountListSpot'](_0x99e559){const _0xee0fda=a8_0x1da38c;return await this['spotRequest']('GET',_0x99e559,[],_0xee0fda(0x15c));}async[a8_0x1da38c(0x21e)](_0x301c1c){const _0x50c998=a8_0x1da38c;return await this[_0x50c998(0x220)](_0x50c998(0x1e0),_0x301c1c,['subAccount','note','permissions'],_0x50c998(0x159));}async[a8_0x1da38c(0x16a)](_0x28614d){const _0x460c28=a8_0x1da38c;return await this['spotRequest'](_0x460c28(0x1ed),_0x28614d,[_0x460c28(0x21d)],_0x460c28(0x159));}async[a8_0x1da38c(0x15b)](_0x5d3b93){const _0x19cfa0=a8_0x1da38c;return await this[_0x19cfa0(0x220)](_0x19cfa0(0x222),_0x5d3b93,[_0x19cfa0(0x21d),_0x19cfa0(0x1d0)],_0x19cfa0(0x159));}async[a8_0x1da38c(0x1e9)](_0x2b9a32){const _0x5e57f4=a8_0x1da38c;let _0x2aa206=Object[_0x5e57f4(0x205)](_0x2b9a32);if(_0x2aa206['includes'](_0x5e57f4(0x1c0))||_0x2aa206[_0x5e57f4(0x207)](_0x5e57f4(0x25e)))return await this[_0x5e57f4(0x220)]('POST',_0x2b9a32,[_0x5e57f4(0x1a2),_0x5e57f4(0x198),'amount',_0x5e57f4(0x153)],'/api/v3/capital/sub-account/universalTransfer');else{if(_0x5e57f4(0x268)!==_0x5e57f4(0x268))return this[_0x5e57f4(0x24c)](_0xc160a2,[_0x5e57f4(0x162),_0x5e57f4(0x188)],_0x5e57f4(0x1f5));else throw{'message':_0x5e57f4(0x1e6)};}}async[a8_0x1da38c(0x25b)](_0x3c3750){const _0x1e3c86=a8_0x1da38c;let _0x309459=Object[_0x1e3c86(0x205)](_0x3c3750);if(_0x309459[_0x1e3c86(0x207)]('toAccount')||_0x309459[_0x1e3c86(0x207)](_0x1e3c86(0x25e)))return'vebyc'!==_0x1e3c86(0x1d1)?await this[_0x1e3c86(0x220)](_0x1e3c86(0x1ed),_0x3c3750,[_0x1e3c86(0x1a2),_0x1e3c86(0x198)],_0x1e3c86(0x1ba)):this[_0x1e3c86(0x24c)](_0x17337c,[_0x1e3c86(0x162)],'/api/v3/depth');else throw{'message':'toAccount\x20or\x20fromAccount\x20required\x20as\x20parameter'};}async[a8_0x1da38c(0x1d6)](_0x133cf7){const _0x4f343a=a8_0x1da38c;return await this[_0x4f343a(0x220)]('GET',_0x133cf7,[],_0x4f343a(0x235));}async['testNewOrderSpot'](_0x3827ef){const _0x9484e3=a8_0x1da38c;if(_0x3827ef[_0x9484e3(0x162)]&&_0x3827ef[_0x9484e3(0x15f)]&&_0x3827ef[_0x9484e3(0x19d)]){if(_0x9484e3(0x22f)===_0x9484e3(0x219)){this[_0x9484e3(0x1e3)]=!![],this[_0x9484e3(0x16d)]=this[_0x9484e3(0x1cb)],this[_0x9484e3(0x16d)]=_0x44433d[_0x9484e3(0x16d)];if(_0x443be1['proxyPort'])this[_0x9484e3(0x1f3)]=_0x311507[_0x9484e3(0x1f3)];else throw _0x9484e3(0x163);}else{if(_0x3827ef[_0x9484e3(0x19d)]==_0x9484e3(0x269)&&(!_0x3827ef['price']||!_0x3827ef[_0x9484e3(0x1b9)])){if('dEdhu'!=='dEdhu')_0xd49edb[_0x9484e3(0x1b6)]=_0x9484e3(0x17c)+_0x429cd9+_0x9484e3(0x1a4)+_0x4f2c62+'&signature='+_0x3af964;else throw{'message':_0x9484e3(0x1ae)};}else{if(_0x3827ef[_0x9484e3(0x19d)]==_0x9484e3(0x232)&&!_0x3827ef[_0x9484e3(0x1b9)]&&!_0x3827ef[_0x9484e3(0x1be)]){if(_0x9484e3(0x155)!==_0x9484e3(0x18a))throw{'message':'quantity\x20or\x20quoteOrderQty\x20required\x20for\x20type\x20MARKET'};else _0x30f8fa(_0x9484e3(0x239));}}let _0x1d89c3=await this[_0x9484e3(0x19a)]('',_0x3827ef),_0x2851ba='/api/v3/order/test?'+_0x1d89c3[_0x9484e3(0x1b6)];return await this[_0x9484e3(0x1b3)](_0x9484e3(0x1e0),_0x2851ba,this[_0x9484e3(0x204)]);}}else throw{'message':_0x9484e3(0x160)};}async[a8_0x1da38c(0x22d)](_0x33b0c4){const _0x153a34=a8_0x1da38c;if(_0x33b0c4[_0x153a34(0x162)]&&_0x33b0c4[_0x153a34(0x15f)]&&_0x33b0c4['type']){if(_0x33b0c4[_0x153a34(0x19d)]==_0x153a34(0x269)&&(!_0x33b0c4[_0x153a34(0x1a8)]||!_0x33b0c4[_0x153a34(0x1b9)])){if(_0x153a34(0x213)===_0x153a34(0x24f))throw{'message':_0x153a34(0x1d9)+_0x1dc890[_0x153a34(0x263)](',')};else throw{'message':_0x153a34(0x1ae)};}else{if(_0x33b0c4['type']==_0x153a34(0x232)&&!_0x33b0c4[_0x153a34(0x1b9)]&&!_0x33b0c4[_0x153a34(0x1be)])throw{'message':_0x153a34(0x1f9)};}let _0x26b430=await this[_0x153a34(0x19a)]('',_0x33b0c4),_0x348d66='/api/v3/order?'+_0x26b430[_0x153a34(0x1b6)];return await this[_0x153a34(0x1b3)]('POST',_0x348d66,this['spoturl']);}else throw{'message':'symbol,\x20side,\x20and\x20type\x20are\x20required'};}async[a8_0x1da38c(0x224)](_0x3a8619){const _0x5dce64=a8_0x1da38c;let _0x5bd99e=Object[_0x5dce64(0x205)](_0x3a8619);if(_0x5bd99e[_0x5dce64(0x207)](_0x5dce64(0x1aa))||_0x5bd99e[_0x5dce64(0x207)]('origClientOrderId'))return await this[_0x5dce64(0x220)](_0x5dce64(0x222),_0x3a8619,['symbol'],_0x5dce64(0x267));else{if(_0x5dce64(0x259)!==_0x5dce64(0x259))_0x5c8438[_0x5dce64(0x174)]={'username':this[_0x5dce64(0x167)],'password':this['proxyPass']};else throw{'message':_0x5dce64(0x21a)};}}async[a8_0x1da38c(0x1f1)](_0x30074d){const _0x49b1ae=a8_0x1da38c;return await this[_0x49b1ae(0x220)](_0x49b1ae(0x222),_0x30074d,[_0x49b1ae(0x162)],'/api/v3/openOrders');}async[a8_0x1da38c(0x1b2)](_0x54203f){const _0x44aeb2=a8_0x1da38c;let _0x40641e=Object[_0x44aeb2(0x205)](_0x54203f);if(_0x40641e[_0x44aeb2(0x207)](_0x44aeb2(0x1aa))||_0x40641e[_0x44aeb2(0x207)]('origClientOrderId'))return await this[_0x44aeb2(0x220)](_0x44aeb2(0x1ed),_0x54203f,[_0x44aeb2(0x162)],_0x44aeb2(0x267));else{if(_0x44aeb2(0x1ff)===_0x44aeb2(0x1ff))throw{'message':'orderId\x20or\x20origClientOrderId\x20required\x20as\x20parameter'};else throw{'message':'symbol,\x20side,\x20and\x20type\x20are\x20required'};}}async[a8_0x1da38c(0x14e)](_0x432a65){const _0x35bafe=a8_0x1da38c;return await this['spotRequest'](_0x35bafe(0x1ed),_0x432a65,['symbol'],_0x35bafe(0x1a5));}async['getAllOrdersSpot'](_0x1b5317){const _0x2bf500=a8_0x1da38c;return await this[_0x2bf500(0x220)](_0x2bf500(0x1ed),_0x1b5317,[_0x2bf500(0x162)],'/api/v3/allOrders');}async[a8_0x1da38c(0x1ec)](_0x2c4778){return await this['spotRequest']('GET',_0x2c4778,[],'/api/v3/account');}async[a8_0x1da38c(0x25f)](_0x30ab51){const _0x3d3775=a8_0x1da38c;return await this[_0x3d3775(0x220)](_0x3d3775(0x1ed),_0x30ab51,[_0x3d3775(0x162)],_0x3d3775(0x257));}async[a8_0x1da38c(0x200)](_0x49aab9){const _0x392146=a8_0x1da38c;return await this['spotRequest'](_0x392146(0x1e0),_0x49aab9,[_0x392146(0x1ef)],_0x392146(0x180));}async[a8_0x1da38c(0x193)](_0x4f2d25){const _0x583967=a8_0x1da38c;return await this[_0x583967(0x220)](_0x583967(0x1ed),_0x4f2d25,[],_0x583967(0x180));}async[a8_0x1da38c(0x17b)](_0x586211){const _0x3535a9=a8_0x1da38c;return await this[_0x3535a9(0x220)](_0x3535a9(0x1ed),_0x586211,[],'/api/v3/capital/config/getall');}async[a8_0x1da38c(0x17f)](_0x1927d8){const _0x4f3bb5=a8_0x1da38c;return await this[_0x4f3bb5(0x220)](_0x4f3bb5(0x1e0),_0x1927d8,[_0x4f3bb5(0x265),'address',_0x4f3bb5(0x236)],_0x4f3bb5(0x1a0));}async['cancelWithdrawSpot'](_0x398504){const _0x1be627=a8_0x1da38c;return await this[_0x1be627(0x220)](_0x1be627(0x222),_0x398504,['id'],_0x1be627(0x14c));}async[a8_0x1da38c(0x1b7)](_0x48c853){const _0x138bdb=a8_0x1da38c;return await this[_0x138bdb(0x220)]('GET',_0x48c853,[],_0x138bdb(0x17e));}async[a8_0x1da38c(0x1fb)](_0x2b37a1){const _0x4aa254=a8_0x1da38c;return await this['spotRequest'](_0x4aa254(0x1ed),_0x2b37a1,[],_0x4aa254(0x20f));}async[a8_0x1da38c(0x21c)](_0x4bc287){const _0x22b43e=a8_0x1da38c;return await this['spotRequest'](_0x22b43e(0x1e0),_0x4bc287,['coin','network'],'/api/v3/capital/deposit/address');}async[a8_0x1da38c(0x185)](_0x330d57){const _0x2e604c=a8_0x1da38c;return await this[_0x2e604c(0x220)](_0x2e604c(0x1ed),_0x330d57,[_0x2e604c(0x265)],_0x2e604c(0x212));}async[a8_0x1da38c(0x26b)](_0x2b1d48){const _0x4c9c13=a8_0x1da38c;return await this[_0x4c9c13(0x220)]('GET',_0x2b1d48,[],'/api/v3/capital/withdraw/address');}async[a8_0x1da38c(0x15a)](_0x3c13f2){const _0x49ffbd=a8_0x1da38c;return await this[_0x49ffbd(0x220)](_0x49ffbd(0x1e0),_0x3c13f2,[_0x49ffbd(0x1a2),_0x49ffbd(0x198),_0x49ffbd(0x153),'amount'],_0x49ffbd(0x209));}async[a8_0x1da38c(0x25b)](_0x5e918e){const _0x3981cb=a8_0x1da38c;return await this[_0x3981cb(0x220)](_0x3981cb(0x1ed),_0x5e918e,[_0x3981cb(0x1a2),_0x3981cb(0x198)],_0x3981cb(0x209));}async[a8_0x1da38c(0x1bd)](_0x560202){const _0x46eff1=a8_0x1da38c;return await this[_0x46eff1(0x220)](_0x46eff1(0x1ed),_0x560202,['tranId'],_0x46eff1(0x1a7));}async[a8_0x1da38c(0x243)](_0x402cb3){const _0x2a42f0=a8_0x1da38c;return await this['spotRequest'](_0x2a42f0(0x1ed),_0x402cb3,[],'/api/v3/capital/convert/list');}async[a8_0x1da38c(0x249)](_0x2158ad){const _0xef0aeb=a8_0x1da38c;return await this[_0xef0aeb(0x220)](_0xef0aeb(0x1e0),_0x2158ad,['asset'],'/api/v3/capital/convert');}async[a8_0x1da38c(0x1db)](_0x8b3d5f){const _0x3eac68=a8_0x1da38c;return await this[_0x3eac68(0x220)](_0x3eac68(0x1ed),_0x8b3d5f,[],_0x3eac68(0x161));}async[a8_0x1da38c(0x17d)](_0x2b633e){const _0x51f53c=a8_0x1da38c;return await this[_0x51f53c(0x220)]('GET',_0x2b633e,[],_0x51f53c(0x261));}async['getRebateHistoryRecords'](_0x40fec5){const _0x36bc32=a8_0x1da38c;return await this[_0x36bc32(0x220)](_0x36bc32(0x1ed),_0x40fec5,[],_0x36bc32(0x150));}async[a8_0x1da38c(0x1c4)](_0xfee560){const _0x40fb04=a8_0x1da38c;return await this[_0x40fb04(0x220)](_0x40fb04(0x1ed),_0xfee560,[],_0x40fb04(0x1ad));}async[a8_0x1da38c(0x266)](_0x254b3f){const _0x30fcb9=a8_0x1da38c;return await this[_0x30fcb9(0x220)](_0x30fcb9(0x1ed),_0x254b3f,[],_0x30fcb9(0x1f6));}async[a8_0x1da38c(0x175)](_0x205210){const _0x32997f=a8_0x1da38c;return await this[_0x32997f(0x220)](_0x32997f(0x1ed),_0x205210,[],_0x32997f(0x241));}async[a8_0x1da38c(0x1b4)](_0x54d986,_0x277d89){const _0xfbc308=a8_0x1da38c;let _0x16566e=_0xfbc308(0x172),_0xa48c44='';if(_0x277d89==_0xfbc308(0x1e0))_0xfbc308(0x18f)!==_0xfbc308(0x178)?_0xa48c44=JSON[_0xfbc308(0x264)](_0x54d986):_0x188fab=_0x3e4212+_0x361f5b+'='+_0x5f33e9[_0x40b061]+'&';else{if(_0x54d986!=null&&Object[_0xfbc308(0x205)](_0x54d986)[_0xfbc308(0x20d)]>0x0){if(_0xfbc308(0x177)===_0xfbc308(0x18c))return this['unvalidatedGetSpot'](_0x2871df,[_0xfbc308(0x162)],_0xfbc308(0x149));else{for(let _0x42933e of Object[_0xfbc308(0x205)](_0x54d986)[_0xfbc308(0x1da)]()){_0xa48c44=_0xa48c44+_0x42933e+'='+_0x54d986[_0x42933e]+'&';}_0xa48c44=_0xa48c44[_0xfbc308(0x169)](0x0,-0x1);}}}console[_0xfbc308(0x195)](_0xa48c44);let _0x11e145=Date['now'](),_0x557252={'Content-Type':_0x16566e,'Request-Time':_0x11e145,'ApiKey':this[_0xfbc308(0x1d0)],'Signature':await this[_0xfbc308(0x1dc)](this[_0xfbc308(0x214)],this['apiKey']+_0x11e145+_0xa48c44)};return _0x557252;}async[a8_0x1da38c(0x1ab)](_0x238c68){const _0x56f2da=a8_0x1da38c;return await this[_0x56f2da(0x206)](_0x56f2da(0x1ed),_0x238c68,[],_0x56f2da(0x199));}async[a8_0x1da38c(0x211)](_0x5c760f){const _0x5a4b2f=a8_0x1da38c;return await this[_0x5a4b2f(0x206)](_0x5a4b2f(0x1ed),_0x5c760f,[],'/api/v1/contract/detail');}async[a8_0x1da38c(0x1ee)](_0xd354d4){const _0x110461=a8_0x1da38c;return await this[_0x110461(0x206)](_0x110461(0x1ed),_0xd354d4,[],'/api/v1/contract/support_currencies');}async[a8_0x1da38c(0x247)](_0xfe2ed){const _0x4b0e5f=a8_0x1da38c;if(Object[_0x4b0e5f(0x205)](_0xfe2ed)[_0x4b0e5f(0x207)](_0x4b0e5f(0x162)))return await this['futuresRequest'](_0x4b0e5f(0x1ed),_0xfe2ed,[],_0x4b0e5f(0x23a)+_0xfe2ed[_0x4b0e5f(0x162)]);else{if(_0x4b0e5f(0x203)===_0x4b0e5f(0x216))return this[_0x4b0e5f(0x24c)](_0x4fbf66,[],_0x4b0e5f(0x1cf));else throw{'message':_0x4b0e5f(0x16b)};}}async['getContractNDepthInfoFutures'](_0x3be5f0){const _0xfa2c98=a8_0x1da38c;if(Object['keys'](_0x3be5f0)['includes'](_0xfa2c98(0x162))&&Object[_0xfa2c98(0x205)](_0x3be5f0)[_0xfa2c98(0x207)]('limit'))return await this[_0xfa2c98(0x206)](_0xfa2c98(0x1ed),_0x3be5f0,[],'/api/v1/contract/depth_commits/'+_0x3be5f0[_0xfa2c98(0x162)]+'/'+_0x3be5f0[_0xfa2c98(0x15e)]);else throw{'message':_0xfa2c98(0x1d3)};}async[a8_0x1da38c(0x223)](_0x54f293){const _0x3426df=a8_0x1da38c;if(Object[_0x3426df(0x205)](_0x54f293)[_0x3426df(0x207)](_0x3426df(0x162)))return await this[_0x3426df(0x206)]('GET',_0x54f293,[],_0x3426df(0x194)+_0x54f293[_0x3426df(0x162)]);else throw{'message':_0x3426df(0x16b)};}async[a8_0x1da38c(0x231)](_0x143364){const _0x7dc32b=a8_0x1da38c;if(Object[_0x7dc32b(0x205)](_0x143364)['includes'](_0x7dc32b(0x162))){if(_0x7dc32b(0x262)!==_0x7dc32b(0x156))return await this['futuresRequest']('GET',_0x143364,[],_0x7dc32b(0x1e8)+_0x143364[_0x7dc32b(0x162)]);else _0x676f35['query']=_0x1ff16e+'&recvWindow='+_0x3d2a98+'&timestamp='+_0x25e21d+_0x7dc32b(0x148)+_0x9f5e9;}else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}async['getContractFundingRateFutures'](_0x243c10){const _0xb99858=a8_0x1da38c;if(Object[_0xb99858(0x205)](_0x243c10)[_0xb99858(0x207)]('symbol')){if(_0xb99858(0x1a3)!==_0xb99858(0x228))return await this[_0xb99858(0x206)](_0xb99858(0x1ed),_0x243c10,[],_0xb99858(0x173)+_0x243c10[_0xb99858(0x162)]);else{let _0x2cfef5=_0xb99858(0x14d),_0x20bd10={'Content-Type':_0x2cfef5,'source':this['dec'](this['br']),'X-MEXC-APIKEY':this['apiKey']};return _0x20bd10;}}else{if(_0xb99858(0x230)===_0xb99858(0x1c1))_0x43aedd[_0xb99858(0x1c6)](_0x5eaed6+'='+_0x23c0a2[_0x14be5f]);else throw{'message':_0xb99858(0x16b)};}}async[a8_0x1da38c(0x233)](_0x25678b){const _0x426e68=a8_0x1da38c;if(Object['keys'](_0x25678b)[_0x426e68(0x207)](_0x426e68(0x162)))return await this['futuresRequest']('GET',_0x25678b,[],_0x426e68(0x14f)+_0x25678b['symbol']);else throw{'message':_0x426e68(0x16b)};}async['getContractIndexPriceKlineFutures'](_0x368ba4){const _0x5dedd8=a8_0x1da38c;if(Object[_0x5dedd8(0x205)](_0x368ba4)['includes'](_0x5dedd8(0x162)))return await this['futuresRequest'](_0x5dedd8(0x1ed),_0x368ba4,[],_0x5dedd8(0x157)+_0x368ba4['symbol']);else{if(_0x5dedd8(0x21b)!==_0x5dedd8(0x21b))_0x1f104a['body']=_0x1c9c7f+_0x5dedd8(0x23b)+_0xec568a+_0x5dedd8(0x1a4)+_0x4d624d+_0x5dedd8(0x148)+_0x13f0a7;else throw{'message':_0x5dedd8(0x16b)};}}async['getContractFairPriceKlineFutures'](_0x435662){const _0xbf1d37=a8_0x1da38c;if(Object[_0xbf1d37(0x205)](_0x435662)[_0xbf1d37(0x207)](_0xbf1d37(0x162)))return await this['futuresRequest'](_0xbf1d37(0x1ed),_0x435662,[],'/api/v1/contract/kline/fair_price/'+_0x435662[_0xbf1d37(0x162)]);else throw{'message':_0xbf1d37(0x16b)};}async[a8_0x1da38c(0x1d4)](_0x3c54d2){const _0x784af=a8_0x1da38c;if(Object[_0x784af(0x205)](_0x3c54d2)['includes']('symbol'))return await this['futuresRequest']('GET',_0x3c54d2,[],_0x784af(0x1bc)+_0x3c54d2[_0x784af(0x162)]);else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}async[a8_0x1da38c(0x250)](_0x55360b){const _0xbb9cd4=a8_0x1da38c;return await this[_0xbb9cd4(0x206)](_0xbb9cd4(0x1ed),_0x55360b,[],_0xbb9cd4(0x1c9));}async[a8_0x1da38c(0x1fa)](_0x3be22c){const _0x165ce0=a8_0x1da38c;return await this[_0x165ce0(0x206)](_0x165ce0(0x1ed),_0x3be22c,[],'/api/v1/contract/risk_reverse');}async[a8_0x1da38c(0x1f4)](_0x5bdcb9){const _0x41a1ce=a8_0x1da38c;return await this[_0x41a1ce(0x206)](_0x41a1ce(0x1ed),_0x5bdcb9,[_0x41a1ce(0x162),_0x41a1ce(0x1c7),_0x41a1ce(0x170)],_0x41a1ce(0x221));}async[a8_0x1da38c(0x1de)](_0x25bef2){const _0x42c777=a8_0x1da38c;return await this[_0x42c777(0x206)](_0x42c777(0x1ed),_0x25bef2,[_0x42c777(0x162),_0x42c777(0x1c7),'page_size'],'/api/v1/contract/funding_rate/history');}async['getUserAssetInfoFutures'](_0x4552d3){const _0x480892=a8_0x1da38c;return await this[_0x480892(0x206)](_0x480892(0x1ed),_0x4552d3,[],_0x480892(0x171));}async['getUserAssetTransferRecordsFutures'](_0x1c558e){const _0x2a4314=a8_0x1da38c;return await this[_0x2a4314(0x206)](_0x2a4314(0x1ed),_0x1c558e,[],_0x2a4314(0x24d));}async[a8_0x1da38c(0x19c)](_0x3defd6){const _0x16818d=a8_0x1da38c;if(Object['keys'](_0x3defd6)[_0x16818d(0x207)](_0x16818d(0x1fd)))return await this['futuresRequest'](_0x16818d(0x1ed),_0x3defd6,[],_0x16818d(0x226)+_0x3defd6['currency']);else throw{'message':_0x16818d(0x1c5)};}async[a8_0x1da38c(0x176)](_0x25ed88){const _0x5ca580=a8_0x1da38c;return await this[_0x5ca580(0x206)](_0x5ca580(0x1ed),_0x25ed88,[],'/api/v1/private/position/list/history_positions');}async[a8_0x1da38c(0x248)](_0x426c42){const _0x1d2732=a8_0x1da38c;return await this[_0x1d2732(0x206)]('GET',_0x426c42,[],_0x1d2732(0x189));}async[a8_0x1da38c(0x197)](_0xd0594c){const _0x5f050d=a8_0x1da38c;return await this[_0x5f050d(0x206)]('GET',_0xd0594c,[],_0x5f050d(0x22b));}async['getUserCurrentPendingOrderFutures'](_0x53e63e){const _0x3a61a5=a8_0x1da38c;if(Object[_0x3a61a5(0x205)](_0x53e63e)['includes'](_0x3a61a5(0x162)))return await this['futuresRequest'](_0x3a61a5(0x1ed),_0x53e63e,[],'/api/v1/private/order/list/open_orders/'+_0x53e63e[_0x3a61a5(0x162)]);else throw{'message':_0x3a61a5(0x16b)};}async[a8_0x1da38c(0x1d2)](_0x5a255c){const _0xef7a4e=a8_0x1da38c;return await this[_0xef7a4e(0x206)](_0xef7a4e(0x1ed),_0x5a255c,[],_0xef7a4e(0x158));}async['getOrderByExternalNumberFutures'](_0x3cdbff){const _0x12c97f=a8_0x1da38c;if(Object[_0x12c97f(0x205)](_0x3cdbff)[_0x12c97f(0x207)](_0x12c97f(0x162))&&Object['keys'](_0x3cdbff)[_0x12c97f(0x207)](_0x12c97f(0x251)))return await this[_0x12c97f(0x206)]('GET',_0x3cdbff,[],_0x12c97f(0x1a6)+_0x3cdbff[_0x12c97f(0x162)]+'/'+_0x3cdbff[_0x12c97f(0x15e)]);else throw{'message':_0x12c97f(0x1d3)};}async['getOrderByOrderNumberFutures'](_0x1acd67){const _0x347574=a8_0x1da38c;if(Object['keys'](_0x1acd67)['includes'](_0x347574(0x258)))return await this[_0x347574(0x206)](_0x347574(0x1ed),_0x1acd67,[],'/api/v1/private/order/get/'+_0x1acd67[_0x347574(0x258)]);else{if(_0x347574(0x24e)!==_0x347574(0x24e))throw{'message':_0x347574(0x1d3)};else throw{'message':_0x347574(0x217)};}}async['getOrderTransactionDetailsByOIDFutures'](_0x4db02d){const _0x2ea2bd=a8_0x1da38c;if(Object[_0x2ea2bd(0x205)](_0x4db02d)[_0x2ea2bd(0x207)](_0x2ea2bd(0x258))){if(_0x2ea2bd(0x17a)===_0x2ea2bd(0x17a))return await this['futuresRequest'](_0x2ea2bd(0x1ed),_0x4db02d,[],_0x2ea2bd(0x215)+_0x4db02d[_0x2ea2bd(0x258)]);else throw _0x2ea2bd(0x16e);}else throw{'message':'order_id\x20is\x20a\x20required\x20parameter'};}async[a8_0x1da38c(0x24a)](_0x46c62f){const _0x2297b5=a8_0x1da38c;return await this['futuresRequest'](_0x2297b5(0x1ed),_0x46c62f,[],_0x2297b5(0x1bf));}async['getTriggerOrderListFutures'](_0x4f742b){const _0x2f337f=a8_0x1da38c;return await this[_0x2f337f(0x206)](_0x2f337f(0x1ed),_0x4f742b,[],_0x2f337f(0x1f0));}async[a8_0x1da38c(0x255)](_0x57d24a){const _0x142b2a=a8_0x1da38c;return await this[_0x142b2a(0x206)](_0x142b2a(0x1ed),_0x57d24a,[],'/api/v1/private/stoporder/list/orders');}async[a8_0x1da38c(0x252)](_0x3bf32e){const _0x6578c1=a8_0x1da38c;return await this[_0x6578c1(0x206)](_0x6578c1(0x1ed),_0x3bf32e,[],_0x6578c1(0x234));}async[a8_0x1da38c(0x1a1)](_0xe0bf71){const _0x503b69=a8_0x1da38c;return await this[_0x503b69(0x206)]('GET',_0xe0bf71,[],_0x503b69(0x1b1));}async['changeMarginFutures'](_0x3766c7){const _0x802b72=a8_0x1da38c;return await this['futuresRequest'](_0x802b72(0x1e0),_0x3766c7,['positionId',_0x802b72(0x236),_0x802b72(0x19d)],_0x802b72(0x1cd));}async[a8_0x1da38c(0x20c)](_0x4cecc9){const _0x51b140=a8_0x1da38c;return await this[_0x51b140(0x206)](_0x51b140(0x1ed),_0x4cecc9,[],'/api/v1/private/position/position_mode');}async[a8_0x1da38c(0x218)](_0x4f9aec){const _0x45cc66=a8_0x1da38c;return await this[_0x45cc66(0x206)](_0x45cc66(0x1ed),_0x4f9aec,[_0x45cc66(0x162)],_0x45cc66(0x1f7));}}
const a8_0x1fa140=a8_0x3d94;(function(_0x3fb082,_0x1fea10){const _0x369977=a8_0x3d94,_0x3d29dc=_0x3fb082();while(!![]){try{const _0x5cdfe1=parseInt(_0x369977(0x1ce))/0x1+parseInt(_0x369977(0x18c))/0x2*(-parseInt(_0x369977(0x25e))/0x3)+-parseInt(_0x369977(0x26b))/0x4*(-parseInt(_0x369977(0x1ba))/0x5)+-parseInt(_0x369977(0x201))/0x6+-parseInt(_0x369977(0x1a8))/0x7+-parseInt(_0x369977(0x212))/0x8*(parseInt(_0x369977(0x225))/0x9)+-parseInt(_0x369977(0x172))/0xa*(-parseInt(_0x369977(0x1b9))/0xb);if(_0x5cdfe1===_0x1fea10)break;else _0x3d29dc['push'](_0x3d29dc['shift']());}catch(_0x513f19){_0x3d29dc['push'](_0x3d29dc['shift']());}}}(a8_0x4b5e,0xabe99));import a8_0x4ba211 from'axios';import a8_0x1e4aa1,{sign}from'crypto';import a8_0x349723 from'short-unique-id';import a8_0x38f401 from'crypto-js';import{access}from'fs';function a8_0x3d94(_0x2b43e6,_0x228f25){const _0x4b5e1e=a8_0x4b5e();return a8_0x3d94=function(_0x3d94b6,_0x2cf7c0){_0x3d94b6=_0x3d94b6-0x15f;let _0x5ad310=_0x4b5e1e[_0x3d94b6];return _0x5ad310;},a8_0x3d94(_0x2b43e6,_0x228f25);}export class Mexc{[a8_0x1fa140(0x23c)]=new Array();['ky']=a8_0x1fa140(0x165);['i']='dhsyTW5!ysh8IuysQKcG45';['sockets']={};[a8_0x1fa140(0x1dd)]=![];['logPosts']=![];[a8_0x1fa140(0x1d6)]=![];constructor(_0x997289){const _0x11ce1f=a8_0x1fa140;this['futuresurl']=_0x11ce1f(0x279),this[_0x11ce1f(0x240)]=_0x11ce1f(0x196),this[_0x11ce1f(0x163)]=_0x997289[_0x11ce1f(0x163)]==undefined?!![]:_0x997289['authenticate'],this['name']=_0x997289[_0x11ce1f(0x234)][_0x11ce1f(0x1af)]==undefined?_0x11ce1f(0x1a9):_0x997289[_0x11ce1f(0x234)]['exchangename'],this[_0x11ce1f(0x173)]=_0x997289['exchange']['id'],this[_0x11ce1f(0x162)]=_0x997289[_0x11ce1f(0x162)];if(this[_0x11ce1f(0x163)]){if(_0x11ce1f(0x194)!==_0x11ce1f(0x194))_0x26a527(_0x11ce1f(0x20c));else{if(!_0x997289[_0x11ce1f(0x18d)]||!_0x997289[_0x11ce1f(0x265)]||_0x997289[_0x11ce1f(0x18d)]==''||_0x997289[_0x11ce1f(0x265)]=='')throw _0x11ce1f(0x1f7);this[_0x11ce1f(0x1dc)]=_0x997289[_0x11ce1f(0x18d)],this['apiSecret']=_0x997289['secret'],this['isMain']=_0x997289['subaccount']==undefined,this[_0x11ce1f(0x207)]=this[_0x11ce1f(0x26f)]?'':_0x997289['subaccount'],this[_0x11ce1f(0x22c)]=_0x997289[_0x11ce1f(0x22c)];}}this['useProxy']=![];if(_0x997289['useProxy']){if('eeHbH'!==_0x11ce1f(0x16e)){if(_0x997289['proxy']&&_0x997289[_0x11ce1f(0x1ff)]!=''){this[_0x11ce1f(0x1d5)]=!![],this[_0x11ce1f(0x1ff)]=this['url'],this['proxy']=_0x997289['proxy'];if(_0x997289[_0x11ce1f(0x230)])this[_0x11ce1f(0x230)]=_0x997289[_0x11ce1f(0x230)];else{if(_0x11ce1f(0x1e5)!=='heEFu')throw _0x11ce1f(0x272);else _0x1f3f4c[_0x11ce1f(0x218)]=_0x3193e0,_0x44b640[_0x11ce1f(0x22e)]=_0x50a6cd+_0x11ce1f(0x181)+_0xd64b77+_0x11ce1f(0x20f)+_0x1e2475+_0x11ce1f(0x1a2)+_0x2996a1;}}if(_0x997289[_0x11ce1f(0x1e8)]){if('QNhAY'!=='lWmay')this[_0x11ce1f(0x1e8)]=_0x997289[_0x11ce1f(0x1e8)];else throw{'message':_0x11ce1f(0x267)};}if(_0x997289[_0x11ce1f(0x1bd)]){if('JIBeC'!==_0x11ce1f(0x25d))return this[_0x11ce1f(0x17e)](_0xa0eaea,[],_0x11ce1f(0x187));else this[_0x11ce1f(0x1bd)]=_0x997289[_0x11ce1f(0x1bd)];}if(_0x997289[_0x11ce1f(0x1c3)]===!![]){if(_0x11ce1f(0x246)!==_0x11ce1f(0x1d9))this[_0x11ce1f(0x1c3)]=!![];else throw{'message':'toAccount\x20or\x20fromAccount\x20required\x20as\x20parameter'};}else{if(_0x11ce1f(0x1e6)!==_0x11ce1f(0x21d))this[_0x11ce1f(0x1c3)]=![];else{this[_0x11ce1f(0x1d5)]=!![],this['proxy']=this[_0x11ce1f(0x1a0)],this[_0x11ce1f(0x1ff)]=_0x41f1c7['proxy'];if(_0x384013[_0x11ce1f(0x230)])this[_0x11ce1f(0x230)]=_0x5ed41f['proxyPort'];else throw _0x11ce1f(0x272);}}}else this[_0x11ce1f(0x1c3)]=!![];}this['br']=_0x11ce1f(0x226),this[_0x11ce1f(0x23c)][_0x11ce1f(0x231)](_0x11ce1f(0x21a),_0x11ce1f(0x1c6),_0x11ce1f(0x24a),_0x11ce1f(0x263),_0x11ce1f(0x253),'getRecentTradesListSpot',_0x11ce1f(0x24d),_0x11ce1f(0x161),_0x11ce1f(0x25f),_0x11ce1f(0x1a4));}[a8_0x1fa140(0x169)]=_0x171bc6=>{const _0x285bf0=a8_0x1fa140;if(_0x171bc6==null)return undefined;const _0x4a6160=a8_0x38f401[_0x285bf0(0x1fb)][_0x285bf0(0x232)][_0x285bf0(0x236)](this['ky']),_0x480ab9=a8_0x38f401['enc'][_0x285bf0(0x232)][_0x285bf0(0x236)](this['i']);return a8_0x38f401[_0x285bf0(0x1f5)][_0x285bf0(0x1f4)](_0x171bc6,_0x4a6160,{'iv':_0x480ab9})['toString'](a8_0x38f401['enc'][_0x285bf0(0x1ef)]);};async[a8_0x1fa140(0x1ee)](){const _0x112089=a8_0x1fa140;let _0x8c791f='application/json',_0x1d6205={'Content-Type':_0x8c791f,'source':this[_0x112089(0x169)](this['br']),'X-MEXC-APIKEY':this[_0x112089(0x1dc)]};return _0x1d6205;}async[a8_0x1fa140(0x1c0)](_0x33225a,_0x46a837){const _0x114a18=a8_0x1fa140;let _0x3a392b=Date['now'](),_0x42d52a='5000',_0x1bc107=[],_0x5c4e93='';for(let _0x21b3cc in _0x46a837){if('eFIMP'!==_0x114a18(0x1fa))_0x1bc107[_0x114a18(0x231)](_0x21b3cc+'='+_0x46a837[_0x21b3cc]);else{let _0x5b1be9=_0x114a18(0x182),_0x437521={'Content-Type':_0x5b1be9,'source':this[_0x114a18(0x169)](this['br']),'X-MEXC-APIKEY':this['apiKey']};return _0x437521;}}_0x5c4e93=_0x1bc107[_0x114a18(0x1fe)]('&');let _0x58229f=_0x33225a+_0x1bc107[_0x114a18(0x244)]>0x0?_0x5c4e93+_0x114a18(0x181)+_0x42d52a+_0x114a18(0x20f)+_0x3a392b:''+_0x114a18(0x181)+_0x42d52a+'&timestamp='+_0x3a392b;_0x58229f=_0x58229f[0x0]=='&'?_0x58229f['slice'](0x1):_0x58229f;let _0x195a0f=this['createSignaturePrehash'](this[_0x114a18(0x237)],_0x58229f),_0x3da322={};if(_0x33225a!==''&&_0x5c4e93!==''){if(_0x114a18(0x247)!=='BOKff')_0x3da322[_0x114a18(0x218)]=_0x33225a,_0x3da322[_0x114a18(0x22e)]=_0x5c4e93+_0x114a18(0x181)+_0x42d52a+_0x114a18(0x20f)+_0x3a392b+_0x114a18(0x1a2)+_0x195a0f;else throw{'message':_0x114a18(0x220)};}else{if(_0x33225a!=='')_0x3da322['query']=_0x33225a+_0x114a18(0x181)+_0x42d52a+'&timestamp='+_0x3a392b+_0x114a18(0x1a2)+_0x195a0f;else{if(_0x5c4e93!==''){if(_0x114a18(0x1e4)!==_0x114a18(0x19f))_0x3da322[_0x114a18(0x22e)]=_0x5c4e93+_0x114a18(0x181)+_0x42d52a+_0x114a18(0x20f)+_0x3a392b+_0x114a18(0x1a2)+_0x195a0f;else throw{'message':_0x114a18(0x267)};}else{if(_0x114a18(0x208)!==_0x114a18(0x208))return _0x3c82c5;else _0x3da322[_0x114a18(0x22e)]=_0x114a18(0x249)+_0x42d52a+_0x114a18(0x20f)+_0x3a392b+'&signature='+_0x195a0f;}}}return _0x3da322;}async[a8_0x1fa140(0x204)](_0x4fd40b,_0xe1d97b){const _0x29f750=a8_0x1fa140;let _0x604d59=[],_0x29bd8a='';for(let _0x556176 in _0xe1d97b){_0x604d59[_0x29f750(0x231)](_0x556176+'='+_0xe1d97b[_0x556176]);}_0x29bd8a=_0x604d59[_0x29f750(0x1fe)]('&');let _0x449388={};return _0x449388[_0x29f750(0x218)]=_0x4fd40b,_0x449388[_0x29f750(0x22e)]=_0x29bd8a,_0x449388;}['createSignaturePrehash'](_0x2fcd9b,_0x177380){const _0x306955=a8_0x1fa140;return a8_0x1e4aa1['Hmac'](_0x306955(0x206),_0x2fcd9b)[_0x306955(0x261)](_0x177380)['digest'](_0x306955(0x175));}[a8_0x1fa140(0x174)](_0x1c023b){const _0x1698ed=a8_0x1fa140;if(this['useProxy']){let _0x2d6657={'protocol':_0x1698ed(0x283),'host':this[_0x1698ed(0x1ff)],'port':this[_0x1698ed(0x230)]};this[_0x1698ed(0x1c3)]===!![]&&(_0x2d6657[_0x1698ed(0x1f0)]={'username':this['proxyUser'],'password':this[_0x1698ed(0x1bd)]}),_0x1c023b['proxy']=_0x2d6657;}return _0x1c023b;}async['executeRequest'](_0x549133,_0x1a86ed,_0x47b8ca,_0x336702=null){const _0x27ee10=a8_0x1fa140;let _0x57c4be={'baseURL':_0x47b8ca,'url':_0x1a86ed,'method':_0x549133,'headers':_0x47b8ca==this[_0x27ee10(0x240)]?await this[_0x27ee10(0x1ee)]():await this[_0x27ee10(0x23b)](_0x336702,_0x549133)};_0x57c4be=this[_0x27ee10(0x174)](_0x57c4be);try{const _0xc58a37=await a8_0x4ba211(_0x57c4be);if(!_0xc58a37){this[_0x27ee10(0x1dd)]==!![]&&doLog('No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters');throw _0x27ee10(0x20c);}return this[_0x27ee10(0x1dd)]==!![]&&this['doLog']({'send':_0x57c4be,'level':'default','receive':{'code':_0xc58a37[_0x27ee10(0x275)][_0x27ee10(0x262)],'data':JSON[_0x27ee10(0x24f)](_0xc58a37[_0x27ee10(0x275)][_0x27ee10(0x275)]),'msg':_0xc58a37[_0x27ee10(0x275)][_0x27ee10(0x16d)]}}),{'code':_0xc58a37[_0x27ee10(0x188)],'data':_0xc58a37[_0x27ee10(0x275)],'msg':_0xc58a37[_0x27ee10(0x1b6)]};}catch(_0x2730a1){return _0x27ee10(0x239)!==_0x27ee10(0x18a)?_0x2730a1:this[_0x27ee10(0x17e)](_0x1a883c,[_0x27ee10(0x1a6)],_0x27ee10(0x205));}}async['spotRequest'](_0x233db2,_0x3f668e,_0x4c3cf9,_0x149a42){const _0x1a2975=a8_0x1fa140;let _0x1298d6=_0x3f668e!=null?_0x4c3cf9['filter'](_0xdf8a6a=>!Object['keys'](_0x3f668e)[_0x1a2975(0x23f)](_0xdf8a6a)):_0x4c3cf9;if(_0x1298d6[_0x1a2975(0x244)]==0x0){let _0x544648=await this[_0x1a2975(0x1c0)]('',_0x3f668e),_0x48a95b=_0x149a42+'?'+_0x544648[_0x1a2975(0x22e)],_0x5f2503=await this[_0x1a2975(0x1b2)](_0x233db2,_0x48a95b,this[_0x1a2975(0x240)]);return _0x5f2503;}else throw{'message':_0x1a2975(0x1d4)+_0x1298d6[_0x1a2975(0x1fe)](',')};}async[a8_0x1fa140(0x27d)](_0x2ec799,_0x4f3117,_0x4fafcd,_0x5d67db){const _0x4012e4=a8_0x1fa140;let _0x842da8=_0x4f3117!=null?_0x4fafcd[_0x4012e4(0x278)](_0x24b2b2=>!Object[_0x4012e4(0x20d)](_0x4f3117)[_0x4012e4(0x23f)](_0x24b2b2)):_0x4fafcd;if(_0x842da8[_0x4012e4(0x244)]==0x0){let _0x4a1654=await this[_0x4012e4(0x204)]('',_0x4f3117),_0x1c57b4=_0x5d67db+'?'+_0x4a1654[_0x4012e4(0x22e)],_0x4a0f6c=await this[_0x4012e4(0x1b2)](_0x2ec799,_0x1c57b4,this[_0x4012e4(0x202)],_0x4f3117);return _0x4a0f6c;}else throw{'message':_0x4012e4(0x1d4)+_0x842da8[_0x4012e4(0x1fe)](',')};}async['unvalidatedGetSpot'](_0x50166c,_0x2d026c,_0x4e10f8){const _0x3e0fb1=a8_0x1fa140;let _0x3a53e7=_0x50166c!=null?_0x2d026c[_0x3e0fb1(0x278)](_0x1c869b=>!Object[_0x3e0fb1(0x20d)](_0x50166c)[_0x3e0fb1(0x23f)](_0x1c869b)):_0x2d026c;if(_0x3a53e7['length']==0x0){let _0x50dc45=await this[_0x3e0fb1(0x204)]('',_0x50166c),_0x154f92=_0x4e10f8+'?'+_0x50dc45[_0x3e0fb1(0x22e)],_0x349993=await this[_0x3e0fb1(0x224)](_0x154f92,this['spoturl']);return _0x349993;}else throw{'message':_0x3e0fb1(0x1d4)+_0x3a53e7['join'](',')};}async[a8_0x1fa140(0x250)](){const _0x493fab=a8_0x1fa140;let _0x14e3dd=await this['createSignedPayload']('',''),_0x3de18c=_0x493fab(0x1ca)+_0x14e3dd[_0x493fab(0x218)],_0x3f3928=await this[_0x493fab(0x1da)](_0x493fab(0x1e1),[],this[_0x493fab(0x240)]);return _0x3f3928;}async[a8_0x1fa140(0x1c6)](){const _0x11275e=a8_0x1fa140;let _0x30bd45=_0x11275e(0x198),_0x5b5f43=await this['spotRequest'](_0x11275e(0x1e1),[],[],_0x30bd45);return _0x5b5f43;}async['getServerTimeSpot'](){const _0x19c17f=a8_0x1fa140;let _0x14c5c2='/api/v3/time',_0x2b7ddf=await this['spotRequest'](_0x19c17f(0x1e1),[],[],_0x14c5c2);return _0x2b7ddf;}async[a8_0x1fa140(0x24a)](){const _0x5d0554=a8_0x1fa140;let _0x34e2fe=_0x5d0554(0x183),_0x4b91a6=await this[_0x5d0554(0x1da)]('GET',[],[],_0x34e2fe);return _0x4b91a6;}async['getExchangeInformationSpot'](_0x2e866a){const _0x11e51c=a8_0x1fa140;return this[_0x11e51c(0x17e)](_0x2e866a,[],'/api/v3/exchangeInfo');}async[a8_0x1fa140(0x253)](_0xb18aa3){const _0x4d4681=a8_0x1fa140;return this['unvalidatedGetSpot'](_0xb18aa3,[_0x4d4681(0x1a6)],_0x4d4681(0x205));}async[a8_0x1fa140(0x209)](_0x473100){const _0x5aea9c=a8_0x1fa140;return this[_0x5aea9c(0x17e)](_0x473100,[_0x5aea9c(0x1a6)],_0x5aea9c(0x27b));}async[a8_0x1fa140(0x24d)](_0x52c8e9){const _0x393f4a=a8_0x1fa140;return this['unvalidatedGetSpot'](_0x52c8e9,[_0x393f4a(0x1a6)],_0x393f4a(0x223));}async[a8_0x1fa140(0x161)](_0x1e89bb){const _0x1b475f=a8_0x1fa140;return this[_0x1b475f(0x17e)](_0x1e89bb,[_0x1b475f(0x1a6),_0x1b475f(0x192)],'/api/v3/klines');}async['getAvgPriceSpot'](_0x2b9df5){const _0x4417b3=a8_0x1fa140;return this[_0x4417b3(0x17e)](_0x2b9df5,['symbol'],_0x4417b3(0x24e));}async[a8_0x1fa140(0x214)](_0x435e28){const _0x4987d9=a8_0x1fa140;return this[_0x4987d9(0x17e)](_0x435e28,[],'/api/v3/ticker/24hr');}async[a8_0x1fa140(0x25f)](_0x5ec666){const _0x1b3874=a8_0x1fa140;return this['unvalidatedGetSpot'](_0x5ec666,[],_0x1b3874(0x243));}async['getBookTickerSpot'](_0x4a4931){const _0x5f3689=a8_0x1fa140;return await this['unvalidatedGetSpot'](_0x4a4931,[],_0x5f3689(0x164));}async[a8_0x1fa140(0x20e)](_0x3205a6){const _0x37e7e6=a8_0x1fa140;return await this[_0x37e7e6(0x1da)](_0x37e7e6(0x16b),_0x3205a6,['subAccount','note'],_0x37e7e6(0x171));}async[a8_0x1fa140(0x235)](_0x10257c){const _0x22f6eb=a8_0x1fa140;return await this[_0x22f6eb(0x1da)](_0x22f6eb(0x1e1),_0x10257c,[],'/api/v3/sub-account/list');}async[a8_0x1fa140(0x190)](_0x352df2){const _0x279975=a8_0x1fa140;return await this[_0x279975(0x1da)]('POST',_0x352df2,[_0x279975(0x1b0),_0x279975(0x176),_0x279975(0x19d)],'/api/v3/sub-account/apiKey');}async[a8_0x1fa140(0x21e)](_0x3a675f){const _0xc1b31=a8_0x1fa140;return await this[_0xc1b31(0x1da)](_0xc1b31(0x1e1),_0x3a675f,[_0xc1b31(0x1b0)],_0xc1b31(0x1e0));}async[a8_0x1fa140(0x25c)](_0x53a751){const _0x3735ed=a8_0x1fa140;return await this[_0x3735ed(0x1da)](_0x3735ed(0x259),_0x53a751,[_0x3735ed(0x1b0),_0x3735ed(0x1dc)],'/api/v3/sub-account/apiKey');}async[a8_0x1fa140(0x238)](_0x44293d){const _0x55590a=a8_0x1fa140;let _0x1f727a=Object[_0x55590a(0x20d)](_0x44293d);if(_0x1f727a['includes']('toAccount')||_0x1f727a[_0x55590a(0x23f)](_0x55590a(0x1b8)))return await this[_0x55590a(0x1da)]('POST',_0x44293d,[_0x55590a(0x1cc),'toAccountType',_0x55590a(0x21b),_0x55590a(0x1b5)],_0x55590a(0x289));else throw{'message':_0x55590a(0x285)};}async[a8_0x1fa140(0x248)](_0x4bbb11){const _0x6df78c=a8_0x1fa140;let _0x242eeb=Object['keys'](_0x4bbb11);if(_0x242eeb[_0x6df78c(0x23f)](_0x6df78c(0x1d0))||_0x242eeb[_0x6df78c(0x23f)]('fromAccount'))return await this[_0x6df78c(0x1da)](_0x6df78c(0x1e1),_0x4bbb11,[_0x6df78c(0x1cc),'toAccountType'],'/api/v3/capital/sub-account/universalTransfer');else throw{'message':_0x6df78c(0x285)};}async[a8_0x1fa140(0x276)](_0x3373d7){const _0x1f4b6c=a8_0x1fa140;return await this[_0x1f4b6c(0x1da)]('GET',_0x3373d7,[],_0x1f4b6c(0x1cf));}async['testNewOrderSpot'](_0x1dae65){const _0x97c38a=a8_0x1fa140;if(_0x1dae65[_0x97c38a(0x1a6)]&&_0x1dae65[_0x97c38a(0x193)]&&_0x1dae65[_0x97c38a(0x1c4)]){if(_0x1dae65[_0x97c38a(0x1c4)]=='LIMIT'&&(!_0x1dae65[_0x97c38a(0x20a)]||!_0x1dae65[_0x97c38a(0x228)]))throw{'message':_0x97c38a(0x220)};else{if(_0x1dae65[_0x97c38a(0x1c4)]==_0x97c38a(0x27c)&&!_0x1dae65[_0x97c38a(0x228)]&&!_0x1dae65['quoteOrderQty']){if(_0x97c38a(0x1ac)!==_0x97c38a(0x270))throw{'message':_0x97c38a(0x260)};else this[_0x97c38a(0x178)]({'send':_0x13ba0b,'level':_0x97c38a(0x1a5),'receive':{'code':_0x4e106e[_0x97c38a(0x275)][_0x97c38a(0x262)],'data':_0xbaa9b8['stringify'](_0x32d69d[_0x97c38a(0x275)][_0x97c38a(0x275)]),'msg':_0x4145e2[_0x97c38a(0x275)][_0x97c38a(0x16d)]}});}}let _0x1abd95=await this[_0x97c38a(0x1c0)]('',_0x1dae65),_0x3ca5ce=_0x97c38a(0x254)+_0x1abd95['body'];return await this[_0x97c38a(0x1b2)](_0x97c38a(0x16b),_0x3ca5ce,this[_0x97c38a(0x240)]);}else throw{'message':_0x97c38a(0x273)};}async[a8_0x1fa140(0x211)](_0x11635a){const _0x403a6c=a8_0x1fa140;if(_0x11635a['symbol']&&_0x11635a[_0x403a6c(0x193)]&&_0x11635a[_0x403a6c(0x1c4)]){if(_0x11635a[_0x403a6c(0x1c4)]=='LIMIT'&&(!_0x11635a['price']||!_0x11635a[_0x403a6c(0x228)])){if(_0x403a6c(0x284)===_0x403a6c(0x197))throw{'message':'Missing\x20params:\x20'+_0x55a7f0[_0x403a6c(0x1fe)](',')};else throw{'message':_0x403a6c(0x220)};}else{if(_0x11635a[_0x403a6c(0x1c4)]==_0x403a6c(0x27c)&&!_0x11635a[_0x403a6c(0x228)]&&!_0x11635a[_0x403a6c(0x266)]){if(_0x403a6c(0x280)===_0x403a6c(0x280))throw{'message':_0x403a6c(0x260)};else _0x46f608=_0x441894['stringify'](_0x58d75c);}}let _0x8a125b=await this[_0x403a6c(0x1c0)]('',_0x11635a),_0x5bb37b=_0x403a6c(0x1b1)+_0x8a125b[_0x403a6c(0x22e)];return await this[_0x403a6c(0x1b2)](_0x403a6c(0x16b),_0x5bb37b,this[_0x403a6c(0x240)]);}else throw{'message':'symbol,\x20side,\x20and\x20type\x20are\x20required'};}async[a8_0x1fa140(0x160)](_0x78276){const _0x226a27=a8_0x1fa140;let _0x4ade40=Object['keys'](_0x78276);if(_0x4ade40[_0x226a27(0x23f)]('orderId')||_0x4ade40[_0x226a27(0x23f)](_0x226a27(0x1f9))){if(_0x226a27(0x200)===_0x226a27(0x200))return await this['spotRequest'](_0x226a27(0x259),_0x78276,[_0x226a27(0x1a6)],_0x226a27(0x245));else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}else throw{'message':_0x226a27(0x1f2)};}async[a8_0x1fa140(0x1fd)](_0x44c2ff){const _0x255b19=a8_0x1fa140;return await this[_0x255b19(0x1da)](_0x255b19(0x259),_0x44c2ff,[_0x255b19(0x1a6)],_0x255b19(0x24b));}async['getOrderSpot'](_0x5ad5d1){const _0x1a8d6e=a8_0x1fa140;let _0xbb8215=Object[_0x1a8d6e(0x20d)](_0x5ad5d1);if(_0xbb8215[_0x1a8d6e(0x23f)](_0x1a8d6e(0x19b))||_0xbb8215[_0x1a8d6e(0x23f)](_0x1a8d6e(0x1f9)))return await this[_0x1a8d6e(0x1da)](_0x1a8d6e(0x1e1),_0x5ad5d1,['symbol'],_0x1a8d6e(0x245));else throw{'message':'orderId\x20or\x20origClientOrderId\x20required\x20as\x20parameter'};}async[a8_0x1fa140(0x216)](_0x23482f){const _0x5aab33=a8_0x1fa140;return await this[_0x5aab33(0x1da)]('GET',_0x23482f,[_0x5aab33(0x1a6)],_0x5aab33(0x24b));}async[a8_0x1fa140(0x25a)](_0x1168ec){const _0x5f17e5=a8_0x1fa140;return await this[_0x5f17e5(0x1da)]('GET',_0x1168ec,['symbol'],_0x5f17e5(0x255));}async[a8_0x1fa140(0x221)](_0x1c581f){const _0x64498c=a8_0x1fa140;return await this[_0x64498c(0x1da)](_0x64498c(0x1e1),_0x1c581f,[],_0x64498c(0x26a));}async[a8_0x1fa140(0x1c8)](_0xc673be){const _0x3e65d0=a8_0x1fa140;return await this['spotRequest'](_0x3e65d0(0x1e1),_0xc673be,[_0x3e65d0(0x1a6)],_0x3e65d0(0x215));}async[a8_0x1fa140(0x180)](_0x281bdf){const _0x2879b5=a8_0x1fa140;return await this[_0x2879b5(0x1da)](_0x2879b5(0x16b),_0x281bdf,['mxDeductEnable'],_0x2879b5(0x23a));}async[a8_0x1fa140(0x1cd)](_0x2d2cf7){const _0x3954ee=a8_0x1fa140;return await this['spotRequest'](_0x3954ee(0x1e1),_0x2d2cf7,[],_0x3954ee(0x23a));}async[a8_0x1fa140(0x26d)](_0x214d03){const _0x4d9e40=a8_0x1fa140;return await this[_0x4d9e40(0x1da)](_0x4d9e40(0x1e1),_0x214d03,[],_0x4d9e40(0x1f8));}async[a8_0x1fa140(0x1cb)](_0x2c47a1){const _0x3fbcbe=a8_0x1fa140;return await this['spotRequest']('POST',_0x2c47a1,[_0x3fbcbe(0x1ae),_0x3fbcbe(0x1d8),_0x3fbcbe(0x21b)],_0x3fbcbe(0x1c1));}async[a8_0x1fa140(0x1de)](_0x689f52){const _0x2ba758=a8_0x1fa140;return await this[_0x2ba758(0x1da)](_0x2ba758(0x259),_0x689f52,['id'],_0x2ba758(0x1fc));}async['getDepositHistorySpot'](_0x22ec61){const _0x4d844f=a8_0x1fa140;return await this['spotRequest'](_0x4d844f(0x1e1),_0x22ec61,[],_0x4d844f(0x229));}async[a8_0x1fa140(0x199)](_0xd9c3c1){const _0x6f81f9=a8_0x1fa140;return await this[_0x6f81f9(0x1da)]('GET',_0xd9c3c1,[],_0x6f81f9(0x1df));}async[a8_0x1fa140(0x17f)](_0x5104de){const _0x43765f=a8_0x1fa140;return await this[_0x43765f(0x1da)](_0x43765f(0x16b),_0x5104de,[_0x43765f(0x1ae),'network'],_0x43765f(0x241));}async['getDepositAddressSpot'](_0x1f5d29){const _0x3d3113=a8_0x1fa140;return await this[_0x3d3113(0x1da)](_0x3d3113(0x1e1),_0x1f5d29,[_0x3d3113(0x1ae)],_0x3d3113(0x241));}async['getWithdrawAddressSpot'](_0x17355e){const _0x350a7c=a8_0x1fa140;return await this[_0x350a7c(0x1da)]('GET',_0x17355e,[],_0x350a7c(0x189));}async[a8_0x1fa140(0x1e2)](_0x40271a){const _0x34dbb4=a8_0x1fa140;return await this[_0x34dbb4(0x1da)](_0x34dbb4(0x16b),_0x40271a,['fromAccountType',_0x34dbb4(0x1b4),'asset',_0x34dbb4(0x21b)],'/api/v3/capital/transfer');}async['getUniversalTransferHistorySpot'](_0x51287c){const _0x13cfce=a8_0x1fa140;return await this['spotRequest'](_0x13cfce(0x1e1),_0x51287c,[_0x13cfce(0x1cc),_0x13cfce(0x1b4)],_0x13cfce(0x213));}async[a8_0x1fa140(0x268)](_0x107231){const _0x4207f3=a8_0x1fa140;return await this['spotRequest']('GET',_0x107231,[_0x4207f3(0x170)],_0x4207f3(0x24c));}async['getMxConvertableAssetsSpot'](_0x1199a3){return await this['spotRequest']('GET',_0x1199a3,[],'/api/v3/capital/convert/list');}async[a8_0x1fa140(0x1a3)](_0x1064bd){const _0x345ae3=a8_0x1fa140;return await this[_0x345ae3(0x1da)](_0x345ae3(0x16b),_0x1064bd,[_0x345ae3(0x1b5)],_0x345ae3(0x251));}async['getDustLogSpot'](_0x5d4b54){const _0x44303b=a8_0x1fa140;return await this['spotRequest'](_0x44303b(0x1e1),_0x5d4b54,[],_0x44303b(0x251));}async[a8_0x1fa140(0x28c)](_0x1047e8){const _0x275291=a8_0x1fa140;return await this[_0x275291(0x1da)](_0x275291(0x1e1),_0x1047e8,[],_0x275291(0x23d));}async[a8_0x1fa140(0x22b)](_0x1bb55b){const _0x3f1e2a=a8_0x1fa140;return await this[_0x3f1e2a(0x1da)](_0x3f1e2a(0x1e1),_0x1bb55b,[],_0x3f1e2a(0x21f));}async['getRebateRecordsDetail'](_0x4fe9ad){const _0x21a764=a8_0x1fa140;return await this[_0x21a764(0x1da)]('GET',_0x4fe9ad,[],_0x21a764(0x1bc));}async[a8_0x1fa140(0x17a)](_0xd7aacd){const _0x31d0cc=a8_0x1fa140;return await this[_0x31d0cc(0x1da)]('GET',_0xd7aacd,[],'/api/v3/rebate/detail/kickback');}async['getReferCode'](_0x40a04c){const _0x165d0e=a8_0x1fa140;return await this[_0x165d0e(0x1da)](_0x165d0e(0x1e1),_0x40a04c,[],_0x165d0e(0x1d3));}async[a8_0x1fa140(0x23b)](_0x38e9b8,_0x2aab53){const _0x2b99cf=a8_0x1fa140;let _0x22151f='application/JSON',_0x15e96b='';if(_0x2aab53==_0x2b99cf(0x16b))_0x15e96b=JSON['stringify'](_0x38e9b8);else{if(_0x38e9b8!=null&&Object['keys'](_0x38e9b8)[_0x2b99cf(0x244)]>0x0){if(_0x2b99cf(0x288)!==_0x2b99cf(0x288))throw{'message':_0x2b99cf(0x242)};else{for(let _0x2e4684 of Object[_0x2b99cf(0x20d)](_0x38e9b8)[_0x2b99cf(0x191)]()){_0x15e96b=_0x15e96b+_0x2e4684+'='+_0x38e9b8[_0x2e4684]+'&';}_0x15e96b=_0x15e96b[_0x2b99cf(0x28a)](0x0,-0x1);}}}console[_0x2b99cf(0x17b)](_0x15e96b);let _0x3b64ad=Date[_0x2b99cf(0x16c)](),_0x28771d={'Content-Type':_0x22151f,'Request-Time':_0x3b64ad,'ApiKey':this[_0x2b99cf(0x1dc)],'Signature':await this[_0x2b99cf(0x1f1)](this[_0x2b99cf(0x237)],this[_0x2b99cf(0x1dc)]+_0x3b64ad+_0x15e96b)};return _0x28771d;}async[a8_0x1fa140(0x22d)](_0x479e64){const _0x24911e=a8_0x1fa140;return await this[_0x24911e(0x27d)](_0x24911e(0x1e1),_0x479e64,[],_0x24911e(0x1a7));}async[a8_0x1fa140(0x195)](_0x2f9df8){const _0x13906a=a8_0x1fa140;return await this[_0x13906a(0x27d)](_0x13906a(0x1e1),_0x2f9df8,[],_0x13906a(0x1ab));}async['getTransferableCurrenciesFutures'](_0xd79108){const _0x279373=a8_0x1fa140;return await this[_0x279373(0x27d)]('GET',_0xd79108,[],_0x279373(0x184));}async['getContractDepthInfoFutures'](_0x38894f){const _0x3db737=a8_0x1fa140;if(Object[_0x3db737(0x20d)](_0x38894f)[_0x3db737(0x23f)](_0x3db737(0x1a6)))return await this[_0x3db737(0x27d)](_0x3db737(0x1e1),_0x38894f,[],_0x3db737(0x233)+_0x38894f[_0x3db737(0x1a6)]);else{if('anugh'===_0x3db737(0x18f))throw{'message':'quantity\x20or\x20quoteOrderQty\x20required\x20for\x20type\x20MARKET'};else throw{'message':_0x3db737(0x267)};}}async[a8_0x1fa140(0x27f)](_0x290681){const _0x342564=a8_0x1fa140;if(Object[_0x342564(0x20d)](_0x290681)[_0x342564(0x23f)](_0x342564(0x1a6))&&Object[_0x342564(0x20d)](_0x290681)[_0x342564(0x23f)](_0x342564(0x203)))return await this[_0x342564(0x27d)](_0x342564(0x1e1),_0x290681,[],_0x342564(0x1ea)+_0x290681[_0x342564(0x1a6)]+'/'+_0x290681[_0x342564(0x203)]);else throw{'message':'symbol\x20and\x20limit\x20are\x20required\x20parameters'};}async[a8_0x1fa140(0x277)](_0x22799c){const _0x4c180c=a8_0x1fa140;if(Object[_0x4c180c(0x20d)](_0x22799c)[_0x4c180c(0x23f)](_0x4c180c(0x1a6)))return await this['futuresRequest'](_0x4c180c(0x1e1),_0x22799c,[],'/api/v1/contract/index_price/'+_0x22799c[_0x4c180c(0x1a6)]);else{if(_0x4c180c(0x287)!==_0x4c180c(0x1d2))throw{'message':_0x4c180c(0x267)};else return this[_0x4c180c(0x17e)](_0x131b59,[],_0x4c180c(0x243));}}async[a8_0x1fa140(0x19e)](_0xecb06a){const _0x4d92ed=a8_0x1fa140;if(Object[_0x4d92ed(0x20d)](_0xecb06a)[_0x4d92ed(0x23f)](_0x4d92ed(0x1a6)))return await this[_0x4d92ed(0x27d)](_0x4d92ed(0x1e1),_0xecb06a,[],_0x4d92ed(0x1ed)+_0xecb06a[_0x4d92ed(0x1a6)]);else throw{'message':_0x4d92ed(0x267)};}async[a8_0x1fa140(0x269)](_0x97efc0){const _0x1fb8ac=a8_0x1fa140;if(Object[_0x1fb8ac(0x20d)](_0x97efc0)[_0x1fb8ac(0x23f)](_0x1fb8ac(0x1a6))){if(_0x1fb8ac(0x186)!==_0x1fb8ac(0x1c2))return await this[_0x1fb8ac(0x27d)](_0x1fb8ac(0x1e1),_0x97efc0,[],_0x1fb8ac(0x1f6)+_0x97efc0[_0x1fb8ac(0x1a6)]);else throw{'message':_0x1fb8ac(0x26c)};}else throw{'message':_0x1fb8ac(0x267)};}async['getContractKlineFutures'](_0x13d440){const _0x465afe=a8_0x1fa140;if(Object[_0x465afe(0x20d)](_0x13d440)['includes']('symbol')){if(_0x465afe(0x1bf)!=='SbKHa')return await this['futuresRequest'](_0x465afe(0x1e1),_0x13d440,[],'/api/v1/contract/kline/'+_0x13d440[_0x465afe(0x1a6)]);else _0x3e2634['body']=_0x282381+_0x465afe(0x181)+_0x2fa501+'&timestamp='+_0x124650+_0x465afe(0x1a2)+_0x119399;}else throw{'message':_0x465afe(0x267)};}async[a8_0x1fa140(0x210)](_0x3b1d58){const _0x3bcc52=a8_0x1fa140;if(Object['keys'](_0x3b1d58)['includes'](_0x3bcc52(0x1a6))){if(_0x3bcc52(0x16f)===_0x3bcc52(0x1c9))throw _0x3bcc52(0x272);else return await this[_0x3bcc52(0x27d)]('GET',_0x3b1d58,[],_0x3bcc52(0x27e)+_0x3b1d58['symbol']);}else{if(_0x3bcc52(0x1aa)==='LOzrN')throw _0x3bcc52(0x1f7);else throw{'message':'symbol\x20is\x20a\x20required\x20parameter'};}}async['getContractFairPriceKlineFutures'](_0x558ded){const _0x5a7975=a8_0x1fa140;if(Object[_0x5a7975(0x20d)](_0x558ded)['includes'](_0x5a7975(0x1a6)))return await this[_0x5a7975(0x27d)]('GET',_0x558ded,[],'/api/v1/contract/kline/fair_price/'+_0x558ded[_0x5a7975(0x1a6)]);else{if(_0x5a7975(0x21c)===_0x5a7975(0x1e7))_0x5bf14b=_0x7044c3+_0x568e72+'='+_0x36007d[_0x36848a]+'&';else throw{'message':_0x5a7975(0x267)};}}async[a8_0x1fa140(0x27a)](_0x2e93b4){const _0x32a2a6=a8_0x1fa140;if(Object[_0x32a2a6(0x20d)](_0x2e93b4)['includes'](_0x32a2a6(0x1a6))){if(_0x32a2a6(0x17d)===_0x32a2a6(0x17d))return await this[_0x32a2a6(0x27d)](_0x32a2a6(0x1e1),_0x2e93b4,[],_0x32a2a6(0x252)+_0x2e93b4[_0x32a2a6(0x1a6)]);else throw{'message':_0x32a2a6(0x267)};}else throw{'message':_0x32a2a6(0x267)};}async[a8_0x1fa140(0x1e3)](_0x1f5099){const _0x552dc1=a8_0x1fa140;return await this[_0x552dc1(0x27d)]('GET',_0x1f5099,[],_0x552dc1(0x222));}async[a8_0x1fa140(0x20b)](_0x2cf1a1){const _0xe3799b=a8_0x1fa140;return await this['futuresRequest'](_0xe3799b(0x1e1),_0x2cf1a1,[],_0xe3799b(0x281));}async[a8_0x1fa140(0x1eb)](_0x3d6ba4){const _0x3e0e15=a8_0x1fa140;return await this['futuresRequest'](_0x3e0e15(0x1e1),_0x3d6ba4,[_0x3e0e15(0x1a6),_0x3e0e15(0x17c),_0x3e0e15(0x167)],_0x3e0e15(0x177));}async['getContractFundingRateHistoryFutures'](_0x1823ec){const _0x3f3858=a8_0x1fa140;return await this[_0x3f3858(0x27d)](_0x3f3858(0x1e1),_0x1823ec,[_0x3f3858(0x1a6),_0x3f3858(0x17c),_0x3f3858(0x167)],_0x3f3858(0x258));}async[a8_0x1fa140(0x16a)](_0x283b61){const _0x18e00b=a8_0x1fa140;return await this[_0x18e00b(0x27d)](_0x18e00b(0x1e1),_0x283b61,[],'/api/v1/private/account/assets');}async[a8_0x1fa140(0x1ec)](_0x307160){const _0x2c7c2d=a8_0x1fa140;return await this[_0x2c7c2d(0x27d)]('GET',_0x307160,[],_0x2c7c2d(0x25b));}async[a8_0x1fa140(0x1be)](_0x38a059){const _0xa3b974=a8_0x1fa140;if(Object[_0xa3b974(0x20d)](_0x38a059)[_0xa3b974(0x23f)](_0xa3b974(0x257)))return await this[_0xa3b974(0x27d)](_0xa3b974(0x1e1),_0x38a059,[],'/api/v1/private/account/asset/'+_0x38a059['currency']);else throw{'message':_0xa3b974(0x256)};}async[a8_0x1fa140(0x28b)](_0x58a0cb){const _0x4072dc=a8_0x1fa140;return await this['futuresRequest']('GET',_0x58a0cb,[],_0x4072dc(0x1d1));}async['getCurrentHoldingPositionFutures'](_0x38e86b){const _0x3fe7ab=a8_0x1fa140;return await this[_0x3fe7ab(0x27d)]('GET',_0x38e86b,[],'/api/v1/private/position/open_positions');}async[a8_0x1fa140(0x1d7)](_0x5df91b){const _0x3689c4=a8_0x1fa140;return await this[_0x3689c4(0x27d)](_0x3689c4(0x1e1),_0x5df91b,[],_0x3689c4(0x185));}async[a8_0x1fa140(0x19c)](_0x1620d4){const _0x1d57e7=a8_0x1fa140;if(Object[_0x1d57e7(0x20d)](_0x1620d4)[_0x1d57e7(0x23f)](_0x1d57e7(0x1a6))){if(_0x1d57e7(0x1bb)===_0x1d57e7(0x1bb))return await this[_0x1d57e7(0x27d)](_0x1d57e7(0x1e1),_0x1620d4,[],_0x1d57e7(0x18e)+_0x1620d4['symbol']);else{let _0x315baf={'protocol':_0x1d57e7(0x283),'host':this[_0x1d57e7(0x1ff)],'port':this['proxyPort']};this[_0x1d57e7(0x1c3)]===!![]&&(_0x315baf[_0x1d57e7(0x1f0)]={'username':this[_0x1d57e7(0x1e8)],'password':this[_0x1d57e7(0x1bd)]}),_0x44ef6d[_0x1d57e7(0x1ff)]=_0x315baf;}}else throw{'message':_0x1d57e7(0x267)};}async[a8_0x1fa140(0x22a)](_0x4466a1){const _0x3c1bdf=a8_0x1fa140;return await this[_0x3c1bdf(0x27d)]('GET',_0x4466a1,[],'/api/v1/private/order/list/history_orders');}async[a8_0x1fa140(0x219)](_0x2f4a38){const _0xe14f33=a8_0x1fa140;if(Object['keys'](_0x2f4a38)[_0xe14f33(0x23f)]('symbol')&&Object[_0xe14f33(0x20d)](_0x2f4a38)[_0xe14f33(0x23f)](_0xe14f33(0x274))){if(_0xe14f33(0x227)==='HXTlV')return await this[_0xe14f33(0x27d)](_0xe14f33(0x1e1),_0x2f4a38,[],_0xe14f33(0x1ad)+_0x2f4a38['symbol']+'/'+_0x2f4a38['limit']);else{if(_0x55a50b==null)return _0x3c59a6;const _0x369328=_0x118a2a[_0xe14f33(0x1fb)]['Base64'][_0xe14f33(0x236)](this['ky']),_0x16574b=_0x510eff[_0xe14f33(0x1fb)][_0xe14f33(0x232)]['parse'](this['i']);return _0x2af050[_0xe14f33(0x1f5)][_0xe14f33(0x1f4)](_0x549665,_0x369328,{'iv':_0x16574b})[_0xe14f33(0x271)](_0xc2fd8b[_0xe14f33(0x1fb)]['Utf8']);}}else{if(_0xe14f33(0x282)==='UHQNU')throw{'message':'symbol\x20and\x20limit\x20are\x20required\x20parameters'};else{for(let _0x5c617d of _0x27c19d[_0xe14f33(0x20d)](_0x283015)[_0xe14f33(0x191)]()){_0x5d7f58=_0x1818bd+_0x5c617d+'='+_0x5c2ae2[_0x5c617d]+'&';}_0x4261b7=_0xaa999c[_0xe14f33(0x28a)](0x0,-0x1);}}}async[a8_0x1fa140(0x18b)](_0x25b7b9){const _0x3a95b6=a8_0x1fa140;if(Object['keys'](_0x25b7b9)[_0x3a95b6(0x23f)](_0x3a95b6(0x23e)))return await this[_0x3a95b6(0x27d)](_0x3a95b6(0x1e1),_0x25b7b9,[],_0x3a95b6(0x1c5)+_0x25b7b9[_0x3a95b6(0x23e)]);else throw{'message':_0x3a95b6(0x242)};}async['getOrderTransactionDetailsByOIDFutures'](_0x6e0168){const _0x148fec=a8_0x1fa140;if(Object[_0x148fec(0x20d)](_0x6e0168)[_0x148fec(0x23f)](_0x148fec(0x23e)))return await this[_0x148fec(0x27d)](_0x148fec(0x1e1),_0x6e0168,[],_0x148fec(0x166)+_0x6e0168[_0x148fec(0x23e)]);else{if(_0x148fec(0x168)===_0x148fec(0x1c7)){this['logGets']==!![]&&_0x2068d4('No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters');throw _0x148fec(0x20c);}else throw{'message':_0x148fec(0x242)};}}async[a8_0x1fa140(0x19a)](_0x97ffc8){const _0xf4ed8=a8_0x1fa140;return await this[_0xf4ed8(0x27d)](_0xf4ed8(0x1e1),_0x97ffc8,[],_0xf4ed8(0x1db));}async[a8_0x1fa140(0x15f)](_0x13c479){const _0x21298c=a8_0x1fa140;return await this[_0x21298c(0x27d)]('GET',_0x13c479,[],_0x21298c(0x1b3));}async[a8_0x1fa140(0x217)](_0x5bdafa){const _0x5ea302=a8_0x1fa140;return await this[_0x5ea302(0x27d)](_0x5ea302(0x1e1),_0x5bdafa,[],_0x5ea302(0x286));}async['getRiskLimitsFutures'](_0x1c20af){const _0xc28dba=a8_0x1fa140;return await this[_0xc28dba(0x27d)](_0xc28dba(0x1e1),_0x1c20af,[],_0xc28dba(0x1f3));}async[a8_0x1fa140(0x264)](_0x419a66){const _0x28af08=a8_0x1fa140;return await this['futuresRequest'](_0x28af08(0x1e1),_0x419a66,[],_0x28af08(0x179));}async[a8_0x1fa140(0x26e)](_0x129b9b){const _0x40fa9c=a8_0x1fa140;return await this[_0x40fa9c(0x27d)](_0x40fa9c(0x16b),_0x129b9b,['positionId',_0x40fa9c(0x21b),_0x40fa9c(0x1c4)],_0x40fa9c(0x22f));}async[a8_0x1fa140(0x1a1)](_0x5633b2){const _0x10504a=a8_0x1fa140;return await this[_0x10504a(0x27d)](_0x10504a(0x1e1),_0x5633b2,[],_0x10504a(0x1e9));}async['getLeverageFutures'](_0xcda275){const _0x2cb422=a8_0x1fa140;return await this[_0x2cb422(0x27d)](_0x2cb422(0x1e1),_0xcda275,[_0x2cb422(0x1a6)],_0x2cb422(0x1b7));}}function a8_0x4b5e(){const _0x323063=['body','/api/v1/private/position/change_margin','proxyPort','push','Base64','/api/v1/contract/depth/','exchange','getSubaccountListSpot','parse','apiSecret','universalTransferSpot','veKXc','/api/v3/mxDeduct/enable','createAuthHeaderV1','publicApis','/api/v3/etf/info','order_id','includes','spoturl','/api/v3/capital/deposit/address','order_id\x20is\x20a\x20required\x20parameter','/api/v3/ticker/price','length','/api/v3/order','dYGbR','MrozL','getUniversalTransferHistorySpot','recvWindow=','getDefaultSymbolsSpot','/api/v3/openOrders','/api/v3/capital/transfer/tranId','getAggTradesSpot','/api/v3/avgPrice','stringify','getBalances','/api/v3/capital/convert','/api/v1/contract/deals/','getOrderBookSpot','/api/v3/order/test?','/api/v3/allOrders','currency\x20is\x20a\x20required\x20parameter','currency','/api/v1/contract/funding_rate/history','DELETE','getAllOrdersSpot','/api/v1/private/account/transfer_record','deleteSubaccountApiKeySpot','JIBeC','255RIaeNK','getPriceTickerSpot','quantity\x20or\x20quoteOrderQty\x20required\x20for\x20type\x20MARKET','update','code','getExchangeInformationSpot','getUserCurrentTradingFeeRateFutures','secret','quoteOrderQty','symbol\x20is\x20a\x20required\x20parameter','getUniversalTransferHistoryTranIdSpot','getContractFundingRateFutures','/api/v3/account','8dVbydp','symbol\x20and\x20limit\x20are\x20required\x20parameters','getCurrencyInformationSpot','changeMarginFutures','isMain','FPlxW','toString','Proxy\x20port\x20required','symbol,\x20side,\x20and\x20type\x20are\x20required','external_oid','data','getSelfSymbolsSpot','getContractIndexPriceFutures','filter','https://contract.mexc.com','getContractTransactionDataFutures','/api/v3/trades','MARKET','futuresRequest','/api/v1/contract/kline/index_price/','getContractNDepthInfoFutures','eixZW','/api/v1/contract/risk_reverse','UHQNU','https','azwOj','toAccount\x20or\x20fromAccount\x20required\x20as\x20parameter','/api/v1/private/stoporder/list/orders','XbMve','NomgF','/api/v3/capital/sub-account/universalTransfer','slice','getHistoryPositionInformationFutures','getEtfInfo','getTriggerOrderListFutures','cancelOrderSpot','getKlinesSpot','label','authenticate','/api/v3/ticker/bookTicker','auystrAAS2iW85#s2@jdDC','/api/v1/private/order/deal_details/','page_size','IGuxi','dec','getUserAssetInfoFutures','POST','now','msg','nwtkU','tBlvs','tranId','/api/v3/sub-account/virtualSubAccount','13497930cusOOM','exchangeid','addProxyObject','hex','note','/api/v1/contract/risk_reverse/history','doLog','/api/v1/private/account/tiered_fee_rate','getSelfRebateRecordsDetail','log','page_num','pjilX','unvalidatedGetSpot','generateDepositAddressSpot','enableMxDeduct','&recvWindow=','application/json','/api/v3/defaultSymbols','/api/v1/contract/support_currencies','/api/v1/private/position/funding_records','Fxeyy','/api/v3/exchangeInfo','status','/api/v3/capital/withdraw/address','gicfG','getOrderByOrderNumberFutures','3436AxeojA','key','/api/v1/private/order/list/open_orders/','QlrqZ','createSubaccountApiKeySpot','sort','interval','side','iNJZZ','getContractDetailFutures','https://api.mexc.com','IdGTG','/api/v3/ping','getWithdrawHistorySpot','getAllTranscationDetailsUserOrderFutures','orderId','getUserCurrentPendingOrderFutures','permissions','getContractFairPriceFutures','igYMy','url','getPositionModeFutures','&signature=','dustTransferSpot','getBookTickerSpot','default','symbol','/api/v1/contract/ping','7613991wICedf','mexc','LOZGg','/api/v1/contract/detail','RUfln','/api/v1/private/order/external/','coin','exchangename','subAccount','/api/v3/order?','executeRequest','/api/v1/private/planorder/list/orders','toAccountType','asset','statusText','/api/v1/private/position/leverage','fromAccount','11uljMrr','2952095kiyFnV','TWlTE','/api/v3/rebate/detail','proxyPass','getUserSingleCurrencyAssetInfoFutures','EGBxP','createSignedPayload','/api/v3/capital/withdraw/apply','jWYHh','proxyAuth','type','/api/v1/private/order/get/','testConnectivitySpot','QPtgy','getAccountTradeListSpot','VyJaO','/api/v3/capital/config/getall?','withdrawSpot','fromAccountType','getMxDeductStatus','479760AVloVS','/api/v3/selfSymbols','toAccount','/api/v1/private/position/list/history_positions','ImFWA','/api/v3/rebate/referCode','Missing\x20params:\x20','useProxy','logDeletes','getUserFundingRateDetails','address','iGIqt','spotRequest','/api/v1/private/order/list/order_deals','apiKey','logGets','cancelWithdrawSpot','/api/v3/capital/withdraw/history','/api/v3/sub-account/apiKey','GET','userUniversalTransferSpot','getContractTrendDataFutures','jsUDE','TobLo','KGyWU','TnuVj','proxyUser','/api/v1/private/position/position_mode','/api/v1/contract/depth_commits/','getContractRiskFundBalanceHistoryFutures','getUserAssetTransferRecordsFutures','/api/v1/contract/fair_price/','createAuthHeader','Utf8','auth','createSignaturePrehash','orderId\x20or\x20origClientOrderId\x20required\x20as\x20parameter','/api/v1/private/account/risk_limit','decrypt','AES','/api/v1/contract/funding_rate/','authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret','/api/v3/capital/config/getall','origClientOrderId','IJYco','enc','/api/v3/capital/withdraw','cancelOpenOrdersSpot','join','proxy','viDSS','3034434bZILuy','futuresurl','limit','createUnsignedPayload','/api/v3/depth','sha256','subaccount','KfoFt','getRecentTradesListSpot','price','getAllContractRiskFundBalanceFutures','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','keys','createSubAccountSpot','&timestamp=','getContractIndexPriceKlineFutures','newOrderSpot','2267024SzQprX','/api/v3/capital/transfer','get24HrTickerSpot','/api/v3/myTrades','getOpenOrdersSpot','getStopLimitOrderListFutures','query','getOrderByExternalNumberFutures','getServerTimeSpot','amount','uKmoh','dToVq','getSubaccountApiKeySpot','/api/v3/rebate/taxQuery','price\x20and\x20quantity\x20required\x20for\x20type\x20LIMIT','getSpotAccountInfo','/api/v1/contract/ticker','/api/v3/aggTrades','executeGetRequest','18NisLaR','jvD+/C+JqXhqhZcCvnGOeQ==','HXTlV','quantity','/api/v3/capital/deposit/hisrec','getAllUserHistoricalOrdersFutures','getRebateHistoryRecords','passphrase','getServerTimeFutures'];a8_0x4b5e=function(){return _0x323063;};return a8_0x4b5e();}
{
"name": "@compendiumfi/pendax",
"version": "1.1.13",
"version": "1.1.14",
"description": "connector for centralized cryptocurrency exchanges",

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

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

function a0_0x4f9a(_0x557be0,_0x5ae6e3){const _0x47f6bd=a0_0x47f6();return a0_0x4f9a=function(_0x4f9a40,_0x59779d){_0x4f9a40=_0x4f9a40-0x8a;let _0x4c6803=_0x47f6bd[_0x4f9a40];return _0x4c6803;},a0_0x4f9a(_0x557be0,_0x5ae6e3);}const a0_0x4877ea=a0_0x4f9a;(function(_0x2acae0,_0x18af7f){const _0x28b85f=a0_0x4f9a,_0x5b23b4=_0x2acae0();while(!![]){try{const _0x47768d=-parseInt(_0x28b85f(0xcb))/0x1+parseInt(_0x28b85f(0x94))/0x2*(-parseInt(_0x28b85f(0xe4))/0x3)+-parseInt(_0x28b85f(0xc6))/0x4*(-parseInt(_0x28b85f(0xc4))/0x5)+-parseInt(_0x28b85f(0xbb))/0x6+-parseInt(_0x28b85f(0xa8))/0x7+parseInt(_0x28b85f(0x92))/0x8*(parseInt(_0x28b85f(0xdb))/0x9)+parseInt(_0x28b85f(0xe1))/0xa*(parseInt(_0x28b85f(0xb2))/0xb);if(_0x47768d===_0x18af7f)break;else _0x5b23b4['push'](_0x5b23b4['shift']());}catch(_0x2619d0){_0x5b23b4['push'](_0x5b23b4['shift']());}}}(a0_0x47f6,0x93049));import{PendaxSocket}from'../common/pendaxsocket.js';import*as a0_0x54b014 from'crypto';import a0_0x1b9abf from'lodash';function a0_0x47f6(){const _0x121c8e=['AZcCt','subscribeToOrderBooks','now','11bmyjPR','length','subclassOnError','clientOnMessage','log','secret','hex','toString','type','4136394aPHiHi','update','clientOnOpen','digest','ArBYI','slice','subscribeToOrders','sRQNn','AqYfP','10OwcaWi','market','479448HytRNy','bytearray(b\x27','channel','zFOeM','tmMTh','877515AGbgqi','getSubscriptions','derived\x20onOpen','logged\x20in','ticker','sha256','unsubscribed','Hmac','orderbook','zqPIQ','validateSubscription','clientOnError','ybaWg','getOptions','WkimZ','subAccountName','25659JsrJeK','subclassOnMessage','key','pneeB','responseReceived','removeSubscriptionHavingArgs','27729140pwNnWW','subclassOnOpen','subscribeToMarkets','54102KFmufe','sign','derived\x20onMessage','derived\x20onClose','clientOnClose','subscribeToFills','subscribeToTicker','unsubscribe','DshaF','subscribe','1352pjFnDt','FebsJ','28yKawlK','login','name\x20required','vUIRT','subaccount','args','send','markets','url','uiWMY','loggedIn','websocket_login','isObject','wss://stream.binancefuture.com','name','parse','WtIzV','derived\x20onError','nqrVa','trades','7510174NkKFuR','DLNlA','stringify','indexOf','subclassOnClose','fills','wAJkV'];a0_0x47f6=function(){return _0x121c8e;};return a0_0x47f6();}const {_}=a0_0x1b9abf;export class BinanceSocket extends PendaxSocket{constructor(_0x13b7c5){const _0x2d71ba=a0_0x4f9a;let _0x703123=_0x13b7c5||{};_0x703123[_0x2d71ba(0x9c)]=_0x2d71ba(0xa1),super(_0x703123),this[_0x2d71ba(0xd8)]()['subclassedSocket']=this,this[_0x2d71ba(0xd8)]()['subclassOnOpen']=this['subclassOnOpen'],this['getOptions']()[_0x2d71ba(0xdc)]=this['subclassOnMessage'],this[_0x2d71ba(0xd8)]()['subclassOnError']=this[_0x2d71ba(0xb4)],this[_0x2d71ba(0xd8)]()[_0x2d71ba(0xac)]=this[_0x2d71ba(0xac)];}[a0_0x4877ea(0xe5)](_0x3eaaf5){const _0x54f240=a0_0x4877ea,_0x2815c2=a0_0x54b014[_0x54f240(0xd2)](_0x54f240(0xd0),this[_0x54f240(0xd8)]()[_0x54f240(0xb7)])[_0x54f240(0xbc)](_0x3eaaf5)[_0x54f240(0xbe)](_0x54f240(0xb8));return _0x2815c2;}[a0_0x4877ea(0x95)](){const _0x537a8e=a0_0x4877ea;if(this[_0x537a8e(0x9e)]==!![])return;const _0x531891=Date[_0x537a8e(0xb1)]();let _0x3aabc9=_0x531891[_0x537a8e(0xb9)]()+_0x537a8e(0x9f);const _0x36ad21=this['sign'](_0x3aabc9);let _0x5c77e5=this[_0x537a8e(0xd8)]();const _0x8b4d28={'op':_0x537a8e(0x95),'args':{'key':_0x5c77e5[_0x537a8e(0xdd)],'sign':_0x36ad21,'time':_0x531891}};_0x5c77e5[_0x537a8e(0xda)]&&(_0x8b4d28[_0x537a8e(0x99)][_0x537a8e(0x98)]=_0x5c77e5[_0x537a8e(0xda)]);this[_0x537a8e(0xdf)]=![];let _0x1ecb75=JSON['stringify'](_0x8b4d28);this[_0x537a8e(0x9a)](_0x1ecb75,_0x5c18c5=>{const _0x5a593f=_0x537a8e;if(_0x5a593f(0xa4)!=='ftaUD')this[_0x5a593f(0x9e)]=!![],console[_0x5a593f(0xb6)](_0x5c18c5||_0x5a593f(0xce));else{const _0x1218a8=_0xb574c9[_0x5a593f(0xb9)]()[_0x5a593f(0xc0)](_0x5a593f(0xc7)[_0x5a593f(0xb3)]),_0x51c03d=_0x1218a8['indexOf']('\x27)');_0x256c12=_0x51c03d>-0x1?_0x1218a8[_0x5a593f(0xc0)](0x0,_0x51c03d):_0x1218a8;}});}[a0_0x4877ea(0x91)](_0x393908){const _0x207eb8=a0_0x4877ea;_0x393908=_0x393908||{};try{const _0x5eab3f={'channel':_0x393908[_0x207eb8(0xc8)],'market':_0x393908[_0x207eb8(0xc5)],'op':'subscribe'};if(_0x393908[_0x207eb8(0x98)]){if(_0x207eb8(0xca)===_0x207eb8(0xae)){const _0x43d9c7=_0x12cda3[_0x207eb8(0xd2)]('sha256',this[_0x207eb8(0xd8)]()[_0x207eb8(0xb7)])[_0x207eb8(0xbc)](_0x3a754f)[_0x207eb8(0xbe)](_0x207eb8(0xb8));return _0x43d9c7;}else _0x5eab3f[_0x207eb8(0x98)]=_0x393908[_0x207eb8(0x98)];}let _0x4c072e={..._0x5eab3f};delete _0x4c072e['op'];_0x4c072e[_0x207eb8(0x98)]&&(_0x207eb8(0xa9)!==_0x207eb8(0xbf)?delete _0x4c072e[_0x207eb8(0x98)]:(_0xfda100==!![]&&(_0x2ed06d={'type':_0x207eb8(0xd1),..._0x2dbc8a}),_0x9c7cd0[_0x207eb8(0xd8)]()['clientOnMessage'](_0x15e776,_0x1522de)));if(_0x4c072e[_0x207eb8(0xc5)]==undefined){if(_0x207eb8(0xd9)==='GwtKB'){let _0x6a172d=_0x6d409f||{};_0x6a172d[_0x207eb8(0xa2)]=_0xa7696f||'',_0x6a172d[_0x207eb8(0xc8)]=_0x207eb8(0xad),this[_0x207eb8(0x91)](_0x6a172d);}else delete _0x4c072e['market'];}this[_0x207eb8(0xd5)](_0x393908,_0x4c072e),this[_0x207eb8(0x9a)](JSON[_0x207eb8(0xaa)](_0x5eab3f));}catch(_0x363f0c){throw _0x363f0c;}}['unsubscribe'](_0x36cfc1){const _0xffa304=a0_0x4877ea;if(!_0x36cfc1)throw _0xffa304(0x96);let _0x305ee6=this[_0xffa304(0xcc)]()[_0x36cfc1];if(_0x305ee6){if('vWofu'===_0xffa304(0xd7)){const _0x42fec9={'channel':_0x273c44[_0xffa304(0xc8)],'market':_0x14731c[_0xffa304(0xc5)],'op':_0xffa304(0x91)};_0x664260[_0xffa304(0x98)]&&(_0x42fec9[_0xffa304(0x98)]=_0x9c9102[_0xffa304(0x98)]);let _0x2bd585={..._0x42fec9};delete _0x2bd585['op'],_0x2bd585[_0xffa304(0x98)]&&delete _0x2bd585[_0xffa304(0x98)],_0x2bd585[_0xffa304(0xc5)]==_0x421620&&delete _0x2bd585[_0xffa304(0xc5)],this['validateSubscription'](_0x51ad85,_0x2bd585),this['send'](_0x51f3ea[_0xffa304(0xaa)](_0x42fec9));}else{let _0x44f42={..._0x305ee6[_0xffa304(0x99)]};_0x44f42['op']=_0xffa304(0x8f),this['send'](JSON[_0xffa304(0xaa)](_0x44f42));}}}[a0_0x4877ea(0x8d)](_0x405f35,_0x2c6868){const _0x1e7b05=a0_0x4877ea;let _0x35cb35=_0x2c6868||{};_0x35cb35['name']=_0x405f35||'',_0x35cb35[_0x1e7b05(0xc8)]=_0x1e7b05(0xad),this[_0x1e7b05(0x91)](_0x35cb35);}[a0_0x4877ea(0xc1)](_0x4454f5,_0x57c78e){const _0x5e0c2f=a0_0x4877ea;let _0x1de119=_0x57c78e||{};_0x1de119['name']=_0x4454f5||'',_0x1de119[_0x5e0c2f(0xc8)]='orders',this['subscribe'](_0x1de119);}[a0_0x4877ea(0xe3)](_0x1d2246){const _0x3d0ef2=a0_0x4877ea;let _0x4477cf={'channel':_0x3d0ef2(0x9b)};_0x4477cf['name']=_0x1d2246||'',this[_0x3d0ef2(0x91)](_0x4477cf);}[a0_0x4877ea(0x8e)](_0x4f6627,_0x25c794){const _0x4f0044=a0_0x4877ea;let _0x5db551=_0x25c794||{};_0x5db551[_0x4f0044(0xa2)]=_0x4f6627||'',_0x5db551['channel']=_0x4f0044(0xcf),this[_0x4f0044(0x91)](_0x5db551);}['subscribeToTrades'](_0x419992,_0x2cdceb){const _0x181991=a0_0x4877ea;let _0x415314=_0x2cdceb||{};_0x415314[_0x181991(0xa2)]=_0x419992||'',_0x415314['channel']='trades',this[_0x181991(0x91)](_0x415314);}[a0_0x4877ea(0xb0)](_0x3a4dfe,_0x3f9115){const _0x85b862=a0_0x4877ea;let _0x5a711c=_0x3f9115||{};_0x5a711c['name']=_0x3a4dfe||'',_0x5a711c[_0x85b862(0xc8)]=_0x85b862(0xd3),this[_0x85b862(0x91)](_0x5a711c);}[a0_0x4877ea(0xe2)](_0x56727a){const _0x2fadcd=a0_0x4877ea;if(_0x56727a['clientOnOpen']){if(_0x2fadcd(0x90)!==_0x2fadcd(0x90))try{_0x3c1516=_0x3fa8f4['parse'](_0x1bab06);}catch(_0x17188f){if(_0x5e02b0[_0x2fadcd(0xb9)]()[_0x2fadcd(0xab)](_0x2fadcd(0xc7))>-0x1){const _0x9a7e0a=_0x3ef7f1['toString']()[_0x2fadcd(0xc0)](_0x2fadcd(0xc7)[_0x2fadcd(0xb3)]),_0x58b316=_0x9a7e0a[_0x2fadcd(0xab)]('\x27)');_0x211088=_0x58b316>-0x1?_0x9a7e0a[_0x2fadcd(0xc0)](0x0,_0x58b316):_0x9a7e0a;}}else _0x56727a[_0x2fadcd(0xbd)](_0x56727a);}else console['log'](msg||_0x2fadcd(0xcd));}['subclassOnMessage'](_0x57fb34,_0x5da7f2,_0x12d5f4){const _0x311737=a0_0x4877ea;let _0x5f0a66,_0x46369e=![];if(_['isObject'](_0x5da7f2)){if('zqPIQ'===_0x311737(0xd4))_0x5f0a66=JSON[_0x311737(0xa3)](_0x5da7f2),_0x5f0a66['type']&&_0x5f0a66['type']==_0x311737(0xd1)&&(_0x46369e=!![],delete _0x5f0a66[_0x311737(0xba)],_0x57fb34[_0x311737(0xe0)](_0x57fb34,_0x5f0a66));else throw _0x311737(0x96);}else _0x311737(0x97)!==_0x311737(0xc3)?_0x5f0a66=_0x5da7f2:_0x27207e=_0x1654d5;if(_0x57fb34['getOptions']()[_0x311737(0xb5)])_0x311737(0x9d)!==_0x311737(0x9d)?_0x39f238={'type':_0x311737(0xd1),..._0x23448a}:(_0x46369e==!![]&&(_0x5f0a66={'type':'unsubscribed',..._0x5f0a66}),_0x57fb34[_0x311737(0xd8)]()[_0x311737(0xb5)](_0x12d5f4,_0x5f0a66));else{if('eKMoW'!==_0x311737(0x93))console['log'](_0x5da7f2||_0x311737(0x8a));else throw _0x57910d;}}['subclassOnError'](_0x16c88a,_0x102fd0){const _0x5f374f=a0_0x4877ea;let _0x558d94;if(_[_0x5f374f(0xa0)](msg)){if(_0x5f374f(0xa6)==='dznoR'){if(!_0x9e5877)throw _0x5f374f(0x96);let _0x11a730=this[_0x5f374f(0xcc)]()[_0x22e32c];if(_0x11a730){let _0x32f6fc={..._0x11a730['args']};_0x32f6fc['op']=_0x5f374f(0x8f),this[_0x5f374f(0x9a)](_0x2f2c86[_0x5f374f(0xaa)](_0x32f6fc));}}else try{_0x558d94=JSON['parse'](msg);}catch(_0x1a22b7){if(msg[_0x5f374f(0xb9)]()[_0x5f374f(0xab)](_0x5f374f(0xc7))>-0x1){if(_0x5f374f(0xc2)===_0x5f374f(0xc2)){const _0x365120=msg[_0x5f374f(0xb9)]()[_0x5f374f(0xc0)]('bytearray(b\x27'[_0x5f374f(0xb3)]),_0x474619=_0x365120[_0x5f374f(0xab)]('\x27)');_0x558d94=_0x474619>-0x1?_0x365120[_0x5f374f(0xc0)](0x0,_0x474619):_0x365120;}else this[_0x5f374f(0x9e)]=!![],_0x5a8648['log'](_0x24beb5||_0x5f374f(0xce));}}}else _0x558d94=msg;_0x102fd0['clientOnError']?_0x102fd0[_0x5f374f(0xd6)](_0x102fd0,_0x558d94):console[_0x5f374f(0xb6)](msg||_0x5f374f(0xa5));}['subclassOnClose'](_0xc82a36,_0x405e06,_0x1b95ed){const _0x4ddacb=a0_0x4877ea;let _0xe756b2;if(_[_0x4ddacb(0xa0)](_0x405e06)){if(_0x4ddacb(0xaf)===_0x4ddacb(0xde)){if(this[_0x4ddacb(0x9e)]==!![])return;const _0x17ce99=_0x23db19['now']();let _0x409aa1=_0x17ce99['toString']()+_0x4ddacb(0x9f);const _0x33d3cc=this[_0x4ddacb(0xe5)](_0x409aa1);let _0x2fec60=this['getOptions']();const _0xcb5fcf={'op':'login','args':{'key':_0x2fec60[_0x4ddacb(0xdd)],'sign':_0x33d3cc,'time':_0x17ce99}};_0x2fec60[_0x4ddacb(0xda)]&&(_0xcb5fcf[_0x4ddacb(0x99)][_0x4ddacb(0x98)]=_0x2fec60[_0x4ddacb(0xda)]);this[_0x4ddacb(0xdf)]=![];let _0x39d85a=_0x441db2['stringify'](_0xcb5fcf);this[_0x4ddacb(0x9a)](_0x39d85a,_0x2f505e=>{const _0x3bdf6a=_0x4ddacb;this[_0x3bdf6a(0x9e)]=!![],_0x50b337[_0x3bdf6a(0xb6)](_0x2f505e||_0x3bdf6a(0xce));});}else try{_0xe756b2=JSON[_0x4ddacb(0xa3)](_0x405e06);}catch(_0x4f70b5){if(_0x405e06['toString']()[_0x4ddacb(0xab)](_0x4ddacb(0xc7))>-0x1){const _0x36afaa=_0x405e06[_0x4ddacb(0xb9)]()[_0x4ddacb(0xc0)](_0x4ddacb(0xc7)[_0x4ddacb(0xb3)]),_0x204525=_0x36afaa['indexOf']('\x27)');_0xe756b2=_0x204525>-0x1?_0x36afaa[_0x4ddacb(0xc0)](0x0,_0x204525):_0x36afaa;}}}else _0xe756b2=_0x405e06;if(_0x1b95ed[_0x4ddacb(0x8c)]){if(_0x4ddacb(0xc9)==='zFOeM')_0x1b95ed[_0x4ddacb(0x8c)](_0xc82a36,_0xe756b2,_0x1b95ed);else{let _0xada2ed=_0x2fcc04||{};_0xada2ed[_0x4ddacb(0xa2)]=_0x58ee82||'',_0xada2ed[_0x4ddacb(0xc8)]=_0x4ddacb(0xa7),this[_0x4ddacb(0x91)](_0xada2ed);}}else console[_0x4ddacb(0xb6)](_0x405e06||_0x4ddacb(0x8b));}}
const a0_0x495041=a0_0x249e;(function(_0x5dbe4d,_0x4e6df3){const _0x1cce2f=a0_0x249e,_0x3e8593=_0x5dbe4d();while(!![]){try{const _0x27d4af=-parseInt(_0x1cce2f(0xc5))/0x1+parseInt(_0x1cce2f(0x90))/0x2+-parseInt(_0x1cce2f(0xac))/0x3+-parseInt(_0x1cce2f(0x9c))/0x4+-parseInt(_0x1cce2f(0xb1))/0x5+-parseInt(_0x1cce2f(0xbf))/0x6*(-parseInt(_0x1cce2f(0xc6))/0x7)+parseInt(_0x1cce2f(0x7d))/0x8*(parseInt(_0x1cce2f(0x8b))/0x9);if(_0x27d4af===_0x4e6df3)break;else _0x3e8593['push'](_0x3e8593['shift']());}catch(_0x3b85be){_0x3e8593['push'](_0x3e8593['shift']());}}}(a0_0x2d7a,0x55a30));import{PendaxSocket}from'../common/pendaxsocket.js';import*as a0_0x212135 from'crypto';import a0_0x4ac77e from'lodash';const {_}=a0_0x4ac77e;export class BinanceSocket extends PendaxSocket{constructor(_0x3d3276){const _0x4611f9=a0_0x249e;let _0x38844a=_0x3d3276||{};_0x38844a[_0x4611f9(0xa3)]=_0x4611f9(0x7e),super(_0x38844a),this['getOptions']()[_0x4611f9(0xa8)]=this,this[_0x4611f9(0x9b)]()[_0x4611f9(0x86)]=this[_0x4611f9(0x86)],this[_0x4611f9(0x9b)]()['subclassOnMessage']=this['subclassOnMessage'],this[_0x4611f9(0x9b)]()[_0x4611f9(0xbd)]=this[_0x4611f9(0xbd)],this['getOptions']()[_0x4611f9(0x88)]=this[_0x4611f9(0x88)];}[a0_0x495041(0x9d)](_0x2786a7){const _0x2e636c=a0_0x495041,_0x4f2aeb=a0_0x212135['Hmac'](_0x2e636c(0x87),this[_0x2e636c(0x9b)]()['secret'])['update'](_0x2786a7)[_0x2e636c(0xc1)](_0x2e636c(0xa4));return _0x4f2aeb;}[a0_0x495041(0xab)](){const _0x33dacb=a0_0x495041;if(this[_0x33dacb(0xc3)]==!![])return;const _0x28a634=Date[_0x33dacb(0x8c)]();let _0x507bce=_0x28a634[_0x33dacb(0x98)]()+_0x33dacb(0xc8);const _0x39c758=this[_0x33dacb(0x9d)](_0x507bce);let _0x53714d=this['getOptions']();const _0x46d710={'op':_0x33dacb(0xab),'args':{'key':_0x53714d['key'],'sign':_0x39c758,'time':_0x28a634}};if(_0x53714d[_0x33dacb(0xa0)]){if('Bwtif'==='ftaNU'){const _0x9f022={'channel':_0x2b1ecf['channel'],'market':_0x210ab0[_0x33dacb(0xcd)],'op':_0x33dacb(0xb3)};_0x14eadc[_0x33dacb(0xc4)]&&(_0x9f022[_0x33dacb(0xc4)]=_0x3fe27d[_0x33dacb(0xc4)]);let _0x4e95f9={..._0x9f022};delete _0x4e95f9['op'],_0x4e95f9[_0x33dacb(0xc4)]&&delete _0x4e95f9[_0x33dacb(0xc4)],_0x4e95f9[_0x33dacb(0xcd)]==_0xd8b406&&delete _0x4e95f9['market'],this[_0x33dacb(0x94)](_0x27ebb0,_0x4e95f9),this['send'](_0x4fb65d[_0x33dacb(0x95)](_0x9f022));}else _0x46d710[_0x33dacb(0xb7)][_0x33dacb(0xc4)]=_0x53714d[_0x33dacb(0xa0)];}this[_0x33dacb(0x9f)]=![];let _0x4e53ab=JSON[_0x33dacb(0x95)](_0x46d710);this[_0x33dacb(0x8d)](_0x4e53ab,_0x4974d9=>{const _0xc2d7e4=_0x33dacb;if(_0xc2d7e4(0x9e)===_0xc2d7e4(0x9e))this['loggedIn']=!![],console[_0xc2d7e4(0xa2)](_0x4974d9||_0xc2d7e4(0xc7));else{if(!_0x67f127)throw _0xc2d7e4(0xad);let _0x4823b3=this['getSubscriptions']()[_0x43b83c];if(_0x4823b3){let _0x207552={..._0x4823b3['args']};_0x207552['op']=_0xc2d7e4(0xb0),this[_0xc2d7e4(0x8d)](_0x5c6823[_0xc2d7e4(0x95)](_0x207552));}}});}[a0_0x495041(0xb3)](_0x5464b1){const _0x24c8da=a0_0x495041;_0x5464b1=_0x5464b1||{};try{if(_0x24c8da(0x8e)===_0x24c8da(0x82))throw _0x5ee181;else{const _0x2b3824={'channel':_0x5464b1['channel'],'market':_0x5464b1[_0x24c8da(0xcd)],'op':_0x24c8da(0xb3)};if(_0x5464b1[_0x24c8da(0xc4)]){if('NJZuY'===_0x24c8da(0xb5)){const _0x4f4866=_0xb019ef[_0x24c8da(0x98)]()[_0x24c8da(0xbc)](_0x24c8da(0x85)[_0x24c8da(0x80)]),_0x1c73fe=_0x4f4866[_0x24c8da(0xae)]('\x27)');_0x232b70=_0x1c73fe>-0x1?_0x4f4866[_0x24c8da(0xbc)](0x0,_0x1c73fe):_0x4f4866;}else _0x2b3824[_0x24c8da(0xc4)]=_0x5464b1[_0x24c8da(0xc4)];}let _0x17635c={..._0x2b3824};delete _0x17635c['op'],_0x17635c['subaccount']&&('BeQzc'!=='cggSc'?delete _0x17635c[_0x24c8da(0xc4)]:_0xa216b5=_0x56e879[_0x24c8da(0x91)](_0x3097f0)),_0x17635c[_0x24c8da(0xcd)]==undefined&&('WlHIU'==='WlHIU'?delete _0x17635c['market']:delete _0x5901c1[_0x24c8da(0xcd)]),this['validateSubscription'](_0x5464b1,_0x17635c),this[_0x24c8da(0x8d)](JSON['stringify'](_0x2b3824));}}catch(_0xb6af2a){throw _0xb6af2a;}}[a0_0x495041(0xb0)](_0xf3130c){const _0x5077a2=a0_0x495041;if(!_0xf3130c)throw _0x5077a2(0xad);let _0x529e83=this['getSubscriptions']()[_0xf3130c];if(_0x529e83){let _0x6bf001={..._0x529e83[_0x5077a2(0xb7)]};_0x6bf001['op']=_0x5077a2(0xb0),this[_0x5077a2(0x8d)](JSON[_0x5077a2(0x95)](_0x6bf001));}}[a0_0x495041(0x99)](_0x59c7ed,_0x3e3d63){const _0x4e129d=a0_0x495041;let _0x596bfc=_0x3e3d63||{};_0x596bfc[_0x4e129d(0x81)]=_0x59c7ed||'',_0x596bfc['channel']=_0x4e129d(0xb2),this['subscribe'](_0x596bfc);}[a0_0x495041(0xa7)](_0x2ad605,_0x3b2a88){const _0x4c9d0f=a0_0x495041;let _0x4d065e=_0x3b2a88||{};_0x4d065e[_0x4c9d0f(0x81)]=_0x2ad605||'',_0x4d065e['channel']=_0x4c9d0f(0xc2),this[_0x4c9d0f(0xb3)](_0x4d065e);}['subscribeToMarkets'](_0xc25763){const _0x4d56ca=a0_0x495041;let _0x157c1e={'channel':'markets'};_0x157c1e[_0x4d56ca(0x81)]=_0xc25763||'',this[_0x4d56ca(0xb3)](_0x157c1e);}['subscribeToTicker'](_0x637d24,_0x2bef31){const _0x20bfc0=a0_0x495041;let _0x1c0d8e=_0x2bef31||{};_0x1c0d8e[_0x20bfc0(0x81)]=_0x637d24||'',_0x1c0d8e[_0x20bfc0(0xb6)]=_0x20bfc0(0xa9),this['subscribe'](_0x1c0d8e);}['subscribeToTrades'](_0x4792a7,_0x2b712c){const _0x16b059=a0_0x495041;let _0x33c05a=_0x2b712c||{};_0x33c05a['name']=_0x4792a7||'',_0x33c05a[_0x16b059(0xb6)]=_0x16b059(0x7f),this[_0x16b059(0xb3)](_0x33c05a);}['subscribeToOrderBooks'](_0x263e62,_0xb69489){const _0x4ca588=a0_0x495041;let _0xf995a0=_0xb69489||{};_0xf995a0[_0x4ca588(0x81)]=_0x263e62||'',_0xf995a0[_0x4ca588(0xb6)]='orderbook',this[_0x4ca588(0xb3)](_0xf995a0);}[a0_0x495041(0x86)](_0x3d23aa){const _0x449a22=a0_0x495041;_0x3d23aa[_0x449a22(0x8a)]?_0x3d23aa['clientOnOpen'](_0x3d23aa):'BggUT'===_0x449a22(0x83)?_0x3a9ed5[_0x449a22(0xc0)](_0x38f616,_0x2e6329):console[_0x449a22(0xa2)](msg||_0x449a22(0xbe));}['subclassOnMessage'](_0x10eb35,_0x261531,_0x5d6670){const _0x211948=a0_0x495041;let _0x4c0291,_0x19b365=![];_['isObject'](_0x261531)?(_0x4c0291=JSON[_0x211948(0x91)](_0x261531),_0x4c0291['type']&&_0x4c0291[_0x211948(0x97)]==_0x211948(0xb4)&&(_0x19b365=!![],delete _0x4c0291['type'],_0x10eb35['removeSubscriptionHavingArgs'](_0x10eb35,_0x4c0291))):'nkbAW'!=='nkbAW'?(_0x4e3b8f=_0x4efb99['parse'](_0x148e2c),_0x1e3c7d['type']&&_0x1923c4[_0x211948(0x97)]=='unsubscribed'&&(_0x43c80d=!![],delete _0x36e79f[_0x211948(0x97)],_0x3349f0[_0x211948(0xaf)](_0x2d9db5,_0x425d86))):_0x4c0291=_0x261531;if(_0x10eb35[_0x211948(0x9b)]()[_0x211948(0x7c)]){if(_0x211948(0xa6)!==_0x211948(0xa1)){if(_0x19b365==!![]){if(_0x211948(0x9a)!==_0x211948(0x9a)){let _0x2937de=_0x86a576||{};_0x2937de[_0x211948(0x81)]=_0x8e70b9||'',_0x2937de[_0x211948(0xb6)]=_0x211948(0x96),this[_0x211948(0xb3)](_0x2937de);}else _0x4c0291={'type':_0x211948(0xb4),..._0x4c0291};}_0x10eb35[_0x211948(0x9b)]()[_0x211948(0x7c)](_0x5d6670,_0x4c0291);}else _0x29bd4f=_0x57fdbc['parse'](_0x405054);}else console['log'](_0x261531||'derived\x20onMessage');}[a0_0x495041(0xbd)](_0xe18a12,_0x36ffb4){const _0x1274be=a0_0x495041;let _0x1515ed;if(_[_0x1274be(0x8f)](msg))try{_0x1274be(0xa5)==='satoK'?_0x1515ed=JSON[_0x1274be(0x91)](msg):_0x360e13[_0x1274be(0xa2)](_0x5e8b61||'derived\x20onMessage');}catch(_0x422d5c){if(_0x1274be(0xba)!==_0x1274be(0xba))_0x3b26e8[_0x1274be(0xa2)](_0x4acd98||_0x1274be(0xbe));else{if(msg[_0x1274be(0x98)]()['indexOf'](_0x1274be(0x85))>-0x1){if(_0x1274be(0xc9)!=='egAKY'){const _0x2c2a2a=msg[_0x1274be(0x98)]()[_0x1274be(0xbc)](_0x1274be(0x85)[_0x1274be(0x80)]),_0x231332=_0x2c2a2a[_0x1274be(0xae)]('\x27)');_0x1515ed=_0x231332>-0x1?_0x2c2a2a[_0x1274be(0xbc)](0x0,_0x231332):_0x2c2a2a;}else _0x58aa03[_0x1274be(0xc4)]=_0x50324b[_0x1274be(0xc4)];}}}else _0x1274be(0xaa)==='rxmdf'?_0x27dc4c[_0x1274be(0x8a)]?_0x210c52[_0x1274be(0x8a)](_0x24806d):_0x48210b[_0x1274be(0xa2)](_0x26f27b||'derived\x20onOpen'):_0x1515ed=msg;if(_0x36ffb4[_0x1274be(0xc0)]){if('qRxaa'!==_0x1274be(0xb8))_0x36ffb4[_0x1274be(0xc0)](_0x36ffb4,_0x1515ed);else{let _0x25be19={..._0x11b4c5[_0x1274be(0xb7)]};_0x25be19['op']=_0x1274be(0xb0),this[_0x1274be(0x8d)](_0x2a510c[_0x1274be(0x95)](_0x25be19));}}else console[_0x1274be(0xa2)](msg||_0x1274be(0xca));}['subclassOnClose'](_0x12c51e,_0x274c4d,_0xbf2c1f){const _0x4d9a6e=a0_0x495041;let _0x5117e6;if(_['isObject'](_0x274c4d)){if(_0x4d9a6e(0x93)!=='CFhqB'){const _0x92781d=_0x1bddba[_0x4d9a6e(0xcc)](_0x4d9a6e(0x87),this[_0x4d9a6e(0x9b)]()[_0x4d9a6e(0xb9)])['update'](_0x4127a4)['digest']('hex');return _0x92781d;}else try{_0x5117e6=JSON[_0x4d9a6e(0x91)](_0x274c4d);}catch(_0x352123){if('ockza'==='TMRpN'){const _0x2b14c0=_0x3d6f1f['toString']()[_0x4d9a6e(0xbc)](_0x4d9a6e(0x85)[_0x4d9a6e(0x80)]),_0x57b601=_0x2b14c0[_0x4d9a6e(0xae)]('\x27)');_0x444385=_0x57b601>-0x1?_0x2b14c0['slice'](0x0,_0x57b601):_0x2b14c0;}else{if(_0x274c4d[_0x4d9a6e(0x98)]()[_0x4d9a6e(0xae)](_0x4d9a6e(0x85))>-0x1){const _0x178a58=_0x274c4d[_0x4d9a6e(0x98)]()[_0x4d9a6e(0xbc)]('bytearray(b\x27'[_0x4d9a6e(0x80)]),_0x446ddb=_0x178a58[_0x4d9a6e(0xae)]('\x27)');_0x5117e6=_0x446ddb>-0x1?_0x178a58[_0x4d9a6e(0xbc)](0x0,_0x446ddb):_0x178a58;}}}}else _0x5117e6=_0x274c4d;if(_0xbf2c1f[_0x4d9a6e(0x89)])_0x4d9a6e(0xbb)!==_0x4d9a6e(0xbb)?(_0x3816a0=!![],delete _0x28c3bf[_0x4d9a6e(0x97)],_0x5837a6['removeSubscriptionHavingArgs'](_0x41eb2c,_0x2eb4c9)):_0xbf2c1f[_0x4d9a6e(0x89)](_0x12c51e,_0x5117e6,_0xbf2c1f);else{if(_0x4d9a6e(0x92)!==_0x4d9a6e(0x84))console[_0x4d9a6e(0xa2)](_0x274c4d||_0x4d9a6e(0xcb));else{let _0x3e7e3f=_0x283daf||{};_0x3e7e3f[_0x4d9a6e(0x81)]=_0x2f8041||'',_0x3e7e3f[_0x4d9a6e(0xb6)]=_0x4d9a6e(0xb2),this[_0x4d9a6e(0xb3)](_0x3e7e3f);}}}}function a0_0x249e(_0x2c951d,_0xcc0764){const _0x2d7a57=a0_0x2d7a();return a0_0x249e=function(_0x249e75,_0x518ee0){_0x249e75=_0x249e75-0x7c;let _0x249294=_0x2d7a57[_0x249e75];return _0x249294;},a0_0x249e(_0x2c951d,_0xcc0764);}function a0_0x2d7a(){const _0x15de52=['subclassOnClose','clientOnClose','clientOnOpen','162BNfuTo','now','send','YpsKp','isObject','19644jLRStC','parse','gbXAR','CFhqB','validateSubscription','stringify','orderbook','type','toString','subscribeToFills','wcZOW','getOptions','1173496KZkXAL','sign','CcKgW','responseReceived','subAccountName','kybod','log','url','hex','satoK','BKlsy','subscribeToOrders','subclassedSocket','ticker','PwirJ','login','143382sTehFh','name\x20required','indexOf','removeSubscriptionHavingArgs','unsubscribe','2054110iUKfAE','fills','subscribe','unsubscribed','Atuha','channel','args','qPCXt','secret','ZItpL','QtDIi','slice','subclassOnError','derived\x20onOpen','66yhVDCu','clientOnError','digest','orders','loggedIn','subaccount','71519GoZHTh','26173SICJKi','logged\x20in','websocket_login','mpNpe','derived\x20onError','derived\x20onClose','Hmac','market','clientOnMessage','499256taqAoW','wss://stream.binancefuture.com','trades','length','name','gWHvN','QVhzT','RTXvz','bytearray(b\x27','subclassOnOpen','sha256'];a0_0x2d7a=function(){return _0x15de52;};return a0_0x2d7a();}

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

function a1_0x3c67(){const _0x14df82=['NHMih','499728KVQwkz','wss://ws.okx.com:8443/ws/v5/public','subclassOnOpen','HKkDY','privateChannels','isPrivate','liquidation-warning','subclassOnError','bytearray(b\x27','placeOrders','login','balance_and_position','amendOrders','getOptions','constructor','event','sha256','parse','instId','wOJIZ','now','tickers','instType','base64','918cqoUas','992710iCZaVk','digest','positions','publicChannels','27pXGcVX','order','books','subscribe','responseReceived','slice','tDLRW','send','subclassedSocket','amend-order','grid-orders-contract','HTzES','wCfRw','fhdac','socket\x20subscription\x20requires:\x20array\x20of\x20subscriptions\x20args\x20(see\x20okx\x20api\x20doc)','url','instruments','derived\x20onClose','toString','zetsv','grid-orders-spot','subclassOnClose','log','arg','3804184HjPxXQ','qFjue','clientOnClose','GET','public-struc-block-trades','Hmac','validateSubscription','piSAA','pEeds','batch-cancel-orders','1603UBQVhX','derived\x20onOpen','sshhy','trades','orders','clientOnMessage','uly','account','zoFnc','logged\x20in','jsOgN','ZrgJS','index-candle30m','key','loggedIn','isObject','passphrase','ohohl','MucSc','65195mUFmBZ','OxYYa','getSubscriptions','clientOnOpen','socket\x20order\x20requires:\x20an\x20id,\x20and\x20an\x20array\x20containing\x20order(s)\x20to\x20cancel\x20args\x20(see\x20okx\x20api\x20doc)','wss://ws.okx.com:8443/ws/v5/private','secret','price-limit','args','socket\x20order\x20requires:\x20an\x20id,\x20and\x20an\x20array\x20containing\x20order\x20args\x20(see\x20okx\x20api\x20doc)','removeSubscriptionHavingChannel','grid-positions','grid-sub-orders','status','sign','unsubscribed','8ARBCWR','update','mark-price-candle1D','dBWJb','BEaRL','2NRAmxA','floor','length','indexOf','please\x20login','2975714ywBIJc','pXyzE','open-interest','struc-block-trades','stringify','cancel-order','funding-rate','derived\x20onError','channel','clientOnError','orders-algo','derived\x20onMessage','unsubscribe','candle1D','subclassOnMessage','YoLPZ'];a1_0x3c67=function(){return _0x14df82;};return a1_0x3c67();}const a1_0x32a756=a1_0x3f39;(function(_0x1965b8,_0x525065){const _0x161cbc=a1_0x3f39,_0x1bdd00=_0x1965b8();while(!![]){try{const _0x3f1242=parseInt(_0x161cbc(0x11e))/0x1*(-parseInt(_0x161cbc(0x146))/0x2)+-parseInt(_0x161cbc(0x174))/0x3*(-parseInt(_0x161cbc(0x141))/0x4)+parseInt(_0x161cbc(0x131))/0x5+-parseInt(_0x161cbc(0x15c))/0x6+-parseInt(_0x161cbc(0x14b))/0x7+parseInt(_0x161cbc(0x114))/0x8+-parseInt(_0x161cbc(0x179))/0x9*(-parseInt(_0x161cbc(0x175))/0xa);if(_0x3f1242===_0x525065)break;else _0x1bdd00['push'](_0x1bdd00['shift']());}catch(_0x55c78a){_0x1bdd00['push'](_0x1bdd00['shift']());}}}(a1_0x3c67,0x43a02));import{PendaxSocket}from'../common/pendaxsocket.js';function a1_0x3f39(_0x4a3055,_0x2ca434){const _0x3c67fe=a1_0x3c67();return a1_0x3f39=function(_0x3f39c4,_0x3a5ec8){_0x3f39c4=_0x3f39c4-0x100;let _0x2b587b=_0x3c67fe[_0x3f39c4];return _0x2b587b;},a1_0x3f39(_0x4a3055,_0x2ca434);}import*as a1_0x19d728 from'crypto';import a1_0x593900 from'lodash';const {_}=a1_0x593900;export class BitgetSocket extends PendaxSocket{[a1_0x32a756(0x160)]=[a1_0x32a756(0x125),a1_0x32a756(0x177),a1_0x32a756(0x167),a1_0x32a756(0x122),a1_0x32a756(0x155),'algo-advance',a1_0x32a756(0x162),'account-greeks','rfqs','quotes',a1_0x32a756(0x14e),a1_0x32a756(0x110),a1_0x32a756(0x106),a1_0x32a756(0x13c),a1_0x32a756(0x13d)];['publicChannels']=[a1_0x32a756(0x10c),a1_0x32a756(0x171),a1_0x32a756(0x14d),a1_0x32a756(0x158),a1_0x32a756(0x121),'estimated-price','mark-price',a1_0x32a756(0x143),a1_0x32a756(0x138),a1_0x32a756(0x17b),'opt-summary',a1_0x32a756(0x151),a1_0x32a756(0x12a),'index-tickers',a1_0x32a756(0x13e),a1_0x32a756(0x118),'block-tickers'];constructor(_0xdbcd4f){const _0x5ae2b7=a1_0x32a756;let _0xf2eebc=_0xdbcd4f||{};_0xdbcd4f[_0x5ae2b7(0x161)]&&_0xdbcd4f[_0x5ae2b7(0x161)]==!![]?_0xf2eebc[_0x5ae2b7(0x10b)]=_0x5ae2b7(0x136):_0x5ae2b7(0x126)===_0x5ae2b7(0x126)?_0xf2eebc[_0x5ae2b7(0x10b)]=_0x5ae2b7(0x15d):_0x5ea920=_0xab5c14[_0x5ae2b7(0x16d)](_0x1f4c66),super(_0xf2eebc),this[_0x5ae2b7(0x169)]()[_0x5ae2b7(0x104)]=this,this[_0x5ae2b7(0x169)]()[_0x5ae2b7(0x15e)]=this[_0x5ae2b7(0x15e)],this['getOptions']()[_0x5ae2b7(0x159)]=this['subclassOnMessage'],this[_0x5ae2b7(0x169)]()[_0x5ae2b7(0x163)]=this[_0x5ae2b7(0x163)],this['getOptions']()[_0x5ae2b7(0x111)]=this[_0x5ae2b7(0x111)];}[a1_0x32a756(0x13f)](_0x4fc127){const _0x291625=a1_0x32a756,_0x1e57dd=a1_0x19d728['Hmac'](_0x291625(0x16c),this[_0x291625(0x169)]()[_0x291625(0x137)])[_0x291625(0x142)](_0x4fc127)['digest'](_0x291625(0x173));return _0x1e57dd;}[a1_0x32a756(0x166)](){const _0x259544=a1_0x32a756;if(this[_0x259544(0x12c)]==!![])return;const _0x1e4bc4=Math[_0x259544(0x147)](Date[_0x259544(0x170)]()/0x3e8),_0x58caf1=_0x259544(0x117),_0x388bb5='/users/self/verify';let _0x123760=_0x1e4bc4['toString']()+_0x58caf1+_0x388bb5;const _0x1b38bd=this[_0x259544(0x13f)](_0x123760);let _0x227d5c=this[_0x259544(0x169)]();const _0x150fa2={'op':_0x259544(0x166),'args':[{'apiKey':_0x227d5c[_0x259544(0x12b)],'passphrase':_0x227d5c[_0x259544(0x12e)],'timestamp':_0x1e4bc4,'sign':_0x1b38bd}]};this[_0x259544(0x100)]=![];let _0x9e7e71=JSON[_0x259544(0x14f)](_0x150fa2);this['send'](_0x9e7e71,_0x1a3bd3=>{const _0x3dd602=_0x259544;this[_0x3dd602(0x12c)]=!![],console[_0x3dd602(0x112)](_0x1a3bd3||_0x3dd602(0x127));});}[a1_0x32a756(0x165)](_0x4a8f14){const _0x666b46=a1_0x32a756;if(!this[_0x666b46(0x12c)]){if(_0x666b46(0x120)===_0x666b46(0x132))throw{'message':_0x25fc2b};else throw{'message':_0x666b46(0x14a)};}if(_0x4a8f14&&_0x4a8f14['id']&&_0x4a8f14[_0x666b46(0x139)]&&_0x4a8f14[_0x666b46(0x139)]['constructor']==Array&&_0x4a8f14['args'][_0x666b46(0x148)]>0x0){if(_0x4a8f14['args']['length']==0x1)_0x4a8f14['op']=_0x666b46(0x17a);else{if(_0x666b46(0x15a)==='YoLPZ')_0x4a8f14['op']='batch-orders';else throw{'message':_0x176888};}try{this[_0x666b46(0x103)](JSON[_0x666b46(0x14f)](_0x4a8f14));}catch(_0x48c8a6){throw{'message':_0x48c8a6};}}else throw{'message':_0x666b46(0x13a)};}['cancelOrders'](_0x2374d2){const _0x5e10ed=a1_0x32a756;if(!this[_0x5e10ed(0x12c)])throw{'message':'please\x20login'};if(_0x2374d2&&_0x2374d2['id']&&_0x2374d2['args']&&_0x2374d2[_0x5e10ed(0x139)][_0x5e10ed(0x16a)]==Array&&_0x2374d2[_0x5e10ed(0x113)][_0x5e10ed(0x148)]>0x0){_0x2374d2['args'][_0x5e10ed(0x148)]==0x1?_0x2374d2['op']=_0x5e10ed(0x150):_0x2374d2['op']=_0x5e10ed(0x11d);try{this[_0x5e10ed(0x103)](JSON[_0x5e10ed(0x14f)](_0x2374d2));}catch(_0x47e462){throw{'message':_0x47e462};}}else{if(_0x5e10ed(0x11c)==='BIOaL'){const _0x1c24b9=_0x42cd17[_0x5e10ed(0x119)](_0x5e10ed(0x16c),this['getOptions']()[_0x5e10ed(0x137)])[_0x5e10ed(0x142)](_0x4d091a)[_0x5e10ed(0x176)](_0x5e10ed(0x173));return _0x1c24b9;}else throw{'message':_0x5e10ed(0x135)};}}[a1_0x32a756(0x168)](_0x27bc5a){const _0x4a79a6=a1_0x32a756;if(!this[_0x4a79a6(0x12c)]){if(_0x4a79a6(0x129)==='ZrgJS')throw{'message':_0x4a79a6(0x14a)};else return;}if(_0x27bc5a&&_0x27bc5a['id']&&_0x27bc5a[_0x4a79a6(0x139)]&&_0x27bc5a[_0x4a79a6(0x139)][_0x4a79a6(0x16a)]==Array&&_0x27bc5a[_0x4a79a6(0x113)][_0x4a79a6(0x148)]>0x0){_0x27bc5a[_0x4a79a6(0x139)][_0x4a79a6(0x148)]==0x1?_0x4a79a6(0x128)!==_0x4a79a6(0x109)?_0x27bc5a['op']=_0x4a79a6(0x105):_0x174d42=_0x18f9c4:_0x27bc5a['op']='batch-amend-orders';try{this[_0x4a79a6(0x103)](JSON['stringify'](_0x27bc5a));}catch(_0x456999){if('pXyzE'!==_0x4a79a6(0x14c))_0x34778b['op']=_0x4a79a6(0x105);else throw{'message':_0x456999};}}else throw{'message':'socket\x20order\x20requires:\x20an\x20id,\x20and\x20an\x20array\x20containing\x20order\x20args\x20(see\x20okx\x20api\x20doc)'};}[a1_0x32a756(0x17c)](_0x2501e8){const _0x436cbe=a1_0x32a756;if(_0x2501e8&&_0x2501e8['args']&&_0x2501e8[_0x436cbe(0x139)][_0x436cbe(0x16a)]==Array){if(_0x436cbe(0x130)!=='MucSc')throw{'message':_0x58fbf9};else for(const _0x5bbf52 of _0x2501e8[_0x436cbe(0x139)]){let _0x1401fe={'op':_0x436cbe(0x17c),'args':[_0x5bbf52]};const _0x5043d7=_0x5bbf52[_0x436cbe(0x16e)]?'_'+_0x5bbf52['instId']:'',_0x37bb3d=_0x5bbf52[_0x436cbe(0x172)]?'_'+_0x5bbf52[_0x436cbe(0x172)]:'',_0x1b2481=_0x5bbf52[_0x436cbe(0x124)]?'_'+_0x5bbf52[_0x436cbe(0x124)]:'',_0x5af8f7=_0x5bbf52[_0x436cbe(0x153)]+_0x5043d7+_0x37bb3d+_0x1b2481;this[_0x436cbe(0x11a)](_0x5af8f7,_0x1401fe,this[_0x436cbe(0x178)],this['privateChannels']);try{if('ohohl'===_0x436cbe(0x12f))this[_0x436cbe(0x103)](JSON[_0x436cbe(0x14f)](_0x1401fe));else{if(_0x59b14b&&_0xe688a1[_0x436cbe(0x139)]&&_0x11467a[_0x436cbe(0x139)][_0x436cbe(0x16a)]==_0x774f25)for(const _0x217d51 of _0x13d253['args']){const _0x2563ba=_0x217d51[_0x436cbe(0x16e)]?'_'+_0x217d51[_0x436cbe(0x16e)]:'',_0xe97f5c=_0x217d51[_0x436cbe(0x172)]?'_'+_0x217d51[_0x436cbe(0x172)]:'',_0xfeacd6=_0x217d51[_0x436cbe(0x124)]?'_'+_0x217d51[_0x436cbe(0x124)]:'',_0x6458de=_0x217d51[_0x436cbe(0x153)]+_0x2563ba+_0xe97f5c+_0xfeacd6;let _0x17d9db=this[_0x436cbe(0x133)]()[_0x6458de];if(_0x17d9db){let _0x2e3d74=_0x17d9db[_0x436cbe(0x139)];_0x2e3d74['op']=_0x436cbe(0x157),this[_0x436cbe(0x103)](_0x382042[_0x436cbe(0x14f)](_0x2e3d74));}}}}catch(_0x31165e){throw{'message':_0x31165e};}}}else throw{'message':_0x436cbe(0x10a)};}[a1_0x32a756(0x157)](_0x39b633){const _0xacc7e4=a1_0x32a756;if(_0x39b633&&_0x39b633[_0xacc7e4(0x139)]&&_0x39b633[_0xacc7e4(0x139)][_0xacc7e4(0x16a)]==Array){if(_0xacc7e4(0x15b)===_0xacc7e4(0x102))_0x228013['op']=_0xacc7e4(0x150);else for(const _0x42584d of _0x39b633[_0xacc7e4(0x139)]){if(_0xacc7e4(0x144)===_0xacc7e4(0x144)){const _0x1d057f=_0x42584d[_0xacc7e4(0x16e)]?'_'+_0x42584d['instId']:'',_0x58b9f2=_0x42584d['instType']?'_'+_0x42584d[_0xacc7e4(0x172)]:'',_0x3abe5d=_0x42584d[_0xacc7e4(0x124)]?'_'+_0x42584d[_0xacc7e4(0x124)]:'',_0x29e711=_0x42584d[_0xacc7e4(0x153)]+_0x1d057f+_0x58b9f2+_0x3abe5d;let _0x4b012b=this[_0xacc7e4(0x133)]()[_0x29e711];if(_0x4b012b){let _0x1db5cf=_0x4b012b[_0xacc7e4(0x139)];_0x1db5cf['op']=_0xacc7e4(0x157),this[_0xacc7e4(0x103)](JSON[_0xacc7e4(0x14f)](_0x1db5cf));}}else _0x284b1c=_0x2a3015[_0xacc7e4(0x16d)](_0x3db7b8);}}}[a1_0x32a756(0x15e)](_0x301459){const _0x98ce20=a1_0x32a756;if(_0x301459['clientOnOpen']){if(_0x98ce20(0x16f)!==_0x98ce20(0x145))_0x301459[_0x98ce20(0x134)](_0x301459);else try{_0x52f690=_0xf83f8e[_0x98ce20(0x16d)](_0x47694a);}catch(_0xb64583){if(_0x29df07['toString']()['indexOf']('bytearray(b\x27')>-0x1){const _0x31477c=_0x31ea27[_0x98ce20(0x10e)]()[_0x98ce20(0x101)]('bytearray(b\x27'['length']),_0x5f1149=_0x31477c['indexOf']('\x27)');_0x1135a4=_0x5f1149>-0x1?_0x31477c[_0x98ce20(0x101)](0x0,_0x5f1149):_0x31477c;}}}else console[_0x98ce20(0x112)](msg||_0x98ce20(0x11f));}[a1_0x32a756(0x159)](_0x6fb3d,_0x518450,_0x2558a2){const _0x187385=a1_0x32a756;let _0x26c820,_0x5dc36d=![];_[_0x187385(0x12d)](_0x518450)?(_0x26c820=JSON['parse'](_0x518450),_0x26c820[_0x187385(0x16b)]&&_0x26c820[_0x187385(0x16b)]=='unsubscribed'&&(_0x5dc36d=!![],delete _0x26c820[_0x187385(0x16b)],_0x6fb3d[_0x187385(0x13b)](_0x6fb3d,_0x26c820[_0x187385(0x153)]))):_0x26c820=_0x518450,_0x6fb3d[_0x187385(0x169)]()[_0x187385(0x123)]?'HKkDY'!==_0x187385(0x15f)?(_0x27e326=_0x452199[_0x187385(0x16d)](_0x240c87),_0x264536[_0x187385(0x16b)]&&_0x4f49d4['event']==_0x187385(0x140)&&(_0x2a41e1=!![],delete _0x5a1df3[_0x187385(0x16b)],_0x1acfb5[_0x187385(0x13b)](_0x5208ea,_0x1542db[_0x187385(0x153)]))):(_0x5dc36d==!![]&&('zpKtE'!==_0x187385(0x107)?_0x26c820={'event':_0x187385(0x140),..._0x26c820}:(this[_0x187385(0x12c)]=!![],_0x46e941[_0x187385(0x112)](_0x40f507||'logged\x20in'))),_0x6fb3d[_0x187385(0x169)]()['clientOnMessage'](_0x2558a2,_0x26c820)):'cRtaS'!=='cRtaS'?_0x5e8297[_0x187385(0x134)]?_0x4a082b[_0x187385(0x134)](_0x2fca4e):_0x3b0180[_0x187385(0x112)](_0x2c7986||_0x187385(0x11f)):console[_0x187385(0x112)](_0x518450||_0x187385(0x156));}[a1_0x32a756(0x163)](_0x2ed30c,_0x466678){const _0x618143=a1_0x32a756;let _0x4eebd6;if(_[_0x618143(0x12d)](_0x2ed30c))try{_0x4eebd6=JSON[_0x618143(0x16d)](_0x2ed30c);}catch(_0x57e497){if(_0x2ed30c[_0x618143(0x10e)]()[_0x618143(0x149)](_0x618143(0x164))>-0x1){const _0x4e3403=_0x2ed30c[_0x618143(0x10e)]()['slice'](_0x618143(0x164)[_0x618143(0x148)]),_0x345d96=_0x4e3403[_0x618143(0x149)]('\x27)');_0x4eebd6=_0x345d96>-0x1?_0x4e3403[_0x618143(0x101)](0x0,_0x345d96):_0x4e3403;}}else{if(_0x618143(0x10f)!=='zetsv'){if(_0x979206[_0x618143(0x10e)]()[_0x618143(0x149)](_0x618143(0x164))>-0x1){const _0x5e54ec=_0x26de4b[_0x618143(0x10e)]()[_0x618143(0x101)](_0x618143(0x164)[_0x618143(0x148)]),_0x330d25=_0x5e54ec['indexOf']('\x27)');_0x46cca3=_0x330d25>-0x1?_0x5e54ec[_0x618143(0x101)](0x0,_0x330d25):_0x5e54ec;}}else _0x4eebd6=_0x2ed30c;}_0x466678['clientOnError']?_0x466678[_0x618143(0x154)](_0x466678,_0x4eebd6):console[_0x618143(0x112)](_0x2ed30c||_0x618143(0x152));}[a1_0x32a756(0x111)](_0x3a5ecc,_0x4f866e,_0x108517){const _0x5a2782=a1_0x32a756;let _0x44d658;if(_[_0x5a2782(0x12d)](_0x4f866e)){if(_0x5a2782(0x108)!==_0x5a2782(0x115))try{_0x44d658=JSON['parse'](_0x4f866e);}catch(_0x23f1cd){if(_0x4f866e[_0x5a2782(0x10e)]()[_0x5a2782(0x149)](_0x5a2782(0x164))>-0x1){const _0x76eb3c=_0x4f866e[_0x5a2782(0x10e)]()[_0x5a2782(0x101)](_0x5a2782(0x164)[_0x5a2782(0x148)]),_0x7bdab1=_0x76eb3c['indexOf']('\x27)');_0x44d658=_0x7bdab1>-0x1?_0x76eb3c['slice'](0x0,_0x7bdab1):_0x76eb3c;}}else throw{'message':_0x5a2782(0x14a)};}else'piSAA'===_0x5a2782(0x11b)?_0x44d658=_0x4f866e:_0x1199ab[_0x5a2782(0x116)](_0x4273be,_0x444327,_0x5308ca);_0x108517[_0x5a2782(0x116)]?_0x108517[_0x5a2782(0x116)](_0x3a5ecc,_0x44d658,_0x108517):console[_0x5a2782(0x112)](_0x4f866e||_0x5a2782(0x10d));}}
function a1_0x34a5(){const _0x429fd5=['candle1D','stringify','grid-orders-contract','quotes','nQTRE','responseReceived','login','unsubscribed','batch-cancel-orders','BJfNh','batch-orders','2388APZGox','2gSfynK','sign','subclassOnMessage','account-greeks','subclassOnClose','XFZMl','tickers','url','trades','8176464sIpbSh','socket\x20order\x20requires:\x20an\x20id,\x20and\x20an\x20array\x20containing\x20order(s)\x20to\x20cancel\x20args\x20(see\x20okx\x20api\x20doc)','publicChannels','wss://ws.okx.com:8443/ws/v5/public','isPrivate','awLWc','KVRpf','sha256','Zgeea','clientOnOpen','fuAfX','toString','instId','clientOnClose','cancel-order','grid-orders-spot','args','YHick','block-tickers','removeSubscriptionHavingChannel','24239150gzawfJ','getSubscriptions','length','derived\x20onError','now','koYLh','33585ZwoZck','bytearray(b\x27','open-interest','getOptions','/users/self/verify','amend-order','SAFDy','digest','ZVxzH','update','cancelOrders','orders','index-candle30m','grid-sub-orders','event','3277455eVAodH','please\x20login','validateSubscription','privateChannels','subclassOnOpen','661698FPmlPQ','subscribe','loggedIn','derived\x20onMessage','order','instruments','YHwFN','isObject','indexOf','Hmac','tGZKs','subclassOnError','rfqs','unsubscribe','passphrase','opt-summary','liquidation-warning','wJJlJ','sPfVE','key','derived\x20onOpen','index-tickers','socket\x20order\x20requires:\x20an\x20id,\x20and\x20an\x20array\x20containing\x20order\x20args\x20(see\x20okx\x20api\x20doc)','logged\x20in','send','instType','PbyBq','subclassedSocket','OimPK','orders-algo','1677YRlQkV','price-limit','constructor','mark-price-candle1D','QdQnu','mark-price','zZGVv','HqQHH','parse','uly','public-struc-block-trades','estimated-price','balance_and_position','fuXGH','positions','struc-block-trades','batch-amend-orders','arg','6eqICVk','log','aBaJL','clientOnMessage','books','channel','socket\x20subscription\x20requires:\x20array\x20of\x20subscriptions\x20args\x20(see\x20okx\x20api\x20doc)','slice','7838978cfXNOE','clientOnError','muxLA','algo-advance'];a1_0x34a5=function(){return _0x429fd5;};return a1_0x34a5();}function a1_0x21c8(_0x3ccb58,_0x23763b){const _0x34a5e5=a1_0x34a5();return a1_0x21c8=function(_0x21c801,_0x13a7ca){_0x21c801=_0x21c801-0x1c7;let _0x14c6d2=_0x34a5e5[_0x21c801];return _0x14c6d2;},a1_0x21c8(_0x3ccb58,_0x23763b);}const a1_0x2f9396=a1_0x21c8;(function(_0xeb8450,_0x3a3adf){const _0x283498=a1_0x21c8,_0x1de16d=_0xeb8450();while(!![]){try{const _0x2e8a6d=parseInt(_0x283498(0x1fd))/0x1*(-parseInt(_0x283498(0x1da))/0x2)+-parseInt(_0x283498(0x22f))/0x3*(parseInt(_0x283498(0x1d9))/0x4)+parseInt(_0x283498(0x20c))/0x5+-parseInt(_0x283498(0x241))/0x6*(parseInt(_0x283498(0x1ca))/0x7)+-parseInt(_0x283498(0x1e3))/0x8+parseInt(_0x283498(0x211))/0x9+parseInt(_0x283498(0x1f7))/0xa;if(_0x2e8a6d===_0x3a3adf)break;else _0x1de16d['push'](_0x1de16d['shift']());}catch(_0x35ac65){_0x1de16d['push'](_0x1de16d['shift']());}}}(a1_0x34a5,0x9d27c));import{PendaxSocket}from'../common/pendaxsocket.js';import*as a1_0x2eebf6 from'crypto';import a1_0x51edd3 from'lodash';const {_}=a1_0x51edd3;export class BitgetSocket extends PendaxSocket{[a1_0x2f9396(0x20f)]=['account',a1_0x2f9396(0x23d),a1_0x2f9396(0x23b),a1_0x2f9396(0x208),a1_0x2f9396(0x22e),a1_0x2f9396(0x1cd),a1_0x2f9396(0x221),a1_0x2f9396(0x1dd),a1_0x2f9396(0x21d),a1_0x2f9396(0x1d1),a1_0x2f9396(0x23e),a1_0x2f9396(0x1f2),a1_0x2f9396(0x1d0),'grid-positions',a1_0x2f9396(0x20a)];['publicChannels']=[a1_0x2f9396(0x216),a1_0x2f9396(0x1e0),a1_0x2f9396(0x1ff),a1_0x2f9396(0x1ce),a1_0x2f9396(0x1e2),a1_0x2f9396(0x23a),a1_0x2f9396(0x234),a1_0x2f9396(0x232),a1_0x2f9396(0x230),a1_0x2f9396(0x245),a1_0x2f9396(0x220),'funding-rate',a1_0x2f9396(0x209),a1_0x2f9396(0x226),'status',a1_0x2f9396(0x239),a1_0x2f9396(0x1f5)];constructor(_0x3c4842){const _0x281657=a1_0x2f9396;let _0x1d8ef3=_0x3c4842||{};if(_0x3c4842[_0x281657(0x1e7)]&&_0x3c4842[_0x281657(0x1e7)]==!![]){if('ThEjz'===_0x281657(0x1d2))throw{'message':_0x59bf4a};else _0x1d8ef3[_0x281657(0x1e1)]='wss://ws.okx.com:8443/ws/v5/private';}else _0x1d8ef3[_0x281657(0x1e1)]=_0x281657(0x1e6);super(_0x1d8ef3),this[_0x281657(0x200)]()[_0x281657(0x22c)]=this,this[_0x281657(0x200)]()[_0x281657(0x210)]=this[_0x281657(0x210)],this[_0x281657(0x200)]()[_0x281657(0x1dc)]=this['subclassOnMessage'],this[_0x281657(0x200)]()[_0x281657(0x21c)]=this['subclassOnError'],this['getOptions']()[_0x281657(0x1de)]=this[_0x281657(0x1de)];}[a1_0x2f9396(0x1db)](_0x4079a6){const _0x3d4197=a1_0x2f9396,_0x2a9778=a1_0x2eebf6[_0x3d4197(0x21a)](_0x3d4197(0x1ea),this[_0x3d4197(0x200)]()['secret'])[_0x3d4197(0x206)](_0x4079a6)[_0x3d4197(0x204)]('base64');return _0x2a9778;}[a1_0x2f9396(0x1d4)](){const _0x4c9dd3=a1_0x2f9396;if(this[_0x4c9dd3(0x213)]==!![])return;const _0x560344=Math['floor'](Date[_0x4c9dd3(0x1fb)]()/0x3e8),_0xb2d33d='GET',_0x3331b2=_0x4c9dd3(0x201);let _0x5d3dd4=_0x560344[_0x4c9dd3(0x1ee)]()+_0xb2d33d+_0x3331b2;const _0x1b2400=this[_0x4c9dd3(0x1db)](_0x5d3dd4);let _0x169daa=this[_0x4c9dd3(0x200)]();const _0x5ecae3={'op':_0x4c9dd3(0x1d4),'args':[{'apiKey':_0x169daa[_0x4c9dd3(0x224)],'passphrase':_0x169daa[_0x4c9dd3(0x21f)],'timestamp':_0x560344,'sign':_0x1b2400}]};this[_0x4c9dd3(0x1d3)]=![];let _0xc9f679=JSON[_0x4c9dd3(0x1cf)](_0x5ecae3);this[_0x4c9dd3(0x229)](_0xc9f679,_0x458e38=>{const _0x3ecbf4=_0x4c9dd3;if('oxirX'==='oxirX')this[_0x3ecbf4(0x213)]=!![],console[_0x3ecbf4(0x242)](_0x458e38||_0x3ecbf4(0x228));else{const _0x2cbe81=_0xf75e4e['toString']()[_0x3ecbf4(0x1c9)](_0x3ecbf4(0x1fe)['length']),_0x2a542f=_0x2cbe81['indexOf']('\x27)');_0x2dff92=_0x2a542f>-0x1?_0x2cbe81[_0x3ecbf4(0x1c9)](0x0,_0x2a542f):_0x2cbe81;}});}['placeOrders'](_0x361cd3){const _0x39ca7e=a1_0x2f9396;if(!this[_0x39ca7e(0x213)])throw{'message':_0x39ca7e(0x20d)};if(_0x361cd3&&_0x361cd3['id']&&_0x361cd3['args']&&_0x361cd3[_0x39ca7e(0x1f3)][_0x39ca7e(0x231)]==Array&&_0x361cd3[_0x39ca7e(0x1f3)][_0x39ca7e(0x1f9)]>0x0){_0x361cd3[_0x39ca7e(0x1f3)]['length']==0x1?_0x361cd3['op']=_0x39ca7e(0x215):_0x361cd3['op']=_0x39ca7e(0x1d8);try{_0x39ca7e(0x21b)!==_0x39ca7e(0x21b)?_0x53a73d[_0x39ca7e(0x1e1)]=_0x39ca7e(0x1e6):this[_0x39ca7e(0x229)](JSON[_0x39ca7e(0x1cf)](_0x361cd3));}catch(_0x5bfbe9){if(_0x39ca7e(0x1d7)===_0x39ca7e(0x1d7))throw{'message':_0x5bfbe9};else _0x692a66=_0x5cd4f8;}}else throw{'message':_0x39ca7e(0x227)};}[a1_0x2f9396(0x207)](_0x223817){const _0xe388ba=a1_0x2f9396;if(!this[_0xe388ba(0x213)]){if(_0xe388ba(0x203)===_0xe388ba(0x223))_0x17a5a2['op']=_0xe388ba(0x215);else throw{'message':'please\x20login'};}if(_0x223817&&_0x223817['id']&&_0x223817[_0xe388ba(0x1f3)]&&_0x223817[_0xe388ba(0x1f3)][_0xe388ba(0x231)]==Array&&_0x223817['arg'][_0xe388ba(0x1f9)]>0x0){if(_0x223817['args'][_0xe388ba(0x1f9)]==0x1){if(_0xe388ba(0x1f4)===_0xe388ba(0x1e8))throw{'message':'socket\x20order\x20requires:\x20an\x20id,\x20and\x20an\x20array\x20containing\x20order\x20args\x20(see\x20okx\x20api\x20doc)'};else _0x223817['op']=_0xe388ba(0x1f1);}else _0xe388ba(0x222)!==_0xe388ba(0x222)?_0x4ffa3c=_0xc66b4b[_0xe388ba(0x237)](_0x196dd5):_0x223817['op']=_0xe388ba(0x1d6);try{this[_0xe388ba(0x229)](JSON[_0xe388ba(0x1cf)](_0x223817));}catch(_0x3e0f54){throw{'message':_0x3e0f54};}}else throw{'message':_0xe388ba(0x1e4)};}['amendOrders'](_0x2367d4){const _0x5f5dfb=a1_0x2f9396;if(!this[_0x5f5dfb(0x213)]){if(_0x5f5dfb(0x236)!==_0x5f5dfb(0x1fc))throw{'message':_0x5f5dfb(0x20d)};else try{_0x4f6315=_0x11c3f8[_0x5f5dfb(0x237)](_0x980de2);}catch(_0x40ad2f){if(_0x5ad458[_0x5f5dfb(0x1ee)]()['indexOf'](_0x5f5dfb(0x1fe))>-0x1){const _0x140760=_0x576cd6[_0x5f5dfb(0x1ee)]()[_0x5f5dfb(0x1c9)](_0x5f5dfb(0x1fe)['length']),_0x292164=_0x140760['indexOf']('\x27)');_0x6e20ff=_0x292164>-0x1?_0x140760[_0x5f5dfb(0x1c9)](0x0,_0x292164):_0x140760;}}}if(_0x2367d4&&_0x2367d4['id']&&_0x2367d4['args']&&_0x2367d4['args']['constructor']==Array&&_0x2367d4[_0x5f5dfb(0x240)][_0x5f5dfb(0x1f9)]>0x0){_0x2367d4['args']['length']==0x1?_0x5f5dfb(0x23c)!==_0x5f5dfb(0x23c)?_0x5c6cfb[_0x5f5dfb(0x242)](_0x56400f||'derived\x20onError'):_0x2367d4['op']=_0x5f5dfb(0x202):_0x5f5dfb(0x217)==='fSbMV'?_0x516e93['op']='amend-order':_0x2367d4['op']=_0x5f5dfb(0x23f);try{this['send'](JSON[_0x5f5dfb(0x1cf)](_0x2367d4));}catch(_0x2e58dd){if(_0x5f5dfb(0x1e9)!=='dwSKP')throw{'message':_0x2e58dd};else _0x42e98b['op']=_0x5f5dfb(0x1d8);}}else throw{'message':_0x5f5dfb(0x227)};}[a1_0x2f9396(0x212)](_0x29a537){const _0x21a972=a1_0x2f9396;if(_0x29a537&&_0x29a537[_0x21a972(0x1f3)]&&_0x29a537['args'][_0x21a972(0x231)]==Array){if('kIDqs'!==_0x21a972(0x205))for(const _0x3d9c5b of _0x29a537[_0x21a972(0x1f3)]){if('RBKVz'!==_0x21a972(0x1df)){let _0x5aa050={'op':_0x21a972(0x212),'args':[_0x3d9c5b]};const _0x3ddf4b=_0x3d9c5b[_0x21a972(0x1ef)]?'_'+_0x3d9c5b[_0x21a972(0x1ef)]:'',_0x2cb010=_0x3d9c5b[_0x21a972(0x22a)]?'_'+_0x3d9c5b['instType']:'',_0x318459=_0x3d9c5b[_0x21a972(0x238)]?'_'+_0x3d9c5b[_0x21a972(0x238)]:'',_0x42f215=_0x3d9c5b[_0x21a972(0x1c7)]+_0x3ddf4b+_0x2cb010+_0x318459;this[_0x21a972(0x20e)](_0x42f215,_0x5aa050,this[_0x21a972(0x1e5)],this['privateChannels']);try{this['send'](JSON['stringify'](_0x5aa050));}catch(_0x4550ba){if('SidbA'===_0x21a972(0x243))_0x114866[_0x21a972(0x1ec)](_0x299f8b);else throw{'message':_0x4550ba};}}else{if(_0x30d96a&&_0x37cff2[_0x21a972(0x1f3)]&&_0x5a463c[_0x21a972(0x1f3)]['constructor']==_0x98486f)for(const _0x496775 of _0x38c7b9['args']){const _0x30c579=_0x496775[_0x21a972(0x1ef)]?'_'+_0x496775['instId']:'',_0x2f2630=_0x496775[_0x21a972(0x22a)]?'_'+_0x496775[_0x21a972(0x22a)]:'',_0x553a32=_0x496775[_0x21a972(0x238)]?'_'+_0x496775[_0x21a972(0x238)]:'',_0x77d3e8=_0x496775[_0x21a972(0x1c7)]+_0x30c579+_0x2f2630+_0x553a32;let _0x227b53=this['getSubscriptions']()[_0x77d3e8];if(_0x227b53){let _0xe69620=_0x227b53[_0x21a972(0x1f3)];_0xe69620['op']=_0x21a972(0x21e),this['send'](_0x10f444[_0x21a972(0x1cf)](_0xe69620));}}}}else _0x59cb3c[_0x21a972(0x1cb)](_0x339347,_0x29e182);}else throw{'message':_0x21a972(0x1c8)};}[a1_0x2f9396(0x21e)](_0x16c0b3){const _0x7e36de=a1_0x2f9396;if(_0x16c0b3&&_0x16c0b3[_0x7e36de(0x1f3)]&&_0x16c0b3[_0x7e36de(0x1f3)][_0x7e36de(0x231)]==Array)for(const _0x25daa9 of _0x16c0b3['args']){if(_0x7e36de(0x235)==='uFnBv')throw{'message':_0x7e36de(0x20d)};else{const _0x13bd5c=_0x25daa9[_0x7e36de(0x1ef)]?'_'+_0x25daa9[_0x7e36de(0x1ef)]:'',_0x5cce65=_0x25daa9[_0x7e36de(0x22a)]?'_'+_0x25daa9[_0x7e36de(0x22a)]:'',_0x40fee7=_0x25daa9[_0x7e36de(0x238)]?'_'+_0x25daa9[_0x7e36de(0x238)]:'',_0x5e02a9=_0x25daa9['channel']+_0x13bd5c+_0x5cce65+_0x40fee7;let _0x4250bd=this[_0x7e36de(0x1f8)]()[_0x5e02a9];if(_0x4250bd){let _0x337edb=_0x4250bd[_0x7e36de(0x1f3)];_0x337edb['op']=_0x7e36de(0x21e),this[_0x7e36de(0x229)](JSON['stringify'](_0x337edb));}}}}['subclassOnOpen'](_0x5b0bc7){const _0x3fde8e=a1_0x2f9396;_0x5b0bc7['clientOnOpen']?_0x3fde8e(0x22d)===_0x3fde8e(0x22d)?_0x5b0bc7[_0x3fde8e(0x1ec)](_0x5b0bc7):_0x1c0d95[_0x3fde8e(0x1ec)]?_0x18f340[_0x3fde8e(0x1ec)](_0x437b8c):_0x4120c0[_0x3fde8e(0x242)](_0x4e101c||'derived\x20onOpen'):console[_0x3fde8e(0x242)](msg||_0x3fde8e(0x225));}[a1_0x2f9396(0x1dc)](_0x40c72c,_0x2bad9e,_0x3d4ced){const _0x15f9e6=a1_0x2f9396;let _0x463fdc,_0x19cf17=![];_['isObject'](_0x2bad9e)?_0x15f9e6(0x233)==='QdQnu'?(_0x463fdc=JSON[_0x15f9e6(0x237)](_0x2bad9e),_0x463fdc[_0x15f9e6(0x20b)]&&_0x463fdc['event']==_0x15f9e6(0x1d5)&&(_0x19cf17=!![],delete _0x463fdc[_0x15f9e6(0x20b)],_0x40c72c[_0x15f9e6(0x1f6)](_0x40c72c,_0x463fdc[_0x15f9e6(0x1c7)]))):_0x4a0d8b=_0x17246b[_0x15f9e6(0x237)](_0x572100):_0x463fdc=_0x2bad9e,_0x40c72c[_0x15f9e6(0x200)]()[_0x15f9e6(0x244)]?(_0x19cf17==!![]&&(_0x463fdc={'event':'unsubscribed',..._0x463fdc}),_0x40c72c['getOptions']()[_0x15f9e6(0x244)](_0x3d4ced,_0x463fdc)):console[_0x15f9e6(0x242)](_0x2bad9e||_0x15f9e6(0x214));}['subclassOnError'](_0x167721,_0x46339d){const _0x1af067=a1_0x2f9396;let _0x21ea63;if(_[_0x1af067(0x218)](_0x167721))try{_0x21ea63=JSON[_0x1af067(0x237)](_0x167721);}catch(_0x1ef3c2){if('sTcXK'==='TARhM')throw{'message':_0x57e6f5};else{if(_0x167721['toString']()[_0x1af067(0x219)](_0x1af067(0x1fe))>-0x1){if('BbHGF'===_0x1af067(0x1eb))_0x5071fe=_0xe65230;else{const _0x391191=_0x167721['toString']()[_0x1af067(0x1c9)]('bytearray(b\x27'[_0x1af067(0x1f9)]),_0x4f10f2=_0x391191[_0x1af067(0x219)]('\x27)');_0x21ea63=_0x4f10f2>-0x1?_0x391191[_0x1af067(0x1c9)](0x0,_0x4f10f2):_0x391191;}}}}else _0x21ea63=_0x167721;_0x46339d[_0x1af067(0x1cb)]?_0x46339d[_0x1af067(0x1cb)](_0x46339d,_0x21ea63):console['log'](_0x167721||_0x1af067(0x1fa));}['subclassOnClose'](_0x4b7e24,_0x60f78b,_0x66d2e1){const _0x5e6e72=a1_0x2f9396;let _0x43141c;if(_['isObject'](_0x60f78b))try{_0x43141c=JSON[_0x5e6e72(0x237)](_0x60f78b);}catch(_0x223f27){if(_0x60f78b['toString']()['indexOf'](_0x5e6e72(0x1fe))>-0x1){const _0x1dae96=_0x60f78b[_0x5e6e72(0x1ee)]()[_0x5e6e72(0x1c9)](_0x5e6e72(0x1fe)[_0x5e6e72(0x1f9)]),_0x4364d5=_0x1dae96[_0x5e6e72(0x219)]('\x27)');_0x43141c=_0x4364d5>-0x1?_0x1dae96[_0x5e6e72(0x1c9)](0x0,_0x4364d5):_0x1dae96;}}else{if(_0x5e6e72(0x1cc)===_0x5e6e72(0x1ed)){const _0x33fa96=_0x8dfbf['toString']()['slice'](_0x5e6e72(0x1fe)[_0x5e6e72(0x1f9)]),_0x7a357d=_0x33fa96[_0x5e6e72(0x219)]('\x27)');_0x417e55=_0x7a357d>-0x1?_0x33fa96[_0x5e6e72(0x1c9)](0x0,_0x7a357d):_0x33fa96;}else _0x43141c=_0x60f78b;}_0x66d2e1[_0x5e6e72(0x1f0)]?_0x5e6e72(0x22b)!==_0x5e6e72(0x22b)?_0x1c68f2[_0x5e6e72(0x1f0)](_0x49cf15,_0x229ebc,_0x38806e):_0x66d2e1['clientOnClose'](_0x4b7e24,_0x43141c,_0x66d2e1):console['log'](_0x60f78b||'derived\x20onClose');}}

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

const a2_0x213288=a2_0x17ec;function a2_0x428a(){const _0x3667bf=['op:\x20','wss://stream-testnet.bybit.com/v5/private','AAczC','doPing','OhUCH','anKOe','subclassOnClose','wss://stream.bybit.com/v5/private','removeSubscriptionHavingChannel','wss://stream-testnet.bybit.com/v5/public/inverse','wvuiE','getOptions','publicTrade','option','vStRW','\x20topic:\x20','lifetimeMs','isObject','\x20requires\x20symbol\x20and\x20interval\x20args','subclassOnError','bytearray(b\x27','subscriptions','2820360SzeaIN','clientOnError','zxgpm','iKfxj','includes','key','derived\x20onMessage','xHFvJ','subArgsHash','send','error.\x20Unknown\x20topic:\x20','ejBEP','entries','prepareSubscription','dHAyR','2677763iTEEoh','2603112CZLdDa','testnet','args','93688wBLbqt','constructor','privateTopics','wSrmY','derived\x20onOpen','removeSubscription','zVhkj','validateSubscription','stringify','PmpAY','subscribe','getSubscriptionArgsHash','wss://stream.bybit.com/v5/public/option','FdoZK','secret','TOAbd','loggedIn','NsGBo','getSubscriptions','ping','unsubscribed','gCFfP','hIVgm','derived\x20onClose','socket\x20subscriptions\x20must\x20not\x20mix\x20private\x20with\x20public\x20topics','NwoYx','\x20requires\x20depth\x20and\x20symbol\x20args','294lehPsK','logged\x20in','858460PsEnwQ','indexOf','clientOnOpen','iicqb','depth','event','hNQHO','inverse','wss://stream-testnet.bybit.com/v5/public/option','one\x20or\x20more\x20requested\x20topics\x20requires\x20login.\x20Please\x20perform\x20socket\x20login\x20then\x20retry','socket','interval','length','toFixed','72PXcjxH','/realtime','slice','log','eMOpm','CsbYu','\x20requires\x20symbol\x20arg','hnrSV','xyZGb','push','orderbook','socket\x20subscription\x20requires:\x20array\x20of\x20subscriptions\x20args\x20(see\x20bybit\x20api\x20doc)','spot','clientOnClose','update','subscription\x20name\x20already\x20used\x20','xtPdu','skHyk','subclassedSocket','ScBkF','clientOnMessage','21tRoisV','2413vDZLTy','wss://stream.bybit.com/v5/public/linear','wss://stream-testnet.bybit.com/v5/public/spot','order','kline_lt','FkFpe','linear','isPrivate','already\x20subscribed\x20to\x20','iwcIq','tickers','hex','topic','login','AZODh','channel','85412ecGYBR','unsubscribe','derived\x20onError','kline','execution','toString','socketType','liquidation','9JfLxTt','greeks','subclassOnMessage','ZaFOh','tgaLN','324fRFfNC','url','publicTopics','ejQhX','pkbKf','symbol','parse','subclassOnOpen','position'];a2_0x428a=function(){return _0x3667bf;};return a2_0x428a();}(function(_0x39d12b,_0x490838){const _0x4f57d9=a2_0x17ec,_0x58b1cf=_0x39d12b();while(!![]){try{const _0x2c2c5f=-parseInt(_0x4f57d9(0xd6))/0x1*(-parseInt(_0x4f57d9(0xf3))/0x2)+parseInt(_0x4f57d9(0xd5))/0x3*(parseInt(_0x4f57d9(0xe6))/0x4)+-parseInt(_0x4f57d9(0x142))/0x5+-parseInt(_0x4f57d9(0x140))/0x6*(parseInt(_0x4f57d9(0x125))/0x7)+-parseInt(_0x4f57d9(0x122))/0x8*(parseInt(_0x4f57d9(0xee))/0x9)+-parseInt(_0x4f57d9(0x112))/0xa+-parseInt(_0x4f57d9(0x121))/0xb*(-parseInt(_0x4f57d9(0x150))/0xc);if(_0x2c2c5f===_0x490838)break;else _0x58b1cf['push'](_0x58b1cf['shift']());}catch(_0x5ee4ab){_0x58b1cf['push'](_0x58b1cf['shift']());}}}(a2_0x428a,0x8a31a));import{PendaxSocket}from'../common/pendaxsocket.js';import*as a2_0x2e5f2a from'crypto';import a2_0x2283cd from'lodash';const {toLower}=a2_0x2283cd;function a2_0x17ec(_0x1e0417,_0x2c1738){const _0x428a72=a2_0x428a();return a2_0x17ec=function(_0x17ec4b,_0x5ada8f){_0x17ec4b=_0x17ec4b-0xc5;let _0x161525=_0x428a72[_0x17ec4b];return _0x161525;},a2_0x17ec(_0x1e0417,_0x2c1738);}import a2_0x510fc9 from'lodash';const {_}=a2_0x510fc9;export class BybitSocket extends PendaxSocket{[a2_0x213288(0x127)]=[a2_0x213288(0xfb),a2_0x213288(0xea),a2_0x213288(0xd9),'wallet',a2_0x213288(0xef)];[a2_0x213288(0xf5)]=[a2_0x213288(0xca),a2_0x213288(0x108),a2_0x213288(0xe0),a2_0x213288(0xe9),'liquidation',a2_0x213288(0xda),'tickers_lt','lt'];[a2_0x213288(0x10c)]=0x989680;constructor(_0x2177a4){const _0x69b0c2=a2_0x213288;let _0x2bc747=_0x2177a4||{};_0x2177a4['lifetime']&&('FdoZK'!==_0x69b0c2(0x132)?_0x3563e2=_0xd7ad8c+'.'+_0x550666[_0x69b0c2(0x124)][_0x171b70][_0x69b0c2(0x146)]:lifetimeMs=_0x2177a4['lifetime']);if(_0x2177a4[_0x69b0c2(0x123)]===!![]){if(_0x2177a4[_0x69b0c2(0xdd)]&&_0x2177a4[_0x69b0c2(0xdd)]==!![])_0x2bc747['url']=_0x69b0c2(0xfd);else{if(_0x69b0c2(0xd1)==='BJOFr')throw{'message':_0x69b0c2(0x13d)};else{if(_0x2177a4[_0x69b0c2(0xec)])switch(toLower(_0x2177a4[_0x69b0c2(0xec)])){case'spot':_0x2bc747[_0x69b0c2(0xf4)]=_0x69b0c2(0xd8);break;case _0x69b0c2(0xdc):_0x2bc747[_0x69b0c2(0xf4)]='wss://stream-testnet.bybit.com/v5/public/linear';break;case'option':_0x2bc747[_0x69b0c2(0xf4)]=_0x69b0c2(0x14a);break;case'inverse':_0x2bc747['url']=_0x69b0c2(0x105);break;}}}}else{if(_0x2177a4[_0x69b0c2(0xdd)]&&_0x2177a4[_0x69b0c2(0xdd)]==!![])_0x2bc747[_0x69b0c2(0xf4)]=_0x69b0c2(0x103);else{if(_0x2177a4[_0x69b0c2(0xec)])switch(toLower(_0x2177a4['socketType'])){case _0x69b0c2(0xcc):_0x2bc747['url']='wss://stream.bybit.com/v5/public/spot';break;case _0x69b0c2(0xdc):_0x2bc747[_0x69b0c2(0xf4)]=_0x69b0c2(0xd7);break;case _0x69b0c2(0x109):_0x2bc747[_0x69b0c2(0xf4)]=_0x69b0c2(0x131);break;case _0x69b0c2(0x149):_0x2bc747[_0x69b0c2(0xf4)]='wss://stream.bybit.com/v5/public/inverse';break;}}}super(_0x2bc747),this[_0x69b0c2(0x107)]()[_0x69b0c2(0xd2)]=this,this[_0x69b0c2(0x107)]()['subclassOnOpen']=this[_0x69b0c2(0xfa)],this[_0x69b0c2(0x107)]()[_0x69b0c2(0xf0)]=this[_0x69b0c2(0xf0)],this['getOptions']()[_0x69b0c2(0x10f)]=this[_0x69b0c2(0x10f)],this[_0x69b0c2(0x107)]()[_0x69b0c2(0x102)]=this[_0x69b0c2(0x102)],this['getOptions']()['customPing']=this[_0x69b0c2(0xff)];}['sign'](_0x2fcc1f){const _0x156e9b=a2_0x213288,_0x175769=a2_0x2e5f2a['Hmac']('sha256',this[_0x156e9b(0x107)]()[_0x156e9b(0x133)])[_0x156e9b(0xce)](_0x2fcc1f)['digest'](_0x156e9b(0xe1));return _0x175769;}[a2_0x213288(0xff)](){const _0x57a30e=a2_0x213288,_0x3ee62b=JSON['stringify']({'op':_0x57a30e(0x138)});this[_0x57a30e(0x14c)][_0x57a30e(0x11b)](_0x3ee62b);}[a2_0x213288(0xe3)](){const _0x41afb9=a2_0x213288;if(this[_0x41afb9(0x135)]==!![])return;const _0x129cb5=new Date()['getTime']()+this[_0x41afb9(0x10c)],_0x3deba1='GET',_0x5c98f8=_0x41afb9(0x151);let _0x2862b6=_0x3deba1+_0x5c98f8+_0x129cb5;const _0x3d271e=this['sign'](_0x2862b6);let _0x30bf78=this[_0x41afb9(0x107)]();const _0x4395b9={'op':'auth','args':[_0x30bf78[_0x41afb9(0x117)],_0x129cb5[_0x41afb9(0x14f)](0x0),_0x3d271e]};this['responseReceived']=![];let _0x4565e6=JSON[_0x41afb9(0x12d)](_0x4395b9);this[_0x41afb9(0x11b)](_0x4565e6,_0x3fda11=>{const _0x13ad11=_0x41afb9;this['loggedIn']=!![],console[_0x13ad11(0x153)](_0x3fda11||_0x13ad11(0x141));});}[a2_0x213288(0x12f)](_0x3b8c11){const _0x4c7ed5=a2_0x213288;let _0x4862ad=_0x4c7ed5(0x12f);if(_0x3b8c11&&_0x3b8c11[_0x4c7ed5(0x124)]&&_0x3b8c11[_0x4c7ed5(0x124)][_0x4c7ed5(0x126)]==Array){if(_0x4c7ed5(0xf6)===_0x4c7ed5(0x134))_0xd6d434['url']=_0x4c7ed5(0x103);else{const _0x2fd58a=this['validateSubscriptionTypes'](_0x3b8c11);for(const _0xee423f of _0x3b8c11[_0x4c7ed5(0x124)]){if(_0x4c7ed5(0xc8)===_0x4c7ed5(0x12b))_0x2590a9=_0x2b541f+'.'+_0x4b8214['interval'];else{let _0x465f73=_0xee423f[_0x4c7ed5(0xe2)];if(_0xee423f['depth']){if(_0x4c7ed5(0xdf)!==_0x4c7ed5(0xdf))try{_0x206c3a=_0x30f78d[_0x4c7ed5(0xf9)](_0x5ef337);}catch(_0xfd7354){if(_0x318fbd[_0x4c7ed5(0xeb)]()['indexOf'](_0x4c7ed5(0x110))>-0x1){const _0x3c9192=_0x17c10b['toString']()[_0x4c7ed5(0x152)](_0x4c7ed5(0x110)[_0x4c7ed5(0x14e)]),_0x185e4a=_0x3c9192[_0x4c7ed5(0x143)]('\x27)');_0x5b53fd=_0x185e4a>-0x1?_0x3c9192[_0x4c7ed5(0x152)](0x0,_0x185e4a):_0x3c9192;}}else _0x465f73=_0x465f73+'.'+_0xee423f['depth'];}_0xee423f[_0x4c7ed5(0x14d)]&&(_0x465f73=_0x465f73+'.'+_0xee423f[_0x4c7ed5(0x14d)]),_0xee423f[_0x4c7ed5(0xf8)]&&(_0x465f73=_0x465f73+'.'+_0xee423f[_0x4c7ed5(0xf8)]),this[_0x4c7ed5(0x12c)](_0x465f73,_0xee423f,_0x2fd58a,_0x4862ad);}}try{if(_0x4c7ed5(0x120)==='dHAyR'){const _0x85a008=this['prepareSubscription'](_0x3b8c11);this['send'](_0x85a008);}else _0xd4bc55['clientOnClose'](_0xd570e6,_0x5ecc4e,_0x230478);}catch(_0x38c1ec){if(_0x4c7ed5(0xe4)==='xOCxH')delete this[_0x4c7ed5(0x111)][_0x361d3a];else throw{'message':_0x38c1ec};}}}else throw{'message':_0x4c7ed5(0xcb)};}[a2_0x213288(0x12c)](_0x53446f,_0x7baee9,_0xf97293,_0x30df48){const _0x32a755=a2_0x213288;if(_0xf97293===![])switch(_0x7baee9[_0x32a755(0xe2)]){case _0x32a755(0xca):if(!_0x7baee9[_0x32a755(0x146)]||!_0x7baee9['symbol'])throw{'message':_0x32a755(0xfc)+_0x30df48+_0x32a755(0x10b)+topic+_0x32a755(0x13f)};break;case _0x32a755(0x108):if(!_0x7baee9['symbol']){if(_0x32a755(0xf2)!=='zhFlp')throw{'message':_0x32a755(0xfc)+_0x30df48+_0x32a755(0x10b)+topic+'\x20requires\x20symbol\x20arg'};else return;}break;case _0x32a755(0xe0):if(!_0x7baee9[_0x32a755(0xf8)])throw{'message':_0x32a755(0xfc)+_0x30df48+_0x32a755(0x10b)+topic+'\x20requires\x20symbol\x20arg'};break;case'kline':if(!_0x7baee9[_0x32a755(0xf8)]||!_0x7baee9['interval']){if(_0x32a755(0x145)===_0x32a755(0x136))_0x3550cf=_0xf0a0ad['parse'](_0x3144b9);else throw{'message':_0x32a755(0xfc)+_0x30df48+_0x32a755(0x10b)+topic+_0x32a755(0x10e)};}break;case _0x32a755(0xed):if(!_0x7baee9[_0x32a755(0xf8)]){if(_0x32a755(0x11d)!==_0x32a755(0x11d))_0x45012c['clientOnError'](_0x3576e5,_0x101adf);else throw{'message':'op:\x20'+_0x30df48+_0x32a755(0x10b)+topic+_0x32a755(0xc6)};}break;case _0x32a755(0xda):if(!_0x7baee9['symbol']||!_0x7baee9['interval'])throw{'message':_0x32a755(0xfc)+_0x30df48+_0x32a755(0x10b)+topic+'\x20requires\x20symbol\x20and\x20interval\x20args'};break;case'tickers_lt':if(!_0x7baee9[_0x32a755(0xf8)]){if(_0x32a755(0xf7)!=='FtEVn')throw{'message':_0x32a755(0xfc)+_0x30df48+_0x32a755(0x10b)+topic+'\x20requires\x20symbol\x20arg'};else try{_0x21b529=_0xac862[_0x32a755(0xf9)](_0x3f6215);}catch(_0xe018ef){if(_0x4ea620[_0x32a755(0xeb)]()['indexOf'](_0x32a755(0x110))>-0x1){const _0x504534=_0x4e48a6[_0x32a755(0xeb)]()[_0x32a755(0x152)]('bytearray(b\x27'['length']),_0x55d593=_0x504534[_0x32a755(0x143)]('\x27)');_0x218912=_0x55d593>-0x1?_0x504534[_0x32a755(0x152)](0x0,_0x55d593):_0x504534;}}}break;case'lt':if(!_0x7baee9[_0x32a755(0xf8)])throw{'message':_0x32a755(0xfc)+_0x30df48+_0x32a755(0x10b)+topic+_0x32a755(0xc6)};break;default:throw{'message':'socket\x20'+_0x30df48+_0x32a755(0x11c)+topic};break;}if(_0xf97293&&!this['loggedIn']){if(_0x32a755(0x13e)==='NwoYx')throw{'message':_0x32a755(0x14b)};else throw _0x32a755(0xcf);}let _0x325af0=this[_0x32a755(0x130)](_0x7baee9);if(!this[_0x32a755(0x111)][_0x53446f]){for(const [_0x5ea735,_0x35209d]of Object[_0x32a755(0x11e)](this[_0x32a755(0x111)])){if(_0x32a755(0x114)===_0x32a755(0x114)){let _0x2c476d=_0x35209d[_0x32a755(0x11a)];if(_0x2c476d==_0x325af0)throw _0x32a755(0xde)+JSON[_0x32a755(0x12d)](_0x53446f);}else throw{'message':_0x32a755(0xfc)+_0x29d27d+'\x20topic:\x20'+_0x231e40+_0x32a755(0x10e)};}this[_0x32a755(0x111)][_0x53446f]={'args':_0x7baee9,'subArgsHash':_0x325af0};}else{if(_0x32a755(0x10a)===_0x32a755(0x10a))throw _0x32a755(0xcf);else throw'already\x20subscribed\x20to\x20'+_0x54ecd2[_0x32a755(0x12d)](_0x216940);}}[a2_0x213288(0x12a)](_0x4aa9ee){const _0x1eacd8=a2_0x213288;delete this[_0x1eacd8(0x111)][_0x4aa9ee];}[a2_0x213288(0xe7)](_0x4518ca){const _0x31eddf=a2_0x213288;let _0x35b94a=[];if(_0x4518ca&&_0x4518ca[_0x31eddf(0x126)]==Array)for(const _0x2d1083 of _0x4518ca){let _0x4e8dfa=_0x2d1083[_0x31eddf(0xe2)];_0x2d1083[_0x31eddf(0x146)]&&(_0x4e8dfa=_0x4e8dfa+'.'+_0x2d1083[_0x31eddf(0x146)]);_0x2d1083[_0x31eddf(0x14d)]&&(_0x4e8dfa=_0x4e8dfa+'.'+_0x2d1083[_0x31eddf(0x14d)]);if(_0x2d1083[_0x31eddf(0xf8)]){if(_0x31eddf(0x148)===_0x31eddf(0xf1))throw{'message':_0x31eddf(0xfc)+_0x8ba293+_0x31eddf(0x10b)+_0x46751c+_0x31eddf(0xc6)};else _0x4e8dfa=_0x4e8dfa+'.'+_0x2d1083[_0x31eddf(0xf8)];}let _0x4d8c36=this[_0x31eddf(0x137)]()[_0x4e8dfa];if(_0x4d8c36){if('iKfxj'!==_0x31eddf(0x115))throw{'message':_0x31eddf(0x14b)};else _0x35b94a[_0x31eddf(0xc9)](_0x4e8dfa),this['removeSubscription'](_0x4e8dfa);}}if(_0x35b94a['length']>0x0){if(_0x31eddf(0x101)!==_0x31eddf(0x154)){const _0x16b7d0={'op':'unsubscribe','args':_0x35b94a},_0x469d5e=JSON['stringify'](_0x16b7d0);this[_0x31eddf(0x11b)](_0x469d5e);}else throw{'message':_0x31eddf(0xfc)+_0x308690+_0x31eddf(0x10b)+_0x791e8d+'\x20requires\x20symbol\x20arg'};}}[a2_0x213288(0x11f)](_0x530db2){const _0x1a6729=a2_0x213288;let _0x7b64d={'op':_0x1a6729(0x12f),'args':[]};for(const _0x5375d1 in _0x530db2[_0x1a6729(0x124)]){let _0x4246b7=_0x530db2[_0x1a6729(0x124)][_0x5375d1]['topic'];_0x530db2[_0x1a6729(0x124)][_0x5375d1][_0x1a6729(0x146)]&&(_0x1a6729(0xc5)!==_0x1a6729(0xc5)?_0x299de7=_0x13ca3d+'.'+_0x2f5ac7['depth']:_0x4246b7=_0x4246b7+'.'+_0x530db2['args'][_0x5375d1][_0x1a6729(0x146)]);if(_0x530db2['args'][_0x5375d1][_0x1a6729(0x14d)]){if(_0x1a6729(0xd0)===_0x1a6729(0xd0))_0x4246b7=_0x4246b7+'.'+_0x530db2['args'][_0x5375d1][_0x1a6729(0x14d)];else throw{'message':_0x1a6729(0xcb)};}_0x530db2['args'][_0x5375d1]['symbol']&&(_0x4246b7=_0x4246b7+'.'+_0x530db2['args'][_0x5375d1][_0x1a6729(0xf8)]),_0x7b64d[_0x1a6729(0x124)][_0x1a6729(0xc9)](_0x4246b7);}return JSON[_0x1a6729(0x12d)](_0x7b64d);}['subclassOnOpen'](_0x1de9da){const _0x50afa3=a2_0x213288;if(_0x1de9da[_0x50afa3(0x144)])_0x50afa3(0x128)!==_0x50afa3(0x13a)?_0x1de9da[_0x50afa3(0x144)](_0x1de9da):(_0x5750d1=_0x1af10a[_0x50afa3(0xf9)](_0x63ff17),_0x2a19d2[_0x50afa3(0x147)]&&_0x5d0cd3[_0x50afa3(0x147)]==_0x50afa3(0x139)&&(_0x159c95=!![],delete _0x2afe76[_0x50afa3(0x147)],this[_0x50afa3(0x104)](_0x9fd2cf[_0x50afa3(0xe5)])));else{if('qtTzc'===_0x50afa3(0xc7))throw{'message':_0x1931a2};else console['log'](msg||_0x50afa3(0x129));}}['subclassOnMessage'](_0x26d410,_0x21206e,_0x3aae90){const _0x2d3bd7=a2_0x213288;let _0x4c4952,_0x526702=![];if(_[_0x2d3bd7(0x10d)](_0x21206e)){_0x4c4952=JSON['parse'](_0x21206e);if(_0x4c4952[_0x2d3bd7(0x147)]&&_0x4c4952[_0x2d3bd7(0x147)]=='unsubscribed'){if(_0x2d3bd7(0x13b)!==_0x2d3bd7(0x13b))throw{'message':_0x2d3bd7(0xfc)+_0x38c9b3+'\x20topic:\x20'+_0x4d831e+_0x2d3bd7(0x10e)};else _0x526702=!![],delete _0x4c4952[_0x2d3bd7(0x147)],this[_0x2d3bd7(0x104)](_0x4c4952[_0x2d3bd7(0xe5)]);}}else{if('oXLdK'!==_0x2d3bd7(0x119))_0x4c4952=_0x21206e;else{const _0xdc007=_0x56d0c1[_0x2d3bd7(0xeb)]()[_0x2d3bd7(0x152)](_0x2d3bd7(0x110)[_0x2d3bd7(0x14e)]),_0x58de79=_0xdc007[_0x2d3bd7(0x143)]('\x27)');_0x13dabf=_0x58de79>-0x1?_0xdc007['slice'](0x0,_0x58de79):_0xdc007;}}if(_0x26d410['getOptions']()[_0x2d3bd7(0xd4)])_0x526702==!![]&&(_0x4c4952={'event':_0x2d3bd7(0x139),..._0x4c4952}),_0x26d410[_0x2d3bd7(0x107)]()['clientOnMessage'](_0x3aae90,_0x4c4952);else{if(_0x2d3bd7(0x100)!=='OhUCH'){const _0x4c49f9=_0x49f2b9[_0x2d3bd7(0x12d)]({'op':_0x2d3bd7(0x138)});this['socket'][_0x2d3bd7(0x11b)](_0x4c49f9);}else console[_0x2d3bd7(0x153)](_0x21206e||_0x2d3bd7(0x118));}}[a2_0x213288(0x10f)](_0x479ae7,_0x1c9617){const _0xf8915=a2_0x213288;let _0x197694;if(_[_0xf8915(0x10d)](_0x479ae7))try{_0xf8915(0xd3)!==_0xf8915(0xd3)?_0x489679=!![]:_0x197694=JSON[_0xf8915(0xf9)](_0x479ae7);}catch(_0x235a41){if(_0x479ae7[_0xf8915(0xeb)]()[_0xf8915(0x143)]('bytearray(b\x27')>-0x1){const _0x3d044b=_0x479ae7['toString']()['slice'](_0xf8915(0x110)['length']),_0x1c9e0d=_0x3d044b[_0xf8915(0x143)]('\x27)');_0x197694=_0x1c9e0d>-0x1?_0x3d044b['slice'](0x0,_0x1c9e0d):_0x3d044b;}}else _0x197694=_0x479ae7;_0x1c9617[_0xf8915(0x113)]?_0x1c9617[_0xf8915(0x113)](_0x1c9617,_0x197694):console[_0xf8915(0x153)](_0x479ae7||_0xf8915(0xe8));}[a2_0x213288(0x102)](_0x3d9a33,_0x32ab78,_0x2d3582){const _0x286c19=a2_0x213288;let _0xa062b5;if(_[_0x286c19(0x10d)](_0x32ab78))try{if(_0x286c19(0xdb)!=='pxWyu')_0xa062b5=JSON[_0x286c19(0xf9)](_0x32ab78);else throw{'message':_0x286c19(0x14b)};}catch(_0x46757d){if(_0x32ab78['toString']()['indexOf'](_0x286c19(0x110))>-0x1){if(_0x286c19(0x106)!==_0x286c19(0x106)){if(_0x8dbbf5['toString']()['indexOf']('bytearray(b\x27')>-0x1){const _0x3659cc=_0x1b1964['toString']()[_0x286c19(0x152)](_0x286c19(0x110)['length']),_0x5bb760=_0x3659cc[_0x286c19(0x143)]('\x27)');_0x79f1ee=_0x5bb760>-0x1?_0x3659cc[_0x286c19(0x152)](0x0,_0x5bb760):_0x3659cc;}}else{const _0x4533f7=_0x32ab78[_0x286c19(0xeb)]()['slice'](_0x286c19(0x110)['length']),_0x4b7722=_0x4533f7[_0x286c19(0x143)]('\x27)');_0xa062b5=_0x4b7722>-0x1?_0x4533f7[_0x286c19(0x152)](0x0,_0x4b7722):_0x4533f7;}}}else _0xa062b5=_0x32ab78;_0x2d3582[_0x286c19(0xcd)]?_0x286c19(0xfe)===_0x286c19(0xfe)?_0x2d3582['clientOnClose'](_0x3d9a33,_0xa062b5,_0x2d3582):_0xbbebe2[_0x286c19(0x153)](_0x17c5fa||'derived\x20onMessage'):console['log'](_0x32ab78||_0x286c19(0x13c));}['validateSubscriptionTypes'](_0x1fb0a9){const _0x1aeed6=a2_0x213288;let _0x2182ff=![],_0x410485=![];for(const _0x3cd77e of _0x1fb0a9['args']){if(this['publicTopics'][_0x1aeed6(0x116)](_0x3cd77e['topic']))_0x1aeed6(0x12e)!=='ZNwLQ'?_0x410485=!![]:_0x470807=_0x3537fe+'.'+_0x467758['symbol'];else this[_0x1aeed6(0x127)][_0x1aeed6(0x116)](_0x3cd77e[_0x1aeed6(0xe2)])&&(_0x2182ff=!![]);}if(_0x2182ff==!![]&&_0x410485==!![])throw{'message':_0x1aeed6(0x13d)};else{if(_0x2182ff==!![]&&!this['loggedIn'])throw{'message':_0x1aeed6(0x14b)};return _0x2182ff==!![];}}}
const a2_0x1c0213=a2_0x10db;(function(_0x42c259,_0xce4478){const _0xc20102=a2_0x10db,_0x4c8746=_0x42c259();while(!![]){try{const _0x3a89b7=-parseInt(_0xc20102(0x9f))/0x1+parseInt(_0xc20102(0xe5))/0x2*(-parseInt(_0xc20102(0xc6))/0x3)+parseInt(_0xc20102(0x110))/0x4*(parseInt(_0xc20102(0x10c))/0x5)+-parseInt(_0xc20102(0xbc))/0x6+parseInt(_0xc20102(0x88))/0x7*(-parseInt(_0xc20102(0xa3))/0x8)+-parseInt(_0xc20102(0xa1))/0x9*(-parseInt(_0xc20102(0x100))/0xa)+parseInt(_0xc20102(0x107))/0xb;if(_0x3a89b7===_0xce4478)break;else _0x4c8746['push'](_0x4c8746['shift']());}catch(_0x443860){_0x4c8746['push'](_0x4c8746['shift']());}}}(a2_0x2019,0xf1d39));function a2_0x2019(){const _0x535a75=['GET','lifetime','Usmcv','update','BdzBt','SschU','10955571gNvXHi','args','wss://stream.bybit.com/v5/public/linear','log','wss://stream-testnet.bybit.com/v5/public/option','1688145JQkmiP','login','\x20requires\x20symbol\x20and\x20interval\x20args','bytearray(b\x27','16sYVVnK','option','includes','removeSubscription','FwzWK','publicTrade','fWOGe','interval','spot','subclassOnOpen','jlrKi','clientOnError','already\x20subscribed\x20to\x20','LaEkc','depth','11821705IyIlGl','KwUMi','tickers_lt','subclassedSocket','unsubscribed','orderbook','inverse','WGDTn','doPing','clientOnMessage','removeSubscriptionHavingChannel','execution','indexOf','wss://stream-testnet.bybit.com/v5/public/linear','loggedIn','one\x20or\x20more\x20requested\x20topics\x20requires\x20login.\x20Please\x20perform\x20socket\x20login\x20then\x20retry','\x20requires\x20depth\x20and\x20symbol\x20args','logged\x20in','op:\x20','validateSubscription','subclassOnClose','toString','LqMzJ','178647wctVDD','mPAEQ','171ebdSsq','digest','8lbzriS','clientOnClose','socket\x20subscriptions\x20must\x20not\x20mix\x20private\x20with\x20public\x20topics','HDRBm','cxNTT','Hmac','subArgsHash','oIvrb','/realtime','wss://stream-testnet.bybit.com/v5/public/spot','topic','prepareSubscription','testnet','unsubscribe','IZwRk','send','wss://stream.bybit.com/v5/public/spot','aUPMd','subscription\x20name\x20already\x20used\x20','push','Tgcib','rRSuW','\x20topic:\x20','subclassOnError','subscriptions','660312GtYWfz','wss://stream-testnet.bybit.com/v5/private','wss://stream.bybit.com/v5/private','rHrxl','linear','hex','vFFFY','getSubscriptions','lifetimeMs','subclassOnMessage','3ELjuUL','derived\x20onMessage','otNna','ufnOC','parse','socketType','error.\x20Unknown\x20topic:\x20','AOQug','tickers','getOptions','MQXBA','clientOnOpen','wvinY','xqJHb','entries','mgell','customPing','url','XoMQz','validateSubscriptionTypes','cmtZF','event','tEFCa','sZjcv','order','jlIvM','wallet','isPrivate','uQIDc','greeks','socket\x20subscription\x20requires:\x20array\x20of\x20subscriptions\x20args\x20(see\x20bybit\x20api\x20doc)','2702918RcTLpM','socket\x20','publicTopics','length','jtgQO','derived\x20onOpen','\x20requires\x20symbol\x20arg','responseReceived','wss://stream-testnet.bybit.com/v5/public/inverse','derived\x20onError','pQNMw','subscribe','pQrcI','key','getSubscriptionArgsHash','slice','bpmrZ','isObject','socket','auth','channel','KIpHN','stringify','symbol','constructor','zIKUk','privateTopics','1038430jsCfpf'];a2_0x2019=function(){return _0x535a75;};return a2_0x2019();}import{PendaxSocket}from'../common/pendaxsocket.js';import*as a2_0x10ccb8 from'crypto';import a2_0x8f481b from'lodash';const {toLower}=a2_0x8f481b;import a2_0x31107c from'lodash';function a2_0x10db(_0x4adbd6,_0xe4872d){const _0x2019cb=a2_0x2019();return a2_0x10db=function(_0x10db6d,_0x15c160){_0x10db6d=_0x10db6d-0x86;let _0x3eb807=_0x2019cb[_0x10db6d];return _0x3eb807;},a2_0x10db(_0x4adbd6,_0xe4872d);}const {_}=a2_0x31107c;export class BybitSocket extends PendaxSocket{[a2_0x1c0213(0xff)]=['position',a2_0x1c0213(0x93),a2_0x1c0213(0xde),a2_0x1c0213(0xe0),a2_0x1c0213(0xe3)];['publicTopics']=[a2_0x1c0213(0x8d),a2_0x1c0213(0x115),a2_0x1c0213(0xce),'kline','liquidation','kline_lt',a2_0x1c0213(0x8a),'lt'];[a2_0x1c0213(0xc4)]=0x989680;constructor(_0x1c867b){const _0x30539f=a2_0x1c0213;let _0x5c023f=_0x1c867b||{};_0x1c867b['lifetime']&&(lifetimeMs=_0x1c867b[_0x30539f(0x102)]);if(_0x1c867b[_0x30539f(0xaf)]===!![]){if(_0x1c867b[_0x30539f(0xe1)]&&_0x1c867b[_0x30539f(0xe1)]==!![])'PDKii'!==_0x30539f(0x9e)?_0x5c023f[_0x30539f(0xd7)]=_0x30539f(0xbd):_0x4295ca={'event':_0x30539f(0x8c),..._0x5b5345};else{if(_0x1c867b[_0x30539f(0xcb)]){if(_0x30539f(0xa6)==='YhflA')_0x459b02=_0x453531+'.'+_0x1b8462[_0x30539f(0x108)][_0x5ea8cd][_0x30539f(0x117)];else switch(toLower(_0x1c867b[_0x30539f(0xcb)])){case _0x30539f(0x118):_0x5c023f[_0x30539f(0xd7)]=_0x30539f(0xac);break;case _0x30539f(0xc0):_0x5c023f[_0x30539f(0xd7)]=_0x30539f(0x95);break;case _0x30539f(0x111):_0x5c023f[_0x30539f(0xd7)]=_0x30539f(0x10b);break;case _0x30539f(0x8e):_0x5c023f[_0x30539f(0xd7)]=_0x30539f(0xed);break;}}}}else{if(_0x30539f(0xa0)===_0x30539f(0xd8))_0x39fb93[_0x30539f(0xd1)]?_0x1de006[_0x30539f(0xd1)](_0x182f37):_0x330d10[_0x30539f(0x10a)](_0x75ddc5||'derived\x20onOpen');else{if(_0x1c867b[_0x30539f(0xe1)]&&_0x1c867b[_0x30539f(0xe1)]==!![])_0x30539f(0xfa)===_0x30539f(0x11a)?_0x4b454a=_0x28c23a+'.'+_0x513494[_0x30539f(0x117)]:_0x5c023f[_0x30539f(0xd7)]=_0x30539f(0xbe);else{if(_0x1c867b[_0x30539f(0xcb)]){if(_0x30539f(0xf1)!==_0x30539f(0xd2))switch(toLower(_0x1c867b['socketType'])){case _0x30539f(0x118):_0x5c023f['url']=_0x30539f(0xb3);break;case _0x30539f(0xc0):_0x5c023f[_0x30539f(0xd7)]=_0x30539f(0x109);break;case _0x30539f(0x111):_0x5c023f[_0x30539f(0xd7)]='wss://stream.bybit.com/v5/public/option';break;case _0x30539f(0x8e):_0x5c023f[_0x30539f(0xd7)]='wss://stream.bybit.com/v5/public/inverse';break;}else _0x26bb68['clientOnOpen'](_0x4abd43);}}}}super(_0x5c023f),this['getOptions']()[_0x30539f(0x8b)]=this,this[_0x30539f(0xcf)]()[_0x30539f(0x119)]=this['subclassOnOpen'],this[_0x30539f(0xcf)]()[_0x30539f(0xc5)]=this[_0x30539f(0xc5)],this[_0x30539f(0xcf)]()[_0x30539f(0xba)]=this[_0x30539f(0xba)],this[_0x30539f(0xcf)]()['subclassOnClose']=this[_0x30539f(0x9c)],this[_0x30539f(0xcf)]()[_0x30539f(0xd6)]=this['doPing'];}['sign'](_0x4aac88){const _0xa40d14=a2_0x1c0213,_0x5a4b01=a2_0x10ccb8[_0xa40d14(0xa8)]('sha256',this[_0xa40d14(0xcf)]()['secret'])[_0xa40d14(0x104)](_0x4aac88)[_0xa40d14(0xa2)](_0xa40d14(0xc1));return _0x5a4b01;}[a2_0x1c0213(0x90)](){const _0x1ee0f7=a2_0x1c0213,_0x5a70cc=JSON['stringify']({'op':'ping'});this[_0x1ee0f7(0xf7)][_0x1ee0f7(0xb2)](_0x5a70cc);}[a2_0x1c0213(0x10d)](){const _0x177ed3=a2_0x1c0213;if(this['loggedIn']==!![])return;const _0x5c5dfb=new Date()['getTime']()+this['lifetimeMs'],_0x2c7d2a=_0x177ed3(0x101),_0x158ee1=_0x177ed3(0xab);let _0x570800=_0x2c7d2a+_0x158ee1+_0x5c5dfb;const _0x1311a4=this['sign'](_0x570800);let _0x31fbf9=this['getOptions']();const _0x942bf9={'op':_0x177ed3(0xf8),'args':[_0x31fbf9[_0x177ed3(0xf2)],_0x5c5dfb['toFixed'](0x0),_0x1311a4]};this[_0x177ed3(0xec)]=![];let _0x21d910=JSON[_0x177ed3(0xfb)](_0x942bf9);this[_0x177ed3(0xb2)](_0x21d910,_0x2f73f5=>{const _0x5abb10=_0x177ed3;if('LaEkc'!==_0x5abb10(0x86))throw{'message':_0x5abb10(0xe4)};else this[_0x5abb10(0x96)]=!![],console[_0x5abb10(0x10a)](_0x2f73f5||_0x5abb10(0x99));});}['subscribe'](_0x2cb45e){const _0x169dc3=a2_0x1c0213;let _0x119060=_0x169dc3(0xf0);if(_0x2cb45e&&_0x2cb45e[_0x169dc3(0x108)]&&_0x2cb45e[_0x169dc3(0x108)][_0x169dc3(0xfd)]==Array){const _0x4dd92d=this[_0x169dc3(0xd9)](_0x2cb45e);for(const _0x4f995c of _0x2cb45e[_0x169dc3(0x108)]){if('vztAf'==='vztAf'){let _0x1ed1a4=_0x4f995c['topic'];_0x4f995c[_0x169dc3(0x87)]&&(_0x1ed1a4=_0x1ed1a4+'.'+_0x4f995c[_0x169dc3(0x87)]),_0x4f995c['interval']&&(_0x1ed1a4=_0x1ed1a4+'.'+_0x4f995c[_0x169dc3(0x117)]),_0x4f995c['symbol']&&(_0x1ed1a4=_0x1ed1a4+'.'+_0x4f995c['symbol']),this[_0x169dc3(0x9b)](_0x1ed1a4,_0x4f995c,_0x4dd92d,_0x119060);}else _0x5cd56c[_0x169dc3(0xb6)](_0x528967),this[_0x169dc3(0x113)](_0x23001b);}try{const _0x1600e3=this[_0x169dc3(0xae)](_0x2cb45e);this['send'](_0x1600e3);}catch(_0x398f19){throw{'message':_0x398f19};}}else throw{'message':_0x169dc3(0xe4)};}[a2_0x1c0213(0x9b)](_0x3b22fe,_0x2151dd,_0x33140a,_0x1265a2){const _0x591664=a2_0x1c0213;if(_0x33140a===![])switch(_0x2151dd[_0x591664(0xad)]){case'orderbook':if(!_0x2151dd[_0x591664(0x87)]||!_0x2151dd[_0x591664(0xfc)]){if(_0x591664(0xb1)===_0x591664(0xb4))_0x403540['url']=_0x591664(0xbe);else throw{'message':_0x591664(0x9a)+_0x1265a2+'\x20topic:\x20'+topic+_0x591664(0x98)};}break;case _0x591664(0x115):if(!_0x2151dd[_0x591664(0xfc)])throw{'message':_0x591664(0x9a)+_0x1265a2+_0x591664(0xb9)+topic+_0x591664(0xeb)};break;case _0x591664(0xce):if(!_0x2151dd['symbol'])throw{'message':_0x591664(0x9a)+_0x1265a2+_0x591664(0xb9)+topic+'\x20requires\x20symbol\x20arg'};break;case'kline':if(!_0x2151dd[_0x591664(0xfc)]||!_0x2151dd[_0x591664(0x117)]){if(_0x591664(0xbf)===_0x591664(0xf5))try{_0x1700dd=_0x90030a[_0x591664(0xca)](_0x196851);}catch(_0xac0611){if(_0x229820['toString']()['indexOf'](_0x591664(0x10f))>-0x1){const _0x4ac4c0=_0x42d9d5[_0x591664(0x9d)]()[_0x591664(0xf4)](_0x591664(0x10f)['length']),_0x354372=_0x4ac4c0[_0x591664(0x94)]('\x27)');_0x278225=_0x354372>-0x1?_0x4ac4c0[_0x591664(0xf4)](0x0,_0x354372):_0x4ac4c0;}}else throw{'message':_0x591664(0x9a)+_0x1265a2+_0x591664(0xb9)+topic+'\x20requires\x20symbol\x20and\x20interval\x20args'};}break;case'liquidation':if(!_0x2151dd['symbol'])throw{'message':'op:\x20'+_0x1265a2+_0x591664(0xb9)+topic+_0x591664(0xeb)};break;case'kline_lt':if(!_0x2151dd[_0x591664(0xfc)]||!_0x2151dd['interval']){if('OSBst'!=='OSBst'){const _0x4a0fad=this[_0x591664(0xae)](_0x52836d);this[_0x591664(0xb2)](_0x4a0fad);}else throw{'message':_0x591664(0x9a)+_0x1265a2+_0x591664(0xb9)+topic+_0x591664(0x10e)};}break;case _0x591664(0x8a):if(!_0x2151dd['symbol']){if(_0x591664(0x103)!==_0x591664(0x103))throw{'message':'op:\x20'+_0x45133b+_0x591664(0xb9)+_0x35f95e+_0x591664(0xeb)};else throw{'message':'op:\x20'+_0x1265a2+_0x591664(0xb9)+topic+'\x20requires\x20symbol\x20arg'};}break;case'lt':if(!_0x2151dd[_0x591664(0xfc)])throw{'message':'op:\x20'+_0x1265a2+_0x591664(0xb9)+topic+_0x591664(0xeb)};break;default:throw{'message':_0x591664(0xe6)+_0x1265a2+_0x591664(0xcc)+topic};break;}if(_0x33140a&&!this[_0x591664(0x96)])throw{'message':_0x591664(0x97)};let _0x51fe99=this[_0x591664(0xf3)](_0x2151dd);if(!this[_0x591664(0xbb)][_0x3b22fe]){for(const [_0x1e3c0f,_0x13f88b]of Object[_0x591664(0xd4)](this[_0x591664(0xbb)])){let _0x54466f=_0x13f88b[_0x591664(0xa9)];if(_0x54466f==_0x51fe99){if(_0x591664(0xd5)!=='mgell')_0x51049f=_0x709427+'.'+_0x78d2b1['symbol'];else throw _0x591664(0x11c)+JSON[_0x591664(0xfb)](_0x3b22fe);}}this[_0x591664(0xbb)][_0x3b22fe]={'args':_0x2151dd,'subArgsHash':_0x51fe99};}else throw _0x591664(0xb5);}[a2_0x1c0213(0x113)](_0x3c5fd5){const _0x26f785=a2_0x1c0213;delete this[_0x26f785(0xbb)][_0x3c5fd5];}['unsubscribe'](_0x1bc1a1){const _0x2eefc6=a2_0x1c0213;let _0x32c073=[];if(_0x1bc1a1&&_0x1bc1a1[_0x2eefc6(0xfd)]==Array)for(const _0xe3df46 of _0x1bc1a1){if(_0x2eefc6(0x89)===_0x2eefc6(0x89)){let _0x145639=_0xe3df46[_0x2eefc6(0xad)];_0xe3df46['depth']&&(_0x2eefc6(0xda)!==_0x2eefc6(0xcd)?_0x145639=_0x145639+'.'+_0xe3df46[_0x2eefc6(0x87)]:(_0x2d81a3=_0x99423e[_0x2eefc6(0xca)](_0x3581b6),_0x2db434[_0x2eefc6(0xdb)]&&_0x1a9638[_0x2eefc6(0xdb)]=='unsubscribed'&&(_0x5e2efc=!![],delete _0x56abaa[_0x2eefc6(0xdb)],this[_0x2eefc6(0x92)](_0x5018b3[_0x2eefc6(0xf9)]))));_0xe3df46[_0x2eefc6(0x117)]&&(_0x145639=_0x145639+'.'+_0xe3df46[_0x2eefc6(0x117)]);_0xe3df46[_0x2eefc6(0xfc)]&&(_0x145639=_0x145639+'.'+_0xe3df46[_0x2eefc6(0xfc)]);let _0x42ec89=this[_0x2eefc6(0xc3)]()[_0x145639];_0x42ec89&&(_0x32c073[_0x2eefc6(0xb6)](_0x145639),this[_0x2eefc6(0x113)](_0x145639));}else _0x1dbebd=_0x1928f6[_0x2eefc6(0xca)](_0x5c0074);}if(_0x32c073[_0x2eefc6(0xe8)]>0x0){if(_0x2eefc6(0xe2)==='uQIDc'){const _0x4b3fec={'op':_0x2eefc6(0xb0),'args':_0x32c073},_0x4f38e4=JSON[_0x2eefc6(0xfb)](_0x4b3fec);this[_0x2eefc6(0xb2)](_0x4f38e4);}else return;}}[a2_0x1c0213(0xae)](_0x41a607){const _0x1282a5=a2_0x1c0213;let _0x5b7984={'op':_0x1282a5(0xf0),'args':[]};for(const _0xbd8bfa in _0x41a607[_0x1282a5(0x108)]){if(_0x1282a5(0xa7)!==_0x1282a5(0xef)){let _0x4b068e=_0x41a607['args'][_0xbd8bfa][_0x1282a5(0xad)];_0x41a607[_0x1282a5(0x108)][_0xbd8bfa][_0x1282a5(0x87)]&&(_0x1282a5(0xaa)!==_0x1282a5(0xb7)?_0x4b068e=_0x4b068e+'.'+_0x41a607[_0x1282a5(0x108)][_0xbd8bfa][_0x1282a5(0x87)]:_0x465ea9[_0x1282a5(0x11b)](_0xd1ab7d,_0x3d87e1)),_0x41a607[_0x1282a5(0x108)][_0xbd8bfa]['interval']&&(_0x4b068e=_0x4b068e+'.'+_0x41a607[_0x1282a5(0x108)][_0xbd8bfa][_0x1282a5(0x117)]),_0x41a607['args'][_0xbd8bfa]['symbol']&&(_0x1282a5(0xdd)!==_0x1282a5(0xd3)?_0x4b068e=_0x4b068e+'.'+_0x41a607[_0x1282a5(0x108)][_0xbd8bfa]['symbol']:_0x5021ed[_0x1282a5(0xa4)](_0x3a8bc8,_0x4bf8f8,_0x295fd7)),_0x5b7984[_0x1282a5(0x108)][_0x1282a5(0xb6)](_0x4b068e);}else throw _0x1282a5(0xb5);}return JSON[_0x1282a5(0xfb)](_0x5b7984);}[a2_0x1c0213(0x119)](_0x16f758){const _0x460545=a2_0x1c0213;if(_0x16f758[_0x460545(0xd1)]){if('LWojg'==='LWojg')_0x16f758[_0x460545(0xd1)](_0x16f758);else throw{'message':_0x460545(0x9a)+_0x2cab92+_0x460545(0xb9)+_0xf40b0a+'\x20requires\x20symbol\x20arg'};}else console[_0x460545(0x10a)](msg||_0x460545(0xea));}[a2_0x1c0213(0xc5)](_0x34f421,_0x840f3d,_0x1df594){const _0x444ec3=a2_0x1c0213;let _0x1dcfbd,_0x262a55=![];if(_[_0x444ec3(0xf6)](_0x840f3d)){_0x1dcfbd=JSON[_0x444ec3(0xca)](_0x840f3d);if(_0x1dcfbd['event']&&_0x1dcfbd[_0x444ec3(0xdb)]=='unsubscribed'){if(_0x444ec3(0xc9)===_0x444ec3(0xb8)){let _0x1b8e69=_0x4e99fe[_0x444ec3(0xad)];_0x3b081b[_0x444ec3(0x87)]&&(_0x1b8e69=_0x1b8e69+'.'+_0x257824[_0x444ec3(0x87)]),_0x2e4a19['interval']&&(_0x1b8e69=_0x1b8e69+'.'+_0x3e3325['interval']),_0x383ace['symbol']&&(_0x1b8e69=_0x1b8e69+'.'+_0x33dd89[_0x444ec3(0xfc)]),this[_0x444ec3(0x9b)](_0x1b8e69,_0x5415ca,_0x31141a,_0x316c46);}else _0x262a55=!![],delete _0x1dcfbd[_0x444ec3(0xdb)],this[_0x444ec3(0x92)](_0x1dcfbd[_0x444ec3(0xf9)]);}}else _0x444ec3(0x114)===_0x444ec3(0x114)?_0x1dcfbd=_0x840f3d:_0x382940=_0x5f3e6c+'.'+_0x2dcdb4[_0x444ec3(0x87)];if(_0x34f421['getOptions']()[_0x444ec3(0x91)]){if(_0x444ec3(0xc8)===_0x444ec3(0xdf))throw{'message':_0x444ec3(0x9a)+_0x4a1a66+_0x444ec3(0xb9)+_0x187338+_0x444ec3(0x10e)};else{if(_0x262a55==!![]){if(_0x444ec3(0xd0)===_0x444ec3(0xd0))_0x1dcfbd={'event':'unsubscribed',..._0x1dcfbd};else throw{'message':'one\x20or\x20more\x20requested\x20topics\x20requires\x20login.\x20Please\x20perform\x20socket\x20login\x20then\x20retry'};}_0x34f421[_0x444ec3(0xcf)]()[_0x444ec3(0x91)](_0x1df594,_0x1dcfbd);}}else _0x444ec3(0xdc)!==_0x444ec3(0xc2)?console[_0x444ec3(0x10a)](_0x840f3d||_0x444ec3(0xc7)):_0x36da63=!![];}['subclassOnError'](_0x1846b1,_0x371d9e){const _0x59f13d=a2_0x1c0213;let _0x217ec8;if(_[_0x59f13d(0xf6)](_0x1846b1)){if('WGDTn'===_0x59f13d(0x8f))try{_0x217ec8=JSON[_0x59f13d(0xca)](_0x1846b1);}catch(_0x1dd7cd){if(_0x59f13d(0x106)!=='SschU')this[_0x59f13d(0x96)]=!![],_0xc4deb4[_0x59f13d(0x10a)](_0xe351ce||'logged\x20in');else{if(_0x1846b1[_0x59f13d(0x9d)]()['indexOf']('bytearray(b\x27')>-0x1){const _0x398efa=_0x1846b1[_0x59f13d(0x9d)]()[_0x59f13d(0xf4)](_0x59f13d(0x10f)[_0x59f13d(0xe8)]),_0x134e54=_0x398efa[_0x59f13d(0x94)]('\x27)');_0x217ec8=_0x134e54>-0x1?_0x398efa[_0x59f13d(0xf4)](0x0,_0x134e54):_0x398efa;}}}else _0x201dee=_0x47385b['lifetime'];}else _0x217ec8=_0x1846b1;if(_0x371d9e[_0x59f13d(0x11b)])_0x371d9e[_0x59f13d(0x11b)](_0x371d9e,_0x217ec8);else{if(_0x59f13d(0xe9)===_0x59f13d(0xe9))console['log'](_0x1846b1||_0x59f13d(0xee));else try{_0x236b50=_0x1a1d9b[_0x59f13d(0xca)](_0x2bf83b);}catch(_0x2f4879){if(_0x113c5a['toString']()['indexOf'](_0x59f13d(0x10f))>-0x1){const _0x5c8be6=_0x5ca086[_0x59f13d(0x9d)]()[_0x59f13d(0xf4)](_0x59f13d(0x10f)['length']),_0x16fc7e=_0x5c8be6[_0x59f13d(0x94)]('\x27)');_0x3b0353=_0x16fc7e>-0x1?_0x5c8be6[_0x59f13d(0xf4)](0x0,_0x16fc7e):_0x5c8be6;}}}}[a2_0x1c0213(0x9c)](_0x426705,_0x5535ad,_0x3e2fb1){const _0x2f7042=a2_0x1c0213;let _0x132c91;if(_[_0x2f7042(0xf6)](_0x5535ad)){if(_0x2f7042(0x105)===_0x2f7042(0x105))try{_0x132c91=JSON[_0x2f7042(0xca)](_0x5535ad);}catch(_0x95834d){if(_0x5535ad['toString']()[_0x2f7042(0x94)]('bytearray(b\x27')>-0x1){const _0x55648=_0x5535ad[_0x2f7042(0x9d)]()[_0x2f7042(0xf4)](_0x2f7042(0x10f)[_0x2f7042(0xe8)]),_0x3e618f=_0x55648[_0x2f7042(0x94)]('\x27)');_0x132c91=_0x3e618f>-0x1?_0x55648[_0x2f7042(0xf4)](0x0,_0x3e618f):_0x55648;}}else{const _0x72c16f={'op':'unsubscribe','args':_0x3218b7},_0x2583bf=_0xa55374[_0x2f7042(0xfb)](_0x72c16f);this[_0x2f7042(0xb2)](_0x2583bf);}}else _0x132c91=_0x5535ad;_0x3e2fb1[_0x2f7042(0xa4)]?_0x3e2fb1[_0x2f7042(0xa4)](_0x426705,_0x132c91,_0x3e2fb1):console[_0x2f7042(0x10a)](_0x5535ad||'derived\x20onClose');}['validateSubscriptionTypes'](_0x3c01a3){const _0x2f4e76=a2_0x1c0213;let _0x2a8672=![],_0x210ec0=![];for(const _0x294a60 of _0x3c01a3[_0x2f4e76(0x108)]){if(this[_0x2f4e76(0xe7)]['includes'](_0x294a60[_0x2f4e76(0xad)]))_0x210ec0=!![];else{if(this[_0x2f4e76(0xff)][_0x2f4e76(0x112)](_0x294a60[_0x2f4e76(0xad)])){if('RTYcj'!=='CPAek')_0x2a8672=!![];else{for(const [_0x266da7,_0x51ce19]of _0x2abb22['entries'](this[_0x2f4e76(0xbb)])){let _0x20eed0=_0x51ce19[_0x2f4e76(0xa9)];if(_0x20eed0==_0x3c2726)throw _0x2f4e76(0x11c)+_0x41d82c[_0x2f4e76(0xfb)](_0x490cfb);}this[_0x2f4e76(0xbb)][_0xdc15f]={'args':_0x471c73,'subArgsHash':_0x4baba0};}}}}if(_0x2a8672==!![]&&_0x210ec0==!![])throw{'message':_0x2f4e76(0xa5)};else{if(_0x2a8672==!![]&&!this[_0x2f4e76(0x96)]){if(_0x2f4e76(0x116)===_0x2f4e76(0xfe)){if(this[_0x2f4e76(0xe7)]['includes'](_0x4baec7[_0x2f4e76(0xad)]))_0x2d2280=!![];else this[_0x2f4e76(0xff)][_0x2f4e76(0x112)](_0x23c6b7[_0x2f4e76(0xad)])&&(_0x47c983=!![]);}else throw{'message':_0x2f4e76(0x97)};}return _0x2a8672==!![];}}}

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

const a3_0x5018e4=a3_0x3680;(function(_0x3ee0fd,_0x44c71b){const _0x3b0fd3=a3_0x3680,_0x3f8d2b=_0x3ee0fd();while(!![]){try{const _0x22b557=-parseInt(_0x3b0fd3(0x12a))/0x1*(parseInt(_0x3b0fd3(0x149))/0x2)+-parseInt(_0x3b0fd3(0x138))/0x3*(parseInt(_0x3b0fd3(0x13e))/0x4)+parseInt(_0x3b0fd3(0x12b))/0x5*(-parseInt(_0x3b0fd3(0x14a))/0x6)+parseInt(_0x3b0fd3(0x126))/0x7*(parseInt(_0x3b0fd3(0x132))/0x8)+-parseInt(_0x3b0fd3(0x150))/0x9*(-parseInt(_0x3b0fd3(0x163))/0xa)+parseInt(_0x3b0fd3(0x139))/0xb+-parseInt(_0x3b0fd3(0x13b))/0xc;if(_0x22b557===_0x44c71b)break;else _0x3f8d2b['push'](_0x3f8d2b['shift']());}catch(_0x627b34){_0x3f8d2b['push'](_0x3f8d2b['shift']());}}}(a3_0x27f3,0xc4af1));import{PendaxSocket}from'../common/pendaxsocket.js';function a3_0x3680(_0x280c5f,_0x114aaf){const _0x27f3c7=a3_0x27f3();return a3_0x3680=function(_0x3680e3,_0x4952a7){_0x3680e3=_0x3680e3-0x123;let _0x22f862=_0x27f3c7[_0x3680e3];return _0x22f862;},a3_0x3680(_0x280c5f,_0x114aaf);}import*as a3_0x5daa52 from'crypto';import a3_0x6b0d7 from'lodash';const {_}=a3_0x6b0d7;export class FtxSocket extends PendaxSocket{[a3_0x5018e4(0x13f)]=['fills','orders',a3_0x5018e4(0x14b)];['publicChannels']=[a3_0x5018e4(0x137),'markets',a3_0x5018e4(0x168),a3_0x5018e4(0x135),a3_0x5018e4(0x14e)];constructor(_0x260734){const _0x48e134=a3_0x5018e4;let _0x33e7f8=_0x260734||{};_0x33e7f8[_0x48e134(0x140)]=_0x48e134(0x173),super(_0x33e7f8),this[_0x48e134(0x15d)]()['subclassedSocket']=this,this[_0x48e134(0x15d)]()[_0x48e134(0x12d)]=this['subclassOnOpen'],this[_0x48e134(0x15d)]()[_0x48e134(0x125)]=this[_0x48e134(0x125)],this[_0x48e134(0x15d)]()['subclassOnError']=this[_0x48e134(0x146)],this['getOptions']()[_0x48e134(0x142)]=this[_0x48e134(0x142)];}[a3_0x5018e4(0x16d)](_0x1fce50){const _0x12a74f=a3_0x5018e4,_0x4038e1=a3_0x5daa52['Hmac'](_0x12a74f(0x16b),this[_0x12a74f(0x15d)]()[_0x12a74f(0x124)])[_0x12a74f(0x156)](_0x1fce50)[_0x12a74f(0x152)](_0x12a74f(0x16e));return _0x4038e1;}[a3_0x5018e4(0x145)](){const _0x2ae87c=a3_0x5018e4;if(this[_0x2ae87c(0x130)]==!![])return;const _0x278696=Date[_0x2ae87c(0x171)]();let _0x553a34=_0x278696[_0x2ae87c(0x144)]()+_0x2ae87c(0x13a);const _0x17aa74=this['sign'](_0x553a34);let _0x45d6f3=this[_0x2ae87c(0x15d)]();const _0x4d31ae={'op':_0x2ae87c(0x145),'args':{'key':_0x45d6f3[_0x2ae87c(0x16f)],'sign':_0x17aa74,'time':_0x278696}};_0x45d6f3[_0x2ae87c(0x123)]&&('vJNvc'!==_0x2ae87c(0x134)?_0xf149ec={'type':'unsubscribed',..._0x4f04da}:_0x4d31ae[_0x2ae87c(0x157)][_0x2ae87c(0x123)]=_0x45d6f3[_0x2ae87c(0x123)]);this[_0x2ae87c(0x15b)]=![];let _0x4c80c3=JSON['stringify'](_0x4d31ae);this[_0x2ae87c(0x15f)](_0x4c80c3),this[_0x2ae87c(0x130)]=!![],console[_0x2ae87c(0x141)](_0x2ae87c(0x161));}[a3_0x5018e4(0x153)](_0x41abf4){const _0x4bcec7=a3_0x5018e4;if(_0x41abf4&&_0x41abf4[_0x4bcec7(0x12f)]&&_0x41abf4[_0x4bcec7(0x157)]){let _0x409b06={'channel':_0x41abf4['args'][_0x4bcec7(0x15c)],'market':_0x41abf4[_0x4bcec7(0x157)]['market'],'op':'subscribe'};this[_0x4bcec7(0x14c)](_0x41abf4[_0x4bcec7(0x12f)],_0x409b06,this['publicChannels'],this['privateChannels']);try{'vYNaC'!==_0x4bcec7(0x15a)?this[_0x4bcec7(0x15f)](JSON[_0x4bcec7(0x136)](_0x409b06)):_0xa8fa25['log'](_0x3cbd10||_0x4bcec7(0x166));}catch(_0x3c104f){throw{'message':_0x3c104f};}}else{if('LPFUy'===_0x4bcec7(0x143)){const _0x406e1d=_0x3a0110[_0x4bcec7(0x144)]()[_0x4bcec7(0x159)](_0x4bcec7(0x129)[_0x4bcec7(0x15e)]),_0x42081e=_0x406e1d['indexOf']('\x27)');_0x425f7f=_0x42081e>-0x1?_0x406e1d[_0x4bcec7(0x159)](0x0,_0x42081e):_0x406e1d;}else throw{'message':_0x4bcec7(0x16c)};}}[a3_0x5018e4(0x154)](_0x205d12){const _0xc7c05a=a3_0x5018e4;if(!_0x205d12)throw _0xc7c05a(0x14d);let _0x1ee4fa=this[_0xc7c05a(0x164)]()[_0x205d12];if(_0x1ee4fa){let _0x117941={..._0x1ee4fa[_0xc7c05a(0x157)]};_0x117941['op']=_0xc7c05a(0x154),this[_0xc7c05a(0x15f)](JSON[_0xc7c05a(0x136)](_0x117941));}}[a3_0x5018e4(0x12d)](_0x3bbbff){const _0xc3c439=a3_0x5018e4;_0x3bbbff[_0xc3c439(0x170)]?_0x3bbbff[_0xc3c439(0x170)](_0x3bbbff):console[_0xc3c439(0x141)](msg||_0xc3c439(0x165));}[a3_0x5018e4(0x125)](_0x2e9401,_0x2e8e22,_0x2b6fcd){const _0x3b8279=a3_0x5018e4;let _0x552445,_0xb8b19=![];_[_0x3b8279(0x127)](_0x2e8e22)?(_0x552445=JSON[_0x3b8279(0x148)](_0x2e8e22),_0x552445['type']&&_0x552445[_0x3b8279(0x167)]=='unsubscribed'&&(_0xb8b19=!![],delete _0x552445[_0x3b8279(0x167)],_0x2e9401[_0x3b8279(0x160)](_0x2e9401,_0x552445[_0x3b8279(0x15c)]))):_0x3b8279(0x147)===_0x3b8279(0x147)?_0x552445=_0x2e8e22:(_0x2deff8=!![],delete _0x5f3fea['type'],_0x305b63[_0x3b8279(0x160)](_0x540cd4,_0x52abec[_0x3b8279(0x15c)])),_0x2e9401[_0x3b8279(0x15d)]()[_0x3b8279(0x169)]?'bmOnc'!==_0x3b8279(0x13d)?(_0xb8b19==!![]&&(_0x552445={'type':_0x3b8279(0x16a),..._0x552445}),_0x2e9401['getOptions']()[_0x3b8279(0x169)](_0x2b6fcd,_0x552445)):_0x59cab7[_0x3b8279(0x141)](_0x5d5fcf||_0x3b8279(0x128)):console[_0x3b8279(0x141)](_0x2e8e22||_0x3b8279(0x128));}[a3_0x5018e4(0x146)](_0x1b919d,_0x250c76){const _0x7ff5b5=a3_0x5018e4;let _0x4e96f0;if(_['isObject'](_0x1b919d))try{if(_0x7ff5b5(0x12e)===_0x7ff5b5(0x12e))_0x4e96f0=JSON[_0x7ff5b5(0x148)](_0x1b919d);else{let _0x294841={..._0x1deb6e['args']};_0x294841['op']=_0x7ff5b5(0x154),this['send'](_0x508335[_0x7ff5b5(0x136)](_0x294841));}}catch(_0x1a0cd6){if('dDXtx'!==_0x7ff5b5(0x151)){if(_0x1b919d['toString']()[_0x7ff5b5(0x155)](_0x7ff5b5(0x129))>-0x1){const _0x28ca5b=_0x1b919d[_0x7ff5b5(0x144)]()['slice']('bytearray(b\x27'[_0x7ff5b5(0x15e)]),_0x34e2bf=_0x28ca5b[_0x7ff5b5(0x155)]('\x27)');_0x4e96f0=_0x34e2bf>-0x1?_0x28ca5b[_0x7ff5b5(0x159)](0x0,_0x34e2bf):_0x28ca5b;}}else throw _0x7ff5b5(0x14d);}else'ZdbEP'!==_0x7ff5b5(0x13c)?_0xc48dce['clientOnOpen'](_0x34c947):_0x4e96f0=_0x1b919d;_0x250c76[_0x7ff5b5(0x133)]?_0x7ff5b5(0x162)==='BjXjd'?_0x5e327a['clientOnClose'](_0x3d1b0d,_0x4210d8,_0x24fbb8):_0x250c76['clientOnError'](_0x250c76,_0x4e96f0):console[_0x7ff5b5(0x141)](_0x1b919d||'derived\x20onError');}[a3_0x5018e4(0x142)](_0x408f04,_0x3335d2,_0x4eb97c){const _0x493d7d=a3_0x5018e4;let _0x209184;if(_[_0x493d7d(0x127)](_0x3335d2)){if('sJsaZ'!==_0x493d7d(0x14f))try{_0x209184=JSON['parse'](_0x3335d2);}catch(_0x2e7f28){if(_0x493d7d(0x158)===_0x493d7d(0x131)){if(_0x235dc6[_0x493d7d(0x144)]()[_0x493d7d(0x155)](_0x493d7d(0x129))>-0x1){const _0x50d384=_0xf8628b['toString']()[_0x493d7d(0x159)](_0x493d7d(0x129)[_0x493d7d(0x15e)]),_0x21ca3a=_0x50d384[_0x493d7d(0x155)]('\x27)');_0x42402e=_0x21ca3a>-0x1?_0x50d384[_0x493d7d(0x159)](0x0,_0x21ca3a):_0x50d384;}}else{if(_0x3335d2[_0x493d7d(0x144)]()[_0x493d7d(0x155)](_0x493d7d(0x129))>-0x1){if(_0x493d7d(0x12c)!==_0x493d7d(0x12c))_0x46a4ce=_0x5680cd[_0x493d7d(0x148)](_0x37f548);else{const _0x4789ba=_0x3335d2[_0x493d7d(0x144)]()[_0x493d7d(0x159)]('bytearray(b\x27'[_0x493d7d(0x15e)]),_0x764d6b=_0x4789ba[_0x493d7d(0x155)]('\x27)');_0x209184=_0x764d6b>-0x1?_0x4789ba[_0x493d7d(0x159)](0x0,_0x764d6b):_0x4789ba;}}}}else{if(!_0x1cadc2)throw _0x493d7d(0x14d);let _0x37b728=this['getSubscriptions']()[_0x520fc0];if(_0x37b728){let _0x300aa9={..._0x37b728['args']};_0x300aa9['op']=_0x493d7d(0x154),this[_0x493d7d(0x15f)](_0x5c3f37[_0x493d7d(0x136)](_0x300aa9));}}}else _0x209184=_0x3335d2;_0x4eb97c[_0x493d7d(0x172)]?_0x4eb97c[_0x493d7d(0x172)](_0x408f04,_0x209184,_0x4eb97c):console[_0x493d7d(0x141)](_0x3335d2||_0x493d7d(0x166));}}function a3_0x27f3(){const _0x190059=['isObject','derived\x20onMessage','bytearray(b\x27','318311xkROgy','1335670HoWuVW','htiFk','subclassOnOpen','cgFLJ','name','loggedIn','CsHgk','160AgpENh','clientOnError','vJNvc','orderbook','stringify','ticker','2565cRoDlL','14470962XvXzLo','websocket_login','4231164BZZaWx','ZdbEP','jHoDL','380WydSmT','privateChannels','url','log','subclassOnClose','edadX','toString','login','subclassOnError','biDzd','parse','4fYWttf','6ADObvw','ftxpay','validateSubscription','name\x20required','orderbookGrouped','CuyRh','9mqdihP','kURiD','digest','subscribe','unsubscribe','indexOf','update','args','ikRpt','slice','jbPTk','responseReceived','channel','getOptions','length','send','removeSubscriptionHavingChannel','logged\x20in','bSzrW','7520930jHlmMz','getSubscriptions','derived\x20onOpen','derived\x20onClose','type','trades','clientOnMessage','unsubscribed','sha256','socket\x20subscription\x20requires:\x20name,\x20subscription\x20args\x20(see\x20ftx\x20api\x20doc)','sign','hex','key','clientOnOpen','now','clientOnClose','wss://ftx.com/ws/','subaccount','secret','subclassOnMessage','26446PUHKcW'];a3_0x27f3=function(){return _0x190059;};return a3_0x27f3();}
const a3_0x579108=a3_0x4699;function a3_0x4699(_0x4dca64,_0x7f7375){const _0x7871b3=a3_0x7871();return a3_0x4699=function(_0x469925,_0x54a38c){_0x469925=_0x469925-0x106;let _0x5794c1=_0x7871b3[_0x469925];return _0x5794c1;},a3_0x4699(_0x4dca64,_0x7f7375);}(function(_0x30e1dc,_0x340254){const _0xb7bbc2=a3_0x4699,_0x4f9088=_0x30e1dc();while(!![]){try{const _0x2a3d6f=-parseInt(_0xb7bbc2(0x13f))/0x1*(parseInt(_0xb7bbc2(0x132))/0x2)+parseInt(_0xb7bbc2(0x12c))/0x3+-parseInt(_0xb7bbc2(0x11d))/0x4+parseInt(_0xb7bbc2(0x144))/0x5*(-parseInt(_0xb7bbc2(0x13a))/0x6)+-parseInt(_0xb7bbc2(0x134))/0x7*(parseInt(_0xb7bbc2(0x140))/0x8)+-parseInt(_0xb7bbc2(0x14b))/0x9*(parseInt(_0xb7bbc2(0x155))/0xa)+parseInt(_0xb7bbc2(0x114))/0xb;if(_0x2a3d6f===_0x340254)break;else _0x4f9088['push'](_0x4f9088['shift']());}catch(_0x49d8de){_0x4f9088['push'](_0x4f9088['shift']());}}}(a3_0x7871,0xec71c));function a3_0x7871(){const _0x276040=['JwNWa','aWyyV','channel','djodY','bytearray(b\x27','subclassOnClose','6847130nGaBgW','sign','subclassOnMessage','orders','socket\x20subscription\x20requires:\x20name,\x20subscription\x20args\x20(see\x20ftx\x20api\x20doc)','loggedIn','privateChannels','kgpyT','subaccount','xmrUc','name','removeSubscriptionHavingChannel','responseReceived','ziqNm','validateSubscription','toString','parse','43383076BrfUbD','update','ftxpay','send','unsubscribed','orderbookGrouped','subclassOnError','slice','now','248028dtqitY','clientOnClose','getOptions','secret','log','gdoRS','sha256','wss://ftx.com/ws/','mBGPd','derived\x20onOpen','NuAdE','key','isObject','length','derived\x20onMessage','4519566fnTIxb','subscribe','JKJsX','trades','clientOnMessage','type','4YZZpym','args','3633GzUZmE','market','UWjNp','stringify','digest','derived\x20onClose','6vZbFIY','QLjBF','login','subclassOnOpen','indexOf','829203OcySfi','26216XvFNlf','markets','clientOnOpen','subclassedSocket','1880365XXtiOy','getSubscriptions','publicChannels','ZAygl','nZAvL','name\x20required','websocket_login','9QaSSsZ','derived\x20onError','unsubscribe','vLQQx'];a3_0x7871=function(){return _0x276040;};return a3_0x7871();}import{PendaxSocket}from'../common/pendaxsocket.js';import*as a3_0x347afb from'crypto';import a3_0x2c30b9 from'lodash';const {_}=a3_0x2c30b9;export class FtxSocket extends PendaxSocket{['privateChannels']=['fills',a3_0x579108(0x106),a3_0x579108(0x116)];['publicChannels']=['ticker',a3_0x579108(0x141),a3_0x579108(0x12f),'orderbook',a3_0x579108(0x119)];constructor(_0x17d8f6){const _0xcd83b2=a3_0x579108;let _0x36fbe1=_0x17d8f6||{};_0x36fbe1['url']=_0xcd83b2(0x124),super(_0x36fbe1),this[_0xcd83b2(0x11f)]()[_0xcd83b2(0x143)]=this,this['getOptions']()[_0xcd83b2(0x13d)]=this[_0xcd83b2(0x13d)],this[_0xcd83b2(0x11f)]()[_0xcd83b2(0x157)]=this[_0xcd83b2(0x157)],this['getOptions']()[_0xcd83b2(0x11a)]=this[_0xcd83b2(0x11a)],this['getOptions']()[_0xcd83b2(0x154)]=this[_0xcd83b2(0x154)];}[a3_0x579108(0x156)](_0x5414a6){const _0x559be8=a3_0x579108,_0x5d726d=a3_0x347afb['Hmac'](_0x559be8(0x123),this[_0x559be8(0x11f)]()[_0x559be8(0x120)])[_0x559be8(0x115)](_0x5414a6)[_0x559be8(0x138)]('hex');return _0x5d726d;}[a3_0x579108(0x13c)](){const _0x2da972=a3_0x579108;if(this['loggedIn']==!![])return;const _0x42fd78=Date[_0x2da972(0x11c)]();let _0x5196fb=_0x42fd78[_0x2da972(0x112)]()+_0x2da972(0x14a);const _0x5117d8=this[_0x2da972(0x156)](_0x5196fb);let _0x1a2e67=this[_0x2da972(0x11f)]();const _0x41945a={'op':_0x2da972(0x13c),'args':{'key':_0x1a2e67[_0x2da972(0x128)],'sign':_0x5117d8,'time':_0x42fd78}};if(_0x1a2e67[_0x2da972(0x10b)]){if(_0x2da972(0x14f)!==_0x2da972(0x14f)){const _0x3677cd=_0x25ec58[_0x2da972(0x112)]()[_0x2da972(0x11b)](_0x2da972(0x153)[_0x2da972(0x12a)]),_0x3eb717=_0x3677cd[_0x2da972(0x13e)]('\x27)');_0x28aff0=_0x3eb717>-0x1?_0x3677cd[_0x2da972(0x11b)](0x0,_0x3eb717):_0x3677cd;}else _0x41945a[_0x2da972(0x133)][_0x2da972(0x10b)]=_0x1a2e67[_0x2da972(0x10b)];}this[_0x2da972(0x10f)]=![];let _0x365412=JSON[_0x2da972(0x137)](_0x41945a);this[_0x2da972(0x117)](_0x365412),this[_0x2da972(0x108)]=!![],console[_0x2da972(0x121)]('logged\x20in');}[a3_0x579108(0x12d)](_0x1ebe55){const _0x1a4178=a3_0x579108;if(_0x1ebe55&&_0x1ebe55[_0x1a4178(0x10d)]&&_0x1ebe55[_0x1a4178(0x133)]){let _0x516fcc={'channel':_0x1ebe55[_0x1a4178(0x133)][_0x1a4178(0x151)],'market':_0x1ebe55[_0x1a4178(0x133)][_0x1a4178(0x135)],'op':_0x1a4178(0x12d)};this[_0x1a4178(0x111)](_0x1ebe55[_0x1a4178(0x10d)],_0x516fcc,this[_0x1a4178(0x146)],this[_0x1a4178(0x109)]);try{_0x1a4178(0x136)!==_0x1a4178(0x136)?_0x1fbc23=_0x1bf21a['parse'](_0x75b0e9):this[_0x1a4178(0x117)](JSON[_0x1a4178(0x137)](_0x516fcc));}catch(_0x38be5c){throw{'message':_0x38be5c};}}else{if(_0x1a4178(0x152)!==_0x1a4178(0x125))throw{'message':_0x1a4178(0x107)};else _0x4f2c5e[_0x1a4178(0x121)](_0xf47e5b||_0x1a4178(0x139));}}['unsubscribe'](_0xde0abf){const _0x15b27c=a3_0x579108;if(!_0xde0abf)throw'name\x20required';let _0x2878fb=this['getSubscriptions']()[_0xde0abf];if(_0x2878fb){let _0xc5152f={..._0x2878fb[_0x15b27c(0x133)]};_0xc5152f['op']=_0x15b27c(0x14d),this['send'](JSON[_0x15b27c(0x137)](_0xc5152f));}}['subclassOnOpen'](_0x16976d){const _0x372f77=a3_0x579108;_0x16976d[_0x372f77(0x142)]?_0x16976d[_0x372f77(0x142)](_0x16976d):console[_0x372f77(0x121)](msg||_0x372f77(0x126));}['subclassOnMessage'](_0x1921f2,_0x3dcf64,_0x16cbbe){const _0x56814b=a3_0x579108;let _0x2a9605,_0x1cea22=![];_[_0x56814b(0x129)](_0x3dcf64)?_0x56814b(0x150)!==_0x56814b(0x122)?(_0x2a9605=JSON['parse'](_0x3dcf64),_0x2a9605[_0x56814b(0x131)]&&_0x2a9605[_0x56814b(0x131)]==_0x56814b(0x118)&&(_0x1cea22=!![],delete _0x2a9605[_0x56814b(0x131)],_0x1921f2[_0x56814b(0x10e)](_0x1921f2,_0x2a9605[_0x56814b(0x151)]))):_0x2eac00=_0x1a3f9d:_0x2a9605=_0x3dcf64,_0x1921f2[_0x56814b(0x11f)]()['clientOnMessage']?_0x56814b(0x147)!==_0x56814b(0x147)?_0x49df41=_0x2bceb3:(_0x1cea22==!![]&&(_0x2a9605={'type':_0x56814b(0x118),..._0x2a9605}),_0x1921f2['getOptions']()[_0x56814b(0x130)](_0x16cbbe,_0x2a9605)):_0x56814b(0x12e)===_0x56814b(0x12e)?console[_0x56814b(0x121)](_0x3dcf64||_0x56814b(0x12b)):(_0x2b5bf7=_0x8cc1f4[_0x56814b(0x113)](_0x35fbc8),_0x3206f8[_0x56814b(0x131)]&&_0x430508[_0x56814b(0x131)]==_0x56814b(0x118)&&(_0x3abfeb=!![],delete _0x566875[_0x56814b(0x131)],_0xc47182[_0x56814b(0x10e)](_0x539e40,_0x11116b[_0x56814b(0x151)])));}[a3_0x579108(0x11a)](_0x2f69a9,_0x2621f3){const _0x5a8b7d=a3_0x579108;let _0x406ede;if(_['isObject'](_0x2f69a9))try{_0x5a8b7d(0x110)==='spKdu'?_0x3b3a72['log'](_0x54f3a5||_0x5a8b7d(0x12b)):_0x406ede=JSON[_0x5a8b7d(0x113)](_0x2f69a9);}catch(_0x4d63df){if(_0x5a8b7d(0x10c)!==_0x5a8b7d(0x10c))_0x43d6a2[_0x5a8b7d(0x142)](_0x1ef357);else{if(_0x2f69a9[_0x5a8b7d(0x112)]()['indexOf'](_0x5a8b7d(0x153))>-0x1){const _0x389e04=_0x2f69a9['toString']()[_0x5a8b7d(0x11b)](_0x5a8b7d(0x153)[_0x5a8b7d(0x12a)]),_0x3ed569=_0x389e04[_0x5a8b7d(0x13e)]('\x27)');_0x406ede=_0x3ed569>-0x1?_0x389e04[_0x5a8b7d(0x11b)](0x0,_0x3ed569):_0x389e04;}}}else _0x406ede=_0x2f69a9;if(_0x2621f3['clientOnError']){if('vLQQx'===_0x5a8b7d(0x14e))_0x2621f3['clientOnError'](_0x2621f3,_0x406ede);else throw{'message':_0x3abf71};}else console['log'](_0x2f69a9||_0x5a8b7d(0x14c));}[a3_0x579108(0x154)](_0xa6c0b6,_0xd6343c,_0x473f4f){const _0x7bd086=a3_0x579108;let _0x49196f;if(_[_0x7bd086(0x129)](_0xd6343c))try{if(_0x7bd086(0x13b)===_0x7bd086(0x13b))_0x49196f=JSON[_0x7bd086(0x113)](_0xd6343c);else{if(!_0x3bb23d)throw _0x7bd086(0x149);let _0x3c0fe1=this[_0x7bd086(0x145)]()[_0xbb7ecc];if(_0x3c0fe1){let _0x56e018={..._0x3c0fe1[_0x7bd086(0x133)]};_0x56e018['op']=_0x7bd086(0x14d),this[_0x7bd086(0x117)](_0x367613['stringify'](_0x56e018));}}}catch(_0x331696){if('bkpfB'!=='odfQj'){if(_0xd6343c[_0x7bd086(0x112)]()[_0x7bd086(0x13e)](_0x7bd086(0x153))>-0x1){if(_0x7bd086(0x10a)===_0x7bd086(0x148))_0x2b6476=!![],delete _0x59f9e7[_0x7bd086(0x131)],_0x1e01c2[_0x7bd086(0x10e)](_0x24ed01,_0x56e0f4[_0x7bd086(0x151)]);else{const _0x5889f4=_0xd6343c[_0x7bd086(0x112)]()[_0x7bd086(0x11b)](_0x7bd086(0x153)[_0x7bd086(0x12a)]),_0x12e617=_0x5889f4[_0x7bd086(0x13e)]('\x27)');_0x49196f=_0x12e617>-0x1?_0x5889f4[_0x7bd086(0x11b)](0x0,_0x12e617):_0x5889f4;}}}else{if(_0x4d44e6[_0x7bd086(0x112)]()['indexOf'](_0x7bd086(0x153))>-0x1){const _0x251022=_0x529f8e[_0x7bd086(0x112)]()[_0x7bd086(0x11b)](_0x7bd086(0x153)[_0x7bd086(0x12a)]),_0x30ee03=_0x251022[_0x7bd086(0x13e)]('\x27)');_0x4974f5=_0x30ee03>-0x1?_0x251022[_0x7bd086(0x11b)](0x0,_0x30ee03):_0x251022;}}}else _0x49196f=_0xd6343c;_0x473f4f[_0x7bd086(0x11e)]?_0x473f4f[_0x7bd086(0x11e)](_0xa6c0b6,_0x49196f,_0x473f4f):_0x7bd086(0x127)===_0x7bd086(0x127)?console[_0x7bd086(0x121)](_0xd6343c||_0x7bd086(0x139)):_0x271e83[_0x7bd086(0x142)]?_0x2d586d[_0x7bd086(0x142)](_0x1749af):_0x3a7aea[_0x7bd086(0x121)](_0x322ccb||_0x7bd086(0x126));}}

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

const a4_0x1acd96=a4_0x5c3f;function a4_0x218e(){const _0x1ed6e9=['subclassOnMessage','subclassedSocket','nhPdL','sign','privateChannels','markets','send','DvxzK','subaccount','getOptions','channel','log','clientOnMessage','FnSKN','socket\x20subscription\x20requires:\x20name,\x20subscription\x20args\x20(see\x20ftx\x20api\x20doc)','ZVBJW','orderbookGrouped','4819830ctgKzU','subscribe','isObject','iwjCj','clientOnClose','validateSubscription','stringify','1006659sBMpdP','derived\x20onMessage','49nPIxsP','logged\x20in','xrAlS','length','loggedIn','slice','hex','orders','lZtQN','1xJiQHn','4196691nuATsI','CnhQq','update','subclassOnError','removeSubscriptionHavingChannel','pizpG','type','ticker','subclassOnOpen','subclassOnClose','secret','ftxpay','name','1104784fGlwlP','5tVuBEa','derived\x20onError','lvYcO','fills','2355338mvkqnZ','3930052Kbnusf','Oaktu','clientOnOpen','parse','toString','market','6991038mRqcBy','key','login','websocket_login','now','publicChannels','fEKXj','getSubscriptions','derived\x20onOpen','unsubscribed','Udjaw','args','clientOnError','indexOf','name\x20required','unsubscribe','bytearray(b\x27'];a4_0x218e=function(){return _0x1ed6e9;};return a4_0x218e();}(function(_0x11c830,_0xa84179){const _0x4d0c18=a4_0x5c3f,_0x3fcbe2=_0x11c830();while(!![]){try{const _0x276761=parseInt(_0x4d0c18(0xba))/0x1*(parseInt(_0x4d0c18(0xcd))/0x2)+parseInt(_0x4d0c18(0xfd))/0x3+-parseInt(_0x4d0c18(0xce))/0x4+parseInt(_0x4d0c18(0xc9))/0x5*(parseInt(_0x4d0c18(0xd4))/0x6)+parseInt(_0x4d0c18(0xff))/0x7*(-parseInt(_0x4d0c18(0xc8))/0x8)+parseInt(_0x4d0c18(0xbb))/0x9+-parseInt(_0x4d0c18(0xf6))/0xa;if(_0x276761===_0xa84179)break;else _0x3fcbe2['push'](_0x3fcbe2['shift']());}catch(_0x34f6ed){_0x3fcbe2['push'](_0x3fcbe2['shift']());}}}(a4_0x218e,0xae328));import{PendaxSocket}from'../common/pendaxsocket.js';import*as a4_0x5a488a from'crypto';import a4_0x3a91e8 from'lodash';function a4_0x5c3f(_0x1e6d5a,_0x42f542){const _0x218eca=a4_0x218e();return a4_0x5c3f=function(_0x5c3fcf,_0x386e3c){_0x5c3fcf=_0x5c3fcf-0xba;let _0x298a20=_0x218eca[_0x5c3fcf];return _0x298a20;},a4_0x5c3f(_0x1e6d5a,_0x42f542);}const {_}=a4_0x3a91e8;export class FtxUsSocket extends PendaxSocket{[a4_0x1acd96(0xe9)]=[a4_0x1acd96(0xcc),a4_0x1acd96(0x106),a4_0x1acd96(0xc6)];[a4_0x1acd96(0xd9)]=[a4_0x1acd96(0xc2),a4_0x1acd96(0xea),'trades','orderbook',a4_0x1acd96(0xf5)];constructor(_0x129bd2){const _0x35e938=a4_0x1acd96;let _0x7b082c=_0x129bd2||{};_0x7b082c['url']='wss://ftx.us/ws/',super(_0x7b082c),this[_0x35e938(0xee)]()[_0x35e938(0xe6)]=this,this[_0x35e938(0xee)]()['subclassOnOpen']=this[_0x35e938(0xc3)],this[_0x35e938(0xee)]()[_0x35e938(0xe5)]=this[_0x35e938(0xe5)],this['getOptions']()['subclassOnError']=this[_0x35e938(0xbe)],this['getOptions']()[_0x35e938(0xc4)]=this[_0x35e938(0xc4)];}[a4_0x1acd96(0xe8)](_0x1d52c1){const _0x4b6225=a4_0x1acd96,_0xa3b4fb=a4_0x5a488a['Hmac']('sha256',this[_0x4b6225(0xee)]()[_0x4b6225(0xc5)])[_0x4b6225(0xbd)](_0x1d52c1)['digest'](_0x4b6225(0x105));return _0xa3b4fb;}[a4_0x1acd96(0xd6)](){const _0x394b10=a4_0x1acd96;if(this['loggedIn']==!![]){if(_0x394b10(0xe7)!==_0x394b10(0xec))return;else return;}const _0x58e1c4=Date[_0x394b10(0xd8)]();let _0x61f216=_0x58e1c4[_0x394b10(0xd2)]()+_0x394b10(0xd7);const _0x4a21f9=this['sign'](_0x61f216);let _0x4c872c=this['getOptions']();const _0x5a5345={'op':_0x394b10(0xd6),'args':{'key':_0x4c872c[_0x394b10(0xd5)],'sign':_0x4a21f9,'time':_0x58e1c4}};if(_0x4c872c[_0x394b10(0xed)]){if(_0x394b10(0xda)!==_0x394b10(0xf9))_0x5a5345[_0x394b10(0xdf)]['subaccount']=_0x4c872c[_0x394b10(0xed)];else{const _0x2a7282=_0x5d4188['toString']()[_0x394b10(0x104)]('bytearray(b\x27'[_0x394b10(0x102)]),_0x3e8590=_0x2a7282[_0x394b10(0xe1)]('\x27)');_0x59dc73=_0x3e8590>-0x1?_0x2a7282[_0x394b10(0x104)](0x0,_0x3e8590):_0x2a7282;}}this['responseReceived']=![];let _0x5e9b93=JSON[_0x394b10(0xfc)](_0x5a5345);this['send'](_0x5e9b93),this[_0x394b10(0x103)]=!![],console[_0x394b10(0xf0)](_0x394b10(0x100));}[a4_0x1acd96(0xf7)](_0x154bcf){const _0x1ea7f5=a4_0x1acd96;if(_0x154bcf&&_0x154bcf[_0x1ea7f5(0xc7)]&&_0x154bcf[_0x1ea7f5(0xdf)]){let _0x3379e0={'channel':_0x154bcf[_0x1ea7f5(0xdf)][_0x1ea7f5(0xef)],'market':_0x154bcf['args'][_0x1ea7f5(0xd3)],'op':_0x1ea7f5(0xf7)};this[_0x1ea7f5(0xfb)](_0x154bcf['name'],_0x3379e0,this['publicChannels'],this[_0x1ea7f5(0xe9)]);try{'tewjl'===_0x1ea7f5(0x101)?_0x4fa7d7[_0x1ea7f5(0xd0)](_0x14887f):this['send'](JSON[_0x1ea7f5(0xfc)](_0x3379e0));}catch(_0x42dc6f){throw{'message':_0x42dc6f};}}else throw{'message':_0x1ea7f5(0xf3)};}[a4_0x1acd96(0xe3)](_0x531cf6){const _0x4081e1=a4_0x1acd96;if(!_0x531cf6)throw _0x4081e1(0xe2);let _0x459131=this[_0x4081e1(0xdb)]()[_0x531cf6];if(_0x459131){let _0xfa9e4f={..._0x459131[_0x4081e1(0xdf)]};_0xfa9e4f['op']=_0x4081e1(0xe3),this[_0x4081e1(0xeb)](JSON[_0x4081e1(0xfc)](_0xfa9e4f));}}['subclassOnOpen'](_0x3dfc63){const _0x41290c=a4_0x1acd96;_0x3dfc63[_0x41290c(0xd0)]?_0x41290c(0xcb)!==_0x41290c(0x107)?_0x3dfc63[_0x41290c(0xd0)](_0x3dfc63):(_0x2b6674=_0x52ca2e[_0x41290c(0xd1)](_0x54dd8c),_0x2a5dcb['type']&&_0x39af13[_0x41290c(0xc1)]==_0x41290c(0xdd)&&(_0x1bb8c8=!![],delete _0x185f00[_0x41290c(0xc1)],_0x3a700d['removeSubscriptionHavingChannel'](_0x225640,_0x700eb3[_0x41290c(0xef)]))):console['log'](msg||_0x41290c(0xdc));}[a4_0x1acd96(0xe5)](_0x473136,_0xfc093c,_0x46fab4){const _0xaf9d89=a4_0x1acd96;let _0x3cc956,_0x6339e5=![];_[_0xaf9d89(0xf8)](_0xfc093c)?_0xaf9d89(0xf4)!==_0xaf9d89(0xf4)?_0x510018=_0x29fbf5[_0xaf9d89(0xd1)](_0x3da77d):(_0x3cc956=JSON[_0xaf9d89(0xd1)](_0xfc093c),_0x3cc956[_0xaf9d89(0xc1)]&&_0x3cc956['type']==_0xaf9d89(0xdd)&&(_0x6339e5=!![],delete _0x3cc956[_0xaf9d89(0xc1)],_0x473136[_0xaf9d89(0xbf)](_0x473136,_0x3cc956[_0xaf9d89(0xef)]))):_0x3cc956=_0xfc093c,_0x473136[_0xaf9d89(0xee)]()[_0xaf9d89(0xf1)]?(_0x6339e5==!![]&&(_0x3cc956={'type':_0xaf9d89(0xdd),..._0x3cc956}),_0x473136[_0xaf9d89(0xee)]()[_0xaf9d89(0xf1)](_0x46fab4,_0x3cc956)):console[_0xaf9d89(0xf0)](_0xfc093c||_0xaf9d89(0xfe));}[a4_0x1acd96(0xbe)](_0x295615,_0x301ff0){const _0x39cc4c=a4_0x1acd96;let _0x487f8d;if(_[_0x39cc4c(0xf8)](_0x295615))try{_0x39cc4c(0xc0)===_0x39cc4c(0xc0)?_0x487f8d=JSON['parse'](_0x295615):(_0x16013f==!![]&&(_0x4d0485={'type':_0x39cc4c(0xdd),..._0x2d64dd}),_0x5d4b26['getOptions']()[_0x39cc4c(0xf1)](_0x4f8758,_0x201b5a));}catch(_0x2d8e52){if(_0x295615[_0x39cc4c(0xd2)]()[_0x39cc4c(0xe1)](_0x39cc4c(0xe4))>-0x1){if(_0x39cc4c(0xcf)!==_0x39cc4c(0xde)){const _0x42b941=_0x295615[_0x39cc4c(0xd2)]()[_0x39cc4c(0x104)]('bytearray(b\x27'['length']),_0x3b3e50=_0x42b941[_0x39cc4c(0xe1)]('\x27)');_0x487f8d=_0x3b3e50>-0x1?_0x42b941['slice'](0x0,_0x3b3e50):_0x42b941;}else throw _0x39cc4c(0xe2);}}else _0x487f8d=_0x295615;_0x301ff0['clientOnError']?_0x301ff0[_0x39cc4c(0xe0)](_0x301ff0,_0x487f8d):console[_0x39cc4c(0xf0)](_0x295615||_0x39cc4c(0xca));}[a4_0x1acd96(0xc4)](_0x41d07b,_0x311e9e,_0x3bc9e0){const _0x5648f1=a4_0x1acd96;let _0x3bf8f5;if(_[_0x5648f1(0xf8)](_0x311e9e))try{_0x3bf8f5=JSON[_0x5648f1(0xd1)](_0x311e9e);}catch(_0x139688){if(_0x5648f1(0xbc)===_0x5648f1(0xbc)){if(_0x311e9e[_0x5648f1(0xd2)]()[_0x5648f1(0xe1)](_0x5648f1(0xe4))>-0x1){const _0x3e448a=_0x311e9e[_0x5648f1(0xd2)]()[_0x5648f1(0x104)](_0x5648f1(0xe4)['length']),_0x51be16=_0x3e448a['indexOf']('\x27)');_0x3bf8f5=_0x51be16>-0x1?_0x3e448a[_0x5648f1(0x104)](0x0,_0x51be16):_0x3e448a;}}else{if(!_0x426bd7)throw _0x5648f1(0xe2);let _0x11ff31=this[_0x5648f1(0xdb)]()[_0x3edaeb];if(_0x11ff31){let _0x5ef099={..._0x11ff31[_0x5648f1(0xdf)]};_0x5ef099['op']=_0x5648f1(0xe3),this[_0x5648f1(0xeb)](_0x4f43d6[_0x5648f1(0xfc)](_0x5ef099));}}}else _0x3bf8f5=_0x311e9e;_0x3bc9e0[_0x5648f1(0xfa)]?_0x5648f1(0xf2)!==_0x5648f1(0xf2)?_0x4a82e7[_0x5648f1(0xe0)](_0x1b8a8e,_0x1c8436):_0x3bc9e0[_0x5648f1(0xfa)](_0x41d07b,_0x3bf8f5,_0x3bc9e0):console['log'](_0x311e9e||'derived\x20onClose');}}
const a4_0x5b37a6=a4_0x1062;function a4_0x1062(_0x372dd2,_0x378caa){const _0x346a6a=a4_0x346a();return a4_0x1062=function(_0x106229,_0x490637){_0x106229=_0x106229-0x150;let _0xafa127=_0x346a6a[_0x106229];return _0xafa127;},a4_0x1062(_0x372dd2,_0x378caa);}(function(_0x2da4f3,_0x27ae8c){const _0x459cc3=a4_0x1062,_0x2e0954=_0x2da4f3();while(!![]){try{const _0xce6d59=parseInt(_0x459cc3(0x194))/0x1*(-parseInt(_0x459cc3(0x156))/0x2)+-parseInt(_0x459cc3(0x18a))/0x3+-parseInt(_0x459cc3(0x155))/0x4+parseInt(_0x459cc3(0x18f))/0x5+parseInt(_0x459cc3(0x172))/0x6+parseInt(_0x459cc3(0x15a))/0x7*(-parseInt(_0x459cc3(0x190))/0x8)+parseInt(_0x459cc3(0x189))/0x9;if(_0xce6d59===_0x27ae8c)break;else _0x2e0954['push'](_0x2e0954['shift']());}catch(_0x2caf25){_0x2e0954['push'](_0x2e0954['shift']());}}}(a4_0x346a,0x2cc78));import{PendaxSocket}from'../common/pendaxsocket.js';function a4_0x346a(){const _0x56704b=['bytearray(b\x27','cQscX','sha256','toString','4453776CYImsY','251736wulraw','sign','parse','derived\x20onClose','subclassOnClose','172060vMDbVv','872528yDKGGk','subaccount','privateChannels','xUrDm','3590afLARh','getOptions','unsubscribe','ticker','args','subclassOnError','getSubscriptions','FpZDN','orders','subscribe','now','fills','wss://ftx.us/ws/','Hmac','subclassOnMessage','digest','142520pEmbEK','174yovJqN','update','zAuGi','edUMO','14DsDcTD','derived\x20onError','unsubscribed','subclassOnOpen','name\x20required','PIayS','send','oUODh','length','url','loggedIn','clientOnMessage','clientOnClose','indexOf','isObject','derived\x20onOpen','name','subclassedSocket','stringify','socket\x20subscription\x20requires:\x20name,\x20subscription\x20args\x20(see\x20ftx\x20api\x20doc)','derived\x20onMessage','responseReceived','orderbook','type','1824864nUbMCX','clientOnOpen','ftxpay','bDWvb','xHlkJ','mHMlS','hex','SepgP','TAhcg','OlZPs','log','validateSubscription','market','slice','websocket_login','channel','key','orderbookGrouped','login'];a4_0x346a=function(){return _0x56704b;};return a4_0x346a();}import*as a4_0x3dcbf2 from'crypto';import a4_0xf7835e from'lodash';const {_}=a4_0xf7835e;export class FtxUsSocket extends PendaxSocket{[a4_0x5b37a6(0x192)]=[a4_0x5b37a6(0x150),a4_0x5b37a6(0x19c),a4_0x5b37a6(0x174)];['publicChannels']=[a4_0x5b37a6(0x197),'markets','trades',a4_0x5b37a6(0x170),a4_0x5b37a6(0x183)];constructor(_0x293551){const _0x120840=a4_0x5b37a6;let _0x2d4114=_0x293551||{};_0x2d4114[_0x120840(0x163)]=_0x120840(0x151),super(_0x2d4114),this[_0x120840(0x195)]()[_0x120840(0x16b)]=this,this[_0x120840(0x195)]()[_0x120840(0x15d)]=this[_0x120840(0x15d)],this[_0x120840(0x195)]()[_0x120840(0x153)]=this['subclassOnMessage'],this['getOptions']()[_0x120840(0x199)]=this[_0x120840(0x199)],this['getOptions']()['subclassOnClose']=this[_0x120840(0x18e)];}[a4_0x5b37a6(0x18b)](_0x5bbf37){const _0x59dd47=a4_0x5b37a6,_0x13f451=a4_0x3dcbf2[_0x59dd47(0x152)](_0x59dd47(0x187),this['getOptions']()['secret'])[_0x59dd47(0x157)](_0x5bbf37)[_0x59dd47(0x154)](_0x59dd47(0x178));return _0x13f451;}[a4_0x5b37a6(0x184)](){const _0x65c6db=a4_0x5b37a6;if(this['loggedIn']==!![])return;const _0x1fed69=Date['now']();let _0x1884a2=_0x1fed69[_0x65c6db(0x188)]()+_0x65c6db(0x180);const _0x5d24d9=this[_0x65c6db(0x18b)](_0x1884a2);let _0xe5e31e=this[_0x65c6db(0x195)]();const _0x435778={'op':_0x65c6db(0x184),'args':{'key':_0xe5e31e[_0x65c6db(0x182)],'sign':_0x5d24d9,'time':_0x1fed69}};_0xe5e31e[_0x65c6db(0x191)]&&(_0x65c6db(0x19b)===_0x65c6db(0x19b)?_0x435778['args'][_0x65c6db(0x191)]=_0xe5e31e[_0x65c6db(0x191)]:_0xf067c0={'type':_0x65c6db(0x15c),..._0x3a54b6});this[_0x65c6db(0x16f)]=![];let _0x2523cd=JSON[_0x65c6db(0x16c)](_0x435778);this[_0x65c6db(0x160)](_0x2523cd),this[_0x65c6db(0x164)]=!![],console['log']('logged\x20in');}[a4_0x5b37a6(0x19d)](_0x1ce403){const _0x4c6f23=a4_0x5b37a6;if(_0x1ce403&&_0x1ce403[_0x4c6f23(0x16a)]&&_0x1ce403['args']){let _0x14f852={'channel':_0x1ce403[_0x4c6f23(0x198)][_0x4c6f23(0x181)],'market':_0x1ce403[_0x4c6f23(0x198)][_0x4c6f23(0x17e)],'op':'subscribe'};this[_0x4c6f23(0x17d)](_0x1ce403['name'],_0x14f852,this['publicChannels'],this[_0x4c6f23(0x192)]);try{'pMvhJ'!=='BlOZn'?this[_0x4c6f23(0x160)](JSON['stringify'](_0x14f852)):_0xf3d255[_0x4c6f23(0x17c)](_0x4f1979||_0x4c6f23(0x169));}catch(_0x561506){if(_0x4c6f23(0x193)!==_0x4c6f23(0x179))throw{'message':_0x561506};else{if(this[_0x4c6f23(0x164)]==!![])return;const _0x4ac338=_0x78f60b[_0x4c6f23(0x19e)]();let _0x35e9d8=_0x4ac338['toString']()+_0x4c6f23(0x180);const _0x2c3a74=this[_0x4c6f23(0x18b)](_0x35e9d8);let _0x3f02e1=this[_0x4c6f23(0x195)]();const _0x342b62={'op':_0x4c6f23(0x184),'args':{'key':_0x3f02e1[_0x4c6f23(0x182)],'sign':_0x2c3a74,'time':_0x4ac338}};_0x3f02e1[_0x4c6f23(0x191)]&&(_0x342b62[_0x4c6f23(0x198)][_0x4c6f23(0x191)]=_0x3f02e1[_0x4c6f23(0x191)]);this[_0x4c6f23(0x16f)]=![];let _0x1aab5f=_0x93857a['stringify'](_0x342b62);this['send'](_0x1aab5f),this[_0x4c6f23(0x164)]=!![],_0x2ec721[_0x4c6f23(0x17c)]('logged\x20in');}}}else throw{'message':_0x4c6f23(0x16d)};}[a4_0x5b37a6(0x196)](_0x34d77e){const _0x3c898b=a4_0x5b37a6;if(!_0x34d77e){if('tPkay'!==_0x3c898b(0x186))throw _0x3c898b(0x15e);else try{_0x7cbb67=_0x159fa8[_0x3c898b(0x18c)](_0x2feaba);}catch(_0x2b6209){if(_0xb3b195[_0x3c898b(0x188)]()['indexOf'](_0x3c898b(0x185))>-0x1){const _0x37e675=_0x51f611[_0x3c898b(0x188)]()[_0x3c898b(0x17f)]('bytearray(b\x27'[_0x3c898b(0x162)]),_0x3a38e9=_0x37e675[_0x3c898b(0x167)]('\x27)');_0x46e5e6=_0x3a38e9>-0x1?_0x37e675[_0x3c898b(0x17f)](0x0,_0x3a38e9):_0x37e675;}}}let _0x2e8571=this[_0x3c898b(0x19a)]()[_0x34d77e];if(_0x2e8571){let _0x1f6578={..._0x2e8571[_0x3c898b(0x198)]};_0x1f6578['op']=_0x3c898b(0x196),this[_0x3c898b(0x160)](JSON[_0x3c898b(0x16c)](_0x1f6578));}}[a4_0x5b37a6(0x15d)](_0x3b60ed){const _0x5c8a40=a4_0x5b37a6;_0x3b60ed[_0x5c8a40(0x173)]?_0x3b60ed[_0x5c8a40(0x173)](_0x3b60ed):console[_0x5c8a40(0x17c)](msg||_0x5c8a40(0x169));}[a4_0x5b37a6(0x153)](_0xf2a76d,_0x2f7ab4,_0x341fa6){const _0x10b0e2=a4_0x5b37a6;let _0x4efcc8,_0x41d78e=![];_[_0x10b0e2(0x168)](_0x2f7ab4)?(_0x4efcc8=JSON[_0x10b0e2(0x18c)](_0x2f7ab4),_0x4efcc8[_0x10b0e2(0x171)]&&_0x4efcc8[_0x10b0e2(0x171)]==_0x10b0e2(0x15c)&&(_0x41d78e=!![],delete _0x4efcc8['type'],_0xf2a76d['removeSubscriptionHavingChannel'](_0xf2a76d,_0x4efcc8[_0x10b0e2(0x181)]))):_0x4efcc8=_0x2f7ab4,_0xf2a76d[_0x10b0e2(0x195)]()[_0x10b0e2(0x165)]?(_0x41d78e==!![]&&(_0x4efcc8={'type':_0x10b0e2(0x15c),..._0x4efcc8}),_0xf2a76d[_0x10b0e2(0x195)]()[_0x10b0e2(0x165)](_0x341fa6,_0x4efcc8)):console[_0x10b0e2(0x17c)](_0x2f7ab4||_0x10b0e2(0x16e));}[a4_0x5b37a6(0x199)](_0x372297,_0x2a2aac){const _0x5becaf=a4_0x5b37a6;let _0x433da2;if(_['isObject'](_0x372297)){if(_0x5becaf(0x15f)!==_0x5becaf(0x17a))try{_0x433da2=JSON[_0x5becaf(0x18c)](_0x372297);}catch(_0x5ce86b){if('bDWvb'===_0x5becaf(0x175)){if(_0x372297['toString']()[_0x5becaf(0x167)](_0x5becaf(0x185))>-0x1){const _0x6b41cb=_0x372297['toString']()['slice'](_0x5becaf(0x185)[_0x5becaf(0x162)]),_0x1b3c26=_0x6b41cb[_0x5becaf(0x167)]('\x27)');_0x433da2=_0x1b3c26>-0x1?_0x6b41cb['slice'](0x0,_0x1b3c26):_0x6b41cb;}}else throw _0x5becaf(0x15e);}else _0xa0542e[_0x5becaf(0x198)]['subaccount']=_0x532417[_0x5becaf(0x191)];}else _0x433da2=_0x372297;if(_0x2a2aac['clientOnError'])_0x5becaf(0x177)!==_0x5becaf(0x158)?_0x2a2aac['clientOnError'](_0x2a2aac,_0x433da2):_0x1ebbd0[_0x5becaf(0x17c)](_0x452b9c||_0x5becaf(0x15b));else{if(_0x5becaf(0x17b)===_0x5becaf(0x17b))console[_0x5becaf(0x17c)](_0x372297||_0x5becaf(0x15b));else{let _0x1e3b8d={..._0x23be93[_0x5becaf(0x198)]};_0x1e3b8d['op']=_0x5becaf(0x196),this['send'](_0x5089fc['stringify'](_0x1e3b8d));}}}[a4_0x5b37a6(0x18e)](_0x5f57cf,_0x56aee1,_0x128776){const _0x23a4ca=a4_0x5b37a6;let _0x1a00b8;if(_[_0x23a4ca(0x168)](_0x56aee1))try{_0x23a4ca(0x161)===_0x23a4ca(0x161)?_0x1a00b8=JSON[_0x23a4ca(0x18c)](_0x56aee1):_0x1a165a=_0x32eae8;}catch(_0x5e0eb0){if(_0x56aee1['toString']()['indexOf']('bytearray(b\x27')>-0x1){const _0x157c88=_0x56aee1['toString']()[_0x23a4ca(0x17f)](_0x23a4ca(0x185)[_0x23a4ca(0x162)]),_0xbece8d=_0x157c88[_0x23a4ca(0x167)]('\x27)');_0x1a00b8=_0xbece8d>-0x1?_0x157c88[_0x23a4ca(0x17f)](0x0,_0xbece8d):_0x157c88;}}else _0x23a4ca(0x176)!==_0x23a4ca(0x159)?_0x1a00b8=_0x56aee1:_0x48c415[_0x23a4ca(0x173)]?_0x22a8f7['clientOnOpen'](_0x393123):_0x383e9e['log'](_0x2fdc6e||'derived\x20onOpen');_0x128776[_0x23a4ca(0x166)]?_0x128776[_0x23a4ca(0x166)](_0x5f57cf,_0x1a00b8,_0x128776):console[_0x23a4ca(0x17c)](_0x56aee1||_0x23a4ca(0x18d));}}

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

const a6_0x2a14bd=a6_0x3c7a;function a6_0x3c7a(_0x43a365,_0x45ea2a){const _0xe7237a=a6_0xe723();return a6_0x3c7a=function(_0x3c7ad4,_0x464f83){_0x3c7ad4=_0x3c7ad4-0x1a4;let _0x4ba2f1=_0xe7237a[_0x3c7ad4];return _0x4ba2f1;},a6_0x3c7a(_0x43a365,_0x45ea2a);}(function(_0x42bb51,_0x3b8e3a){const _0x2e8894=a6_0x3c7a,_0x191910=_0x42bb51();while(!![]){try{const _0x4d9ab6=parseInt(_0x2e8894(0x1c7))/0x1*(parseInt(_0x2e8894(0x1c1))/0x2)+parseInt(_0x2e8894(0x1cd))/0x3*(parseInt(_0x2e8894(0x1c5))/0x4)+-parseInt(_0x2e8894(0x205))/0x5*(-parseInt(_0x2e8894(0x1ae))/0x6)+parseInt(_0x2e8894(0x1f6))/0x7*(-parseInt(_0x2e8894(0x1c0))/0x8)+-parseInt(_0x2e8894(0x20d))/0x9+-parseInt(_0x2e8894(0x1d4))/0xa+-parseInt(_0x2e8894(0x1ad))/0xb*(-parseInt(_0x2e8894(0x211))/0xc);if(_0x4d9ab6===_0x3b8e3a)break;else _0x191910['push'](_0x191910['shift']());}catch(_0x2032be){_0x191910['push'](_0x191910['shift']());}}}(a6_0xe723,0x4c7be));import{PendaxSocket}from'../common/pendaxsocket.js';import*as a6_0x5a324e from'crypto';import a6_0x152529 from'lodash';const {toLower}=a6_0x152529;import a6_0x211363 from'lodash';function a6_0xe723(){const _0x243f89=['grid-sub-orders','grid-orders-contract','4856tfrXJu','stringify','1elTVJv','already\x20subscribed\x20to\x20','JggPA','candle1D','orders','RFRuy','69yEfurz','LSeCM','privateBusinessChannels','SHbul','socket\x20order\x20requires:\x20an\x20id,\x20and\x20an\x20array\x20containing\x20order\x20args\x20(see\x20okx\x20api\x20doc)','getOptions','derived\x20onError','5813930Xaepeb','ETGpE','EdWJG','GET','length','constructor','Ifhqe','FfIWt','open-interest','KapOb','trades','slice','ttpGG','public-struc-block-trades','entries','unsubscribed','index-tickers','dYJPp','batch-cancel-orders','loggedIn','arg','price-limit','getSubscriptionArgsHash','account','channel','subclassOnClose','socket\x20subscription\x20requires:\x20array\x20of\x20subscriptions\x20args\x20(see\x20okx\x20api\x20doc)','derived\x20onOpen','publicChannels','estimated-price','logged\x20in','validateSubscription','index-candle30m','business','11032nlArOO','isObject','books','ONbsJ','event','secret','RBPMY','indexOf','vKoSe','zGPyK','JhTMp','BrbLS','grid-orders-spot','log','/users/self/verify','337215uWjpyM','VgltV','placeOrders','passphrase','mark-price','grid-positions','SEUIv','\x20(sub\x20name\x20=\x20','5472450jnGgPk','order','removeSubscriptionHavingArgs','FVVhf','24ZWPQtw','fHtlU','sign','subscription\x20name\x20is\x20required','WiGVw','Hmac','key','removeSubscriptionHavingChannel','lOoVl','one\x20or\x20more\x20requested\x20channels\x20requires\x20login.\x20Please\x20perform\x20socket\x20login\x20then\x20retry','xSzQp','subArgsHash','derived\x20onClose','getSubscriptions','floor','base64','socket\x20order\x20requires:\x20an\x20id,\x20and\x20an\x20array\x20containing\x20order(s)\x20to\x20cancel\x20args\x20(see\x20okx\x20api\x20doc)','positions','VFMwr','batch-orders','name','wss://wspap.okx.com:8443/ws/v5/public?brokerId=9999','tfuaV','clientOnError','uly','url','testnet','subscriptions','toString','instruments','subscription\x20name\x20already\x20used\x20','send','balance_and_position','wss://ws.okx.com:8443/ws/v5/public','liquidation-warning','tickers','AWhFT','cancel-order','responseReceived','struc-block-trades','subclassOnError','subclassOnOpen','status','quotes','WqWUq','subclassOnMessage','wss://ws.okx.com:8443/ws/v5/private','instId','Bxrel','cIkrS','args','digest','isPrivate','algo-advance','BRrfK','parse','privateChannels','update','now','clientOnMessage','8560145gSgtAD','12JWmBUV','urlType','wss://wspap.okx.com:8443/ws/v5/private?brokerId=9999','amend-order','unsubscribe','login','cancelOrders','bytearray(b\x27','Atjaf','KvOzu','publicBusinessChannels','clientOnOpen','subscribe','instType','sha256','iAxIh','oFogP','clientOnClose','2552NGeSbD','572534znBWVL','includes'];a6_0xe723=function(){return _0x243f89;};return a6_0xe723();}const {_}=a6_0x211363;export class OkxSocket extends PendaxSocket{[a6_0x2a14bd(0x1a9)]=[a6_0x2a14bd(0x1eb),a6_0x2a14bd(0x222),a6_0x2a14bd(0x231),a6_0x2a14bd(0x1cb),a6_0x2a14bd(0x233),'account-greeks'];[a6_0x2a14bd(0x1cf)]=['rfqs',a6_0x2a14bd(0x23c),a6_0x2a14bd(0x238),'orders-algo',a6_0x2a14bd(0x1a6),a6_0x2a14bd(0x202),a6_0x2a14bd(0x1c4),a6_0x2a14bd(0x20a),a6_0x2a14bd(0x1c3)];[a6_0x2a14bd(0x1b8)]=[a6_0x2a14bd(0x1e1),'block-tickers'];[a6_0x2a14bd(0x1f0)]=[a6_0x2a14bd(0x22e),a6_0x2a14bd(0x234),a6_0x2a14bd(0x1dc),a6_0x2a14bd(0x1ca),a6_0x2a14bd(0x1de),a6_0x2a14bd(0x1f1),a6_0x2a14bd(0x209),'mark-price-candle1D',a6_0x2a14bd(0x1e9),a6_0x2a14bd(0x1f8),'opt-summary','funding-rate',a6_0x2a14bd(0x1f4),a6_0x2a14bd(0x1e4),a6_0x2a14bd(0x23b)];constructor(_0x4dc8f2){const _0x5efbf8=a6_0x2a14bd;let _0x1d5b45=_0x4dc8f2||{};if(_0x4dc8f2[_0x5efbf8(0x22b)]===!![]){let _0x4cd32c='wss://wspap.okx.com:8443/ws/v5/business?brokerId=9999';_0x4dc8f2['isPrivate']&&_0x4dc8f2[_0x5efbf8(0x1a5)]==!![]?_0x5efbf8(0x1be)!=='oFogP'?this[_0x5efbf8(0x230)](_0x479dbf[_0x5efbf8(0x1c6)](_0x1fa587)):_0x4dc8f2[_0x5efbf8(0x1af)]&&_0x4dc8f2[_0x5efbf8(0x1af)]==_0x5efbf8(0x1f5)?_0x1d5b45[_0x5efbf8(0x22a)]=_0x4cd32c:_0x1d5b45[_0x5efbf8(0x22a)]=_0x5efbf8(0x1b0):_0x4dc8f2[_0x5efbf8(0x1af)]&&_0x4dc8f2[_0x5efbf8(0x1af)]=='business'?_0x1d5b45[_0x5efbf8(0x22a)]=_0x4cd32c:_0x1d5b45[_0x5efbf8(0x22a)]=_0x5efbf8(0x226);}else{let _0x31d085='wss://ws.okx.com:8443/ws/v5/business';_0x4dc8f2[_0x5efbf8(0x1a5)]&&_0x4dc8f2['isPrivate']==!![]?'CAXdu'==='gEkQh'?_0x272be9['op']=_0x5efbf8(0x20e):_0x4dc8f2[_0x5efbf8(0x1af)]&&_0x4dc8f2[_0x5efbf8(0x1af)]==_0x5efbf8(0x1f5)?_0x1d5b45['url']=_0x31d085:_0x1d5b45[_0x5efbf8(0x22a)]=_0x5efbf8(0x23f):_0x4dc8f2['urlType']&&_0x4dc8f2[_0x5efbf8(0x1af)]==_0x5efbf8(0x1f5)?_0x1d5b45[_0x5efbf8(0x22a)]=_0x31d085:_0x5efbf8(0x1e5)!==_0x5efbf8(0x1e5)?_0x164233[_0x5efbf8(0x22a)]=_0x5efbf8(0x1b0):_0x1d5b45[_0x5efbf8(0x22a)]=_0x5efbf8(0x232);}super(_0x1d5b45),this[_0x5efbf8(0x1d2)]()['subclassedSocket']=this,this['getOptions']()[_0x5efbf8(0x23a)]=this[_0x5efbf8(0x23a)],this[_0x5efbf8(0x1d2)]()[_0x5efbf8(0x23e)]=this[_0x5efbf8(0x23e)],this[_0x5efbf8(0x1d2)]()['subclassOnError']=this[_0x5efbf8(0x239)],this[_0x5efbf8(0x1d2)]()['subclassOnClose']=this[_0x5efbf8(0x1ed)];}['sign'](_0x42fd31){const _0x4a6ba0=a6_0x2a14bd,_0x53574c=a6_0x5a324e[_0x4a6ba0(0x216)](_0x4a6ba0(0x1bc),this[_0x4a6ba0(0x1d2)]()[_0x4a6ba0(0x1fb)])['update'](_0x42fd31)['digest'](_0x4a6ba0(0x220));return _0x53574c;}[a6_0x2a14bd(0x1b3)](){const _0x140215=a6_0x2a14bd;if(this[_0x140215(0x1e7)]==!![])return;const _0x5a9def=Math[_0x140215(0x21f)](Date[_0x140215(0x1ab)]()/0x3e8),_0x2c33a9='GET',_0x4bdf3e=_0x140215(0x204);let _0x13ffcb=_0x5a9def[_0x140215(0x22d)]()+_0x2c33a9+_0x4bdf3e;const _0x76ea16=this['sign'](_0x13ffcb);let _0x806bc5=this[_0x140215(0x1d2)]();const _0x2bbba4={'op':'login','args':[{'apiKey':_0x806bc5[_0x140215(0x217)],'passphrase':_0x806bc5[_0x140215(0x208)],'timestamp':_0x5a9def,'sign':_0x76ea16}]};this[_0x140215(0x237)]=![];let _0x1c312b=JSON[_0x140215(0x1c6)](_0x2bbba4);this[_0x140215(0x230)](_0x1c312b,_0x3e1a93=>{const _0x3612d6=_0x140215;this[_0x3612d6(0x1e7)]=!![],console[_0x3612d6(0x203)](_0x3e1a93||'logged\x20in');});}[a6_0x2a14bd(0x207)](_0x3bb7da){const _0x112965=a6_0x2a14bd;if(!this[_0x112965(0x1e7)])throw{'message':'please\x20login'};if(_0x3bb7da&&_0x3bb7da['id']&&_0x3bb7da[_0x112965(0x243)]&&_0x3bb7da[_0x112965(0x243)][_0x112965(0x1d9)]==Array&&_0x3bb7da[_0x112965(0x243)][_0x112965(0x1d8)]>0x0){_0x3bb7da['args'][_0x112965(0x1d8)]==0x1?_0x112965(0x200)==='iYOgF'?this['send'](_0x4a213c[_0x112965(0x1c6)](_0x2bfb8d)):_0x3bb7da['op']=_0x112965(0x20e):_0x3bb7da['op']=_0x112965(0x224);try{this[_0x112965(0x230)](JSON[_0x112965(0x1c6)](_0x3bb7da));}catch(_0x94ed5f){if(_0x112965(0x1d6)!==_0x112965(0x227))throw{'message':_0x94ed5f};else _0x377ff9[_0x112965(0x22a)]=_0x4924a4;}}else throw{'message':_0x112965(0x1d1)};}[a6_0x2a14bd(0x1b4)](_0x6e6a55){const _0x474bb4=a6_0x2a14bd;if(!this[_0x474bb4(0x1e7)])throw{'message':'please\x20login'};if(_0x6e6a55&&_0x6e6a55['id']&&_0x6e6a55[_0x474bb4(0x243)]&&_0x6e6a55[_0x474bb4(0x243)]['constructor']==Array&&_0x6e6a55[_0x474bb4(0x1e8)]['length']>0x0){_0x6e6a55[_0x474bb4(0x243)][_0x474bb4(0x1d8)]==0x1?_0x474bb4(0x1bd)===_0x474bb4(0x1bd)?_0x6e6a55['op']=_0x474bb4(0x236):_0x3302b4[_0x474bb4(0x22a)]='wss://ws.okx.com:8443/ws/v5/private':_0x6e6a55['op']=_0x474bb4(0x1e6);try{if(_0x474bb4(0x1dd)!==_0x474bb4(0x1dd)){const _0x557490=_0x323806[_0x474bb4(0x22d)]()[_0x474bb4(0x1df)](_0x474bb4(0x1b5)[_0x474bb4(0x1d8)]),_0x4aaaa1=_0x557490[_0x474bb4(0x1fd)]('\x27)');_0x56d068=_0x4aaaa1>-0x1?_0x557490['slice'](0x0,_0x4aaaa1):_0x557490;}else this[_0x474bb4(0x230)](JSON['stringify'](_0x6e6a55));}catch(_0x52b9f8){if('zGPyK'===_0x474bb4(0x1ff))throw{'message':_0x52b9f8};else _0x3f5cd8[_0x474bb4(0x22a)]='wss://wspap.okx.com:8443/ws/v5/public?brokerId=9999';}}else{if(_0x474bb4(0x212)===_0x474bb4(0x206))_0x23eecd[_0x474bb4(0x22a)]=_0x162e09;else throw{'message':_0x474bb4(0x221)};}}['amendOrders'](_0x2518bb){const _0x1106ad=a6_0x2a14bd;if(!this[_0x1106ad(0x1e7)])throw{'message':'please\x20login'};if(_0x2518bb&&_0x2518bb['id']&&_0x2518bb['args']&&_0x2518bb[_0x1106ad(0x243)]['constructor']==Array&&_0x2518bb['arg']['length']>0x0){_0x2518bb[_0x1106ad(0x243)][_0x1106ad(0x1d8)]==0x1?_0x2518bb['op']=_0x1106ad(0x1b1):_0x2518bb['op']='batch-amend-orders';try{this[_0x1106ad(0x230)](JSON[_0x1106ad(0x1c6)](_0x2518bb));}catch(_0x179a97){throw{'message':_0x179a97};}}else throw{'message':_0x1106ad(0x1d1)};}['subscribe'](_0x410378){const _0x556270=a6_0x2a14bd;if(_0x410378&&_0x410378[_0x556270(0x243)]&&_0x410378[_0x556270(0x243)][_0x556270(0x1d9)]==Array)for(const _0x6409ec of _0x410378[_0x556270(0x243)]){let _0x5ef94b={'op':_0x556270(0x1ba),'args':[_0x6409ec]};const _0x321f79=_0x6409ec['instId']?'_'+_0x6409ec[_0x556270(0x240)]:'',_0x8723df=_0x6409ec[_0x556270(0x1bb)]?'_'+_0x6409ec[_0x556270(0x1bb)]:'',_0x181823=_0x6409ec[_0x556270(0x229)]?'_'+_0x6409ec[_0x556270(0x229)]:'',_0x411d9b=_0x6409ec[_0x556270(0x1ec)]+_0x321f79+_0x8723df+_0x181823;this['validateSubscription'](_0x411d9b,_0x5ef94b,this['publicChannels'],this[_0x556270(0x1a9)],this[_0x556270(0x1cf)]);try{this[_0x556270(0x230)](JSON[_0x556270(0x1c6)](_0x5ef94b));}catch(_0x14eca7){throw{'message':_0x14eca7};}}else{if(_0x556270(0x242)!==_0x556270(0x235))throw{'message':_0x556270(0x1ee)};else{let _0x2eb196=_0x177904[_0x556270(0x21c)];if(_0x2eb196==_0x2ad3e0)throw _0x556270(0x1c8)+_0x192e1d[_0x556270(0x1c6)](_0x68ca6c)+'\x20(sub\x20name\x20=\x20'+_0x46fc23[_0x556270(0x225)]+')';}}}['unsubscribe'](_0x2747a7){const _0x29d1f7=a6_0x2a14bd;if(_0x2747a7&&_0x2747a7[_0x29d1f7(0x243)]&&_0x2747a7[_0x29d1f7(0x243)][_0x29d1f7(0x1d9)]==Array)for(const _0x45eac0 of _0x2747a7['args']){if(_0x29d1f7(0x1db)!==_0x29d1f7(0x219)){const _0x38598a=_0x45eac0['instId']?'_'+_0x45eac0[_0x29d1f7(0x240)]:'',_0x75c40=_0x45eac0['instType']?'_'+_0x45eac0[_0x29d1f7(0x1bb)]:'',_0x3d9bbf=_0x45eac0[_0x29d1f7(0x229)]?'_'+_0x45eac0[_0x29d1f7(0x229)]:'',_0x2b353c=_0x45eac0[_0x29d1f7(0x1ec)]+_0x38598a+_0x75c40+_0x3d9bbf;let _0x4d14c3=this[_0x29d1f7(0x21e)]()[_0x2b353c];if(_0x4d14c3){if(_0x29d1f7(0x1a7)===_0x29d1f7(0x1a7)){let _0x3d210b=_0x4d14c3[_0x29d1f7(0x243)];_0x3d210b['op']=_0x29d1f7(0x1b2),this['send'](JSON[_0x29d1f7(0x1c6)](_0x3d210b));}else _0x5d0e71=_0x1028e5;}}else _0x2135f9['url']=_0x309597;}}[a6_0x2a14bd(0x23a)](_0x4cbf1f){const _0x350d19=a6_0x2a14bd;if(_0x4cbf1f[_0x350d19(0x1b9)]){if(_0x350d19(0x1e0)!==_0x350d19(0x1e0)){const _0x336c09=_0xdc9c5d[_0x350d19(0x216)](_0x350d19(0x1bc),this[_0x350d19(0x1d2)]()[_0x350d19(0x1fb)])[_0x350d19(0x1aa)](_0x3d5e39)[_0x350d19(0x1a4)](_0x350d19(0x220));return _0x336c09;}else _0x4cbf1f[_0x350d19(0x1b9)](_0x4cbf1f);}else console['log'](msg||_0x350d19(0x1ef));}['subclassOnMessage'](_0x15907d,_0x35691a,_0x5d67af){const _0x5ca69c=a6_0x2a14bd;let _0x464b2a,_0x265830=![];if(_['isObject'](_0x35691a))_0x464b2a=JSON[_0x5ca69c(0x1a8)](_0x35691a),_0x464b2a[_0x5ca69c(0x1fa)]&&_0x464b2a[_0x5ca69c(0x1fa)]=='unsubscribed'&&('PncBE'===_0x5ca69c(0x1f9)?_0x21e172=_0x1d1126:(_0x265830=!![],delete _0x464b2a[_0x5ca69c(0x1fa)],this[_0x5ca69c(0x218)](_0x15907d,_0x464b2a[_0x5ca69c(0x1ec)])));else{if(_0x5ca69c(0x1cc)!=='XPbNY')_0x464b2a=_0x35691a;else return;}if(_0x15907d[_0x5ca69c(0x1d2)]()['clientOnMessage']){if(_0x5ca69c(0x210)===_0x5ca69c(0x210))_0x265830==!![]&&(_0x5ca69c(0x23d)!==_0x5ca69c(0x1c9)?_0x464b2a={'event':_0x5ca69c(0x1e3),..._0x464b2a}:_0x2615a6={'event':'unsubscribed',..._0xa3e3c5}),_0x15907d[_0x5ca69c(0x1d2)]()[_0x5ca69c(0x1ac)](_0x5d67af,_0x464b2a);else throw{'message':_0x5ca69c(0x221)};}else{if('wuWIl'!==_0x5ca69c(0x1fc))console[_0x5ca69c(0x203)](_0x35691a||'derived\x20onMessage');else throw _0x5ca69c(0x22f);}}[a6_0x2a14bd(0x239)](_0x270aa6,_0x2b49cf){const _0x59fa00=a6_0x2a14bd;let _0x37719a;if(_['isObject'](_0x270aa6))try{if(_0x59fa00(0x1ce)!==_0x59fa00(0x1fe))_0x37719a=JSON[_0x59fa00(0x1a8)](_0x270aa6);else throw{'message':_0x347b7b};}catch(_0x58760c){if('xSzQp'===_0x59fa00(0x21b)){if(_0x270aa6['toString']()[_0x59fa00(0x1fd)](_0x59fa00(0x1b5))>-0x1){const _0x2c8bde=_0x270aa6[_0x59fa00(0x22d)]()[_0x59fa00(0x1df)](_0x59fa00(0x1b5)[_0x59fa00(0x1d8)]),_0x40fe3b=_0x2c8bde[_0x59fa00(0x1fd)]('\x27)');_0x37719a=_0x40fe3b>-0x1?_0x2c8bde['slice'](0x0,_0x40fe3b):_0x2c8bde;}}else throw{'message':_0x58dad7};}else _0x37719a=_0x270aa6;_0x2b49cf[_0x59fa00(0x228)]?_0x59fa00(0x223)!==_0x59fa00(0x1d0)?_0x2b49cf[_0x59fa00(0x228)](_0x2b49cf,_0x37719a):_0x510cbb[_0x59fa00(0x1af)]&&_0x31219d[_0x59fa00(0x1af)]==_0x59fa00(0x1f5)?_0x384913[_0x59fa00(0x22a)]=_0x134b89:_0x47d136['url']=_0x59fa00(0x226):'Bxrel'!==_0x59fa00(0x241)?_0xea9926[_0x59fa00(0x1af)]&&_0x5e5afe[_0x59fa00(0x1af)]==_0x59fa00(0x1f5)?_0x1db757[_0x59fa00(0x22a)]=_0x8d2f16:_0x26e2ae[_0x59fa00(0x22a)]=_0x59fa00(0x232):console[_0x59fa00(0x203)](_0x270aa6||_0x59fa00(0x1d3));}['subclassOnClose'](_0x2e49be,_0xd03d97,_0x51a4e1){const _0x324f27=a6_0x2a14bd;let _0x3b9469;if(_[_0x324f27(0x1f7)](_0xd03d97)){if('BOoeo'!=='BOoeo')throw{'message':_0x324f27(0x21a)};else try{_0x3b9469=JSON['parse'](_0xd03d97);}catch(_0x2e7f08){if(_0x324f27(0x20b)!==_0x324f27(0x1b7)){if(_0xd03d97['toString']()[_0x324f27(0x1fd)]('bytearray(b\x27')>-0x1){const _0x27bf4d=_0xd03d97[_0x324f27(0x22d)]()['slice'](_0x324f27(0x1b5)[_0x324f27(0x1d8)]),_0x538729=_0x27bf4d['indexOf']('\x27)');_0x3b9469=_0x538729>-0x1?_0x27bf4d[_0x324f27(0x1df)](0x0,_0x538729):_0x27bf4d;}}else{if(this[_0x324f27(0x1e7)]==!![])return;const _0x3e88f5=_0x52b274['floor'](_0x584c0f[_0x324f27(0x1ab)]()/0x3e8),_0x1858fc=_0x324f27(0x1d7),_0x42ddfe='/users/self/verify';let _0xb45632=_0x3e88f5[_0x324f27(0x22d)]()+_0x1858fc+_0x42ddfe;const _0x1f797b=this[_0x324f27(0x213)](_0xb45632);let _0x52dbf0=this[_0x324f27(0x1d2)]();const _0x30b330={'op':'login','args':[{'apiKey':_0x52dbf0[_0x324f27(0x217)],'passphrase':_0x52dbf0[_0x324f27(0x208)],'timestamp':_0x3e88f5,'sign':_0x1f797b}]};this[_0x324f27(0x237)]=![];let _0x49fa68=_0x58289f['stringify'](_0x30b330);this[_0x324f27(0x230)](_0x49fa68,_0x4795f9=>{const _0x1d17ef=_0x324f27;this[_0x1d17ef(0x1e7)]=!![],_0x4c7ec7[_0x1d17ef(0x203)](_0x4795f9||_0x1d17ef(0x1f2));});}}}else _0x3b9469=_0xd03d97;_0x51a4e1[_0x324f27(0x1bf)]?_0x51a4e1[_0x324f27(0x1bf)](_0x2e49be,_0x3b9469,_0x51a4e1):console[_0x324f27(0x203)](_0xd03d97||_0x324f27(0x21d));}[a6_0x2a14bd(0x1f3)](_0x16de66,_0x375470,_0x226d53,_0xaff4d3,_0x31b784){const _0x4f3eb8=a6_0x2a14bd;if(!_0x16de66||_0x16de66=='')throw _0x4f3eb8(0x214);let _0xc87399=![];if(_0xaff4d3[_0x4f3eb8(0x1c2)](_0x375470['channel'])||_0x31b784[_0x4f3eb8(0x1c2)](_0x375470['channel'])){if(_0x4f3eb8(0x1da)!==_0x4f3eb8(0x201))_0xc87399=!![];else throw{'message':_0x20155d};}if(_0xc87399&&!this[_0x4f3eb8(0x1e7)])throw{'message':_0x4f3eb8(0x21a)};let _0x384518=this[_0x4f3eb8(0x1ea)](_0x375470);if(!this['subscriptions'][_0x16de66]){if(_0x4f3eb8(0x1d5)!=='NEhev'){for(const [_0x3f9701,_0x10c05c]of Object[_0x4f3eb8(0x1e2)](this[_0x4f3eb8(0x22c)])){let _0x3698da=_0x10c05c[_0x4f3eb8(0x21c)];if(_0x3698da==_0x384518){if(_0x4f3eb8(0x215)===_0x4f3eb8(0x1b6)){const _0x40c93f=_0x8d190d[_0x4f3eb8(0x22d)]()[_0x4f3eb8(0x1df)](_0x4f3eb8(0x1b5)['length']),_0x297ed0=_0x40c93f['indexOf']('\x27)');_0x4d77f6=_0x297ed0>-0x1?_0x40c93f[_0x4f3eb8(0x1df)](0x0,_0x297ed0):_0x40c93f;}else throw _0x4f3eb8(0x1c8)+JSON[_0x4f3eb8(0x1c6)](_0x375470)+_0x4f3eb8(0x20c)+_0x10c05c[_0x4f3eb8(0x225)]+')';}}this[_0x4f3eb8(0x22c)][_0x16de66]={'args':_0x375470,'subArgsHash':_0x384518};}else _0x17dde5['clientOnError'](_0x38b2bd,_0x5e0672);}else throw _0x4f3eb8(0x22f);return _0xc87399;}[a6_0x2a14bd(0x20f)](_0x29f96b,_0x5da854){const _0x4f2bfb=a6_0x2a14bd;let _0x4102d0=_0x29f96b['getSubscriptionArgsHash'](_0x5da854);for(const [_0x54939b,_0x32e5ed]of Object[_0x4f2bfb(0x1e2)](_0x29f96b[_0x4f2bfb(0x22c)])){if('lvTJJ'==='lvTJJ'){let _0x4f6363=_0x32e5ed[_0x4f2bfb(0x21c)];if(_0x4f6363==_0x4102d0){delete _0x29f96b[_0x4f2bfb(0x22c)][_0x54939b];break;}}else try{_0x4d3521=_0x256637[_0x4f2bfb(0x1a8)](_0x289184);}catch(_0x464552){if(_0x10ffee['toString']()[_0x4f2bfb(0x1fd)]('bytearray(b\x27')>-0x1){const _0x53c0af=_0x1f82a5[_0x4f2bfb(0x22d)]()[_0x4f2bfb(0x1df)](_0x4f2bfb(0x1b5)[_0x4f2bfb(0x1d8)]),_0x178b60=_0x53c0af[_0x4f2bfb(0x1fd)]('\x27)');_0xae65be=_0x178b60>-0x1?_0x53c0af[_0x4f2bfb(0x1df)](0x0,_0x178b60):_0x53c0af;}}}}[a6_0x2a14bd(0x218)](_0x5f4902,_0x53bff2){const _0x49fc07=a6_0x2a14bd;for(const [_0x3feccb,_0x592aa7]of Object[_0x49fc07(0x1e2)](_0x5f4902[_0x49fc07(0x22c)])){let _0x3b71cc=_0x592aa7['args'];if(_0x3b71cc[_0x49fc07(0x1ec)]&&_0x3b71cc[_0x49fc07(0x1ec)]==_0x53bff2){delete _0x5f4902[_0x49fc07(0x22c)][_0x3feccb];break;}}}}
function a6_0x5e29(_0x241af6,_0xd7aee3){const _0x38fae2=a6_0x38fa();return a6_0x5e29=function(_0x5e292c,_0x598c91){_0x5e292c=_0x5e292c-0x120;let _0x44ab3e=_0x38fae2[_0x5e292c];return _0x44ab3e;},a6_0x5e29(_0x241af6,_0xd7aee3);}const a6_0x312383=a6_0x5e29;(function(_0x4701d3,_0x4d53f7){const _0xe39a92=a6_0x5e29,_0x5d80fc=_0x4701d3();while(!![]){try{const _0x423686=parseInt(_0xe39a92(0x1a1))/0x1+parseInt(_0xe39a92(0x1ae))/0x2*(-parseInt(_0xe39a92(0x129))/0x3)+-parseInt(_0xe39a92(0x184))/0x4+parseInt(_0xe39a92(0x18e))/0x5+-parseInt(_0xe39a92(0x178))/0x6+-parseInt(_0xe39a92(0x1a8))/0x7+parseInt(_0xe39a92(0x146))/0x8*(parseInt(_0xe39a92(0x172))/0x9);if(_0x423686===_0x4d53f7)break;else _0x5d80fc['push'](_0x5d80fc['shift']());}catch(_0x3e8449){_0x5d80fc['push'](_0x5d80fc['shift']());}}}(a6_0x38fa,0x2cb22));import{PendaxSocket}from'../common/pendaxsocket.js';import*as a6_0x5188b6 from'crypto';import a6_0x130bfc from'lodash';const {toLower}=a6_0x130bfc;function a6_0x38fa(){const _0x454c1e=['Nyuge','GWFiT','length','272slYBgX','trades','wss://wspap.okx.com:8443/ws/v5/public?brokerId=9999','getOptions','wss://ws.okx.com:8443/ws/v5/business','derived\x20onMessage','stringify','privateBusinessChannels','getSubscriptionArgsHash','zabqK','rfqs','instId','idKeo','iViPe','QQRAg','event','name','login','batch-orders','grid-orders-spot','uly','orders-algo','opt-summary','tfFYs','ldTXu','positions','base64','grid-sub-orders','AWEuo','wss://ws.okx.com:8443/ws/v5/private','FBnAD','unsubscribed','send','Oseni','qfkUi','index-candle30m','tThQG','sign','please\x20login','instruments','arg','subscriptions','ULuxA','GET','134901QtpbMY','socket\x20subscription\x20requires:\x20array\x20of\x20subscriptions\x20args\x20(see\x20okx\x20api\x20doc)','tYDIZ','indexOf','clientOnMessage','validateSubscription','1178610XpVWPn','batch-amend-orders','parse','subclassOnOpen','OFHPo','logged\x20in','order','amend-order','QdUky','args','public-struc-block-trades','ynDwJ','1105396weweBA','funding-rate','price-limit','YibQn','business','\x20(sub\x20name\x20=\x20','urlType','dmiJd','subscription\x20name\x20is\x20required','MKKxV','1140220tRHsFs','testnet','YeJMS','XdvNi','amendOrders','egARO','vLfAA','bytearray(b\x27','cancelOrders','derived\x20onClose','clientOnClose','includes','SFFXq','url','responseReceived','ibeua','liquidation-warning','bqzBA','wss://ws.okx.com:8443/ws/v5/public','236848tWXHFY','NFYus','BvXDW','passphrase','entries','removeSubscriptionHavingChannel','clientOnError','1163351devtII','estimated-price','xGTnQ','one\x20or\x20more\x20requested\x20channels\x20requires\x20login.\x20Please\x20perform\x20socket\x20login\x20then\x20retry','tickers','subscription\x20name\x20already\x20used\x20','2WMfBwL','log','socket\x20order\x20requires:\x20an\x20id,\x20and\x20an\x20array\x20containing\x20order(s)\x20to\x20cancel\x20args\x20(see\x20okx\x20api\x20doc)','orders','constructor','mark-price','grid-orders-contract','publicChannels','subscribe','placeOrders','MnPUn','derived\x20onOpen','books','channel','isObject','subclassOnClose','subclassOnMessage','isPrivate','subArgsHash','cancel-order','QrrjA','instType','floor','toString','now','457401YfOlyT','secret','lkRkF','privateChannels','grid-positions','subclassOnError','removeSubscriptionHavingArgs','mark-price-candle1D','struc-block-trades','status','derived\x20onError','digest','/users/self/verify','AEsRr','lOWKQ','slice','pTYit','key','account-greeks','loggedIn','socket\x20order\x20requires:\x20an\x20id,\x20and\x20an\x20array\x20containing\x20order\x20args\x20(see\x20okx\x20api\x20doc)','clientOnOpen','already\x20subscribed\x20to\x20','batch-cancel-orders','getSubscriptions','qJCfk'];a6_0x38fa=function(){return _0x454c1e;};return a6_0x38fa();}import a6_0x475ff1 from'lodash';const {_}=a6_0x475ff1;export class OkxSocket extends PendaxSocket{[a6_0x312383(0x12c)]=['account',a6_0x312383(0x15f),'balance_and_position',a6_0x312383(0x1b1),a6_0x312383(0x19e),a6_0x312383(0x13b)];[a6_0x312383(0x14d)]=[a6_0x312383(0x150),'quotes',a6_0x312383(0x131),a6_0x312383(0x15b),'algo-advance',a6_0x312383(0x159),a6_0x312383(0x1b4),a6_0x312383(0x12d),a6_0x312383(0x161)];['publicBusinessChannels']=[a6_0x312383(0x182),'block-tickers'];['publicChannels']=[a6_0x312383(0x16d),a6_0x312383(0x1ac),'open-interest','candle1D',a6_0x312383(0x147),a6_0x312383(0x1a9),a6_0x312383(0x1b3),a6_0x312383(0x130),a6_0x312383(0x186),a6_0x312383(0x1ba),a6_0x312383(0x15c),a6_0x312383(0x185),a6_0x312383(0x169),'index-tickers',a6_0x312383(0x132)];constructor(_0xe8423f){const _0x41ecbb=a6_0x312383;let _0x5911bc=_0xe8423f||{};if(_0xe8423f[_0x41ecbb(0x18f)]===!![]){let _0x5a4d18='wss://wspap.okx.com:8443/ws/v5/business?brokerId=9999';if(_0xe8423f[_0x41ecbb(0x121)]&&_0xe8423f['isPrivate']==!![])_0x41ecbb(0x154)===_0x41ecbb(0x154)?_0xe8423f[_0x41ecbb(0x18a)]&&_0xe8423f[_0x41ecbb(0x18a)]==_0x41ecbb(0x188)?'iFDQZ'==='iFDQZ'?_0x5911bc[_0x41ecbb(0x19b)]=_0x5a4d18:(this['loggedIn']=!![],_0x51c44a[_0x41ecbb(0x1af)](_0x4159aa||'logged\x20in')):_0x5911bc[_0x41ecbb(0x19b)]='wss://wspap.okx.com:8443/ws/v5/private?brokerId=9999':_0x411f17['op']='amend-order';else{if(_0x41ecbb(0x170)!==_0x41ecbb(0x15e))_0xe8423f['urlType']&&_0xe8423f['urlType']=='business'?_0x5911bc['url']=_0x5a4d18:_0x5911bc[_0x41ecbb(0x19b)]='wss://wspap.okx.com:8443/ws/v5/public?brokerId=9999';else try{_0x43c57c=_0xed3453[_0x41ecbb(0x17a)](_0x1b95e1);}catch(_0x1557a1){if(_0x5b5280[_0x41ecbb(0x127)]()[_0x41ecbb(0x175)]('bytearray(b\x27')>-0x1){const _0x11c8a1=_0x571855[_0x41ecbb(0x127)]()[_0x41ecbb(0x138)](_0x41ecbb(0x195)[_0x41ecbb(0x145)]),_0x4a2b75=_0x11c8a1[_0x41ecbb(0x175)]('\x27)');_0x1cf9de=_0x4a2b75>-0x1?_0x11c8a1[_0x41ecbb(0x138)](0x0,_0x4a2b75):_0x11c8a1;}}}}else{if(_0x41ecbb(0x18b)===_0x41ecbb(0x124))_0x4178c4['log'](_0xbee9b7||_0x41ecbb(0x133));else{let _0x2def99=_0x41ecbb(0x14a);if(_0xe8423f[_0x41ecbb(0x121)]&&_0xe8423f['isPrivate']==!![]){if(_0x41ecbb(0x152)===_0x41ecbb(0x19d)){const _0x4978e0=_0x46d4e2[_0x41ecbb(0x127)]()['slice'](_0x41ecbb(0x195)[_0x41ecbb(0x145)]),_0x4c86e6=_0x4978e0[_0x41ecbb(0x175)]('\x27)');_0x44b7c9=_0x4c86e6>-0x1?_0x4978e0['slice'](0x0,_0x4c86e6):_0x4978e0;}else _0xe8423f[_0x41ecbb(0x18a)]&&_0xe8423f[_0x41ecbb(0x18a)]==_0x41ecbb(0x188)?_0x5911bc[_0x41ecbb(0x19b)]=_0x2def99:_0x5911bc[_0x41ecbb(0x19b)]=_0x41ecbb(0x163);}else _0xe8423f[_0x41ecbb(0x18a)]&&_0xe8423f[_0x41ecbb(0x18a)]==_0x41ecbb(0x188)?_0x5911bc[_0x41ecbb(0x19b)]=_0x2def99:_0x41ecbb(0x174)!==_0x41ecbb(0x174)?_0x19a1db[_0x41ecbb(0x19b)]=_0x4254e6:_0x5911bc[_0x41ecbb(0x19b)]=_0x41ecbb(0x1a0);}}super(_0x5911bc),this[_0x41ecbb(0x149)]()['subclassedSocket']=this,this[_0x41ecbb(0x149)]()['subclassOnOpen']=this[_0x41ecbb(0x17b)],this['getOptions']()['subclassOnMessage']=this[_0x41ecbb(0x120)],this[_0x41ecbb(0x149)]()[_0x41ecbb(0x12e)]=this[_0x41ecbb(0x12e)],this[_0x41ecbb(0x149)]()[_0x41ecbb(0x1bd)]=this['subclassOnClose'];}[a6_0x312383(0x16b)](_0x5c3d9d){const _0x29b47d=a6_0x312383,_0x29706c=a6_0x5188b6['Hmac']('sha256',this[_0x29b47d(0x149)]()[_0x29b47d(0x12a)])['update'](_0x5c3d9d)[_0x29b47d(0x134)](_0x29b47d(0x160));return _0x29706c;}[a6_0x312383(0x157)](){const _0x2f879f=a6_0x312383;if(this[_0x2f879f(0x13c)]==!![])return;const _0x4e91ee=Math[_0x2f879f(0x126)](Date[_0x2f879f(0x128)]()/0x3e8),_0x1f344b=_0x2f879f(0x171),_0x1a804e=_0x2f879f(0x135);let _0x136ad1=_0x4e91ee[_0x2f879f(0x127)]()+_0x1f344b+_0x1a804e;const _0x10f191=this[_0x2f879f(0x16b)](_0x136ad1);let _0x1db91e=this[_0x2f879f(0x149)]();const _0x2df74f={'op':_0x2f879f(0x157),'args':[{'apiKey':_0x1db91e[_0x2f879f(0x13a)],'passphrase':_0x1db91e[_0x2f879f(0x1a4)],'timestamp':_0x4e91ee,'sign':_0x10f191}]};this[_0x2f879f(0x19c)]=![];let _0x851e5f=JSON[_0x2f879f(0x14c)](_0x2df74f);this[_0x2f879f(0x166)](_0x851e5f,_0x4f3c73=>{const _0x31f8b3=_0x2f879f;_0x31f8b3(0x14f)===_0x31f8b3(0x14f)?(this['loggedIn']=!![],console[_0x31f8b3(0x1af)](_0x4f3c73||_0x31f8b3(0x17d))):_0x8d49c3[_0x31f8b3(0x1af)](_0x315249||_0x31f8b3(0x14b));});}[a6_0x312383(0x1b7)](_0x3194cc){const _0x13877d=a6_0x312383;if(!this['loggedIn'])throw{'message':_0x13877d(0x16c)};if(_0x3194cc&&_0x3194cc['id']&&_0x3194cc[_0x13877d(0x181)]&&_0x3194cc[_0x13877d(0x181)][_0x13877d(0x1b2)]==Array&&_0x3194cc[_0x13877d(0x181)][_0x13877d(0x145)]>0x0){_0x3194cc[_0x13877d(0x181)]['length']==0x1?_0x3194cc['op']=_0x13877d(0x17e):_0x3194cc['op']=_0x13877d(0x158);try{this[_0x13877d(0x166)](JSON[_0x13877d(0x14c)](_0x3194cc));}catch(_0x216ce6){if(_0x13877d(0x190)!==_0x13877d(0x190))_0x533dae=_0x43b24b['parse'](_0x83e309),_0x21f5eb['event']&&_0x1ab21d[_0x13877d(0x155)]=='unsubscribed'&&(_0x4966ca=!![],delete _0x27f847['event'],this[_0x13877d(0x1a6)](_0x44bac3,_0x326cea['channel']));else throw{'message':_0x216ce6};}}else throw{'message':_0x13877d(0x13d)};}[a6_0x312383(0x196)](_0x355e4e){const _0x569946=a6_0x312383;if(!this[_0x569946(0x13c)])throw{'message':'please\x20login'};if(_0x355e4e&&_0x355e4e['id']&&_0x355e4e[_0x569946(0x181)]&&_0x355e4e['args'][_0x569946(0x1b2)]==Array&&_0x355e4e[_0x569946(0x16e)][_0x569946(0x145)]>0x0){_0x355e4e[_0x569946(0x181)][_0x569946(0x145)]==0x1?_0x355e4e['op']=_0x569946(0x123):_0x355e4e['op']=_0x569946(0x140);try{_0x569946(0x19f)==='bqzBA'?this[_0x569946(0x166)](JSON[_0x569946(0x14c)](_0x355e4e)):_0x5d4ad1['url']=_0x569946(0x148);}catch(_0x19eb52){throw{'message':_0x19eb52};}}else{if(_0x569946(0x143)===_0x569946(0x143))throw{'message':_0x569946(0x1b0)};else _0x3aad40=!![];}}[a6_0x312383(0x192)](_0x4bab8b){const _0x1c272c=a6_0x312383;if(!this[_0x1c272c(0x13c)])throw{'message':_0x1c272c(0x16c)};if(_0x4bab8b&&_0x4bab8b['id']&&_0x4bab8b[_0x1c272c(0x181)]&&_0x4bab8b['args']['constructor']==Array&&_0x4bab8b['arg'][_0x1c272c(0x145)]>0x0){_0x4bab8b[_0x1c272c(0x181)][_0x1c272c(0x145)]==0x1?_0x4bab8b['op']=_0x1c272c(0x17f):_0x4bab8b['op']=_0x1c272c(0x179);try{if(_0x1c272c(0x12b)!==_0x1c272c(0x12b))for(const _0x1e5f23 of _0x398a86[_0x1c272c(0x181)]){const _0x1c2d5c=_0x1e5f23['instId']?'_'+_0x1e5f23[_0x1c272c(0x151)]:'',_0x254d24=_0x1e5f23[_0x1c272c(0x125)]?'_'+_0x1e5f23[_0x1c272c(0x125)]:'',_0x37a508=_0x1e5f23[_0x1c272c(0x15a)]?'_'+_0x1e5f23['uly']:'',_0x4a5ddb=_0x1e5f23['channel']+_0x1c2d5c+_0x254d24+_0x37a508;let _0x2c318e=this[_0x1c272c(0x141)]()[_0x4a5ddb];if(_0x2c318e){let _0x9e9ad0=_0x2c318e[_0x1c272c(0x181)];_0x9e9ad0['op']='unsubscribe',this[_0x1c272c(0x166)](_0x37404f[_0x1c272c(0x14c)](_0x9e9ad0));}}else this[_0x1c272c(0x166)](JSON[_0x1c272c(0x14c)](_0x4bab8b));}catch(_0x3d4531){throw{'message':_0x3d4531};}}else throw{'message':_0x1c272c(0x13d)};}['subscribe'](_0x3bef3d){const _0x4a7a31=a6_0x312383;if(_0x3bef3d&&_0x3bef3d['args']&&_0x3bef3d['args']['constructor']==Array){if('YibQn'!==_0x4a7a31(0x187))_0x1d1be9[_0x4a7a31(0x1af)](_0x53a806||'derived\x20onOpen');else for(const _0x5857c0 of _0x3bef3d[_0x4a7a31(0x181)]){if(_0x4a7a31(0x15d)===_0x4a7a31(0x137)){if(_0x50db36[_0x4a7a31(0x127)]()['indexOf'](_0x4a7a31(0x195))>-0x1){const _0x207a89=_0x2ec08a[_0x4a7a31(0x127)]()[_0x4a7a31(0x138)]('bytearray(b\x27'[_0x4a7a31(0x145)]),_0x2e2640=_0x207a89[_0x4a7a31(0x175)]('\x27)');_0x46f9b6=_0x2e2640>-0x1?_0x207a89['slice'](0x0,_0x2e2640):_0x207a89;}}else{let _0x499d2f={'op':'subscribe','args':[_0x5857c0]};const _0x5f203a=_0x5857c0[_0x4a7a31(0x151)]?'_'+_0x5857c0[_0x4a7a31(0x151)]:'',_0x143a5c=_0x5857c0[_0x4a7a31(0x125)]?'_'+_0x5857c0['instType']:'',_0x372e22=_0x5857c0['uly']?'_'+_0x5857c0[_0x4a7a31(0x15a)]:'',_0x389448=_0x5857c0[_0x4a7a31(0x1bb)]+_0x5f203a+_0x143a5c+_0x372e22;this['validateSubscription'](_0x389448,_0x499d2f,this['publicChannels'],this[_0x4a7a31(0x12c)],this['privateBusinessChannels']);try{this[_0x4a7a31(0x166)](JSON['stringify'](_0x499d2f));}catch(_0x3159f8){throw{'message':_0x3159f8};}}}}else{if(_0x4a7a31(0x162)!==_0x4a7a31(0x1a3))throw{'message':_0x4a7a31(0x173)};else throw{'message':_0x455874};}}['unsubscribe'](_0x4efe45){const _0x239fdc=a6_0x312383;if(_0x4efe45&&_0x4efe45[_0x239fdc(0x181)]&&_0x4efe45[_0x239fdc(0x181)]['constructor']==Array)for(const _0x450bb2 of _0x4efe45[_0x239fdc(0x181)]){const _0x2d25ee=_0x450bb2[_0x239fdc(0x151)]?'_'+_0x450bb2['instId']:'',_0x220d96=_0x450bb2[_0x239fdc(0x125)]?'_'+_0x450bb2[_0x239fdc(0x125)]:'',_0x200216=_0x450bb2['uly']?'_'+_0x450bb2[_0x239fdc(0x15a)]:'',_0x5ed063=_0x450bb2[_0x239fdc(0x1bb)]+_0x2d25ee+_0x220d96+_0x200216;let _0x386aba=this[_0x239fdc(0x141)]()[_0x5ed063];if(_0x386aba){let _0x313934=_0x386aba[_0x239fdc(0x181)];_0x313934['op']='unsubscribe',this['send'](JSON['stringify'](_0x313934));}}}[a6_0x312383(0x17b)](_0x25a0af){const _0x157967=a6_0x312383;_0x25a0af[_0x157967(0x13e)]?_0x25a0af[_0x157967(0x13e)](_0x25a0af):console[_0x157967(0x1af)](msg||_0x157967(0x1b9));}[a6_0x312383(0x120)](_0xc1f07c,_0x19d63d,_0x35e1ef){const _0x52a2bf=a6_0x312383;let _0x1d877c,_0x36d068=![];if(_[_0x52a2bf(0x1bc)](_0x19d63d)){_0x1d877c=JSON['parse'](_0x19d63d);if(_0x1d877c['event']&&_0x1d877c['event']==_0x52a2bf(0x165)){if('QdUky'!==_0x52a2bf(0x180))throw{'message':_0x52a2bf(0x1b0)};else _0x36d068=!![],delete _0x1d877c['event'],this[_0x52a2bf(0x1a6)](_0xc1f07c,_0x1d877c[_0x52a2bf(0x1bb)]);}}else _0x1d877c=_0x19d63d;if(_0xc1f07c[_0x52a2bf(0x149)]()[_0x52a2bf(0x176)]){if(_0x52a2bf(0x144)!==_0x52a2bf(0x193)){if(_0x36d068==!![]){if('ynDwJ'!==_0x52a2bf(0x183)){if(_0x44060e[_0x52a2bf(0x127)]()[_0x52a2bf(0x175)](_0x52a2bf(0x195))>-0x1){const _0x414aea=_0x5ac0bb['toString']()[_0x52a2bf(0x138)]('bytearray(b\x27'['length']),_0x5d7c0f=_0x414aea['indexOf']('\x27)');_0x3152db=_0x5d7c0f>-0x1?_0x414aea['slice'](0x0,_0x5d7c0f):_0x414aea;}}else _0x1d877c={'event':_0x52a2bf(0x165),..._0x1d877c};}_0xc1f07c[_0x52a2bf(0x149)]()['clientOnMessage'](_0x35e1ef,_0x1d877c);}else _0x54b716=!![],delete _0x22bb5b[_0x52a2bf(0x155)],this[_0x52a2bf(0x1a6)](_0x3559f2,_0x36bf48[_0x52a2bf(0x1bb)]);}else{if(_0x52a2bf(0x167)===_0x52a2bf(0x167))console[_0x52a2bf(0x1af)](_0x19d63d||_0x52a2bf(0x14b));else{let _0x1fb86c=_0x2dc47[_0x52a2bf(0x122)];if(_0x1fb86c==_0x6ab90e)throw'already\x20subscribed\x20to\x20'+_0x4f0ceb[_0x52a2bf(0x14c)](_0x2ce10c)+_0x52a2bf(0x189)+_0x4bfed2['name']+')';}}}[a6_0x312383(0x12e)](_0x4a9491,_0x3600f6){const _0x498d66=a6_0x312383;let _0x2df08f;if(_['isObject'](_0x4a9491)){if(_0x498d66(0x194)!==_0x498d66(0x17c))try{_0x498d66(0x191)!=='XdvNi'?_0x2d4649=_0x3ac335[_0x498d66(0x17a)](_0x1f508a):_0x2df08f=JSON['parse'](_0x4a9491);}catch(_0x391d89){if(_0x498d66(0x153)===_0x498d66(0x153)){if(_0x4a9491[_0x498d66(0x127)]()[_0x498d66(0x175)](_0x498d66(0x195))>-0x1){const _0xbd18d8=_0x4a9491[_0x498d66(0x127)]()[_0x498d66(0x138)](_0x498d66(0x195)[_0x498d66(0x145)]),_0x1838b7=_0xbd18d8['indexOf']('\x27)');_0x2df08f=_0x1838b7>-0x1?_0xbd18d8[_0x498d66(0x138)](0x0,_0x1838b7):_0xbd18d8;}}else this[_0x498d66(0x166)](_0x3a105d['stringify'](_0x4608af));}else _0x54b070[_0x498d66(0x18a)]&&_0x3e78e6[_0x498d66(0x18a)]=='business'?_0x363f4b['url']=_0x1b2208:_0x25aa6d[_0x498d66(0x19b)]='wss://wspap.okx.com:8443/ws/v5/public?brokerId=9999';}else{if(_0x498d66(0x1a2)==='NFYus')_0x2df08f=_0x4a9491;else{for(const [_0x23bad5,_0x2d0d63]of _0x32dddf[_0x498d66(0x1a5)](this[_0x498d66(0x16f)])){let _0x51191c=_0x2d0d63[_0x498d66(0x122)];if(_0x51191c==_0x49240b)throw _0x498d66(0x13f)+_0x426bb6[_0x498d66(0x14c)](_0x57edbb)+_0x498d66(0x189)+_0x2d0d63['name']+')';}this['subscriptions'][_0x4135e9]={'args':_0x9ad515,'subArgsHash':_0x42cf86};}}if(_0x3600f6[_0x498d66(0x1a7)])_0x3600f6['clientOnError'](_0x3600f6,_0x2df08f);else{if('wsmYk'!==_0x498d66(0x139))console[_0x498d66(0x1af)](_0x4a9491||_0x498d66(0x133));else{let _0x3f1290={'op':_0x498d66(0x1b6),'args':[_0x4b7836]};const _0x138f49=_0x55c9f3[_0x498d66(0x151)]?'_'+_0x5e691d[_0x498d66(0x151)]:'',_0x27c814=_0x95c9a[_0x498d66(0x125)]?'_'+_0x315679['instType']:'',_0x53cba3=_0x5046c3[_0x498d66(0x15a)]?'_'+_0x25a9a5[_0x498d66(0x15a)]:'',_0xd60fc7=_0x2db621[_0x498d66(0x1bb)]+_0x138f49+_0x27c814+_0x53cba3;this[_0x498d66(0x177)](_0xd60fc7,_0x3f1290,this[_0x498d66(0x1b5)],this[_0x498d66(0x12c)],this['privateBusinessChannels']);try{this[_0x498d66(0x166)](_0x4cedac[_0x498d66(0x14c)](_0x3f1290));}catch(_0x5580fb){throw{'message':_0x5580fb};}}}}[a6_0x312383(0x1bd)](_0x2008f6,_0x3da652,_0x1b905d){const _0x32cc48=a6_0x312383;let _0x46e315;if(_['isObject'](_0x3da652))try{_0x46e315=JSON[_0x32cc48(0x17a)](_0x3da652);}catch(_0x3f6d25){if(_0x32cc48(0x19a)===_0x32cc48(0x19a)){if(_0x3da652[_0x32cc48(0x127)]()[_0x32cc48(0x175)](_0x32cc48(0x195))>-0x1){const _0xadf8e9=_0x3da652['toString']()['slice'](_0x32cc48(0x195)['length']),_0x34fc97=_0xadf8e9[_0x32cc48(0x175)]('\x27)');_0x46e315=_0x34fc97>-0x1?_0xadf8e9[_0x32cc48(0x138)](0x0,_0x34fc97):_0xadf8e9;}}else _0x25f6c2=_0x2a8c73;}else _0x46e315=_0x3da652;_0x1b905d[_0x32cc48(0x198)]?_0x1b905d[_0x32cc48(0x198)](_0x2008f6,_0x46e315,_0x1b905d):console[_0x32cc48(0x1af)](_0x3da652||_0x32cc48(0x197));}[a6_0x312383(0x177)](_0x5e363d,_0x35bb6d,_0x15996b,_0x32e4ce,_0xe772e8){const _0x5b7133=a6_0x312383;if(!_0x5e363d||_0x5e363d==''){if(_0x5b7133(0x1aa)!==_0x5b7133(0x1aa))return;else throw _0x5b7133(0x18c);}let _0x4078c5=![];(_0x32e4ce['includes'](_0x35bb6d['channel'])||_0xe772e8[_0x5b7133(0x199)](_0x35bb6d['channel']))&&(_0x5b7133(0x168)!==_0x5b7133(0x1b8)?_0x4078c5=!![]:this[_0x5b7133(0x166)](_0xf9b6aa['stringify'](_0x2233cc)));if(_0x4078c5&&!this[_0x5b7133(0x13c)]){if(_0x5b7133(0x136)===_0x5b7133(0x136))throw{'message':_0x5b7133(0x1ab)};else _0x5f3588['op']=_0x5b7133(0x123);}let _0x39128f=this[_0x5b7133(0x14e)](_0x35bb6d);if(!this[_0x5b7133(0x16f)][_0x5e363d]){if('tThQG'!==_0x5b7133(0x16a))this[_0x5b7133(0x166)](_0x340609[_0x5b7133(0x14c)](_0xc00be9));else{for(const [_0x3d5374,_0x2b2681]of Object['entries'](this[_0x5b7133(0x16f)])){let _0x26b5a4=_0x2b2681[_0x5b7133(0x122)];if(_0x26b5a4==_0x39128f)throw _0x5b7133(0x13f)+JSON[_0x5b7133(0x14c)](_0x35bb6d)+_0x5b7133(0x189)+_0x2b2681[_0x5b7133(0x156)]+')';}this[_0x5b7133(0x16f)][_0x5e363d]={'args':_0x35bb6d,'subArgsHash':_0x39128f};}}else{if(_0x5b7133(0x18d)===_0x5b7133(0x18d))throw _0x5b7133(0x1ad);else _0x48eca4[_0x5b7133(0x1a7)](_0x4acb62,_0x4a3503);}return _0x4078c5;}[a6_0x312383(0x12f)](_0x20afd4,_0x5f22c8){const _0x282f21=a6_0x312383;let _0x8e2b57=_0x20afd4[_0x282f21(0x14e)](_0x5f22c8);for(const [_0x37d4dd,_0x5af54c]of Object[_0x282f21(0x1a5)](_0x20afd4[_0x282f21(0x16f)])){if(_0x282f21(0x142)!=='qJCfk'){if(this[_0x282f21(0x13c)]==!![])return;const _0x2dede3=_0x1d3fc9['floor'](_0x4d5aab['now']()/0x3e8),_0x313f14=_0x282f21(0x171),_0x542dc0='/users/self/verify';let _0x36c3d6=_0x2dede3[_0x282f21(0x127)]()+_0x313f14+_0x542dc0;const _0xec6283=this[_0x282f21(0x16b)](_0x36c3d6);let _0x44ac17=this[_0x282f21(0x149)]();const _0xfb04f0={'op':'login','args':[{'apiKey':_0x44ac17[_0x282f21(0x13a)],'passphrase':_0x44ac17[_0x282f21(0x1a4)],'timestamp':_0x2dede3,'sign':_0xec6283}]};this['responseReceived']=![];let _0x440c4f=_0x1da26e['stringify'](_0xfb04f0);this[_0x282f21(0x166)](_0x440c4f,_0x2ead3e=>{const _0x309526=_0x282f21;this['loggedIn']=!![],_0x367b6c['log'](_0x2ead3e||_0x309526(0x17d));});}else{let _0x4ce88e=_0x5af54c[_0x282f21(0x122)];if(_0x4ce88e==_0x8e2b57){if(_0x282f21(0x164)==='FZKGJ')throw{'message':_0x282f21(0x1ab)};else{delete _0x20afd4['subscriptions'][_0x37d4dd];break;}}}}}['removeSubscriptionHavingChannel'](_0x274f70,_0x1540f1){const _0x2bd678=a6_0x312383;for(const [_0x8d8d6c,_0x110d84]of Object[_0x2bd678(0x1a5)](_0x274f70[_0x2bd678(0x16f)])){let _0x457b8b=_0x110d84['args'];if(_0x457b8b[_0x2bd678(0x1bb)]&&_0x457b8b[_0x2bd678(0x1bb)]==_0x1540f1){delete _0x274f70[_0x2bd678(0x16f)][_0x8d8d6c];break;}}}}

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