UNPKG

@compendiumfi/pendax

Version:

connector for centralized cryptocurrency exchanges

1 lines 71.1 kB
const a5_0x1df344=a5_0x5d98;(function(_0x5ae848,_0x1dae8c){const _0x568b72=a5_0x5d98,_0x9523f5=_0x5ae848();while(!![]){try{const _0x20d3ad=parseInt(_0x568b72(0x185))/0x1+parseInt(_0x568b72(0x171))/0x2*(parseInt(_0x568b72(0x1d0))/0x3)+parseInt(_0x568b72(0x199))/0x4+-parseInt(_0x568b72(0x175))/0x5*(-parseInt(_0x568b72(0x23f))/0x6)+-parseInt(_0x568b72(0x14c))/0x7*(-parseInt(_0x568b72(0x1cc))/0x8)+parseInt(_0x568b72(0x14d))/0x9+-parseInt(_0x568b72(0x17b))/0xa*(parseInt(_0x568b72(0x188))/0xb);if(_0x20d3ad===_0x1dae8c)break;else _0x9523f5['push'](_0x9523f5['shift']());}catch(_0x37198a){_0x9523f5['push'](_0x9523f5['shift']());}}}(a5_0xefe1,0xd4e14));import a5_0x102d4f from'axios';import a5_0x2e94e0 from'crypto';function a5_0xefe1(){const _0x539438=['orders/by_client_id/','getAllBalances','changeAccountLeverage','iwglL','orderType','false','useProxy','orders','hex','GET','UhdLY','baseUrl','/api/','expired_futures','getOpenOrders','aOXEL','secret','AAaGb','token_name\x20is\x20a\x20required\x20param','subaccounts/update_name','DvGmE','order_id','createPlaceSpotOrderBody','/candles?resolution=','wallet/all_balances','VXjmS','createTransferBody','?market=','nLMRR','FJPtd','futures/','optionsCreateQuote','market=','UvVzp','cancelOpenTriggerOrder','data','wallet/coins','walletRequestWithdrawal','funding_payments','POST','address','getOpenTriggerOrders','gHIWs','dhsyTW5!ysh8IuysQKcG45','update','indexOf','account/leverage','getOrderStatusByClientId','FTX-SIGN','requestId\x20is\x20a\x20required\x20param','DELETE','optionsListQuoteRequests','hoqPM','side','clientId','YStby','aIEwV','apiSecret','uri','walletGetWithdrawalHistory','openClosed','balances','subaccounts','bQDpJ','includes','UfvoJ','options/requests/','getFundingRates','response','executeGetRequest','xcjiv','Hmac','fwIdT','/weights','positionType\x20OPTION\x20not\x20supported','kMuUR','getFuture','ceGpF','getCurrentFundingRate','vLyxG','modifyTriggerOrderBody','gxwOI','orders/','?showAvgPrice=','constructor','wallet/balances','spot','lt/balances','hVRlm','createSubaccount','historical_balances/requests','yWHwv','https://ftx.com/api/','getFills','yAqiN','getPositionsNative','optionsGetQuotesForQuoteRequest','walletGetDepositHistory','/orderbook?depth=','/stats','getHistoricalPrices','/quotes','open','token_name\x20and\x20size\x20are\x20required\x20params','isMain','url','apiKey','subaccount\x20must\x20match\x20exchange\x20subaccount','end_time=','YICbi','requestHistoricalBalancesAndPositions','listLeveragedTokens','changeSubaccountName','target','changeAccountLeverageBody','35biRWQj','2040435OwYjpD','body','executeOrder','auystrAAS2iW85#s2@jdDC','foCcy','Parameter\x20\x22market\x22\x20not\x20submitted','scXQe','DYTbU','getExpiredFutures','Utf8','getAllPositions','filter','connectSocket','euRIj','options:\x20showAvgPrice\x20(if\x20submitted)\x20must\x20be\x20\x27true\x27\x20or\x20\x27false\x27','EOipM','lt/creations','/redeem','parse','getDepositAddress','requestId\x20and\x20price\x20are\x20required\x20params','yxEpU','balancer','getOrderHistory','TUmOh','PsyNM','sockets','JWhov','showAvgPrice','sizZA','positions','EpLfx','nURsN','future=','getIndexWeights','Base64','162138VJJTrk','esakr','createPlaceBody','IRosN','5uXQhFo','gavjX','coin','pNjUw','enc','/modify','2290TcTojm','placeOrder','rnYVV','baseURL','options:\x20markets\x20(if\x20submitted)\x20must\x20be\x20an\x20array\x20of\x20token-names','name','true','slice','conditional_orders','proxy','780712pPKKMB','LPcYg','/lt/','173833leCmSt','hbmkh','modifyOrderByClientId','SUKVA','not\x20found','sihaQ','/triggers','OSyBa','underlying','LxrUE','BYdes','market','uRJWk','pIhEb','requestRedeemLeveragedToken','margin','token_name','2887596gSHCdV','cancelOrder','jnXjz','getLiveOrders','string','dec','QhXTM','HlNQD','authenticate','No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters','listLeveragedTokenRedemptionRequests','rVnDT','cancelAllOrders','orderId=','deleteSubaccount','key','HHcdo','headers','uVEHL','XanFk','result','aZLrd','start_time=','funding_rates','lYXCq','rate','/proxy/post','wallet/deposit_address/list','length','push','requestId','tydIB','TVNRM','JVUTB','aUDCw','CoVar','request_id','modifyOrder','ITchF','fxCtk','depth','pQmzD','EHHtd','now','createGetDepositAddressListBody','strike','stringify','index_constituents/','listAllFutures','label','openInterest','2507280rDQWCn','expiry','futures','GvCbe','24PxUied','conditional_orders/','?method=','qRgBr','getOpenInterest','KrCKl','getCoins','wallet/deposit_address/','index_name','underlying,\x20type,\x20strike,\x20expiry,\x20side,\x20and\x20size\x20are\x20all\x20required\x20params','requires\x20order_Id','resolution','option','DXKdR','TFVXf','getAllSubaccounts','subaccounts/','AES','gmMTD','GET/api/','TiPHL','createHistoricalBalAndPosBody','join','requires\x20clientId','gCckG','size','tokens','createGetHeader','options/my_requests','/proxy/delete','decrypt','markets','publicApis','type=','AsSTU','sLdOk','order','type','getTriggerOrderHistory','QbHZw','createSubaccountBody','entries','exchange','getMarkets','positionType','requires\x20orderId','cancelOrderByClientId','triggerOrder','requires\x20price\x20or\x20size\x20or\x20both','LqiUp','createPostHeader','/proxy/get','getHistoricalIndex','modifyTriggerOrder','GOSzl','future','getTrades','wallet/deposits','price','deleteSubaccountData','VGMqy','subaccount','GCloy','VBkrT','FTX-TS','GHEtb','posData','market_name','externalReferralProgram','BaBjY','order_Id','indexes/','&start_time=','rQaAY','JbEcf','exchangename','AQwyY','Ekcoq','geQMb','this\x20function\x20can\x20only\x20be\x20called\x20from\x20a\x20main\x20account','future_name','changeSubaccountNameBody','account','proxyPort','Array','toLowerCase','qjbYH','wallet/withdrawals','markets/','parameter\x20must\x20be\x20an\x20array\x20of\x20tokens','requestCreateLeveragedToken','&end_time=','getTriggerOrderTriggers','/trades','getBalances','getFutureStats','TAQfq','SbrRH','end_time','getAccountInfo','getMarket','McTtN','getDepositAddressList','sha256','getIndexConstituents','closed','coin,\x20size\x20and\x20address\x20are\x20all\x20required\x20params','nickname','LljrK','deleteRequest','http://','3275490kcioya','HPtkX','order=','method','toString','orderId','start_time','gsVaQ','SsoDA','YvodH','positionType\x20not\x20supported:\x20','Xnwyp','digest','conditional_orders/history','optionsMyQuoteRequests','balData'];a5_0xefe1=function(){return _0x539438;};return a5_0xefe1();}function a5_0x5d98(_0x114239,_0x51bdc2){const _0xefe10c=a5_0xefe1();return a5_0x5d98=function(_0x5d98c7,_0xa91ea8){_0x5d98c7=_0x5d98c7-0x133;let _0x388b7a=_0xefe10c[_0x5d98c7];return _0x388b7a;},a5_0x5d98(_0x114239,_0x51bdc2);}import a5_0xec123c from'crypto-js';import{FtxSocket}from'../sockets/ftxsocket.js';export class Ftx{[a5_0x1df344(0x1f0)]=new Array();['ky']=a5_0x1df344(0x150);['i']=a5_0x1df344(0x27a);[a5_0x1df344(0x167)]={};constructor(_0x292030){const _0x1d1a33=a5_0x1df344;this[_0x1d1a33(0x142)]=_0x1d1a33(0x135),this[_0x1d1a33(0x1a1)]=_0x292030['authenticate']==undefined?!![]:_0x292030[_0x1d1a33(0x1a1)],this[_0x1d1a33(0x180)]=_0x292030[_0x1d1a33(0x1fa)][_0x1d1a33(0x21b)]==undefined?'ftx':_0x292030['exchange'][_0x1d1a33(0x21b)],this['exchangeid']=_0x292030[_0x1d1a33(0x1fa)]['id'],this[_0x1d1a33(0x1ca)]=_0x292030['label'];if(this[_0x1d1a33(0x1a1)]){if(_0x1d1a33(0x246)===_0x1d1a33(0x19f))_0x1caa02='end_time='+_0x385571[_0x1d1a33(0x232)],_0x5219f8['slice'](-0x1)=='?'?_0x2b8e1c=_0x9f36d8+_0x120c39:_0x2c3dd9=_0x2c6c4d+'&'+_0x429834;else{if(!_0x292030['key']||!_0x292030['secret']||_0x292030[_0x1d1a33(0x1a8)]==''||_0x292030[_0x1d1a33(0x25f)]==''){if(_0x1d1a33(0x215)!==_0x1d1a33(0x29c))throw'authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret';else throw'subaccount\x20must\x20match\x20exchange\x20subaccount';}this['apiKey']=_0x292030[_0x1d1a33(0x1a8)],this[_0x1d1a33(0x288)]=_0x292030[_0x1d1a33(0x25f)],this[_0x1d1a33(0x141)]=_0x292030['subaccount']==undefined,this['subaccount']=this[_0x1d1a33(0x141)]?'':_0x292030[_0x1d1a33(0x20d)],this['futuresMarginType']='na';}}this[_0x1d1a33(0x255)]=![],this[_0x1d1a33(0x163)]=_0x292030[_0x1d1a33(0x163)]||undefined,_0x292030['useProxy']&&((_0x292030[_0x1d1a33(0x184)]&&_0x292030[_0x1d1a33(0x184)]!=''||_0x292030[_0x1d1a33(0x163)]&&_0x292030[_0x1d1a33(0x163)]!='')&&(this[_0x1d1a33(0x255)]=!![],this[_0x1d1a33(0x184)]=_0x292030[_0x1d1a33(0x184)],_0x292030[_0x1d1a33(0x223)]?'Hecax'!==_0x1d1a33(0x16c)?this[_0x1d1a33(0x223)]=_0x292030[_0x1d1a33(0x223)]:_0x53cb9d=![]:this[_0x1d1a33(0x223)]=0xbb8)),this['ri']='lyQBz2wseWT6vT7XDyp9DQ==',this['publicApis'][_0x1d1a33(0x1b6)](_0x1d1a33(0x208),'getHistoricalPrices',_0x1d1a33(0x1fb),_0x1d1a33(0x234),_0x1d1a33(0x1c9),_0x1d1a33(0x29b),_0x1d1a33(0x22f),'getFundingRates','getIndexWeights',_0x1d1a33(0x155),_0x1d1a33(0x204),_0x1d1a33(0x238),'ltGetTokenInfo',_0x1d1a33(0x148),_0x1d1a33(0x1d4),_0x1d1a33(0x29d),'getNextFundingRate');}[a5_0x1df344(0x19e)]=_0x38a0dd=>{const _0x36403d=a5_0x1df344;if(_0x38a0dd==null)return undefined;const _0x3ecf00=a5_0xec123c[_0x36403d(0x179)][_0x36403d(0x170)]['parse'](this['ky']),_0x478c84=a5_0xec123c['enc'][_0x36403d(0x170)][_0x36403d(0x15f)](this['i']);return a5_0xec123c[_0x36403d(0x1e1)]['decrypt'](_0x38a0dd,_0x3ecf00,{'iv':_0x478c84})['toString'](a5_0xec123c[_0x36403d(0x179)][_0x36403d(0x156)]);};[a5_0x1df344(0x202)](_0x109ecf){const _0x3463ec=a5_0x1df344;let _0x44c46d=Date[_0x3463ec(0x1c4)](),_0x46c929;if(this[_0x3463ec(0x141)]&&_0x109ecf&&_0x109ecf[_0x3463ec(0x20d)])_0x46c929={'FTX-KEY':this['apiKey'],'FTX-TS':_0x44c46d,'FTX-SUBACCOUNT':_0x109ecf['subaccount']};else{if(!this[_0x3463ec(0x141)]&&_0x109ecf&&_0x109ecf[_0x3463ec(0x20d)]&&_0x109ecf[_0x3463ec(0x20d)]==this[_0x3463ec(0x20d)]){if('VUvne'!=='VUvne')throw _0x3463ec(0x21f);else _0x46c929={'FTX-KEY':this[_0x3463ec(0x143)],'FTX-TS':_0x44c46d,'FTX-SUBACCOUNT':_0x109ecf[_0x3463ec(0x20d)]};}else{if(!this[_0x3463ec(0x141)]&&(!_0x109ecf||!_0x109ecf[_0x3463ec(0x20d)]))_0x46c929={'FTX-KEY':this[_0x3463ec(0x143)],'FTX-TS':_0x44c46d,'FTX-SUBACCOUNT':this[_0x3463ec(0x20d)]};else this[_0x3463ec(0x141)]&&(_0x46c929={'FTX-KEY':this[_0x3463ec(0x143)],'FTX-TS':_0x44c46d});}}return _0x46c929;}['createGetHeader'](_0x5e2183){const _0x1bbf56=a5_0x1df344;let _0x12dc0c=Date[_0x1bbf56(0x1c4)](),_0x1460d3;if(this[_0x1bbf56(0x141)]&&_0x5e2183&&_0x5e2183[_0x1bbf56(0x20d)])_0x1460d3={'FTX-KEY':this['apiKey'],'FTX-TS':_0x12dc0c,'FTX-SUBACCOUNT':_0x5e2183[_0x1bbf56(0x20d)]};else{if(!this['isMain']&&_0x5e2183&&_0x5e2183['subaccount']&&_0x5e2183['subaccount']==this[_0x1bbf56(0x20d)]){if(_0x1bbf56(0x28e)==='bQDpJ')_0x1460d3={'FTX-KEY':this[_0x1bbf56(0x143)],'FTX-TS':_0x12dc0c,'FTX-SUBACCOUNT':_0x5e2183['subaccount']};else return{};}else{if(!this[_0x1bbf56(0x141)]&&(!_0x5e2183||!_0x5e2183['subaccount'])){if('sWvct'==='USZWf')return _0xcd39d7[_0x1bbf56(0x293)]['data'][_0x1bbf56(0x14e)]=_0x2b2202,_0xee0623;else _0x1460d3={'FTX-KEY':this[_0x1bbf56(0x143)],'FTX-TS':_0x12dc0c,'FTX-SUBACCOUNT':this[_0x1bbf56(0x20d)]};}else{if(this['isMain'])_0x1460d3={'FTX-KEY':this[_0x1bbf56(0x143)],'FTX-TS':_0x12dc0c};else throw _0x1bbf56(0x144);}}}return _0x1460d3;}['createTriggerBody'](_0x51e1f7){const _0x2dabe8=a5_0x1df344;let _0x2b3f97=_0x51e1f7;return _0x2b3f97[_0x2dabe8(0x214)]=this['dec'](this['ri']),_0x2b3f97;}async[a5_0x1df344(0x1ff)](_0x1d65b7,_0x263d8e){const _0x421233=a5_0x1df344;let _0x30a7e3=this['createPostHeader'](_0x1d65b7),_0x2defca=this['createTriggerBody'](_0x1d65b7),_0x31228d=_0x421233(0x183),_0x57252f=_0x30a7e3[_0x421233(0x210)]+_0x421233(0x276)+_0x421233(0x25b)+_0x31228d+JSON['stringify'](_0x2defca);const _0x14e0f9=a5_0x2e94e0[_0x421233(0x296)](_0x421233(0x237),this[_0x421233(0x288)])[_0x421233(0x27b)](_0x57252f)[_0x421233(0x24b)](_0x421233(0x257));_0x30a7e3[_0x421233(0x27f)]=_0x14e0f9;try{if(_0x421233(0x20c)===_0x421233(0x231)){let _0x1fe71b=_0x996a4a[_0x421233(0x272)][_0x421233(0x272)]?_0x1025fc[_0x421233(0x272)]['data']:_0x33fff0['data'];delete _0x301fc8[_0x421233(0x272)],_0x2b3431[_0x421233(0x272)]=_0x1fe71b;}else{const _0xdcb345=await this[_0x421233(0x14f)](_0x30a7e3,_0x2defca,_0x31228d,_0x263d8e||undefined);return _0xdcb345;}}catch(_0x95259a){return _0x95259a[_0x421233(0x293)][_0x421233(0x272)][_0x421233(0x14e)]=_0x2defca,_0x95259a;}}[a5_0x1df344(0x173)](_0x191662){const _0xd6dd74=a5_0x1df344;let _0x2abb4e=_0x191662;return _0x2abb4e[_0xd6dd74(0x214)]=this['dec'](this['ri']),_0x2abb4e[_0xd6dd74(0x1f5)]==_0xd6dd74(0x193)&&('tFTFV'===_0xd6dd74(0x23c)?_0x430b96[_0xd6dd74(0x1aa)]={'target':this[_0xd6dd74(0x142)],'uri':_0x3d46a0[_0xd6dd74(0x142)],'body':_0x21915f}:_0x2abb4e['price']=null),_0x2abb4e;}async[a5_0x1df344(0x17c)](_0x24f392,_0x5077a8){const _0x42f90c=a5_0x1df344;let _0x245a42=this[_0x42f90c(0x202)](_0x24f392),_0x1c7af6=this[_0x42f90c(0x173)](_0x24f392),_0x173451=_0x42f90c(0x256),_0x2056cf=_0x245a42[_0x42f90c(0x210)]+'POST'+_0x42f90c(0x25b)+_0x173451+JSON[_0x42f90c(0x1c7)](_0x1c7af6);const _0x1a7d2a=a5_0x2e94e0[_0x42f90c(0x296)](_0x42f90c(0x237),this[_0x42f90c(0x288)])[_0x42f90c(0x27b)](_0x2056cf)[_0x42f90c(0x24b)]('hex');_0x245a42[_0x42f90c(0x27f)]=_0x1a7d2a;try{if('DETlg'===_0x42f90c(0x247))_0x5219cf=_0x293fbf+_0x42f90c(0x1af)+_0xb16bfe[_0x42f90c(0x245)],_0x4632e6[_0x42f90c(0x232)]&&(_0x2ce1f4=_0x5d29f1+'&'+'end_time='+_0x4ee8a6[_0x42f90c(0x232)]);else{const _0x1f65b6=await this[_0x42f90c(0x14f)](_0x245a42,_0x1c7af6,_0x173451,_0x5077a8||undefined);return _0x1f65b6;}}catch(_0x29a078){return _0x29a078['response'][_0x42f90c(0x272)][_0x42f90c(0x14e)]=_0x1c7af6,_0x29a078;}}async[a5_0x1df344(0x14f)](_0x537e12,_0x427580,_0x441cb9,_0x206cd0){const _0x199f6a=a5_0x1df344;let _0x1d9875={'baseURL':this[_0x199f6a(0x142)],'url':_0x441cb9,'method':_0x199f6a(0x276),'headers':_0x537e12};const _0x143ec9=_0x427580?JSON[_0x199f6a(0x1c7)](_0x427580):'';this['useProxy']?(_0x537e12==''?_0x1d9875[_0x199f6a(0x1aa)]={'target':this[_0x199f6a(0x142)],'uri':_0x1d9875[_0x199f6a(0x142)],'body':_0x143ec9}:(_0x1d9875[_0x199f6a(0x1aa)][_0x199f6a(0x14a)]=this['url'],_0x1d9875[_0x199f6a(0x1aa)][_0x199f6a(0x289)]=_0x1d9875[_0x199f6a(0x142)],_0x1d9875['headers'][_0x199f6a(0x14e)]=_0x143ec9),this[_0x199f6a(0x163)]?(_0x1d9875[_0x199f6a(0x1aa)][_0x199f6a(0x25a)]=this[_0x199f6a(0x142)],_0x1d9875[_0x199f6a(0x17e)]=_0x199f6a(0x23e)+this['balancer']+':'+this[_0x199f6a(0x223)]):_0x1d9875[_0x199f6a(0x17e)]=_0x199f6a(0x23e)+this[_0x199f6a(0x184)]+':'+this[_0x199f6a(0x223)],_0x1d9875[_0x199f6a(0x142)]=_0x199f6a(0x1b3)):_0x199f6a(0x1ac)!==_0x199f6a(0x192)?_0x1d9875[_0x199f6a(0x272)]=_0x427580:(_0x2ce70c=_0x2ae791+(_0x9e5d80=='?'?'':'&'),_0x51b0fa=_0x5f1013+'end_time='+_0x5c7cfe['end_time']);try{if('EHHtd'===_0x199f6a(0x1c3)){const _0x33ca2a=await a5_0x102d4f(_0x1d9875);if(!_0x33ca2a)throw _0x199f6a(0x1a2);if(this[_0x199f6a(0x255)]){let _0xe7c162=_0x33ca2a[_0x199f6a(0x272)][_0x199f6a(0x272)]?_0x33ca2a[_0x199f6a(0x272)][_0x199f6a(0x272)]:_0x33ca2a[_0x199f6a(0x272)];delete _0x33ca2a[_0x199f6a(0x272)],_0x33ca2a['data']=_0xe7c162;}if(_0x206cd0&&['1','2','3','4','5','6'][_0x199f6a(0x28f)](_0x206cd0))switch(_0x206cd0){case'1':if(_0x33ca2a[_0x199f6a(0x272)]['data'])return _0x33ca2a[_0x199f6a(0x272)][_0x199f6a(0x272)];else{if(_0x199f6a(0x153)!==_0x199f6a(0x178))return _0x33ca2a[_0x199f6a(0x272)];else{if(_0xe945e3==null)return _0x89c43c;const _0x1f14f4=_0x2da173[_0x199f6a(0x179)][_0x199f6a(0x170)][_0x199f6a(0x15f)](this['ky']),_0x139641=_0x2aac2c[_0x199f6a(0x179)]['Base64'][_0x199f6a(0x15f)](this['i']);return _0x38a500[_0x199f6a(0x1e1)][_0x199f6a(0x1ee)](_0x5742ac,_0x1f14f4,{'iv':_0x139641})[_0x199f6a(0x243)](_0x406c2c[_0x199f6a(0x179)][_0x199f6a(0x156)]);}}break;case'2':return _0x33ca2a[_0x199f6a(0x272)];break;case'3':return _0x33ca2a;break;case'4':if(_0x33ca2a[_0x199f6a(0x272)][_0x199f6a(0x272)]){if(_0x199f6a(0x168)!==_0x199f6a(0x1f3))return{'result':_0x33ca2a[_0x199f6a(0x272)]['data'],'body':_0x427580};else _0x1d7e92[_0x199f6a(0x272)]=_0x35c1d1;}else{if('oIaYZ'!=='xrras')return{'result':_0x33ca2a[_0x199f6a(0x272)],'body':_0x427580};else _0x1b4525&&_0x32ef54[_0x199f6a(0x1b5)]>0x0&&(_0x3b0cb0[_0x199f6a(0x24e)]=_0x4c3686);}break;case'5':return{'result':_0x33ca2a[_0x199f6a(0x272)],'body':_0x427580};break;case'6':return{'result':_0x33ca2a,'body':_0x427580};break;}if(_0x33ca2a['data']['data']){if('hVRlm'!==_0x199f6a(0x2a7))_0x12a5f9[_0x199f6a(0x1ef)]&&_0x4cf639[_0x199f6a(0x177)]&&_0x5bf11e[_0x199f6a(0x1ef)]['indexOf'](_0x43f1d8[_0x199f6a(0x177)])==-0x1&&(_0x21f932=![]);else return{'result':_0x33ca2a['data'][_0x199f6a(0x272)],'body':_0x427580};}else{if('EZxEz'!=='dwhPi')return{'result':_0x33ca2a[_0x199f6a(0x272)],'body':_0x427580};else throw{'message':_0x199f6a(0x140)};}}else throw _0x199f6a(0x1a2);}catch(_0x6b796e){return _0x199f6a(0x206)===_0x199f6a(0x15c)?(_0x326bf3=_0x10c260||{},_0x5056d8['key']=this[_0x199f6a(0x143)],_0x17ed12['secret']=this[_0x199f6a(0x288)],!this[_0x199f6a(0x141)]&&(_0x783db4['subaccount']=this[_0x199f6a(0x20d)]),new _0x56d339(_0x2e992b)):_0x6b796e;}}async[a5_0x1df344(0x294)](_0xd096e,_0x213271,_0x3f0f7b){const _0x44f48f=a5_0x1df344;let _0x3d3779={'baseURL':this[_0x44f48f(0x142)],'url':_0x213271,'method':_0x44f48f(0x258),'headers':_0xd096e};if(this[_0x44f48f(0x255)]){if(_0x44f48f(0x1d3)!==_0x44f48f(0x172)){_0xd096e==''?_0x3d3779[_0x44f48f(0x1aa)]={'target':this[_0x44f48f(0x142)],'uri':_0x3d3779['url']}:'hnwkk'===_0x44f48f(0x1bc)?(_0x32dc0d=_0x221d65+(_0x270524=='?'?'':'&'),_0x4f3478=_0x497713+_0x44f48f(0x1a6)+_0x169d18[_0x44f48f(0x244)]):(_0x3d3779[_0x44f48f(0x1aa)][_0x44f48f(0x14a)]=this[_0x44f48f(0x142)],_0x3d3779[_0x44f48f(0x1aa)][_0x44f48f(0x289)]=_0x3d3779['url']);if(this[_0x44f48f(0x163)]){if('HPtkX'!==_0x44f48f(0x240))return{'future':_0xdc005e['result'][0x0][_0x44f48f(0x207)],'rate':_0x1755d2[_0x44f48f(0x1ad)][0x0][_0x44f48f(0x1b2)]};else _0x3d3779[_0x44f48f(0x1aa)][_0x44f48f(0x25a)]=this[_0x44f48f(0x142)],_0x3d3779[_0x44f48f(0x17e)]='http://'+this[_0x44f48f(0x163)]+':'+this[_0x44f48f(0x223)];}else{if(_0x44f48f(0x19b)!=='kTQQO')_0x3d3779['baseURL']=_0x44f48f(0x23e)+this[_0x44f48f(0x184)]+':'+this[_0x44f48f(0x223)];else{let _0x57f035=_0x450467;return delete _0x8bd086[_0x44f48f(0x20d)],_0x57f035;}}_0x3d3779['url']=_0x44f48f(0x203);}else throw _0x44f48f(0x1fd);}try{const _0x2f1092=await a5_0x102d4f(_0x3d3779);if(!_0x2f1092)throw'No\x20response\x20from\x20exchange\x20-\x20double\x20check\x20parameters';if(_0x3f0f7b&&['1','2','3']['includes'](_0x3f0f7b)){if(_0x44f48f(0x286)===_0x44f48f(0x279))_0x470a4f=_0x7d7ae2+(_0x3b609e=='?'?'':'&'),_0x1a4447=_0x15b80d+_0x44f48f(0x1af)+_0x6097a9[_0x44f48f(0x245)];else switch(_0x3f0f7b){case'1':if(_0x2f1092[_0x44f48f(0x272)][_0x44f48f(0x272)])return _0x2f1092[_0x44f48f(0x272)]['data'];else _0x2f1092['data'][_0x44f48f(0x1ad)]&&_0x2f1092[_0x44f48f(0x272)][_0x44f48f(0x1ad)];break;case'2':return _0x2f1092[_0x44f48f(0x272)];break;case'3':return _0x2f1092;break;}}if(_0x2f1092[_0x44f48f(0x272)][_0x44f48f(0x272)]){if('VCJBF'!=='VCJBF')throw _0x44f48f(0x1e7);else return _0x2f1092[_0x44f48f(0x272)][_0x44f48f(0x272)][_0x44f48f(0x1ad)]?_0x2f1092[_0x44f48f(0x272)][_0x44f48f(0x272)][_0x44f48f(0x1ad)]:_0x2f1092[_0x44f48f(0x272)][_0x44f48f(0x272)];}else{if(_0x2f1092[_0x44f48f(0x272)]['result'])return _0x2f1092['data']['result'];}}catch(_0x354056){return _0x44f48f(0x20e)!=='PQbwA'?_0x354056:{'result':_0x2828df['data'],'body':_0x60924f};}}async[a5_0x1df344(0x23d)](_0x2a9749,_0x346500,_0x4f3cc9,_0xfdca6c){const _0x13b9b1=a5_0x1df344;let _0x21d3ba={'baseURL':this[_0x13b9b1(0x142)],'url':_0x4f3cc9,'method':_0x13b9b1(0x281),'headers':_0x2a9749};const _0x441b69=_0x346500?JSON['stringify'](_0x346500):'';if(this[_0x13b9b1(0x255)]){if(_0x13b9b1(0x235)!==_0x13b9b1(0x16d))_0x2a9749==''?_0x21d3ba['headers']={'target':this[_0x13b9b1(0x142)],'uri':_0x21d3ba['url'],'body':_0x441b69}:(_0x21d3ba['headers'][_0x13b9b1(0x14a)]=this[_0x13b9b1(0x142)],_0x21d3ba[_0x13b9b1(0x1aa)]['uri']=_0x21d3ba['url'],_0x21d3ba[_0x13b9b1(0x1aa)][_0x13b9b1(0x14e)]=_0x441b69),this[_0x13b9b1(0x163)]?(_0x21d3ba[_0x13b9b1(0x1aa)][_0x13b9b1(0x25a)]=this[_0x13b9b1(0x142)],_0x21d3ba[_0x13b9b1(0x17e)]=_0x13b9b1(0x23e)+this['balancer']+':'+this[_0x13b9b1(0x223)]):_0x21d3ba[_0x13b9b1(0x17e)]=_0x13b9b1(0x23e)+this[_0x13b9b1(0x184)]+':'+this[_0x13b9b1(0x223)],_0x21d3ba[_0x13b9b1(0x142)]=_0x13b9b1(0x1ed);else{if(_0x49b01a[_0x13b9b1(0x1ef)]&&_0x38f040['future']&&_0x5bd2ef['markets']['indexOf'](_0x5acd3b['future'])==-0x1)_0x5099db=![];else{if(_0x20c75c[_0x13b9b1(0x28b)]&&_0x1e4639[_0x13b9b1(0x28b)]['toLowerCase']()=='open'&&_0x49b469[_0x13b9b1(0x1e9)]=='0')_0x179f0e=![];else _0x2cbeb0[_0x13b9b1(0x28b)]&&_0x542a49[_0x13b9b1(0x28b)][_0x13b9b1(0x225)]()=='closed'&&_0xf15838['size']!='0'&&(_0x20e48f=![]);}}}else'SueDD'==='SueDD'?_0x346500&&(_0x21d3ba[_0x13b9b1(0x272)]=_0x346500):_0x1716ae['data']['result'];try{const _0x365754=await a5_0x102d4f(_0x21d3ba);if(!_0x365754){if('BOmUO'!==_0x13b9b1(0x259))throw _0x13b9b1(0x1a2);else _0x726740=_0xf9a8b1+_0x13b9b1(0x26f)+_0x455a39[_0x13b9b1(0x193)];}if(this[_0x13b9b1(0x255)]){if(_0x13b9b1(0x189)===_0x13b9b1(0x189)){let _0x504010=_0x365754[_0x13b9b1(0x272)][_0x13b9b1(0x272)]?_0x365754[_0x13b9b1(0x272)]['data']:_0x365754[_0x13b9b1(0x272)];delete _0x365754[_0x13b9b1(0x272)],_0x365754['data']=_0x504010;}else _0x3fa8cf=_0x490994+'market='+_0x3874b9[_0x13b9b1(0x193)];}if(_0xfdca6c&&['1','2'][_0x13b9b1(0x28f)](_0xfdca6c))switch(_0xfdca6c){case'1':return _0x365754['data'];break;case'2':return _0x365754;break;}return _0x365754[_0x13b9b1(0x272)];}catch(_0x241618){return _0x241618;}}async[a5_0x1df344(0x234)](_0x25b6f1,_0x1d2bb9){const _0x49bcb8=a5_0x1df344;let _0x30270c=_0x49bcb8(0x228),_0x25a4a6=this['url']+_0x30270c+_0x25b6f1;return await this[_0x49bcb8(0x294)]('',_0x25a4a6,_0x1d2bb9||undefined);}async[a5_0x1df344(0x19c)](_0x35c96d,_0x31aa48){const _0x31eb2b=a5_0x1df344;return await this[_0x31eb2b(0x25d)](_0x35c96d,_0x31aa48||undefined);}async['getOpenOrders'](_0x910c88,_0x45feaa){const _0x1d0087=a5_0x1df344;let _0x1d8444=this['createGetHeader'](),_0x463945=_0x1d0087(0x256);if(_0x910c88){if('kMuUR'===_0x1d0087(0x29a))_0x463945=_0x463945+_0x1d0087(0x26a)+_0x910c88;else return _0x46c827;}let _0x1d0348=_0x1d8444['FTX-TS']+_0x1d0087(0x1e3)+_0x463945;const _0x16bb00=a5_0x2e94e0[_0x1d0087(0x296)]('sha256',this['apiSecret'])[_0x1d0087(0x27b)](_0x1d0348)[_0x1d0087(0x24b)](_0x1d0087(0x257));return _0x1d8444[_0x1d0087(0x27f)]=_0x16bb00,await this[_0x1d0087(0x294)](_0x1d8444,_0x463945,_0x45feaa||undefined);}async[a5_0x1df344(0x164)](_0x228dd4,_0x8121c5){const _0x4ce512=a5_0x1df344;let _0x507a85=this[_0x4ce512(0x1eb)](),_0x398ca3='orders/history',_0x1fe65e=Object['entries'](_0x228dd4)['map'](_0x387851=>_0x387851[_0x4ce512(0x1e6)]('='));_0x1fe65e['length']>0x0&&(_0x398ca3=_0x398ca3+'?',_0x398ca3=_0x398ca3+_0x1fe65e[_0x4ce512(0x1e6)]('&'));let _0xbfd871=_0x398ca3,_0x7263c=_0x507a85[_0x4ce512(0x210)]+_0x4ce512(0x1e3)+_0x398ca3;const _0x2d8ca0=a5_0x2e94e0[_0x4ce512(0x296)](_0x4ce512(0x237),this['apiSecret'])[_0x4ce512(0x27b)](_0x7263c)[_0x4ce512(0x24b)](_0x4ce512(0x257));return _0x507a85['FTX-SIGN']=_0x2d8ca0,await this[_0x4ce512(0x294)](_0x507a85,_0xbfd871,_0x8121c5||undefined);}async[a5_0x1df344(0x1df)](_0x16fe77){const _0x604c6e=a5_0x1df344;let _0x55bc13=this['createGetHeader'](),_0x2a9739=_0x604c6e(0x28d),_0x4991fb=_0x55bc13[_0x604c6e(0x210)]+'GET/api/'+_0x2a9739;const _0x308a11=a5_0x2e94e0[_0x604c6e(0x296)]('sha256',this['apiSecret'])[_0x604c6e(0x27b)](_0x4991fb)[_0x604c6e(0x24b)](_0x604c6e(0x257));return _0x55bc13['FTX-SIGN']=_0x308a11,await this['executeGetRequest'](_0x55bc13,_0x2a9739,_0x16fe77||undefined);}['createSubaccountBody'](_0x28cad9){let _0x53fbce=_0x28cad9;return _0x53fbce;}async[a5_0x1df344(0x2a8)](_0x484c61,_0x24f250){const _0x2af0ba=a5_0x1df344;let _0x353fab=this[_0x2af0ba(0x202)](),_0xece986=this[_0x2af0ba(0x1f8)](_0x484c61),_0x262926=_0x2af0ba(0x28d),_0x4fbe62=_0x353fab[_0x2af0ba(0x210)]+_0x2af0ba(0x276)+_0x2af0ba(0x25b)+_0x262926+JSON[_0x2af0ba(0x1c7)](_0xece986);const _0x3d5c75=a5_0x2e94e0[_0x2af0ba(0x296)]('sha256',this['apiSecret'])['update'](_0x4fbe62)[_0x2af0ba(0x24b)](_0x2af0ba(0x257));_0x353fab['FTX-SIGN']=_0x3d5c75;try{if(_0x2af0ba(0x146)!==_0x2af0ba(0x146)){let _0x3fec1d=_0x3fddc5;return _0x3fec1d;}else{const _0x5ed786=await this[_0x2af0ba(0x14f)](_0x353fab,_0xece986,_0x262926,_0x24f250||undefined);return _0x5ed786[_0x2af0ba(0x272)];}}catch(_0x565520){if(_0x2af0ba(0x165)===_0x2af0ba(0x165))return _0x565520[_0x2af0ba(0x293)][_0x2af0ba(0x272)]['body']=_0xece986,_0x565520;else throw{'message':_0x2af0ba(0x1d9)};}}['changeSubaccountNameBody'](_0x25502b){let _0x2d0966=_0x25502b;return _0x2d0966;}async[a5_0x1df344(0x149)](_0x157d1f,_0x42b1ed){const _0x1f0e6c=a5_0x1df344;let _0x4a6413=this[_0x1f0e6c(0x202)](),_0x4835e2=this[_0x1f0e6c(0x221)](_0x157d1f),_0x3861b9=_0x1f0e6c(0x262),_0x3c16a5=_0x4a6413[_0x1f0e6c(0x210)]+_0x1f0e6c(0x276)+_0x1f0e6c(0x25b)+_0x3861b9+JSON[_0x1f0e6c(0x1c7)](_0x4835e2);const _0x42424f=a5_0x2e94e0[_0x1f0e6c(0x296)]('sha256',this[_0x1f0e6c(0x288)])['update'](_0x3c16a5)[_0x1f0e6c(0x24b)](_0x1f0e6c(0x257));_0x4a6413[_0x1f0e6c(0x27f)]=_0x42424f;try{if('TFVXf'===_0x1f0e6c(0x1de)){const _0x2eea5a=await this['executeOrder'](_0x4a6413,_0x4835e2,_0x3861b9,_0x42b1ed||undefined);return _0x2eea5a[_0x1f0e6c(0x272)];}else _0xc2f998[_0x1f0e6c(0x1aa)][_0x1f0e6c(0x14a)]=this[_0x1f0e6c(0x142)],_0xa2375[_0x1f0e6c(0x1aa)][_0x1f0e6c(0x289)]=_0x42ae65['url'],_0x2a000a['headers'][_0x1f0e6c(0x14e)]=_0x77829;}catch(_0x3b7f3d){if(_0x1f0e6c(0x16a)===_0x1f0e6c(0x134))throw _0x1f0e6c(0x1a2);else return _0x3b7f3d[_0x1f0e6c(0x293)][_0x1f0e6c(0x272)]['body']=_0x4835e2,_0x3b7f3d;}}[a5_0x1df344(0x20b)](_0x285991){let _0x4bab0c=_0x285991;return _0x4bab0c;}async[a5_0x1df344(0x1a7)](_0x3e2112,_0x3db460){const _0x1589e8=a5_0x1df344;let _0x42c2aa=this['createPostHeader'](),_0x18ef78=this[_0x1589e8(0x20b)](_0x3e2112),_0x333a0e=_0x1589e8(0x28d),_0x5d1504=_0x42c2aa[_0x1589e8(0x210)]+_0x1589e8(0x281)+_0x1589e8(0x25b)+_0x333a0e+JSON[_0x1589e8(0x1c7)](_0x18ef78);const _0x4cebbf=a5_0x2e94e0[_0x1589e8(0x296)](_0x1589e8(0x237),this[_0x1589e8(0x288)])[_0x1589e8(0x27b)](_0x5d1504)[_0x1589e8(0x24b)]('hex');return _0x42c2aa['FTX-SIGN']=_0x4cebbf,await this['deleteRequest'](_0x42c2aa,_0x18ef78,_0x333a0e,_0x3db460||undefined);}async[a5_0x1df344(0x233)](_0x17e87b){const _0x5eb9dd=a5_0x1df344;let _0x5833cd=this['createGetHeader'](),_0x10f134=_0x5eb9dd(0x222),_0x2d8352=_0x5833cd[_0x5eb9dd(0x210)]+_0x5eb9dd(0x1e3)+_0x10f134;const _0x4977a3=a5_0x2e94e0[_0x5eb9dd(0x296)](_0x5eb9dd(0x237),this[_0x5eb9dd(0x288)])[_0x5eb9dd(0x27b)](_0x2d8352)[_0x5eb9dd(0x24b)]('hex');return _0x5833cd[_0x5eb9dd(0x27f)]=_0x4977a3,await this[_0x5eb9dd(0x294)](_0x5833cd,_0x10f134,_0x17e87b||undefined);}async['getPositions'](_0x2ebe64,_0x27a32e){const _0x4e2650=a5_0x1df344;let _0x5bbf2b=![],_0x465b45=![];if(_0x2ebe64){if(_0x2ebe64[_0x4e2650(0x28b)]&&_0x2ebe64[_0x4e2650(0x28b)][_0x4e2650(0x225)]()!=_0x4e2650(0x13f)&&_0x2ebe64[_0x4e2650(0x28b)][_0x4e2650(0x225)]()!=_0x4e2650(0x239))throw'options:\x20openClosed\x20(if\x20submitted)\x20must\x20be\x20\x27OPEN\x27\x20or\x20\x27CLOSED\x27';if(_0x2ebe64[_0x4e2650(0x1fc)])switch(_0x2ebe64[_0x4e2650(0x1fc)]['toLowerCase']()){case _0x4e2650(0x2a5):if(_0x2ebe64[_0x4e2650(0x1ef)]){if(!(_0x2ebe64['markets'][_0x4e2650(0x2a3)]==Array))throw _0x4e2650(0x17f);}_0x465b45=!![];break;case _0x4e2650(0x207):if(_0x2ebe64[_0x4e2650(0x1ef)]&&!(_0x2ebe64[_0x4e2650(0x1ef)][_0x4e2650(0x2a3)]==Array))throw'options:\x20markets\x20(if\x20submitted)\x20must\x20be\x20an\x20array\x20of\x20market-names';_0x5bbf2b=!![];break;case _0x4e2650(0x197):throw'positionType\x20MARGIN\x20not\x20supported';break;case _0x4e2650(0x1dc):throw _0x4e2650(0x299);break;default:throw _0x4e2650(0x249)+_0x2ebe64[_0x4e2650(0x1fc)];break;}else _0x4e2650(0x26b)!==_0x4e2650(0x1a4)?(_0x465b45=!![],_0x5bbf2b=!![]):_0x57cda1&&(_0xfa29c0[_0x4e2650(0x272)]=_0x5f2bdf);}else'uRJWk'===_0x4e2650(0x194)?(_0x465b45=!![],_0x5bbf2b=!![]):_0x771080[_0x4e2650(0x272)]=_0x363ee4;const _0x29d80e=_0x2ebe64&&_0x2ebe64[_0x4e2650(0x1fc)]?_0x2ebe64[_0x4e2650(0x1fc)]:undefined;let _0x3feba9,_0xcc1c9a,_0x243250={};_0x3feba9=_0x465b45==!![]?await this[_0x4e2650(0x22e)]():undefined;_0x2ebe64&&_0x2ebe64['showAvgPrice']&&(_0x2ebe64['showAvgPrice']==!![]||_0x2ebe64[_0x4e2650(0x169)]==![])?_0xcc1c9a=_0x5bbf2b==!![]?await this[_0x4e2650(0x138)](_0x2ebe64):undefined:'Xnwyp'===_0x4e2650(0x24a)?_0xcc1c9a=_0x5bbf2b==!![]?await this[_0x4e2650(0x138)]():undefined:_0x13751a=_0x53fcc7+'&'+'end_time'+_0x389726['end_time'];if(_0x2ebe64&&_0x2ebe64[_0x4e2650(0x1fc)]&&_0x2ebe64[_0x4e2650(0x1fc)][_0x4e2650(0x225)]()==_0x4e2650(0x2a5)){if(_0x4e2650(0x1cf)!==_0x4e2650(0x137)){if(_0x3feba9&&_0x3feba9[_0x4e2650(0x1b5)]>0x0){if(_0x4e2650(0x1e4)!==_0x4e2650(0x1b1))_0x243250[_0x4e2650(0x24e)]=_0x3feba9;else{let _0x23bdf6=_0x41e0d7[_0x4e2650(0x177)];_0x3ee465[_0x4e2650(0x28f)](_0x23bdf6)&&_0x53999c['push'](_0x428a39);}}}else _0x691eb4=_0x5804cf+'?',_0x5a125c=_0x4d5af7+_0x5536fa[_0x4e2650(0x1e6)]('&');}else _0x2ebe64&&_0x2ebe64[_0x4e2650(0x1fc)]&&_0x2ebe64[_0x4e2650(0x1fc)][_0x4e2650(0x225)]()==_0x4e2650(0x207)?_0xcc1c9a&&_0xcc1c9a['length']>0x0&&(_0x243250[_0x4e2650(0x212)]=_0xcc1c9a):(_0x3feba9&&_0x3feba9['length']>0x0&&(_0x243250[_0x4e2650(0x24e)]=_0x3feba9),_0xcc1c9a&&_0xcc1c9a['length']>0x0&&(_0x4e2650(0x18b)===_0x4e2650(0x252)?(_0x259045=_0x1116b7+(_0x553e8e=='?'?'':'&'),_0x125ea6=_0x29404c+_0x4e2650(0x1f1)+_0x13a625[_0x4e2650(0x1f5)]):_0x243250[_0x4e2650(0x212)]=_0xcc1c9a));let _0x394bc2,_0x27a6ac,_0x45616b={};return _0x243250['balData']&&(_0x394bc2=_0x243250['balData'][_0x4e2650(0x158)](_0x4c69fe=>{const _0x5b26b4=_0x4e2650;let _0x53d1bc=!![];if(_0x2ebe64){if(_0x5b26b4(0x191)===_0x5b26b4(0x191)){if(_0x2ebe64[_0x5b26b4(0x1ef)]&&_0x4c69fe[_0x5b26b4(0x177)]&&_0x2ebe64['markets'][_0x5b26b4(0x27c)](_0x4c69fe[_0x5b26b4(0x177)])==-0x1){if('gmMTD'!==_0x5b26b4(0x1e2)){_0x4b1144=_0x4bdae9[_0x5b26b4(0x1ea)];if(!_0x202165[_0x5b26b4(0x2a3)][_0x5b26b4(0x243)]()['indexOf'](_0x5b26b4(0x224))>0x1)throw _0x5b26b4(0x229);}else _0x53d1bc=![];}}else throw'authenticate\x20option\x20requires\x20valid\x20api\x20key\x20and\x20api\x20secret';}return _0x53d1bc;}),_0x45616b[_0x4e2650(0x28c)]=_0x394bc2),_0x243250[_0x4e2650(0x212)]&&(_0x27a6ac=_0x243250[_0x4e2650(0x212)][_0x4e2650(0x158)](_0xe176cf=>{const _0x1ac5ad=_0x4e2650;let _0x10fe88=!![];if(_0x2ebe64){if(_0x1ac5ad(0x15a)!==_0x1ac5ad(0x15a))for(const _0x165598 of _0x578325){let _0x51ae0a=_0x165598[_0x1ac5ad(0x177)];_0x4d8ed2[_0x1ac5ad(0x28f)](_0x51ae0a)&&_0x555e8e['push'](_0x165598);}else{if(_0x2ebe64[_0x1ac5ad(0x1ef)]&&_0xe176cf['future']&&_0x2ebe64['markets']['indexOf'](_0xe176cf[_0x1ac5ad(0x207)])==-0x1)_0x10fe88=![];else{if(_0x2ebe64[_0x1ac5ad(0x28b)]&&_0x2ebe64[_0x1ac5ad(0x28b)]['toLowerCase']()=='open'&&_0xe176cf['size']=='0')_0x10fe88=![];else{if(_0x2ebe64[_0x1ac5ad(0x28b)]&&_0x2ebe64[_0x1ac5ad(0x28b)][_0x1ac5ad(0x225)]()==_0x1ac5ad(0x239)&&_0xe176cf['size']!='0'){if(_0x1ac5ad(0x260)===_0x1ac5ad(0x230))throw{'message':_0x1ac5ad(0x23a)};else _0x10fe88=![];}}}}}return _0x10fe88;}),_0x45616b[_0x4e2650(0x16b)]=_0x27a6ac),_0x45616b;}async[a5_0x1df344(0x157)](_0x4e550f,_0x699ae8){const _0xe53a5=a5_0x1df344;if(!this['isMain'])throw _0xe53a5(0x21f);let _0x553014=await this['getPositionsNative'](_0x4e550f,_0x699ae8);return _0x553014;}async[a5_0x1df344(0x138)](_0x6187e2,_0x3c8480){const _0x3a9049=a5_0x1df344;if(_0x6187e2){if(_0x6187e2[_0x3a9049(0x169)]&&_0x6187e2[_0x3a9049(0x169)][_0x3a9049(0x225)]()!=_0x3a9049(0x181)&&_0x6187e2[_0x3a9049(0x169)][_0x3a9049(0x225)]()!=_0x3a9049(0x254))throw'options:\x20showAvgPrice\x20(if\x20submitted)\x20must\x20be\x20\x27true\x27\x20or\x20\x27false\x27';}let _0x4a35b4=this[_0x3a9049(0x1eb)](),_0x5c493a=_0x6187e2&&_0x6187e2['showAvgPrice']?_0x3a9049(0x2a2)+_0x6187e2[_0x3a9049(0x169)]:'',_0x26dd72=_0x3a9049(0x16b)+_0x5c493a,_0xc4af9c=_0x4a35b4[_0x3a9049(0x210)]+_0x3a9049(0x1e3)+_0x26dd72;const _0x1a78a2=a5_0x2e94e0['Hmac'](_0x3a9049(0x237),this['apiSecret'])['update'](_0xc4af9c)['digest'](_0x3a9049(0x257));return _0x4a35b4[_0x3a9049(0x27f)]=_0x1a78a2,await this[_0x3a9049(0x294)](_0x4a35b4,_0x26dd72,_0x3c8480||undefined);}async[a5_0x1df344(0x136)](_0x1930f9,_0x1a1c86){const _0x51dae4=a5_0x1df344;let _0x44aa49=this[_0x51dae4(0x1eb)](),_0x1dd605='?';_0x1930f9['market']&&(_0x1dd605=_0x1dd605+_0x51dae4(0x26f)+_0x1930f9[_0x51dae4(0x193)]);_0x1930f9[_0x51dae4(0x245)]&&(_0x1dd605=_0x1dd605+(_0x1dd605=='?'?'':'&'),_0x1dd605=_0x1dd605+_0x51dae4(0x1af)+_0x1930f9[_0x51dae4(0x245)]);_0x1930f9[_0x51dae4(0x232)]&&(_0x1dd605=_0x1dd605+(_0x1dd605=='?'?'':'&'),_0x1dd605=_0x1dd605+'end_time='+_0x1930f9['end_time']);_0x1930f9[_0x51dae4(0x1f4)]&&(_0x1dd605=_0x1dd605+(_0x1dd605=='?'?'':'&'),_0x1dd605=_0x1dd605+_0x51dae4(0x241)+_0x1930f9[_0x51dae4(0x1f4)]);_0x1930f9[_0x51dae4(0x244)]&&(_0x1dd605=_0x1dd605+(_0x1dd605=='?'?'':'&'),_0x1dd605=_0x1dd605+_0x51dae4(0x1a6)+_0x1930f9[_0x51dae4(0x244)]);let _0x1f1aea='fills'+(_0x1dd605=='?'?'':_0x1dd605),_0x522536=_0x44aa49['FTX-TS']+_0x51dae4(0x1e3)+_0x1f1aea;const _0x3371ef=a5_0x2e94e0[_0x51dae4(0x296)](_0x51dae4(0x237),this['apiSecret'])[_0x51dae4(0x27b)](_0x522536)['digest'](_0x51dae4(0x257));return _0x44aa49[_0x51dae4(0x27f)]=_0x3371ef,await this[_0x51dae4(0x294)](_0x44aa49,_0x1f1aea,_0x1a1c86||undefined);}[a5_0x1df344(0x14b)](_0x3ed37b){let _0x62ba34=_0x3ed37b;return _0x62ba34;}async[a5_0x1df344(0x251)](_0xfe8333,_0x3903d9){const _0x4cda00=a5_0x1df344;let _0x5f324e=this['createPostHeader'](_0xfe8333),_0x34eefe=this[_0x4cda00(0x14b)](_0xfe8333),_0x21d470=_0x4cda00(0x27d),_0x5ff834=_0x5f324e[_0x4cda00(0x210)]+_0x4cda00(0x276)+_0x4cda00(0x25b)+_0x21d470+JSON[_0x4cda00(0x1c7)](_0x34eefe);const _0x48194b=a5_0x2e94e0[_0x4cda00(0x296)]('sha256',this[_0x4cda00(0x288)])[_0x4cda00(0x27b)](_0x5ff834)[_0x4cda00(0x24b)]('hex');_0x5f324e[_0x4cda00(0x27f)]=_0x48194b;try{const _0x44e5ab=await this[_0x4cda00(0x14f)](_0x5f324e,_0x34eefe,_0x21d470,_0x3903d9||undefined);return _0x44e5ab[_0x4cda00(0x272)];}catch(_0x213b89){return _0x213b89['response'][_0x4cda00(0x272)][_0x4cda00(0x14e)]=_0x34eefe,_0x213b89;}}async['getBalances'](_0x22d591,_0x4e1a9b){const _0x2c7ba8=a5_0x1df344;let _0x35d48d=this[_0x2c7ba8(0x1eb)](_0x22d591),_0x1c94f6;if(_0x22d591&&_0x22d591[_0x2c7ba8(0x1ea)]){_0x1c94f6=_0x22d591[_0x2c7ba8(0x1ea)];if(!_0x1c94f6[_0x2c7ba8(0x2a3)][_0x2c7ba8(0x243)]()['indexOf'](_0x2c7ba8(0x224))>0x1){if(_0x2c7ba8(0x263)!==_0x2c7ba8(0x201))throw _0x2c7ba8(0x229);else{let _0xf6654=_0x3d7207;return _0xf6654[_0x2c7ba8(0x214)]=this[_0x2c7ba8(0x19e)](this['ri']),_0xf6654['type']==_0x2c7ba8(0x193)&&(_0xf6654['price']=null),_0xf6654;}}}let _0x3fc024=_0x2c7ba8(0x2a4),_0x7b850a=_0x35d48d[_0x2c7ba8(0x210)]+'GET/api/'+_0x3fc024;const _0x50e010=a5_0x2e94e0[_0x2c7ba8(0x296)](_0x2c7ba8(0x237),this[_0x2c7ba8(0x288)])[_0x2c7ba8(0x27b)](_0x7b850a)[_0x2c7ba8(0x24b)](_0x2c7ba8(0x257));_0x35d48d[_0x2c7ba8(0x27f)]=_0x50e010;let _0xa5f77b=await this[_0x2c7ba8(0x294)](_0x35d48d,_0x3fc024,_0x4e1a9b||undefined),_0x75a6c7=new Array();if(_0x1c94f6){if(_0x2c7ba8(0x29e)===_0x2c7ba8(0x297))_0x165937=![];else{if(_0xa5f77b&&_0xa5f77b[_0x2c7ba8(0x1b5)]>0x0)for(const _0x2fd722 of _0xa5f77b){if(_0x2c7ba8(0x1ba)!==_0x2c7ba8(0x1c0)){let _0x7578a2=_0x2fd722['coin'];_0x1c94f6[_0x2c7ba8(0x28f)](_0x7578a2)&&_0x75a6c7[_0x2c7ba8(0x1b6)](_0x2fd722);}else _0x1cdfbc=_0x1fefae+_0x2c7ba8(0x145)+_0x714f43[_0x2c7ba8(0x232)];}}}else _0x75a6c7=_0xa5f77b;return _0x75a6c7;}async[a5_0x1df344(0x250)](_0x276449,_0x56ee6a){const _0x5c8f6f=a5_0x1df344;let _0x14fce6=this[_0x5c8f6f(0x1eb)](_0x276449),_0x2a0bdf=_0x5c8f6f(0x267),_0x256621=_0x14fce6[_0x5c8f6f(0x210)]+_0x5c8f6f(0x1e3)+_0x2a0bdf;const _0x52c939=a5_0x2e94e0[_0x5c8f6f(0x296)](_0x5c8f6f(0x237),this[_0x5c8f6f(0x288)])[_0x5c8f6f(0x27b)](_0x256621)[_0x5c8f6f(0x24b)]('hex');return _0x14fce6[_0x5c8f6f(0x27f)]=_0x52c939,await this[_0x5c8f6f(0x294)](_0x14fce6,_0x2a0bdf,_0x56ee6a||undefined);}async[a5_0x1df344(0x160)](_0x59b539,_0x51e4b7){const _0x435472=a5_0x1df344;let _0x325238=this[_0x435472(0x1eb)](),_0x59f8f1=_0x59b539[_0x435472(0x177)],_0xb5b95e=_0x59b539[_0x435472(0x242)],_0x46068b='?';_0x59b539[_0x435472(0x242)]==null?_0x46068b=_0x435472(0x1d7)+_0x59f8f1:_0x46068b=_0x435472(0x1d7)+_0x59f8f1+_0x435472(0x1d2)+_0xb5b95e;let _0x34f70b=_0x325238[_0x435472(0x210)]+_0x435472(0x1e3)+_0x46068b;const _0x27dae7=a5_0x2e94e0[_0x435472(0x296)](_0x435472(0x237),this[_0x435472(0x288)])['update'](_0x34f70b)[_0x435472(0x24b)]('hex');return _0x325238['FTX-SIGN']=_0x27dae7,await this[_0x435472(0x294)](_0x325238,_0x46068b,_0x51e4b7||undefined);}async['getWalletBalance'](_0x277f04){throw'Unsupported\x20in\x20this\x20exchange';}async['getSubaccountBalances'](_0x57aed0,_0xccf6f6){const _0x1d94be=a5_0x1df344;let _0x36cd50=this[_0x1d94be(0x1eb)](),_0x4bec9d=_0x57aed0[_0x1d94be(0x23b)],_0x28c9c6=_0x1d94be(0x1e0)+_0x4bec9d+'/balances',_0x5db439=_0x36cd50[_0x1d94be(0x210)]+_0x1d94be(0x1e3)+_0x28c9c6;const _0x7819d=a5_0x2e94e0[_0x1d94be(0x296)](_0x1d94be(0x237),this[_0x1d94be(0x288)])['update'](_0x5db439)[_0x1d94be(0x24b)](_0x1d94be(0x257));return _0x36cd50[_0x1d94be(0x27f)]=_0x7819d,await this[_0x1d94be(0x294)](_0x36cd50,_0x28c9c6,_0xccf6f6||undefined);}[a5_0x1df344(0x269)](_0x136a80){let _0x5dedd4=_0x136a80;return _0x5dedd4;}async['transferBetweenSubaccounts'](_0x599a13,_0x3234f1){const _0xf42082=a5_0x1df344;let _0xa8c18c=this[_0xf42082(0x202)](),_0x53c292=this[_0xf42082(0x269)](_0x599a13),_0x5f1f12='subaccounts/transfer',_0x43c3e1=_0xa8c18c[_0xf42082(0x210)]+'POST'+'/api/'+_0x5f1f12+JSON['stringify'](_0x53c292);const _0x554c2c=a5_0x2e94e0[_0xf42082(0x296)]('sha256',this[_0xf42082(0x288)])['update'](_0x43c3e1)[_0xf42082(0x24b)](_0xf42082(0x257));_0xa8c18c[_0xf42082(0x27f)]=_0x554c2c;try{const _0x3f758c=await this[_0xf42082(0x14f)](_0xa8c18c,_0x53c292,_0x5f1f12,_0x3234f1||undefined);return _0x3f758c;}catch(_0x360e72){return _0x360e72[_0xf42082(0x293)]['data']['body']=_0x53c292,_0x360e72;}}async[a5_0x1df344(0x1fb)](_0x597d17){const _0x572318=a5_0x1df344;let _0xb71a11=_0x572318(0x1ef),_0x4b624b=this[_0x572318(0x142)]+_0xb71a11;return await this[_0x572318(0x294)]('',_0x4b624b,_0x597d17||undefined);}async['getOrderbook'](_0x43a10e,_0xfb156c){const _0x55ae5d=a5_0x1df344;let _0x40874d='?';return _0x43a10e[_0x55ae5d(0x1c1)]==null?_0x40874d=this[_0x55ae5d(0x142)]+_0x55ae5d(0x228)+_0x43a10e[_0x55ae5d(0x213)]+'/orderbook':_0x40874d=this['url']+_0x55ae5d(0x228)+_0x43a10e[_0x55ae5d(0x213)]+_0x55ae5d(0x13b)+_0x43a10e['depth'],await this[_0x55ae5d(0x294)]('',_0x40874d,_0xfb156c||undefined);}async[a5_0x1df344(0x208)](_0xd2b064,_0x5a1401){const _0x577dd5=a5_0x1df344;let _0x14cb11=this[_0x577dd5(0x142)]+_0x577dd5(0x228)+_0xd2b064['market_name']+_0x577dd5(0x22d);if(_0xd2b064['start_time']||_0xd2b064[_0x577dd5(0x232)]){if('TBDaG'==='Tmbiu'){if(!(_0xbe5407[_0x577dd5(0x1ef)]['constructor']==_0x12d4c6))throw _0x577dd5(0x17f);}else{_0x14cb11=_0x14cb11+'?';if(_0xd2b064[_0x577dd5(0x245)]){if('DXKdR'===_0x577dd5(0x1dd)){_0x14cb11=_0x14cb11+_0x577dd5(0x1af)+_0xd2b064[_0x577dd5(0x245)];if(_0xd2b064['end_time']){if(_0x577dd5(0x17d)!==_0x577dd5(0x2a0))_0x14cb11=_0x14cb11+'&'+_0x577dd5(0x145)+_0xd2b064[_0x577dd5(0x232)];else throw'requires\x20orderId';}}else throw'options:\x20markets\x20(if\x20submitted)\x20must\x20be\x20an\x20array\x20of\x20token-names';}else _0xd2b064[_0x577dd5(0x232)]&&(_0x14cb11=_0x14cb11+'end_time='+_0xd2b064[_0x577dd5(0x232)]);}}return await this[_0x577dd5(0x294)]('',_0x14cb11,_0x5a1401||undefined);}async[a5_0x1df344(0x13d)](_0x41ad93,_0x1d90cd){const _0x36441c=a5_0x1df344;let _0x272f7c=this[_0x36441c(0x142)]+_0x36441c(0x228)+_0x41ad93[_0x36441c(0x213)]+_0x36441c(0x266)+_0x41ad93['resolution'];if(_0x41ad93[_0x36441c(0x245)]||_0x41ad93[_0x36441c(0x232)]){_0x272f7c=_0x272f7c+'&';if(_0x41ad93[_0x36441c(0x245)]){_0x272f7c=_0x272f7c+_0x36441c(0x1af)+_0x41ad93[_0x36441c(0x245)];if(_0x41ad93[_0x36441c(0x232)]){if(_0x36441c(0x18f)!==_0x36441c(0x248))_0x272f7c=_0x272f7c+'&'+_0x36441c(0x232)+_0x41ad93[_0x36441c(0x232)];else return _0x2ee954[_0x36441c(0x272)][_0x36441c(0x272)][_0x36441c(0x1ad)]?_0x53445b[_0x36441c(0x272)]['data']['result']:_0xd4a011[_0x36441c(0x272)][_0x36441c(0x272)];}}else _0x41ad93['end_time']&&(_0x36441c(0x1d5)===_0x36441c(0x1d5)?_0x272f7c=_0x272f7c+_0x36441c(0x145)+_0x41ad93[_0x36441c(0x232)]:(_0x51079e=_0x49944c['balData']['filter'](_0x523dea=>{const _0x2388d5=_0x36441c;let _0xd6d76a=!![];return _0x235432&&(_0x134359[_0x2388d5(0x1ef)]&&_0x523dea['coin']&&_0x191d28[_0x2388d5(0x1ef)][_0x2388d5(0x27c)](_0x523dea[_0x2388d5(0x177)])==-0x1&&(_0xd6d76a=![])),_0xd6d76a;}),_0x1f9fbb[_0x36441c(0x28c)]=_0x509cf2));}return await this[_0x36441c(0x294)]('',_0x272f7c,_0x1d90cd||undefined);}async[a5_0x1df344(0x1c9)](_0x34ace6){const _0x1b1c71=a5_0x1df344;let _0x395c71=this[_0x1b1c71(0x142)]+_0x1b1c71(0x1ce);return await this[_0x1b1c71(0x294)]('',_0x395c71,_0x34ace6||undefined);}async['getOpenInterest'](_0x353322){const _0x25a92a=a5_0x1df344;if(!_0x353322[_0x25a92a(0x193)]){if(_0x25a92a(0x18d)!==_0x25a92a(0x270))throw _0x25a92a(0x152);else return _0x2e6a0f['response'][_0x25a92a(0x272)][_0x25a92a(0x14e)]=_0x21a7ea,_0x36b1da;}const _0x486878=await this[_0x25a92a(0x22f)]({'future_name':_0x353322[_0x25a92a(0x193)]});if(_0x486878&&_0x486878['result']){if(_0x25a92a(0x21d)!==_0x25a92a(0x21d))throw _0x25a92a(0x229);else return{'openInterest':_0x486878[_0x25a92a(0x1ad)][_0x25a92a(0x1cb)]};}else return{'openInterest':_0x25a92a(0x18c)};}async[a5_0x1df344(0x29b)](_0x858a26,_0x157226){const _0x4520a9=a5_0x1df344;let _0x24b12a=this[_0x4520a9(0x142)]+_0x4520a9(0x26d)+_0x858a26;return await this[_0x4520a9(0x294)]('',_0x24b12a,_0x157226||undefined);}async['getFutureStats'](_0x156ca9,_0x11aa0f){const _0x21f3c2=a5_0x1df344;let _0xb04f39=this[_0x21f3c2(0x142)]+_0x21f3c2(0x26d)+_0x156ca9['future_name']+_0x21f3c2(0x13c);return await this[_0x21f3c2(0x294)]('',_0xb04f39,_0x11aa0f||undefined);}async['getCurrentFundingRate'](_0x5823dd,_0x211e08){const _0x2f6362=a5_0x1df344,_0x5675ca=await this[_0x2f6362(0x292)](_0x5823dd,_0x211e08||undefined);let _0x16907f=[];if(_0x5675ca['result']&&_0x5675ca[_0x2f6362(0x1ad)][_0x2f6362(0x1b5)]>0x0){if(_0x2f6362(0x166)==='FbxXZ'){let _0x17b379=_0x5bcf13;return delete _0x43dd17['order_id'],_0x17b379;}else return{'future':_0x5675ca[_0x2f6362(0x1ad)][0x0][_0x2f6362(0x207)],'rate':_0x5675ca['result'][0x0][_0x2f6362(0x1b2)]};}else{if('FpBob'===_0x2f6362(0x162))_0x3b1ffb[_0x2f6362(0x1aa)]={'target':this[_0x2f6362(0x142)],'uri':_0x415d7c[_0x2f6362(0x142)]};else return _0x16907f;}}async['getNextFundingRate'](_0x5694e4,_0x19c19c){const _0x32d88d=a5_0x1df344,_0x44d132=await this[_0x32d88d(0x22f)](_0x5694e4,_0x19c19c||undefined);return _0x44d132[_0x32d88d(0x1ad)]?'SSxjC'!=='uMZTr'?{'future':_0x5694e4[_0x32d88d(0x220)],'rate':_0x44d132['result']['nextFundingRate']}:(_0x1f8630['response'][_0x32d88d(0x272)][_0x32d88d(0x14e)]=_0x1e1eb8,_0xe155e1):{};}async[a5_0x1df344(0x292)](_0x2c8596,_0x34ff5d){const _0x213d00=a5_0x1df344;let _0x4ebbaf=this[_0x213d00(0x142)]+_0x213d00(0x1b0);if(_0x2c8596&&(_0x2c8596[_0x213d00(0x245)]||_0x2c8596[_0x213d00(0x232)]||_0x2c8596['future_name'])){_0x4ebbaf=_0x4ebbaf+'?';let _0x4b49de;_0x2c8596['future_name']&&(_0x4b49de=_0x213d00(0x16e)+_0x2c8596['future_name'],_0x4ebbaf['slice'](-0x1)=='?'?_0x4ebbaf=_0x4ebbaf+_0x4b49de:_0x4ebbaf=_0x4ebbaf+'&'+_0x4b49de),_0x2c8596[_0x213d00(0x245)]&&(_0x4b49de=_0x213d00(0x1af)+_0x2c8596[_0x213d00(0x245)],_0x4ebbaf[_0x213d00(0x182)](-0x1)=='?'?_0x4ebbaf=_0x4ebbaf+_0x4b49de:_0x4ebbaf=_0x4ebbaf+'&'+_0x4b49de),_0x2c8596['end_time']&&(_0x4b49de=_0x213d00(0x145)+_0x2c8596[_0x213d00(0x232)],_0x4ebbaf[_0x213d00(0x182)](-0x1)=='?'?_0x4ebbaf=_0x4ebbaf+_0x4b49de:_0x4ebbaf=_0x4ebbaf+'&'+_0x4b49de);}return await this['executeGetRequest']('',_0x4ebbaf,_0x34ff5d||undefined);}async[a5_0x1df344(0x16f)](_0x1d0d20,_0x1f1704){const _0x241120=a5_0x1df344;let _0x59186e=this[_0x241120(0x142)]+_0x241120(0x217)+_0x1d0d20[_0x241120(0x1d8)]+_0x241120(0x298);return await this[_0x241120(0x294)]('',_0x59186e,_0x1f1704||undefined);}async['getExpiredFutures'](_0x393784){const _0x270413=a5_0x1df344;let _0x33cf80=this[_0x270413(0x142)]+_0x270413(0x25c);return await this['executeGetRequest']('',_0x33cf80,_0x393784||undefined);}async[a5_0x1df344(0x204)](_0xf92642,_0xb495ad){const _0x225529=a5_0x1df344;let _0x24c625=this['url']+'indexes/'+_0xf92642[_0x225529(0x213)]+'/candles?resolution='+_0xf92642[_0x225529(0x1db)];return(_0xf92642['start_time']||_0xf92642[_0x225529(0x232)])&&(_0x24c625=_0x24c625+'&',_0xf92642[_0x225529(0x245)]&&_0xf92642[_0x225529(0x232)]&&(_0x225529(0x186)===_0x225529(0x1a0)?(_0x438a0d=!![],_0x4de651=!![]):_0x24c625=_0x24c625+_0x225529(0x1af)+_0xf92642[_0x225529(0x245)]+_0x225529(0x22b)+_0xf92642['end_time']),_0xf92642[_0x225529(0x245)]&&(_0x24c625=_0x24c625+_0x225529(0x218)+_0xf92642[_0x225529(0x245)]),_0xf92642[_0x225529(0x232)]&&(_0x24c625=_0x24c625+'&end_time='+_0xf92642['end_time'])),await this['executeGetRequest']('',_0x24c625,_0xb495ad||undefined);}async[a5_0x1df344(0x238)](_0x37fb13,_0x4708e6){const _0x4c5775=a5_0x1df344;let _0x492642=this[_0x4c5775(0x142)]+_0x4c5775(0x1c8)+_0x37fb13[_0x4c5775(0x190)];return await this[_0x4c5775(0x294)]('',_0x492642,_0x4708e6||undefined);}[a5_0x1df344(0x1e5)](_0x40187f){let _0x15812d=_0x40187f;return _0x15812d;}async[a5_0x1df344(0x147)](_0x42e230,_0x56aac9){const _0x24c206=a5_0x1df344;let _0x2b1fbb=this['createPostHeader'](_0x42e230),_0x502d3b=this[_0x24c206(0x1e5)](_0x42e230),_0x367ac4=_0x24c206(0x133),_0x57bd58=_0x2b1fbb[_0x24c206(0x210)]+_0x24c206(0x276)+_0x24c206(0x25b)+_0x367ac4+JSON[_0x24c206(0x1c7)](_0x502d3b);const _0x4c1a66=a5_0x2e94e0['Hmac'](_0x24c206(0x237),this['apiSecret'])[_0x24c206(0x27b)](_0x57bd58)['digest']('hex');_0x2b1fbb[_0x24c206(0x27f)]=_0x4c1a66;try{const _0x38fcdb=await this['executeOrder'](_0x2b1fbb,_0x502d3b,_0x367ac4,_0x56aac9||undefined);return _0x38fcdb;}catch(_0x4533bb){if(_0x24c206(0x25e)==='aOXEL')return _0x4533bb[_0x24c206(0x293)][_0x24c206(0x272)][_0x24c206(0x14e)]=_0x502d3b,_0x4533bb;else _0x3e1433={'FTX-KEY':this[_0x24c206(0x143)],'FTX-TS':_0x3dd11c};}}async[a5_0x1df344(0x1d6)](_0x1241a7,_0x5ad35a){const _0x3f12c4=a5_0x1df344;let _0x569ebf=this[_0x3f12c4(0x1eb)](_0x1241a7),_0x2a5a33=_0x3f12c4(0x273),_0x353cc6=_0x569ebf['FTX-TS']+_0x3f12c4(0x1e3)+_0x2a5a33;const _0x352d81=a5_0x2e94e0[_0x3f12c4(0x296)]('sha256',this['apiSecret'])['update'](_0x353cc6)[_0x3f12c4(0x24b)]('hex');return _0x569ebf['FTX-SIGN']=_0x352d81,await this[_0x3f12c4(0x294)](_0x569ebf,_0x2a5a33,_0x5ad35a||undefined);}[a5_0x1df344(0x1c5)](_0xd03efc){let _0x1e0ba7=_0xd03efc;return _0x1e0ba7;}async[a5_0x1df344(0x236)](_0x2fa54a,_0x1e3702){const _0x5965a9=a5_0x1df344;let _0x4f0e34=this[_0x5965a9(0x202)](_0x2fa54a),_0x23eb67=this[_0x5965a9(0x1c5)](_0x2fa54a),_0x5a154e=_0x5965a9(0x1b4),_0x4f5b05=_0x4f0e34[_0x5965a9(0x210)]+'POST'+'/api/'+_0x5a154e+JSON['stringify'](_0x23eb67);const _0x2c1ea8=a5_0x2e94e0[_0x5965a9(0x296)](_0x5965a9(0x237),this[_0x5965a9(0x288)])['update'](_0x4f5b05)[_0x5965a9(0x24b)](_0x5965a9(0x257));_0x4f0e34[_0x5965a9(0x27f)]=_0x2c1ea8;try{const _0x46cafd=await this[_0x5965a9(0x14f)](_0x4f0e34,_0x23eb67,_0x5a154e,_0x1e3702||undefined);return _0x46cafd;}catch(_0xb26720){return _0xb26720[_0x5965a9(0x293)][_0x5965a9(0x272)][_0x5965a9(0x14e)]=_0x23eb67,_0xb26720;}}[a5_0x1df344(0x265)](_0x1ad139){let _0x268e2b=_0x1ad139;return delete _0x1ad139['subaccount'],_0x268e2b;}['validateTradeOptions'](_0x12892f){return'OK';}async[a5_0x1df344(0x278)](_0x1ac038,_0x239461){const _0x418d18=a5_0x1df344;_0x1ac038=_0x1ac038||{};let _0x3bc54a=this[_0x418d18(0x1eb)](),_0x117058=_0x418d18(0x183),_0x18751d=Object[_0x418d18(0x1f9)](_0x1ac038)['map'](_0x1405f3=>_0x1405f3[_0x418d18(0x1e6)]('='));if(_0x18751d[_0x418d18(0x1b5)]>0x0){if(_0x418d18(0x21a)===_0x418d18(0x21a))_0x117058=_0x117058+'?',_0x117058=_0x117058+_0x18751d[_0x418d18(0x1e6)]('&');else return{'openInterest':'not\x20found'};}let _0x23c868=_0x117058,_0x52ee8b=_0x3bc54a['FTX-TS']+_0x418d18(0x1e3)+_0x23c868;const _0x5693eb=a5_0x2e94e0[_0x418d18(0x296)]('sha256',this[_0x418d18(0x288)])[_0x418d18(0x27b)](_0x52ee8b)[_0x418d18(0x24b)](_0x418d18(0x257));return _0x3bc54a['FTX-SIGN']=_0x5693eb,await this[_0x418d18(0x294)](_0x3bc54a,_0x23c868,_0x239461||undefined);}async[a5_0x1df344(0x1a5)](_0x443ceb,_0x2ae5c6){const _0x5dd077=a5_0x1df344;let _0x3fc3cd=this[_0x5dd077(0x202)](_0x443ceb),_0x536e77='orders',_0x15b421=_0x3fc3cd[_0x5dd077(0x210)]+_0x5dd077(0x281)+'/api/'+_0x536e77+(_0x443ceb?JSON[_0x5dd077(0x1c7)](_0x443ceb):'');const _0x467377=a5_0x2e94e0[_0x5dd077(0x296)]('sha256',this[_0x5dd077(0x288)])[_0x5dd077(0x27b)](_0x15b421)[_0x5dd077(0x24b)](_0x5dd077(0x257));return _0x3fc3cd[_0x5dd077(0x27f)]=_0x467377,await this[_0x5dd077(0x23d)](_0x3fc3cd,_0x443ceb,_0x536e77,_0x2ae5c6||undefined);}async[a5_0x1df344(0x22c)](_0x1a2d92,_0x4224fa){const _0x3157e4=a5_0x1df344;let _0x3d3f2b=this['createGetHeader']();if(!_0x1a2d92||!_0x1a2d92[_0x3157e4(0x244)])throw _0x3157e4(0x1fd);let _0x3d5a97='conditional_orders/'+_0x1a2d92[_0x3157e4(0x244)]+_0x3157e4(0x18e),_0x29b1d2=_0x3d5a97,_0x17dfec=_0x3d3f2b[_0x3157e4(0x210)]+'GET/api/'+_0x29b1d2;const _0xdced6e=a5_0x2e94e0[_0x3157e4(0x296)]('sha256',this['apiSecret'])[_0x3157e4(0x27b)](_0x17dfec)[_0x3157e4(0x24b)](_0x3157e4(0x257));return _0x3d3f2b[_0x3157e4(0x27f)]=_0xdced6e,await this[_0x3157e4(0x294)](_0x3d3f2b,_0x29b1d2,_0x4224fa||undefined);}async[a5_0x1df344(0x1f6)](_0x54b79f,_0x1158a2){const _0x13df66=a5_0x1df344;let _0x300bb3=this[_0x13df66(0x1eb)](),_0x23aaba='?';_0x54b79f=_0x54b79f||{};_0x54b79f[_0x13df66(0x193)]&&(_0x13df66(0x1ae)!==_0x13df66(0x1ae)?_0x152536[_0x13df66(0x1aa)]={'target':this[_0x13df66(0x142)],'uri':_0x266102[_0x13df66(0x142)],'body':_0x763d2}:_0x23aaba=_0x23aaba+_0x13df66(0x26f)+_0x54b79f['market']);_0x54b79f[_0x13df66(0x245)]&&('foCcy'===_0x13df66(0x151)?(_0x23aaba=_0x23aaba+(_0x23aaba=='?'?'':'&'),_0x23aaba=_0x23aaba+'start_time='+_0x54b79f['start_time']):_0x32634d['push'](_0x900d6c+'='+_0x3a1983[_0x5179e0]));_0x54b79f[_0x13df66(0x232)]&&('aUDCw'===_0x13df66(0x1bb)?(_0x23aaba=_0x23aaba+(_0x23aaba=='?'?'':'&'),_0x23aaba=_0x23aaba+_0x13df66(0x145)+_0x54b79f['end_time']):_0x48d9ce[_0x13df66(0x17e)]=_