{"id":18486798,"url":"https://github.com/DavideViolante/investing-com-api","last_synced_at":"2025-04-08T19:33:50.206Z","repository":{"id":39321806,"uuid":"266970440","full_name":"DavideViolante/investing-com-api","owner":"DavideViolante","description":"Unofficial APIs for Investing.com website.","archived":false,"fork":false,"pushed_at":"2024-10-22T07:30:53.000Z","size":853,"stargazers_count":93,"open_issues_count":11,"forks_count":28,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-29T14:39:43.830Z","etag":null,"topics":["bonds","cryptocurrency","currencies","etfs","finance","finance-api","indices","investing","investing-api","markets","markets-api","stocks"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavideViolante.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-26T07:10:31.000Z","updated_at":"2024-10-22T07:34:58.000Z","dependencies_parsed_at":"2024-04-02T09:30:21.297Z","dependency_job_id":"77b7bb49-51a2-472e-bc1d-11a474c21330","html_url":"https://github.com/DavideViolante/investing-com-api","commit_stats":{"total_commits":192,"total_committers":14,"mean_commits":"13.714285714285714","dds":0.5625,"last_synced_commit":"1e1f371d096050537d3bdebfc99e903a8f72f754"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideViolante%2Finvesting-com-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideViolante%2Finvesting-com-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideViolante%2Finvesting-com-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideViolante%2Finvesting-com-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavideViolante","download_url":"https://codeload.github.com/DavideViolante/investing-com-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198448,"owners_count":20900079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bonds","cryptocurrency","currencies","etfs","finance","finance-api","indices","investing","investing-api","markets","markets-api","stocks"],"created_at":"2024-11-06T12:49:49.894Z","updated_at":"2025-04-08T19:33:49.909Z","avatar_url":"https://github.com/DavideViolante.png","language":"JavaScript","funding_links":["https://www.paypal.me/dviolante"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Investing.com Unofficial APIs\n[![](https://github.com/davideviolante/investing-com-api/workflows/Node.js%20CI/badge.svg)](https://github.com/DavideViolante/investing-com-api/actions?query=workflow%3A\"Node.js+CI\") [![Coverage Status](https://coveralls.io/repos/github/DavideViolante/investing-com-api/badge.svg?branch=master)](https://coveralls.io/github/DavideViolante/investing-com-api?branch=master) [![Maintainability](https://api.codeclimate.com/v1/badges/ce48adbd97ff85557918/maintainability)](https://codeclimate.com/github/DavideViolante/investing-com-api/maintainability) ![npm](https://img.shields.io/npm/dm/investing-com-api)  [![Donate](https://img.shields.io/badge/paypal-donate-179BD7.svg)](https://www.paypal.me/dviolante)\n\n[![NPM](https://nodei.co/npm/investing-com-api.png)](https://nodei.co/npm/investing-com-api/)\n\nUnofficial APIs for Investing.com website.\n\n### Install\n`npm i investing-com-api`\n\n### Example\n```js\nconst { investing } = require('investing-com-api');\n\nasync function main() {\n  try {\n    const response1 = await investing('currencies/eur-usd'); // Providing a valid mapping.js key\n    const response2 = await investing('currencies/eur-usd', 'P1M', 'P1D'); // With optional params\n    const response3 = await investing('1'); // Providing the pairId directly, even if not present in mapping.js\n  } catch (err) {\n    console.error(err);\n  }\n}\n```\n\n### Response\n```js\n[\n  {\n    date: 1659398400000,\n    value: 1.0157,\n    price_open: 1.0264,\n    price_high: 1.0294,\n    price_low: 1.0155,\n    price_close: 1.0157,\n    volume: 10\n  },\n  {\n    date: 1659484800000,\n    value: 1.0136,\n    price_open: 1.0158,\n    price_high: 1.0209,\n    price_low: 1.0126,\n    price_close: 1.0136,\n    volume: 15\n  },\n  ...\n]\n```\n\n\n### Inputs\nOnly input is required, other params are optional.\n- **input** _String_: input string, see [mapping.js](https://github.com/DavideViolante/investing-com-api/blob/master/mapping.js) keys, or provide a valid investing.com pairId. (Required)\n- **period** _String_: Period of time, window size. Default P1M (1 month). Valid values: P1D, P1W, P1M, P3M, P6M, P1Y, P5Y, MAX.\n- **interval** _Number_: Interval between results. Default P1D (1 day). Valid values: PT1M, PT5M, PT15M, PT30M, PT1H, PT5H, P1D, P1W, P1M.\n- **pointscount** _Number_: number of total results. Valid values seems to be 60, 70 or 120.\n- **pptrLaunchOptions** _Any_: Puppeteer launch options, see [official website](https://pptr.dev/api/puppeteer.launchoptions).\n\n### Run tests\n`npm test`\n\n### Run lint\n`npm run lint`\n\n### Contribute\nPRs are welcome to add more elements to the [mapping.js](https://github.com/DavideViolante/investing-com-api/blob/master/mapping.js) file.\n\n### Author\n- [Davide Violante](https://github.com/DavideViolante/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDavideViolante%2Finvesting-com-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDavideViolante%2Finvesting-com-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDavideViolante%2Finvesting-com-api/lists"}