changing chart lib

This commit is contained in:
2022-12-09 20:06:04 +02:00
parent a015f18db0
commit fd4d25b263
7 changed files with 358 additions and 42 deletions
+15
View File
@@ -57,6 +57,21 @@ router.get('/coin/:id', function (req, res) {
})
})
router.get('/coin/:id/chart', function (req, res) {
let id = req.params['id'];
let url = config.coingecko.api_url + '/coins/' + id + '/market_chart?vs_currency=usd&days=max';
console.log("chart url:", url)
api_helper.REMOTE_API_call(url)
.then(response => {
res.json(response);
})
.catch(error => {
console.log("error: ", error);
res.send(error);
})
})