Skip to content

Commit

Permalink
fix lint (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
liardoecp committed Oct 22, 2024
1 parent 7749be3 commit d722868
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ function checkParams(input, period, interval, pointscount) {
* @return {Promise<Array>} An array of arrays with date (timestamp) and values (number) properties
*/
async function callInvesting(pairId, period, interval, pointscount) {
const url = `https://api.investing.com/api/financialdata/${pairId}/historical/chart?period=${period}&interval=${interval}&pointscount=${pointscount}`;
const query = new URLSearchParams({
period,
interval,
pointscount,
});
const url = `https://api.investing.com/api/financialdata/${pairId}/historical/chart?${query}`;

const response = await fetch(url, {
headers: new Headers({
Expand Down

0 comments on commit d722868

Please sign in to comment.