UNPKG

bitso-ts

Version:

Simple TypeScript Bitso API Wrapper for Public and Private end points. [![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/amircp/bitso-ts/blob/master/LICENSE) ## Installation

3 lines (2 loc) 21.1 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("crypto"),r=(t=require("axios"))&&"object"==typeof t&&"default"in t?t.default:t;function n(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var s=t.apply(e,r);function a(t){n(s,i,o,a,u,"next",t)}function u(t){n(s,i,o,a,u,"throw",t)}a(void 0)}))}}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,(Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s,a,u=function(){function t(t){var e=t.endpoint,r=t.version,n=t.method,i=t.payload,o=t.key,s=t.secret;this._nonce=(new Date).getTime(),this._version=null!=r?r:"v3",this._method=n||"",this._payload=null!=i?i:{},this._key=o,this._secret=s,this._endpoint=null!=e?e:"",this._bufferSigning=""}var r,n=t.prototype;return n.isEmpty=function(t){return 0===Object.keys(t).length},n.serializePayload=function(){return JSON.stringify(this._payload)},n.createSigningRequest=function(){if(this._nonce=(new Date).getTime(),this._bufferSigning=""+this._nonce+this._method+"/"+this._version+"/"+this._endpoint,!this.isEmpty(this._payload)){var t=this.serializePayload();this._bufferSigning=this._bufferSigning.concat(t)}return e.createHmac("sha256",this._secret).update(this._bufferSigning).digest("hex")},n.getHeader=function(){var t=this.createSigningRequest();return"Bitso "+this._key+":"+this._nonce+":"+t},(r=[{key:"payload",set:function(t){this._payload=t}},{key:"endpoint",set:function(t){this._endpoint=t}},{key:"method",set:function(t){this._method=t}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,r),t}(),c=(function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function a(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=Object.create((e&&e.prototype instanceof p?e:p).prototype),o=new R(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=b(s,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function p(){}function l(){}function f(){}var d={};a(d,i,(function(){return this}));var _=Object.getPrototypeOf,v=_&&_(_(k([])));v&&v!==e&&r.call(v,i)&&(d=v);var y=f.prototype=p.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(i,o){function s(){return new e((function(n,s){!function n(i,o,s,a){var u=c(t[i],t,o);if("throw"!==u.type){var h=u.arg,p=h.value;return p&&"object"==typeof p&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(p).then((function(t){h.value=t,s(h)}),(function(t){return n("throw",t,s,a)}))}a(u.arg)}(i,o,n,s)}))}return n=n?n.then(s,s):s()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function k(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:q}}function q(){return{value:void 0,done:!0}}return l.prototype=f,a(y,"constructor",f),a(f,"constructor",l),l.displayName=a(f,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,a(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(m.prototype),a(m.prototype,o,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new m(u(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},g(y),a(y,s,"Generator"),a(y,i,(function(){return this})),a(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(a={exports:{}}),a.exports),h=function(){function t(t,e,r){this.baseUrl=t,this.headers=e,this.timeout=r,this._httpClient=this.getInstance()}var e=t.prototype;return e.openConnection=function(){var t,e;return r.create({baseURL:this.baseUrl,timeout:null!=(t=this.timeout)?t:5e3,headers:null!=(e=this.headers)?e:{}})},e.setAuthToken=function(t){this._httpClient.defaults.headers.common.Authorization=t},e.setHeaders=function(t){Object.assign(this._httpClient.defaults.headers,t)},e.setAPIBase=function(t){this._httpClient.defaults.baseURL=t},e.getInstance=function(){return this._httpClient?this._httpClient:this.openConnection()},t}(),p=function(t){function e(e,r){var n,i=e.version;return(n=t.call(this,e.test?"https://sandbox.bitso.com":"https://api.bitso.com")||this).apiVersion="",n._initializeRequestInterceptor=function(){n._httpClient.interceptors.request.use(n._handleRequest,n._handleError)},n._handleRequest=function(t){return t.headers.Authorization=n._signReq.getHeader(),t.headers["Content-Type"]="application/json",t},n._handleResponse=function(t){return t.data.payload},n._handleError=function(t){return Promise.reject(t)},n.apiVersion=i,n._signReq=r,n._initializeResponseInterceptor(),n._initializeRequestInterceptor(),n}o(e,t);var r=e.prototype;return r.getAccountBalance=function(){var t=i(c.mark((function t(){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._signReq.method="GET",this._signReq.payload={},this._signReq.endpoint="balance",t.next=6,this._httpClient.get("/"+this.apiVersion+"/balance");case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),r.getAccountStatus=function(){var t=i(c.mark((function t(){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._signReq.method="GET",this._signReq.payload={},this._signReq.endpoint="account_status",t.next=6,this._httpClient.get("/"+this.apiVersion+"/account_status");case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),r.getFees=function(){var t=i(c.mark((function t(){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._signReq.method="GET",this._signReq.payload={},this._signReq.endpoint="fees",t.next=6,this._httpClient.get("/"+this.apiVersion+"/fees");case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),r._initializeResponseInterceptor=function(){this._httpClient.interceptors.response.use(this._handleResponse,this._handleError)},e}(h),l=function(t){function e(e,r){var n,i=e.version;return(n=t.call(this,e.test?"https://sandbox.bitso.com":"https://api.bitso.com")||this).apiVersion="",n._initializeRequestInterceptor=function(){n._httpClient.interceptors.request.use(n._handleRequest,n._handleError)},n._handleRequest=function(t){return t.headers.Authorization=n._signReq.getHeader(),t.headers["Content-Type"]="application/json",t},n._handleResponse=function(t){return t.data.payload},n._handleError=function(t){return Promise.reject(t)},n.apiVersion=i,n._signReq=r,n._initializeResponseInterceptor(),n._initializeRequestInterceptor(),n}o(e,t);var r=e.prototype;return r.fundingDestination=function(){var t=i(c.mark((function t(e){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._signReq.method="GET",this._signReq.payload={},this._signReq.endpoint="funding_destination",t.next=6,this._httpClient.get("/"+this.apiVersion+"/funding_destination?fund_currency="+e);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r._initializeResponseInterceptor=function(){this._httpClient.interceptors.response.use(this._handleResponse,this._handleError)},e}(h),f=function(t){function e(e,r){var n,i=e.version;return(n=t.call(this,e.test?"https://sandbox.bitso.com":"https://api.bitso.com")||this).apiVersion="",n._initializeRequestInterceptor=function(){n._httpClient.interceptors.request.use(n._handleRequest,n._handleError)},n._handleRequest=function(t){return t.headers.Authorization=n._signReq.getHeader(),t.headers["Content-Type"]="application/json",t},n._handleResponse=function(t){return t.data.payload},n._handleError=function(t){var e;return Promise.reject(null!=(e=null==t?void 0:t.error)?e:t)},n.apiVersion=i,n._signReq=r,n._initializeResponseInterceptor(),n._initializeRequestInterceptor(),n}o(e,t);var r=e.prototype;return r.getOpenOrders=function(){var t=i(c.mark((function t(e){var r,n,i,o,s;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.book,n=e.marker,i=e.sort,o=e.limit,s=new URLSearchParams,r&&s.set("book",r),n&&s.set("marker",n),i&&s.set("sort",i),o&&s.set("limit",o),this._signReq.method="GET",this._signReq.payload={},this._signReq.endpoint="open_orders?"+s,t.next=12,this._httpClient.get("/"+this.apiVersion+"/open_orders?"+s);case 12:return t.abrupt("return",t.sent);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.cancelOrder=function(){var t=i(c.mark((function t(e){var r,n,i,o,s,a;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.oids,i=e.origin_ids,o="orders",(r=e.oid)?o=o.concat("/"+r):n?((s=new URLSearchParams).set("oids",n.join(",")),o=o.concat("?"+s)):i?((a=new URLSearchParams).set("origin_ids",i.join(",")),o=o.concat("?"+a)):o=o.concat("/all"),this._signReq.method="DELETE",this._signReq.payload={},this._signReq.endpoint=o,t.next=9,this._httpClient.delete("/"+this.apiVersion+"/"+o);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.placeOrder=function(){var t=i(c.mark((function t(e){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._signReq.method="POST",this._signReq.payload=e,this._signReq.endpoint="orders",t.next=6,this._httpClient.post("/"+this.apiVersion+"/orders",e);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.placeMarketBuyOrder=function(){var t=i(c.mark((function t(e,r){var n;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={book:e,side:"buy",type:"market",minor:r},t.next=3,this.placeOrder(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),r.placeMarketSellOrder=function(){var t=i(c.mark((function t(e,r){var n;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={book:e,side:"sell",type:"market",major:r},t.next=3,this.placeOrder(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),r.placeLimitSellOrder=function(){var t=i(c.mark((function t(e){var r;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={book:e.currency,side:"sell",type:"limit",price:e.limit_price,major:e.quantity},t.next=4,this.placeOrder(r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.placeLimitBuyOrder=function(){var t=i(c.mark((function t(e){var r;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={book:e.currency,side:"buy",type:"limit",price:e.limit_price,major:e.quantity},t.next=4,this.placeOrder(r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.getUserTrades=function(){var t=i(c.mark((function t(e){var r,n,i,o;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.oid,n=e.origin_id,i=new URLSearchParams,r&&i.set("oid",r),n&&i.set("origin_id",n),o="user_trades/",i&&(o="user_trades".concat("?"+i)),this._signReq.method="GET",this._signReq.payload={},this._signReq.endpoint=o,t.next=12,this._httpClient.get("/"+this.apiVersion+"/"+o);case 12:return t.abrupt("return",t.sent);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.getOrderTrades=function(){var t=i(c.mark((function t(e){var r,n,i,o;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.origin_id,n=e.oid,i=new URLSearchParams,n&&i.set("oid",n),r&&i.set("origin_id",r),o="order_trades/",i&&(o="order_trades".concat("?"+i)),this._signReq.method="GET",this._signReq.payload={},this._signReq.endpoint=o,t.next=12,this._httpClient.get("/"+this.apiVersion+"/"+o);case 12:return t.abrupt("return",t.sent);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.lookupOrders=function(){var t=i(c.mark((function t(e){var r,n,i,o,s,a;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.oids,i=e.origin_ids,o="orders",(r=e.oid)?o=o.concat("/"+r):n?((s=new URLSearchParams).set("oids",n.join(",")),o=o.concat("?"+s)):i?((a=new URLSearchParams).set("origin_ids",i.join(",")),o=o.concat("?"+a)):o="orders",this._signReq.method="GET",this._signReq.payload={},this._signReq.endpoint=o,t.next=9,this._httpClient.get("/"+this.apiVersion+"/"+o);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r._initializeResponseInterceptor=function(){this._httpClient.interceptors.response.use(this._handleResponse,this._handleError)},e}(h),d=function(t){function e(e){var r,n=e.version;return(r=t.call(this,e.test?"https://sandbox.bitso.com":"https://api.bitso.com")||this).apiVersion="",r._handleResponse=function(t){return t.data.payload},r._handleError=function(t){return Promise.reject(t)},r.apiVersion=n,r._initializeResponseInterceptor(),r}o(e,t);var r=e.prototype;return r.getAvailableBooks=function(){var t=i(c.mark((function t(){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._httpClient.get("/"+this.apiVersion+"/available_books");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),r.getTicker=function(){var t=i(c.mark((function t(e){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._httpClient.get("/"+this.apiVersion+"/ticker?book="+e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.getOrderBook=function(){var t=i(c.mark((function t(e){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._httpClient.get("/"+this.apiVersion+"/order_book?book="+e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r.getTrades=function(){var t=i(c.mark((function t(e){var r,n,i,o,s;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.book,n=e.marker,i=e.sort,o=e.limit,s=new URLSearchParams,r&&s.set("book",r),n&&s.set("marker",n),i&&s.set("sort",i),o&&s.set("limit",o),t.next=8,this._httpClient.get("/"+this.apiVersion+"/trades?"+s);case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),r._initializeResponseInterceptor=function(){this._httpClient.interceptors.response.use(this._handleResponse,this._handleError)},e}(h);(s=exports.Ticker||(exports.Ticker={})).BTCMXN="btc_mxn",s.ETHBTC="eth_btc",s.ETHMXN="eth_mxn",s.XRPBTC="xrp_btc",s.XRPMXN="xrp_mxn",s.LTCBTC="ltc_btc",s.LTCMXN="ltc_mxn",s.BCHBTC="bch_btc",s.BCHMXN="bch_mxn",s.TUSDBTC="tusd_btc",s.TUSDMXN="tusd_mxn",s.MANABTC="mana_btc",s.BATBTC="bat_btc",s.BATMXN="bat_mxn",s.BTCARS="btc_ars",s.BTCDAI="btc_dai",s.DAIMXN="dai_mxn",s.BTCUSD="btc_usd",s.XRPUSD="xrp_usd",s.ETHUSD="eth_usd",s.DAIARS="dai_ars",s.BTCBRL="btc_brl",s.ETHARS="eth_ars",s.ETHBRL="eth_brl",s.BTCUSDT="btc_usd",s.USDMXN="usd_mxn",s.USDARS="usd_ars",s.USDBRL="usd_brl",s.MANAUSD="mana_usd",s.LTCUSD="ltc_usd",s.COMPUSD="comp_usd",s.LINKUSD="link_usd",s.UNIUSD="uni_usd",s.AAVEUSD="aave_usd",exports.PrivateAPI=function(t){var e=t.version,r=t.test,n=new u({version:e,secret:t.secret,key:t.key,endpoint:"",method:"",payload:{}});return{Trade:new f({version:e,test:r},n),Account:new p({version:e,test:r},n),Funds:new l({version:e,test:r},n)}},exports.PublicAPI=d,exports.SigningRequest=u; //# sourceMappingURL=bitso-ts.cjs.production.min.js.map