cryptocompare
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -0,1 +1,7 @@ | ||
0.6.0 / 2018-11-06 | ||
------------------ | ||
- added: `topExchangesFull()` method ([#22](https://github.com/exodusmovement/cryptocompare/pull/22)) | ||
- added: support for `toTs`, `allData`, and `aggregatePredictableTimePeriods` options ([#31](https://github.com/exodusmovement/cryptocompare/pull/31)) | ||
0.5.0 / 2018-03-23 | ||
@@ -2,0 +8,0 @@ ------------------ |
14
index.js
@@ -83,2 +83,8 @@ 'use strict' | ||
function topExchangesFull (fsym, tsym, limit) { | ||
let url = `${baseUrl}top/exchanges/full?fsym=${fsym}&tsym=${tsym}` | ||
if (limit) url += `&limit=${limit}` | ||
return fetchJSON(url).then(result => result.Data) | ||
} | ||
function histoDay (fsym, tsym, options) { | ||
@@ -94,2 +100,5 @@ options = options || {} | ||
if (options.timestamp) url += `&toTs=${options.timestamp}` | ||
if (options.aggregatePredictableTimePeriods) url += `&aggregatePredictableTimePeriods=${options.aggregatePredictableTimePeriods}` | ||
if (options.allData) url += `&allData=${options.allData}` | ||
if (options.toTs) url += `&toTs=${options.toTs}` | ||
return fetchJSON(url).then(result => result.Data) | ||
@@ -107,2 +116,4 @@ } | ||
if (options.timestamp) url += `&toTs=${options.timestamp}` | ||
if (options.allData) url += `&allData=${options.allData}` | ||
if (options.toTs) url += `&toTs=${options.toTs}` | ||
return fetchJSON(url).then(result => result.Data) | ||
@@ -120,2 +131,4 @@ } | ||
if (options.timestamp) url += `&toTs=${options.timestamp}` | ||
if (options.allData) url += `&allData=${options.allData}` | ||
if (options.toTs) url += `&toTs=${options.toTs}` | ||
return fetchJSON(url).then(result => result.Data) | ||
@@ -139,2 +152,3 @@ } | ||
topExchanges, | ||
topExchangesFull, | ||
histoDay, | ||
@@ -141,0 +155,0 @@ histoHour, |
{ | ||
"name": "cryptocompare", | ||
"description": "CryptoCompare JavaScript API", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"author": "JP Richardson <jprichardson@gmail.com>", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -368,2 +368,12 @@ cryptocompare | ||
### `topExchangesFull()` | ||
Get full data on top exchanges by volume for a currency pair. | ||
`topExchangesFull(fsym, tsym[, limit])` | ||
- `fsym` (String) From Symbol | ||
- `tsym` (String) To Symbol | ||
- `limit` (Number) Limit the number of exchanges you receive (default 5). | ||
### `histoDay()` | ||
@@ -379,2 +389,5 @@ | ||
- `aggregate` (Number) Number of data points to aggregate. | ||
- `aggregatePredictableTimePeriods` (Boolean) Generate predictable time periods. | ||
- `allData` (Boolean) Returns all data. | ||
- `toTs` (Boolean) Last unix timestamp to return data for. | ||
- `limit` (Number | `'none'`) Limit the number of days to lookup. Default is 30. If you set it to the string `'none'`, you will get all available data. | ||
@@ -411,2 +424,4 @@ - `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion. | ||
- `aggregate` (Number) Number of data points to aggregate. | ||
- `aggregatePredictableTimePeriods` (Boolean) Generate predictable time periods. | ||
- `toTs` (Boolean) Last unix timestamp to return data for | ||
- `limit` (Number) Limit the number of hours to lookup. Default is 168. | ||
@@ -443,2 +458,4 @@ - `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion. | ||
- `aggregate` (Number) Number of data points to aggregate. | ||
- `aggregatePredictableTimePeriods` (Boolean) Generate predictable time periods. | ||
- `toTs` (Boolean) Last unix timestamp to return data for | ||
- `limit` (Number) Limit the number of minutes to lookup. Default is 1440. | ||
@@ -445,0 +462,0 @@ - `tryConversion` (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set `tryConversion` to `false` to disable using BTC for conversion. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38704
491
481