Skip to content

Unofficial APIs for Investing.com website.

License

Notifications You must be signed in to change notification settings

k12club/investing-com-api

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2677727 · Dec 17, 2021
Dec 17, 2021
Oct 23, 2021
Oct 23, 2021
May 26, 2020
May 26, 2020
Oct 23, 2021
Oct 23, 2021
Dec 17, 2021
Oct 23, 2021
Oct 23, 2021
Dec 17, 2021
Dec 17, 2021

Repository files navigation

Investing.com Unofficial APIs

Coverage Status Maintainability npm Donate

NPM

Unofficial APIs for Investing.com website.

Install

npm i investing-com-api

Example

const { investing } = require('investing-com-api');

async function main() {
  try {
    const response1 = await investing('currencies/eur-usd');
    const response2 = await investing('currencies/eur-usd', 3600, 24, '1-day'); // With optional params
  } catch (err) {
    console.error(err);
  }
}

Response

[
  { date: 1623812400000, value: 1.1093 },
  { date: 1623816000000, value: 1.1054 },
  { date: 1623819600000, value: 1.1025 },
  { date: 1623823200000, value: 1.1018 },
  ...
]

Available inputs

Only input is required, other params are optional.

  • input String: input string, see mapping.js keys.
  • interval Number: interval between results in seconds, only some values are accepted such as 900, 1800, 3600, 18000, etc.
  • candleCount Number: number of total results, seems it must be >10, it depends on interval and period too.
  • period String: n-hour, n-day, n-month or n-year where n is a number.

Run tests

npm test

Run lint

npm run lint

Author

Contributors