cryptocompare
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -0,1 +1,6 @@ | ||
0.2.0 / 2017-09-01 | ||
------------------ | ||
- added: `exchange` option to `histoDay()`, `histoHour()`, & `histoMinute()` | ||
0.1.0 / 2017-04-04 | ||
@@ -2,0 +7,0 @@ ------------------ |
@@ -72,2 +72,3 @@ 'use strict' | ||
let url = `${baseUrl}histoday?fsym=${fsym}&tsym=${tsym}` | ||
if (options.exchange) url += `&e=${options.exchange}` | ||
if (options.limit === 'none') url += '&allData=true' | ||
@@ -85,2 +86,3 @@ else if (options.limit) url += `&limit=${options.limit}` | ||
let url = `${baseUrl}histohour?fsym=${fsym}&tsym=${tsym}` | ||
if (options.exchange) url += `&e=${options.exchange}` | ||
if (options.limit) url += `&limit=${options.limit}` | ||
@@ -97,2 +99,3 @@ if (options.tryConversion === false) url += '&tryConversion=false' | ||
let url = `${baseUrl}histominute?fsym=${fsym}&tsym=${tsym}` | ||
if (options.exchange) url += `&e=${options.exchange}` | ||
if (options.limit) url += `&limit=${options.limit}` | ||
@@ -99,0 +102,0 @@ if (options.tryConversion === false) url += '&tryConversion=false' |
{ | ||
"name": "cryptocompare", | ||
"description": "CryptoCompare JavaScript API", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"author": "JP Richardson <jprichardson@gmail.com>", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -290,2 +290,3 @@ cryptocompare | ||
- `timestamp` (Date) By default, `histoDay()` gets historical data for the past several days. Use the `timestamp` option to set a historical start point. | ||
- `exchange` (String) Exchange to get history data from. By default, average data is used. (You can get a list of top exchanges for a given pair with `topExchanges()`.) | ||
@@ -321,2 +322,3 @@ ```js | ||
- `timestamp` (Date) By default, `histoHour()` gets historical data for the past several hours. Use the `timestamp` option to set a historical start point. | ||
- `exchange` (String) Exchange to get history data from. By default, average data is used. (You can get a list of top exchanges for a given pair with `topExchanges()`.) | ||
@@ -352,2 +354,3 @@ ```js | ||
- `timestamp` (Date) By default, `histoMinute()` gets historical data for the past several minutes. Use the `timestamp` option to set a historical start point. | ||
- `exchange` (String) Exchange to get history data from. By default, average data is used. (You can get a list of top exchanges for a given pair with `topExchanges()`.) | ||
@@ -354,0 +357,0 @@ ```js |
@@ -136,3 +136,3 @@ 'use strict' | ||
t.strictEqual(typeof prices.USD, 'number', 'prices.USD is a number') | ||
t.is(prices.USD, 997, 'Correct historical value') | ||
t.is(prices.USD, 995.44, 'Correct historical value') | ||
t.strictEqual(typeof prices.EUR, 'number', 'prices.EUR is a number') | ||
@@ -139,0 +139,0 @@ t.end() |
@@ -113,4 +113,4 @@ 'use strict' | ||
let data = [] | ||
data.push(cc.histoMinute('BTC', 'USD', { timestamp: new Date('2017-01-01') })) | ||
data.push(cc.histoMinute('BTC', 'USD', { timestamp: new Date('2017-01-02') })) | ||
data.push(cc.histoMinute('BTC', 'USD', { timestamp: new Date() })) | ||
data.push(cc.histoMinute('BTC', 'USD', { timestamp: new Date(Date.now() - (1000 * 60 * 60 * 24)) })) | ||
Promise.all(data).then(data => { | ||
@@ -117,0 +117,0 @@ t.notDeepEqual(data[0], data[1], 'data from different days should not be equivalent') |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33309
445
373