@compendiumfi/pendax
Version:
connector for centralized cryptocurrency exchanges
1 lines • 4.23 kB
JavaScript
const a0_0x772d48=a0_0x173f;(function(_0x44b183,_0x117484){const _0xe4bbb5=a0_0x173f,_0x15f59d=_0x44b183();while(!![]){try{const _0x107414=parseInt(_0xe4bbb5(0x11d))/0x1*(-parseInt(_0xe4bbb5(0x112))/0x2)+-parseInt(_0xe4bbb5(0x11e))/0x3+-parseInt(_0xe4bbb5(0xfa))/0x4*(-parseInt(_0xe4bbb5(0x11a))/0x5)+-parseInt(_0xe4bbb5(0xf5))/0x6+parseInt(_0xe4bbb5(0x120))/0x7+-parseInt(_0xe4bbb5(0x10a))/0x8+-parseInt(_0xe4bbb5(0x10d))/0x9*(-parseInt(_0xe4bbb5(0xf6))/0xa);if(_0x107414===_0x117484)break;else _0x15f59d['push'](_0x15f59d['shift']());}catch(_0x20642c){_0x15f59d['push'](_0x15f59d['shift']());}}}(a0_0x565a,0xbba9c));import a0_0x2adac7 from'axios';function a0_0x173f(_0x4358c1,_0x180010){const _0x565aaa=a0_0x565a();return a0_0x173f=function(_0x173f91,_0x41f28f){_0x173f91=_0x173f91-0xf4;let _0x308672=_0x565aaa[_0x173f91];return _0x308672;},a0_0x173f(_0x4358c1,_0x180010);}import a0_0x54cb17 from'crypto';import{BinanceSocket}from'../sockets/binancesocket.js';function a0_0x565a(){const _0x4d691c=['678620ZvaIeZ','https://api.binance.com','createHeader','53191RSptjb','4095894PbTZAD','GET','10434655tzHOnw','&signature=','TRADE','filter','apiKey','2310978raXCyj','162090mdglcI','futuresMarginType','label','push','36izOloC','formatQuery','log','Hmac','hex','queryString','sockets','executeRequest','binance','url','createSignature','update','testConnectivity','timestamp','join','length','6455576ztDLir','digest','sha256','459ywtAjj','includes','secret','exchange','recvWindow=','8daFYVJ','publicApis','margintype','authenticate','usdt','×tamp=','key','keys'];a0_0x565a=function(){return _0x4d691c;};return a0_0x565a();}import a0_0x12ee2e from'short-unique-id';export class Binance{[a0_0x772d48(0x113)]=new Array();[a0_0x772d48(0x100)]={};constructor(_0x1a15a4){const _0x29b081=a0_0x772d48;this['url']=_0x29b081(0x11b),this['authenticate']=_0x1a15a4[_0x29b081(0x115)]==undefined?!![]:_0x1a15a4[_0x29b081(0x115)],this['name']=_0x1a15a4['exchange']['exchangename']==undefined?_0x29b081(0x102):_0x1a15a4['exchange']['exchangename'],this['exchangeid']=_0x1a15a4[_0x29b081(0x110)]['id'],this[_0x29b081(0xf4)]=_0x1a15a4[_0x29b081(0x118)]==undefined?'':_0x1a15a4[_0x29b081(0x118)],this['apiSecret']=_0x1a15a4[_0x29b081(0x10f)]==undefined?'':_0x1a15a4[_0x29b081(0x10f)],this['label']=_0x1a15a4[_0x29b081(0xf8)],this[_0x29b081(0xf7)]=_0x1a15a4[_0x29b081(0x114)]?_0x1a15a4[_0x29b081(0x114)]:_0x29b081(0x116),this['publicApis'][_0x29b081(0xf9)]([_0x29b081(0x106),'getServerTime']);}async[a0_0x772d48(0x11c)](){let _0x35634c={'X-MBX-APIKEY':this['apiKey']};return _0x35634c;}[a0_0x772d48(0x104)](_0x594997,_0x54f07f){const _0x256222=a0_0x772d48;return a0_0x54cb17[_0x256222(0xfd)](_0x256222(0x10c),_0x54f07f)[_0x256222(0x105)](_0x594997)[_0x256222(0x10b)](_0x256222(0xfe));}async[a0_0x772d48(0x101)](_0x30f1f3,_0x82c29e,_0x5bd4f4,_0x82ce77){const _0x1d7e2c=a0_0x772d48;let _0x245b63=Date['now'](),_0x5cad25=await this['createHeader']();const _0x451cb5=0x1388;let _0x2a7eb9=_0x82ce77!=null?_0x5bd4f4[_0x1d7e2c(0x123)](_0x38b91d=>!Object[_0x1d7e2c(0x119)](_0x82ce77)[_0x1d7e2c(0x10e)](_0x38b91d)):_0x5bd4f4;if(_0x2a7eb9[_0x1d7e2c(0x109)]==0x0){let _0x34d1f5=new Array();for(const _0xf3fdd9 in _0x82ce77){_0x34d1f5[_0x1d7e2c(0xf9)](_0xf3fdd9+'='+_0x82ce77[_0xf3fdd9]);}let _0x382880=this[_0x1d7e2c(0xfb)]({'timestamp':_0x245b63,'recvWindow':_0x451cb5,'queryString':_0x34d1f5},_0x1d7e2c(0x122)),_0x5cadfc={'baseURL':this[_0x1d7e2c(0x103)],'url':_0x30f1f3+_0x382880,'method':_0x82c29e,'headers':_0x5cad25};console[_0x1d7e2c(0xfc)](_0x5cadfc);const _0x33fc6b=await a0_0x2adac7(_0x5cadfc);return _0x33fc6b;}else throw{'message':'Missing\x20params:\x20'+_0x2a7eb9[_0x1d7e2c(0x108)](',')};}async[a0_0x772d48(0x106)](){const _0x6bcdd9=a0_0x772d48,_0x2abca6=await this[_0x6bcdd9(0x101)]('/api/v3/ping?',_0x6bcdd9(0x11f),[]);return _0x2abca6;}[a0_0x772d48(0xfb)](_0x3d40f0){const _0x4daa2e=a0_0x772d48;let _0x4b8178=_0x3d40f0[_0x4daa2e(0xff)][_0x4daa2e(0x108)]('&');_0x4b8178!=''&&(_0x4b8178=_0x4b8178+'&');_0x4b8178=_0x4b8178+_0x4daa2e(0x111)+_0x3d40f0['recvWindow']+_0x4daa2e(0x117)+_0x3d40f0[_0x4daa2e(0x107)];let _0x21afee=this[_0x4daa2e(0x104)](_0x4b8178,this['apiSecret']);return _0x4b8178=_0x4b8178+_0x4daa2e(0x121)+_0x21afee,_0x4b8178;}}