Skip to content

Commit

Permalink
Merge pull request #1 from Crypto-APIs/small-improvements
Browse files Browse the repository at this point in the history
#noticket: set default results limit to 50; add .gitignore file
  • Loading branch information
malin-mensaoftware authored Apr 10, 2019
2 parents 5f95a78 + 8b8a2f0 commit e590db0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
.node_modules
18 changes: 9 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit e590db0

Please sign in to comment.