Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getEthPriceNow= toSymbol => {
}

return popsicle.request({
method: 'POST',
method: 'GET',
url: 'https://min-api.cryptocompare.com/data/price',

query: {
Expand All @@ -26,7 +26,7 @@ const getEthPriceNow= toSymbol => {
.use(popsicle.plugins.parse(['json']))
.then(resp => resp.body)
.then(data => {
//format ts : data
//format ts : data
let rtn = {}
rtn[ts] = { 'ETH': data};
return rtn});
Expand All @@ -41,13 +41,13 @@ const getEthPriceHistorical= (n,toSymbol) => {
} else {
toSymbol = defaultCurrencies;
}

return Promise.all(Array.from({length:days}).map((unused, i) => {

let ts = new Date(new Date().getTime() - (24*(i+1) * 60 * 60 * 1000));

return popsicle.request({
method: 'POST',
method: 'GET',
url: 'https://min-api.cryptocompare.com/data/pricehistorical',

query: {
Expand Down
175 changes: 175 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.