@compendiumfi/pendax
Version:
connector for centralized cryptocurrency exchanges
1 lines • 155 kB
JavaScript
function a10_0x10d3(_0x1ce3c9,_0x334fcb){const _0x2d4ef0=a10_0x2d4e();return a10_0x10d3=function(_0x10d330,_0x3eaa2d){_0x10d330=_0x10d330-0x18d;let _0x29585a=_0x2d4ef0[_0x10d330];return _0x29585a;},a10_0x10d3(_0x1ce3c9,_0x334fcb);}const a10_0x1cfb44=a10_0x10d3;(function(_0x16d07b,_0xb047e1){const _0x4af009=a10_0x10d3,_0x47d461=_0x16d07b();while(!![]){try{const _0x154229=-parseInt(_0x4af009(0x372))/0x1+-parseInt(_0x4af009(0x490))/0x2+parseInt(_0x4af009(0x3f0))/0x3+parseInt(_0x4af009(0x33f))/0x4*(-parseInt(_0x4af009(0x300))/0x5)+parseInt(_0x4af009(0x29d))/0x6+parseInt(_0x4af009(0x2fc))/0x7+parseInt(_0x4af009(0x43b))/0x8;if(_0x154229===_0xb047e1)break;else _0x47d461['push'](_0x47d461['shift']());}catch(_0x3f09a6){_0x47d461['push'](_0x47d461['shift']());}}}(a10_0x2d4e,0xd20ff));import a10_0x16392a from'axios';import a10_0x3568e1 from'crypto';import{OkxSocket}from'../sockets/okxsocket.js';import a10_0x398310 from'short-unique-id';import a10_0x23b98d from'crypto-js';export class Okx{[a10_0x1cfb44(0x4b0)]=new Array();['ky']=a10_0x1cfb44(0x39c);['i']=a10_0x1cfb44(0x222);[a10_0x1cfb44(0x285)]={};[a10_0x1cfb44(0x2aa)]=![];[a10_0x1cfb44(0x41a)]=![];[a10_0x1cfb44(0x37f)]=![];['testnet']=![];constructor(_0x2ffc5a){const _0xfcb4db=a10_0x1cfb44;this['url']='https://www.okx.com',this[_0xfcb4db(0x1d3)]=_0x2ffc5a['testnet']===!![],this[_0xfcb4db(0x413)]=_0x2ffc5a[_0xfcb4db(0x413)]==undefined?!![]:_0x2ffc5a[_0xfcb4db(0x413)],this[_0xfcb4db(0x3b4)]=_0x2ffc5a[_0xfcb4db(0x277)][_0xfcb4db(0x3b3)]==undefined?'okx':_0x2ffc5a[_0xfcb4db(0x277)][_0xfcb4db(0x3b3)],this[_0xfcb4db(0x347)]=_0x2ffc5a[_0xfcb4db(0x277)]['id'],this[_0xfcb4db(0x3bd)]=_0x2ffc5a[_0xfcb4db(0x3bd)];if(this[_0xfcb4db(0x413)]){if(!_0x2ffc5a[_0xfcb4db(0x3fa)]||!_0x2ffc5a[_0xfcb4db(0x1ca)]||!_0x2ffc5a[_0xfcb4db(0x423)]||_0x2ffc5a[_0xfcb4db(0x3fa)]==''||_0x2ffc5a['secret']==''||_0x2ffc5a[_0xfcb4db(0x423)]==''){if('LdIXt'===_0xfcb4db(0x2f1))_0x29da42[_0xfcb4db(0x320)](_0x2bb857+'='+_0x3bbc9a[_0xd91fa]);else throw _0xfcb4db(0x3ba);}this['apiKey']=_0x2ffc5a['key'],this[_0xfcb4db(0x2d9)]=_0x2ffc5a[_0xfcb4db(0x1ca)],this[_0xfcb4db(0x2b0)]=_0x2ffc5a[_0xfcb4db(0x358)]==undefined,this['subaccount']=this[_0xfcb4db(0x2b0)]?'':_0x2ffc5a['subaccount'],this[_0xfcb4db(0x423)]=_0x2ffc5a[_0xfcb4db(0x423)];}this[_0xfcb4db(0x442)]=_0x2ffc5a[_0xfcb4db(0x26e)]?_0x2ffc5a[_0xfcb4db(0x26e)]:_0xfcb4db(0x2ff),this['useProxy']=![];if(_0x2ffc5a[_0xfcb4db(0x2ad)]){if(_0xfcb4db(0x493)==='pazSe'){if(_0x2ffc5a[_0xfcb4db(0x3be)]&&_0x2ffc5a[_0xfcb4db(0x3be)]!=''){this[_0xfcb4db(0x2ad)]=!![],this[_0xfcb4db(0x3be)]=this[_0xfcb4db(0x434)],this[_0xfcb4db(0x3be)]=_0x2ffc5a[_0xfcb4db(0x3be)];if(_0x2ffc5a['proxyPort'])this[_0xfcb4db(0x280)]=_0x2ffc5a[_0xfcb4db(0x280)];else{if(_0xfcb4db(0x340)!=='YiKcQ')_0x3f338c[_0xfcb4db(0x320)](_0x214124+'='+_0x164f00[_0x53807c]);else throw'Proxy\x20port\x20required';}}_0x2ffc5a[_0xfcb4db(0x469)]&&(_0xfcb4db(0x233)===_0xfcb4db(0x233)?this['proxyUser']=_0x2ffc5a['proxyUser']:this['doLog']({'send':_0x1cb0e0,'level':_0xfcb4db(0x476),'receive':{'code':_0x2f07e8[_0xfcb4db(0x1ae)][_0xfcb4db(0x487)],'data':_0x4f1032[_0xfcb4db(0x1c6)](_0x4ec775[_0xfcb4db(0x1ae)][_0xfcb4db(0x1ae)]),'msg':_0x2357ac['data'][_0xfcb4db(0x461)]}})),_0x2ffc5a['proxyPass']&&(this[_0xfcb4db(0x37a)]=_0x2ffc5a[_0xfcb4db(0x37a)]),_0x2ffc5a['proxyAuth']===!![]?this[_0xfcb4db(0x48d)]=!![]:this[_0xfcb4db(0x48d)]=![];}else _0x19b26b[_0xfcb4db(0x320)](_0x1809d8+'='+_0x1c0808[_0x1475d8]);}this['br']=_0xfcb4db(0x2bd),this[_0xfcb4db(0x4b0)][_0xfcb4db(0x320)]('getMarket',_0xfcb4db(0x455),_0xfcb4db(0x37d),_0xfcb4db(0x3d4),_0xfcb4db(0x1f9),_0xfcb4db(0x1f0),_0xfcb4db(0x1c8),_0xfcb4db(0x3d0),_0xfcb4db(0x1c2),_0xfcb4db(0x2b9),_0xfcb4db(0x232),_0xfcb4db(0x2e3),_0xfcb4db(0x2d1),_0xfcb4db(0x302),_0xfcb4db(0x2fe),_0xfcb4db(0x28c),_0xfcb4db(0x3bc),'getBlockTickers',_0xfcb4db(0x226),_0xfcb4db(0x39a),_0xfcb4db(0x218),'getDeliveryAndRequestHistory',_0xfcb4db(0x489),_0xfcb4db(0x4a0),_0xfcb4db(0x1d1),_0xfcb4db(0x241),_0xfcb4db(0x1b4),_0xfcb4db(0x3ee),_0xfcb4db(0x375),'getServerTime',_0xfcb4db(0x402),_0xfcb4db(0x263),_0xfcb4db(0x3f1),_0xfcb4db(0x3c8),_0xfcb4db(0x2cb),_0xfcb4db(0x437),'getInsuranceFund',_0xfcb4db(0x1d6),'getSupportCoin',_0xfcb4db(0x1cc),_0xfcb4db(0x32d),'getLongShortRatio','getContractsOiAndVolume','getOptionsOiAndVolume',_0xfcb4db(0x2ac),_0xfcb4db(0x405),_0xfcb4db(0x399),_0xfcb4db(0x30b),_0xfcb4db(0x388),_0xfcb4db(0x1ab),'fundingGetPublicBorrowHistory',_0xfcb4db(0x221),_0xfcb4db(0x2ba));}[a10_0x1cfb44(0x3a1)]=_0x4c1ac1=>{const _0x10f599=a10_0x1cfb44;if(_0x4c1ac1==null)return _0x10f599(0x2d5)!==_0x10f599(0x2d5)?_0xf101ea:undefined;const _0xade2be=a10_0x23b98d[_0x10f599(0x4a2)][_0x10f599(0x23a)][_0x10f599(0x1cf)](this['ky']),_0x49c7f1=a10_0x23b98d[_0x10f599(0x4a2)]['Base64'][_0x10f599(0x1cf)](this['i']);return a10_0x23b98d[_0x10f599(0x428)][_0x10f599(0x32f)](_0x4c1ac1,_0xade2be,{'iv':_0x49c7f1})['toString'](a10_0x23b98d[_0x10f599(0x4a2)][_0x10f599(0x32b)]);};async[a10_0x1cfb44(0x1df)](_0x286f5d,_0x474c48,_0x491c93){const _0x3415e7=a10_0x1cfb44;let _0xb6f995=new Date()[_0x3415e7(0x324)](),_0x139b7e=_0x3415e7(0x454),_0x2c5f9c={'Accept':_0x139b7e,'Content-Type':_0x139b7e,'OK-ACCESS-KEY':this[_0x3415e7(0x488)],'OK-ACCESS-TIMESTAMP':_0xb6f995,'OK-ACCESS-PASSPHRASE':this['passphrase'],'OK-ACCESS-SIGN':this[_0x3415e7(0x330)](_0xb6f995,_0x286f5d,_0x474c48,_0x491c93,this['apiSecret'])};return(this[_0x3415e7(0x1d3)]===!![]||this[_0x3415e7(0x1d3)]===_0x3415e7(0x1db))&&(_0x3415e7(0x268)===_0x3415e7(0x268)?_0x2c5f9c['x-simulated-trading']='1':_0x575d10[_0x3415e7(0x320)](_0x4877c6+'='+_0x3a1276[_0x38ab3c])),_0x2c5f9c;}['createSignaturePrehash'](_0x44c4e5,_0x13828d,_0x169d85,_0x57ca17,_0x38d2a2){const _0x37f23f=a10_0x1cfb44;let _0x1a3bbf=_0x57ca17?JSON[_0x37f23f(0x1c6)](_0x57ca17):undefined,_0x2e35ff=_0x44c4e5+_0x13828d+_0x169d85+(!_0x1a3bbf||_0x1a3bbf===''?'':_0x1a3bbf);return a10_0x3568e1['Hmac'](_0x37f23f(0x359),_0x38d2a2)[_0x37f23f(0x346)](_0x2e35ff)['digest'](_0x37f23f(0x223));}[a10_0x1cfb44(0x1da)](_0x2ca5d9){const _0x242a2a=a10_0x1cfb44;if(this[_0x242a2a(0x2ad)]){let _0x4062d9={'protocol':_0x242a2a(0x3e8),'host':this[_0x242a2a(0x3be)],'port':this['proxyPort']};this[_0x242a2a(0x48d)]===!![]&&(_0x242a2a(0x1fe)==='gdaqs'?_0x39ec0e==0x0?_0x164d1a=_0x1726b0+_0xc47ecf['tokens'][_0x52f2ee]:_0xb9333a=_0x11da6d+','+_0x4930d0[_0x242a2a(0x2ef)][_0x17e0f4]:_0x4062d9[_0x242a2a(0x46a)]={'username':this[_0x242a2a(0x469)],'password':this[_0x242a2a(0x37a)]}),_0x2ca5d9[_0x242a2a(0x3be)]=_0x4062d9;}return _0x2ca5d9;}async[a10_0x1cfb44(0x20a)](_0x481064,_0x3cb03b,_0x265bf2,_0x52f8ea){const _0x652063=a10_0x1cfb44;let _0x3355e4={'baseURL':this[_0x652063(0x434)],'url':_0x265bf2,'method':_0x652063(0x352),'headers':_0x481064,'data':_0x3cb03b},_0x159ed6;_0x3355e4=this[_0x652063(0x1da)](_0x3355e4);try{if(_0x652063(0x266)==='uVrJk')throw{'message':'ccy\x20and\x20amt\x20are\x20required\x20params'};else{const _0x29f0e0=await a10_0x16392a(_0x3355e4);if(!_0x29f0e0){if(_0x652063(0x3a7)===_0x652063(0x3cc))throw{'message':_0x652063(0x22c)};else{this[_0x652063(0x41a)]==!![]&&doLog(_0x652063(0x229));throw _0x652063(0x229);}}if(_0x52f8ea&&['1','2','3','4','5','6']['includes'](_0x52f8ea))switch(_0x52f8ea){case'1':this[_0x652063(0x41a)]==!![]&&(_0x652063(0x288)!==_0x652063(0x1b6)?this['doLog']({'send':_0x3355e4,'level':'1','receive':{'code':_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x487)],'data':JSON[_0x652063(0x1c6)](_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x1ae)]),'msg':_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x461)]}}):(_0x1039da=_0x1b86b3+(_0x2d773d=='?'?'':'&'),_0x32da32=_0x1a98ef+'instId='+_0x4d5f85['instId']));return{'code':_0x29f0e0[_0x652063(0x1ae)]['code'],'data':_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x1ae)],'msg':_0x29f0e0[_0x652063(0x1ae)]['msg']};break;case'2':this[_0x652063(0x41a)]==!![]&&this[_0x652063(0x1b2)]({'send':_0x3355e4,'level':'2','receive':_0x29f0e0[_0x652063(0x1ae)]});return _0x29f0e0['data'];break;case'3':this[_0x652063(0x41a)]==!![]&&this[_0x652063(0x1b2)]({'send':_0x3355e4,'level':'3','receive':_0x29f0e0});return _0x29f0e0;break;case'4':this[_0x652063(0x41a)]==!![]&&this[_0x652063(0x1b2)]({'send':_0x3355e4,'level':'4','receive':{'result':{'code':_0x29f0e0['data'][_0x652063(0x487)],'data':JSON[_0x652063(0x1c6)](_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x1ae)]),'msg':_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x461)]},'body':_0x3cb03b}});return{'result':{'code':_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x487)],'data':_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x1ae)],'msg':_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x461)]},'body':_0x3cb03b};break;case'5':this[_0x652063(0x41a)]==!![]&&this[_0x652063(0x1b2)]({'send':_0x3355e4,'level':'5','receive':{'result':_0x29f0e0[_0x652063(0x1ae)],'body':_0x3cb03b}});return{'result':_0x29f0e0['data'],'body':_0x3cb03b};break;case'6':this[_0x652063(0x41a)]==!![]&&this['doLog']({'send':_0x3355e4,'level':'6','receive':{'result':_0x29f0e0,'body':_0x3cb03b}});return{'result':_0x29f0e0,'body':_0x3cb03b};break;}if(this['logPosts']==!![]){if(_0x652063(0x305)!==_0x652063(0x305))throw{'message':_0x652063(0x47e)};else this[_0x652063(0x1b2)]({'send':_0x3355e4,'level':_0x652063(0x476),'receive':{'code':_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x487)],'data':JSON[_0x652063(0x1c6)](_0x29f0e0['data'][_0x652063(0x1ae)]),'msg':_0x29f0e0['data'][_0x652063(0x461)]}});}return{'code':_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x487)],'data':_0x29f0e0['data'][_0x652063(0x1ae)],'msg':_0x29f0e0[_0x652063(0x1ae)][_0x652063(0x461)]};}}catch(_0x5db2d8){if('PzTJq'===_0x652063(0x219))this['doLog']({'send':_0x9dc960,'level':'3','receive':_0x3b6279});else return _0x5db2d8;}}[a10_0x1cfb44(0x1b2)](_0x5ebbf5){console['log'](_0x5ebbf5);}async[a10_0x1cfb44(0x333)](_0x332db8,_0x101812,_0x497326){const _0x225ba6=a10_0x1cfb44;let _0x4073d3={'baseURL':this['url'],'url':_0x101812,'method':_0x225ba6(0x1de),'headers':_0x332db8||{'X-Custom-Header':'custom-value'}};_0x4073d3=this[_0x225ba6(0x1da)](_0x4073d3);try{const _0x5f19ed=await a10_0x16392a(_0x4073d3);if(!_0x5f19ed){this['logGets']==!![]&&('WhHNs'===_0x225ba6(0x4ab)?this['doLog']({'send':_0x24ffbd,'level':'2','receive':_0x3c4eda[_0x225ba6(0x1ae)]}):doLog(_0x225ba6(0x229)));throw _0x225ba6(0x229);}if(_0x497326&&['1','2','3'][_0x225ba6(0x3f9)](_0x497326))switch(_0x497326){case'1':this[_0x225ba6(0x2aa)]==!![]&&this[_0x225ba6(0x1b2)]({'send':_0x4073d3,'level':'1','receive':{'code':_0x5f19ed['data'][_0x225ba6(0x487)],'data':JSON[_0x225ba6(0x1c6)](_0x5f19ed['data'][_0x225ba6(0x1ae)]),'msg':_0x5f19ed['data'][_0x225ba6(0x461)]}});return{'code':_0x5f19ed['data'][_0x225ba6(0x487)],'data':_0x5f19ed[_0x225ba6(0x1ae)][_0x225ba6(0x1ae)],'msg':_0x5f19ed[_0x225ba6(0x1ae)]['msg']};break;case'2':this['logGets']==!![]&&(_0x225ba6(0x390)!==_0x225ba6(0x390)?_0x1434e0[_0x225ba6(0x320)](_0x1fba00+'='+_0x51c27a[_0x1743f8]):this[_0x225ba6(0x1b2)]({'send':_0x4073d3,'level':'2','receive':_0x5f19ed[_0x225ba6(0x1ae)]}));return _0x5f19ed[_0x225ba6(0x1ae)];break;case'3':this[_0x225ba6(0x2aa)]==!![]&&this[_0x225ba6(0x1b2)]({'send':_0x4073d3,'level':'3','receive':_0x5f19ed});return _0x5f19ed;break;}return this['logGets']==!![]&&this[_0x225ba6(0x1b2)]({'send':_0x4073d3,'level':'default','receive':{'code':_0x5f19ed[_0x225ba6(0x1ae)]['code'],'data':JSON['stringify'](_0x5f19ed[_0x225ba6(0x1ae)][_0x225ba6(0x1ae)]),'msg':_0x5f19ed[_0x225ba6(0x1ae)][_0x225ba6(0x461)]}}),{'code':_0x5f19ed[_0x225ba6(0x1ae)]['code'],'data':_0x5f19ed['data'][_0x225ba6(0x1ae)],'msg':_0x5f19ed[_0x225ba6(0x1ae)][_0x225ba6(0x461)]};}catch(_0x2fb834){return _0x2fb834;}}async[a10_0x1cfb44(0x289)](_0x278066,_0x50b2e4,_0x36f0e4,_0x2e45f0){const _0x15325f=a10_0x1cfb44;let _0x2a033e={'baseURL':this[_0x15325f(0x434)],'url':_0x36f0e4,'method':_0x15325f(0x1e1),'headers':_0x278066,'data':_0x50b2e4};const _0x4edcfb=_0x50b2e4?JSON[_0x15325f(0x1c6)](_0x50b2e4):'';_0x2a033e=this[_0x15325f(0x1da)](_0x2a033e);let _0x4895fc;if(_0x2a033e[_0x15325f(0x3be)]){const _0x2a2fd2=new HttpProxyAgent({'proxy':_0x15325f(0x1fd)+_0x2a033e['proxy'][_0x15325f(0x46a)][_0x15325f(0x1cd)]+':'+_0x2a033e[_0x15325f(0x3be)][_0x15325f(0x46a)]['password']+'@'+_0x2a033e[_0x15325f(0x3be)][_0x15325f(0x194)]+':'+_0x2a033e[_0x15325f(0x3be)][_0x15325f(0x46d)]}),_0x49d3e8=new HttpsProxyAgent({'proxy':'https://'+_0x2a033e['proxy'][_0x15325f(0x46a)][_0x15325f(0x1cd)]+':'+_0x2a033e[_0x15325f(0x3be)][_0x15325f(0x46a)]['password']+'@'+_0x2a033e[_0x15325f(0x3be)][_0x15325f(0x194)]+':'+_0x2a033e[_0x15325f(0x3be)][_0x15325f(0x46d)]});_0x4895fc=a10_0x16392a[_0x15325f(0x42e)]({'httpAgent':_0x2a2fd2,'httpsAgent':_0x49d3e8});}try{const _0x42594e=await _0x4895fc(_0x2a033e);if(!_0x42594e){if(_0x15325f(0x2dd)===_0x15325f(0x2dd)){this[_0x15325f(0x37f)]==!![]&&doLog(_0x15325f(0x229));throw _0x15325f(0x229);}else throw{'message':_0x15325f(0x2bb)};}if(_0x2e45f0&&['1','2','3','4','5','6']['includes'](_0x2e45f0))switch(_0x2e45f0){case'1':this[_0x15325f(0x37f)]==!![]&&this[_0x15325f(0x1b2)]({'send':_0x2a033e,'level':'1','receive':{'code':_0x42594e[_0x15325f(0x1ae)]['code'],'data':JSON[_0x15325f(0x1c6)](_0x42594e['data'][_0x15325f(0x1ae)]),'msg':_0x42594e[_0x15325f(0x1ae)][_0x15325f(0x461)]}});return{'code':_0x42594e['data'][_0x15325f(0x487)],'data':_0x42594e[_0x15325f(0x1ae)]['data'],'msg':_0x42594e[_0x15325f(0x1ae)][_0x15325f(0x461)]};break;case'2':if(this[_0x15325f(0x37f)]==!![]){if(_0x15325f(0x23e)!==_0x15325f(0x23e))throw{'message':_0x15325f(0x470)};else this['doLog']({'send':_0x2a033e,'level':'2','receive':_0x42594e[_0x15325f(0x1ae)]});}return _0x42594e[_0x15325f(0x1ae)];break;case'3':this[_0x15325f(0x37f)]==!![]&&this['doLog']({'send':_0x2a033e,'level':'3','receive':_0x42594e});return _0x42594e;break;case'4':this[_0x15325f(0x37f)]==!![]&&(_0x15325f(0x43f)===_0x15325f(0x43f)?this[_0x15325f(0x1b2)]({'send':_0x2a033e,'level':'4','receive':{'result':{'code':_0x42594e['data']['code'],'data':JSON[_0x15325f(0x1c6)](_0x42594e[_0x15325f(0x1ae)]['data']),'msg':_0x42594e[_0x15325f(0x1ae)][_0x15325f(0x461)]},'body':body}}):_0x3de33f['push'](_0x22198b+'='+_0x259694[_0x3e0599]));return{'result':{'code':_0x42594e[_0x15325f(0x1ae)][_0x15325f(0x487)],'data':_0x42594e[_0x15325f(0x1ae)][_0x15325f(0x1ae)],'msg':_0x42594e[_0x15325f(0x1ae)][_0x15325f(0x461)]},'body':body};break;case'5':this[_0x15325f(0x37f)]==!![]&&this[_0x15325f(0x1b2)]({'send':_0x2a033e,'level':'5','receive':{'result':_0x42594e[_0x15325f(0x1ae)],'body':body}});return{'result':_0x42594e['data'],'body':body};break;case'6':if(this[_0x15325f(0x37f)]==!![]){if(_0x15325f(0x41d)!==_0x15325f(0x41d))throw{'message':_0x15325f(0x2c7)};else this[_0x15325f(0x1b2)]({'send':_0x2a033e,'level':'6','receive':{'result':_0x42594e,'body':body}});}return{'result':_0x42594e,'body':body};break;}return this[_0x15325f(0x37f)]==!![]&&this[_0x15325f(0x1b2)]({'send':_0x2a033e,'level':_0x15325f(0x476),'receive':{'code':_0x42594e['data'][_0x15325f(0x487)],'data':JSON[_0x15325f(0x1c6)](_0x42594e[_0x15325f(0x1ae)][_0x15325f(0x1ae)]),'msg':_0x42594e['data'][_0x15325f(0x461)]}}),{'code':_0x42594e[_0x15325f(0x1ae)][_0x15325f(0x487)],'data':_0x42594e[_0x15325f(0x1ae)]['data'],'msg':_0x42594e[_0x15325f(0x1ae)][_0x15325f(0x461)]};}catch(_0x5738b3){if(_0x15325f(0x458)!==_0x15325f(0x1d5))return _0x5738b3;else throw{'message':_0x15325f(0x42d)};}}async[a10_0x1cfb44(0x2e8)](_0x3fd82d){const _0x4981ec=a10_0x1cfb44,_0x5276cf=await this[_0x4981ec(0x3cb)]();if(_0x5276cf[_0x4981ec(0x487)]&&_0x5276cf['code']=='0')_0x5276cf['ok']=!![];else{if(_0x4981ec(0x2d6)===_0x4981ec(0x2d6))_0x5276cf['ok']=![];else throw{'message':_0x4981ec(0x335)};}return _0x5276cf;}async[a10_0x1cfb44(0x37d)](_0x524fb6){const _0x56646a=a10_0x1cfb44;console[_0x56646a(0x2c1)](_0x56646a(0x1a1));let _0x519d7c=await this[_0x56646a(0x3d4)]({'instType':_0x56646a(0x4ac)},_0x524fb6||undefined),_0x24cbe9=await this[_0x56646a(0x3d4)]({'instType':_0x56646a(0x257)},_0x524fb6||undefined),_0xa87e82=[..._0x519d7c[_0x56646a(0x1ae)]];return _0xa87e82=_0xa87e82['concat'](_0x24cbe9[_0x56646a(0x1ae)]),_0xa87e82;}async[a10_0x1cfb44(0x19a)](_0x4ed86c,_0x55d47c){const _0x565500=a10_0x1cfb44;return await this[_0x565500(0x455)](_0x4ed86c,_0x55d47c);}async[a10_0x1cfb44(0x2c5)](_0x36204e,_0xcfb468){const _0x336ef4=a10_0x1cfb44;let _0x5aef14='/api/v5/trade/order',_0x39d83c=_0x36204e;_0x39d83c['tag']=this[_0x336ef4(0x3a1)](this['br']),_0x39d83c[_0x336ef4(0x44e)]=_0x36204e[_0x336ef4(0x44e)]||_0x39d83c[_0x336ef4(0x301)]+this[_0x336ef4(0x2a9)]();let _0x5f1c22=await this[_0x336ef4(0x1df)](_0x336ef4(0x352),_0x5aef14,_0x39d83c);return await this[_0x336ef4(0x20a)](_0x5f1c22,_0x39d83c,_0x5aef14,_0xcfb468||undefined);}async['placeMultiOrder'](_0x197e85,_0x6f7ed0){const _0x57f775=a10_0x1cfb44;if(!(_0x197e85[_0x57f775(0x339)]==Array))throw{'message':_0x57f775(0x350)};let _0x3ad51c='/api/v5/trade/batch-orders',_0x546bc0=_0x197e85[_0x57f775(0x24b)](_0x20df65=>{const _0x1474d3=_0x57f775;return _0x20df65[_0x1474d3(0x301)]=this[_0x1474d3(0x3a1)](this['br']),_0x20df65[_0x1474d3(0x44e)]=_0x20df65['tag']+this[_0x1474d3(0x2a9)](),_0x20df65;}),_0x5d39e1=await this[_0x57f775(0x1df)](_0x57f775(0x352),_0x3ad51c,_0x546bc0);return await this[_0x57f775(0x20a)](_0x5d39e1,_0x546bc0,_0x3ad51c,_0x6f7ed0||undefined);}async[a10_0x1cfb44(0x240)](_0x38efa6,_0x3d6838){const _0x2dd9ab=a10_0x1cfb44;if(_0x38efa6[_0x2dd9ab(0x36d)]&&_0x38efa6[_0x2dd9ab(0x36d)]!=''&&_0x38efa6[_0x2dd9ab(0x3cf)]){let _0x594e8d=[{'algoId':_0x38efa6[_0x2dd9ab(0x36d)],'instId':_0x38efa6['instId']}];return await this[_0x2dd9ab(0x2e9)](_0x594e8d,_0x3d6838);}let _0x1e04b6=_0x2dd9ab(0x1af),_0x1c130d=_0x38efa6,_0x1102db=await this[_0x2dd9ab(0x1df)](_0x2dd9ab(0x352),_0x1e04b6,_0x1c130d);return await this['executeOrder'](_0x1102db,_0x1c130d,_0x1e04b6,_0x3d6838||undefined);}async[a10_0x1cfb44(0x265)](_0x230cd1,_0x4bb460){const _0x789df7=a10_0x1cfb44;if(!(_0x230cd1['constructor']==Array))throw{'message':_0x789df7(0x1b0)};let _0x1b537e=_0x789df7(0x243),_0x2b0a9b=_0x230cd1,_0x26190f=await this[_0x789df7(0x1df)]('POST',_0x1b537e,_0x2b0a9b);return await this[_0x789df7(0x20a)](_0x26190f,_0x2b0a9b,_0x1b537e,_0x4bb460||undefined);}async['modifyOrder'](_0x275bd2,_0x3f84be){const _0x442054=a10_0x1cfb44;let _0x1c0741=_0x442054(0x440),_0x167936=_0x275bd2;_0x167936['tag']=this['dec'](this['br']),_0x167936[_0x442054(0x44e)]=_0x275bd2['clOrdId']||_0x167936[_0x442054(0x301)]+this[_0x442054(0x2a9)]();let _0x44592c=await this[_0x442054(0x1df)](_0x442054(0x352),_0x1c0741,_0x167936);return await this[_0x442054(0x20a)](_0x44592c,_0x167936,_0x1c0741,_0x3f84be||undefined);}async[a10_0x1cfb44(0x30f)](_0x477007,_0x3131e9){const _0x46eee7=a10_0x1cfb44;let _0x5987bf=_0x46eee7(0x412),_0x4d6b8f=_0x477007;_0x4d6b8f[_0x46eee7(0x301)]=this[_0x46eee7(0x3a1)](this['br']),_0x4d6b8f[_0x46eee7(0x44e)]=_0x477007[_0x46eee7(0x44e)]||_0x4d6b8f['tag']+this[_0x46eee7(0x2a9)]();let _0x418264=await this[_0x46eee7(0x1df)]('POST',_0x5987bf,_0x4d6b8f);return await this['executeOrder'](_0x418264,_0x4d6b8f,_0x5987bf,_0x3131e9||undefined);}async[a10_0x1cfb44(0x210)](_0x47954f,_0x1e1160){const _0x34de93=a10_0x1cfb44;let _0x260e0f=_0x34de93(0x39d),_0x1ee66a=_0x260e0f;if(_0x47954f&&Object[_0x34de93(0x38d)](_0x47954f)[_0x34de93(0x361)]>0x0){if(_0x34de93(0x447)==='gcujA'){if(_0x47954f[_0x34de93(0x2e5)]){if(_0x47954f[_0x34de93(0x2e5)]=='false'&&(!_0x47954f[_0x34de93(0x292)]||!_0x47954f[_0x34de93(0x2c6)])){if(_0x34de93(0x44d)!==_0x34de93(0x1e8))throw{'message':'requires\x20params\x20begin\x20and\x20end\x20when\x20type\x20is\x20false'};else _0x1699fa[_0x34de93(0x320)](_0x47046f+'='+_0x3de3c0[_0x4430e1]);}let _0x9e885c=new Array();if(_0x47954f&&Object[_0x34de93(0x38d)](_0x47954f)[_0x34de93(0x361)]>0x0){_0x260e0f=_0x260e0f+'?';for(const _0x2dbd69 in _0x47954f){_0x9e885c[_0x34de93(0x320)](_0x2dbd69+'='+_0x47954f[_0x2dbd69]);}_0x1ee66a=_0x260e0f+_0x9e885c['join']('&');}}else throw{'message':_0x34de93(0x2cf)};}else{if(!(_0x26d922[_0x34de93(0x3cf)][_0x34de93(0x339)]==_0x88b2af&&_0x295a45[_0x34de93(0x3cf)]['length']>0x0&&_0x1864ad[_0x34de93(0x3cf)]['length']<=0x5))throw{'message':_0x34de93(0x20f)};else _0x17165b=_0x58839e[_0x34de93(0x3cf)][_0x34de93(0x40d)](','),_0x1c2094[_0x34de93(0x3cf)]=_0xc7080f;for(const _0x3de340 in _0x45fc54){_0x25934c[_0x34de93(0x320)](_0x3de340+'='+_0x53dd2b[_0x3de340]);}_0x164536=_0x2e52b5+_0xe230f4[_0x34de93(0x40d)]('&');}}else throw{'message':_0x34de93(0x2ca)};let _0x4a7d2b=await this[_0x34de93(0x1df)](_0x34de93(0x1de),_0x1ee66a,'');return await this[_0x34de93(0x333)](_0x4a7d2b,_0x1ee66a,_0x1e1160||undefined);}async[a10_0x1cfb44(0x2b7)](_0x304e79,_0xa6b2de){const _0x45bf30=a10_0x1cfb44;let _0x2951e5=_0x45bf30(0x39d),_0x346f5f=_0x304e79;if(_0x304e79[_0x45bf30(0x292)]&&_0x304e79[_0x45bf30(0x2c6)]){let _0x17d7e5=await this[_0x45bf30(0x1df)](_0x45bf30(0x352),_0x2951e5,_0x346f5f);return await this[_0x45bf30(0x20a)](_0x17d7e5,_0x346f5f,_0x2951e5,_0xa6b2de||undefined);}else{if(_0x45bf30(0x2c2)!==_0x45bf30(0x2c2))_0x297f86[_0x45bf30(0x320)](_0x3b780d+'='+_0x35f75e[_0x40fdc4]);else throw{'message':_0x45bf30(0x3a4)};}}async['getUserBrokerRebate'](_0x355c1e,_0x2f7d0d){const _0x3af416=a10_0x1cfb44;let _0x3c4b24=_0x3af416(0x418),_0x56ff2c=_0x3c4b24;if(_0x355c1e&&Object['keys'](_0x355c1e)[_0x3af416(0x361)]>0x0){if(_0x3af416(0x1fb)===_0x3af416(0x1fb)){if(_0x355c1e[_0x3af416(0x488)]){if(_0x3af416(0x3a6)===_0x3af416(0x3a6)){let _0x330d5f=new Array();_0x3c4b24=_0x3c4b24+'?';for(const _0x5e557a in _0x355c1e){_0x3af416(0x1f8)==='CbkJy'?_0x330d5f['push'](_0x5e557a+'='+_0x355c1e[_0x5e557a]):this[_0x3af416(0x1b2)]({'send':_0x223e13,'level':'2','receive':_0x20d7f0[_0x3af416(0x1ae)]});}_0x56ff2c=_0x3c4b24+_0x330d5f[_0x3af416(0x40d)]('&');}else throw{'message':_0x3af416(0x20f)};}else{if(_0x3af416(0x3c6)===_0x3af416(0x220))_0x40d137['push'](_0x1cdcd4+'='+_0x2138b9[_0x4b2c60]);else throw{'message':_0x3af416(0x2f6)};}}else throw{'message':'subAccount(s)\x20required\x20to\x20be\x20submitted'};}else throw{'message':'options\x20required'};let _0x301f27=await this[_0x3af416(0x1df)](_0x3af416(0x1de),_0x56ff2c,'');return await this[_0x3af416(0x333)](_0x301f27,_0x56ff2c,_0x2f7d0d||undefined);}async[a10_0x1cfb44(0x251)](_0x5a7aad,_0x888a2d){const _0x36d920=a10_0x1cfb44;let _0x140a13=_0x36d920(0x1ed),_0x3e24f6=_0x140a13;if(_0x5a7aad&&Object[_0x36d920(0x38d)](_0x5a7aad)[_0x36d920(0x361)]>0x0){if(_0x5a7aad['instId']&&(_0x5a7aad[_0x36d920(0x492)]||_0x5a7aad[_0x36d920(0x44e)])){let _0x3c302d=new Array();_0x140a13=_0x140a13+'?';for(const _0x287717 in _0x5a7aad){if(_0x36d920(0x2ed)!==_0x36d920(0x2ed))throw{'message':_0x36d920(0x39e)};else _0x3c302d[_0x36d920(0x320)](_0x287717+'='+_0x5a7aad[_0x287717]);}_0x3e24f6=_0x140a13+_0x3c302d[_0x36d920(0x40d)]('&');}else throw{'message':_0x36d920(0x2b1)};}else throw{'message':_0x36d920(0x2ca)};let _0x242f60=await this['createAuthHeader'](_0x36d920(0x1de),_0x3e24f6,'');return await this[_0x36d920(0x333)](_0x242f60,_0x3e24f6,_0x888a2d||undefined);}async[a10_0x1cfb44(0x2d4)](_0x4fbed9,_0x57e4ee){const _0xb465e=a10_0x1cfb44;return await this[_0xb465e(0x35e)](_0x4fbed9,_0x57e4ee);}async[a10_0x1cfb44(0x35e)](_0x4f5f9e,_0x26c109){const _0x20a3c7=a10_0x1cfb44;let _0x50dc38=_0x20a3c7(0x39b),_0x10d9de=_0x50dc38;if(_0x4f5f9e&&Object['keys'](_0x4f5f9e)['length']>0x0){let _0x3e038b=new Array();_0x50dc38=_0x50dc38+'?';for(const _0x43db52 in _0x4f5f9e){_0x3e038b[_0x20a3c7(0x320)](_0x43db52+'='+_0x4f5f9e[_0x43db52]);}_0x10d9de=_0x50dc38+_0x3e038b[_0x20a3c7(0x40d)]('&');}let _0x43d0c8=await this['createAuthHeader'](_0x20a3c7(0x1de),_0x10d9de,'');return await this[_0x20a3c7(0x333)](_0x43d0c8,_0x10d9de,_0x26c109||undefined);}async[a10_0x1cfb44(0x2c3)](_0x1dd4c2,_0x15b300){const _0x38918a=a10_0x1cfb44;let _0x299aa9=_0x38918a(0x1e5),_0x469a79=_0x299aa9;if(_0x1dd4c2&&Object[_0x38918a(0x38d)](_0x1dd4c2)[_0x38918a(0x361)]>0x0){if(_0x1dd4c2[_0x38918a(0x386)]){if('fzZOG'===_0x38918a(0x3e0))throw{'message':_0x38918a(0x255)};else{let _0x5a121f=new Array();_0x299aa9=_0x299aa9+'?';for(const _0x31a458 in _0x1dd4c2){_0x5a121f['push'](_0x31a458+'='+_0x1dd4c2[_0x31a458]);}_0x469a79=_0x299aa9+_0x5a121f[_0x38918a(0x40d)]('&');}}else throw{'message':_0x38918a(0x3df)};}else{if('IMZou'===_0x38918a(0x201))throw{'message':_0x38918a(0x2bc)};else throw{'message':_0x38918a(0x231)};}let _0x145fdf=await this[_0x38918a(0x1df)](_0x38918a(0x1de),_0x469a79,'');return await this['executeGetRequest'](_0x145fdf,_0x469a79,_0x15b300||undefined);}async[a10_0x1cfb44(0x3bf)](_0x18cec5,_0x23d1dd){const _0x27fdaf=a10_0x1cfb44;let _0x4ea26e='/api/v5/trade/orders-history-archive',_0x2a958b=_0x4ea26e;if(_0x18cec5&&Object[_0x27fdaf(0x38d)](_0x18cec5)[_0x27fdaf(0x361)]>0x0){if('Xygli'!==_0x27fdaf(0x316))throw{'message':'options\x20must\x20be\x20an\x20array\x20of\x20order\x20objects'};else{if(_0x18cec5['instType']){let _0x296470=new Array();_0x4ea26e=_0x4ea26e+'?';for(const _0x43fa61 in _0x18cec5){_0x27fdaf(0x47f)!=='XOSLm'?_0x11c9af('No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters'):_0x296470[_0x27fdaf(0x320)](_0x43fa61+'='+_0x18cec5[_0x43fa61]);}_0x2a958b=_0x4ea26e+_0x296470[_0x27fdaf(0x40d)]('&');}else{if(_0x27fdaf(0x3e7)===_0x27fdaf(0x3ce))this[_0x27fdaf(0x1b2)]({'send':_0x46ba05,'level':'1','receive':{'code':_0x3ee44e[_0x27fdaf(0x1ae)]['code'],'data':_0x20bb40[_0x27fdaf(0x1c6)](_0x51261c[_0x27fdaf(0x1ae)]['data']),'msg':_0x57d821[_0x27fdaf(0x1ae)][_0x27fdaf(0x461)]}});else throw{'message':'requires\x20instType'};}}}else throw{'message':_0x27fdaf(0x2ca)};let _0x41cb69=await this[_0x27fdaf(0x1df)](_0x27fdaf(0x1de),_0x2a958b,'');return await this[_0x27fdaf(0x333)](_0x41cb69,_0x2a958b,_0x23d1dd||undefined);}async[a10_0x1cfb44(0x29e)](_0x19ca55,_0x25cac1){const _0x1cd8e2=a10_0x1cfb44;let _0x10131b={},_0x51f87e=!![];if(_0x19ca55[_0x1cd8e2(0x459)]){if('QgJjh'===_0x1cd8e2(0x2fb)){switch(_0x19ca55['category']){case _0x1cd8e2(0x1e9):_0x10131b[_0x1cd8e2(0x386)]=_0x1cd8e2(0x4ac);break;case'linear':_0x10131b[_0x1cd8e2(0x386)]=_0x1cd8e2(0x257);break;case _0x1cd8e2(0x1a0):_0x10131b[_0x1cd8e2(0x386)]=_0x1cd8e2(0x257);break;default:_0x51f87e=![];}if(_0x51f87e==![]){if(_0x1cd8e2(0x20b)!==_0x1cd8e2(0x20b))_0x4eb34c[_0x1cd8e2(0x320)](_0x239eed+'='+_0x3097ea[_0xc73a7a]);else throw{'message':_0x1cd8e2(0x36e)};}}else{if(_0x367485[_0x1cd8e2(0x3cf)]['constructor']==_0x51a270&&_0x1edfcc[_0x1cd8e2(0x3cf)][_0x1cd8e2(0x361)]>0x0&&_0x466cd7[_0x1cd8e2(0x3cf)][_0x1cd8e2(0x361)]<=0x5){const _0x190326=_0x17aeb8[_0x1cd8e2(0x3cf)][_0x1cd8e2(0x40d)](',');_0x468ccf['instId']=_0x190326;}else throw{'message':'instId\x20must\x20be\x20an\x20array\x20of\x20no\x20more\x20than\x205\x20instId\x27s'};}}else throw{'message':'category\x20required'};_0x19ca55['symbol']&&(_0x10131b[_0x1cd8e2(0x3cf)]=_0x19ca55[_0x1cd8e2(0x38c)]);_0x19ca55[_0x1cd8e2(0x247)]&&(_0x10131b[_0x1cd8e2(0x492)]=_0x19ca55['orderId']);_0x19ca55[_0x1cd8e2(0x483)]&&(_0x10131b[_0x1cd8e2(0x292)]=_0x19ca55['startTime']);if(_0x19ca55['endTime']){if('JaJvV'===_0x1cd8e2(0x439))throw{'message':_0x1cd8e2(0x2f7)};else _0x10131b['end']=_0x19ca55[_0x1cd8e2(0x21f)];}_0x19ca55[_0x1cd8e2(0x2b4)]?_0x10131b[_0x1cd8e2(0x2b4)]=_0x19ca55[_0x1cd8e2(0x2b4)]:_0x10131b['limit']='100';let _0x48b13d=new Date();_0x48b13d[_0x1cd8e2(0x2e0)](_0x48b13d[_0x1cd8e2(0x36a)]()-0x3);let _0xf1a046=Date[_0x1cd8e2(0x1cf)](_0x48b13d),_0x164848,_0x22e167=[],_0x3ceafe=[],_0x486349=[],_0xa0b655=0x0,_0x5eb474=![];if(_0x19ca55[_0x1cd8e2(0x483)]){let _0x14823d=new Date();_0x14823d[_0x1cd8e2(0x22f)](_0x14823d[_0x1cd8e2(0x379)]()-0x3),_0x14823d['setHours'](0x0),_0x14823d[_0x1cd8e2(0x353)](0x0),_0x14823d[_0x1cd8e2(0x49a)](0x0),_0x14823d[_0x1cd8e2(0x1bb)](0x0);let _0x2f2f73=Date[_0x1cd8e2(0x1cf)](_0x14823d);if(Number(_0x19ca55['startTime'])<_0x2f2f73)throw{'message':_0x1cd8e2(0x1e3)};}do{if(_0x1cd8e2(0x36f)===_0x1cd8e2(0x36f)){Number(_0x10131b['begin'])<_0xf1a046?_0x164848=await this[_0x1cd8e2(0x37b)](_0x10131b):_0x164848=await this['getRecentTransactionDetailsShort'](_0x10131b);_0x22e167=_0x164848[_0x1cd8e2(0x1ae)]&&_0x164848[_0x1cd8e2(0x1ae)][_0x1cd8e2(0x361)]>0x0?_0x164848[_0x1cd8e2(0x1ae)]:[],_0x3ceafe=[..._0x3ceafe,..._0x22e167];if(_0x22e167[_0x1cd8e2(0x361)]>0x0){if(_0x1cd8e2(0x45e)!=='DAfKw')_0x10131b['after']=_0x22e167[_0x22e167[_0x1cd8e2(0x361)]-0x1]['billId'];else{if(_0x489b7e['simPos'][_0x1cd8e2(0x339)]!=_0x574852)throw{'message':_0x1cd8e2(0x377)};}}_0xa0b655+=0x1,_0x19ca55[_0x1cd8e2(0x22a)]&&(_0x1cd8e2(0x366)!==_0x1cd8e2(0x1c3)?_0xa0b655==Number(_0x19ca55[_0x1cd8e2(0x22a)])&&(_0x5eb474=!![]):_0x22dc62[_0x1cd8e2(0x320)](_0x478632+'='+_0x585913[_0xfaf38f]));}else this[_0x1cd8e2(0x1b2)]({'send':_0x1f84bf,'level':'default','receive':{'code':_0x4dbdea[_0x1cd8e2(0x1ae)][_0x1cd8e2(0x487)],'data':_0x36ca95[_0x1cd8e2(0x1c6)](_0x107a8a[_0x1cd8e2(0x1ae)][_0x1cd8e2(0x1ae)]),'msg':_0x144d91[_0x1cd8e2(0x1ae)][_0x1cd8e2(0x461)]}});}while(_0x22e167[_0x1cd8e2(0x361)]==Number(_0x10131b[_0x1cd8e2(0x2b4)])&&_0x5eb474==![]);_0x3ceafe=Array[_0x1cd8e2(0x406)](new Set(_0x3ceafe)),_0x486349[_0x1cd8e2(0x459)]=_0x19ca55['category'];_0x19ca55[_0x1cd8e2(0x459)]!==_0x1cd8e2(0x1e9)&&(_0x19ca55['category']==_0x1cd8e2(0x287)?_0x3ceafe=_0x3ceafe['filter'](_0x4d2d8f=>{const _0xcceef6=_0x1cd8e2;if(_0xcceef6(0x213)!==_0xcceef6(0x213)){let _0xeb60ed=new _0x28120e();_0x26ae75=_0x2ca009+'?';for(const _0x201c3b in _0x58fa32){_0xeb60ed[_0xcceef6(0x320)](_0x201c3b+'='+_0x370fa8[_0x201c3b]);}_0x1b51fb=_0x653646+_0xeb60ed[_0xcceef6(0x40d)]('&');}else return _0x4d2d8f['instId']['includes'](_0xcceef6(0x1f5));}):_0x1cd8e2(0x3e9)===_0x1cd8e2(0x2ab)?_0x2b5fb9[_0x16ae48]=_0x5b2fe3[_0x5507a7]:_0x3ceafe=_0x3ceafe[_0x1cd8e2(0x451)](_0x34acb1=>{const _0x392176=_0x1cd8e2;return!_0x34acb1['instId'][_0x392176(0x3f9)](_0x392176(0x1f5));}));for(let _0x8fd146 of _0x3ceafe){let _0x3edb12=_0x19ca55[_0x1cd8e2(0x459)]===_0x1cd8e2(0x1a0)?_0x1cd8e2(0x325):(Number(_0x8fd146[_0x1cd8e2(0x1f3)])*Number(_0x8fd146[_0x1cd8e2(0x446)]))['toString']()[_0x1cd8e2(0x1e6)](0x0,0xa),_0x554297=_0x19ca55[_0x1cd8e2(0x459)]==='inverse'?'Calculate':(Number(_0x8fd146[_0x1cd8e2(0x42a)])/Number(_0x3edb12))[_0x1cd8e2(0x326)]()[_0x1cd8e2(0x1e6)](0x0,0xa);_0x486349['push']({'category':_0x19ca55[_0x1cd8e2(0x459)],'symbol':_0x8fd146[_0x1cd8e2(0x3cf)],'orderId':_0x8fd146[_0x1cd8e2(0x492)],'orderLinkId':_0x8fd146[_0x1cd8e2(0x44e)],'side':_0x8fd146[_0x1cd8e2(0x21c)],'leavesQty':'','isMaker':_0x8fd146[_0x1cd8e2(0x460)]==='M'?!![]:![],'fillSize':_0x8fd146[_0x1cd8e2(0x1f3)],'fillPrice':_0x8fd146[_0x1cd8e2(0x446)],'fee':_0x8fd146[_0x1cd8e2(0x42a)],'feeRate':_0x554297,'feeCurrency':_0x8fd146[_0x1cd8e2(0x21b)],'fillTime':_0x8fd146[_0x1cd8e2(0x3ff)],'execId':_0x8fd146['tradeId'],'execValue':_0x3edb12});}return _0x486349;}async['getRecentTransactionDetailsShort'](_0x1dc158,_0x1898c8){const _0x1e4127=a10_0x1cfb44;let _0x25e383=_0x1e4127(0x262),_0x3ab95a=_0x25e383;if(_0x1dc158&&Object[_0x1e4127(0x38d)](_0x1dc158)[_0x1e4127(0x361)]>0x0){let _0x27104a=new Array();_0x25e383=_0x25e383+'?';for(const _0x343c2d in _0x1dc158){'bxIBd'!==_0x1e4127(0x2fa)?_0x27104a[_0x1e4127(0x320)](_0x343c2d+'='+_0x1dc158[_0x343c2d]):_0x551ea6[_0x1e4127(0x320)](_0x1b35b5+'='+_0x442ee3[_0x1ce61b]);}_0x3ab95a=_0x25e383+_0x27104a['join']('&');}let _0x27aacb=await this['createAuthHeader'](_0x1e4127(0x1de),_0x3ab95a,'');return await this[_0x1e4127(0x333)](_0x27aacb,_0x3ab95a,_0x1898c8||undefined);}async[a10_0x1cfb44(0x37b)](_0xff608e,_0xef2453){const _0x20f352=a10_0x1cfb44;let _0xc48e0b='/api/v5/trade/fills-history',_0x4f85f6=_0xc48e0b;if(_0xff608e&&Object['keys'](_0xff608e)[_0x20f352(0x361)]>0x0){if(_0xff608e['instType']){let _0x36df3f=new Array();_0xc48e0b=_0xc48e0b+'?';for(const _0xb5ac45 in _0xff608e){_0x36df3f[_0x20f352(0x320)](_0xb5ac45+'='+_0xff608e[_0xb5ac45]);}_0x4f85f6=_0xc48e0b+_0x36df3f[_0x20f352(0x40d)]('&');}else throw{'message':_0x20f352(0x3df)};}else throw{'message':'options\x20required'};let _0x23f5ca=await this['createAuthHeader'](_0x20f352(0x1de),_0x4f85f6,'');return await this['executeGetRequest'](_0x23f5ca,_0x4f85f6,_0xef2453||undefined);}async[a10_0x1cfb44(0x35a)](_0x12cee9,_0x20c57a){const _0x437fcc=a10_0x1cfb44;let _0xb0e2a8=_0x437fcc(0x31a),_0x2b9880=_0x12cee9,_0x13a90a;if(!_0x12cee9[_0x437fcc(0x3cf)]||!_0x12cee9[_0x437fcc(0x482)]||!_0x12cee9[_0x437fcc(0x38f)]||!_0x12cee9['side']||!_0x12cee9['sz'])return _0x13a90a=_0x437fcc(0x269),_0x13a90a;let _0x129bfd=await this[_0x437fcc(0x1df)]('POST',_0xb0e2a8,_0x2b9880);return await this[_0x437fcc(0x20a)](_0x129bfd,_0x2b9880,_0xb0e2a8,_0x20c57a||undefined);}async['cancelAlgoOrder'](_0x2f69d9,_0x2081c8){const _0x471c95=a10_0x1cfb44;let _0x40457f='/api/v5/trade/cancel-algos',_0xaa1023=_0x2f69d9,_0x504538;if(_0x2f69d9&&_0x2f69d9['constructor']!=Array){if(_0x471c95(0x2cc)!==_0x471c95(0x1a4)){_0x504538=_0x471c95(0x28b);throw _0x504538;}else return _0xc49662['tag']=this[_0x471c95(0x3a1)](this['br']),_0x290740[_0x471c95(0x44e)]=_0x2613de['tag']+this[_0x471c95(0x2a9)](),_0x493ead;}else for(const _0x3383cb of _0x2f69d9){if(_0x471c95(0x237)!==_0x471c95(0x237))throw{'message':_0x471c95(0x329)};else{if(!_0x3383cb[_0x471c95(0x36d)]||!_0x3383cb[_0x471c95(0x3cf)])throw _0x471c95(0x42f);}}let _0x12af04=await this['createAuthHeader']('POST',_0x40457f,_0xaa1023);return await this[_0x471c95(0x20a)](_0x12af04,_0xaa1023,_0x40457f,_0x2081c8||undefined);}async[a10_0x1cfb44(0x36c)](_0x17dfe0,_0x22444b){const _0x557069=a10_0x1cfb44;let _0x142b9a=_0x557069(0x228),_0x2da11b=_0x17dfe0,_0x46cd04;if(_0x17dfe0&&_0x17dfe0[_0x557069(0x339)]!=Array){_0x46cd04='Parameters\x20must\x20be\x20array\x20of\x20objects';throw _0x46cd04;}else{if(_0x557069(0x472)==='xHTrM'){if(_0x2817f1['data']['data']){if(_0xb889fb[_0x557069(0x1ae)][_0x557069(0x1ae)][_0x557069(0x1ae)]){if(_0x3d5665[_0x557069(0x1ae)][_0x557069(0x1ae)][_0x557069(0x1ae)][_0x557069(0x1ae)])return _0x879e65[_0x557069(0x1ae)][_0x557069(0x1ae)]['data'][_0x557069(0x1ae)];return _0x3d0490[_0x557069(0x1ae)][_0x557069(0x1ae)]['data'];}return _0x411581[_0x557069(0x1ae)]['data'];}}else for(const _0x285ce3 of _0x17dfe0){if(!_0x285ce3[_0x557069(0x36d)]||!_0x285ce3[_0x557069(0x3cf)])throw _0x557069(0x42f);}}let _0x1078e3=await this['createAuthHeader'](_0x557069(0x352),_0x142b9a,_0x2da11b);return await this[_0x557069(0x20a)](_0x1078e3,_0x2da11b,_0x142b9a,_0x22444b||undefined);}async[a10_0x1cfb44(0x1ea)](_0x52c3d5,_0x32f868){const _0x588301=a10_0x1cfb44;let _0x450073='?',_0x5a410d;if(!_0x52c3d5){if(_0x588301(0x1dd)!==_0x588301(0x1dd))throw{'message':_0x588301(0x36e)};else return _0x5a410d=_0x588301(0x450),_0x5a410d;}if(_0x52c3d5&&!_0x52c3d5[_0x588301(0x38f)])return _0x5a410d=_0x588301(0x37e),_0x5a410d;_0x52c3d5[_0x588301(0x38f)]&&('lIkjx'!=='lIkjx'?_0x4ad3c8[_0x588301(0x320)](_0x970d73+'='+_0x484161[_0x27bb50]):(_0x450073=_0x450073+(_0x450073=='?'?'':'&'),_0x450073=_0x450073+_0x588301(0x3a3)+_0x52c3d5[_0x588301(0x38f)]));_0x52c3d5[_0x588301(0x36d)]&&(_0x450073=_0x450073+(_0x450073=='?'?'':'&'),_0x450073=_0x450073+_0x588301(0x349)+_0x52c3d5[_0x588301(0x36d)]);if(_0x52c3d5[_0x588301(0x386)]){if(_0x588301(0x2ec)!==_0x588301(0x425))_0x450073=_0x450073+(_0x450073=='?'?'':'&'),_0x450073=_0x450073+_0x588301(0x2c4)+_0x52c3d5[_0x588301(0x386)];else throw{'message':'options.ccy\x20not\x20submitted'};}_0x52c3d5[_0x588301(0x3cf)]&&(_0x450073=_0x450073+(_0x450073=='?'?'':'&'),_0x450073=_0x450073+'instId='+_0x52c3d5['instId']);_0x52c3d5[_0x588301(0x214)]&&(_0x450073=_0x450073+(_0x450073=='?'?'':'&'),_0x450073=_0x450073+_0x588301(0x44a)+_0x52c3d5[_0x588301(0x214)]);_0x52c3d5[_0x588301(0x1a7)]&&(_0x450073=_0x450073+(_0x450073=='?'?'':'&'),_0x450073=_0x450073+_0x588301(0x1d0)+_0x52c3d5[_0x588301(0x1a7)]);_0x52c3d5[_0x588301(0x2b4)]&&(_0x588301(0x4b2)===_0x588301(0x479)?_0xfe28be[_0x588301(0x320)](_0x3b2e3e+'='+_0x3c2108[_0xa46617]):(_0x450073=_0x450073+(_0x450073=='?'?'':'&'),_0x450073=_0x450073+_0x588301(0x24d)+_0x52c3d5[_0x588301(0x2b4)]));let _0x329c71=_0x588301(0x2b8)+_0x450073,_0x120a82=await this[_0x588301(0x1df)](_0x588301(0x1de),_0x329c71,'');return await this[_0x588301(0x333)](_0x120a82,_0x329c71,_0x32f868||undefined);}async[a10_0x1cfb44(0x46b)](_0x3e38cf,_0x1eb741){const _0x1df4a3=a10_0x1cfb44;let _0x56f131='?',_0x2c309c;if(!_0x3e38cf){if('bCuHM'!==_0x1df4a3(0x48b))return _0x2c309c=_0x1df4a3(0x202),_0x2c309c;else{let _0x41a667=new _0x38b9dd();_0x3745bb=_0xd19393+'?';for(const _0x2cc11c in _0x1602a0){_0x41a667[_0x1df4a3(0x320)](_0x2cc11c+'='+_0x4f55a3[_0x2cc11c]);}_0x39ebcb=_0x4f5af7+_0x41a667[_0x1df4a3(0x40d)]('&');}}if(_0x3e38cf&&!_0x3e38cf['state']&&!_0x3e38cf[_0x1df4a3(0x36d)])return _0x2c309c=_0x1df4a3(0x33d),_0x2c309c;_0x3e38cf[_0x1df4a3(0x38f)]&&(_0x56f131=_0x56f131+(_0x56f131=='?'?'':'&'),_0x56f131=_0x56f131+_0x1df4a3(0x3a3)+_0x3e38cf['ordType']);_0x3e38cf['state']&&(_0x56f131=_0x56f131+(_0x56f131=='?'?'':'&'),_0x56f131=_0x56f131+_0x1df4a3(0x398)+_0x3e38cf[_0x1df4a3(0x21d)]);_0x3e38cf[_0x1df4a3(0x36d)]&&(_0x56f131=_0x56f131+(_0x56f131=='?'?'':'&'),_0x56f131=_0x56f131+_0x1df4a3(0x349)+_0x3e38cf[_0x1df4a3(0x36d)]);if(_0x3e38cf['instType']){if(_0x1df4a3(0x3fd)===_0x1df4a3(0x3fd))_0x56f131=_0x56f131+(_0x56f131=='?'?'':'&'),_0x56f131=_0x56f131+_0x1df4a3(0x2c4)+_0x3e38cf[_0x1df4a3(0x386)];else throw{'message':'instId\x20is\x20a\x20required\x20param'};}if(_0x3e38cf[_0x1df4a3(0x3cf)]){if(_0x1df4a3(0x27e)==='HtTBL'){let _0x3dd554=new _0xa6d99f();_0x37faed=_0x540acd+'?';for(const _0x1e80ab in _0x1cfedf){_0x3dd554[_0x1df4a3(0x320)](_0x1e80ab+'='+_0x22c6a4[_0x1e80ab]);}_0x27812f=_0x43df71+_0x3dd554['join']('&');}else _0x56f131=_0x56f131+(_0x56f131=='?'?'':'&'),_0x56f131=_0x56f131+_0x1df4a3(0x42c)+_0x3e38cf[_0x1df4a3(0x3cf)];}_0x3e38cf['after']&&(_0x56f131=_0x56f131+(_0x56f131=='?'?'':'&'),_0x56f131=_0x56f131+_0x1df4a3(0x44a)+_0x3e38cf[_0x1df4a3(0x214)]);_0x3e38cf[_0x1df4a3(0x1a7)]&&(_0x56f131=_0x56f131+(_0x56f131=='?'?'':'&'),_0x56f131=_0x56f131+_0x1df4a3(0x1d0)+_0x3e38cf['before']);_0x3e38cf['limit']&&(_0x56f131=_0x56f131+(_0x56f131=='?'?'':'&'),_0x56f131=_0x56f131+_0x1df4a3(0x24d)+_0x3e38cf[_0x1df4a3(0x2b4)]);let _0x64e4e6=_0x1df4a3(0x22d)+_0x56f131,_0x49fba3=await this[_0x1df4a3(0x1df)](_0x1df4a3(0x1de),_0x64e4e6,'');return await this['executeGetRequest'](_0x49fba3,_0x64e4e6,_0x1eb741||undefined);}async['getBalances'](_0x82ef5b){const _0x1deb69=a10_0x1cfb44;let _0x21e3f7=await this[_0x1deb69(0x1ad)](_0x82ef5b),_0x3dd9b8=await this[_0x1deb69(0x1f4)](_0x82ef5b),_0x4b50da={'tradingBalances':_0x21e3f7,'assetBalances':_0x3dd9b8};return _0x4b50da;}async[a10_0x1cfb44(0x1ad)](_0x8282e,_0x124292){const _0x252eed=a10_0x1cfb44;let _0x32eab0=_0x252eed(0x3e4),_0x372858=_0x32eab0;if(_0x8282e&&_0x8282e[_0x252eed(0x2ef)]){let _0x6a4ff1=_0x252eed(0x312);if(!_0x8282e[_0x252eed(0x2ef)][_0x252eed(0x339)]==Array){if(_0x252eed(0x21a)!==_0x252eed(0x36b))throw{'message':_0x252eed(0x1bd)};else this[_0x252eed(0x1b2)]({'send':_0x4ff264,'level':'6','receive':{'result':_0x13e38f,'body':_0x316687}});}for(let _0x2a7498=0x0;_0x2a7498<_0x8282e['tokens'][_0x252eed(0x361)];_0x2a7498++){_0x252eed(0x1cb)===_0x252eed(0x1cb)?_0x2a7498==0x0?'ALiYQ'!==_0x252eed(0x422)?_0x6a4ff1=_0x6a4ff1+_0x8282e[_0x252eed(0x2ef)][_0x2a7498]:(_0xd518d6=_0x2de489['instId'][_0x252eed(0x40d)](','),_0x27e14b[_0x252eed(0x3cf)]=_0x71fb32):_0x6a4ff1=_0x6a4ff1+','+_0x8282e[_0x252eed(0x2ef)][_0x2a7498]:_0x2bd03a[_0x252eed(0x320)](_0x5dc4e+'='+_0x11fc9a[_0xc0fe74]);}_0x372858=_0x32eab0+_0x6a4ff1;}let _0x2f0c68=await this[_0x252eed(0x1df)](_0x252eed(0x1de),_0x372858,'');return await this[_0x252eed(0x333)](_0x2f0c68,_0x372858,_0x124292||undefined);}async[a10_0x1cfb44(0x1f4)](_0x175c1b,_0x2e571e){const _0x4c84bb=a10_0x1cfb44;let _0x526dce='/api/v5/asset/balances',_0x7799=_0x526dce;if(_0x175c1b&&_0x175c1b[_0x4c84bb(0x2ef)]){let _0x50a60a=_0x4c84bb(0x312);if(!_0x175c1b[_0x4c84bb(0x2ef)][_0x4c84bb(0x339)]==Array)throw{'message':_0x4c84bb(0x1bd)};for(let _0x330b27=0x0;_0x330b27<_0x175c1b['tokens']['length'];_0x330b27++){_0x330b27==0x0?_0x50a60a=_0x50a60a+_0x175c1b[_0x4c84bb(0x2ef)][_0x330b27]:_0x50a60a=_0x50a60a+','+_0x175c1b[_0x4c84bb(0x2ef)][_0x330b27];}_0x7799=_0x526dce+_0x50a60a;}let _0x43c38b=await this[_0x4c84bb(0x1df)](_0x4c84bb(0x1de),_0x7799,'');return await this[_0x4c84bb(0x333)](_0x43c38b,_0x7799,_0x2e571e||undefined);}[a10_0x1cfb44(0x18d)]=_0x5f2f3f=>{const _0x5beee0=a10_0x1cfb44;if(_0x5f2f3f[_0x5beee0(0x1ae)][_0x5beee0(0x1ae)]){if(_0x5f2f3f[_0x5beee0(0x1ae)][_0x5beee0(0x1ae)][_0x5beee0(0x1ae)]){if(_0x5f2f3f['data'][_0x5beee0(0x1ae)][_0x5beee0(0x1ae)][_0x5beee0(0x1ae)]){if(_0x5beee0(0x432)===_0x5beee0(0x3b9))throw{'message':'Either\x20quoteCcy\x20or\x20instId\x20is\x20a\x20required\x20param'};else return _0x5f2f3f['data']['data'][_0x5beee0(0x1ae)][_0x5beee0(0x1ae)];}return _0x5f2f3f[_0x5beee0(0x1ae)][_0x5beee0(0x1ae)][_0x5beee0(0x1ae)];}return _0x5f2f3f['data'][_0x5beee0(0x1ae)];}};async[a10_0x1cfb44(0x496)](_0x2ea6ca,_0x3be6d2){const _0x1a214e=a10_0x1cfb44,_0x1475b2=0x14,_0x1d953e=0xa,_0x2280d6=0x14;let _0x4bdcb0={};if(_0x2ea6ca&&Object[_0x1a214e(0x38d)](_0x2ea6ca)[_0x1a214e(0x361)]>0x0){if(_0x2ea6ca[_0x1a214e(0x3b8)]&&_0x2ea6ca[_0x1a214e(0x3b8)]['toLowerCase']()!=_0x1a214e(0x297)&&_0x2ea6ca[_0x1a214e(0x3b8)][_0x1a214e(0x3d2)]()!=_0x1a214e(0x481)){if('WqbAQ'!==_0x1a214e(0x27f))throw{'message':_0x1a214e(0x380)};else this[_0x1a214e(0x1b2)]({'send':_0x59db61,'level':'6','receive':{'result':_0x367382,'body':_0x173b60}});}if(_0x2ea6ca[_0x1a214e(0x4a9)])switch(_0x2ea6ca[_0x1a214e(0x4a9)][_0x1a214e(0x3d2)]()){case _0x1a214e(0x1e9):if(_0x2ea6ca[_0x1a214e(0x23d)]){if(!(_0x2ea6ca['markets'][_0x1a214e(0x339)]==Array))throw{'message':_0x1a214e(0x1aa)};else{if(_0x2ea6ca[_0x1a214e(0x23d)]&&_0x2ea6ca['markets'][_0x1a214e(0x361)]>_0x1475b2)throw{'message':_0x1a214e(0x1b5)+_0x1475b2+_0x1a214e(0x227)};}}break;case'future':if(_0x2ea6ca[_0x1a214e(0x23d)]&&!(_0x2ea6ca[_0x1a214e(0x23d)][_0x1a214e(0x339)]==Array))throw{'message':_0x1a214e(0x337)};else{if(_0x2ea6ca[_0x1a214e(0x23d)]&&_0x2ea6ca[_0x1a214e(0x23d)][_0x1a214e(0x361)]>_0x1d953e)throw{'message':_0x1a214e(0x1b5)+_0x1d953e+_0x1a214e(0x1e2)};}if(_0x2ea6ca['posIds']){if('YxNtP'!==_0x1a214e(0x245)){if(!(_0x2ea6ca[_0x1a214e(0x3ab)][_0x1a214e(0x339)]==Array)){if('bKWvc'==='bKWvc')throw{'message':_0x1a214e(0x2a4)};else _0x53ec1b['push'](_0x3e1eb1+'='+_0x49858d[_0x570eac]);}else{if(_0x2ea6ca['posIds'][_0x1a214e(0x361)]>_0x2280d6)throw{'message':_0x1a214e(0x1b5)+_0x2280d6+_0x1a214e(0x4b1)};}}else throw{'message':_0x1a214e(0x3c0)};}break;case _0x1a214e(0x1a9):throw{'message':'positionType\x20MARGIN\x20not\x20supported'};break;case _0x1a214e(0x38b):throw{'message':_0x1a214e(0x18f)};break;default:throw{'message':_0x1a214e(0x433)+_0x2ea6ca['positionType']};break;}_0x4bdcb0=_0x2ea6ca;}const _0x65c9e=await this['getPositionsNative'](_0x4bdcb0,_0x3be6d2||undefined);return _0x65c9e;}async[a10_0x1cfb44(0x3ec)](_0x11bb5b,_0x2126f3){const _0x41dce9=a10_0x1cfb44;let _0xf43524=_0x41dce9(0x249),_0x57e469=_0xf43524,_0x389b44={};const _0x275880=[_0x41dce9(0x386),_0x41dce9(0x3cf),_0x41dce9(0x4af)];for(const _0x17a39e in _0x11bb5b){_0x275880[_0x41dce9(0x3f9)](_0x17a39e)&&(_0x389b44[_0x17a39e]=_0x11bb5b[_0x17a39e]);}if(Object[_0x41dce9(0x38d)](_0x389b44)[_0x41dce9(0x361)]>0x0){let _0x3523c8=new Array();_0xf43524=_0xf43524+'?';for(const _0x5d4922 in _0x389b44){_0x3523c8[_0x41dce9(0x320)](_0x5d4922+'='+_0x389b44[_0x5d4922]);}_0x57e469=_0xf43524+_0x3523c8[_0x41dce9(0x40d)]('&');}let _0x3c5e9a=await this['createAuthHeader']('GET',_0x57e469,'');return await this[_0x41dce9(0x333)](_0x3c5e9a,_0x57e469,_0x2126f3||undefined);}async[a10_0x1cfb44(0x3d4)](_0x16a5d5,_0x3d525b){const _0x51147d=a10_0x1cfb44;if(!_0x16a5d5['instType'])throw{'err':_0x51147d(0x45f)};else{if(_0x51147d(0x410)===_0x51147d(0x410)){const _0x32c747=[_0x51147d(0x4ac),_0x51147d(0x257),_0x51147d(0x3fb),_0x51147d(0x444)];if(!_0x32c747[_0x51147d(0x3f9)](_0x16a5d5[_0x51147d(0x386)][_0x51147d(0x19d)]()))throw{'err':_0x51147d(0x3c3)};}else throw{'message':_0x51147d(0x2de)};}let _0x4ec69e=_0x51147d(0x1a5)+_0x16a5d5['instType'];return _0x16a5d5[_0x51147d(0x1be)]&&(_0x4ec69e=_0x4ec69e[_0x51147d(0x26c)](_0x51147d(0x321)+_0x16a5d5[_0x51147d(0x1be)])),_0x16a5d5['instFamily']&&(_0x51147d(0x2d3)!==_0x51147d(0x2d3)?_0x473783=_0x548d6d+_0x51147d(0x2da)+_0x3ce5f3[_0x51147d(0x21d)]:_0x4ec69e=_0x4ec69e[_0x51147d(0x26c)](_0x51147d(0x250)+_0x16a5d5[_0x51147d(0x2ee)])),await this[_0x51147d(0x333)]('',_0x4ec69e,_0x3d525b||undefined);}async[a10_0x1cfb44(0x1d8)](_0x261d76,_0x23421c){const _0x47b755=a10_0x1cfb44;let _0x32fd9b='/api/v5/trade/close-position',_0x46811c=_0x261d76;_0x46811c['tag']=this[_0x47b755(0x3a1)](this['br']),_0x46811c['clOrdId']=_0x261d76[_0x47b755(0x44e)]||_0x46811c[_0x47b755(0x301)]+this[_0x47b755(0x2a9)]();let _0x54be9c=await this[_0x47b755(0x1df)](_0x47b755(0x352),_0x32fd9b,_0x46811c);return await this[_0x47b755(0x20a)](_0x54be9c,_0x46811c,_0x32fd9b,_0x23421c||undefined);}async[a10_0x1cfb44(0x448)](_0x53533d,_0x4e4abc){const _0x55425b=a10_0x1cfb44;let _0x2d58e1='/api/v5/account/positions-history',_0x1a0a11=_0x2d58e1;if(_0x53533d&&Object['keys'](_0x53533d)[_0x55425b(0x361)]>0x0){let _0x1bf4bb=new Array();_0x2d58e1=_0x2d58e1+'?';for(const _0x4fcf16 in _0x53533d){_0x55425b(0x3d7)==='AVfyH'?_0x1bf4bb[_0x55425b(0x320)](_0x4fcf16+'='+_0x53533d[_0x4fcf16]):_0xc471b['push'](_0x4edd0f+'='+_0xcc83b4[_0x151676]);}_0x1a0a11=_0x2d58e1+_0x1bf4bb[_0x55425b(0x40d)]('&');}let _0x533b4d=await this[_0x55425b(0x1df)]('GET',_0x1a0a11,'');return await this[_0x55425b(0x333)](_0x533b4d,_0x1a0a11,_0x4e4abc||undefined);}async['getAccountPosAndRisk'](_0x1113c6,_0x225abe){const _0x10a839=a10_0x1cfb44;let _0x11c924=_0x10a839(0x28d),_0xb34548=_0x11c924;if(_0x1113c6&&Object[_0x10a839(0x38d)](_0x1113c6)[_0x10a839(0x361)]>0x0){let _0x521f4=new Array();_0x11c924=_0x11c924+'?';for(const _0x584cbf in _0x1113c6){_0x521f4[_0x10a839(0x320)](_0x584cbf+'='+_0x1113c6[_0x584cbf]);}_0xb34548=_0x11c924+_0x521f4[_0x10a839(0x40d)]('&');}let _0x12ca02=await this[_0x10a839(0x1df)]('GET',_0xb34548,'');return await this[_0x10a839(0x333)](_0x12ca02,_0xb34548,_0x225abe||undefined);}async[a10_0x1cfb44(0x384)](_0xdda2c6,_0x477073){const _0x5d28c3=a10_0x1cfb44;let _0x477ae1=_0x5d28c3(0x1a8),_0x387eb1=_0x477ae1;if(_0xdda2c6&&Object[_0x5d28c3(0x38d)](_0xdda2c6)[_0x5d28c3(0x361)]>0x0){if(_0x5d28c3(0x468)!==_0x5d28c3(0x468))throw{'message':_0x5d28c3(0x309)};else{let _0x14211e=new Array();_0x477ae1=_0x477ae1+'?';for(const _0x577f98 in _0xdda2c6){_0x14211e['push'](_0x577f98+'='+_0xdda2c6[_0x577f98]);}_0x387eb1=_0x477ae1+_0x14211e[_0x5d28c3(0x40d)]('&');}}let _0x354ddb=await this['createAuthHeader'](_0x5d28c3(0x1de),_0x387eb1,'');return await this[_0x5d28c3(0x333)](_0x354ddb,_0x387eb1,_0x477073||undefined);}async[a10_0x1cfb44(0x498)](_0x13e520,_0x1b28ce){const _0x12dfbe=a10_0x1cfb44;let _0x5ae346=_0x12dfbe(0x341),_0x303de1=_0x5ae346;if(_0x13e520&&Object[_0x12dfbe(0x38d)](_0x13e520)[_0x12dfbe(0x361)]>0x0){let _0x48baa1=new Array();_0x5ae346=_0x5ae346+'?';for(const _0x204097 in _0x13e520){_0x12dfbe(0x456)!==_0x12dfbe(0x456)?_0x4aa796[_0x12dfbe(0x320)](_0x7e457+'='+_0x2f3abb[_0x27d4cc]):_0x48baa1[_0x12dfbe(0x320)](_0x204097+'='+_0x13e520[_0x204097]);}_0x303de1=_0x5ae346+_0x48baa1['join']('&');}let _0x570d57=await this[_0x12dfbe(0x1df)]('GET',_0x303de1,'');return await this['executeGetRequest'](_0x570d57,_0x303de1,_0x1b28ce||undefined);}async[a10_0x1cfb44(0x3cb)](_0x1992f2){const _0x2ec1c0=a10_0x1cfb44;let _0x124e34='/api/v5/account/config',_0xbb025a=await this[_0x2ec1c0(0x1df)](_0x2ec1c0(0x1de),_0x124e34,'');return await this['executeGetRequest'](_0xbb025a,_0x124e34,_0x1992f2||undefined);}async['setPosMode'](_0x2b7ab9,_0x173c8d){const _0x83fbb8=a10_0x1cfb44;let _0x468270=_0x83fbb8(0x303),_0x4a7283=_0x2b7ab9,_0x5a69f5;if(!_0x2b7ab9)return _0x5a69f5='posMode\x20is\x20a\x20required\x20param',_0x5a69f5;let _0x20845e=await this[_0x83fbb8(0x1df)](_0x83fbb8(0x352),_0x468270,_0x4a7283);return await this[_0x83fbb8(0x20a)](_0x20845e,_0x4a7283,_0x468270,_0x173c8d||undefined);}async[a10_0x1cfb44(0x25f)](_0x24e4d9,_0x2704c7){const _0x1b7d6b=a10_0x1cfb44;let _0x158373=_0x1b7d6b(0x334),_0x171919=_0x24e4d9;if(_0x24e4d9&&(_0x24e4d9['instId']||_0x24e4d9['ccy'])&&_0x24e4d9[_0x1b7d6b(0x362)]&&_0x24e4d9['mgnMode']){let _0x245ce0=await this[_0x1b7d6b(0x1df)]('POST',_0x158373,_0x171919);return await this[_0x1b7d6b(0x20a)](_0x245ce0,_0x171919,_0x158373,_0x2704c7||undefined);}else{if('NDBZC'===_0x1b7d6b(0x24a))throw{'message':'mgnMode,lever,and\x20either\x20instId\x20or\x20ccy\x20are\x20required\x20params}'};else throw{'message':'param\x20apiKey\x20required'};}}async[a10_0x1cfb44(0x271)](_0x4cbd88,_0x37af28){const _0x17e265=a10_0x1cfb44;let _0x3950bd=_0x17e265(0x365),_0x1b0b3c=_0x3950bd,_0x2b475b=new Array();_0x3950bd=_0x3950bd+'?';let _0x4c1e7a;if(_0x4cbd88&&_0x4cbd88['instId']&&_0x4cbd88['tdMode']){if('Ifchn'!==_0x17e265(0x3d6)){if(!(_0x4cbd88[_0x17e265(0x3cf)][_0x17e265(0x339)]==Array&&_0x4cbd88[_0x17e265(0x3cf)][_0x17e265(0x361)]>0x0&&_0x4cbd88[_0x17e265(0x3cf)][_0x17e265(0x361)]<=0x5))throw{'message':'instId\x20must\x20be\x20an\x20array\x20of\x20no\x20more\x20than\x205\x20instIds'};else _0x4c1e7a=_0x4cbd88[_0x17e265(0x3cf)][_0x17e265(0x40d)](','),_0x4cbd88[_0x17e265(0x3cf)]=_0x4c1e7a;for(const _0x4ec836 in _0x4cbd88){_0x2b475b[_0x17e265(0x320)](_0x4ec836+'='+_0x4cbd88[_0x4ec836]);}_0x1b0b3c=_0x3950bd+_0x2b475b['join']('&');}else _0x520763=_0x42bebe+(_0x2971f9=='?'?'':'&'),_0x5dc756=_0x28c6b8+'instType='+_0xdd4b1a[_0x17e265(0x386)];}else throw{'message':'requires\x20instId(s)\x20and\x20tdMode'};let _0x19a21f=await this[_0x17e265(0x1df)](_0x17e265(0x1de),_0x1b0b3c,'');return await this[_0x17e265(0x333)](_0x19a21f,_0x1b0b3c,_0x37af28||undefined);}async['getMaxAvailSize'](_0x457dd3,_0x25b909){const _0x250d7e=a10_0x1cfb44;let _0x1439f4=_0x250d7e(0x3b6),_0x5abbaf=_0x1439f4,_0x3c18a7;if(_0x457dd3&&Object[_0x250d7e(0x38d)](_0x457dd3)['length']>0x0){if(_0x457dd3[_0x250d7e(0x3cf)]&&_0x457dd3[_0x250d7e(0x482)]){if(!(_0x457dd3[_0x250d7e(0x3cf)][_0x250d7e(0x339)]==Array&&_0x457dd3[_0x250d7e(0x3cf)][_0x250d7e(0x361)]>0x0&&_0x457dd3[_0x250d7e(0x3cf)][_0x250d7e(0x361)]<=0x5))throw{'message':_0x250d7e(0x20f)};else _0x3c18a7=_0x457dd3[_0x250d7e(0x3cf)][_0x250d7e(0x40d)](','),_0x457dd3[_0x250d7e(0x3cf)]=_0x3c18a7;let _0x6d19ce=new Array();_0x1439f4=_0x1439f4+'?';for(const _0x1cda50 in _0x457dd3){if('EuNHS'===_0x250d7e(0x3eb))throw{'message':_0x250d7e(0x278)};else _0x6d19ce['pus