From 8b8a2f0cbd1d91d2b20d56b76ccbeba38d15e731 Mon Sep 17 00:00:00 2001 From: Malin Ivanov Date: Wed, 10 Apr 2019 14:29:37 +0300 Subject: [PATCH] #noticket: set default results limit to 50; add .gitignore file --- .gitignore | 2 ++ index.js | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5f4252e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +.node_modules \ No newline at end of file diff --git a/index.js b/index.js index 6185d09..8c7b673 100644 --- a/index.js +++ b/index.js @@ -180,17 +180,17 @@ class CryptoAPIs { }); } - getAllExchanges(skip = 0, limit = 100) { + getAllExchanges(skip = 0, limit = 50) { return this.getRequest('/exchanges?skip=' + skip + '&limit=' + limit); } - getAllAssets(skip = 0, limit = 100) { + getAllAssets(skip = 0, limit = 50) { return this.getRequest('/assets?skip=' + skip + '&limit=' + limit); } - getAllSymbols(skip = 0, limit = 100) { + getAllSymbols(skip = 0, limit = 50) { return this.getRequest('/mappings?skip=' + skip + '&limit=' + limit); } @@ -210,17 +210,17 @@ class CryptoAPIs { return this.getRequest('/ohlcv/periods'); } - getOHLCVLatestData(symbol, period, limit = 100) { + getOHLCVLatestData(symbol, period, limit = 50) { return this.getRequest('/ohlcv/latest/' + symbol + '?period=' + period + '&limit=' + limit); } - getOHLCVHistoricalData(symbol, period, timePeriodStart, timePeriodEnd, limit = 100) { + getOHLCVHistoricalData(symbol, period, timePeriodStart, timePeriodEnd, limit = 50) { return this.getRequest('/ohlcv/history/' + symbol + '?period=' + period + '&timePeriodStart=' + timePeriodStart + '&timePeriodEnd=' + timePeriodEnd + '&limit=' + limit); } - tradesGetLatestData(skip = 0, limit = 100) { + tradesGetLatestData(skip = 0, limit = 50) { return this.getRequest('/trades/latest?skip=' + skip + '&limit=' + limit); } @@ -230,17 +230,17 @@ class CryptoAPIs { return this.getRequest('/trades/' + symbol + '/latest'); } - tradesGetHistoricalData(symbol, timeStart, timeEnd, skip = 0, limit = 100) { + tradesGetHistoricalData(symbol, timeStart, timeEnd, skip = 0, limit = 50) { return this.getRequest('/trades/' + symbol + '/history?timeStart=' + timeStart + '&timeEnd=' + timeEnd + '&skip=' + skip + '&limit=' + limit); } - quotesGetLatestData(skip = 0, limit = 100) { + quotesGetLatestData(skip = 0, limit = 50) { return this.getRequest('/quotes/latest?skip=' + skip + '&limit=' + limit); } - quotesGetHistoricalData(symbol, timeStart, timeEnd, skip = 0, limit = 100) { + quotesGetHistoricalData(symbol, timeStart, timeEnd, skip = 0, limit = 50) { return this.getRequest('/quotes/' + symbol + '/history?timeStart=' + timeStart + '&timeEnd=' + timeEnd + '&skip=' + skip + '&limit=' + limit); }