crypto-markets
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -12,2 +12,3 @@ 'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const Binance = __importStar(require('./exchanges/binance')); | ||
const Huobi = __importStar(require('./exchanges/huobi')); | ||
@@ -27,2 +28,4 @@ const OKEx = __importStar(require('./exchanges/okex')); | ||
switch (exchange) { | ||
case 'Binance': | ||
return Binance.fetchMarkets(marketType); | ||
case 'Huobi': { | ||
@@ -29,0 +32,0 @@ if (marketType !== undefined && marketType !== 'Spot') { |
@@ -10,1 +10,2 @@ import { Market } from './pojo/market'; | ||
): void; | ||
export declare function calcPrecision(numberStr: string): number; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
// eslint-disable-next-line import/prefer-default-export | ||
function mergeMarkets(result, markets) { | ||
@@ -14,1 +13,6 @@ Object.keys(markets).forEach((pair) => { | ||
exports.mergeMarkets = mergeMarkets; | ||
function calcPrecision(numberStr) { | ||
const n = -Math.log10(parseFloat(numberStr)); | ||
return n === 0 ? 0 : n; | ||
} | ||
exports.calcPrecision = calcPrecision; |
{ | ||
"name": "crypto-markets", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Get all trading pairs of a cryptocurrency exchange.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
29950
19
523