{"id":48220006,"url":"https://github.com/icastillejogomez/degiro-api","last_synced_at":"2026-04-04T19:05:46.327Z","repository":{"id":37880578,"uuid":"263390775","full_name":"icastillejogomez/degiro-api","owner":"icastillejogomez","description":"Unofficial DeGiro stock broker API. See your portfolio and set up orders in the market like wall street","archived":false,"fork":false,"pushed_at":"2024-05-10T14:26:02.000Z","size":914,"stargazers_count":226,"open_issues_count":10,"forks_count":36,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-11-06T18:35:10.436Z","etag":null,"topics":["broker-api","degiro","degiro-api","degiro-patform"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/icastillejogomez.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-12T16:26:01.000Z","updated_at":"2025-11-06T17:37:01.000Z","dependencies_parsed_at":"2024-06-18T21:31:44.192Z","dependency_job_id":"38457c18-0416-4994-967d-385453c48657","html_url":"https://github.com/icastillejogomez/degiro-api","commit_stats":{"total_commits":204,"total_committers":7,"mean_commits":"29.142857142857142","dds":0.07352941176470584,"last_synced_commit":"ec76f202d366b330a62678c096efa376af5faa5c"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/icastillejogomez/degiro-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icastillejogomez%2Fdegiro-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icastillejogomez%2Fdegiro-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icastillejogomez%2Fdegiro-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icastillejogomez%2Fdegiro-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icastillejogomez","download_url":"https://codeload.github.com/icastillejogomez/degiro-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icastillejogomez%2Fdegiro-api/sbom","scorecard":{"id":479750,"data":{"date":"2025-08-11","repo":{"name":"github.com/icastillejogomez/degiro-api","commit":"ec76f202d366b330a62678c096efa376af5faa5c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":2,"reason":"Found 7/24 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/node.js.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/icastillejogomez/degiro-api/node.js.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/icastillejogomez/degiro-api/node.js.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"22 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T16:18:30.397Z","repository_id":37880578,"created_at":"2025-08-19T16:18:30.398Z","updated_at":"2025-08-19T16:18:30.398Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31409471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["broker-api","degiro","degiro-api","degiro-patform"],"created_at":"2026-04-04T19:05:42.601Z","updated_at":"2026-04-04T19:05:46.319Z","avatar_url":"https://github.com/icastillejogomez.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/nachoogoomez"],"categories":[],"sub_categories":[],"readme":"# DeGiro Trading Broker API\n\nThis is an unofficial TypeScript API client (Backend only) for DeGiro's trading platform. Using this module you can easily automate your orders (buy and sell) and get information about orders, funds or products. From now on we have one time password (OTP) support.\n\nAll responses and objects are typed to develop faster and secure.\n\nUnfortunately this library can not be used as frontend library, as DeGiro does not allow external requests through their CORS policy.\n\n![DeGiro Logo](https://raw.githubusercontent.com/icastillejogomez/degiro-api/master/.assets/degiro.png)\n\n![stars](https://badgen.net/github/stars/icastillejogomez/degiro-api)\n![stars](https://badgen.net/github/open-issues/icastillejogomez/degiro-api)\n![stars](https://badgen.net/github/license/icastillejogomez/degiro-api)\n\n\u003cbr /\u003e\n\n\u003ca href=\"https://www.buymeacoffee.com/nachoogoomez\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n\n\u003cbr /\u003e\n\nBe careful, DeGiro could block your account if they catch you using automation scripts\n\n## Table of content\n\n\u003c!--ts--\u003e\n  * [DeGiro Trading Broker API](#degiro-trading-broker-api)\n  * [Table of content](#table-of-content)\n  * [Installation](#installation)\n  * [How to use](#how-to-use)\n    * [Create an instance of DeGiro](#create-an-instance-of-degiro)\n    * [Active Debug mode](#local-files)\n    * [Documentation](#documentation)\n    * [Running tests set](#running-tests-set)\n    * [Get JSESSIONID and reuse sessions](#get-jsessionid-and-reuse-sessions)\n    * [Check if we are authenticated](#check-if-we-are-authenticated)\n  * [API](#api)\n    * [Session endpoints](#session-endpoints)\n      * [login](#login)\n      * [logout](#logout)\n      * [isLogin](#isLogin)\n      * [getJSESSIONID](#getJSESSIONID)\n    * [Account endpoints](#account-endpoints)\n      * [getAccountConfig](#getAccountConfig)\n      * [getAccountData](#getAccountData)\n      * [getAccountState](#getAccountState)\n      * [getAccountReports](#getAccountReports)\n      * [getAccountInfo](#getAccountInfo)\n    * [Search products endpoints](#foo)\n      * [searchProduct](#searchProduct)\n    * [Cash Funds endpoints](#cash-funds-endpoints)\n      * [getCashFunds](#getCashFunds)\n    * [Porfolio endpoints](#foo)\n    * [Stocks endpoints](#foo)\n      * [getFavouriteProducts](#foo)\n      * [getPopularStocks](#foo)\n    * [Orders endpoints](#foo)\n      * [getOrders](#foo)\n      * [getHistoricalOrders](#foo)\n      * [createOrder](#foo)\n      * [executeOrder](#foo)\n      * [deleteOrder](#foo)\n    * [Miscellaneous endpoints](#foo)\n      * [getProductsByIds](#foo)\n      * [getNews](#foo)\n      * [getWebi18nMessages](#foo)\n      * [getWebSettings](#foo)\n      * [getWebUserSettings](#foo)\n      * [getConfigDictionary](#foo)\n  * [All project Types](#all-project-types)\n    * [SomeType](#sometype)\n  * [Need help endpoints](#need-help-endpoints)\n  * [Degiro Command Line Interface](#degiro-command-line-interface)\n  * [License](#dependency)\n  * [TO DO List](#to-do-list)\n\u003c!--te--\u003e\n\n## Installation \n\n```sh\n# using npm\nnpm install --save degiro-api\n\n# using yarn\nyarn add degiro-api\n```\n\n## How to use\n\n### Create an instance of DeGiro\n\nBasic log into DeGiro Platform. All endpoint needs a session key before those can be call them. You can pass credentials to DeGiro constructor or export in your terminal prompt sesion as `DEGIRO_USER` and `DEGIRO_PWD`\n\n```js\nconst DeGiro = require('degiro-api').default\n// or\nimport DeGiro from 'degiro-api'\n\n// Basic degiro init\nconst degiro = new DeGiro({\n  username: '\u003cyour_username_here\u003e',\n  pwd: '*****'\n})\n\n// or creating with the static create method\nconst degiro = DeGiro.create({ username: '*****', pwd: '*****' })\n\n// or create with env credentials\nconst degiro = new DeGiro() // \u003c-- Use DEGIRO_USER \u0026 DEGIRO_PWD\n```\n\n### Active Debug mode\n\nInside all module are call to one debug function that listen the `DEGIRO_DEBUG` env variable. Setting it with any truthy value you can enable all logs to debug the code. \n\n```js\n$ export DEGIRO_DEBUG=1\n$ yarn start\n```\n\n### Documentation\n\nRun the next command and open index.html file inside doc folder to see a fresh documentation of the module.\n\nGenerate the documentation is easy, only run the next command:\n\n```sh\n$ yarn doc\nor\n$ npm run doc\n```\n\n### Running tests set\n\nBefore run the test set you must set DEGIRO_USER \u0026 DEGIRO_PWD env export variables to attach an account to the test sets.\n\nBe careful, the test set are going to make many request to degiro and are going to generate many session. DeGiro can track this events and ban your account (I don't know, read all contract before sign up 🤷‍♂️)\n\nNow, I'm developing a feature that can bring you the ability of reuse only one session across all the entire test set. (The login and logout tests always are going to create differents sessions)\n\nTo run this experimental feature set the `DEGIRO_TESTS_REUSE_SESSION` env variable to any truthy value.\n\nKeep in mind: the tests can fail, if the deleteOrder test crash, you could have one new order in your account that you didn't create yourself. In those cases, the test process print this information in console. Read always all tests results. \n\nTo run all tests set run the command: `yarn test` or `npm run test`\n\n### Get JSESSIONID and reuse sessions\n\nThe JSessionId is the session browser cookie that DeGiro use to authenticate requests. You could prevent masive login/logout requests reusing a valid jsessionid from previous DeGiro instance. The way to do that is:\n\n```js\nimport DeGiro from 'degiro-api'\n\n(async () =\u003e {\n  const degiro = new DeGiro({}) // \u003c-- Using ENV variables\n\n  await degiro.login()\n\n  // Get the jsessionId (LOOK, is not a promise)\n  const jsessionId = degiro.getJSESSIONID()\n})()\n```\n\n```js\nimport DeGiro from 'degiro-api'\n\n(async () =\u003e {\n\n  // Create an instance from a previous session\n  const degiro = new DeGiro({\n    username: '\u003cyour_username_here\u003e', // process.env['DEGIRO_USER]\n    pwd: '\u003cyour_password_here\u003e', // process.env['DEGIRO_PWD]\n    oneTimePassword: '\u003cyour_one_time_password_here\u003e', // process.env['DEGIRO_OTP]\n    jsessionId: '\u003cyour_jsessionId_here\u003e', // process.env['DEGIRO_JSESSIONID]\n  })\n\n  // Hydrate\n  // Re-use sessions need to re-hydrate the account config data and could use as a session expiration checker\n  await degiro.login()\n\n  // Do your stuff here...\n\n})()\n```\n\n### Check if we are authenticated\n\n```js\nimport DeGiro from 'degiro-api'\n\n(async () =\u003e {\n  // Create an instance from a previous session\n  const degiro = new DeGiro({}) // \u003c-- Using ENV variables\n\n  if (!degiro.isLogin()) {\n    await degiro.login()\n    if (degiro.isLogin()) {\n      // AWESOME!! We're in\n    }\n  }\n})()\n```\n\nThe problem with this method is that it only checks if you have the account configuration data set. The only way to verify that the session is still active is make a request.\nYou can force isLogin method passing it a `secure` field set to true. This way the method will return a promise and below it will call a DeGiro API endpoint (usually getAccountConfig)\n\n```js\nimport DeGiro from 'degiro-api'\n\n(async () =\u003e {\n  // Create an instance from a previous session\n  const degiro = new DeGiro({}) // \u003c-- Using ENV variables\n\n  // Force to make a request and check if session is still alive\n  if(! await degiro.isLogin({ secure: true })) {\n    await degiro.login()\n  }\n})()\n```\n\n## API\n\n### Session endpoints\n\n#### login\n\n`login(): Promise\u003cAccountDataType\u003e`\n\n```js\nimport DeGiro from 'degiro-api'\n\nconst degiro = new DeGiro({})\nconst accountData = await degiro.login()\n```\n\n#### logout\n\n`logout(): Promise\u003cvoid\u003e`\n\n```js\nimport DeGiro from 'degiro-api'\n\nconst degiro = new DeGiro({})\nconst accountData = await degiro.login()\nawait degiro.logout()\n```\n\n#### isLogin\n\n`isLogin() (options?: IsLoginOptionsType): boolean | Promise\u003cboolean\u003e`\n\n```js\nimport DeGiro from 'degiro-api'\n\nconst degiro = new DeGiro({})\nawait degiro.login()\n\nconst isLogin = degiro.isLogin()\n\nif (! await degiro.isLogin({ secure: true })) {\n  // Do your magic\n}\n```\n\n#### getJSESSIONID\n\n`getJSESSIONID(): string | undefined`\n\n```js\nimport DeGiro from 'degiro-api'\n\nconst degiro = new DeGiro({})\ndegiro.getJSESSIONID() // undefined\nawait degiro.login()\ndegiro.getJSESSIONID() // string\n```\n\n### Account endpoints\n\n#### getAccountConfig\n\n`getAccountConfig(sessionId: string): Promise\u003cAccountConfigType\u003e`\n\n```js\nimport DeGiro from 'degiro-api'\n\nconst degiro = new DeGiro({})\nawait degiro.login()\n\nconst accountConfig = await degiro.getAccountConfig()\nconsole.log(accountConfig)\n```\n\n#### getAccountData\n\n`getAccountData(): Promise\u003cAccountDataType\u003e`\n\n```js\nimport DeGiro from 'degiro-api'\n\nconst degiro = new DeGiro({})\nawait degiro.login() // Login also returns accountData\n\nconst accountData = await degiro.getAccountData()\nconsole.log(accountData)\n```\n\n#### getAccountState\n\n`getAccountState(options: GetAccountStateOptionsType): Promise\u003cany[]\u003e`\n\n```js\nimport DeGiro from 'degiro-api'\n\nconst degiro = new DeGiro({})\nawait degiro.login()\n\nconst accountState = await degiro.getAccountState()\nconsole.log(accountState)\n```\n\n#### getAccountReports\n\n`getAccountReports(): Promise\u003cAccountReportsType\u003e`\n\n```js\nimport DeGiro from 'degiro-api'\n\nconst degiro = new DeGiro({})\nawait degiro.login()\n\nconst reports = await degiro.getAccountReports()\nconsole.log(reports)\n```\n\n#### getAccountInfo\n\n`getAccountInfo(): Promise\u003cAccountInfoType\u003e`\n\n```js\nimport DeGiro from 'degiro-api'\n\nconst degiro = new DeGiro({})\nawait degiro.login()\n\nconst accountInfo = await degiro.getAccountInfo()\nconsole.log(accountInfo)\n```\n\n### Search products endpoints\n\n#### searchProduct\n\n`searchProduct(options: SearchProductOptionsType): Promise\u003cSearchProductResultType[]\u003e`\n\n* **options**: \n  * **text**: *required* string,\n  * **type**: *optional* DeGiroProducTypes\n  * **limit**: *optional* number default=10,\n  * **offset**: *optional* number default=0,\n\n`DeGiroProducTypes`\n\n* *shares*: 1\n* *bonds*: 2\n* *futures*: 7\n* *options*: 8\n* *investmendFunds*: 13\n* *leveragedProducts*: 14\n* *etfs*: 131\n* *cfds*: 535\n* *warrants*: 536\n\nSearch the text \"AAPL\" without any limitation\n\n```js\nimport DeGiro from 'degiro-api'\n\n(async () =\u003e {\n\n  const degiro: DeGiro = new DeGiro({\n    username: 'your_username_here',\n    pwd: '***********',\n  })\n\n  await degiro.login()\n\n  const result = await degiro.searchProduct({ text: 'AAPL' })\n  console.log(JSON.stringify(result, null, 2))\n})()\n```\n\nSearch TSLA stock\n\n```js\nimport DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'\nconst { DeGiroProducTypes } = DeGiroEnums\n\n(async () =\u003e {\n\n  const degiro: DeGiro = new DeGiro({\n    username: 'your_username_here',\n    pwd: '***********',\n  })\n\n  await degiro.login()\n\n  const result = await degiro.searchProduct({\n    text: 'TSLA',\n    type: DeGiroProducTypes.shares,\n    limit: 1,\n  })\n  console.log(JSON.stringify(result, null, 2))\n})()\n```\n\n### Cash Funds endpoints\n\n#### getCashFunds\n\n`getCashFunds(): Promise\u003cCashFoundType[]\u003e`\n\n### Porfolio endpoints\n\n#### getPortfolio\n\n`getPortfolio(config: GetPorfolioConfigType): Promise\u003cany[]\u003e`\n\n`getPortfolio` config parameter could have:\n* **type**: set the types or positions you want to fetch. Could be:\n  * ALL: Gets the response without filter it\n  * ALL_POSITIONS: Gets only positions in products. Exclude positions like 'CASH', etc.\n  * OPEN: Gets only opened positions. \n  * CLOSED: Gets only the closed positions in your portfolio.\n\n* **getProductDetails**: if is set to true the positions results will have a `productData` field with all the product details.\n\nGet all **open** positions:\n\n```js\nimport DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'\nconst { PORTFOLIO_POSITIONS_TYPE_ENUM } = DeGiroEnums\n\n(async () =\u003e {\n\n  const degiro: DeGiro = new DeGiro({\n    username: 'your_username_here',\n    pwd: '**********',\n  })\n\n  await degiro.login()\n\n  const portfolio = await degiro.getPortfolio({ \n    type: PORTFOLIO_POSITIONS_TYPE_ENUM.ALL, \n    getProductDetails: true,\n  })\n  console.log(JSON.stringify(portfolio, null, 2))\n})()\n```\n\nAlso you can fetch your portfolio data this way:\n\n```js\nimport DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'\nconst { PORTFOLIO_POSITIONS_TYPE_ENUM } = DeGiroEnums\n\n(async () =\u003e {\n\n  const degiro: DeGiro = new DeGiro({\n    username: 'your_username_here',\n    pwd: '**********',\n  })\n\n  await degiro.login()\n\n  const portfolio = await degiro.getPortfolio({ type: PORTFOLIO_POSITIONS_TYPE_ENUM.ALL })\n  console.log(JSON.stringify(portfolio, null, 2))\n})()\n```\n\nAnd getting product details too\n\n```js\nimport DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'\nconst { PORTFOLIO_POSITIONS_TYPE_ENUM } = DeGiroEnums\n\n(async () =\u003e {\n\n  const degiro: DeGiro = new DeGiro({\n    username: 'your_username_here',\n    pwd: '**********',\n  })\n\n  await degiro.login()\n\n  const portfolio = await degiro.getPortfolio({ \n    type: PORTFOLIO_POSITIONS_TYPE_ENUM.ALL, \n    getProductDetails: true,\n  })\n  console.log(JSON.stringify(portfolio, null, 2))\n})()\n```\n\n### Stocks endpoints\n\n#### getFavouriteProducts()\n\n`getFavouriteProducts(): Promise\u003cFavouriteProductType[]\u003e`\n\n#### getPopularStocks()\n\n`getPopularStocks(): Promise\u003cStockType[]\u003e`\n\n### Orders endpoints\n\n### getOrders()\n\n`getOrders(options: GetOrdersConfigType): Promise\u003cGetOrdersResultType\u003e`\n\n### getHistoricalOrders()\n\n`getHistoricalOrders(options: GetHistoricalOrdersOptionsType): Promise\u003cHistoricalOrdersType\u003e`\n\n### createOrder()\n\n`createOrder(order: OrderType): Promise\u003cCreateOrderResultType\u003e`\n\n* **OrderType**\n  * **buySell**: DeGiroActions,\n  * **orderType**: DeGiroMarketOrderTypes,\n  * **price**: *optional* Number,\n  * **productId**: string,\n  * **size**: number,\n  * **stopPrice**: *optional* number,\n  * **timeType**: DeGiroTimeTypes,\n\n\n* **DeGiroActions**\n  * **BUY**: 'BUY',\n  * **SELL**: 'SELL',\n\n\n* **DeGiroMarketOrderTypes**\n  * **LIMITED**: 0,\n  * **MARKET**: 2,\n  * **STOP_LOSS**: 3,\n  * **STOP_LOSS_LIMIT**: 1,\n\n* **DeGiroTimeTypes**\n  * **DAY**: 1,\n  * **PERMANENT**: 3,\n\n* **CreateOrderResultType**\n  * **confirmationId**: String,\n  * **freeSpaceNew**: Number,\n  * **transactionFees**: [TransactionFeeType],\n\n\n* **TransactionFeeType**\n  * **amount**: Number,\n  * **currency**: String,\n  * **id**: Number,\n\n\n```js\nimport DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'\nconst { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } = DeGiroEnums\nconst { OrderType } = DeGiroTypes\n\n(async () =\u003e {\n\n  const degiro: DeGiro = new DeGiro({\n    username: 'your_username_here',\n    pwd: '************'\n  })\n\n  await degiro.login()\n\n  const order: OrderType = {\n    buySell: DeGiroActions.BUY,\n    orderType: DeGiroMarketOrderTypes.LIMITED,\n    productId: '331868', // $AAPL - Apple Inc\n    size: 1,\n    timeType: DeGiroTimeTypes.DAY,\n    price: 272, // limit price [Degiro could reject this value]\n    // stopPrice: 2,\n  }\n\n  const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order)\n  console.log(JSON.stringify({ confirmationId, freeSpaceNew, transactionFees }, null, 2))\n})()\n```\n\n### executeOrder()\n\n`executeOrder(order: OrderType, executeId: string): Promise\u003cString\u003e`\n\n```js\nimport DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'\nconst { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } = DeGiroEnums\nconst { OrderType } = DeGiroTypes\n\n(async () =\u003e {\n\n  try {\n    const degiro: DeGiro = new DeGiro({\n      username: '\u003cyour_username_here\u003e',\n      pwd: \u003cstring\u003eprocess.env.DEGIRO_PWD,\n    })\n\n    await degiro.login()\n\n    const order: OrderType = {\n      buySell: DeGiroActions.BUY,\n      orderType: DeGiroMarketOrderTypes.LIMITED,\n      productId: '331868', // $AAPL - Apple Inc\n      size: 1,\n      timeType: DeGiroTimeTypes.DAY,\n      price: 270, // limit price\n      // stopPrice: 2,\n    }\n\n    const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order)\n    const orderId = await degiro.executeOrder(order, confirmationId)\n    console.log(`Order executed with id: ${orderId}`)\n  } catch (error) {\n    console.error(error)\n  }\n})()\n```\n\n### deleteOrder()\n\n`deleteOrder(orderId: String): Promise\u003cvoid\u003e`\n\n```js\nimport DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'\nconst { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } = DeGiroEnums\nconst { OrderType } = DeGiroTypes\n\n(async () =\u003e {\n\n  const degiro: DeGiro = new DeGiro({\n    username: '\u003cyour_username_here\u003e',\n    pwd: \u003cstring\u003eprocess.env.DEGIRO_PWD,\n  })\n\n  await degiro.login()\n\n  const order: OrderType = {\n    buySell: DeGiroActions.BUY,\n    orderType: DeGiroMarketOrderTypes.LIMITED,\n    productId: '331868', // $AAPL - Apple Inc\n    size: 1,\n    timeType: DeGiroTimeTypes.DAY,\n    price: 272, // limit price\n    // stopPrice: 2,\n  }\n\n  const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order)\n  const orderId = await degiro.executeOrder(order, confirmationId)\n  console.log(`Order executed with id: ${orderId}`)\n\n  // Wait few seconds to avoid \"Rate limit for the given request exceeded\" error\n  const TIMEOUT_SECONDS = 2 * 1000\n  const deleteOrderFunction = async () =\u003e {\n    try {\n      await degiro.deleteOrder(orderId)\n      console.log('Order removed')\n    } catch (error) {\n      console.error(error)\n    }\n  }\n  setTimeout(deleteOrderFunction, TIMEOUT_SECONDS)\n})()\n```\n\n### Miscellaneous endpoints\n\n#### getProductsByIds()\n\n`getProductsByIds(ids: string[]): Promise\u003cany[]\u003e`\n\n#### getNews()\n\n`getNews(options: GetNewsOptionsType): Promise\u003cNewsType\u003e`\n\n#### getWebi18nMessages()\n\n`getWebi18nMessages(lang: string): Promise\u003ci18nMessagesType\u003e`\n\n#### getWebSettings()\n\n`getWebSettings(): Promise\u003cWebSettingsType\u003e`\n\n#### getWebUserSettings()\n\n`getWebUserSettings(): Promise\u003cWebUserSettingType\u003e`\n\n#### getConfigDictionary()\n\n`getConfigDictionary(): Promise\u003cConfigDictionaryType\u003e`\n\n\n## All project Types\n\nIf you code with typescript and use [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense) you are going to get access to all objects properties and all stuff...\n\nIf you not, in the docs section could find all methods, functions, types, whatever you want. Don't waste more time and click here to see the [documentation](https://icastillejogomez.github.io/degiro-api/).\n\n### SomeType\n\n## Need help endpoints\n\nWe need help with the next endpoint:...\n\n## Degiro Command Line Interface\n\n[degiro-cli](https://github.com/icastillejogomez/degiro-cli) is an usefull command line interface that help us dealing with DeGiro platform through the terminal. You can see your portfolio status, create and execute orders and much more (may in the future)\n\n```sh\n$ degiro\nUsage: DeGiro Command Line Interface [options] [command]\n\nDeGiro CLI provide you access to DeGiro Broker across the terminal\n\nOptions:\n  -V, --version   output the version number\n  -h, --help      display help for command\n\nCommands:\n  login           validate credentials with DeGiro platform\n  search          Search products in DeGiro\n  portfolio       show account portfolio in real-time\n  help [command]  display help for command\n```\n## License\n\nMIT\n\n\n## TO DO List\n\n1. Two factor\n2. Get prices\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficastillejogomez%2Fdegiro-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficastillejogomez%2Fdegiro-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficastillejogomez%2Fdegiro-api/lists"}