Repository: icastillejogomez/degiro-api Branch: master Commit: ec76f202d366 Files: 322 Total size: 1.4 MB Directory structure: gitextract_vrkryjmw/ ├── .github/ │ └── workflows/ │ └── node.js.yml ├── .gitignore ├── .nycrc ├── LICENSE ├── README.md ├── dist/ │ ├── DeGiro.d.ts │ ├── DeGiro.js │ ├── api/ │ │ ├── createOrderRequest.d.ts │ │ ├── createOrderRequest.js │ │ ├── deleteOrderRequest.d.ts │ │ ├── deleteOrderRequest.js │ │ ├── executeOrderRequest.d.ts │ │ ├── executeOrderRequest.js │ │ ├── getAccountConfig.d.ts │ │ ├── getAccountConfig.js │ │ ├── getAccountData.d.ts │ │ ├── getAccountData.js │ │ ├── getAccountInfoRequest.d.ts │ │ ├── getAccountInfoRequest.js │ │ ├── getAccountReportsRequest.d.ts │ │ ├── getAccountReportsRequest.js │ │ ├── getAccountStateRequest.d.ts │ │ ├── getAccountStateRequest.js │ │ ├── getCashFundstRequest.d.ts │ │ ├── getCashFundstRequest.js │ │ ├── getConfigDictionaryRequest.d.ts │ │ ├── getConfigDictionaryRequest.js │ │ ├── getNewsRequest.d.ts │ │ ├── getNewsRequest.js │ │ ├── getOrdersRequest.d.ts │ │ ├── getOrdersRequest.js │ │ ├── getPopularStocksRequest.d.ts │ │ ├── getPopularStocksRequest.js │ │ ├── getPortfolioRequest.d.ts │ │ ├── getPortfolioRequest.js │ │ ├── getProductsByIdsRequest.d.ts │ │ ├── getProductsByIdsRequest.js │ │ ├── getTransactionsRequest.d.ts │ │ ├── getTransactionsRequest.js │ │ ├── getWebSettingsRequest.d.ts │ │ ├── getWebSettingsRequest.js │ │ ├── getWebUserSettingsRequest.d.ts │ │ ├── getWebUserSettingsRequest.js │ │ ├── getWebi18nMessagesRequest.d.ts │ │ ├── getWebi18nMessagesRequest.js │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── login.d.ts │ │ ├── login.js │ │ ├── logout.d.ts │ │ ├── logout.js │ │ ├── searchProductRequest.d.ts │ │ └── searchProductRequest.js │ ├── enums/ │ │ ├── DeGiroEnums.d.ts │ │ ├── DeGiroEnums.js │ │ ├── index.d.ts │ │ └── index.js │ ├── interfaces/ │ │ ├── DeGiroClassInterface.d.ts │ │ ├── DeGiroClassInterface.js │ │ ├── index.d.ts │ │ └── index.js │ ├── main.d.ts │ ├── main.js │ ├── types/ │ │ ├── AccountConfigType.d.ts │ │ ├── AccountConfigType.js │ │ ├── AccountDataType.d.ts │ │ ├── AccountDataType.js │ │ ├── AccountInfoType.d.ts │ │ ├── AccountInfoType.js │ │ ├── AccountReportsType.d.ts │ │ ├── AccountReportsType.js │ │ ├── CashFoundType.d.ts │ │ ├── CashFoundType.js │ │ ├── ConfigDictionaryType.d.ts │ │ ├── ConfigDictionaryType.js │ │ ├── CreateOrderResultType.d.ts │ │ ├── CreateOrderResultType.js │ │ ├── DeGiroSettupType.d.ts │ │ ├── DeGiroSettupType.js │ │ ├── FavouriteProductType.d.ts │ │ ├── FavouriteProductType.js │ │ ├── GetAccountStateOptionsType.d.ts │ │ ├── GetAccountStateOptionsType.js │ │ ├── GetHistoricalOrdersOptionsType.d.ts │ │ ├── GetHistoricalOrdersOptionsType.js │ │ ├── GetNewsOptionsType.d.ts │ │ ├── GetNewsOptionsType.js │ │ ├── GetOrdersConfigType.d.ts │ │ ├── GetOrdersConfigType.js │ │ ├── GetOrdersResultType.d.ts │ │ ├── GetOrdersResultType.js │ │ ├── GetPopularStocksConfigType.d.ts │ │ ├── GetPopularStocksConfigType.js │ │ ├── GetPorfolioConfigType.d.ts │ │ ├── GetPorfolioConfigType.js │ │ ├── GetTransactionsOptionsType.d.ts │ │ ├── GetTransactionsOptionsType.js │ │ ├── HistoricalOrdersType.d.ts │ │ ├── HistoricalOrdersType.js │ │ ├── IsLoginOptionsType.d.ts │ │ ├── IsLoginOptionsType.js │ │ ├── LoginRequestBodyType.d.ts │ │ ├── LoginRequestBodyType.js │ │ ├── LoginRequestParamsType.d.ts │ │ ├── LoginRequestParamsType.js │ │ ├── LoginResponseType.d.ts │ │ ├── LoginResponseType.js │ │ ├── NewsType.d.ts │ │ ├── NewsType.js │ │ ├── OrderType.d.ts │ │ ├── OrderType.js │ │ ├── PortfolioPositionType.d.ts │ │ ├── PortfolioPositionType.js │ │ ├── SearchProductOptionsType.d.ts │ │ ├── SearchProductOptionsType.js │ │ ├── SearchProductResultType.d.ts │ │ ├── SearchProductResultType.js │ │ ├── StockType.d.ts │ │ ├── StockType.js │ │ ├── TransactionFeeType.d.ts │ │ ├── TransactionFeeType.js │ │ ├── TransactionType.d.ts │ │ ├── TransactionType.js │ │ ├── WebSettingsType.d.ts │ │ ├── WebSettingsType.js │ │ ├── WebUserSettingType.d.ts │ │ ├── WebUserSettingType.js │ │ ├── i18nMessagesType.d.ts │ │ ├── i18nMessagesType.js │ │ ├── index.d.ts │ │ └── index.js │ └── utils/ │ ├── debug.d.ts │ ├── debug.js │ ├── generateReportURIFromID.d.ts │ ├── generateReportURIFromID.js │ ├── index.d.ts │ ├── index.js │ ├── processGetCashFundsResultListObject.d.ts │ ├── processGetCashFundsResultListObject.js │ ├── processGetOrdersResultListObject.d.ts │ ├── processGetOrdersResultListObject.js │ ├── processPortfolio.d.ts │ └── processPortfolio.js ├── docs/ │ ├── assets/ │ │ ├── css/ │ │ │ └── main.css │ │ └── js/ │ │ ├── main.js │ │ └── search.json │ ├── classes/ │ │ └── _degiro_.degiro.html │ ├── enums/ │ │ ├── _enums_degiroenums_.degiro_api_paths.html │ │ ├── _enums_degiroenums_.degiroactions.html │ │ ├── _enums_degiroenums_.degiromarketordertypes.html │ │ ├── _enums_degiroenums_.degiroproductypes.html │ │ ├── _enums_degiroenums_.degirosort.html │ │ ├── _enums_degiroenums_.degirotimetypes.html │ │ ├── _enums_degiroenums_.get_orders_types.html │ │ └── _enums_degiroenums_.portfolio_positions_type_enum.html │ ├── globals.html │ ├── index.html │ ├── interfaces/ │ │ └── _interfaces_degiroclassinterface_.degiroclassinterface.html │ └── modules/ │ ├── _api_createorderrequest_.html │ ├── _api_deleteorderrequest_.html │ ├── _api_executeorderrequest_.html │ ├── _api_getaccountconfig_.html │ ├── _api_getaccountdata_.html │ ├── _api_getaccountinforequest_.html │ ├── _api_getaccountreportsrequest_.html │ ├── _api_getaccountstaterequest_.html │ ├── _api_getcashfundstrequest_.html │ ├── _api_getconfigdictionaryrequest_.html │ ├── _api_getnewsrequest_.html │ ├── _api_getordersrequest_.html │ ├── _api_getportfoliorequest_.html │ ├── _api_getproductsbyidsrequest_.html │ ├── _api_getwebi18nmessagesrequest_.html │ ├── _api_getwebsettingsrequest_.html │ ├── _api_getwebusersettingsrequest_.html │ ├── _api_index_.html │ ├── _api_login_.html │ ├── _api_logout_.html │ ├── _api_searchproductrequest_.html │ ├── _degiro_.html │ ├── _enums_degiroenums_.html │ ├── _enums_index_.html │ ├── _interfaces_degiroclassinterface_.html │ ├── _interfaces_index_.html │ ├── _main_.html │ ├── _types_accountconfigtype_.html │ ├── _types_accountdatatype_.html │ ├── _types_accountinfotype_.html │ ├── _types_accountreportstype_.html │ ├── _types_cashfoundtype_.html │ ├── _types_configdictionarytype_.html │ ├── _types_createorderresulttype_.html │ ├── _types_degirosettuptype_.html │ ├── _types_favouriteproducttype_.html │ ├── _types_getaccountstateoptionstype_.html │ ├── _types_gethistoricalordersoptionstype_.html │ ├── _types_getnewsoptionstype_.html │ ├── _types_getordersconfigtype_.html │ ├── _types_getordersresulttype_.html │ ├── _types_getporfolioconfigtype_.html │ ├── _types_historicalorderstype_.html │ ├── _types_i18nmessagestype_.html │ ├── _types_index_.html │ ├── _types_isloginoptionstype_.html │ ├── _types_loginrequestbodytype_.html │ ├── _types_loginrequestparamstype_.html │ ├── _types_loginresponsetype_.html │ ├── _types_newstype_.html │ ├── _types_ordertype_.html │ ├── _types_portfoliopositiontype_.html │ ├── _types_searchproductoptionstype_.html │ ├── _types_searchproductresulttype_.html │ ├── _types_stocktype_.html │ ├── _types_transactionfeetype_.html │ ├── _types_websettingstype_.html │ ├── _types_webusersettingtype_.html │ ├── _utils_debug_.html │ ├── _utils_generatereporturifromid_.html │ ├── _utils_index_.html │ ├── _utils_processgetcashfundsresultlistobject_.html │ ├── _utils_processgetordersresultlistobject_.html │ └── _utils_processportfolio_.html ├── examples/ │ ├── createOrder.ts │ ├── deleteOrder.ts │ ├── executeOrder.ts │ ├── getAccountConfig.ts │ ├── getAccountInfo.ts │ ├── getAccountReports.ts │ ├── getAccountState.ts │ ├── getCashFunds.ts │ ├── getConfigDictionary.js │ ├── getMessages.ts │ ├── getNews.ts │ ├── getOrders.ts │ ├── getPopularStocks.ts │ ├── getPortfolio.ts │ ├── getWebSettings.ts │ ├── getWebUserSettings.ts │ ├── login.ts │ ├── searchProduct.ts │ └── static-login.ts ├── package.json ├── src/ │ ├── DeGiro.ts │ ├── api/ │ │ ├── createOrderRequest.ts │ │ ├── deleteOrderRequest.ts │ │ ├── executeOrderRequest.ts │ │ ├── getAccountConfig.ts │ │ ├── getAccountData.ts │ │ ├── getAccountInfoRequest.ts │ │ ├── getAccountReportsRequest.ts │ │ ├── getAccountStateRequest.ts │ │ ├── getCashFundstRequest.ts │ │ ├── getConfigDictionaryRequest.ts │ │ ├── getNewsRequest.ts │ │ ├── getOrdersRequest.ts │ │ ├── getPopularStocksRequest.ts │ │ ├── getPortfolioRequest.ts │ │ ├── getProductsByIdsRequest.ts │ │ ├── getTransactionsRequest.ts │ │ ├── getWebSettingsRequest.ts │ │ ├── getWebUserSettingsRequest.ts │ │ ├── getWebi18nMessagesRequest.ts │ │ ├── index.ts │ │ ├── login.ts │ │ ├── logout.ts │ │ └── searchProductRequest.ts │ ├── enums/ │ │ ├── DeGiroEnums.ts │ │ └── index.ts │ ├── interfaces/ │ │ ├── DeGiroClassInterface.ts │ │ └── index.ts │ ├── main.ts │ ├── types/ │ │ ├── AccountConfigType.ts │ │ ├── AccountDataType.ts │ │ ├── AccountInfoType.ts │ │ ├── AccountReportsType.ts │ │ ├── CashFoundType.ts │ │ ├── ConfigDictionaryType.ts │ │ ├── CreateOrderResultType.ts │ │ ├── DeGiroSettupType.ts │ │ ├── FavouriteProductType.ts │ │ ├── GetAccountStateOptionsType.ts │ │ ├── GetHistoricalOrdersOptionsType.ts │ │ ├── GetNewsOptionsType.ts │ │ ├── GetOrdersConfigType.ts │ │ ├── GetOrdersResultType.ts │ │ ├── GetPopularStocksConfigType.ts │ │ ├── GetPorfolioConfigType.ts │ │ ├── GetTransactionsOptionsType.ts │ │ ├── HistoricalOrdersType.ts │ │ ├── IsLoginOptionsType.ts │ │ ├── LoginRequestBodyType.ts │ │ ├── LoginRequestParamsType.ts │ │ ├── LoginResponseType.ts │ │ ├── NewsType.ts │ │ ├── OrderType.ts │ │ ├── PortfolioPositionType.ts │ │ ├── SearchProductOptionsType.ts │ │ ├── SearchProductResultType.ts │ │ ├── StockType.ts │ │ ├── TransactionFeeType.ts │ │ ├── TransactionType.ts │ │ ├── WebSettingsType.ts │ │ ├── WebUserSettingType.ts │ │ ├── i18nMessagesType.ts │ │ └── index.ts │ └── utils/ │ ├── debug.ts │ ├── generateReportURIFromID.ts │ ├── index.ts │ ├── processGetCashFundsResultListObject.ts │ ├── processGetOrdersResultListObject.ts │ └── processPortfolio.ts ├── tests/ │ ├── enviroment_vars.spec.ts │ ├── getAccountConfig.spec.ts │ ├── getAccountData.spec.ts │ ├── getJSESSIONID.spec.ts │ ├── isLogin.spec.ts │ ├── login.spec.ts │ ├── logout.spec.ts │ ├── searchProduct.spec.ts │ └── test_constants.ts ├── tsconfig.json └── tslint.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/workflows/node.js.yml ================================================ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions name: Node.js CI on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [10.x, 12.x, 14.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - run: yarn install --frozen-lockfile - run: yarn run build # - run: yarn test #dont enable this, the CI pipeline won't and shouldn't have credentials. - run: yarn coverage - run: yarn lint ================================================ FILE: .gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage *.lcov # nyc test coverage .nyc_output # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt # Bower dependency directory (https://bower.io/) bower_components # node-waf configuration .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ jspm_packages/ # TypeScript v1 declaration files typings/ # TypeScript cache *.tsbuildinfo # Optional npm cache directory .npm # Optional eslint cache .eslintcache # Microbundle cache .rpt2_cache/ .rts2_cache_cjs/ .rts2_cache_es/ .rts2_cache_umd/ # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variables file .env .env.test # parcel-bundler cache (https://parceljs.org/) .cache # Next.js build output .next # Nuxt.js build / generate output .nuxt # Gatsby files .cache/ # Comment in the public line in if your project uses Gatsby and *not* Next.js # https://nextjs.org/blog/next-9-1#public-directory-support # public # vuepress build output .vuepress/dist # Serverless directories .serverless/ # FuseBox cache .fusebox/ # DynamoDB Local files .dynamodb/ # TernJS port file .tern-port # Package-lock.json package-lock.json ================================================ FILE: .nycrc ================================================ { "cache": false, "check-coverage": false, "extension": [ ".ts" ], "include": [ "src/**/*.js", "src/**/*.ts" ], "exclude": [ "coverage/**", "node_modules/**", "**/*.d.ts", "**/*.test.ts" ], "sourceMap": true, "reporter": [ "html", "text", "text-summary" ], "all": true, "instrument": true } ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2020 Ignacio F. Castillejo Gómez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # DeGiro Trading Broker API This 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. All responses and objects are typed to develop faster and secure. Unfortunately this library can not be used as frontend library, as DeGiro does not allow external requests through their CORS policy. ![DeGiro Logo](https://raw.githubusercontent.com/icastillejogomez/degiro-api/master/.assets/degiro.png) ![stars](https://badgen.net/github/stars/icastillejogomez/degiro-api) ![stars](https://badgen.net/github/open-issues/icastillejogomez/degiro-api) ![stars](https://badgen.net/github/license/icastillejogomez/degiro-api)
Buy Me A Coffee
Be careful, DeGiro could block your account if they catch you using automation scripts ## Table of content * [DeGiro Trading Broker API](#degiro-trading-broker-api) * [Table of content](#table-of-content) * [Installation](#installation) * [How to use](#how-to-use) * [Create an instance of DeGiro](#create-an-instance-of-degiro) * [Active Debug mode](#local-files) * [Documentation](#documentation) * [Running tests set](#running-tests-set) * [Get JSESSIONID and reuse sessions](#get-jsessionid-and-reuse-sessions) * [Check if we are authenticated](#check-if-we-are-authenticated) * [API](#api) * [Session endpoints](#session-endpoints) * [login](#login) * [logout](#logout) * [isLogin](#isLogin) * [getJSESSIONID](#getJSESSIONID) * [Account endpoints](#account-endpoints) * [getAccountConfig](#getAccountConfig) * [getAccountData](#getAccountData) * [getAccountState](#getAccountState) * [getAccountReports](#getAccountReports) * [getAccountInfo](#getAccountInfo) * [Search products endpoints](#foo) * [searchProduct](#searchProduct) * [Cash Funds endpoints](#cash-funds-endpoints) * [getCashFunds](#getCashFunds) * [Porfolio endpoints](#foo) * [Stocks endpoints](#foo) * [getFavouriteProducts](#foo) * [getPopularStocks](#foo) * [Orders endpoints](#foo) * [getOrders](#foo) * [getHistoricalOrders](#foo) * [createOrder](#foo) * [executeOrder](#foo) * [deleteOrder](#foo) * [Miscellaneous endpoints](#foo) * [getProductsByIds](#foo) * [getNews](#foo) * [getWebi18nMessages](#foo) * [getWebSettings](#foo) * [getWebUserSettings](#foo) * [getConfigDictionary](#foo) * [All project Types](#all-project-types) * [SomeType](#sometype) * [Need help endpoints](#need-help-endpoints) * [Degiro Command Line Interface](#degiro-command-line-interface) * [License](#dependency) * [TO DO List](#to-do-list) ## Installation ```sh # using npm npm install --save degiro-api # using yarn yarn add degiro-api ``` ## How to use ### Create an instance of DeGiro Basic 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` ```js const DeGiro = require('degiro-api').default // or import DeGiro from 'degiro-api' // Basic degiro init const degiro = new DeGiro({ username: '', pwd: '*****' }) // or creating with the static create method const degiro = DeGiro.create({ username: '*****', pwd: '*****' }) // or create with env credentials const degiro = new DeGiro() // <-- Use DEGIRO_USER & DEGIRO_PWD ``` ### Active Debug mode Inside 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. ```js $ export DEGIRO_DEBUG=1 $ yarn start ``` ### Documentation Run the next command and open index.html file inside doc folder to see a fresh documentation of the module. Generate the documentation is easy, only run the next command: ```sh $ yarn doc or $ npm run doc ``` ### Running tests set Before run the test set you must set DEGIRO_USER & DEGIRO_PWD env export variables to attach an account to the test sets. Be 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 🤷‍♂️) Now, 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) To run this experimental feature set the `DEGIRO_TESTS_REUSE_SESSION` env variable to any truthy value. Keep 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. To run all tests set run the command: `yarn test` or `npm run test` ### Get JSESSIONID and reuse sessions The 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: ```js import DeGiro from 'degiro-api' (async () => { const degiro = new DeGiro({}) // <-- Using ENV variables await degiro.login() // Get the jsessionId (LOOK, is not a promise) const jsessionId = degiro.getJSESSIONID() })() ``` ```js import DeGiro from 'degiro-api' (async () => { // Create an instance from a previous session const degiro = new DeGiro({ username: '', // process.env['DEGIRO_USER] pwd: '', // process.env['DEGIRO_PWD] oneTimePassword: '', // process.env['DEGIRO_OTP] jsessionId: '', // process.env['DEGIRO_JSESSIONID] }) // Hydrate // Re-use sessions need to re-hydrate the account config data and could use as a session expiration checker await degiro.login() // Do your stuff here... })() ``` ### Check if we are authenticated ```js import DeGiro from 'degiro-api' (async () => { // Create an instance from a previous session const degiro = new DeGiro({}) // <-- Using ENV variables if (!degiro.isLogin()) { await degiro.login() if (degiro.isLogin()) { // AWESOME!! We're in } } })() ``` The 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. You 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) ```js import DeGiro from 'degiro-api' (async () => { // Create an instance from a previous session const degiro = new DeGiro({}) // <-- Using ENV variables // Force to make a request and check if session is still alive if(! await degiro.isLogin({ secure: true })) { await degiro.login() } })() ``` ## API ### Session endpoints #### login `login(): Promise` ```js import DeGiro from 'degiro-api' const degiro = new DeGiro({}) const accountData = await degiro.login() ``` #### logout `logout(): Promise` ```js import DeGiro from 'degiro-api' const degiro = new DeGiro({}) const accountData = await degiro.login() await degiro.logout() ``` #### isLogin `isLogin() (options?: IsLoginOptionsType): boolean | Promise` ```js import DeGiro from 'degiro-api' const degiro = new DeGiro({}) await degiro.login() const isLogin = degiro.isLogin() if (! await degiro.isLogin({ secure: true })) { // Do your magic } ``` #### getJSESSIONID `getJSESSIONID(): string | undefined` ```js import DeGiro from 'degiro-api' const degiro = new DeGiro({}) degiro.getJSESSIONID() // undefined await degiro.login() degiro.getJSESSIONID() // string ``` ### Account endpoints #### getAccountConfig `getAccountConfig(sessionId: string): Promise` ```js import DeGiro from 'degiro-api' const degiro = new DeGiro({}) await degiro.login() const accountConfig = await degiro.getAccountConfig() console.log(accountConfig) ``` #### getAccountData `getAccountData(): Promise` ```js import DeGiro from 'degiro-api' const degiro = new DeGiro({}) await degiro.login() // Login also returns accountData const accountData = await degiro.getAccountData() console.log(accountData) ``` #### getAccountState `getAccountState(options: GetAccountStateOptionsType): Promise` ```js import DeGiro from 'degiro-api' const degiro = new DeGiro({}) await degiro.login() const accountState = await degiro.getAccountState() console.log(accountState) ``` #### getAccountReports `getAccountReports(): Promise` ```js import DeGiro from 'degiro-api' const degiro = new DeGiro({}) await degiro.login() const reports = await degiro.getAccountReports() console.log(reports) ``` #### getAccountInfo `getAccountInfo(): Promise` ```js import DeGiro from 'degiro-api' const degiro = new DeGiro({}) await degiro.login() const accountInfo = await degiro.getAccountInfo() console.log(accountInfo) ``` ### Search products endpoints #### searchProduct `searchProduct(options: SearchProductOptionsType): Promise` * **options**: * **text**: *required* string, * **type**: *optional* DeGiroProducTypes * **limit**: *optional* number default=10, * **offset**: *optional* number default=0, `DeGiroProducTypes` * *shares*: 1 * *bonds*: 2 * *futures*: 7 * *options*: 8 * *investmendFunds*: 13 * *leveragedProducts*: 14 * *etfs*: 131 * *cfds*: 535 * *warrants*: 536 Search the text "AAPL" without any limitation ```js import DeGiro from 'degiro-api' (async () => { const degiro: DeGiro = new DeGiro({ username: 'your_username_here', pwd: '***********', }) await degiro.login() const result = await degiro.searchProduct({ text: 'AAPL' }) console.log(JSON.stringify(result, null, 2)) })() ``` Search TSLA stock ```js import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api' const { DeGiroProducTypes } = DeGiroEnums (async () => { const degiro: DeGiro = new DeGiro({ username: 'your_username_here', pwd: '***********', }) await degiro.login() const result = await degiro.searchProduct({ text: 'TSLA', type: DeGiroProducTypes.shares, limit: 1, }) console.log(JSON.stringify(result, null, 2)) })() ``` ### Cash Funds endpoints #### getCashFunds `getCashFunds(): Promise` ### Porfolio endpoints #### getPortfolio `getPortfolio(config: GetPorfolioConfigType): Promise` `getPortfolio` config parameter could have: * **type**: set the types or positions you want to fetch. Could be: * ALL: Gets the response without filter it * ALL_POSITIONS: Gets only positions in products. Exclude positions like 'CASH', etc. * OPEN: Gets only opened positions. * CLOSED: Gets only the closed positions in your portfolio. * **getProductDetails**: if is set to true the positions results will have a `productData` field with all the product details. Get all **open** positions: ```js import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api' const { PORTFOLIO_POSITIONS_TYPE_ENUM } = DeGiroEnums (async () => { const degiro: DeGiro = new DeGiro({ username: 'your_username_here', pwd: '**********', }) await degiro.login() const portfolio = await degiro.getPortfolio({ type: PORTFOLIO_POSITIONS_TYPE_ENUM.ALL, getProductDetails: true, }) console.log(JSON.stringify(portfolio, null, 2)) })() ``` Also you can fetch your portfolio data this way: ```js import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api' const { PORTFOLIO_POSITIONS_TYPE_ENUM } = DeGiroEnums (async () => { const degiro: DeGiro = new DeGiro({ username: 'your_username_here', pwd: '**********', }) await degiro.login() const portfolio = await degiro.getPortfolio({ type: PORTFOLIO_POSITIONS_TYPE_ENUM.ALL }) console.log(JSON.stringify(portfolio, null, 2)) })() ``` And getting product details too ```js import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api' const { PORTFOLIO_POSITIONS_TYPE_ENUM } = DeGiroEnums (async () => { const degiro: DeGiro = new DeGiro({ username: 'your_username_here', pwd: '**********', }) await degiro.login() const portfolio = await degiro.getPortfolio({ type: PORTFOLIO_POSITIONS_TYPE_ENUM.ALL, getProductDetails: true, }) console.log(JSON.stringify(portfolio, null, 2)) })() ``` ### Stocks endpoints #### getFavouriteProducts() `getFavouriteProducts(): Promise` #### getPopularStocks() `getPopularStocks(): Promise` ### Orders endpoints ### getOrders() `getOrders(options: GetOrdersConfigType): Promise` ### getHistoricalOrders() `getHistoricalOrders(options: GetHistoricalOrdersOptionsType): Promise` ### createOrder() `createOrder(order: OrderType): Promise` * **OrderType** * **buySell**: DeGiroActions, * **orderType**: DeGiroMarketOrderTypes, * **price**: *optional* Number, * **productId**: string, * **size**: number, * **stopPrice**: *optional* number, * **timeType**: DeGiroTimeTypes, * **DeGiroActions** * **BUY**: 'BUY', * **SELL**: 'SELL', * **DeGiroMarketOrderTypes** * **LIMITED**: 0, * **MARKET**: 2, * **STOP_LOSS**: 3, * **STOP_LOSS_LIMIT**: 1, * **DeGiroTimeTypes** * **DAY**: 1, * **PERMANENT**: 3, * **CreateOrderResultType** * **confirmationId**: String, * **freeSpaceNew**: Number, * **transactionFees**: [TransactionFeeType], * **TransactionFeeType** * **amount**: Number, * **currency**: String, * **id**: Number, ```js import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api' const { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } = DeGiroEnums const { OrderType } = DeGiroTypes (async () => { const degiro: DeGiro = new DeGiro({ username: 'your_username_here', pwd: '************' }) await degiro.login() const order: OrderType = { buySell: DeGiroActions.BUY, orderType: DeGiroMarketOrderTypes.LIMITED, productId: '331868', // $AAPL - Apple Inc size: 1, timeType: DeGiroTimeTypes.DAY, price: 272, // limit price [Degiro could reject this value] // stopPrice: 2, } const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order) console.log(JSON.stringify({ confirmationId, freeSpaceNew, transactionFees }, null, 2)) })() ``` ### executeOrder() `executeOrder(order: OrderType, executeId: string): Promise` ```js import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api' const { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } = DeGiroEnums const { OrderType } = DeGiroTypes (async () => { try { const degiro: DeGiro = new DeGiro({ username: '', pwd: process.env.DEGIRO_PWD, }) await degiro.login() const order: OrderType = { buySell: DeGiroActions.BUY, orderType: DeGiroMarketOrderTypes.LIMITED, productId: '331868', // $AAPL - Apple Inc size: 1, timeType: DeGiroTimeTypes.DAY, price: 270, // limit price // stopPrice: 2, } const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order) const orderId = await degiro.executeOrder(order, confirmationId) console.log(`Order executed with id: ${orderId}`) } catch (error) { console.error(error) } })() ``` ### deleteOrder() `deleteOrder(orderId: String): Promise` ```js import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api' const { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } = DeGiroEnums const { OrderType } = DeGiroTypes (async () => { const degiro: DeGiro = new DeGiro({ username: '', pwd: process.env.DEGIRO_PWD, }) await degiro.login() const order: OrderType = { buySell: DeGiroActions.BUY, orderType: DeGiroMarketOrderTypes.LIMITED, productId: '331868', // $AAPL - Apple Inc size: 1, timeType: DeGiroTimeTypes.DAY, price: 272, // limit price // stopPrice: 2, } const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order) const orderId = await degiro.executeOrder(order, confirmationId) console.log(`Order executed with id: ${orderId}`) // Wait few seconds to avoid "Rate limit for the given request exceeded" error const TIMEOUT_SECONDS = 2 * 1000 const deleteOrderFunction = async () => { try { await degiro.deleteOrder(orderId) console.log('Order removed') } catch (error) { console.error(error) } } setTimeout(deleteOrderFunction, TIMEOUT_SECONDS) })() ``` ### Miscellaneous endpoints #### getProductsByIds() `getProductsByIds(ids: string[]): Promise` #### getNews() `getNews(options: GetNewsOptionsType): Promise` #### getWebi18nMessages() `getWebi18nMessages(lang: string): Promise` #### getWebSettings() `getWebSettings(): Promise` #### getWebUserSettings() `getWebUserSettings(): Promise` #### getConfigDictionary() `getConfigDictionary(): Promise` ## All project Types If 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... If 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/). ### SomeType ## Need help endpoints We need help with the next endpoint:... ## Degiro Command Line Interface [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) ```sh $ degiro Usage: DeGiro Command Line Interface [options] [command] DeGiro CLI provide you access to DeGiro Broker across the terminal Options: -V, --version output the version number -h, --help display help for command Commands: login validate credentials with DeGiro platform search Search products in DeGiro portfolio show account portfolio in real-time help [command] display help for command ``` ## License MIT ## TO DO List 1. Two factor 2. Get prices ================================================ FILE: dist/DeGiro.d.ts ================================================ import { DeGiroClassInterface } from './interfaces'; import { DeGiroSettupType, AccountConfigType, AccountDataType, CashFoundType, SearchProductResultType, GetPorfolioConfigType, SearchProductOptionsType, OrderType, CreateOrderResultType, IsLoginOptionsType, GetOrdersConfigType, GetOrdersResultType, GetAccountStateOptionsType, AccountReportsType, AccountInfoType, GetHistoricalOrdersOptionsType, HistoricalOrdersType, FavouriteProductType, StockType, GetNewsOptionsType, NewsType, WebUserSettingType, ConfigDictionaryType, i18nMessagesType, WebSettingsType, GetPopularStocksConfigType, GetTransactionsOptionsType, TransactionType } from './types'; /** * @class DeGiro * @description Main class of DeGiro Unofficial API. */ export declare class DeGiro implements DeGiroClassInterface { private readonly username; private readonly pwd; private readonly oneTimePassword; private jsessionId; private accountConfig; private accountData; constructor(params?: DeGiroSettupType); static create(params: DeGiroSettupType): DeGiro; login(): Promise; logout(): Promise; isLogin(options?: IsLoginOptionsType): boolean | Promise; private hasSessionId; private loginWithJSESSIONID; getJSESSIONID: () => string | undefined; getAccountConfig(sessionId?: string): Promise; getAccountData(): Promise; getAccountState(options: GetAccountStateOptionsType): Promise; getAccountReports(): Promise; getAccountInfo(): Promise; searchProduct(options: SearchProductOptionsType): Promise; getCashFunds(): Promise; getPortfolio(config: GetPorfolioConfigType): Promise; private completePortfolioDetails; getFavouriteProducts(): Promise; getPopularStocks(config?: GetPopularStocksConfigType): Promise; getOrders(config: GetOrdersConfigType): Promise; getHistoricalOrders(options: GetHistoricalOrdersOptionsType): Promise; createOrder(order: OrderType): Promise; executeOrder(order: OrderType, executeId: String): Promise; deleteOrder(orderId: String): Promise; getTransactions(options: GetTransactionsOptionsType): Promise; getProductsByIds(ids: string[]): Promise; getNews(options: GetNewsOptionsType): Promise; getWebi18nMessages(lang?: string): Promise; getWebSettings(): Promise; getWebUserSettings(): Promise; getConfigDictionary(): Promise; } //# sourceMappingURL=DeGiro.d.ts.map ================================================ FILE: dist/DeGiro.js ================================================ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeGiro = void 0; // Import modules var async = __importStar(require("async")); // Import requests var api_1 = require("./api"); /** * @class DeGiro * @description Main class of DeGiro Unofficial API. */ var DeGiro = /** @class */ (function () { /* Constructor and generator function */ function DeGiro(params) { var _this = this; if (params === void 0) { params = {}; } this.hasSessionId = function () { return !!_this.accountConfig && !!_this.accountConfig.data && !!_this.accountConfig.data.sessionId; }; this.getJSESSIONID = function () { return _this.hasSessionId() ? _this.accountConfig.data.sessionId : undefined; }; var username = params.username, pwd = params.pwd, oneTimePassword = params.oneTimePassword, jsessionId = params.jsessionId; username = username || process.env['DEGIRO_USER']; pwd = pwd || process.env['DEGIRO_PWD']; oneTimePassword = oneTimePassword || process.env['DEGIRO_OTP']; jsessionId = jsessionId || process.env['DEGIRO_JSESSIONID']; if (!username && !jsessionId) throw new Error('DeGiro api needs an username to access'); if (!pwd && !jsessionId) throw new Error('DeGiro api needs an password to access'); this.username = username; this.pwd = pwd; this.oneTimePassword = oneTimePassword; this.jsessionId = jsessionId; } DeGiro.create = function (params) { return new DeGiro(params); }; /* Session methods */ DeGiro.prototype.login = function () { var _this = this; if (this.jsessionId) return this.loginWithJSESSIONID(this.jsessionId); return new Promise(function (resolve, reject) { api_1.loginRequest({ username: _this.username, pwd: _this.pwd, oneTimePassword: _this.oneTimePassword, }) .then(function (loginResponse) { if (!loginResponse.sessionId) reject('Login response have not a sessionId field'); else return _this.getAccountConfig(loginResponse.sessionId); }) .then(function () { return _this.getAccountData(); }) .then(resolve) .catch(reject); }); }; DeGiro.prototype.logout = function () { var _this = this; return new Promise(function (resolve, reject) { if (!_this.accountData || !_this.accountConfig) { return reject('You must log in first'); } api_1.logoutRequest(_this.accountData, _this.accountConfig) .then(function () { delete _this.accountData; delete _this.accountConfig; resolve(); }) .catch(reject); }); }; DeGiro.prototype.isLogin = function (options) { var _this = this; if (!options || !options.secure) return this.hasSessionId() && !!this.accountData; return new Promise(function (resolve) { _this.getAccountConfig() .then(function () { return resolve(true); }) .catch(function () { return resolve(false); }); }); }; DeGiro.prototype.loginWithJSESSIONID = function (jsessionId) { var _this = this; return new Promise(function (resolve, reject) { _this.getAccountConfig(jsessionId) .then(function () { return _this.getAccountData(); }) .then(function (accountData) { _this.jsessionId = undefined; // Remove the jsessionId to prevent reuse resolve(accountData); }) .catch(reject); }); }; /* Account methods */ DeGiro.prototype.getAccountConfig = function (sessionId) { var _this = this; return new Promise(function (resolve, reject) { if (!sessionId && !_this.hasSessionId()) { return reject('You must log in first or provide a JSESSIONID'); } api_1.getAccountConfigRequest(sessionId || _this.accountConfig.data.sessionId) .then(function (accountConfig) { _this.accountConfig = accountConfig; resolve(accountConfig); }) .catch(reject); }); }; DeGiro.prototype.getAccountData = function () { var _this = this; return new Promise(function (resolve, reject) { if (!_this.hasSessionId()) { return reject('You must log in first'); } api_1.getAccountDataRequest(_this.accountConfig) .then(function (accountData) { _this.accountData = accountData; resolve(accountData); }) .catch(reject); }); }; DeGiro.prototype.getAccountState = function (options) { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getAccountStateRequest(this.accountData, this.accountConfig, options); }; DeGiro.prototype.getAccountReports = function () { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getAccountReportsRequest(this.accountData, this.accountConfig); }; DeGiro.prototype.getAccountInfo = function () { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getAccountInfoRequest(this.accountData, this.accountConfig); }; /* Search methods */ DeGiro.prototype.searchProduct = function (options) { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.searchProductRequest(options, this.accountData, this.accountConfig); }; /* Cash Funds methods */ DeGiro.prototype.getCashFunds = function () { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getCashFundstRequest(this.accountData, this.accountConfig); }; /* Porfolio methods */ DeGiro.prototype.getPortfolio = function (config) { var _this = this; return new Promise(function (resolve, reject) { if (!_this.hasSessionId()) { return reject('You must log in first'); } api_1.getPortfolioRequest(_this.accountData, _this.accountConfig, config) .then(function (portfolio) { return _this.completePortfolioDetails(portfolio, config.getProductDetails || false); }) .then(resolve) .catch(reject); }); }; DeGiro.prototype.completePortfolioDetails = function (portfolio, getProductDetails) { var _this = this; if (!getProductDetails) return Promise.resolve(portfolio); return new Promise(function (resolve, reject) { async.map(portfolio, function (position, next) { if (position.positionType !== 'PRODUCT') return next(null, position); _this.getProductsByIds([(position.id)]) .then(function (product) { position.productData = product[position.id]; next(null, position); }) .catch(function (error) { return next(error); }); // tslint:disable-next-line: align }, function (error, portfolio) { if (error) return reject(error); resolve(portfolio); }); }); }; /* Stocks methods */ DeGiro.prototype.getFavouriteProducts = function () { return new Promise(function (resolve, reject) { reject('Method not implemented'); }); }; DeGiro.prototype.getPopularStocks = function (config) { if (config === void 0) { config = {}; } if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getPopularStocksRequest(this.accountData, this.accountConfig, config); }; /* Orders methods */ DeGiro.prototype.getOrders = function (config) { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getOrdersRequest(this.accountData, this.accountConfig, config); }; DeGiro.prototype.getHistoricalOrders = function (options) { return new Promise(function (resolve, reject) { reject('Method not implemented'); }); }; DeGiro.prototype.createOrder = function (order) { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.createOrderRequest(order, this.accountData, this.accountConfig); }; DeGiro.prototype.executeOrder = function (order, executeId) { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.executeOrderRequest(order, executeId, this.accountData, this.accountConfig); }; DeGiro.prototype.deleteOrder = function (orderId) { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.deleteOrderRequest(orderId, this.accountData, this.accountConfig); }; DeGiro.prototype.getTransactions = function (options) { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getTransactionsRequest(this.accountData, this.accountConfig, options); }; /* Miscellaneous methods */ DeGiro.prototype.getProductsByIds = function (ids) { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getProductsByIdsRequest(ids, this.accountData, this.accountConfig); }; DeGiro.prototype.getNews = function (options) { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getNewsRequest(options, this.accountData, this.accountConfig); }; DeGiro.prototype.getWebi18nMessages = function (lang) { if (lang === void 0) { lang = 'es_ES'; } if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getWebi18nMessagesRequest(lang, this.accountData, this.accountConfig); }; DeGiro.prototype.getWebSettings = function () { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getWebSettingsRequest(this.accountData, this.accountConfig); }; DeGiro.prototype.getWebUserSettings = function () { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getWebUserSettingsRequest(this.accountData, this.accountConfig); }; DeGiro.prototype.getConfigDictionary = function () { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return api_1.getConfigDictionaryRequest(this.accountData, this.accountConfig); }; return DeGiro; }()); exports.DeGiro = DeGiro; //# sourceMappingURL=DeGiro.js.map ================================================ FILE: dist/api/createOrderRequest.d.ts ================================================ import { OrderType, AccountDataType, AccountConfigType, CreateOrderResultType } from '../types'; export declare function createOrderRequest(order: OrderType, accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=createOrderRequest.d.ts.map ================================================ FILE: dist/api/createOrderRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createOrderRequest = void 0; // Import Consts var enums_1 = require("../enums"); var CREATE_ORDER_PATH = enums_1.DEGIRO_API_PATHS.CREATE_ORDER_PATH; // Import debug console log var utils_1 = require("../utils"); function createOrderRequest(order, accountData, accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { method: 'POST', headers: { 'Content-Type': 'application/json;charset=UTF-8', }, body: JSON.stringify(order), credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; var uri = "" + accountConfig.data.tradingUrl + CREATE_ORDER_PATH + ";jsessionid=" + accountConfig.data.sessionId + "?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId; utils_1.debug(uri, requestOptions); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { if (res.errors) return reject(res.errors); resolve(res.data); }) .catch(reject); }); } exports.createOrderRequest = createOrderRequest; //# sourceMappingURL=createOrderRequest.js.map ================================================ FILE: dist/api/deleteOrderRequest.d.ts ================================================ import { AccountDataType, AccountConfigType } from '../types'; export declare function deleteOrderRequest(orderId: String, accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=deleteOrderRequest.d.ts.map ================================================ FILE: dist/api/deleteOrderRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.deleteOrderRequest = void 0; // Import debug console log var utils_1 = require("../utils"); function deleteOrderRequest(orderId, accountData, accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { method: 'DELETE', headers: { 'Content-Type': 'application/json;charset=UTF-8', }, body: '', credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // tslint:disable-next-line: max-line-length var uri = "https://trader.degiro.nl/trading/secure/v5/order/" + orderId + ";jsessionid=" + accountConfig.data.sessionId + "?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId; utils_1.debug(uri, requestOptions); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { utils_1.debug(res); if (res.errors) return reject(res.errors); resolve(); }) .catch(reject); }); } exports.deleteOrderRequest = deleteOrderRequest; //# sourceMappingURL=deleteOrderRequest.js.map ================================================ FILE: dist/api/executeOrderRequest.d.ts ================================================ import { OrderType, AccountDataType, AccountConfigType } from '../types'; export declare function executeOrderRequest(order: OrderType, executeId: String, accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=executeOrderRequest.d.ts.map ================================================ FILE: dist/api/executeOrderRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.executeOrderRequest = void 0; // Import debug console log var utils_1 = require("../utils"); function executeOrderRequest(order, executeId, accountData, accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { method: 'POST', headers: { 'Content-Type': 'application/json;charset=UTF-8', }, body: JSON.stringify(order), credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // tslint:disable-next-line: max-line-length var uri = "https://trader.degiro.nl/trading/secure/v5/order/" + executeId + ";jsessionid=" + accountConfig.data.sessionId + "?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId; utils_1.debug(uri, requestOptions); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { if (res.errors) return reject(res.errors); resolve(res.data.orderId); }) .catch(reject); }); } exports.executeOrderRequest = executeOrderRequest; //# sourceMappingURL=executeOrderRequest.js.map ================================================ FILE: dist/api/getAccountConfig.d.ts ================================================ import { AccountConfigType } from '../types'; export declare function getAccountConfigRequest(sessionId: string): Promise; //# sourceMappingURL=getAccountConfig.d.ts.map ================================================ FILE: dist/api/getAccountConfig.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAccountConfigRequest = void 0; // Import enums var enums_1 = require("../enums"); var BASE_API_URL = enums_1.DEGIRO_API_PATHS.BASE_API_URL, GET_ACCOUNT_CONFIG_PATH = enums_1.DEGIRO_API_PATHS.GET_ACCOUNT_CONFIG_PATH; // Import debug console log var utils_1 = require("../utils"); function getAccountConfigRequest(sessionId) { return new Promise(function (resolve, reject) { var requestOptions = { headers: { Cookie: "JSESSIONID=" + sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data utils_1.debug("Making request to " + BASE_API_URL + GET_ACCOUNT_CONFIG_PATH + " with JSESSIONID: " + sessionId); fetch(BASE_API_URL + GET_ACCOUNT_CONFIG_PATH, requestOptions) .then(function (res) { if (!res.ok) { reject(res.statusText); } return res.json(); }) .then(function (res) { utils_1.debug('Response:\n', JSON.stringify(res, null, 2)); resolve(res); }) .catch(reject); }); } exports.getAccountConfigRequest = getAccountConfigRequest; //# sourceMappingURL=getAccountConfig.js.map ================================================ FILE: dist/api/getAccountData.d.ts ================================================ import { AccountDataType, AccountConfigType } from '../types'; export declare function getAccountDataRequest(accountConfig: AccountConfigType): Promise; //# sourceMappingURL=getAccountData.d.ts.map ================================================ FILE: dist/api/getAccountData.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAccountDataRequest = void 0; // Import debug console log var utils_1 = require("../utils"); function getAccountDataRequest(accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data utils_1.debug("Making request to " + accountConfig.data.paUrl + "client?sessionId=" + accountConfig.data.sessionId); fetch(accountConfig.data.paUrl + "client?sessionId=" + accountConfig.data.sessionId, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { utils_1.debug('Response:\n', JSON.stringify(res, null, 2)); resolve(res); }) .catch(reject); }); } exports.getAccountDataRequest = getAccountDataRequest; //# sourceMappingURL=getAccountData.js.map ================================================ FILE: dist/api/getAccountInfoRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, AccountInfoType } from '../types'; export declare function getAccountInfoRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=getAccountInfoRequest.d.ts.map ================================================ FILE: dist/api/getAccountInfoRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAccountInfoRequest = void 0; // Import debug console log var utils_1 = require("../utils"); // Importamos constantes var enums_1 = require("../enums"); var GET_ACCOUNT_INFO_PATH = enums_1.DEGIRO_API_PATHS.GET_ACCOUNT_INFO_PATH; function getAccountInfoRequest(accountData, accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data var uri = "" + accountConfig.data.tradingUrl + GET_ACCOUNT_INFO_PATH + accountData.data.intAccount + ";jsessionid=" + accountConfig.data.sessionId; utils_1.debug("Making request to " + uri); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { utils_1.debug('Response:\n', JSON.stringify(res, null, 2)); var data = res.data; resolve(data); }) .catch(reject); }); } exports.getAccountInfoRequest = getAccountInfoRequest; //# sourceMappingURL=getAccountInfoRequest.js.map ================================================ FILE: dist/api/getAccountReportsRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, AccountReportsType } from '../types'; export declare function getAccountReportsRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=getAccountReportsRequest.d.ts.map ================================================ FILE: dist/api/getAccountReportsRequest.js ================================================ "use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAccountReportsRequest = void 0; // Import debug console log var utils_1 = require("../utils"); // Import utils functions var generateReportURIFromID_1 = require("../utils/generateReportURIFromID"); // Importamos constantes var enums_1 = require("../enums"); var GET_ACCOUNT_REPORTS_PATH = enums_1.DEGIRO_API_PATHS.GET_ACCOUNT_REPORTS_PATH; function getAccountReportsRequest(accountData, accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data var uri = "" + accountConfig.data.paUrl + GET_ACCOUNT_REPORTS_PATH + "?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId; utils_1.debug("Making request to " + uri); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { utils_1.debug('Response:\n', JSON.stringify(res, null, 2)); var data = res.data; // Añadimos la URL de descarga del archivo para que sea más facil en cliente data = data.map(function (report) { return (__assign(__assign({}, report), { uri: generateReportURIFromID_1.generateReportURIFromID(report.id, accountData, accountConfig) })); }); resolve(data); }) .catch(reject); }); } exports.getAccountReportsRequest = getAccountReportsRequest; //# sourceMappingURL=getAccountReportsRequest.js.map ================================================ FILE: dist/api/getAccountStateRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, GetAccountStateOptionsType } from '../types'; export declare function getAccountStateRequest(accountData: AccountDataType, accountConfig: AccountConfigType, config: GetAccountStateOptionsType): Promise; //# sourceMappingURL=getAccountStateRequest.d.ts.map ================================================ FILE: dist/api/getAccountStateRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAccountStateRequest = void 0; // Import debug console log var utils_1 = require("../utils"); var DeGiroEnums_1 = require("../enums/DeGiroEnums"); var GET_ACCOUNT_STATE_PATH = DeGiroEnums_1.DEGIRO_API_PATHS.GET_ACCOUNT_STATE_PATH; // tslint:disable-next-line: max-line-length function getAccountStateRequest(accountData, accountConfig, config) { return new Promise(function (resolve, reject) { // Create params to get orders by types var from = config.from, to = config.to; var params = ''; params += "fromDate=" + encodeURIComponent(from) + "&"; params += "toDate=" + encodeURIComponent(to) + "&"; params += "intAccount=" + accountData.data.intAccount + "&"; params += "sessionId=" + accountConfig.data.sessionId; var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data var uri = "" + accountConfig.data.reportingUrl + GET_ACCOUNT_STATE_PATH + "?" + params; utils_1.debug("Making request to " + uri); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { if (!res.data || !res.data.cashMovements || !Array.isArray(res.data.cashMovements)) return reject('DeGiro response does not match with know scheme'); resolve(res.data.cashMovements); }) .catch(reject); }); } exports.getAccountStateRequest = getAccountStateRequest; //# sourceMappingURL=getAccountStateRequest.js.map ================================================ FILE: dist/api/getCashFundstRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, CashFoundType } from '../types'; export declare function getCashFundstRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=getCashFundstRequest.d.ts.map ================================================ FILE: dist/api/getCashFundstRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCashFundstRequest = void 0; // Import debug console log var utils_1 = require("../utils"); var DeGiroEnums_1 = require("../enums/DeGiroEnums"); var GET_GENERIC_DATA_PATH = DeGiroEnums_1.DEGIRO_API_PATHS.GET_GENERIC_DATA_PATH; // tslint:disable-next-line: max-line-length function getCashFundstRequest(accountData, accountConfig) { return new Promise(function (resolve, reject) { var params = ''; params += 'cashFunds=0&'; params += 'limit=100'; var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data var uri = "" + accountConfig.data.tradingUrl + GET_GENERIC_DATA_PATH + accountData.data.intAccount + ";jsessionid=" + accountConfig.data.sessionId + "?" + params; utils_1.debug("Making request to " + uri); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { if (!res.cashFunds || !res.cashFunds.value || !Array.isArray(res.cashFunds.value)) { return reject('Invalid response format'); } var data = res.cashFunds.value; utils_1.debug('Response:\n', JSON.stringify(res, null, 2)); resolve(data.map(utils_1.processGetCashFundsResultListObject)); }) .catch(reject); }); } exports.getCashFundstRequest = getCashFundstRequest; //# sourceMappingURL=getCashFundstRequest.js.map ================================================ FILE: dist/api/getConfigDictionaryRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, ConfigDictionaryType } from '../types'; export declare function getConfigDictionaryRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=getConfigDictionaryRequest.d.ts.map ================================================ FILE: dist/api/getConfigDictionaryRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getConfigDictionaryRequest = void 0; // Import debug console log var utils_1 = require("../utils"); function getConfigDictionaryRequest(accountData, accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data var uri = accountConfig.data.dictionaryUrl + "?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId; utils_1.debug("Making request to " + uri); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { utils_1.debug('Response:\n', JSON.stringify(res, null, 2)); resolve(res); }) .catch(reject); }); } exports.getConfigDictionaryRequest = getConfigDictionaryRequest; //# sourceMappingURL=getConfigDictionaryRequest.js.map ================================================ FILE: dist/api/getNewsRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, GetNewsOptionsType, NewsType } from '../types'; export declare function getNewsRequest(options: GetNewsOptionsType, accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=getNewsRequest.d.ts.map ================================================ FILE: dist/api/getNewsRequest.js ================================================ "use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNewsRequest = void 0; // Import paths var enums_1 = require("../enums"); var GET_LATESTS_NEWS_PATH = enums_1.DEGIRO_API_PATHS.GET_LATESTS_NEWS_PATH, GET_TOP_NEWS_PATH = enums_1.DEGIRO_API_PATHS.GET_TOP_NEWS_PATH; function getNewsRequest(options, accountData, accountConfig) { var _this = this; return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () { var latest, top, _a, latestOffset, _b, latestLimit, _c, languages, params, requestOptions, latestNewsURI, topNewsURI, result, latestFetch, data, latestFetch, data, error_1; return __generator(this, function (_d) { switch (_d.label) { case 0: latest = options.latest, top = options.top, _a = options.latestOffset, latestOffset = _a === void 0 ? 0 : _a, _b = options.latestLimit, latestLimit = _b === void 0 ? 20 : _b, _c = options.languages, languages = _c === void 0 ? 'es' : _c; params = ''; params += "offset=" + latestOffset + "&"; params += "limit=" + latestLimit + "&"; params += "languages=" + languages + "&"; params += "intAccount=" + accountData.data.intAccount + "&"; params += "sessionId=" + accountConfig.data.sessionId; requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; latestNewsURI = "" + accountConfig.data.companiesServiceUrl + GET_LATESTS_NEWS_PATH + "?" + params; topNewsURI = "" + accountConfig.data.companiesServiceUrl + GET_TOP_NEWS_PATH + "?" + params; result = { latest: { items: [], }, top: { items: [], }, }; _d.label = 1; case 1: _d.trys.push([1, 8, , 9]); if (!latest) return [3 /*break*/, 4]; return [4 /*yield*/, fetch(latestNewsURI, requestOptions)]; case 2: latestFetch = _d.sent(); return [4 /*yield*/, latestFetch.json()]; case 3: data = (_d.sent()).data; result.latest = data; _d.label = 4; case 4: if (!top) return [3 /*break*/, 7]; return [4 /*yield*/, fetch(topNewsURI, requestOptions)]; case 5: latestFetch = _d.sent(); return [4 /*yield*/, latestFetch.json()]; case 6: data = (_d.sent()).data; result.top = data; _d.label = 7; case 7: return [3 /*break*/, 9]; case 8: error_1 = _d.sent(); return [2 /*return*/, reject(error_1)]; case 9: // Return te result resolve(result); return [2 /*return*/]; } }); }); }); } exports.getNewsRequest = getNewsRequest; //# sourceMappingURL=getNewsRequest.js.map ================================================ FILE: dist/api/getOrdersRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, GetOrdersConfigType, GetOrdersResultType } from '../types'; export declare function getOrdersRequest(accountData: AccountDataType, accountConfig: AccountConfigType, config: GetOrdersConfigType): Promise; //# sourceMappingURL=getOrdersRequest.d.ts.map ================================================ FILE: dist/api/getOrdersRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getOrdersRequest = void 0; // Import debug console log var utils_1 = require("../utils"); var DeGiroEnums_1 = require("../enums/DeGiroEnums"); var utils_2 = require("../utils/"); // tslint:disable-next-line: max-line-length function getOrdersRequest(accountData, accountConfig, config) { return new Promise(function (resolve, reject) { // Create params to get orders by types var active = config.active, lastTransactions = config.lastTransactions; var params = ''; if (active) params += DeGiroEnums_1.GET_ORDERS_TYPES.ACTIVE + "=0&"; if (lastTransactions) params += DeGiroEnums_1.GET_ORDERS_TYPES.TRANSACTIONS + "=0&"; var requestOptions = { credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data var uri = accountConfig.data.tradingUrl + "v5/update/" + accountData.data.intAccount + ";jsessionid=" + accountConfig.data.sessionId + "?" + params; utils_1.debug("Making request to " + uri); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { var result = { orders: res.orders ? res.orders.value.map(utils_2.processGetOrdersResultListObject) : [], lastTransactions: res.transactions ? res.transactions.value.map(utils_2.processGetOrdersResultListObject) : [], }; resolve(result); }) .catch(reject); }); } exports.getOrdersRequest = getOrdersRequest; //# sourceMappingURL=getOrdersRequest.js.map ================================================ FILE: dist/api/getPopularStocksRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, StockType, GetPopularStocksConfigType } from '../types'; export declare function getPopularStocksRequest(accountData: AccountDataType, accountConfig: AccountConfigType, config: GetPopularStocksConfigType): Promise; //# sourceMappingURL=getPopularStocksRequest.d.ts.map ================================================ FILE: dist/api/getPopularStocksRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPopularStocksRequest = void 0; // Import debug console log var utils_1 = require("../utils"); // Importamos constantes var enums_1 = require("../enums"); var STOCKS_SEARCH_PATH = enums_1.DEGIRO_API_PATHS.STOCKS_SEARCH_PATH; // tslint:disable-next-line: max-line-length function getPopularStocksRequest(accountData, accountConfig, config) { return new Promise(function (resolve, reject) { // Create fetch request options var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Create params to reach popular stocks var _a = config.popularOnly, popularOnly = _a === void 0 ? true : _a, _b = config.requireTotal, requireTotal = _b === void 0 ? false : _b, _c = config.limit, limit = _c === void 0 ? 9 : _c, _d = config.offset, offset = _d === void 0 ? 0 : _d; var params = ''; params += "popularOnly=" + popularOnly + "&"; params += "requireTotal=" + requireTotal + "&"; params += "offset=" + offset + "&"; params += "limit=" + limit + "&"; params += "intAccount=" + accountData.data.intAccount + "&"; params += "sessionId=" + accountConfig.data.sessionId; // Do the request to get a account config data var url = "" + accountConfig.data.productSearchUrl + STOCKS_SEARCH_PATH + "?" + params; utils_1.debug("Making request to " + url + " with params: \n" + requestOptions); fetch(url, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { resolve(res.products); }) .catch(reject); }); } exports.getPopularStocksRequest = getPopularStocksRequest; //# sourceMappingURL=getPopularStocksRequest.js.map ================================================ FILE: dist/api/getPortfolioRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, GetPorfolioConfigType } from '../types'; export declare function getPortfolioRequest(accountData: AccountDataType, accountConfig: AccountConfigType, config: GetPorfolioConfigType): Promise; //# sourceMappingURL=getPortfolioRequest.d.ts.map ================================================ FILE: dist/api/getPortfolioRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPortfolioRequest = void 0; // Import debug console log var utils_1 = require("../utils"); // tslint:disable-next-line: max-line-length function getPortfolioRequest(accountData, accountConfig, config) { return new Promise(function (resolve, reject) { // Create params to reach portfolio var params = '&portfolio=0'; // Do the request to get a account config data utils_1.debug("Making request to " + accountConfig.data.tradingUrl + "v5/update/" + accountData.data.intAccount + ";jsessionid=" + accountConfig.data.sessionId + "?" + params + "}"); fetch(accountConfig.data.tradingUrl + "v5/update/" + accountData.data.intAccount + ";jsessionid=" + accountConfig.data.sessionId + "?" + params) .then(function (res) { return res.json(); }) .then(function (res) { var portfolio = res.portfolio.value; var positions = utils_1.processPortfolio(portfolio, config); resolve(positions); }) .catch(reject); }); } exports.getPortfolioRequest = getPortfolioRequest; //# sourceMappingURL=getPortfolioRequest.js.map ================================================ FILE: dist/api/getProductsByIdsRequest.d.ts ================================================ import { AccountConfigType, AccountDataType } from '../types'; export declare function getProductsByIdsRequest(ids: string[], accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=getProductsByIdsRequest.d.ts.map ================================================ FILE: dist/api/getProductsByIdsRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getProductsByIdsRequest = void 0; // tslint:disable-next-line: max-line-length function getProductsByIdsRequest(ids, accountData, accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { method: 'POST', body: JSON.stringify(ids.map(function (id) { return id.toString(); })), headers: { 'Content-Type': 'application/json', }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; fetch(accountConfig.data.productSearchUrl + "v5/products/info?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { return resolve(res.data); }) .catch(reject); }); } exports.getProductsByIdsRequest = getProductsByIdsRequest; //# sourceMappingURL=getProductsByIdsRequest.js.map ================================================ FILE: dist/api/getTransactionsRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, GetTransactionsOptionsType, TransactionType } from "../types"; export declare function getTransactionsRequest(accountData: AccountDataType, accountConfig: AccountConfigType, config: GetTransactionsOptionsType): Promise; //# sourceMappingURL=getTransactionsRequest.d.ts.map ================================================ FILE: dist/api/getTransactionsRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTransactionsRequest = void 0; var enums_1 = require("../enums"); var utils_1 = require("../utils"); var GET_TRANSACTIONS_PATH = enums_1.DEGIRO_API_PATHS.GET_TRANSACTIONS_PATH; function getTransactionsRequest(accountData, accountConfig, config) { return new Promise(function (resolve, reject) { // Create params to get orders by types var params = ''; params += "fromDate=" + encodeURIComponent(config.fromDate) + "&"; params += "toDate=" + encodeURIComponent(config.toDate) + "&"; params += "groupTransactionsByOrder"; params += "intAccount=" + accountData.data.intAccount + "&"; params += "sessionId=" + accountConfig.data.sessionId; var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data var uri = "" + accountConfig.data.reportingUrl + GET_TRANSACTIONS_PATH + "?" + params; utils_1.debug("Making request to " + uri); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { resolve(res.data); }) .catch(reject); }); } exports.getTransactionsRequest = getTransactionsRequest; //# sourceMappingURL=getTransactionsRequest.js.map ================================================ FILE: dist/api/getWebSettingsRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, WebSettingsType } from '../types'; export declare function getWebSettingsRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=getWebSettingsRequest.d.ts.map ================================================ FILE: dist/api/getWebSettingsRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getWebSettingsRequest = void 0; // Import debug console log var utils_1 = require("../utils"); // Importamos constantes var enums_1 = require("../enums"); var GET_WEB_SETTINGS_PATH = enums_1.DEGIRO_API_PATHS.GET_WEB_SETTINGS_PATH; function getWebSettingsRequest(accountData, accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data var uri = "" + accountConfig.data.paUrl + GET_WEB_SETTINGS_PATH + "?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId; utils_1.debug("Making request to " + uri); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { utils_1.debug('Response:\n', JSON.stringify(res, null, 2)); var data = res.data; resolve(data); }) .catch(reject); }); } exports.getWebSettingsRequest = getWebSettingsRequest; //# sourceMappingURL=getWebSettingsRequest.js.map ================================================ FILE: dist/api/getWebUserSettingsRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, WebUserSettingType } from '../types'; export declare function getWebUserSettingsRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=getWebUserSettingsRequest.d.ts.map ================================================ FILE: dist/api/getWebUserSettingsRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getWebUserSettingsRequest = void 0; // Import debug console log var utils_1 = require("../utils"); // Importamos constantes var enums_1 = require("../enums"); var GET_WEB_USER_SETTINGS_PATH = enums_1.DEGIRO_API_PATHS.GET_WEB_USER_SETTINGS_PATH; function getWebUserSettingsRequest(accountData, accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data var uri = "" + accountConfig.data.paUrl + GET_WEB_USER_SETTINGS_PATH + "?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId; utils_1.debug("Making request to " + uri); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { utils_1.debug('Response:\n', JSON.stringify(res, null, 2)); var data = res.data; resolve(data); }) .catch(reject); }); } exports.getWebUserSettingsRequest = getWebUserSettingsRequest; //# sourceMappingURL=getWebUserSettingsRequest.js.map ================================================ FILE: dist/api/getWebi18nMessagesRequest.d.ts ================================================ import { AccountConfigType, AccountDataType, i18nMessagesType } from '../types'; export declare function getWebi18nMessagesRequest(lang: string, accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=getWebi18nMessagesRequest.d.ts.map ================================================ FILE: dist/api/getWebi18nMessagesRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getWebi18nMessagesRequest = void 0; // Import debug console log var utils_1 = require("../utils"); function getWebi18nMessagesRequest(lang, accountData, accountConfig) { return new Promise(function (resolve, reject) { var requestOptions = { headers: { Cookie: "JSESSIONID=" + accountConfig.data.sessionId + ";", }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a account config data var uri = accountConfig.data.i18nUrl + "messages_" + lang; utils_1.debug("Making request to " + uri); fetch(uri, requestOptions) .then(function (res) { return res.json(); }) .then(function (res) { utils_1.debug('Response:\n', JSON.stringify(res, null, 2)); var data = res.data; resolve(data); }) .catch(reject); }); } exports.getWebi18nMessagesRequest = getWebi18nMessagesRequest; //# sourceMappingURL=getWebi18nMessagesRequest.js.map ================================================ FILE: dist/api/index.d.ts ================================================ import { loginRequest } from './login'; import { logoutRequest } from './logout'; import { getAccountConfigRequest } from './getAccountConfig'; import { getAccountDataRequest } from './getAccountData'; import { getPortfolioRequest } from './getPortfolioRequest'; import { getProductsByIdsRequest } from './getProductsByIdsRequest'; import { searchProductRequest } from './searchProductRequest'; import { createOrderRequest } from './createOrderRequest'; import { getOrdersRequest } from './getOrdersRequest'; import { executeOrderRequest } from './executeOrderRequest'; import { deleteOrderRequest } from './deleteOrderRequest'; import { getAccountStateRequest } from './getAccountStateRequest'; import { getConfigDictionaryRequest } from './getConfigDictionaryRequest'; import { getAccountInfoRequest } from './getAccountInfoRequest'; import { getWebi18nMessagesRequest } from './getWebi18nMessagesRequest'; import { getNewsRequest } from './getNewsRequest'; import { getWebSettingsRequest } from './getWebSettingsRequest'; import { getWebUserSettingsRequest } from './getWebUserSettingsRequest'; import { getAccountReportsRequest } from './getAccountReportsRequest'; import { getCashFundstRequest } from './getCashFundstRequest'; import { getPopularStocksRequest } from './getPopularStocksRequest'; import { getTransactionsRequest } from './getTransactionsRequest'; export { loginRequest, logoutRequest, getAccountConfigRequest, getAccountDataRequest, getPortfolioRequest, getProductsByIdsRequest, searchProductRequest, createOrderRequest, executeOrderRequest, deleteOrderRequest, getOrdersRequest, getAccountStateRequest, getConfigDictionaryRequest, getAccountInfoRequest, getWebi18nMessagesRequest, getNewsRequest, getWebSettingsRequest, getWebUserSettingsRequest, getAccountReportsRequest, getCashFundstRequest, getPopularStocksRequest, getTransactionsRequest, }; //# sourceMappingURL=index.d.ts.map ================================================ FILE: dist/api/index.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTransactionsRequest = exports.getPopularStocksRequest = exports.getCashFundstRequest = exports.getAccountReportsRequest = exports.getWebUserSettingsRequest = exports.getWebSettingsRequest = exports.getNewsRequest = exports.getWebi18nMessagesRequest = exports.getAccountInfoRequest = exports.getConfigDictionaryRequest = exports.getAccountStateRequest = exports.getOrdersRequest = exports.deleteOrderRequest = exports.executeOrderRequest = exports.createOrderRequest = exports.searchProductRequest = exports.getProductsByIdsRequest = exports.getPortfolioRequest = exports.getAccountDataRequest = exports.getAccountConfigRequest = exports.logoutRequest = exports.loginRequest = void 0; var login_1 = require("./login"); Object.defineProperty(exports, "loginRequest", { enumerable: true, get: function () { return login_1.loginRequest; } }); var logout_1 = require("./logout"); Object.defineProperty(exports, "logoutRequest", { enumerable: true, get: function () { return logout_1.logoutRequest; } }); var getAccountConfig_1 = require("./getAccountConfig"); Object.defineProperty(exports, "getAccountConfigRequest", { enumerable: true, get: function () { return getAccountConfig_1.getAccountConfigRequest; } }); var getAccountData_1 = require("./getAccountData"); Object.defineProperty(exports, "getAccountDataRequest", { enumerable: true, get: function () { return getAccountData_1.getAccountDataRequest; } }); var getPortfolioRequest_1 = require("./getPortfolioRequest"); Object.defineProperty(exports, "getPortfolioRequest", { enumerable: true, get: function () { return getPortfolioRequest_1.getPortfolioRequest; } }); var getProductsByIdsRequest_1 = require("./getProductsByIdsRequest"); Object.defineProperty(exports, "getProductsByIdsRequest", { enumerable: true, get: function () { return getProductsByIdsRequest_1.getProductsByIdsRequest; } }); var searchProductRequest_1 = require("./searchProductRequest"); Object.defineProperty(exports, "searchProductRequest", { enumerable: true, get: function () { return searchProductRequest_1.searchProductRequest; } }); var createOrderRequest_1 = require("./createOrderRequest"); Object.defineProperty(exports, "createOrderRequest", { enumerable: true, get: function () { return createOrderRequest_1.createOrderRequest; } }); var getOrdersRequest_1 = require("./getOrdersRequest"); Object.defineProperty(exports, "getOrdersRequest", { enumerable: true, get: function () { return getOrdersRequest_1.getOrdersRequest; } }); var executeOrderRequest_1 = require("./executeOrderRequest"); Object.defineProperty(exports, "executeOrderRequest", { enumerable: true, get: function () { return executeOrderRequest_1.executeOrderRequest; } }); var deleteOrderRequest_1 = require("./deleteOrderRequest"); Object.defineProperty(exports, "deleteOrderRequest", { enumerable: true, get: function () { return deleteOrderRequest_1.deleteOrderRequest; } }); var getAccountStateRequest_1 = require("./getAccountStateRequest"); Object.defineProperty(exports, "getAccountStateRequest", { enumerable: true, get: function () { return getAccountStateRequest_1.getAccountStateRequest; } }); var getConfigDictionaryRequest_1 = require("./getConfigDictionaryRequest"); Object.defineProperty(exports, "getConfigDictionaryRequest", { enumerable: true, get: function () { return getConfigDictionaryRequest_1.getConfigDictionaryRequest; } }); var getAccountInfoRequest_1 = require("./getAccountInfoRequest"); Object.defineProperty(exports, "getAccountInfoRequest", { enumerable: true, get: function () { return getAccountInfoRequest_1.getAccountInfoRequest; } }); var getWebi18nMessagesRequest_1 = require("./getWebi18nMessagesRequest"); Object.defineProperty(exports, "getWebi18nMessagesRequest", { enumerable: true, get: function () { return getWebi18nMessagesRequest_1.getWebi18nMessagesRequest; } }); var getNewsRequest_1 = require("./getNewsRequest"); Object.defineProperty(exports, "getNewsRequest", { enumerable: true, get: function () { return getNewsRequest_1.getNewsRequest; } }); var getWebSettingsRequest_1 = require("./getWebSettingsRequest"); Object.defineProperty(exports, "getWebSettingsRequest", { enumerable: true, get: function () { return getWebSettingsRequest_1.getWebSettingsRequest; } }); var getWebUserSettingsRequest_1 = require("./getWebUserSettingsRequest"); Object.defineProperty(exports, "getWebUserSettingsRequest", { enumerable: true, get: function () { return getWebUserSettingsRequest_1.getWebUserSettingsRequest; } }); var getAccountReportsRequest_1 = require("./getAccountReportsRequest"); Object.defineProperty(exports, "getAccountReportsRequest", { enumerable: true, get: function () { return getAccountReportsRequest_1.getAccountReportsRequest; } }); var getCashFundstRequest_1 = require("./getCashFundstRequest"); Object.defineProperty(exports, "getCashFundstRequest", { enumerable: true, get: function () { return getCashFundstRequest_1.getCashFundstRequest; } }); var getPopularStocksRequest_1 = require("./getPopularStocksRequest"); Object.defineProperty(exports, "getPopularStocksRequest", { enumerable: true, get: function () { return getPopularStocksRequest_1.getPopularStocksRequest; } }); var getTransactionsRequest_1 = require("./getTransactionsRequest"); Object.defineProperty(exports, "getTransactionsRequest", { enumerable: true, get: function () { return getTransactionsRequest_1.getTransactionsRequest; } }); //# sourceMappingURL=index.js.map ================================================ FILE: dist/api/login.d.ts ================================================ import { LoginRequestParamsType, LoginResponseType } from '../types'; export declare function loginRequest(params: LoginRequestParamsType): Promise; //# sourceMappingURL=login.d.ts.map ================================================ FILE: dist/api/login.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.loginRequest = void 0; // Import enums var enums_1 = require("../enums"); var BASE_API_URL = enums_1.DEGIRO_API_PATHS.BASE_API_URL, LOGIN_URL_PATH = enums_1.DEGIRO_API_PATHS.LOGIN_URL_PATH; // Import debug console log var utils_1 = require("../utils"); function loginRequest(params) { return new Promise(function (resolve, reject) { // Make the payload var payload = { isPassCodeReset: false, isRedirectToMobile: false, password: params.pwd, username: params.username.toLowerCase().trim(), oneTimePassword: params.oneTimePassword, queryParams: { reason: 'session_expired', }, }; var requestOptions = { method: 'POST', body: JSON.stringify(payload), headers: { 'Content-Type': 'application/json', }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', }; // Do the request to get a session utils_1.debug("Making request to " + BASE_API_URL + LOGIN_URL_PATH + " with options:"); utils_1.debug(JSON.stringify(requestOptions, null, 2)); fetch("" + BASE_API_URL + LOGIN_URL_PATH, requestOptions) .then(function (res) { if (!payload.oneTimePassword) return res; utils_1.debug('Sending OTP'); return fetch("" + BASE_API_URL + LOGIN_URL_PATH + "/totp", requestOptions); }) .then(function (res) { return res.json(); }) .then(function (res) { if (!res.sessionId) return reject(res.statusText); utils_1.debug('Login response: ', JSON.stringify(res, null, 2)); resolve(res); }) .catch(reject); }); } exports.loginRequest = loginRequest; //# sourceMappingURL=login.js.map ================================================ FILE: dist/api/logout.d.ts ================================================ import { AccountDataType, AccountConfigType } from '../types'; export declare function logoutRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=logout.d.ts.map ================================================ FILE: dist/api/logout.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.logoutRequest = void 0; // Import enums var enums_1 = require("../enums"); var BASE_API_URL = enums_1.DEGIRO_API_PATHS.BASE_API_URL, LOGOUT_URL_PATH = enums_1.DEGIRO_API_PATHS.LOGOUT_URL_PATH; // Import debug console log var utils_1 = require("../utils"); function logoutRequest(accountData, accountConfig) { return new Promise(function (resolve, reject) { // Do the request to get a session var url = "" + BASE_API_URL + LOGOUT_URL_PATH + ";jsessionid=" + accountConfig.data.sessionId + "?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId; utils_1.debug("Making request to " + url); fetch(url) .then(function (res) { if (res.status === 200) resolve(); else reject(res.statusText || res.body); }) .catch(reject); }); } exports.logoutRequest = logoutRequest; //# sourceMappingURL=logout.js.map ================================================ FILE: dist/api/searchProductRequest.d.ts ================================================ import { SearchProductOptionsType, AccountConfigType, AccountDataType, SearchProductResultType } from '../types'; export declare function searchProductRequest(options: SearchProductOptionsType, accountData: AccountDataType, accountConfig: AccountConfigType): Promise; //# sourceMappingURL=searchProductRequest.d.ts.map ================================================ FILE: dist/api/searchProductRequest.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.searchProductRequest = void 0; // Import debug console log var utils_1 = require("../utils"); var createURLQuery = function (options) { // Destructure the options parameter var text = options.text, _a = options.type, type = _a === void 0 ? undefined : _a, _b = options.sortColumn, sortColumn = _b === void 0 ? undefined : _b, _c = options.sortType, sortType = _c === void 0 ? undefined : _c, _d = options.limit, limit = _d === void 0 ? 10 : _d, _e = options.offset, offset = _e === void 0 ? 0 : _e; // Create the query var res = "&searchText=" + encodeURIComponent(text); if (type) res += "&type=" + encodeURIComponent(type); if (sortColumn) res += "&sortColumn=" + encodeURIComponent(sortColumn); if (sortType) res += "&sortType=" + encodeURIComponent(sortType); if (limit) res += "&limit=" + encodeURIComponent(limit); if (offset) res += "&offset=" + encodeURIComponent(offset); return res; }; function searchProductRequest(options, accountData, accountConfig) { return new Promise(function (resolve, reject) { // Preparae de request var params = createURLQuery(options); // Do de request utils_1.debug("Making a search request to url: " + accountConfig.data.productSearchUrl + "v5/products/lookup?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountData.data.id + "&" + params + "}"); fetch(accountConfig.data.productSearchUrl + "v5/products/lookup?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId + "&" + params) .then(function (res) { return res.json(); }) .then(function (_a) { var products = _a.products; return resolve(products || []); }) .catch(reject); }); } exports.searchProductRequest = searchProductRequest; //# sourceMappingURL=searchProductRequest.js.map ================================================ FILE: dist/enums/DeGiroEnums.d.ts ================================================ export declare enum DEGIRO_API_PATHS { BASE_API_URL = "https://trader.degiro.nl/", BASE_REPORT_DOWNLOAD_URI = "document/download/", LOGIN_URL_PATH = "login/secure/login", LOGOUT_URL_PATH = "trading/secure/logout", GET_ACCOUNT_CONFIG_PATH = "login/secure/config", GET_GENERIC_DATA_PATH = "v5/update/", CREATE_ORDER_PATH = "v5/checkOrder", GET_TRANSACTIONS_PATH = "v4/transactions", GET_ACCOUNT_STATE_PATH = "v6/accountoverview", GET_ACCOUNT_INFO_PATH = "v5/account/info/", GET_LATESTS_NEWS_PATH = "newsfeed/v2/latest-news", GET_TOP_NEWS_PATH = "newsfeed/v2/top-news-preview", GET_WEB_SETTINGS_PATH = "settings/web", GET_WEB_USER_SETTINGS_PATH = "settings/user", GET_ACCOUNT_REPORTS_PATH = "document/list/report", STOCKS_SEARCH_PATH = "v5/stocks" } export declare enum DeGiroActions { BUY = "BUY", SELL = "SELL" } export declare enum DeGiroMarketOrderTypes { LIMITED = 0, MARKET = 2, STOP_LOSS = 3, STOP_LOSS_LIMIT = 1 } export declare enum DeGiroTimeTypes { DAY = 1, PERMANENT = 3 } export declare enum DeGiroProducTypes { shares = 1, bonds = 2, futures = 7, options = 8, investmendFunds = 13, leveragedProducts = 14, etfs = 131, cfds = 535, warrants = 536 } export declare enum DeGiroSort { ASC = "asc", DESC = "desc" } export declare enum PORTFOLIO_POSITIONS_TYPE_ENUM { ALL = "all", ALL_POSITIONS = "allPositions", OPEN = "open", CLOSED = "closed" } export declare enum GET_ORDERS_TYPES { ACTIVE = "orders", HISTORICAL = "historicalOrders", TRANSACTIONS = "transactions" } //# sourceMappingURL=DeGiroEnums.d.ts.map ================================================ FILE: dist/enums/DeGiroEnums.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GET_ORDERS_TYPES = exports.PORTFOLIO_POSITIONS_TYPE_ENUM = exports.DeGiroSort = exports.DeGiroProducTypes = exports.DeGiroTimeTypes = exports.DeGiroMarketOrderTypes = exports.DeGiroActions = exports.DEGIRO_API_PATHS = void 0; var DEGIRO_API_PATHS; (function (DEGIRO_API_PATHS) { DEGIRO_API_PATHS["BASE_API_URL"] = "https://trader.degiro.nl/"; DEGIRO_API_PATHS["BASE_REPORT_DOWNLOAD_URI"] = "document/download/"; DEGIRO_API_PATHS["LOGIN_URL_PATH"] = "login/secure/login"; DEGIRO_API_PATHS["LOGOUT_URL_PATH"] = "trading/secure/logout"; DEGIRO_API_PATHS["GET_ACCOUNT_CONFIG_PATH"] = "login/secure/config"; DEGIRO_API_PATHS["GET_GENERIC_DATA_PATH"] = "v5/update/"; DEGIRO_API_PATHS["CREATE_ORDER_PATH"] = "v5/checkOrder"; DEGIRO_API_PATHS["GET_TRANSACTIONS_PATH"] = "v4/transactions"; DEGIRO_API_PATHS["GET_ACCOUNT_STATE_PATH"] = "v6/accountoverview"; DEGIRO_API_PATHS["GET_ACCOUNT_INFO_PATH"] = "v5/account/info/"; DEGIRO_API_PATHS["GET_LATESTS_NEWS_PATH"] = "newsfeed/v2/latest-news"; DEGIRO_API_PATHS["GET_TOP_NEWS_PATH"] = "newsfeed/v2/top-news-preview"; DEGIRO_API_PATHS["GET_WEB_SETTINGS_PATH"] = "settings/web"; DEGIRO_API_PATHS["GET_WEB_USER_SETTINGS_PATH"] = "settings/user"; DEGIRO_API_PATHS["GET_ACCOUNT_REPORTS_PATH"] = "document/list/report"; DEGIRO_API_PATHS["STOCKS_SEARCH_PATH"] = "v5/stocks"; })(DEGIRO_API_PATHS = exports.DEGIRO_API_PATHS || (exports.DEGIRO_API_PATHS = {})); var DeGiroActions; (function (DeGiroActions) { DeGiroActions["BUY"] = "BUY"; DeGiroActions["SELL"] = "SELL"; })(DeGiroActions = exports.DeGiroActions || (exports.DeGiroActions = {})); var DeGiroMarketOrderTypes; (function (DeGiroMarketOrderTypes) { DeGiroMarketOrderTypes[DeGiroMarketOrderTypes["LIMITED"] = 0] = "LIMITED"; DeGiroMarketOrderTypes[DeGiroMarketOrderTypes["MARKET"] = 2] = "MARKET"; DeGiroMarketOrderTypes[DeGiroMarketOrderTypes["STOP_LOSS"] = 3] = "STOP_LOSS"; DeGiroMarketOrderTypes[DeGiroMarketOrderTypes["STOP_LOSS_LIMIT"] = 1] = "STOP_LOSS_LIMIT"; })(DeGiroMarketOrderTypes = exports.DeGiroMarketOrderTypes || (exports.DeGiroMarketOrderTypes = {})); var DeGiroTimeTypes; (function (DeGiroTimeTypes) { DeGiroTimeTypes[DeGiroTimeTypes["DAY"] = 1] = "DAY"; DeGiroTimeTypes[DeGiroTimeTypes["PERMANENT"] = 3] = "PERMANENT"; })(DeGiroTimeTypes = exports.DeGiroTimeTypes || (exports.DeGiroTimeTypes = {})); var DeGiroProducTypes; (function (DeGiroProducTypes) { // all = undefined, undefined is not allowed to set on enum DeGiroProducTypes[DeGiroProducTypes["shares"] = 1] = "shares"; DeGiroProducTypes[DeGiroProducTypes["bonds"] = 2] = "bonds"; DeGiroProducTypes[DeGiroProducTypes["futures"] = 7] = "futures"; DeGiroProducTypes[DeGiroProducTypes["options"] = 8] = "options"; DeGiroProducTypes[DeGiroProducTypes["investmendFunds"] = 13] = "investmendFunds"; DeGiroProducTypes[DeGiroProducTypes["leveragedProducts"] = 14] = "leveragedProducts"; DeGiroProducTypes[DeGiroProducTypes["etfs"] = 131] = "etfs"; DeGiroProducTypes[DeGiroProducTypes["cfds"] = 535] = "cfds"; DeGiroProducTypes[DeGiroProducTypes["warrants"] = 536] = "warrants"; })(DeGiroProducTypes = exports.DeGiroProducTypes || (exports.DeGiroProducTypes = {})); var DeGiroSort; (function (DeGiroSort) { DeGiroSort["ASC"] = "asc"; DeGiroSort["DESC"] = "desc"; })(DeGiroSort = exports.DeGiroSort || (exports.DeGiroSort = {})); var PORTFOLIO_POSITIONS_TYPE_ENUM; (function (PORTFOLIO_POSITIONS_TYPE_ENUM) { PORTFOLIO_POSITIONS_TYPE_ENUM["ALL"] = "all"; PORTFOLIO_POSITIONS_TYPE_ENUM["ALL_POSITIONS"] = "allPositions"; PORTFOLIO_POSITIONS_TYPE_ENUM["OPEN"] = "open"; PORTFOLIO_POSITIONS_TYPE_ENUM["CLOSED"] = "closed"; })(PORTFOLIO_POSITIONS_TYPE_ENUM = exports.PORTFOLIO_POSITIONS_TYPE_ENUM || (exports.PORTFOLIO_POSITIONS_TYPE_ENUM = {})); var GET_ORDERS_TYPES; (function (GET_ORDERS_TYPES) { GET_ORDERS_TYPES["ACTIVE"] = "orders"; GET_ORDERS_TYPES["HISTORICAL"] = "historicalOrders"; GET_ORDERS_TYPES["TRANSACTIONS"] = "transactions"; })(GET_ORDERS_TYPES = exports.GET_ORDERS_TYPES || (exports.GET_ORDERS_TYPES = {})); //# sourceMappingURL=DeGiroEnums.js.map ================================================ FILE: dist/enums/index.d.ts ================================================ import { DEGIRO_API_PATHS, DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes, DeGiroProducTypes, DeGiroSort, PORTFOLIO_POSITIONS_TYPE_ENUM } from './DeGiroEnums'; export { DEGIRO_API_PATHS, DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes, DeGiroProducTypes, DeGiroSort, PORTFOLIO_POSITIONS_TYPE_ENUM, }; //# sourceMappingURL=index.d.ts.map ================================================ FILE: dist/enums/index.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PORTFOLIO_POSITIONS_TYPE_ENUM = exports.DeGiroSort = exports.DeGiroProducTypes = exports.DeGiroTimeTypes = exports.DeGiroMarketOrderTypes = exports.DeGiroActions = exports.DEGIRO_API_PATHS = void 0; var DeGiroEnums_1 = require("./DeGiroEnums"); Object.defineProperty(exports, "DEGIRO_API_PATHS", { enumerable: true, get: function () { return DeGiroEnums_1.DEGIRO_API_PATHS; } }); Object.defineProperty(exports, "DeGiroActions", { enumerable: true, get: function () { return DeGiroEnums_1.DeGiroActions; } }); Object.defineProperty(exports, "DeGiroMarketOrderTypes", { enumerable: true, get: function () { return DeGiroEnums_1.DeGiroMarketOrderTypes; } }); Object.defineProperty(exports, "DeGiroTimeTypes", { enumerable: true, get: function () { return DeGiroEnums_1.DeGiroTimeTypes; } }); Object.defineProperty(exports, "DeGiroProducTypes", { enumerable: true, get: function () { return DeGiroEnums_1.DeGiroProducTypes; } }); Object.defineProperty(exports, "DeGiroSort", { enumerable: true, get: function () { return DeGiroEnums_1.DeGiroSort; } }); Object.defineProperty(exports, "PORTFOLIO_POSITIONS_TYPE_ENUM", { enumerable: true, get: function () { return DeGiroEnums_1.PORTFOLIO_POSITIONS_TYPE_ENUM; } }); //# sourceMappingURL=index.js.map ================================================ FILE: dist/interfaces/DeGiroClassInterface.d.ts ================================================ import { CashFoundType, AccountConfigType, GetPorfolioConfigType, AccountDataType, SearchProductOptionsType, SearchProductResultType, OrderType, CreateOrderResultType, IsLoginOptionsType, GetOrdersConfigType, GetOrdersResultType, GetAccountStateOptionsType, AccountReportsType, AccountInfoType, FavouriteProductType, StockType, GetHistoricalOrdersOptionsType, HistoricalOrdersType, GetNewsOptionsType, NewsType, WebSettingsType, WebUserSettingType, ConfigDictionaryType, i18nMessagesType, GetPopularStocksConfigType } from '../types'; /** * @interface DeGiroClassInterface */ export interface DeGiroClassInterface { login(): Promise; logout(): Promise; isLogin(options?: IsLoginOptionsType): boolean | Promise; getJSESSIONID(): string | undefined; getAccountConfig(sessionId: string): Promise; getAccountData(): Promise; getAccountState(options: GetAccountStateOptionsType): Promise; getAccountReports(): Promise; getAccountInfo(): Promise; searchProduct(options: SearchProductOptionsType): Promise; getCashFunds(): Promise; getPortfolio(config: GetPorfolioConfigType): Promise; getFavouriteProducts(): Promise; getPopularStocks(config: GetPopularStocksConfigType): Promise; getOrders(options: GetOrdersConfigType): Promise; getHistoricalOrders(options: GetHistoricalOrdersOptionsType): Promise; createOrder(order: OrderType): Promise; executeOrder(order: OrderType, executeId: string): Promise; deleteOrder(orderId: String): Promise; getProductsByIds(ids: string[]): Promise; getNews(options: GetNewsOptionsType): Promise; getWebi18nMessages(lang: string): Promise; getWebSettings(): Promise; getWebUserSettings(): Promise; getConfigDictionary(): Promise; } //# sourceMappingURL=DeGiroClassInterface.d.ts.map ================================================ FILE: dist/interfaces/DeGiroClassInterface.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=DeGiroClassInterface.js.map ================================================ FILE: dist/interfaces/index.d.ts ================================================ import { DeGiroClassInterface } from './DeGiroClassInterface'; export { DeGiroClassInterface, }; //# sourceMappingURL=index.d.ts.map ================================================ FILE: dist/interfaces/index.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=index.js.map ================================================ FILE: dist/main.d.ts ================================================ import { DeGiro } from './DeGiro'; import * as DeGiroEnums from './enums/'; import * as DeGiroTypes from './types/'; export { DeGiroEnums, DeGiroTypes, }; export default DeGiro; //# sourceMappingURL=main.d.ts.map ================================================ FILE: dist/main.js ================================================ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeGiroTypes = exports.DeGiroEnums = void 0; require('es6-promise').polyfill(); require('isomorphic-fetch'); var DeGiro_1 = require("./DeGiro"); var DeGiroEnums = __importStar(require("./enums/")); exports.DeGiroEnums = DeGiroEnums; var DeGiroTypes = __importStar(require("./types/")); exports.DeGiroTypes = DeGiroTypes; exports.default = DeGiro_1.DeGiro; //# sourceMappingURL=main.js.map ================================================ FILE: dist/types/AccountConfigType.d.ts ================================================ export declare type AccountConfigType = { data: { betaLandingPath: string; cashSolutionsUrl?: string; clientId: number; companiesServiceUrl: string; dictionaryUrl: string; firstLoginWizardUrl?: string; i18nUrl: string; landingPath: string; loginUrl: string; mobileLandingPath: string; paUrl: string; paymentServiceUrl: string; productSearchUrl: string; productTypesUrl: string; reportingUrl: string; sessionId: string; taskManagerUrl: string; tradingUrl: string; vwdGossipsUrl: string; vwdNewsUrl: string; vwdQuotecastServiceUrl: string; }; }; //# sourceMappingURL=AccountConfigType.d.ts.map ================================================ FILE: dist/types/AccountConfigType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=AccountConfigType.js.map ================================================ FILE: dist/types/AccountDataType.d.ts ================================================ export declare type AccountDataType = { data: { address: { city: string; country: string; streetAddress: string; streetAddressNumber: string; zip: string; }; bankAccount: { bankAccountId: number; bic: string; iban: string; status: string; }; canUpgrade: boolean; cellphoneNumber: string; clientRole: string; contractType: string; culture: string; displayName: string; effectiveClientRole: string; email: string; firstContact: { countryOfBirth: string; dateOfBirth: string; displayName: string; firstName: string; gender: string; lastName: string; nationality: string; placeOfBirth: string; }; id: number; intAccount: number; isAllocationAvailable: boolean; isAmClientActive: boolean; isCollectivePortfolio: boolean; isIskClient: boolean; isWithdrawalAvailable: boolean; language: string; locale: string; memberCode: string; username: string; }; }; //# sourceMappingURL=AccountDataType.d.ts.map ================================================ FILE: dist/types/AccountDataType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=AccountDataType.js.map ================================================ FILE: dist/types/AccountInfoType.d.ts ================================================ export declare type AccountInfoType = { baseCurrency: string; cashFunds: AccountInfoCashFunds; clientId: number; compensationCapping: number; currencyPairs: AccountInfoCurrencyPairs; marginType: string; }; declare type CashFund = { id: number; name: string; productIds: number[]; }; declare type AccountInfoCashFunds = { [key: string]: CashFund[]; }; declare type AccountInfoCurrencyPairs = { [key: string]: { id: number; price: string; }; }; export {}; //# sourceMappingURL=AccountInfoType.d.ts.map ================================================ FILE: dist/types/AccountInfoType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=AccountInfoType.js.map ================================================ FILE: dist/types/AccountReportsType.d.ts ================================================ export declare type ReportType = { id: number; type: string; description: string; stampCreated: string; uri: string; }; export declare type AccountReportsType = ReportType[]; //# sourceMappingURL=AccountReportsType.d.ts.map ================================================ FILE: dist/types/AccountReportsType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=AccountReportsType.js.map ================================================ FILE: dist/types/CashFoundType.d.ts ================================================ export declare type CashFoundType = { id: string; currencyCode: string; value: number; handling: string; }; //# sourceMappingURL=CashFoundType.d.ts.map ================================================ FILE: dist/types/CashFoundType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=CashFoundType.js.map ================================================ FILE: dist/types/ConfigDictionaryType.d.ts ================================================ export declare type StockCountry = { id: number; country: number; indices?: number[]; exchanges?: number[]; }; export declare type BondExchange = { id: number; country: number; exchange: number; postfix?: string; }; export declare type BondIssuerType = { id: number; name: string; translation: string; }; export declare type EurexCountry = { id: number; name: string; exchanges: Exchange[]; underlyingExchangeIds: number[]; }; export declare type FutureExchange = { id: number; name: string; eurexCountries?: number[]; }; export declare type OptionExchange = { id: number; name: string; exchangeId: number; underlyingExchangeIds?: number[]; eurexCountries?: number[]; }; export declare type CombinationExchange = { id: number; name: string; }; export declare type CFDExchange = { id: number; country: number; exchange: number; }; export declare type Exchange = { id: number; name: string; code?: string; hiqAbbr: string; country: string; city?: string; micCode?: string; }; export declare type Index = { id: number; name: string; productId?: number; }; export declare type Region = { id: number; name: string; translation: string; }; export declare type Country = { id: number; name: string; translation: string; region: number; }; declare type ProductTypes = { id: number; name: string; translation: string; briefTranslation: string; contractType: string; }; declare type FeeType = { id: number; name: string; translation: string; }; declare type AggregateListItem = { id: string; name: string; }; declare type SortListItem = { id: string; }; export declare type ConfigDictionaryType = { stockCountries: StockCountry[]; bondExchanges: BondExchange[]; bondIssuerTypes: BondIssuerType[]; eurexCountries: EurexCountry[]; futureExchanges: FutureExchange[]; optionExchanges: OptionExchange[]; combinationExchanges: CombinationExchange[]; cfdExchanges: CFDExchange[]; exchanges: Exchange[]; indices: Index[]; regions: Region[]; countries: Country[]; productTypes: ProductTypes[]; etfFeeTypes: FeeType[]; investmentFundFeeTypes: FeeType[]; optionAggregateTypes: AggregateListItem[]; leveragedAggregateTypes: AggregateListItem[]; etfAggregateTypes: AggregateListItem[]; investmentFundAggregateTypes: AggregateListItem[]; warrantAggregateTypes: AggregateListItem[]; lookupSortColumns: SortListItem[]; stockSortColumns: SortListItem[]; bondSortColumns: SortListItem[]; cfdSortColumns: SortListItem[]; etfSortColumns: SortListItem[]; futureSortColumns: SortListItem[]; investmentFundSortColumns: SortListItem[]; leveragedSortColumns: SortListItem[]; optionSortColumns: SortListItem[]; warrantSortColumns: SortListItem[]; }; export {}; //# sourceMappingURL=ConfigDictionaryType.d.ts.map ================================================ FILE: dist/types/ConfigDictionaryType.js ================================================ "use strict"; /* Main items */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=ConfigDictionaryType.js.map ================================================ FILE: dist/types/CreateOrderResultType.d.ts ================================================ import { TransactionFeeType } from '.'; export declare type CreateOrderResultType = { confirmationId: String; freeSpaceNew: Number; transactionFees: [TransactionFeeType]; }; //# sourceMappingURL=CreateOrderResultType.d.ts.map ================================================ FILE: dist/types/CreateOrderResultType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=CreateOrderResultType.js.map ================================================ FILE: dist/types/DeGiroSettupType.d.ts ================================================ export declare type DeGiroSettupType = { username?: string; pwd?: string; oneTimePassword?: string; jsessionId?: string; }; //# sourceMappingURL=DeGiroSettupType.d.ts.map ================================================ FILE: dist/types/DeGiroSettupType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=DeGiroSettupType.js.map ================================================ FILE: dist/types/FavouriteProductType.d.ts ================================================ export declare type FavouriteProductType = {}; //# sourceMappingURL=FavouriteProductType.d.ts.map ================================================ FILE: dist/types/FavouriteProductType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=FavouriteProductType.js.map ================================================ FILE: dist/types/GetAccountStateOptionsType.d.ts ================================================ export declare type GetAccountStateOptionsType = { from: string; to: string; }; //# sourceMappingURL=GetAccountStateOptionsType.d.ts.map ================================================ FILE: dist/types/GetAccountStateOptionsType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=GetAccountStateOptionsType.js.map ================================================ FILE: dist/types/GetHistoricalOrdersOptionsType.d.ts ================================================ export declare type GetHistoricalOrdersOptionsType = {}; //# sourceMappingURL=GetHistoricalOrdersOptionsType.d.ts.map ================================================ FILE: dist/types/GetHistoricalOrdersOptionsType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=GetHistoricalOrdersOptionsType.js.map ================================================ FILE: dist/types/GetNewsOptionsType.d.ts ================================================ export declare type GetNewsOptionsType = { latest?: boolean; top?: boolean; latestOffset?: number; latestLimit?: number; languages?: string; }; //# sourceMappingURL=GetNewsOptionsType.d.ts.map ================================================ FILE: dist/types/GetNewsOptionsType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=GetNewsOptionsType.js.map ================================================ FILE: dist/types/GetOrdersConfigType.d.ts ================================================ export declare type GetOrdersConfigType = { active?: boolean; lastTransactions?: boolean; }; //# sourceMappingURL=GetOrdersConfigType.d.ts.map ================================================ FILE: dist/types/GetOrdersConfigType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=GetOrdersConfigType.js.map ================================================ FILE: dist/types/GetOrdersResultType.d.ts ================================================ export declare type GetOrdersResultType = { orders: []; lastTransactions: []; }; //# sourceMappingURL=GetOrdersResultType.d.ts.map ================================================ FILE: dist/types/GetOrdersResultType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=GetOrdersResultType.js.map ================================================ FILE: dist/types/GetPopularStocksConfigType.d.ts ================================================ export declare type GetPopularStocksConfigType = { popularOnly?: boolean; requireTotal?: boolean; offset?: number; limit?: number; }; //# sourceMappingURL=GetPopularStocksConfigType.d.ts.map ================================================ FILE: dist/types/GetPopularStocksConfigType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=GetPopularStocksConfigType.js.map ================================================ FILE: dist/types/GetPorfolioConfigType.d.ts ================================================ import { PORTFOLIO_POSITIONS_TYPE_ENUM } from '../enums/DeGiroEnums'; export declare type GetPorfolioConfigType = { type: PORTFOLIO_POSITIONS_TYPE_ENUM; getProductDetails?: boolean; }; //# sourceMappingURL=GetPorfolioConfigType.d.ts.map ================================================ FILE: dist/types/GetPorfolioConfigType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=GetPorfolioConfigType.js.map ================================================ FILE: dist/types/GetTransactionsOptionsType.d.ts ================================================ export declare type GetTransactionsOptionsType = { fromDate: string; toDate: string; groupTransactionsByOrder: boolean; }; //# sourceMappingURL=GetTransactionsOptionsType.d.ts.map ================================================ FILE: dist/types/GetTransactionsOptionsType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=GetTransactionsOptionsType.js.map ================================================ FILE: dist/types/HistoricalOrdersType.d.ts ================================================ export declare type HistoricalOrdersType = {}; //# sourceMappingURL=HistoricalOrdersType.d.ts.map ================================================ FILE: dist/types/HistoricalOrdersType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=HistoricalOrdersType.js.map ================================================ FILE: dist/types/IsLoginOptionsType.d.ts ================================================ export declare type IsLoginOptionsType = { secure?: boolean; }; //# sourceMappingURL=IsLoginOptionsType.d.ts.map ================================================ FILE: dist/types/IsLoginOptionsType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=IsLoginOptionsType.js.map ================================================ FILE: dist/types/LoginRequestBodyType.d.ts ================================================ export declare type LoginRequestBodyType = { isPassCodeReset: boolean; isRedirectToMobile: boolean; password: string; username: string; oneTimePassword: string | undefined; queryParams: { reason: string; }; }; //# sourceMappingURL=LoginRequestBodyType.d.ts.map ================================================ FILE: dist/types/LoginRequestBodyType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=LoginRequestBodyType.js.map ================================================ FILE: dist/types/LoginRequestParamsType.d.ts ================================================ export declare type LoginRequestParamsType = { username: string; pwd: string; oneTimePassword: string | undefined; }; //# sourceMappingURL=LoginRequestParamsType.d.ts.map ================================================ FILE: dist/types/LoginRequestParamsType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=LoginRequestParamsType.js.map ================================================ FILE: dist/types/LoginResponseType.d.ts ================================================ export declare type LoginResponseType = { isPassCodeEnabled?: boolean; locale?: string; redirectUrl?: string; sessionId?: string; status: number; statusText: string; }; //# sourceMappingURL=LoginResponseType.d.ts.map ================================================ FILE: dist/types/LoginResponseType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=LoginResponseType.js.map ================================================ FILE: dist/types/NewsType.d.ts ================================================ export declare type New = { brief: string; category: string; content: string; date: string; htmlContent: boolean; id: string; isins: string[]; language: string; pictureUrl: string; source: string; title: string; }; declare type NewsResponse = { offset?: number; total?: number; items: New[]; }; export declare type NewsType = { latest: NewsResponse; top: NewsResponse; }; export {}; //# sourceMappingURL=NewsType.d.ts.map ================================================ FILE: dist/types/NewsType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=NewsType.js.map ================================================ FILE: dist/types/OrderType.d.ts ================================================ import { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } from '../enums/DeGiroEnums'; export declare type OrderType = { buySell: DeGiroActions; orderType: DeGiroMarketOrderTypes; price?: Number; productId: string; size: number; stopPrice?: number; timeType: DeGiroTimeTypes; }; //# sourceMappingURL=OrderType.d.ts.map ================================================ FILE: dist/types/OrderType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=OrderType.js.map ================================================ FILE: dist/types/PortfolioPositionType.d.ts ================================================ export declare type PortfolioPositionType = { foo?: string; }; //# sourceMappingURL=PortfolioPositionType.d.ts.map ================================================ FILE: dist/types/PortfolioPositionType.js ================================================ "use strict"; // { // "portfolio": [ // { // "name": "positionrow", // "id": 1156604, // "value": [ // { // "name": "id", // "value": "1156604", // "isAdded": true // }, // { // "name": "product", // "value": "DEUTSCHE BANK AG COMMO", // "isAdded": true // }, // ... Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=PortfolioPositionType.js.map ================================================ FILE: dist/types/SearchProductOptionsType.d.ts ================================================ import { DeGiroProducTypes } from '../enums/DeGiroEnums'; export declare type SearchProductOptionsType = { text: string; type?: DeGiroProducTypes | undefined; sortColumn?: string; sortType?: any; limit?: number; offset?: number; }; //# sourceMappingURL=SearchProductOptionsType.d.ts.map ================================================ FILE: dist/types/SearchProductOptionsType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=SearchProductOptionsType.js.map ================================================ FILE: dist/types/SearchProductResultType.d.ts ================================================ export declare type SearchProductResultType = { id: string; name: string; isin: string; symbol: string; contractSize: number; productType: string; productTypeId: number; tradable: boolean; category: string; currency: string; exchangeId: string; orderTimeTypes: string[]; gtcAllowed: boolean; buyOrderTypes: string[]; sellOrderTypes: string[]; marketAllowed: boolean; limitHitOrderAllowed: boolean; stoplossAllowed: boolean; stopLimitOrderAllowed: boolean; joinOrderAllowed: boolean; trailingStopOrderAllowed: boolean; combinedOrderAllowed: boolean; sellAmountAllowed: boolean; isFund: boolean; closePrice: number; closePriceDate: string; feedQuality: string; orderBookDepth: number; vwdIdentifierType: string; vwdId: string; qualitySwitchable: boolean; qualitySwitchFree: boolean; vwdModuleId: number; feedQualitySecondary: string; orderBookDepthSecondary: number; vwdIdentifierTypeSecondary: string; vwdIdSecondary: string; qualitySwitchableSecondary: boolean; qualitySwitchFreeSecondary: boolean; vwdModuleIdSecondary: number; }; //# sourceMappingURL=SearchProductResultType.d.ts.map ================================================ FILE: dist/types/SearchProductResultType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=SearchProductResultType.js.map ================================================ FILE: dist/types/StockType.d.ts ================================================ export declare type StockType = { id: string; name: string; isin: string; symbol: string; contractSize: number; productType: string; productTypeId: number; tradable: boolean; category: string; currency: string; strikePrice: number; exchangeId: string; orderTimeTypes: string[]; gtcAllowed: boolean; buyOrderTypes: string[]; sellOrderTypes: string[]; productBitTypes: any[]; marketAllowed: boolean; limitHitOrderAllowed: boolean; stoplossAllowed: boolean; stopLimitOrderAllowed: boolean; joinOrderAllowed: boolean; trailingStopOrderAllowed: boolean; combinedOrderAllowed: boolean; sellAmountAllowed: boolean; isFund: boolean; closePrice: number; closePriceDate: string; feedQuality: string; orderBookDepth: number; vwdIdentifierType: string; vwdId: string; qualitySwitchable: boolean; qualitySwitchFree: boolean; vwdModuleId: number; feedQualitySecondary: string; orderBookDepthSecondary: number; vwdIdentifierTypeSecondary: string; vwdIdSecondary: string; qualitySwitchableSecondary: boolean; qualitySwitchFreeSecondary: boolean; vwdModuleIdSecondary: number; }; //# sourceMappingURL=StockType.d.ts.map ================================================ FILE: dist/types/StockType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=StockType.js.map ================================================ FILE: dist/types/TransactionFeeType.d.ts ================================================ export declare type TransactionFeeType = { amount: Number; currency: String; id: Number; }; //# sourceMappingURL=TransactionFeeType.d.ts.map ================================================ FILE: dist/types/TransactionFeeType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=TransactionFeeType.js.map ================================================ FILE: dist/types/TransactionType.d.ts ================================================ export declare type TransactionType = { buysell: string; counterParty: string; date: string; id: number; orderTypeId: number; price: number; productId: number; quantity: number; total: number; totalInBaseCurrency: number; totalPlusFeeInBaseCurrency: number; tradingVenue: string; transactionTypeId: number; transfered: boolean; }; //# sourceMappingURL=TransactionType.d.ts.map ================================================ FILE: dist/types/TransactionType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=TransactionType.js.map ================================================ FILE: dist/types/WebSettingsType.d.ts ================================================ declare type MarketPageIndex = { closePrice: number; country: string; name: string; vwdId: string; id: number; }; declare type MarketPageFuture = { country: string; name: string; vwdId: string; id: number; }; declare type MarketPageCurrency = { fromCountry: string; toCountry: string; name: string; vwdId: string; id: number; }; declare type MarketPageChartIndex = { closePrice: number; country: string; name: string; vwdId: string; id: number; }; export declare type WebSettingsType = { defaultMarketMoversIndexId: number; marketMoversIndexIds: number[]; marketPageChartIndex: MarketPageChartIndex; marketPageIndices: MarketPageIndex[]; marketPageFutures: MarketPageFuture[]; marketPageCurrencies: MarketPageCurrency[]; defaultStockCountryId: number; defaultStockListType: string; defaultStockListId: number; defaultOptionExchangeId: number; defaultOptionCountryId: number; defaultOptionUnderlyingIsin: string; defaultFutureExchangeId: number; defaultFutureCountryId: number; defaultFutureUnderlyingIsin: string; defaultLeveragedExchangeId: number; defaultLeveragedShortLong: number; defaultLeveragedIssuerId: number; defaultLeveragedUnderlyingId: number; defaultLeveragedPopularOnly: boolean; defaultBondIssuerType: number; defaultBondExchangeId: number; defaultFundFeeType: number; defaultFundIssuerId: number; defaultEtfExchangeId: number; defaultEtfFeeType: number; defaultEtfIssuerId: number; defaultEtfPopularOnly: boolean; defaultCfdExchangeId: number; defaultWarrantUnderlyingName: string; defaultWarrantIssuerName: string; decimalDelimiter: string; thousandDelimiter: string; }; export {}; //# sourceMappingURL=WebSettingsType.d.ts.map ================================================ FILE: dist/types/WebSettingsType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=WebSettingsType.js.map ================================================ FILE: dist/types/WebUserSettingType.d.ts ================================================ export declare type WebUserSettingType = { desktop: { hasClosedFeedbackPromotion: boolean; hasSeenProductTour: boolean; isAccountSummaryOpened: boolean; hasClosedInvitationPromotion: boolean; accountSummaryPosition: string; }; mobile: { hasSeenProductTour: boolean; }; }; //# sourceMappingURL=WebUserSettingType.d.ts.map ================================================ FILE: dist/types/WebUserSettingType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=WebUserSettingType.js.map ================================================ FILE: dist/types/i18nMessagesType.d.ts ================================================ export declare type i18nMessagesType = { [key: string]: string; }; //# sourceMappingURL=i18nMessagesType.d.ts.map ================================================ FILE: dist/types/i18nMessagesType.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=i18nMessagesType.js.map ================================================ FILE: dist/types/index.d.ts ================================================ import { CashFoundType } from './CashFoundType'; import { DeGiroSettupType } from './DeGiroSettupType'; import { PortfolioPositionType } from './PortfolioPositionType'; import { LoginResponseType } from './LoginResponseType'; import { LoginRequestParamsType } from './LoginRequestParamsType'; import { LoginRequestBodyType } from './LoginRequestBodyType'; import { AccountConfigType } from './AccountConfigType'; import { AccountDataType } from './AccountDataType'; import { GetPorfolioConfigType } from './GetPorfolioConfigType'; import { SearchProductOptionsType } from './SearchProductOptionsType'; import { SearchProductResultType } from './SearchProductResultType'; import { OrderType } from './OrderType'; import { CreateOrderResultType } from './CreateOrderResultType'; import { TransactionFeeType } from './TransactionFeeType'; import { IsLoginOptionsType } from './IsLoginOptionsType'; import { GetOrdersConfigType } from './GetOrdersConfigType'; import { GetOrdersResultType } from './GetOrdersResultType'; import { GetAccountStateOptionsType } from './GetAccountStateOptionsType'; import { AccountReportsType, ReportType } from './AccountReportsType'; import { AccountInfoType } from './AccountInfoType'; import { FavouriteProductType } from './FavouriteProductType'; import { StockType } from './StockType'; import { GetHistoricalOrdersOptionsType } from './GetHistoricalOrdersOptionsType'; import { HistoricalOrdersType } from './HistoricalOrdersType'; import { GetNewsOptionsType } from './GetNewsOptionsType'; import { NewsType, New } from './NewsType'; import { WebSettingsType } from './WebSettingsType'; import { WebUserSettingType } from './WebUserSettingType'; import { i18nMessagesType } from './i18nMessagesType'; import { GetPopularStocksConfigType } from './GetPopularStocksConfigType'; import { GetTransactionsOptionsType } from './GetTransactionsOptionsType'; import { TransactionType } from './TransactionType'; import { ConfigDictionaryType, StockCountry, BondExchange, BondIssuerType, EurexCountry, FutureExchange, OptionExchange, CombinationExchange, CFDExchange, Exchange, Index, Region, Country } from './ConfigDictionaryType'; export { CashFoundType, DeGiroSettupType, PortfolioPositionType, LoginResponseType, LoginRequestParamsType, LoginRequestBodyType, AccountConfigType, AccountDataType, GetPorfolioConfigType, SearchProductOptionsType, SearchProductResultType, OrderType, CreateOrderResultType, TransactionFeeType, IsLoginOptionsType, GetOrdersConfigType, GetOrdersResultType, GetTransactionsOptionsType, GetAccountStateOptionsType, AccountReportsType, ReportType, AccountInfoType, FavouriteProductType, StockType, TransactionType, GetHistoricalOrdersOptionsType, HistoricalOrdersType, GetNewsOptionsType, NewsType, New, WebSettingsType, WebUserSettingType, ConfigDictionaryType, StockCountry, BondExchange, BondIssuerType, EurexCountry, FutureExchange, OptionExchange, CombinationExchange, CFDExchange, Exchange, Index, Region, Country, i18nMessagesType, GetPopularStocksConfigType, }; //# sourceMappingURL=index.d.ts.map ================================================ FILE: dist/types/index.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=index.js.map ================================================ FILE: dist/utils/debug.d.ts ================================================ export declare const debug: (...s: any) => void; //# sourceMappingURL=debug.d.ts.map ================================================ FILE: dist/utils/debug.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.debug = void 0; var DEBUG = !!process.env.DEGIRO_DEBUG; exports.debug = DEBUG ? function () { var s = []; for (var _i = 0; _i < arguments.length; _i++) { s[_i] = arguments[_i]; } return console.log.apply(console, s); } : function () { }; //# sourceMappingURL=debug.js.map ================================================ FILE: dist/utils/generateReportURIFromID.d.ts ================================================ import { AccountDataType, AccountConfigType } from '../types'; /** * Generate a download URL to the report with the `id` identifier * @param id Report id to generate download URL */ export declare const generateReportURIFromID: (reportId: number | string, accountData: AccountDataType, accountConfig: AccountConfigType) => string; //# sourceMappingURL=generateReportURIFromID.d.ts.map ================================================ FILE: dist/utils/generateReportURIFromID.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateReportURIFromID = void 0; // Importamos enumerados de URLs var enums_1 = require("../enums"); var BASE_REPORT_DOWNLOAD_URI = enums_1.DEGIRO_API_PATHS.BASE_REPORT_DOWNLOAD_URI; /** * Generate a download URL to the report with the `id` identifier * @param id Report id to generate download URL */ exports.generateReportURIFromID = function (reportId, accountData, accountConfig) { return "" + accountConfig.data.paUrl + BASE_REPORT_DOWNLOAD_URI + reportId + "?sessionId=" + accountConfig.data.sessionId + "&intAccount=" + accountData.data.intAccount; }; //# sourceMappingURL=generateReportURIFromID.js.map ================================================ FILE: dist/utils/index.d.ts ================================================ import { debug } from './debug'; import { processPortfolio } from './processPortfolio'; import { processGetCashFundsResultListObject } from './processGetCashFundsResultListObject'; import { processGetOrdersResultListObject } from './processGetOrdersResultListObject'; export { debug, processPortfolio, processGetCashFundsResultListObject, processGetOrdersResultListObject, }; //# sourceMappingURL=index.d.ts.map ================================================ FILE: dist/utils/index.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.processGetOrdersResultListObject = exports.processGetCashFundsResultListObject = exports.processPortfolio = exports.debug = void 0; var debug_1 = require("./debug"); Object.defineProperty(exports, "debug", { enumerable: true, get: function () { return debug_1.debug; } }); var processPortfolio_1 = require("./processPortfolio"); Object.defineProperty(exports, "processPortfolio", { enumerable: true, get: function () { return processPortfolio_1.processPortfolio; } }); var processGetCashFundsResultListObject_1 = require("./processGetCashFundsResultListObject"); Object.defineProperty(exports, "processGetCashFundsResultListObject", { enumerable: true, get: function () { return processGetCashFundsResultListObject_1.processGetCashFundsResultListObject; } }); var processGetOrdersResultListObject_1 = require("./processGetOrdersResultListObject"); Object.defineProperty(exports, "processGetOrdersResultListObject", { enumerable: true, get: function () { return processGetOrdersResultListObject_1.processGetOrdersResultListObject; } }); //# sourceMappingURL=index.js.map ================================================ FILE: dist/utils/processGetCashFundsResultListObject.d.ts ================================================ import { CashFoundType } from '../types'; declare type ObjectDataType = { value: []; }; export declare const processGetCashFundsResultListObject: (objectData: ObjectDataType) => CashFoundType; export {}; //# sourceMappingURL=processGetCashFundsResultListObject.d.ts.map ================================================ FILE: dist/utils/processGetCashFundsResultListObject.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.processGetCashFundsResultListObject = void 0; exports.processGetCashFundsResultListObject = function (objectData) { var _a; var arrayDataToExtract = objectData.value; var result = {}; for (var i = 0; i < arrayDataToExtract.length; i++) { var data = arrayDataToExtract[i]; if (data.isAdded) { Object.assign(result, (_a = {}, _a[data.name] = data.value, _a)); } } return result; }; //# sourceMappingURL=processGetCashFundsResultListObject.js.map ================================================ FILE: dist/utils/processGetOrdersResultListObject.d.ts ================================================ declare type ObjectDataType = { value: []; }; export declare const processGetOrdersResultListObject: (objectData: ObjectDataType) => {}; export {}; //# sourceMappingURL=processGetOrdersResultListObject.d.ts.map ================================================ FILE: dist/utils/processGetOrdersResultListObject.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.processGetOrdersResultListObject = void 0; exports.processGetOrdersResultListObject = function (objectData) { var _a; var arrayDataToExtract = objectData.value; var result = {}; for (var i = 0; i < arrayDataToExtract.length; i++) { var data = arrayDataToExtract[i]; if (data.isAdded) { Object.assign(result, (_a = {}, _a[data.name] = data.value, _a)); } } return result; }; //# sourceMappingURL=processGetOrdersResultListObject.js.map ================================================ FILE: dist/utils/processPortfolio.d.ts ================================================ import { GetPorfolioConfigType } from '../types'; export declare function processPortfolio(positions: any[], config: GetPorfolioConfigType): any[]; //# sourceMappingURL=processPortfolio.d.ts.map ================================================ FILE: dist/utils/processPortfolio.js ================================================ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.processPortfolio = void 0; var DeGiroEnums_1 = require("../enums/DeGiroEnums"); /** * Transform the object format of a portfolio position * @param position */ var processPosition = function (position) { var _a; var result = {}; for (var i = 0; i < position.value.length; i++) { if (position.value[i].value) { Object.assign(result, (_a = {}, _a[position.value[i].name] = position.value[i].value, _a)); } } return result; }; /** * Apply filter to get only open or closed positions or get all available positions * @param config */ var filterPorfolio = function (config) { return function (position) { // Check (non-check) all positions if (config.type === DeGiroEnums_1.PORTFOLIO_POSITIONS_TYPE_ENUM.ALL) return true; // Check if ID is not a number if (isNaN(parseInt(position.id, 10)) || position.positionType !== 'PRODUCT') return false; if (config.type === DeGiroEnums_1.PORTFOLIO_POSITIONS_TYPE_ENUM.ALL_POSITIONS) return true; // Check if size is not 0 if (config.type === DeGiroEnums_1.PORTFOLIO_POSITIONS_TYPE_ENUM.OPEN && position.size !== undefined) return parseFloat(position.size) !== 0; // Check if size is zero if (config.type === DeGiroEnums_1.PORTFOLIO_POSITIONS_TYPE_ENUM.CLOSED) return position.size === undefined || parseFloat(position.size) === 0; return false; }; }; function processPortfolio(positions, config) { var results = positions .map(processPosition) .filter(filterPorfolio(config)); return results; } exports.processPortfolio = processPortfolio; //# sourceMappingURL=processPortfolio.js.map ================================================ FILE: docs/assets/css/main.css ================================================ /*! normalize.css v1.1.3 | MIT License | git.io/normalize */ /* ========================================================================== * * HTML5 display definitions * * ========================================================================== */ /** * * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. */ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } /** * * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. */ audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } /** * * Prevent modern browsers from displaying `audio` without controls. * * Remove excess height in iOS 5 devices. */ audio:not([controls]) { display: none; height: 0; } /** * * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. * * Known issue: no IE 6 support. */ [hidden] { display: none; } /* ========================================================================== * * Base * * ========================================================================== */ /** * * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using * * `em` units. * * 2. Prevent iOS text size adjust after orientation change, without disabling * * user zoom. */ html { font-size: 100%; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ font-family: sans-serif; } /** * * Address `font-family` inconsistency between `textarea` and other form * * elements. */ button, input, select, textarea { font-family: sans-serif; } /** * * Address margins handled incorrectly in IE 6/7. */ body { margin: 0; } /* ========================================================================== * * Links * * ========================================================================== */ /** * * Address `outline` inconsistency between Chrome and other browsers. */ a:focus { outline: thin dotted; } a:active, a:hover { outline: 0; } /** * * Improve readability when focused and also mouse hovered in all browsers. */ /* ========================================================================== * * Typography * * ========================================================================== */ /** * * Address font sizes and margins set differently in IE 6/7. * * Address font sizes within `section` and `article` in Firefox 4+, Safari 5, * * and Chrome. */ h1 { font-size: 2em; margin: 0.67em 0; } h2 { font-size: 1.5em; margin: 0.83em 0; } h3 { font-size: 1.17em; margin: 1em 0; } h4, .tsd-index-panel h3 { font-size: 1em; margin: 1.33em 0; } h5 { font-size: 0.83em; margin: 1.67em 0; } h6 { font-size: 0.67em; margin: 2.33em 0; } /** * * Address styling not present in IE 7/8/9, Safari 5, and Chrome. */ abbr[title] { border-bottom: 1px dotted; } /** * * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. */ b, strong { font-weight: bold; } blockquote { margin: 1em 40px; } /** * * Address styling not present in Safari 5 and Chrome. */ dfn { font-style: italic; } /** * * Address differences between Firefox and other browsers. * * Known issue: no IE 6/7 normalization. */ hr { box-sizing: content-box; height: 0; } /** * * Address styling not present in IE 6/7/8/9. */ mark { background: #ff0; color: #000; } /** * * Address margins set differently in IE 6/7. */ p, pre { margin: 1em 0; } /** * * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. */ code, kbd, pre, samp { font-family: monospace, serif; _font-family: "courier new", monospace; font-size: 1em; } /** * * Improve readability of pre-formatted text in all browsers. */ pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } /** * * Address CSS quotes not supported in IE 6/7. */ q { quotes: none; } q:before, q:after { content: ""; content: none; } /** * * Address `quotes` property not supported in Safari 4. */ /** * * Address inconsistent and variable font size in all browsers. */ small { font-size: 80%; } /** * * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ sub { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; top: -0.5em; } sub { bottom: -0.25em; } /* ========================================================================== * * Lists * * ========================================================================== */ /** * * Address margins set differently in IE 6/7. */ dl, menu, ol, ul { margin: 1em 0; } dd { margin: 0 0 0 40px; } /** * * Address paddings set differently in IE 6/7. */ menu, ol, ul { padding: 0 0 0 40px; } /** * * Correct list images handled incorrectly in IE 7. */ nav ul, nav ol { list-style: none; list-style-image: none; } /* ========================================================================== * * Embedded content * * ========================================================================== */ /** * * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. * * 2. Improve image quality when scaled in IE 7. */ img { border: 0; /* 1 */ -ms-interpolation-mode: bicubic; } /* 2 */ /** * * Correct overflow displayed oddly in IE 9. */ svg:not(:root) { overflow: hidden; } /* ========================================================================== * * Figures * * ========================================================================== */ /** * * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. */ figure, form { margin: 0; } /* ========================================================================== * * Forms * * ========================================================================== */ /** * * Correct margin displayed oddly in IE 6/7. */ /** * * Define consistent border, margin, and padding. */ fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } /** * * 1. Correct color not being inherited in IE 6/7/8/9. * * 2. Correct text not wrapping in Firefox 3. * * 3. Correct alignment displayed oddly in IE 6/7. */ legend { border: 0; /* 1 */ padding: 0; white-space: normal; /* 2 */ *margin-left: -7px; } /* 3 */ /** * * 1. Correct font size not being inherited in all browsers. * * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, * * and Chrome. * * 3. Improve appearance and consistency in all browsers. */ button, input, select, textarea { font-size: 100%; /* 1 */ margin: 0; /* 2 */ vertical-align: baseline; /* 3 */ *vertical-align: middle; } /* 3 */ /** * * Address Firefox 3+ setting `line-height` on `input` using `!important` in * * the UA stylesheet. */ button, input { line-height: normal; } /** * * Address inconsistent `text-transform` inheritance for `button` and `select`. * * All other form control elements do not inherit `text-transform` values. * * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. * * Correct `select` style inheritance in Firefox 4+ and Opera. */ button, select { text-transform: none; } /** * * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` * * and `video` controls. * * 2. Correct inability to style clickable `input` types in iOS. * * 3. Improve usability and consistency of cursor style between image-type * * `input` and others. * * 4. Remove inner spacing in IE 7 without affecting normal text inputs. * * Known issue: inner spacing remains in IE 6. */ button, html input[type=button] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ *overflow: visible; } /* 4 */ input[type=reset], input[type=submit] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ *overflow: visible; } /* 4 */ /** * * Re-set default cursor for disabled elements. */ button[disabled], html input[disabled] { cursor: default; } /** * * 1. Address box sizing set to content-box in IE 8/9. * * 2. Remove excess padding in IE 8/9. * * 3. Remove excess padding in IE 7. * * Known issue: excess padding remains in IE 6. */ input { /* 3 */ } input[type=checkbox], input[type=radio] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ *height: 13px; /* 3 */ *width: 13px; } input[type=search] { -webkit-appearance: textfield; /* 1 */ /* 2 */ box-sizing: content-box; } input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { -webkit-appearance: none; } /** * * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. * * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome * * (include `-moz` to future-proof). */ /** * * Remove inner padding and search cancel button in Safari 5 and Chrome * * on OS X. */ /** * * Remove inner padding and border in Firefox 3+. */ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } /** * * 1. Remove default vertical scrollbar in IE 6/7/8/9. * * 2. Improve readability and alignment in all browsers. */ textarea { overflow: auto; /* 1 */ vertical-align: top; } /* 2 */ /* ========================================================================== * * Tables * * ========================================================================== */ /** * * Remove most spacing between table cells. */ table { border-collapse: collapse; border-spacing: 0; } /* * * *Visual Studio-like style based on original C# coloring by Jason Diamond */ .hljs { display: inline-block; padding: 0.5em; background: white; color: black; } .hljs-comment, .hljs-annotation, .hljs-template_comment, .diff .hljs-header, .hljs-chunk, .apache .hljs-cbracket { color: #008000; } .hljs-keyword, .hljs-id, .hljs-built_in, .css .smalltalk .hljs-class, .hljs-winutils, .bash .hljs-variable, .tex .hljs-command, .hljs-request, .hljs-status, .nginx .hljs-title { color: #00f; } .xml .hljs-tag { color: #00f; } .xml .hljs-tag .hljs-value { color: #00f; } .hljs-string, .hljs-title, .hljs-parent, .hljs-tag .hljs-value, .hljs-rules .hljs-value { color: #a31515; } .ruby .hljs-symbol { color: #a31515; } .ruby .hljs-symbol .hljs-string { color: #a31515; } .hljs-template_tag, .django .hljs-variable, .hljs-addition, .hljs-flow, .hljs-stream, .apache .hljs-tag, .hljs-date, .tex .hljs-formula, .coffeescript .hljs-attribute { color: #a31515; } .ruby .hljs-string, .hljs-decorator, .hljs-filter .hljs-argument, .hljs-localvars, .hljs-array, .hljs-attr_selector, .hljs-pseudo, .hljs-pi, .hljs-doctype, .hljs-deletion, .hljs-envvar, .hljs-shebang, .hljs-preprocessor, .hljs-pragma, .userType, .apache .hljs-sqbracket, .nginx .hljs-built_in, .tex .hljs-special, .hljs-prompt { color: #2b91af; } .hljs-phpdoc, .hljs-javadoc, .hljs-xmlDocTag { color: #808080; } .vhdl .hljs-typename { font-weight: bold; } .vhdl .hljs-string { color: #666666; } .vhdl .hljs-literal { color: #a31515; } .vhdl .hljs-attribute { color: #00b0e8; } .xml .hljs-attribute { color: #f00; } ul.tsd-descriptions > li > :first-child, .tsd-panel > :first-child, .col > :first-child, .col-11 > :first-child, .col-10 > :first-child, .col-9 > :first-child, .col-8 > :first-child, .col-7 > :first-child, .col-6 > :first-child, .col-5 > :first-child, .col-4 > :first-child, .col-3 > :first-child, .col-2 > :first-child, .col-1 > :first-child, ul.tsd-descriptions > li > :first-child > :first-child, .tsd-panel > :first-child > :first-child, .col > :first-child > :first-child, .col-11 > :first-child > :first-child, .col-10 > :first-child > :first-child, .col-9 > :first-child > :first-child, .col-8 > :first-child > :first-child, .col-7 > :first-child > :first-child, .col-6 > :first-child > :first-child, .col-5 > :first-child > :first-child, .col-4 > :first-child > :first-child, .col-3 > :first-child > :first-child, .col-2 > :first-child > :first-child, .col-1 > :first-child > :first-child, ul.tsd-descriptions > li > :first-child > :first-child > :first-child, .tsd-panel > :first-child > :first-child > :first-child, .col > :first-child > :first-child > :first-child, .col-11 > :first-child > :first-child > :first-child, .col-10 > :first-child > :first-child > :first-child, .col-9 > :first-child > :first-child > :first-child, .col-8 > :first-child > :first-child > :first-child, .col-7 > :first-child > :first-child > :first-child, .col-6 > :first-child > :first-child > :first-child, .col-5 > :first-child > :first-child > :first-child, .col-4 > :first-child > :first-child > :first-child, .col-3 > :first-child > :first-child > :first-child, .col-2 > :first-child > :first-child > :first-child, .col-1 > :first-child > :first-child > :first-child { margin-top: 0; } ul.tsd-descriptions > li > :last-child, .tsd-panel > :last-child, .col > :last-child, .col-11 > :last-child, .col-10 > :last-child, .col-9 > :last-child, .col-8 > :last-child, .col-7 > :last-child, .col-6 > :last-child, .col-5 > :last-child, .col-4 > :last-child, .col-3 > :last-child, .col-2 > :last-child, .col-1 > :last-child, ul.tsd-descriptions > li > :last-child > :last-child, .tsd-panel > :last-child > :last-child, .col > :last-child > :last-child, .col-11 > :last-child > :last-child, .col-10 > :last-child > :last-child, .col-9 > :last-child > :last-child, .col-8 > :last-child > :last-child, .col-7 > :last-child > :last-child, .col-6 > :last-child > :last-child, .col-5 > :last-child > :last-child, .col-4 > :last-child > :last-child, .col-3 > :last-child > :last-child, .col-2 > :last-child > :last-child, .col-1 > :last-child > :last-child, ul.tsd-descriptions > li > :last-child > :last-child > :last-child, .tsd-panel > :last-child > :last-child > :last-child, .col > :last-child > :last-child > :last-child, .col-11 > :last-child > :last-child > :last-child, .col-10 > :last-child > :last-child > :last-child, .col-9 > :last-child > :last-child > :last-child, .col-8 > :last-child > :last-child > :last-child, .col-7 > :last-child > :last-child > :last-child, .col-6 > :last-child > :last-child > :last-child, .col-5 > :last-child > :last-child > :last-child, .col-4 > :last-child > :last-child > :last-child, .col-3 > :last-child > :last-child > :last-child, .col-2 > :last-child > :last-child > :last-child, .col-1 > :last-child > :last-child > :last-child { margin-bottom: 0; } .container { max-width: 1200px; margin: 0 auto; padding: 0 40px; } @media (max-width: 640px) { .container { padding: 0 20px; } } .container-main { padding-bottom: 200px; } .row { display: -ms-flexbox; display: flex; position: relative; margin: 0 -10px; } .row:after { visibility: hidden; display: block; content: ""; clear: both; height: 0; } .col, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 { box-sizing: border-box; float: left; padding: 0 10px; } .col-1 { width: 8.3333333333%; } .offset-1 { margin-left: 8.3333333333%; } .col-2 { width: 16.6666666667%; } .offset-2 { margin-left: 16.6666666667%; } .col-3 { width: 25%; } .offset-3 { margin-left: 25%; } .col-4 { width: 33.3333333333%; } .offset-4 { margin-left: 33.3333333333%; } .col-5 { width: 41.6666666667%; } .offset-5 { margin-left: 41.6666666667%; } .col-6 { width: 50%; } .offset-6 { margin-left: 50%; } .col-7 { width: 58.3333333333%; } .offset-7 { margin-left: 58.3333333333%; } .col-8 { width: 66.6666666667%; } .offset-8 { margin-left: 66.6666666667%; } .col-9 { width: 75%; } .offset-9 { margin-left: 75%; } .col-10 { width: 83.3333333333%; } .offset-10 { margin-left: 83.3333333333%; } .col-11 { width: 91.6666666667%; } .offset-11 { margin-left: 91.6666666667%; } .tsd-kind-icon { display: block; position: relative; padding-left: 20px; text-indent: -20px; } .tsd-kind-icon:before { content: ""; display: inline-block; vertical-align: middle; width: 17px; height: 17px; margin: 0 3px 2px 0; background-image: url(../images/icons.png); } @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { .tsd-kind-icon:before { background-image: url(../images/icons@2x.png); background-size: 238px 204px; } } .tsd-signature.tsd-kind-icon:before { background-position: 0 -153px; } .tsd-kind-object-literal > .tsd-kind-icon:before { background-position: 0px -17px; } .tsd-kind-object-literal.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -17px; } .tsd-kind-object-literal.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -17px; } .tsd-kind-class > .tsd-kind-icon:before { background-position: 0px -34px; } .tsd-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -34px; } .tsd-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -34px; } .tsd-kind-class.tsd-has-type-parameter > .tsd-kind-icon:before { background-position: 0px -51px; } .tsd-kind-class.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -51px; } .tsd-kind-class.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -51px; } .tsd-kind-interface > .tsd-kind-icon:before { background-position: 0px -68px; } .tsd-kind-interface.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -68px; } .tsd-kind-interface.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -68px; } .tsd-kind-interface.tsd-has-type-parameter > .tsd-kind-icon:before { background-position: 0px -85px; } .tsd-kind-interface.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -85px; } .tsd-kind-interface.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -85px; } .tsd-kind-namespace > .tsd-kind-icon:before { background-position: 0px -102px; } .tsd-kind-namespace.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -102px; } .tsd-kind-namespace.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -102px; } .tsd-kind-module > .tsd-kind-icon:before { background-position: 0px -102px; } .tsd-kind-module.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -102px; } .tsd-kind-module.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -102px; } .tsd-kind-enum > .tsd-kind-icon:before { background-position: 0px -119px; } .tsd-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -119px; } .tsd-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -119px; } .tsd-kind-enum-member > .tsd-kind-icon:before { background-position: 0px -136px; } .tsd-kind-enum-member.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -136px; } .tsd-kind-enum-member.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -136px; } .tsd-kind-signature > .tsd-kind-icon:before { background-position: 0px -153px; } .tsd-kind-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -153px; } .tsd-kind-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -153px; } .tsd-kind-type-alias > .tsd-kind-icon:before { background-position: 0px -170px; } .tsd-kind-type-alias.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -170px; } .tsd-kind-type-alias.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -170px; } .tsd-kind-type-alias.tsd-has-type-parameter > .tsd-kind-icon:before { background-position: 0px -187px; } .tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -187px; } .tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -187px; } .tsd-kind-variable > .tsd-kind-icon:before { background-position: -136px -0px; } .tsd-kind-variable.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -0px; } .tsd-kind-variable.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } .tsd-kind-variable.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -0px; } .tsd-kind-variable.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -0px; } .tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -0px; } .tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -0px; } .tsd-kind-variable.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } .tsd-kind-variable.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -0px; } .tsd-kind-variable.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -0px; } .tsd-kind-variable.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } .tsd-kind-variable.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -0px; } .tsd-kind-variable.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -0px; } .tsd-kind-property > .tsd-kind-icon:before { background-position: -136px -0px; } .tsd-kind-property.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -0px; } .tsd-kind-property.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } .tsd-kind-property.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -0px; } .tsd-kind-property.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -0px; } .tsd-kind-property.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -0px; } .tsd-kind-property.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -0px; } .tsd-kind-property.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } .tsd-kind-property.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -0px; } .tsd-kind-property.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -0px; } .tsd-kind-property.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } .tsd-kind-property.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -0px; } .tsd-kind-property.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -0px; } .tsd-kind-get-signature > .tsd-kind-icon:before { background-position: -136px -17px; } .tsd-kind-get-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -17px; } .tsd-kind-get-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -17px; } .tsd-kind-get-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -17px; } .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -17px; } .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -17px; } .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -17px; } .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -17px; } .tsd-kind-get-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -17px; } .tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -17px; } .tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -17px; } .tsd-kind-get-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -17px; } .tsd-kind-get-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -17px; } .tsd-kind-set-signature > .tsd-kind-icon:before { background-position: -136px -34px; } .tsd-kind-set-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -34px; } .tsd-kind-set-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -34px; } .tsd-kind-set-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -34px; } .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -34px; } .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -34px; } .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -34px; } .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -34px; } .tsd-kind-set-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -34px; } .tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -34px; } .tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -34px; } .tsd-kind-set-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -34px; } .tsd-kind-set-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -34px; } .tsd-kind-accessor > .tsd-kind-icon:before { background-position: -136px -51px; } .tsd-kind-accessor.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -51px; } .tsd-kind-accessor.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -51px; } .tsd-kind-accessor.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -51px; } .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -51px; } .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -51px; } .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -51px; } .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -51px; } .tsd-kind-accessor.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -51px; } .tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -51px; } .tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -51px; } .tsd-kind-accessor.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -51px; } .tsd-kind-accessor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -51px; } .tsd-kind-function > .tsd-kind-icon:before { background-position: -136px -68px; } .tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -68px; } .tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } .tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -68px; } .tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -68px; } .tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -68px; } .tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -68px; } .tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } .tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -68px; } .tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -68px; } .tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } .tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -68px; } .tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -68px; } .tsd-kind-method > .tsd-kind-icon:before { background-position: -136px -68px; } .tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -68px; } .tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } .tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -68px; } .tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -68px; } .tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -68px; } .tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -68px; } .tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } .tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -68px; } .tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -68px; } .tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } .tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -68px; } .tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -68px; } .tsd-kind-call-signature > .tsd-kind-icon:before { background-position: -136px -68px; } .tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -68px; } .tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } .tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -68px; } .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -68px; } .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -68px; } .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -68px; } .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } .tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -68px; } .tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -68px; } .tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } .tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -68px; } .tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -68px; } .tsd-kind-function.tsd-has-type-parameter > .tsd-kind-icon:before { background-position: -136px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -85px; } .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -85px; } .tsd-kind-method.tsd-has-type-parameter > .tsd-kind-icon:before { background-position: -136px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -85px; } .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -85px; } .tsd-kind-constructor > .tsd-kind-icon:before { background-position: -136px -102px; } .tsd-kind-constructor.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -102px; } .tsd-kind-constructor.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } .tsd-kind-constructor.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -102px; } .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -102px; } .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -102px; } .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -102px; } .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } .tsd-kind-constructor.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -102px; } .tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -102px; } .tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } .tsd-kind-constructor.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -102px; } .tsd-kind-constructor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -102px; } .tsd-kind-constructor-signature > .tsd-kind-icon:before { background-position: -136px -102px; } .tsd-kind-constructor-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -102px; } .tsd-kind-constructor-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } .tsd-kind-constructor-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -102px; } .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -102px; } .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -102px; } .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -102px; } .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } .tsd-kind-constructor-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -102px; } .tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -102px; } .tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } .tsd-kind-constructor-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -102px; } .tsd-kind-constructor-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -102px; } .tsd-kind-index-signature > .tsd-kind-icon:before { background-position: -136px -119px; } .tsd-kind-index-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -119px; } .tsd-kind-index-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -119px; } .tsd-kind-index-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -119px; } .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -119px; } .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -119px; } .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -119px; } .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -119px; } .tsd-kind-index-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -119px; } .tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -119px; } .tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -119px; } .tsd-kind-index-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -119px; } .tsd-kind-index-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -119px; } .tsd-kind-event > .tsd-kind-icon:before { background-position: -136px -136px; } .tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -136px; } .tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -136px; } .tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -136px; } .tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -136px; } .tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -136px; } .tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -136px; } .tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -136px; } .tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -136px; } .tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -136px; } .tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -136px; } .tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -136px; } .tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -136px; } .tsd-is-static > .tsd-kind-icon:before { background-position: -136px -153px; } .tsd-is-static.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -153px; } .tsd-is-static.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -153px; } .tsd-is-static.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -153px; } .tsd-is-static.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -153px; } .tsd-is-static.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -153px; } .tsd-is-static.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -153px; } .tsd-is-static.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -153px; } .tsd-is-static.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -153px; } .tsd-is-static.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -153px; } .tsd-is-static.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -153px; } .tsd-is-static.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -153px; } .tsd-is-static.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -153px; } .tsd-is-static.tsd-kind-function > .tsd-kind-icon:before { background-position: -136px -170px; } .tsd-is-static.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -170px; } .tsd-is-static.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } .tsd-is-static.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -170px; } .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -170px; } .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -170px; } .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -170px; } .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } .tsd-is-static.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -170px; } .tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -170px; } .tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } .tsd-is-static.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -170px; } .tsd-is-static.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -170px; } .tsd-is-static.tsd-kind-method > .tsd-kind-icon:before { background-position: -136px -170px; } .tsd-is-static.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -170px; } .tsd-is-static.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } .tsd-is-static.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -170px; } .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -170px; } .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -170px; } .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -170px; } .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } .tsd-is-static.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -170px; } .tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -170px; } .tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } .tsd-is-static.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -170px; } .tsd-is-static.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -170px; } .tsd-is-static.tsd-kind-call-signature > .tsd-kind-icon:before { background-position: -136px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -170px; } .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -170px; } .tsd-is-static.tsd-kind-event > .tsd-kind-icon:before { background-position: -136px -187px; } .tsd-is-static.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -187px; } .tsd-is-static.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -187px; } .tsd-is-static.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -187px; } .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -187px; } .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -187px; } .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -187px; } .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -187px; } .tsd-is-static.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -187px; } .tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -187px; } .tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -187px; } .tsd-is-static.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -187px; } .tsd-is-static.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -187px; } @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes fade-out { from { opacity: 1; visibility: visible; } to { opacity: 0; } } @keyframes fade-in-delayed { 0% { opacity: 0; } 33% { opacity: 0; } 100% { opacity: 1; } } @keyframes fade-out-delayed { 0% { opacity: 1; visibility: visible; } 66% { opacity: 0; } 100% { opacity: 0; } } @keyframes shift-to-left { from { transform: translate(0, 0); } to { transform: translate(-25%, 0); } } @keyframes unshift-to-left { from { transform: translate(-25%, 0); } to { transform: translate(0, 0); } } @keyframes pop-in-from-right { from { transform: translate(100%, 0); } to { transform: translate(0, 0); } } @keyframes pop-out-to-right { from { transform: translate(0, 0); visibility: visible; } to { transform: translate(100%, 0); } } body { background: #fdfdfd; font-family: "Segoe UI", sans-serif; font-size: 16px; color: #222; } a { color: #4da6ff; text-decoration: none; } a:hover { text-decoration: underline; } code, pre { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; padding: 0.2em; margin: 0; font-size: 14px; background-color: rgba(0, 0, 0, 0.04); } pre { padding: 10px; } pre code { padding: 0; font-size: 100%; background-color: transparent; } .tsd-typography { line-height: 1.333em; } .tsd-typography ul { list-style: square; padding: 0 0 0 20px; margin: 0; } .tsd-typography h4, .tsd-typography .tsd-index-panel h3, .tsd-index-panel .tsd-typography h3, .tsd-typography h5, .tsd-typography h6 { font-size: 1em; margin: 0; } .tsd-typography h5, .tsd-typography h6 { font-weight: normal; } .tsd-typography p, .tsd-typography ul, .tsd-typography ol { margin: 1em 0; } @media (min-width: 901px) and (max-width: 1024px) { html.default .col-content { width: 72%; } html.default .col-menu { width: 28%; } html.default .tsd-navigation { padding-left: 10px; } } @media (max-width: 900px) { html.default .col-content { float: none; width: 100%; } html.default .col-menu { position: fixed !important; overflow: auto; -webkit-overflow-scrolling: touch; z-index: 1024; top: 0 !important; bottom: 0 !important; left: auto !important; right: 0 !important; width: 100%; padding: 20px 20px 0 0; max-width: 450px; visibility: hidden; background-color: #fff; transform: translate(100%, 0); } html.default .col-menu > *:last-child { padding-bottom: 20px; } html.default .overlay { content: ""; display: block; position: fixed; z-index: 1023; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.75); visibility: hidden; } html.default.to-has-menu .overlay { animation: fade-in 0.4s; } html.default.to-has-menu header, html.default.to-has-menu footer, html.default.to-has-menu .col-content { animation: shift-to-left 0.4s; } html.default.to-has-menu .col-menu { animation: pop-in-from-right 0.4s; } html.default.from-has-menu .overlay { animation: fade-out 0.4s; } html.default.from-has-menu header, html.default.from-has-menu footer, html.default.from-has-menu .col-content { animation: unshift-to-left 0.4s; } html.default.from-has-menu .col-menu { animation: pop-out-to-right 0.4s; } html.default.has-menu body { overflow: hidden; } html.default.has-menu .overlay { visibility: visible; } html.default.has-menu header, html.default.has-menu footer, html.default.has-menu .col-content { transform: translate(-25%, 0); } html.default.has-menu .col-menu { visibility: visible; transform: translate(0, 0); } } .tsd-page-title { padding: 70px 0 20px 0; margin: 0 0 40px 0; background: #fff; box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); } .tsd-page-title h1 { margin: 0; } .tsd-breadcrumb { margin: 0; padding: 0; color: #808080; } .tsd-breadcrumb a { color: #808080; text-decoration: none; } .tsd-breadcrumb a:hover { text-decoration: underline; } .tsd-breadcrumb li { display: inline; } .tsd-breadcrumb li:after { content: " / "; } html.minimal .container { margin: 0; } html.minimal .container-main { padding-top: 50px; padding-bottom: 0; } html.minimal .content-wrap { padding-left: 300px; } html.minimal .tsd-navigation { position: fixed !important; overflow: auto; -webkit-overflow-scrolling: touch; box-sizing: border-box; z-index: 1; left: 0; top: 40px; bottom: 0; width: 300px; padding: 20px; margin: 0; } html.minimal .tsd-member .tsd-member { margin-left: 0; } html.minimal .tsd-page-toolbar { position: fixed; z-index: 2; } html.minimal #tsd-filter .tsd-filter-group { right: 0; transform: none; } html.minimal footer { background-color: transparent; } html.minimal footer .container { padding: 0; } html.minimal .tsd-generator { padding: 0; } @media (max-width: 900px) { html.minimal .tsd-navigation { display: none; } html.minimal .content-wrap { padding-left: 0; } } dl.tsd-comment-tags { overflow: hidden; } dl.tsd-comment-tags dt { float: left; padding: 1px 5px; margin: 0 10px 0 0; border-radius: 4px; border: 1px solid #808080; color: #808080; font-size: 0.8em; font-weight: normal; } dl.tsd-comment-tags dd { margin: 0 0 10px 0; } dl.tsd-comment-tags dd:before, dl.tsd-comment-tags dd:after { display: table; content: " "; } dl.tsd-comment-tags dd pre, dl.tsd-comment-tags dd:after { clear: both; } dl.tsd-comment-tags p { margin: 0; } .tsd-panel.tsd-comment .lead { font-size: 1.1em; line-height: 1.333em; margin-bottom: 2em; } .tsd-panel.tsd-comment .lead:last-child { margin-bottom: 0; } .toggle-protected .tsd-is-private { display: none; } .toggle-public .tsd-is-private, .toggle-public .tsd-is-protected, .toggle-public .tsd-is-private-protected { display: none; } .toggle-inherited .tsd-is-inherited { display: none; } .toggle-only-exported .tsd-is-not-exported { display: none; } .toggle-externals .tsd-is-external { display: none; } #tsd-filter { position: relative; display: inline-block; height: 40px; vertical-align: bottom; } .no-filter #tsd-filter { display: none; } #tsd-filter .tsd-filter-group { display: inline-block; height: 40px; vertical-align: bottom; white-space: nowrap; } #tsd-filter input { display: none; } @media (max-width: 900px) { #tsd-filter .tsd-filter-group { display: block; position: absolute; top: 40px; right: 20px; height: auto; background-color: #fff; visibility: hidden; transform: translate(50%, 0); box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); } .has-options #tsd-filter .tsd-filter-group { visibility: visible; } .to-has-options #tsd-filter .tsd-filter-group { animation: fade-in 0.2s; } .from-has-options #tsd-filter .tsd-filter-group { animation: fade-out 0.2s; } #tsd-filter label, #tsd-filter .tsd-select { display: block; padding-right: 20px; } } footer { border-top: 1px solid #eee; background-color: #fff; } footer.with-border-bottom { border-bottom: 1px solid #eee; } footer .tsd-legend-group { font-size: 0; } footer .tsd-legend { display: inline-block; width: 25%; padding: 0; font-size: 16px; list-style: none; line-height: 1.333em; vertical-align: top; } @media (max-width: 900px) { footer .tsd-legend { width: 50%; } } .tsd-hierarchy { list-style: square; padding: 0 0 0 20px; margin: 0; } .tsd-hierarchy .target { font-weight: bold; } .tsd-index-panel .tsd-index-content { margin-bottom: -30px !important; } .tsd-index-panel .tsd-index-section { margin-bottom: 30px !important; } .tsd-index-panel h3 { margin: 0 -20px 10px -20px; padding: 0 20px 10px 20px; border-bottom: 1px solid #eee; } .tsd-index-panel ul.tsd-index-list { -moz-column-count: 3; -ms-column-count: 3; -o-column-count: 3; column-count: 3; -moz-column-gap: 20px; -ms-column-gap: 20px; -o-column-gap: 20px; column-gap: 20px; padding: 0; list-style: none; line-height: 1.333em; } @media (max-width: 900px) { .tsd-index-panel ul.tsd-index-list { -moz-column-count: 1; -ms-column-count: 1; -o-column-count: 1; column-count: 1; } } @media (min-width: 901px) and (max-width: 1024px) { .tsd-index-panel ul.tsd-index-list { -moz-column-count: 2; -ms-column-count: 2; -o-column-count: 2; column-count: 2; } } .tsd-index-panel ul.tsd-index-list li { -webkit-page-break-inside: avoid; -moz-page-break-inside: avoid; -ms-page-break-inside: avoid; -o-page-break-inside: avoid; page-break-inside: avoid; } .tsd-index-panel a, .tsd-index-panel .tsd-parent-kind-module a { color: #9600ff; } .tsd-index-panel .tsd-parent-kind-interface a { color: #7da01f; } .tsd-index-panel .tsd-parent-kind-enum a { color: #cc9900; } .tsd-index-panel .tsd-parent-kind-class a { color: #4da6ff; } .tsd-index-panel .tsd-kind-module a { color: #9600ff; } .tsd-index-panel .tsd-kind-interface a { color: #7da01f; } .tsd-index-panel .tsd-kind-enum a { color: #cc9900; } .tsd-index-panel .tsd-kind-class a { color: #4da6ff; } .tsd-index-panel .tsd-is-private a { color: #808080; } .tsd-flag { display: inline-block; padding: 1px 5px; border-radius: 4px; color: #fff; background-color: #808080; text-indent: 0; font-size: 14px; font-weight: normal; } .tsd-anchor { position: absolute; top: -100px; } .tsd-member { position: relative; } .tsd-member .tsd-anchor + h3 { margin-top: 0; margin-bottom: 0; border-bottom: none; } .tsd-navigation { margin: 0 0 0 40px; } .tsd-navigation a { display: block; padding-top: 2px; padding-bottom: 2px; border-left: 2px solid transparent; color: #222; text-decoration: none; transition: border-left-color 0.1s; } .tsd-navigation a:hover { text-decoration: underline; } .tsd-navigation ul { margin: 0; padding: 0; list-style: none; } .tsd-navigation li { padding: 0; } .tsd-navigation.primary { padding-bottom: 40px; } .tsd-navigation.primary a { display: block; padding-top: 6px; padding-bottom: 6px; } .tsd-navigation.primary ul li a { padding-left: 5px; } .tsd-navigation.primary ul li li a { padding-left: 25px; } .tsd-navigation.primary ul li li li a { padding-left: 45px; } .tsd-navigation.primary ul li li li li a { padding-left: 65px; } .tsd-navigation.primary ul li li li li li a { padding-left: 85px; } .tsd-navigation.primary ul li li li li li li a { padding-left: 105px; } .tsd-navigation.primary > ul { border-bottom: 1px solid #eee; } .tsd-navigation.primary li { border-top: 1px solid #eee; } .tsd-navigation.primary li.current > a { font-weight: bold; } .tsd-navigation.primary li.label span { display: block; padding: 20px 0 6px 5px; color: #808080; } .tsd-navigation.primary li.globals + li > span, .tsd-navigation.primary li.globals + li > a { padding-top: 20px; } .tsd-navigation.secondary { max-height: calc(100vh - 1rem - 40px); overflow: auto; position: -webkit-sticky; position: sticky; top: calc(.5rem + 40px); transition: 0.3s; } .tsd-navigation.secondary.tsd-navigation--toolbar-hide { max-height: calc(100vh - 1rem); top: 0.5rem; } .tsd-navigation.secondary ul { transition: opacity 0.2s; } .tsd-navigation.secondary ul li a { padding-left: 25px; } .tsd-navigation.secondary ul li li a { padding-left: 45px; } .tsd-navigation.secondary ul li li li a { padding-left: 65px; } .tsd-navigation.secondary ul li li li li a { padding-left: 85px; } .tsd-navigation.secondary ul li li li li li a { padding-left: 105px; } .tsd-navigation.secondary ul li li li li li li a { padding-left: 125px; } .tsd-navigation.secondary ul.current a { border-left-color: #eee; } .tsd-navigation.secondary li.focus > a, .tsd-navigation.secondary ul.current li.focus > a { border-left-color: #000; } .tsd-navigation.secondary li.current { margin-top: 20px; margin-bottom: 20px; border-left-color: #eee; } .tsd-navigation.secondary li.current > a { font-weight: bold; } @media (min-width: 901px) { .menu-sticky-wrap { position: static; } } .tsd-panel { margin: 20px 0; padding: 20px; background-color: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); } .tsd-panel:empty { display: none; } .tsd-panel > h1, .tsd-panel > h2, .tsd-panel > h3 { margin: 1.5em -20px 10px -20px; padding: 0 20px 10px 20px; border-bottom: 1px solid #eee; } .tsd-panel > h1.tsd-before-signature, .tsd-panel > h2.tsd-before-signature, .tsd-panel > h3.tsd-before-signature { margin-bottom: 0; border-bottom: 0; } .tsd-panel table { display: block; width: 100%; overflow: auto; margin-top: 10px; word-break: normal; word-break: keep-all; } .tsd-panel table th { font-weight: bold; } .tsd-panel table th, .tsd-panel table td { padding: 6px 13px; border: 1px solid #ddd; } .tsd-panel table tr { background-color: #fff; border-top: 1px solid #ccc; } .tsd-panel table tr:nth-child(2n) { background-color: #f8f8f8; } .tsd-panel-group { margin: 60px 0; } .tsd-panel-group > h1, .tsd-panel-group > h2, .tsd-panel-group > h3 { padding-left: 20px; padding-right: 20px; } #tsd-search { transition: background-color 0.2s; } #tsd-search .title { position: relative; z-index: 2; } #tsd-search .field { position: absolute; left: 0; top: 0; right: 40px; height: 40px; } #tsd-search .field input { box-sizing: border-box; position: relative; top: -50px; z-index: 1; width: 100%; padding: 0 10px; opacity: 0; outline: 0; border: 0; background: transparent; color: #222; } #tsd-search .field label { position: absolute; overflow: hidden; right: -40px; } #tsd-search .field input, #tsd-search .title { transition: opacity 0.2s; } #tsd-search .results { position: absolute; visibility: hidden; top: 40px; width: 100%; margin: 0; padding: 0; list-style: none; box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); } #tsd-search .results li { padding: 0 10px; background-color: #fdfdfd; } #tsd-search .results li:nth-child(even) { background-color: #fff; } #tsd-search .results li.state { display: none; } #tsd-search .results li.current, #tsd-search .results li:hover { background-color: #eee; } #tsd-search .results a { display: block; } #tsd-search .results a:before { top: 10px; } #tsd-search .results span.parent { color: #808080; font-weight: normal; } #tsd-search.has-focus { background-color: #eee; } #tsd-search.has-focus .field input { top: 0; opacity: 1; } #tsd-search.has-focus .title { z-index: 0; opacity: 0; } #tsd-search.has-focus .results { visibility: visible; } #tsd-search.loading .results li.state.loading { display: block; } #tsd-search.failure .results li.state.failure { display: block; } .tsd-signature { margin: 0 0 1em 0; padding: 10px; border: 1px solid #eee; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; overflow-x: auto; } .tsd-signature.tsd-kind-icon { padding-left: 30px; } .tsd-signature.tsd-kind-icon:before { top: 10px; left: 10px; } .tsd-panel > .tsd-signature { margin-left: -20px; margin-right: -20px; border-width: 1px 0; } .tsd-panel > .tsd-signature.tsd-kind-icon { padding-left: 40px; } .tsd-panel > .tsd-signature.tsd-kind-icon:before { left: 20px; } .tsd-signature-symbol { color: #808080; font-weight: normal; } .tsd-signature-type { font-style: italic; font-weight: normal; } .tsd-signatures { padding: 0; margin: 0 0 1em 0; border: 1px solid #eee; } .tsd-signatures .tsd-signature { margin: 0; border-width: 1px 0 0 0; transition: background-color 0.1s; } .tsd-signatures .tsd-signature:first-child { border-top-width: 0; } .tsd-signatures .tsd-signature.current { background-color: #eee; } .tsd-signatures.active > .tsd-signature { cursor: pointer; } .tsd-panel > .tsd-signatures { margin-left: -20px; margin-right: -20px; border-width: 1px 0; } .tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon { padding-left: 40px; } .tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon:before { left: 20px; } .tsd-panel > a.anchor + .tsd-signatures { border-top-width: 0; margin-top: -20px; } ul.tsd-descriptions { position: relative; overflow: hidden; padding: 0; list-style: none; } ul.tsd-descriptions.active > .tsd-description { display: none; } ul.tsd-descriptions.active > .tsd-description.current { display: block; } ul.tsd-descriptions.active > .tsd-description.fade-in { animation: fade-in-delayed 0.3s; } ul.tsd-descriptions.active > .tsd-description.fade-out { animation: fade-out-delayed 0.3s; position: absolute; display: block; top: 0; left: 0; right: 0; opacity: 0; visibility: hidden; } ul.tsd-descriptions h4, ul.tsd-descriptions .tsd-index-panel h3, .tsd-index-panel ul.tsd-descriptions h3 { font-size: 16px; margin: 1em 0 0.5em 0; } ul.tsd-parameters, ul.tsd-type-parameters { list-style: square; margin: 0; padding-left: 20px; } ul.tsd-parameters > li.tsd-parameter-signature, ul.tsd-type-parameters > li.tsd-parameter-signature { list-style: none; margin-left: -20px; } ul.tsd-parameters h5, ul.tsd-type-parameters h5 { font-size: 16px; margin: 1em 0 0.5em 0; } ul.tsd-parameters .tsd-comment, ul.tsd-type-parameters .tsd-comment { margin-top: -0.5em; } .tsd-sources { font-size: 14px; color: #808080; margin: 0 0 1em 0; } .tsd-sources a { color: #808080; text-decoration: underline; } .tsd-sources ul, .tsd-sources p { margin: 0 !important; } .tsd-sources ul { list-style: none; padding: 0; } .tsd-page-toolbar { position: fixed; z-index: 1; top: 0; left: 0; width: 100%; height: 40px; color: #333; background: #fff; border-bottom: 1px solid #eee; transition: transform 0.3s linear; } .tsd-page-toolbar a { color: #333; text-decoration: none; } .tsd-page-toolbar a.title { font-weight: bold; } .tsd-page-toolbar a.title:hover { text-decoration: underline; } .tsd-page-toolbar .table-wrap { display: table; width: 100%; height: 40px; } .tsd-page-toolbar .table-cell { display: table-cell; position: relative; white-space: nowrap; line-height: 40px; } .tsd-page-toolbar .table-cell:first-child { width: 100%; } .tsd-page-toolbar--hide { transform: translateY(-100%); } .tsd-select .tsd-select-list li:before, .tsd-select .tsd-select-label:before, .tsd-widget:before { content: ""; display: inline-block; width: 40px; height: 40px; margin: 0 -8px 0 0; background-image: url(../images/widgets.png); background-repeat: no-repeat; text-indent: -1024px; vertical-align: bottom; } @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { .tsd-select .tsd-select-list li:before, .tsd-select .tsd-select-label:before, .tsd-widget:before { background-image: url(../images/widgets@2x.png); background-size: 320px 40px; } } .tsd-widget { display: inline-block; overflow: hidden; opacity: 0.6; height: 40px; transition: opacity 0.1s, background-color 0.2s; vertical-align: bottom; cursor: pointer; } .tsd-widget:hover { opacity: 0.8; } .tsd-widget.active { opacity: 1; background-color: #eee; } .tsd-widget.no-caption { width: 40px; } .tsd-widget.no-caption:before { margin: 0; } .tsd-widget.search:before { background-position: 0 0; } .tsd-widget.menu:before { background-position: -40px 0; } .tsd-widget.options:before { background-position: -80px 0; } .tsd-widget.options, .tsd-widget.menu { display: none; } @media (max-width: 900px) { .tsd-widget.options, .tsd-widget.menu { display: inline-block; } } input[type=checkbox] + .tsd-widget:before { background-position: -120px 0; } input[type=checkbox]:checked + .tsd-widget:before { background-position: -160px 0; } .tsd-select { position: relative; display: inline-block; height: 40px; transition: opacity 0.1s, background-color 0.2s; vertical-align: bottom; cursor: pointer; } .tsd-select .tsd-select-label { opacity: 0.6; transition: opacity 0.2s; } .tsd-select .tsd-select-label:before { background-position: -240px 0; } .tsd-select.active .tsd-select-label { opacity: 0.8; } .tsd-select.active .tsd-select-list { visibility: visible; opacity: 1; transition-delay: 0s; } .tsd-select .tsd-select-list { position: absolute; visibility: hidden; top: 40px; left: 0; margin: 0; padding: 0; opacity: 0; list-style: none; box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); transition: visibility 0s 0.2s, opacity 0.2s; } .tsd-select .tsd-select-list li { padding: 0 20px 0 0; background-color: #fdfdfd; } .tsd-select .tsd-select-list li:before { background-position: 40px 0; } .tsd-select .tsd-select-list li:nth-child(even) { background-color: #fff; } .tsd-select .tsd-select-list li:hover { background-color: #eee; } .tsd-select .tsd-select-list li.selected:before { background-position: -200px 0; } @media (max-width: 900px) { .tsd-select .tsd-select-list { top: 0; left: auto; right: 100%; margin-right: -5px; } .tsd-select .tsd-select-label:before { background-position: -280px 0; } } img { max-width: 100%; } ================================================ FILE: docs/assets/js/main.js ================================================ !function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.7",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return null==e?"":e.toString()},e.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){for(var t,r;47<(r=(t=this.next()).charCodeAt(0))&&r<58;);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos=this.scrollTop||0===this.scrollTop,isShown!==this.showToolbar&&(this.toolbar.classList.toggle("tsd-page-toolbar--hide"),this.secondaryNav.classList.toggle("tsd-navigation--toolbar-hide")),this.lastY=this.scrollTop},Viewport}(typedoc.EventTarget);typedoc.Viewport=Viewport,typedoc.registerService(Viewport,"viewport")}(typedoc||(typedoc={})),function(typedoc){function Component(options){this.el=options.el}typedoc.Component=Component}(typedoc||(typedoc={})),function(typedoc){typedoc.pointerDown="mousedown",typedoc.pointerMove="mousemove",typedoc.pointerUp="mouseup",typedoc.pointerDownPosition={x:0,y:0},typedoc.preventNextClick=!1,typedoc.isPointerDown=!1,typedoc.isPointerTouch=!1,typedoc.hasPointerMoved=!1,typedoc.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),document.documentElement.classList.add(typedoc.isMobile?"is-mobile":"not-mobile"),typedoc.isMobile&&"ontouchstart"in document.documentElement&&(typedoc.isPointerTouch=!0,typedoc.pointerDown="touchstart",typedoc.pointerMove="touchmove",typedoc.pointerUp="touchend"),document.addEventListener(typedoc.pointerDown,function(e){typedoc.isPointerDown=!0,typedoc.hasPointerMoved=!1;var t="touchstart"==typedoc.pointerDown?e.targetTouches[0]:e;typedoc.pointerDownPosition.y=t.pageY||0,typedoc.pointerDownPosition.x=t.pageX||0}),document.addEventListener(typedoc.pointerMove,function(e){if(typedoc.isPointerDown&&!typedoc.hasPointerMoved){var t="touchstart"==typedoc.pointerDown?e.targetTouches[0]:e,x=typedoc.pointerDownPosition.x-(t.pageX||0),y=typedoc.pointerDownPosition.y-(t.pageY||0);typedoc.hasPointerMoved=10scrollTop;)index-=1;for(;index"+match+""}),parent=row.parent||"";(parent=parent.replace(new RegExp(this.query,"i"),function(match){return""+match+""}))&&(name=''+parent+"."+name);var item=document.createElement("li");item.classList.value=row.classes,item.innerHTML='\n '+name+"'\n ",this.results.appendChild(item)}}},Search.prototype.setLoadingState=function(value){this.loadingState!=value&&(this.el.classList.remove(SearchLoadingState[this.loadingState].toLowerCase()),this.loadingState=value,this.el.classList.add(SearchLoadingState[this.loadingState].toLowerCase()),this.updateResults())},Search.prototype.setHasFocus=function(value){this.hasFocus!=value&&(this.hasFocus=value,this.el.classList.toggle("has-focus"),value?(this.setQuery(""),this.field.value=""):this.field.value=this.query)},Search.prototype.setQuery=function(value){this.query=value.trim(),this.updateResults()},Search.prototype.setCurrentResult=function(dir){var current=this.results.querySelector(".current");if(current){var rel=1==dir?current.nextElementSibling:current.previousElementSibling;rel&&(current.classList.remove("current"),rel.classList.add("current"))}else(current=this.results.querySelector(1==dir?"li:first-child":"li:last-child"))&¤t.classList.add("current")},Search.prototype.gotoCurrentResult=function(){var current=this.results.querySelector(".current");if(current||(current=this.results.querySelector("li:first-child")),current){var link=current.querySelector("a");link&&(window.location.href=link.href),this.field.blur()}},Search.prototype.bindEvents=function(){var _this=this;this.results.addEventListener("mousedown",function(){_this.resultClicked=!0}),this.results.addEventListener("mouseup",function(){_this.resultClicked=!1,_this.setHasFocus(!1)}),this.field.addEventListener("focusin",function(){_this.setHasFocus(!0),_this.loadIndex()}),this.field.addEventListener("focusout",function(){_this.resultClicked?_this.resultClicked=!1:setTimeout(function(){return _this.setHasFocus(!1)},100)}),this.field.addEventListener("input",function(){_this.setQuery(_this.field.value)}),this.field.addEventListener("keydown",function(e){13==e.keyCode||27==e.keyCode||38==e.keyCode||40==e.keyCode?(_this.preventPress=!0,e.preventDefault(),13==e.keyCode?_this.gotoCurrentResult():27==e.keyCode?_this.field.blur():38==e.keyCode?_this.setCurrentResult(-1):40==e.keyCode&&_this.setCurrentResult(1)):_this.preventPress=!1}),this.field.addEventListener("keypress",function(e){_this.preventPress&&e.preventDefault()}),document.body.addEventListener("keydown",function(e){e.altKey||e.ctrlKey||e.metaKey||!_this.hasFocus&&47this.groups.length-1&&(index=this.groups.length-1),this.index!=index){var to=this.groups[index];if(-1 DeGiro | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeGiro

description

Main class of DeGiro Unofficial API.

Hierarchy

  • DeGiro

Implements

Index

Constructors

constructor

Properties

Private accountConfig

accountConfig: AccountConfigType | undefined

Private accountData

accountData: AccountDataType | undefined

Private jsessionId

jsessionId: string | undefined

Private Readonly pwd

pwd: string

Private Readonly username

username: string

Methods

Private completePortfolioDetails

  • completePortfolioDetails(portfolio: any[], getProductDetails: boolean): Promise<any[]>
  • Parameters

    • portfolio: any[]
    • getProductDetails: boolean

    Returns Promise<any[]>

createOrder

deleteOrder

  • deleteOrder(orderId: String): Promise<void>

executeOrder

  • executeOrder(order: OrderType, executeId: String): Promise<String>

getAccountConfig

getAccountData

getAccountInfo

getAccountReports

getAccountState

getCashFunds

getConfigDictionary

getFavouriteProducts

getHistoricalOrders

getJSESSIONID

  • getJSESSIONID(): undefined | string

getNews

getOrders

getPopularStocks

getPortfolio

getProductsByIds

  • getProductsByIds(ids: string[]): Promise<any[]>

getWebSettings

getWebUserSettings

getWebi18nMessages

Private hasSessionId

  • hasSessionId(): boolean

isLogin

login

Private loginWithJSESSIONID

logout

  • logout(): Promise<void>

searchProduct

Static create

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Constructor
  • Method
  • Private property
  • Private method
  • Enumeration
  • Interface
  • Static method

Generated using TypeDoc

================================================ FILE: docs/enums/_enums_degiroenums_.degiro_api_paths.html ================================================ DEGIRO_API_PATHS | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration DEGIRO_API_PATHS

Index

Enumeration members

BASE_API_URL

BASE_API_URL: = "https://trader.degiro.nl/"

BASE_REPORT_DOWNLOAD_URI

BASE_REPORT_DOWNLOAD_URI: = "document/download/"

CREATE_ORDER_PATH

CREATE_ORDER_PATH: = "v5/checkOrder"

GET_ACCOUNT_CONFIG_PATH

GET_ACCOUNT_CONFIG_PATH: = "login/secure/config"

GET_ACCOUNT_INFO_PATH

GET_ACCOUNT_INFO_PATH: = "v5/account/info/"

GET_ACCOUNT_REPORTS_PATH

GET_ACCOUNT_REPORTS_PATH: = "document/list/report"

GET_ACCOUNT_STATE_PATH

GET_ACCOUNT_STATE_PATH: = "v6/accountoverview"

GET_GENERIC_DATA_PATH

GET_GENERIC_DATA_PATH: = "v5/update/"

GET_LATESTS_NEWS_PATH

GET_LATESTS_NEWS_PATH: = "newsfeed/v2/latest-news"

GET_TOP_NEWS_PATH

GET_TOP_NEWS_PATH: = "newsfeed/v2/top-news-preview"

GET_WEB_SETTINGS_PATH

GET_WEB_SETTINGS_PATH: = "settings/web"

GET_WEB_USER_SETTINGS_PATH

GET_WEB_USER_SETTINGS_PATH: = "settings/user"

LOGIN_URL_PATH

LOGIN_URL_PATH: = "login/secure/login"

LOGOUT_URL_PATH

LOGOUT_URL_PATH: = "trading/secure/logout"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/enums/_enums_degiroenums_.degiroactions.html ================================================ DeGiroActions | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration DeGiroActions

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/enums/_enums_degiroenums_.degiromarketordertypes.html ================================================ DeGiroMarketOrderTypes | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration DeGiroMarketOrderTypes

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/enums/_enums_degiroenums_.degiroproductypes.html ================================================ DeGiroProducTypes | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration DeGiroProducTypes

Index

Enumeration members

bonds

bonds: = 2

cfds

cfds: = 535

etfs

etfs: = 131

futures

futures: = 7

investmendFunds

investmendFunds: = 13

leveragedProducts

leveragedProducts: = 14

options

options: = 8

shares

shares: = 1

warrants

warrants: = 536

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/enums/_enums_degiroenums_.degirosort.html ================================================ DeGiroSort | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration DeGiroSort

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/enums/_enums_degiroenums_.degirotimetypes.html ================================================ DeGiroTimeTypes | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration DeGiroTimeTypes

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/enums/_enums_degiroenums_.get_orders_types.html ================================================ GET_ORDERS_TYPES | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration GET_ORDERS_TYPES

Index

Enumeration members

Enumeration members

ACTIVE

ACTIVE: = "orders"

HISTORICAL

HISTORICAL: = "historicalOrders"

TRANSACTIONS

TRANSACTIONS: = "transactions"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/enums/_enums_degiroenums_.portfolio_positions_type_enum.html ================================================ PORTFOLIO_POSITIONS_TYPE_ENUM | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration PORTFOLIO_POSITIONS_TYPE_ENUM

Index

Enumeration members

Enumeration members

ALL

ALL: = "all"

ALL_POSITIONS

ALL_POSITIONS: = "allPositions"

CLOSED

CLOSED: = "closed"

OPEN

OPEN: = "open"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/globals.html ================================================ degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

degiro-api

Index

Modules

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/index.html ================================================ degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

degiro-api

DeGiro Trading Broker API

This is an unofficial TypeScript API client (Backend & Frontend) 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.

All responses and objects are typed to develop faster and secure.

DeGiro Logo

stars stars stars


Buy Me A Coffee

Table of content

Installation

# using npm
npm install --save degiro-api

# using yarn
yarn add degiro-api

How to use

Create an instance of DeGiro

Basic 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

const DeGiro = require('degiro-api')

const degiro = new DeGiro({
  username: 'username',
  pwd: '*****'
})

degiro.login()
  .then((accountData) => console.log('Log in success\n', accountData))
  .catch(console.error)

// or creating with the static create method

const degiro = DeGiro.create({ username: '*****', pwd: '*****' })
const accountData = await degiro.login()

// or create with env credentials

const degiro = new DeGiro() // <-- Use DEGIRO_USER & DEGIRO_PWD
const accountData = await degiro.login()

Active Debug mode

$ export DEGIRO_DEBUG=1
$ yarn start

Documentation

Run the next command and open index.html file inside doc folder.

$ yarn doc
yarn run v1.22.4
$ typedoc --out docs src

Using TypeScript 3.9.2 from ....../degiro-api/node_modules/typescript/lib
Rendering [========================================] 100%

Documentation generated at ....../degiro-api/docs

✨  Done in 3.94s.

Running tests set

Before run the test set you must set DEGIRO_USER & DEGIRO_PWD env export variables to attach an account to the test sets.

$ yarn install && yarn test
yarn run v1.22.4
$ mocha -r ts-node/register tests/**/*.spec.ts


  Environment variables
    ✓ DEGIRO_USER env var should exists
    ✓ DEGIRO_PWD env var should exists

  Create DeGiro instance
    ✓ should create an instance of DeGiro class from env vars
    ✓ should create an instance of DeGiro class from constructor params

  DeGiro login process
    ✓ should successfully log in with environment credentials (619ms)
    ✓ should return a valid account config from server (738ms)
    ✓ should return a valid account data from server (727ms)
    ✓ getJSESSIONID should return a valid jsessionId
    ✓ should login with previous jsessionId

  DeGiro logout process
    ✓ should successfully log out after sign in (685ms)


  10 passing (3s)

✨  Done in 5.21s.

Get JSESSIONID and reuse sessions

The 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:

getJSESSIONID(): string

import DeGiro from 'degiro-api'

(async () => {
  const degiro = new DeGiro({}) // <-- Using ENV variables

  await degiro.login()

  // Get the jsessionId (LOOK, is not a promise)
  const jsessionId = degiro.getJSESSIONID()
})()
import DeGiro from 'degiro-api'

(async () => {

  // Create an instance from a previous session
  const degiro = new DeGiro({
    username: '<your_username_here>',
    pwd: '*******',
    jsessionId: previousJSESSIONID
  })

  // Hydrate
  // Re-use sessions need to re-hydrate the account config data and could use as a session expiration checker
  await degiro.login()

  // Do your stuff here...

})()

Check if we are authenticated

isLogin(options): boolean

import DeGiro from 'degiro-api'

(async () => {
  // Create an instance from a previous session
  const degiro = new DeGiro({}) // <-- Using ENV variables

  if (!degiro.isLogin()) {
    await degiro.login()
    if (degiro.isLogin()) {
      // AWESOME!! We're in
    }
  }
})()

The 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. You 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)

import DeGiro from 'degiro-api'

(async () => {
  // Create an instance from a previous session
  const degiro = new DeGiro({}) // <-- Using ENV variables

  // Force to make a request and check if session is still alive
  if(! await degiro.isLogin({ secure: true })) {
    await degiro.login()
  }
})()

Get account details explicitly

Get account info using await:

import DeGiro from 'degiro-api'

(async () => {
  const degiro = new DeGiro({
    username: 'username',
    pwd: '*****'
  })

  await degiro.login() // Login also returns accountData

  const accountData = await degiro.getAccountData()
  // console.log(accountData)
})()

Get portfolio

getPortfolio(config: GetPorfolioConfigType): Promise<any[]>

getPortfolio config parameter could have:

  • type: set the types or positions you want to fetch. Could be:

    • ALL: Gets the response without filter it
    • ALL_POSITIONS: Gets only positions in products. Exclude positions like 'CASH', etc.
    • OPEN: Gets only opened positions.
    • CLOSED: Gets only the closed positions in your portfolio.
  • getProductDetails: if is set to true the positions results will have a productData field with all the product details.

Get all open positions:

import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'
const { PORTFOLIO_POSITIONS_TYPE_ENUM } = DeGiroEnums

(async () => {

  const degiro: DeGiro = new DeGiro({
    username: 'your_username_here',
    pwd: '**********',
  })

  await degiro.login()

  const portfolio = await degiro.getPortfolio({ 
    type: PORTFOLIO_POSITIONS_TYPE_ENUM.ALL, 
    getProductDetails: true,
  })
  console.log(JSON.stringify(portfolio, null, 2))
})()

Also you can fetch your portfolio data this way:

import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'
const { PORTFOLIO_POSITIONS_TYPE_ENUM } = DeGiroEnums

(async () => {

  const degiro: DeGiro = new DeGiro({
    username: 'your_username_here',
    pwd: '**********',
  })

  await degiro.login()

  const portfolio = await degiro.getPortfolio({ type: PORTFOLIO_POSITIONS_TYPE_ENUM.ALL })
  console.log(JSON.stringify(portfolio, null, 2))
})()

And getting product details too

import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'
const { PORTFOLIO_POSITIONS_TYPE_ENUM } = DeGiroEnums

(async () => {

  const degiro: DeGiro = new DeGiro({
    username: 'your_username_here',
    pwd: '**********',
  })

  await degiro.login()

  const portfolio = await degiro.getPortfolio({ 
    type: PORTFOLIO_POSITIONS_TYPE_ENUM.ALL, 
    getProductDetails: true,
  })
  console.log(JSON.stringify(portfolio, null, 2))
})()

Search product, stock and much more in broker

degiro.searchProduct(options): Promise<SearchProductResultType[]>

  • options:
    • text: required string,
    • type: optional DeGiroProducTypes
    • limit: optional number default=10,
    • offset: optional number default=0,

DeGiroProducTypes

  • shares: 1
  • bonds: 2
  • futures: 7
  • options: 8
  • investmendFunds: 13
  • leveragedProducts: 14
  • etfs: 131
  • cfds: 535
  • warrants: 536

Search the text "AAPL" without any limitation

import DeGiro from 'degiro-api'

(async () => {

  const degiro: DeGiro = new DeGiro({
    username: 'your_username_here',
    pwd: '***********',
  })

  await degiro.login()

  const result = await degiro.searchProduct({ text: 'AAPL' })
  console.log(JSON.stringify(result, null, 2))
})()

Search TSLA stock

import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'
const { DeGiroProducTypes } = DeGiroEnums

(async () => {

  const degiro: DeGiro = new DeGiro({
    username: 'your_username_here',
    pwd: '***********',
  })

  await degiro.login()

  const result = await degiro.searchProduct({
    text: 'TSLA',
    type: DeGiroProducTypes.shares,
    limit: 1,
  })
  console.log(JSON.stringify(result, null, 2))
})()

DeGiro Orders

Create a new order

degiro.createOrder(order: OrderType): Promise<CreateOrderResultType>

  • OrderType
    • buySell: DeGiroActions,
    • orderType: DeGiroMarketOrderTypes,
    • price: optional Number,
    • productId: string,
    • size: number,
    • stopPrice: optional number,
    • timeType: DeGiroTimeTypes,
  • DeGiroActions
    • BUY: 'BUY',
    • SELL: 'SELL',
  • DeGiroMarketOrderTypes

    • LIMITED: 0,
    • MARKET: 2,
    • STOP_LOSS: 3,
    • STOP_LOSS_LIMIT: 1,
  • DeGiroTimeTypes

    • DAY: 1,
    • PERMANENT: 3,
  • CreateOrderResultType

    • confirmationId: String,
    • freeSpaceNew: Number,
    • transactionFees: [TransactionFeeType],
  • TransactionFeeType
    • amount: Number,
    • currency: String,
    • id: Number,
import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'
const { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } = DeGiroEnums
const { OrderType } = DeGiroTypes

(async () => {

  const degiro: DeGiro = new DeGiro({
    username: 'your_username_here',
    pwd: '************'
  })

  await degiro.login()

  const order: OrderType = {
    buySell: DeGiroActions.BUY,
    orderType: DeGiroMarketOrderTypes.LIMITED,
    productId: '331868', // $AAPL - Apple Inc
    size: 1,
    timeType: DeGiroTimeTypes.DAY,
    price: 272, // limit price [Degiro could reject this value]
    // stopPrice: 2,
  }

  const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order)
  console.log(JSON.stringify({ confirmationId, freeSpaceNew, transactionFees }, null, 2))
})()

Execute an order

import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'
const { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } = DeGiroEnums
const { OrderType } = DeGiroTypes

(async () => {

  try {
    const degiro: DeGiro = new DeGiro({
      username: 'nachoogoomezomg',
      pwd: <string>process.env.DEGIRO_PWD,
    })

    await degiro.login()

    const order: OrderType = {
      buySell: DeGiroActions.BUY,
      orderType: DeGiroMarketOrderTypes.LIMITED,
      productId: '331868', // $AAPL - Apple Inc
      size: 1,
      timeType: DeGiroTimeTypes.DAY,
      price: 270, // limit price
      // stopPrice: 2,
    }

    const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order)
    const orderId = await degiro.executeOrder(order, confirmationId)
    console.log(`Order executed with id: ${orderId}`)
  } catch (error) {
    console.error(error)
  }
})()

Remove an order

import DeGiro, { DeGiroEnums, DeGiroTypes } from 'degiro-api'
const { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } = DeGiroEnums
const { OrderType } = DeGiroTypes

(async () => {

  const degiro: DeGiro = new DeGiro({
    username: 'nachoogoomezomg',
    pwd: <string>process.env.DEGIRO_PWD,
  })

  await degiro.login()

  const order: OrderType = {
    buySell: DeGiroActions.BUY,
    orderType: DeGiroMarketOrderTypes.LIMITED,
    productId: '331868', // $AAPL - Apple Inc
    size: 1,
    timeType: DeGiroTimeTypes.DAY,
    price: 272, // limit price
    // stopPrice: 2,
  }

  const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order)
  const orderId = await degiro.executeOrder(order, confirmationId)
  console.log(`Order executed with id: ${orderId}`)

  // Wait few seconds to avoid "Rate limit for the given request exceeded" error
  const TIMEOUT_SECONDS = 2 * 1000
  const deleteOrderFunction = async () => {
    try {
      await degiro.deleteOrder(orderId)
      console.log('Order removed')
    } catch (error) {
      console.error(error)
    }
  }
  setTimeout(deleteOrderFunction, TIMEOUT_SECONDS)
})()

Degiro Command Line Interface

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)

$ degiro
Usage: DeGiro Command Line Interface [options] [command]

DeGiro CLI provide you access to DeGiro Broker across the terminal

Options:
  -V, --version   output the version number
  -h, --help      display help for command

Commands:
  login           validate credentials with DeGiro platform
  search          Search products in DeGiro
  portfolio       show account portfolio in real-time
  help [command]  display help for command

License

MIT

TO DO List

  1. Two factor
  2. Get prices

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/interfaces/_interfaces_degiroclassinterface_.degiroclassinterface.html ================================================ DeGiroClassInterface | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu
interface

DeGiroClassInterface

Hierarchy

  • DeGiroClassInterface

Implemented by

Index

Methods

createOrder

deleteOrder

  • deleteOrder(orderId: String): Promise<void>

executeOrder

  • executeOrder(order: OrderType, executeId: string): Promise<String>

getAccountConfig

getAccountData

getAccountInfo

getAccountReports

getAccountState

getCashFunds

getConfigDictionary

getFavouriteProducts

getHistoricalOrders

getJSESSIONID

  • getJSESSIONID(): string | undefined

getNews

getOrders

getPopularStocks

getPortfolio

getProductsByIds

  • getProductsByIds(ids: string[]): Promise<any[]>

getWebSettings

getWebUserSettings

getWebi18nMessages

isLogin

login

logout

  • logout(): Promise<void>

searchProduct

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Method
  • Enumeration
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_createorderrequest_.html ================================================ "api/createOrderRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/createOrderRequest"

Index

Variables

CREATE_ORDER_PATH

CREATE_ORDER_PATH: CREATE_ORDER_PATH

Functions

createOrderRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_deleteorderrequest_.html ================================================ "api/deleteOrderRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/deleteOrderRequest"

Index

Functions

Functions

deleteOrderRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_executeorderrequest_.html ================================================ "api/executeOrderRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/executeOrderRequest"

Index

Functions

executeOrderRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getaccountconfig_.html ================================================ "api/getAccountConfig" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getAccountConfig"

Index

Variables

BASE_API_URL

BASE_API_URL: BASE_API_URL

GET_ACCOUNT_CONFIG_PATH

GET_ACCOUNT_CONFIG_PATH: GET_ACCOUNT_CONFIG_PATH

Functions

getAccountConfigRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getaccountdata_.html ================================================ "api/getAccountData" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getAccountData"

Index

Functions

getAccountDataRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getaccountinforequest_.html ================================================ "api/getAccountInfoRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getAccountInfoRequest"

Index

Variables

GET_ACCOUNT_INFO_PATH

GET_ACCOUNT_INFO_PATH: GET_ACCOUNT_INFO_PATH

Functions

getAccountInfoRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getaccountreportsrequest_.html ================================================ "api/getAccountReportsRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getAccountReportsRequest"

Index

Variables

GET_ACCOUNT_REPORTS_PATH

GET_ACCOUNT_REPORTS_PATH: GET_ACCOUNT_REPORTS_PATH

Functions

getAccountReportsRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getaccountstaterequest_.html ================================================ "api/getAccountStateRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getAccountStateRequest"

Index

Variables

GET_ACCOUNT_STATE_PATH

GET_ACCOUNT_STATE_PATH: GET_ACCOUNT_STATE_PATH

Functions

getAccountStateRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getcashfundstrequest_.html ================================================ "api/getCashFundstRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getCashFundstRequest"

Index

Variables

GET_GENERIC_DATA_PATH

GET_GENERIC_DATA_PATH: GET_GENERIC_DATA_PATH

Functions

getCashFundstRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getconfigdictionaryrequest_.html ================================================ "api/getConfigDictionaryRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getConfigDictionaryRequest"

Index

Functions

getConfigDictionaryRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getnewsrequest_.html ================================================ "api/getNewsRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getNewsRequest"

Index

Variables

GET_LATESTS_NEWS_PATH

GET_LATESTS_NEWS_PATH: GET_LATESTS_NEWS_PATH

GET_TOP_NEWS_PATH

GET_TOP_NEWS_PATH: GET_TOP_NEWS_PATH

Functions

getNewsRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getordersrequest_.html ================================================ "api/getOrdersRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getOrdersRequest"

Index

Functions

Functions

getOrdersRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getportfoliorequest_.html ================================================ "api/getPortfolioRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getPortfolioRequest"

Index

Functions

getPortfolioRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getproductsbyidsrequest_.html ================================================ "api/getProductsByIdsRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getProductsByIdsRequest"

Index

Functions

getProductsByIdsRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getwebi18nmessagesrequest_.html ================================================ "api/getWebi18nMessagesRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getWebi18nMessagesRequest"

Index

Functions

getWebi18nMessagesRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getwebsettingsrequest_.html ================================================ "api/getWebSettingsRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getWebSettingsRequest"

Index

Variables

GET_WEB_SETTINGS_PATH

GET_WEB_SETTINGS_PATH: GET_WEB_SETTINGS_PATH

Functions

getWebSettingsRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_getwebusersettingsrequest_.html ================================================ "api/getWebUserSettingsRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/getWebUserSettingsRequest"

Index

Variables

GET_WEB_USER_SETTINGS_PATH

GET_WEB_USER_SETTINGS_PATH: GET_WEB_USER_SETTINGS_PATH

Functions

getWebUserSettingsRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_index_.html ================================================ "api/index" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/index"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_login_.html ================================================ "api/login" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/login"

Index

Variables

BASE_API_URL

BASE_API_URL: BASE_API_URL

LOGIN_URL_PATH

LOGIN_URL_PATH: LOGIN_URL_PATH

Functions

loginRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_logout_.html ================================================ "api/logout" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/logout"

Index

Variables

BASE_API_URL

BASE_API_URL: BASE_API_URL

LOGOUT_URL_PATH

LOGOUT_URL_PATH: LOGOUT_URL_PATH

Functions

logoutRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_api_searchproductrequest_.html ================================================ "api/searchProductRequest" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/searchProductRequest"

Index

Functions

Const createURLQuery

searchProductRequest

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_degiro_.html ================================================ "DeGiro" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "DeGiro"

Index

Classes

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_enums_degiroenums_.html ================================================ "enums/DeGiroEnums" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "enums/DeGiroEnums"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_enums_index_.html ================================================ "enums/index" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "enums/index"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_interfaces_degiroclassinterface_.html ================================================ "interfaces/DeGiroClassInterface" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "interfaces/DeGiroClassInterface"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_interfaces_index_.html ================================================ "interfaces/index" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "interfaces/index"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_main_.html ================================================ "main" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "main"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_accountconfigtype_.html ================================================ "types/AccountConfigType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/AccountConfigType"

Index

Type aliases

Type aliases

AccountConfigType

AccountConfigType: { data: { betaLandingPath: string; cashSolutionsUrl: string; clientId: number; companiesServiceUrl: string; dictionaryUrl: string; firstLoginWizardUrl: string; i18nUrl: string; landingPath: string; loginUrl: string; mobileLandingPath: string; paUrl: string; paymentServiceUrl: string; productSearchUrl: string; productTypesUrl: string; reportingUrl: string; sessionId: string; taskManagerUrl: string; tradingUrl: string; vwdGossipsUrl: string; vwdNewsUrl: string; vwdQuotecastServiceUrl: string } }

Type declaration

  • data: { betaLandingPath: string; cashSolutionsUrl: string; clientId: number; companiesServiceUrl: string; dictionaryUrl: string; firstLoginWizardUrl: string; i18nUrl: string; landingPath: string; loginUrl: string; mobileLandingPath: string; paUrl: string; paymentServiceUrl: string; productSearchUrl: string; productTypesUrl: string; reportingUrl: string; sessionId: string; taskManagerUrl: string; tradingUrl: string; vwdGossipsUrl: string; vwdNewsUrl: string; vwdQuotecastServiceUrl: string }
    • betaLandingPath: string
    • cashSolutionsUrl: string
    • clientId: number
    • companiesServiceUrl: string
    • dictionaryUrl: string
    • firstLoginWizardUrl: string
    • i18nUrl: string
    • landingPath: string
    • loginUrl: string
    • mobileLandingPath: string
    • paUrl: string
    • paymentServiceUrl: string
    • productSearchUrl: string
    • productTypesUrl: string
    • reportingUrl: string
    • sessionId: string
    • taskManagerUrl: string
    • tradingUrl: string
    • vwdGossipsUrl: string
    • vwdNewsUrl: string
    • vwdQuotecastServiceUrl: string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_accountdatatype_.html ================================================ "types/AccountDataType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/AccountDataType"

Index

Type aliases

Type aliases

AccountDataType

AccountDataType: { data: { address: { city: string; country: string; streetAddress: string; streetAddressNumber: string; zip: string }; bankAccount: { bankAccountId: number; bic: string; iban: string; status: string }; canUpgrade: boolean; cellphoneNumber: string; clientRole: string; contractType: string; culture: string; displayName: string; effectiveClientRole: string; email: string; firstContact: { countryOfBirth: string; dateOfBirth: string; displayName: string; firstName: string; gender: string; lastName: string; nationality: string; placeOfBirth: string }; id: number; intAccount: number; isAllocationAvailable: boolean; isAmClientActive: boolean; isCollectivePortfolio: boolean; isIskClient: boolean; isWithdrawalAvailable: boolean; language: string; locale: string; memberCode: string; username: string } }

Type declaration

  • data: { address: { city: string; country: string; streetAddress: string; streetAddressNumber: string; zip: string }; bankAccount: { bankAccountId: number; bic: string; iban: string; status: string }; canUpgrade: boolean; cellphoneNumber: string; clientRole: string; contractType: string; culture: string; displayName: string; effectiveClientRole: string; email: string; firstContact: { countryOfBirth: string; dateOfBirth: string; displayName: string; firstName: string; gender: string; lastName: string; nationality: string; placeOfBirth: string }; id: number; intAccount: number; isAllocationAvailable: boolean; isAmClientActive: boolean; isCollectivePortfolio: boolean; isIskClient: boolean; isWithdrawalAvailable: boolean; language: string; locale: string; memberCode: string; username: string }
    • address: { city: string; country: string; streetAddress: string; streetAddressNumber: string; zip: string }
      • city: string
      • country: string
      • streetAddress: string
      • streetAddressNumber: string
      • zip: string
    • bankAccount: { bankAccountId: number; bic: string; iban: string; status: string }
      • bankAccountId: number
      • bic: string
      • iban: string
      • status: string
    • canUpgrade: boolean
    • cellphoneNumber: string
    • clientRole: string
    • contractType: string
    • culture: string
    • displayName: string
    • effectiveClientRole: string
    • email: string
    • firstContact: { countryOfBirth: string; dateOfBirth: string; displayName: string; firstName: string; gender: string; lastName: string; nationality: string; placeOfBirth: string }
      • countryOfBirth: string
      • dateOfBirth: string
      • displayName: string
      • firstName: string
      • gender: string
      • lastName: string
      • nationality: string
      • placeOfBirth: string
    • id: number
    • intAccount: number
    • isAllocationAvailable: boolean
    • isAmClientActive: boolean
    • isCollectivePortfolio: boolean
    • isIskClient: boolean
    • isWithdrawalAvailable: boolean
    • language: string
    • locale: string
    • memberCode: string
    • username: string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_accountinfotype_.html ================================================ "types/AccountInfoType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/AccountInfoType"

Index

Type aliases

AccountInfoCashFunds

AccountInfoCashFunds: {}

Type declaration

AccountInfoCurrencyPairs

AccountInfoCurrencyPairs: {}

Type declaration

  • [key: string]: { id: number; price: string }
    • id: number
    • price: string

AccountInfoType

AccountInfoType: { baseCurrency: string; cashFunds: AccountInfoCashFunds; clientId: number; compensationCapping: number; currencyPairs: AccountInfoCurrencyPairs; marginType: string }

Type declaration

CashFund

CashFund: { id: number; name: string; productIds: number[] }

Type declaration

  • id: number
  • name: string
  • productIds: number[]

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_accountreportstype_.html ================================================ "types/AccountReportsType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/AccountReportsType"

Index

Type aliases

AccountReportsType

AccountReportsType: ReportType[]

ReportType

ReportType: { description: string; id: number; stampCreated: string; type: string; uri: string }

Type declaration

  • description: string
  • id: number
  • stampCreated: string
  • type: string
  • uri: string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_cashfoundtype_.html ================================================ "types/CashFoundType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/CashFoundType"

Index

Type aliases

Type aliases

CashFoundType

CashFoundType: { currencyCode: string; handling: string; id: string; value: number }

Type declaration

  • currencyCode: string
  • handling: string
  • id: string
  • value: number

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_configdictionarytype_.html ================================================ "types/ConfigDictionaryType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/ConfigDictionaryType"

Index

Type aliases

AggregateListItem

AggregateListItem: { id: string; name: string }

Type declaration

  • id: string
  • name: string

BondExchange

BondExchange: { country: number; exchange: number; id: number; postfix?: undefined | string }

Type declaration

  • country: number
  • exchange: number
  • id: number
  • Optional postfix?: undefined | string

BondIssuerType

BondIssuerType: { id: number; name: string; translation: string }

Type declaration

  • id: number
  • name: string
  • translation: string

CFDExchange

CFDExchange: { country: number; exchange: number; id: number }

Type declaration

  • country: number
  • exchange: number
  • id: number

CombinationExchange

CombinationExchange: { id: number; name: string }

Type declaration

  • id: number
  • name: string

ConfigDictionaryType

ConfigDictionaryType: { bondExchanges: BondExchange[]; bondIssuerTypes: BondIssuerType[]; bondSortColumns: SortListItem[]; cfdExchanges: CFDExchange[]; cfdSortColumns: SortListItem[]; combinationExchanges: CombinationExchange[]; countries: Country[]; etfAggregateTypes: AggregateListItem[]; etfFeeTypes: FeeType[]; etfSortColumns: SortListItem[]; eurexCountries: EurexCountry[]; exchanges: Exchange[]; futureExchanges: FutureExchange[]; futureSortColumns: SortListItem[]; indices: Index[]; investmentFundAggregateTypes: AggregateListItem[]; investmentFundFeeTypes: FeeType[]; investmentFundSortColumns: SortListItem[]; leveragedAggregateTypes: AggregateListItem[]; leveragedSortColumns: SortListItem[]; lookupSortColumns: SortListItem[]; optionAggregateTypes: AggregateListItem[]; optionExchanges: OptionExchange[]; optionSortColumns: SortListItem[]; productTypes: ProductTypes[]; regions: Region[]; stockCountries: StockCountry[]; stockSortColumns: SortListItem[]; warrantAggregateTypes: AggregateListItem[]; warrantSortColumns: SortListItem[] }

Type declaration

Country

Country: { id: number; name: string; region: number; translation: string }

Type declaration

  • id: number
  • name: string
  • region: number
  • translation: string

EurexCountry

EurexCountry: { exchanges: Exchange[]; id: number; name: string; underlyingExchangeIds: number[] }

Type declaration

  • exchanges: Exchange[]
  • id: number
  • name: string
  • underlyingExchangeIds: number[]

Exchange

Exchange: { city?: undefined | string; code?: undefined | string; country: string; hiqAbbr: string; id: number; micCode?: undefined | string; name: string }

Type declaration

  • Optional city?: undefined | string
  • Optional code?: undefined | string
  • country: string
  • hiqAbbr: string
  • id: number
  • Optional micCode?: undefined | string
  • name: string

FeeType

FeeType: { id: number; name: string; translation: string }

Type declaration

  • id: number
  • name: string
  • translation: string

FutureExchange

FutureExchange: { eurexCountries?: number[]; id: number; name: string }

Type declaration

  • Optional eurexCountries?: number[]
  • id: number
  • name: string

Index

Index: { id: number; name: string; productId?: undefined | number }

Type declaration

  • id: number
  • name: string
  • Optional productId?: undefined | number

OptionExchange

OptionExchange: { eurexCountries?: number[]; exchangeId: number; id: number; name: string; underlyingExchangeIds?: number[] }

Type declaration

  • Optional eurexCountries?: number[]
  • exchangeId: number
  • id: number
  • name: string
  • Optional underlyingExchangeIds?: number[]

ProductTypes

ProductTypes: { briefTranslation: string; contractType: string; id: number; name: string; translation: string }

Type declaration

  • briefTranslation: string
  • contractType: string
  • id: number
  • name: string
  • translation: string

Region

Region: { id: number; name: string; translation: string }

Type declaration

  • id: number
  • name: string
  • translation: string

SortListItem

SortListItem: { id: string }

Type declaration

  • id: string

StockCountry

StockCountry: { country: number; exchanges?: number[]; id: number; indices?: number[] }

Type declaration

  • country: number
  • Optional exchanges?: number[]
  • id: number
  • Optional indices?: number[]

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_createorderresulttype_.html ================================================ "types/CreateOrderResultType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/CreateOrderResultType"

Index

Type aliases

Type aliases

CreateOrderResultType

CreateOrderResultType: { confirmationId: String; freeSpaceNew: Number; transactionFees: [TransactionFeeType] }

Type declaration

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_degirosettuptype_.html ================================================ "types/DeGiroSettupType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/DeGiroSettupType"

Index

Type aliases

Type aliases

DeGiroSettupType

DeGiroSettupType: { jsessionId?: undefined | string; pwd?: undefined | string; username?: undefined | string }

Type declaration

  • Optional jsessionId?: undefined | string
  • Optional pwd?: undefined | string
  • Optional username?: undefined | string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_favouriteproducttype_.html ================================================ "types/FavouriteProductType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/FavouriteProductType"

Index

Type aliases

Type aliases

FavouriteProductType

FavouriteProductType: {}

Type declaration

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_getaccountstateoptionstype_.html ================================================ "types/GetAccountStateOptionsType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/GetAccountStateOptionsType"

Index

Type aliases

GetAccountStateOptionsType

GetAccountStateOptionsType: { from: string; to: string }

Type declaration

  • from: string
  • to: string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_gethistoricalordersoptionstype_.html ================================================ "types/GetHistoricalOrdersOptionsType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/GetHistoricalOrdersOptionsType"

Index

Type aliases

GetHistoricalOrdersOptionsType

GetHistoricalOrdersOptionsType: {}

Type declaration

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_getnewsoptionstype_.html ================================================ "types/GetNewsOptionsType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/GetNewsOptionsType"

Index

Type aliases

Type aliases

GetNewsOptionsType

GetNewsOptionsType: { languages?: undefined | string; latest?: undefined | false | true; latestLimit?: undefined | number; latestOffset?: undefined | number; top?: undefined | false | true }

Type declaration

  • Optional languages?: undefined | string
  • Optional latest?: undefined | false | true
  • Optional latestLimit?: undefined | number
  • Optional latestOffset?: undefined | number
  • Optional top?: undefined | false | true

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_getordersconfigtype_.html ================================================ "types/GetOrdersConfigType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/GetOrdersConfigType"

Index

Type aliases

Type aliases

GetOrdersConfigType

GetOrdersConfigType: { active?: undefined | false | true; lastTransactions?: undefined | false | true }

Type declaration

  • Optional active?: undefined | false | true
  • Optional lastTransactions?: undefined | false | true

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_getordersresulttype_.html ================================================ "types/GetOrdersResultType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/GetOrdersResultType"

Index

Type aliases

Type aliases

GetOrdersResultType

GetOrdersResultType: { lastTransactions: []; orders: [] }

Type declaration

  • lastTransactions: []
  • orders: []

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_getporfolioconfigtype_.html ================================================ "types/GetPorfolioConfigType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/GetPorfolioConfigType"

Index

Type aliases

Type aliases

GetPorfolioConfigType

GetPorfolioConfigType: { getProductDetails?: undefined | false | true; type: PORTFOLIO_POSITIONS_TYPE_ENUM }

Type declaration

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_historicalorderstype_.html ================================================ "types/HistoricalOrdersType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/HistoricalOrdersType"

Index

Type aliases

Type aliases

HistoricalOrdersType

HistoricalOrdersType: {}

Type declaration

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_i18nmessagestype_.html ================================================ "types/i18nMessagesType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/i18nMessagesType"

Index

Type aliases

Type aliases

i18nMessagesType

i18nMessagesType: {}

Type declaration

  • [key: string]: string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_index_.html ================================================ "types/index" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/index"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_isloginoptionstype_.html ================================================ "types/IsLoginOptionsType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/IsLoginOptionsType"

Index

Type aliases

Type aliases

IsLoginOptionsType

IsLoginOptionsType: { secure?: undefined | false | true }

Type declaration

  • Optional secure?: undefined | false | true

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_loginrequestbodytype_.html ================================================ "types/LoginRequestBodyType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/LoginRequestBodyType"

Index

Type aliases

Type aliases

LoginRequestBodyType

LoginRequestBodyType: { isPassCodeReset: boolean; isRedirectToMobile: boolean; password: string; queryParams: { reason: string }; username: string }

Type declaration

  • isPassCodeReset: boolean
  • isRedirectToMobile: boolean
  • password: string
  • queryParams: { reason: string }
    • reason: string
  • username: string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_loginrequestparamstype_.html ================================================ "types/LoginRequestParamsType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/LoginRequestParamsType"

Index

Type aliases

Type aliases

LoginRequestParamsType

LoginRequestParamsType: { pwd: string; username: string }

Type declaration

  • pwd: string
  • username: string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_loginresponsetype_.html ================================================ "types/LoginResponseType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/LoginResponseType"

Index

Type aliases

Type aliases

LoginResponseType

LoginResponseType: { isPassCodeEnabled?: undefined | false | true; locale?: undefined | string; redirectUrl?: undefined | string; sessionId?: undefined | string; status: number; statusText: string }

Type declaration

  • Optional isPassCodeEnabled?: undefined | false | true
  • Optional locale?: undefined | string
  • Optional redirectUrl?: undefined | string
  • Optional sessionId?: undefined | string
  • status: number
  • statusText: string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_newstype_.html ================================================ "types/NewsType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/NewsType"

Index

Type aliases

Type aliases

New

New: { brief: string; category: string; content: string; date: string; htmlContent: boolean; id: string; isins: string[]; language: string; pictureUrl: string; source: string; title: string }

Type declaration

  • brief: string
  • category: string
  • content: string
  • date: string
  • htmlContent: boolean
  • id: string
  • isins: string[]
  • language: string
  • pictureUrl: string
  • source: string
  • title: string

NewsResponse

NewsResponse: { items: New[]; offset?: undefined | number; total?: undefined | number }

Type declaration

  • items: New[]
  • Optional offset?: undefined | number
  • Optional total?: undefined | number

NewsType

NewsType: { latest: NewsResponse; top: NewsResponse }

Type declaration

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_ordertype_.html ================================================ "types/OrderType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/OrderType"

Index

Type aliases

Type aliases

OrderType

OrderType: { buySell: DeGiroActions; orderType: DeGiroMarketOrderTypes; price?: Number; productId: string; size: number; stopPrice?: undefined | number; timeType: DeGiroTimeTypes }

Type declaration

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_portfoliopositiontype_.html ================================================ "types/PortfolioPositionType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/PortfolioPositionType"

Index

Type aliases

Type aliases

PortfolioPositionType

PortfolioPositionType: { foo?: undefined | string }

Type declaration

  • Optional foo?: undefined | string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_searchproductoptionstype_.html ================================================ "types/SearchProductOptionsType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/SearchProductOptionsType"

Index

Type aliases

SearchProductOptionsType

SearchProductOptionsType: { limit?: undefined | number; offset?: undefined | number; sortColumn?: undefined | string; sortType?: any; text: string; type?: DeGiroProducTypes | undefined }

Type declaration

  • Optional limit?: undefined | number
  • Optional offset?: undefined | number
  • Optional sortColumn?: undefined | string
  • Optional sortType?: any
  • text: string
  • Optional type?: DeGiroProducTypes | undefined

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_searchproductresulttype_.html ================================================ "types/SearchProductResultType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/SearchProductResultType"

Index

Type aliases

SearchProductResultType

SearchProductResultType: { buyOrderTypes: string[]; category: string; closePrice: number; closePriceDate: string; combinedOrderAllowed: boolean; contractSize: number; currency: string; exchangeId: string; feedQuality: string; feedQualitySecondary: string; gtcAllowed: boolean; id: string; isFund: boolean; isin: string; joinOrderAllowed: boolean; limitHitOrderAllowed: boolean; marketAllowed: boolean; name: string; orderBookDepth: number; orderBookDepthSecondary: number; orderTimeTypes: string[]; productType: string; productTypeId: number; qualitySwitchFree: boolean; qualitySwitchFreeSecondary: boolean; qualitySwitchable: boolean; qualitySwitchableSecondary: boolean; sellAmountAllowed: boolean; sellOrderTypes: string[]; stopLimitOrderAllowed: boolean; stoplossAllowed: boolean; symbol: string; tradable: boolean; trailingStopOrderAllowed: boolean; vwdId: string; vwdIdSecondary: string; vwdIdentifierType: string; vwdIdentifierTypeSecondary: string; vwdModuleId: number; vwdModuleIdSecondary: number }

Type declaration

  • buyOrderTypes: string[]
  • category: string
  • closePrice: number
  • closePriceDate: string
  • combinedOrderAllowed: boolean
  • contractSize: number
  • currency: string
  • exchangeId: string
  • feedQuality: string
  • feedQualitySecondary: string
  • gtcAllowed: boolean
  • id: string
  • isFund: boolean
  • isin: string
  • joinOrderAllowed: boolean
  • limitHitOrderAllowed: boolean
  • marketAllowed: boolean
  • name: string
  • orderBookDepth: number
  • orderBookDepthSecondary: number
  • orderTimeTypes: string[]
  • productType: string
  • productTypeId: number
  • qualitySwitchFree: boolean
  • qualitySwitchFreeSecondary: boolean
  • qualitySwitchable: boolean
  • qualitySwitchableSecondary: boolean
  • sellAmountAllowed: boolean
  • sellOrderTypes: string[]
  • stopLimitOrderAllowed: boolean
  • stoplossAllowed: boolean
  • symbol: string
  • tradable: boolean
  • trailingStopOrderAllowed: boolean
  • vwdId: string
  • vwdIdSecondary: string
  • vwdIdentifierType: string
  • vwdIdentifierTypeSecondary: string
  • vwdModuleId: number
  • vwdModuleIdSecondary: number

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_stocktype_.html ================================================ "types/StockType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/StockType"

Index

Type aliases

Type aliases

StockType

StockType: {}

Type declaration

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_transactionfeetype_.html ================================================ "types/TransactionFeeType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/TransactionFeeType"

Index

Type aliases

Type aliases

TransactionFeeType

TransactionFeeType: { amount: Number; currency: String; id: Number }

Type declaration

  • amount: Number
  • currency: String
  • id: Number

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_websettingstype_.html ================================================ "types/WebSettingsType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/WebSettingsType"

Index

Type aliases

MarketPageChartIndex

MarketPageChartIndex: { closePrice: number; country: string; id: number; name: string; vwdId: string }

Type declaration

  • closePrice: number
  • country: string
  • id: number
  • name: string
  • vwdId: string

MarketPageCurrency

MarketPageCurrency: { fromCountry: string; id: number; name: string; toCountry: string; vwdId: string }

Type declaration

  • fromCountry: string
  • id: number
  • name: string
  • toCountry: string
  • vwdId: string

MarketPageFuture

MarketPageFuture: { country: string; id: number; name: string; vwdId: string }

Type declaration

  • country: string
  • id: number
  • name: string
  • vwdId: string

MarketPageIndex

MarketPageIndex: { closePrice: number; country: string; id: number; name: string; vwdId: string }

Type declaration

  • closePrice: number
  • country: string
  • id: number
  • name: string
  • vwdId: string

WebSettingsType

WebSettingsType: { decimalDelimiter: string; defaultBondExchangeId: number; defaultBondIssuerType: number; defaultCfdExchangeId: number; defaultEtfExchangeId: number; defaultEtfFeeType: number; defaultEtfIssuerId: number; defaultEtfPopularOnly: boolean; defaultFundFeeType: number; defaultFundIssuerId: number; defaultFutureCountryId: number; defaultFutureExchangeId: number; defaultFutureUnderlyingIsin: string; defaultLeveragedExchangeId: number; defaultLeveragedIssuerId: number; defaultLeveragedPopularOnly: boolean; defaultLeveragedShortLong: number; defaultLeveragedUnderlyingId: number; defaultMarketMoversIndexId: number; defaultOptionCountryId: number; defaultOptionExchangeId: number; defaultOptionUnderlyingIsin: string; defaultStockCountryId: number; defaultStockListId: number; defaultStockListType: string; defaultWarrantIssuerName: string; defaultWarrantUnderlyingName: string; marketMoversIndexIds: number[]; marketPageChartIndex: MarketPageChartIndex; marketPageCurrencies: MarketPageCurrency[]; marketPageFutures: MarketPageFuture[]; marketPageIndices: MarketPageIndex[]; thousandDelimiter: string }

Type declaration

  • decimalDelimiter: string
  • defaultBondExchangeId: number
  • defaultBondIssuerType: number
  • defaultCfdExchangeId: number
  • defaultEtfExchangeId: number
  • defaultEtfFeeType: number
  • defaultEtfIssuerId: number
  • defaultEtfPopularOnly: boolean
  • defaultFundFeeType: number
  • defaultFundIssuerId: number
  • defaultFutureCountryId: number
  • defaultFutureExchangeId: number
  • defaultFutureUnderlyingIsin: string
  • defaultLeveragedExchangeId: number
  • defaultLeveragedIssuerId: number
  • defaultLeveragedPopularOnly: boolean
  • defaultLeveragedShortLong: number
  • defaultLeveragedUnderlyingId: number
  • defaultMarketMoversIndexId: number
  • defaultOptionCountryId: number
  • defaultOptionExchangeId: number
  • defaultOptionUnderlyingIsin: string
  • defaultStockCountryId: number
  • defaultStockListId: number
  • defaultStockListType: string
  • defaultWarrantIssuerName: string
  • defaultWarrantUnderlyingName: string
  • marketMoversIndexIds: number[]
  • marketPageChartIndex: MarketPageChartIndex
  • marketPageCurrencies: MarketPageCurrency[]
  • marketPageFutures: MarketPageFuture[]
  • marketPageIndices: MarketPageIndex[]
  • thousandDelimiter: string

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_types_webusersettingtype_.html ================================================ "types/WebUserSettingType" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/WebUserSettingType"

Index

Type aliases

Type aliases

WebUserSettingType

WebUserSettingType: { desktop: { accountSummaryPosition: string; hasClosedFeedbackPromotion: boolean; hasClosedInvitationPromotion: boolean; hasSeenProductTour: boolean; isAccountSummaryOpened: boolean }; mobile: { hasSeenProductTour: boolean } }

Type declaration

  • desktop: { accountSummaryPosition: string; hasClosedFeedbackPromotion: boolean; hasClosedInvitationPromotion: boolean; hasSeenProductTour: boolean; isAccountSummaryOpened: boolean }
    • accountSummaryPosition: string
    • hasClosedFeedbackPromotion: boolean
    • hasClosedInvitationPromotion: boolean
    • hasSeenProductTour: boolean
    • isAccountSummaryOpened: boolean
  • mobile: { hasSeenProductTour: boolean }
    • hasSeenProductTour: boolean

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_utils_debug_.html ================================================ "utils/debug" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/debug"

Index

Variables

Variables

Const DEBUG

DEBUG: boolean = !!process.env.DEGIRO_DEBUG

Const debug

debug: (Anonymous function) = DEBUG ? (...s: any) => console.log(...s) : () => {}

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_utils_generatereporturifromid_.html ================================================ "utils/generateReportURIFromID" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/generateReportURIFromID"

Index

Variables

BASE_REPORT_DOWNLOAD_URI

BASE_REPORT_DOWNLOAD_URI: BASE_REPORT_DOWNLOAD_URI

Functions

Const generateReportURIFromID

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_utils_index_.html ================================================ "utils/index" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/index"

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_utils_processgetcashfundsresultlistobject_.html ================================================ "utils/processGetCashFundsResultListObject" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/processGetCashFundsResultListObject"

Index

Type aliases

DataToParseObjectType

DataToParseObjectType: { isAdded: boolean; name: string; value: any }

Type declaration

  • isAdded: boolean
  • name: string
  • value: any

ObjectDataType

ObjectDataType: { value: [] }

Type declaration

  • value: []

Functions

Const processGetCashFundsResultListObject

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_utils_processgetordersresultlistobject_.html ================================================ "utils/processGetOrdersResultListObject" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/processGetOrdersResultListObject"

Index

Type aliases

DataToParseObjectType

DataToParseObjectType: { isAdded: boolean; name: string; value: any }

Type declaration

  • isAdded: boolean
  • name: string
  • value: any

ObjectDataType

ObjectDataType: { value: [] }

Type declaration

  • value: []

Functions

Const processGetOrdersResultListObject

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: docs/modules/_utils_processportfolio_.html ================================================ "utils/processPortfolio" | degiro-api
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/processPortfolio"

Index

Functions

Const filterPorfolio

processPortfolio

Const processPosition

  • processPosition(position: any): {}

Legend

  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc

================================================ FILE: examples/createOrder.ts ================================================ import DeGiro from '../src/main' import { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } from '../src/enums/DeGiroEnums' import { OrderType } from '../src/types' (async () => { const degiro: DeGiro = new DeGiro({ username: 'nachoogoomezomg', pwd: process.env.DEGIRO_PWD, }) await degiro.login() const order: OrderType = { buySell: DeGiroActions.BUY, orderType: DeGiroMarketOrderTypes.LIMITED, productId: '331868', // $AAPL - Apple Inc size: 1, timeType: DeGiroTimeTypes.DAY, price: 272, // limit price // stopPrice: 2, } const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order) console.log(JSON.stringify({ confirmationId, freeSpaceNew, transactionFees }, null, 2)) })() ================================================ FILE: examples/deleteOrder.ts ================================================ import DeGiro from '../src/main' import { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } from '../src/enums/DeGiroEnums' import { OrderType } from '../src/types' (async () => { const degiro: DeGiro = new DeGiro({ username: 'nachoogoomezomg', pwd: process.env.DEGIRO_PWD, }) await degiro.login() const order: OrderType = { buySell: DeGiroActions.BUY, orderType: DeGiroMarketOrderTypes.LIMITED, productId: '331868', // $AAPL - Apple Inc size: 1, timeType: DeGiroTimeTypes.DAY, price: 272, // limit price // stopPrice: 2, } const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order) const orderId = await degiro.executeOrder(order, confirmationId) console.log(`Order executed with id: ${orderId}`) // Wait few seconds to avoid "Rate limit for the given request exceeded" error const TIMEOUT_SECONDS = 2 * 1000 const deleteOrderFunction = async () => { try { await degiro.deleteOrder(orderId) console.log('Order removed') } catch (error) { console.error(error) } } setTimeout(deleteOrderFunction, TIMEOUT_SECONDS) })() ================================================ FILE: examples/executeOrder.ts ================================================ import DeGiro from '../src/main' import { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } from '../src/enums/DeGiroEnums' import { OrderType } from '../src/types' (async () => { try { const degiro: DeGiro = new DeGiro({ username: 'nachoogoomezomg', pwd: process.env.DEGIRO_PWD, }) await degiro.login() const order: OrderType = { buySell: DeGiroActions.BUY, orderType: DeGiroMarketOrderTypes.LIMITED, productId: '331868', // $AAPL - Apple Inc size: 1, timeType: DeGiroTimeTypes.DAY, price: 272, // limit price // stopPrice: 2, } const { confirmationId, freeSpaceNew, transactionFees } = await degiro.createOrder(order) const orderId = await degiro.executeOrder(order, confirmationId) console.log(`Order executed with id: ${orderId}`) } catch (error) { console.error(error) } })() ================================================ FILE: examples/getAccountConfig.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const accountConfig = await degiro.getAccountConfig() console.log(accountConfig) })() ================================================ FILE: examples/getAccountInfo.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const accountInfo = await degiro.getAccountInfo() console.log(accountInfo) })() ================================================ FILE: examples/getAccountReports.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const reports = await degiro.getAccountReports() console.log(reports) // Inside report object you can find `uri` property, but that URL is associated with the current session // As soon as you sign out, the URL will be no longer available // await degiro.logout() })() ================================================ FILE: examples/getAccountState.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const accountStateList = await degiro.getAccountState({ from: '10/06/2020', to: '19/06/2020' }) console.table(accountStateList) })() ================================================ FILE: examples/getCashFunds.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const cashFunds = await degiro.getCashFunds() console.log(JSON.stringify(cashFunds, null, 2)) await degiro.logout() })() ================================================ FILE: examples/getConfigDictionary.js ================================================ /** * Ignacio F. Castillejo Gómez * 19 Jun 2020 * * Este archivo es un poco especial, la idea es obtener un objecto con listas e iterar cada elemento del objeto * principal para imprimir una tabla. Para hacer este trabajo en TypeScript se necesita de una función genérica * que nos permita extraer listas usando un indice string: * * const oneList = configDictionary[myKeyIteration] // <-- Esto falla porque no se puede usar un string como indice * * Para poder resolver esto rápido, este archivo ha sido desarrollado en JavaScript. * * Si quieres cambiarlo a TypeScript y hacer un pull request será bienvenido :) */ const DeGiro = require('../dist/DeGiro').DeGiro const degiro = new DeGiro({}) degiro.login() .then(() => degiro.getConfigDictionary()) .then((configDictionary) => { const keys = Object.keys(configDictionary) for (const key in configDictionary) { const value = configDictionary[key] console.log(`\n\n${key}:\n`) console.table(value) } }) .catch(console.error) ================================================ FILE: examples/getMessages.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const messages = await degiro.getWebi18nMessages('en_EN') console.log(messages) })() ================================================ FILE: examples/getNews.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const news = await degiro.getNews({ languages: 'es', top: false, latest: true, latestOffset: 0, latestLimit: 1, }) console.log(JSON.stringify(news, null, 2)) await degiro.logout() })() ================================================ FILE: examples/getOrders.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const { orders, lastTransactions } = await degiro.getOrders({ active: true, lastTransactions: true }) console.log(`Fetched ${orders.length} orders and ${lastTransactions.length} last transactions\n`) console.log('Orders:') console.table(orders) console.log('\n\nLatest transactions:') console.table(lastTransactions) })() ================================================ FILE: examples/getPopularStocks.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const stocks = await degiro.getPopularStocks() console.log(JSON.stringify(stocks, null, 2)) await degiro.logout() })() ================================================ FILE: examples/getPortfolio.ts ================================================ import DeGiro from '../src/main' import { PORTFOLIO_POSITIONS_TYPE_ENUM } from '../src/enums/DeGiroEnums' (async () => { const degiro: DeGiro = new DeGiro({ username: 'nachoogoomezomg', pwd: process.env.DEGIRO_PWD, }) await degiro.login() const portfolio = await degiro.getPortfolio({ type: PORTFOLIO_POSITIONS_TYPE_ENUM.OPEN, getProductDetails: true }) console.log(JSON.stringify(portfolio, null, 2)) })() ================================================ FILE: examples/getWebSettings.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const webSettings = await degiro.getWebSettings() console.log(webSettings) })() ================================================ FILE: examples/getWebUserSettings.ts ================================================ import DeGiro from '../src/main' (async () => { const degiro: DeGiro = new DeGiro({}) await degiro.login() const webUserSettings = await degiro.getWebUserSettings() console.log(webUserSettings) })() ================================================ FILE: examples/login.ts ================================================ import DeGiro from '../src/main' const degiro: DeGiro = new DeGiro({ username: 'nachoogoomezomg', pwd: process.env.DEGIRO_PWD, }) degiro.login() .then(() => { console.log('Loggin success') }) .catch((error) => { throw new Error(error) }) ================================================ FILE: examples/searchProduct.ts ================================================ import DeGiro from '../src/main' import { DeGiroProducTypes } from '../src/enums/DeGiroEnums' (async () => { const degiro: DeGiro = new DeGiro({ username: 'nachoogoomezomg', pwd: process.env.DEGIRO_PWD, }) await degiro.login() const result = await degiro.searchProduct({ text: 'AAPL', // type: DeGiroProducTypes.shares, limit: 1, }) console.log(JSON.stringify(result, null, 2)) })() ================================================ FILE: examples/static-login.ts ================================================ import DeGiro from '../src/main' const degiro: DeGiro = DeGiro.create({ username: 'nachoogoomezomg', pwd: '**********', }) ================================================ FILE: package.json ================================================ { "name": "degiro-api", "version": "1.0.4", "public": true, "description": "Unofficial DeGiro API for Javascript. Buy and sell in the stock market. See your portfolio and much more", "main": "dist/main.js", "types": "dist/main.d.ts", "scripts": { "start": "node dist/main", "build": "rm -fr dist && tsc", "lint": "tslint -c tslint.json --project tsconfig.json", "lint-fix": "tslint -c tslint.json --project tsconfig.json --fix", "test": "mocha -r ts-node/register tests/**/*.spec.ts", "coverage": "nyc yarn test || exit 0; nyc report --reporter=text-lcov > coverage.lcov", "npm:publish": "yarn lint && yarn build && yarn publish", "push": "yarn lint && yarn build && git push", "doc": "typedoc --out docs src", "pre-commit": "yarn lint && yarn coverage && yarn build && yarn doc" }, "keywords": [ "degiro", "invesment", "stock", "api", "degiro-api", "stock-api", "broker-api" ], "author": "Ignacio F. Castillejo Gómez", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/icastillejogomez/degiro-api.git" }, "devDependencies": { "@types/async": "^3.2.3", "@types/chai": "^4.2.11", "@types/chai-as-promised": "^7.1.2", "@types/cookie": "^0.4.0", "@types/mocha": "^7.0.2", "@types/node": "^13.13.5", "@types/node-fetch": "^2.5.7", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "mocha": "^8.0.1", "nyc": "^15.1.0", "ts-node": "^8.10.2", "tslint": "^6.1.2", "tslint-config-airbnb": "^5.11.2", "typedoc": "^0.17.7", "typescript": "^3.8.3" }, "dependencies": { "async": "^3.2.0", "es6-promise": "^4.2.8", "isomorphic-fetch": "^2.2.1", "node-fetch": "^2.6.0" } } ================================================ FILE: src/DeGiro.ts ================================================ // Import modules import * as async from 'async' // Import interfaces import { DeGiroClassInterface } from './interfaces' // Import types import { DeGiroSettupType, LoginResponseType, AccountConfigType, AccountDataType, CashFoundType, SearchProductResultType, GetPorfolioConfigType, SearchProductOptionsType, OrderType, CreateOrderResultType, IsLoginOptionsType, GetOrdersConfigType, GetOrdersResultType, GetAccountStateOptionsType, AccountReportsType, AccountInfoType, GetHistoricalOrdersOptionsType, HistoricalOrdersType, FavouriteProductType, StockType, GetNewsOptionsType, NewsType, WebUserSettingType, ConfigDictionaryType, i18nMessagesType, WebSettingsType, GetPopularStocksConfigType, GetTransactionsOptionsType, TransactionType, } from './types' // Import requests import { loginRequest, getAccountConfigRequest, getAccountDataRequest, getPortfolioRequest, getProductsByIdsRequest, searchProductRequest, createOrderRequest, executeOrderRequest, deleteOrderRequest, logoutRequest, getOrdersRequest, getAccountStateRequest, getConfigDictionaryRequest, getAccountInfoRequest, getWebi18nMessagesRequest, getNewsRequest, getWebSettingsRequest, getWebUserSettingsRequest, getAccountReportsRequest, getCashFundstRequest, getPopularStocksRequest, getTransactionsRequest, } from './api' import { runInThisContext } from 'vm' /** * @class DeGiro * @description Main class of DeGiro Unofficial API. */ export class DeGiro implements DeGiroClassInterface { /* Properties */ private readonly username: string | undefined private readonly pwd: string | undefined private readonly oneTimePassword: string | undefined private jsessionId: string | undefined private accountConfig: AccountConfigType | undefined private accountData: AccountDataType | undefined /* Constructor and generator function */ constructor(params: DeGiroSettupType = {}) { let { username, pwd, oneTimePassword, jsessionId } = params username = username || process.env['DEGIRO_USER'] pwd = pwd || process.env['DEGIRO_PWD'] oneTimePassword = oneTimePassword || process.env['DEGIRO_OTP'] jsessionId = jsessionId || process.env['DEGIRO_JSESSIONID'] if (!username && !jsessionId) throw new Error('DeGiro api needs an username to access') if (!pwd && !jsessionId) throw new Error('DeGiro api needs an password to access') this.username = username this.pwd = pwd this.oneTimePassword = oneTimePassword this.jsessionId = jsessionId } static create(params: DeGiroSettupType): DeGiro { return new DeGiro(params) } /* Session methods */ login(): Promise { if (this.jsessionId) return this.loginWithJSESSIONID(this.jsessionId) return new Promise((resolve, reject) => { loginRequest({ username: this.username as string, pwd: this.pwd as string, oneTimePassword: this.oneTimePassword, }) .then((loginResponse: LoginResponseType) => { if (!loginResponse.sessionId) reject('Login response have not a sessionId field') else return this.getAccountConfig(loginResponse.sessionId) }) .then(() => this.getAccountData()) .then(resolve) .catch(reject) }) } logout(): Promise { return new Promise((resolve, reject) => { if (!this.accountData || !this.accountConfig) { return reject('You must log in first') } logoutRequest(this.accountData, this.accountConfig) .then(() => { delete this.accountData delete this.accountConfig resolve() }) .catch(reject) }) } isLogin(options?: IsLoginOptionsType): boolean | Promise { if (!options || !options.secure) return this.hasSessionId() && !!this.accountData return new Promise((resolve) => { this.getAccountConfig() .then(() => resolve(true)) .catch(() => resolve(false)) }) } private hasSessionId = (): boolean => !!this.accountConfig && !!this.accountConfig.data && !!this.accountConfig.data.sessionId private loginWithJSESSIONID(jsessionId: string): Promise { return new Promise((resolve, reject) => { this.getAccountConfig(jsessionId) .then(() => this.getAccountData()) .then((accountData) => { this.jsessionId = undefined // Remove the jsessionId to prevent reuse resolve(accountData) }) .catch(reject) }) } getJSESSIONID = () => this.hasSessionId() ? (this.accountConfig).data.sessionId : undefined /* Account methods */ getAccountConfig(sessionId?: string): Promise { return new Promise((resolve, reject) => { if (!sessionId && !this.hasSessionId()) { return reject('You must log in first or provide a JSESSIONID') } getAccountConfigRequest(sessionId || (this.accountConfig).data.sessionId) .then((accountConfig: AccountConfigType) => { this.accountConfig = accountConfig resolve(accountConfig) }) .catch(reject) }) } getAccountData(): Promise { return new Promise((resolve, reject) => { if (!this.hasSessionId()) { return reject('You must log in first') } getAccountDataRequest(this.accountConfig) .then((accountData: AccountDataType) => { this.accountData = accountData resolve(accountData) }) .catch(reject) }) } getAccountState(options: GetAccountStateOptionsType): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getAccountStateRequest(this.accountData, this.accountConfig, options) } getAccountReports(): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getAccountReportsRequest(this.accountData, this.accountConfig) } getAccountInfo(): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getAccountInfoRequest(this.accountData, this.accountConfig) } /* Search methods */ searchProduct(options: SearchProductOptionsType): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return searchProductRequest(options, this.accountData, this.accountConfig) } /* Cash Funds methods */ getCashFunds(): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getCashFundstRequest(this.accountData, this.accountConfig) } /* Porfolio methods */ getPortfolio(config: GetPorfolioConfigType): Promise { return new Promise((resolve, reject) => { if (!this.hasSessionId()) { return reject('You must log in first') } getPortfolioRequest(this.accountData, this.accountConfig, config) .then(portfolio => this.completePortfolioDetails(portfolio, config.getProductDetails || false)) .then(resolve) .catch(reject) }) } private completePortfolioDetails(portfolio: any[], getProductDetails: boolean): Promise { if (!getProductDetails) return Promise.resolve(portfolio) return new Promise((resolve, reject) => { async.map(portfolio, (position, next) => { if (position.positionType !== 'PRODUCT') return next(null, position) this.getProductsByIds([(position.id)]) .then((product) => { position.productData = product[position.id] next(null, position) }) .catch(error => next(error)) // tslint:disable-next-line: align }, (error, portfolio) => { if (error) return reject(error) resolve(portfolio) }) }) } /* Stocks methods */ getFavouriteProducts(): Promise { return new Promise((resolve, reject) => { reject('Method not implemented') }) } getPopularStocks(config: GetPopularStocksConfigType = {}): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getPopularStocksRequest(this.accountData, this.accountConfig, config) } /* Orders methods */ getOrders(config: GetOrdersConfigType): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getOrdersRequest(this.accountData, this.accountConfig, config) } getHistoricalOrders(options: GetHistoricalOrdersOptionsType): Promise { return new Promise((resolve, reject) => { reject('Method not implemented') }) } createOrder(order: OrderType): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return createOrderRequest(order, this.accountData, this.accountConfig) } executeOrder(order: OrderType, executeId: String): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return executeOrderRequest(order, executeId, this.accountData, this.accountConfig) } deleteOrder(orderId: String): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return deleteOrderRequest(orderId, this.accountData, this.accountConfig) } getTransactions(options: GetTransactionsOptionsType): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first'); } return getTransactionsRequest(this.accountData, this.accountConfig, options); } /* Miscellaneous methods */ getProductsByIds(ids: string[]): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getProductsByIdsRequest(ids, this.accountData, this.accountConfig) } getNews(options: GetNewsOptionsType): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getNewsRequest(options, this.accountData, this.accountConfig) } getWebi18nMessages(lang: string = 'es_ES'): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getWebi18nMessagesRequest(lang, this.accountData, this.accountConfig) } getWebSettings(): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getWebSettingsRequest(this.accountData, this.accountConfig) } getWebUserSettings(): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getWebUserSettingsRequest(this.accountData, this.accountConfig) } getConfigDictionary(): Promise { if (!this.hasSessionId()) { return Promise.reject('You must log in first') } return getConfigDictionaryRequest(this.accountData, this.accountConfig) } } ================================================ FILE: src/api/createOrderRequest.ts ================================================ // Import types import { OrderType, AccountDataType, AccountConfigType, CreateOrderResultType } from '../types' // Import Consts import { DEGIRO_API_PATHS } from '../enums' const { CREATE_ORDER_PATH } = DEGIRO_API_PATHS // Import debug console log import { debug } from '../utils' export function createOrderRequest(order: OrderType, accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { method: 'POST', headers: { 'Content-Type': 'application/json;charset=UTF-8', }, body: JSON.stringify(order), credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } const uri = `${accountConfig.data.tradingUrl}${CREATE_ORDER_PATH};jsessionid=${accountConfig.data.sessionId}?intAccount=${accountData.data.intAccount}&sessionId=${accountConfig.data.sessionId}` debug(uri, requestOptions) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { if (res.errors) return reject(res.errors) resolve(res.data) }) .catch(reject) }) } ================================================ FILE: src/api/deleteOrderRequest.ts ================================================ // Import types import { AccountDataType, AccountConfigType } from '../types' // Import debug console log import { debug } from '../utils' export function deleteOrderRequest(orderId: String, accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { method: 'DELETE', headers: { 'Content-Type': 'application/json;charset=UTF-8', }, body: '', credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // tslint:disable-next-line: max-line-length const uri = `https://trader.degiro.nl/trading/secure/v5/order/${orderId};jsessionid=${accountConfig.data.sessionId}?intAccount=${accountData.data.intAccount}&sessionId=${accountConfig.data.sessionId}` debug(uri, requestOptions) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { debug(res) if (res.errors) return reject(res.errors) resolve() }) .catch(reject) }) } ================================================ FILE: src/api/executeOrderRequest.ts ================================================ // Import types import { OrderType, AccountDataType, AccountConfigType, CreateOrderResultType } from '../types' // Import debug console log import { debug } from '../utils' export function executeOrderRequest(order: OrderType, executeId: String, accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { method: 'POST', headers: { 'Content-Type': 'application/json;charset=UTF-8', }, body: JSON.stringify(order), credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // tslint:disable-next-line: max-line-length const uri = `https://trader.degiro.nl/trading/secure/v5/order/${executeId};jsessionid=${accountConfig.data.sessionId}?intAccount=${accountData.data.intAccount}&sessionId=${accountConfig.data.sessionId}` debug(uri, requestOptions) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { if (res.errors) return reject(res.errors) resolve(res.data.orderId) }) .catch(reject) }) } ================================================ FILE: src/api/getAccountConfig.ts ================================================ // Import types import { AccountConfigType } from '../types' // Import enums import { DEGIRO_API_PATHS } from '../enums' const { BASE_API_URL, GET_ACCOUNT_CONFIG_PATH } = DEGIRO_API_PATHS // Import debug console log import { debug } from '../utils' export function getAccountConfigRequest(sessionId: string): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data debug(`Making request to ${BASE_API_URL}${GET_ACCOUNT_CONFIG_PATH} with JSESSIONID: ${sessionId}`) fetch(BASE_API_URL + GET_ACCOUNT_CONFIG_PATH, requestOptions) .then((res) => { if (!res.ok) { reject(res.statusText) } return res.json() }) .then((res: AccountConfigType) => { debug('Response:\n', JSON.stringify(res, null, 2)) resolve(res) }) .catch(reject) }) } ================================================ FILE: src/api/getAccountData.ts ================================================ // Import types import { AccountDataType, AccountConfigType } from '../types' // Import debug console log import { debug } from '../utils' export function getAccountDataRequest(accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data debug(`Making request to ${accountConfig.data.paUrl}client?sessionId=${accountConfig.data.sessionId}`) fetch(`${accountConfig.data.paUrl}client?sessionId=${accountConfig.data.sessionId}`, requestOptions) .then(res => res.json()) .then((res: AccountDataType) => { debug('Response:\n', JSON.stringify(res, null, 2)) resolve(res) }) .catch(reject) }) } ================================================ FILE: src/api/getAccountInfoRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, AccountInfoType } from '../types' // Import debug console log import { debug } from '../utils' // Importamos constantes import { DEGIRO_API_PATHS } from '../enums' const { GET_ACCOUNT_INFO_PATH } = DEGIRO_API_PATHS export function getAccountInfoRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data const uri = `${accountConfig.data.tradingUrl}${GET_ACCOUNT_INFO_PATH}${accountData.data.intAccount};jsessionid=${accountConfig.data.sessionId}` debug(`Making request to ${uri}`) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { debug('Response:\n', JSON.stringify(res, null, 2)) const data: AccountInfoType = res.data resolve(data) }) .catch(reject) }) } ================================================ FILE: src/api/getAccountReportsRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, AccountReportsType } from '../types' // Import debug console log import { debug } from '../utils' // Import utils functions import { generateReportURIFromID } from '../utils/generateReportURIFromID' // Importamos constantes import { DEGIRO_API_PATHS } from '../enums' const { GET_ACCOUNT_REPORTS_PATH } = DEGIRO_API_PATHS export function getAccountReportsRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data const uri = `${accountConfig.data.paUrl}${GET_ACCOUNT_REPORTS_PATH}?intAccount=${accountData.data.intAccount}&sessionId=${accountConfig.data.sessionId}` debug(`Making request to ${uri}`) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { debug('Response:\n', JSON.stringify(res, null, 2)) let data: AccountReportsType = res.data // Añadimos la URL de descarga del archivo para que sea más facil en cliente data = data.map(report => ({ ...report, uri: generateReportURIFromID(report.id, accountData, accountConfig), })) resolve(data) }) .catch(reject) }) } ================================================ FILE: src/api/getAccountStateRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, GetAccountStateOptionsType } from '../types' // Import debug console log import { debug } from '../utils' import { DEGIRO_API_PATHS } from '../enums/DeGiroEnums' const { GET_ACCOUNT_STATE_PATH } = DEGIRO_API_PATHS // tslint:disable-next-line: max-line-length export function getAccountStateRequest(accountData: AccountDataType, accountConfig: AccountConfigType, config: GetAccountStateOptionsType): Promise { return new Promise((resolve, reject) => { // Create params to get orders by types const { from, to } = config let params = '' params += `fromDate=${encodeURIComponent(from)}&` params += `toDate=${encodeURIComponent(to)}&` params += `intAccount=${accountData.data.intAccount}&` params += `sessionId=${accountConfig.data.sessionId}` const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data const uri = `${accountConfig.data.reportingUrl}${GET_ACCOUNT_STATE_PATH}?${params}` debug(`Making request to ${uri}`) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { if (!res.data || !res.data.cashMovements || !Array.isArray(res.data.cashMovements)) return reject('DeGiro response does not match with know scheme') resolve(res.data.cashMovements) }) .catch(reject) }) } ================================================ FILE: src/api/getCashFundstRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, CashFoundType } from '../types' // Import debug console log import { debug, processGetCashFundsResultListObject } from '../utils' import { DEGIRO_API_PATHS } from '../enums/DeGiroEnums' const { GET_GENERIC_DATA_PATH } = DEGIRO_API_PATHS // tslint:disable-next-line: max-line-length export function getCashFundstRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { let params = '' params += 'cashFunds=0&' params += 'limit=100' const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data const uri = `${accountConfig.data.tradingUrl}${GET_GENERIC_DATA_PATH}${accountData.data.intAccount};jsessionid=${accountConfig.data.sessionId}?${params}` debug(`Making request to ${uri}`) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { if (!res.cashFunds || !res.cashFunds.value || !Array.isArray(res.cashFunds.value)) { return reject('Invalid response format') } const data = res.cashFunds.value debug('Response:\n', JSON.stringify(res, null, 2)) resolve(data.map(processGetCashFundsResultListObject)) }) .catch(reject) }) } ================================================ FILE: src/api/getConfigDictionaryRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, ConfigDictionaryType } from '../types' // Import debug console log import { debug } from '../utils' export function getConfigDictionaryRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data const uri = `${accountConfig.data.dictionaryUrl}?intAccount=${accountData.data.intAccount}&sessionId=${accountConfig.data.sessionId}` debug(`Making request to ${uri}`) fetch(uri, requestOptions) .then(res => res.json()) .then((res: ConfigDictionaryType) => { debug('Response:\n', JSON.stringify(res, null, 2)) resolve(res) }) .catch(reject) }) } ================================================ FILE: src/api/getNewsRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, i18nMessagesType, GetNewsOptionsType, NewsType } from '../types' // Import debug console log import { debug } from '../utils' // Import paths import { DEGIRO_API_PATHS } from '../enums' const { GET_LATESTS_NEWS_PATH, GET_TOP_NEWS_PATH } = DEGIRO_API_PATHS export function getNewsRequest(options: GetNewsOptionsType, accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise(async (resolve, reject) => { // Generate params const { latest, top, latestOffset = 0, latestLimit = 20, languages = 'es' } = options let params = '' params += `offset=${latestOffset}&` params += `limit=${latestLimit}&` params += `languages=${languages}&` params += `intAccount=${accountData.data.intAccount}&` params += `sessionId=${accountConfig.data.sessionId}` // Generate Request options const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Generate de request URIs const latestNewsURI = `${accountConfig.data.companiesServiceUrl}${GET_LATESTS_NEWS_PATH}?${params}` const topNewsURI = `${accountConfig.data.companiesServiceUrl}${GET_TOP_NEWS_PATH}?${params}` // Create de default value const result: NewsType = { latest: { items: [], }, top: { items: [], }, } // Fetch the requested news try { // Check if latest requested if (latest) { const latestFetch = await fetch(latestNewsURI, requestOptions) const { data } = await latestFetch.json() result.latest = data } // Check if top requested if (top) { const latestFetch = await fetch(topNewsURI, requestOptions) const { data } = await latestFetch.json() result.top = data } } catch (error) { return reject(error) } // Return te result resolve(result) }) } ================================================ FILE: src/api/getOrdersRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, GetOrdersConfigType, GetOrdersResultType } from '../types' // Import debug console log import { debug } from '../utils' import { GET_ORDERS_TYPES } from '../enums/DeGiroEnums' import { processGetOrdersResultListObject } from '../utils/' // tslint:disable-next-line: max-line-length export function getOrdersRequest(accountData: AccountDataType, accountConfig: AccountConfigType, config: GetOrdersConfigType): Promise { return new Promise((resolve, reject) => { // Create params to get orders by types const { active, lastTransactions } = config let params = '' if (active) params += `${GET_ORDERS_TYPES.ACTIVE}=0&` if (lastTransactions) params += `${GET_ORDERS_TYPES.TRANSACTIONS}=0&` const requestOptions: { method?: string, body?: string, headers?: any, credentials: 'include', referer: string, } = { credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data const uri = `${accountConfig.data.tradingUrl}v5/update/${accountData.data.intAccount};jsessionid=${accountConfig.data.sessionId}?${params}` debug(`Making request to ${uri}`) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { const result: GetOrdersResultType = { orders: res.orders ? res.orders.value.map(processGetOrdersResultListObject) : [], lastTransactions: res.transactions ? res.transactions.value.map(processGetOrdersResultListObject) : [], } resolve(result) }) .catch(reject) }) } ================================================ FILE: src/api/getPopularStocksRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, StockType, GetPopularStocksConfigType } from '../types' // Import debug console log import { debug } from '../utils' // Importamos constantes import { DEGIRO_API_PATHS } from '../enums' const { STOCKS_SEARCH_PATH } = DEGIRO_API_PATHS // tslint:disable-next-line: max-line-length export function getPopularStocksRequest(accountData: AccountDataType, accountConfig: AccountConfigType, config: GetPopularStocksConfigType): Promise { return new Promise((resolve, reject) => { // Create fetch request options const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Create params to reach popular stocks const { popularOnly = true, requireTotal = false, limit = 9, offset = 0 } = config let params = '' params += `popularOnly=${popularOnly}&` params += `requireTotal=${requireTotal}&` params += `offset=${offset}&` params += `limit=${limit}&` params += `intAccount=${accountData.data.intAccount}&` params += `sessionId=${accountConfig.data.sessionId}` // Do the request to get a account config data const url = `${accountConfig.data.productSearchUrl}${STOCKS_SEARCH_PATH}?${params}` debug(`Making request to ${url} with params: \n${requestOptions}`) fetch(url, requestOptions) .then(res => res.json()) .then((res) => { resolve(res.products) }) .catch(reject) }) } ================================================ FILE: src/api/getPortfolioRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, GetPorfolioConfigType } from '../types' // Import debug console log import { debug, processPortfolio } from '../utils' // tslint:disable-next-line: max-line-length export function getPortfolioRequest(accountData: AccountDataType, accountConfig: AccountConfigType, config: GetPorfolioConfigType): Promise { return new Promise((resolve, reject) => { // Create params to reach portfolio const params = '&portfolio=0' // Do the request to get a account config data debug(`Making request to ${accountConfig.data.tradingUrl}v5/update/${accountData.data.intAccount};jsessionid=${accountConfig.data.sessionId}?${params}}`) fetch(`${accountConfig.data.tradingUrl}v5/update/${accountData.data.intAccount};jsessionid=${accountConfig.data.sessionId}?${params}`) .then(res => res.json()) .then((res) => { const portfolio: any[] = res.portfolio.value const positions = processPortfolio(portfolio, config) resolve(positions) }) .catch(reject) }) } ================================================ FILE: src/api/getProductsByIdsRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType } from '../types' // Import debug console log import { debug } from '../utils' // tslint:disable-next-line: max-line-length export function getProductsByIdsRequest(ids: string[], accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { method: 'POST', body: JSON.stringify(ids.map(id => id.toString())), headers: { 'Content-Type': 'application/json', }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } fetch(`${accountConfig.data.productSearchUrl}v5/products/info?intAccount=${accountData.data.intAccount}&sessionId=${accountConfig.data.sessionId}`, requestOptions) .then(res => res.json()) .then(res => resolve(res.data)) .catch(reject) }) } ================================================ FILE: src/api/getTransactionsRequest.ts ================================================ import { DEGIRO_API_PATHS } from '../enums'; import { AccountConfigType, AccountDataType, GetTransactionsOptionsType, TransactionType } from '../types' import { debug } from '../utils'; const { GET_TRANSACTIONS_PATH } = DEGIRO_API_PATHS; export function getTransactionsRequest(accountData: AccountDataType, accountConfig: AccountConfigType, config: GetTransactionsOptionsType): Promise { return new Promise((resolve, reject) => { // Create params to get orders by types let params = '' params += `fromDate=${encodeURIComponent(config.fromDate)}&` params += `toDate=${encodeURIComponent(config.toDate)}&` params += `groupTransactionsByOrder` params += `intAccount=${accountData.data.intAccount}&` params += `sessionId=${accountConfig.data.sessionId}` const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data const uri = `${accountConfig.data.reportingUrl}${GET_TRANSACTIONS_PATH}?${params}` debug(`Making request to ${uri}`) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { resolve(res.data); }) .catch(reject) }) } ================================================ FILE: src/api/getWebSettingsRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, WebSettingsType } from '../types' // Import debug console log import { debug } from '../utils' // Importamos constantes import { DEGIRO_API_PATHS } from '../enums' const { GET_WEB_SETTINGS_PATH } = DEGIRO_API_PATHS export function getWebSettingsRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data const uri = `${accountConfig.data.paUrl}${GET_WEB_SETTINGS_PATH}?intAccount=${accountData.data.intAccount}&sessionId=${accountConfig.data.sessionId}` debug(`Making request to ${uri}`) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { debug('Response:\n', JSON.stringify(res, null, 2)) const data: WebSettingsType = res.data resolve(data) }) .catch(reject) }) } ================================================ FILE: src/api/getWebUserSettingsRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, WebUserSettingType } from '../types' // Import debug console log import { debug } from '../utils' // Importamos constantes import { DEGIRO_API_PATHS } from '../enums' const { GET_WEB_USER_SETTINGS_PATH } = DEGIRO_API_PATHS export function getWebUserSettingsRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data const uri = `${accountConfig.data.paUrl}${GET_WEB_USER_SETTINGS_PATH}?intAccount=${accountData.data.intAccount}&sessionId=${accountConfig.data.sessionId}` debug(`Making request to ${uri}`) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { debug('Response:\n', JSON.stringify(res, null, 2)) const data: WebUserSettingType = res.data resolve(data) }) .catch(reject) }) } ================================================ FILE: src/api/getWebi18nMessagesRequest.ts ================================================ // Import types import { AccountConfigType, AccountDataType, i18nMessagesType } from '../types' // Import debug console log import { debug } from '../utils' export function getWebi18nMessagesRequest(lang: string, accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { headers: { Cookie: `JSESSIONID=${accountConfig.data.sessionId};`, }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a account config data const uri = `${accountConfig.data.i18nUrl}messages_${lang}` debug(`Making request to ${uri}`) fetch(uri, requestOptions) .then(res => res.json()) .then((res) => { debug('Response:\n', JSON.stringify(res, null, 2)) const data: i18nMessagesType = res.data resolve(data) }) .catch(reject) }) } ================================================ FILE: src/api/index.ts ================================================ import { loginRequest } from './login' import { logoutRequest } from './logout' import { getAccountConfigRequest } from './getAccountConfig' import { getAccountDataRequest } from './getAccountData' import { getPortfolioRequest } from './getPortfolioRequest' import { getProductsByIdsRequest } from './getProductsByIdsRequest' import { searchProductRequest } from './searchProductRequest' import { createOrderRequest } from './createOrderRequest' import { getOrdersRequest } from './getOrdersRequest' import { executeOrderRequest } from './executeOrderRequest' import { deleteOrderRequest } from './deleteOrderRequest' import { getAccountStateRequest } from './getAccountStateRequest' import { getConfigDictionaryRequest } from './getConfigDictionaryRequest' import { getAccountInfoRequest } from './getAccountInfoRequest' import { getWebi18nMessagesRequest } from './getWebi18nMessagesRequest' import { getNewsRequest } from './getNewsRequest' import { getWebSettingsRequest } from './getWebSettingsRequest' import { getWebUserSettingsRequest } from './getWebUserSettingsRequest' import { getAccountReportsRequest } from './getAccountReportsRequest' import { getCashFundstRequest } from './getCashFundstRequest' import { getPopularStocksRequest } from './getPopularStocksRequest' import { getTransactionsRequest } from './getTransactionsRequest' export { loginRequest, logoutRequest, getAccountConfigRequest, getAccountDataRequest, getPortfolioRequest, getProductsByIdsRequest, searchProductRequest, createOrderRequest, executeOrderRequest, deleteOrderRequest, getOrdersRequest, getAccountStateRequest, getConfigDictionaryRequest, getAccountInfoRequest, getWebi18nMessagesRequest, getNewsRequest, getWebSettingsRequest, getWebUserSettingsRequest, getAccountReportsRequest, getCashFundstRequest, getPopularStocksRequest, getTransactionsRequest, } ================================================ FILE: src/api/login.ts ================================================ // Import types import { LoginRequestParamsType, LoginRequestBodyType, LoginResponseType } from '../types' // Import enums import { DEGIRO_API_PATHS } from '../enums' const { BASE_API_URL, LOGIN_URL_PATH } = DEGIRO_API_PATHS // Import debug console log import { debug } from '../utils' export function loginRequest(params: LoginRequestParamsType): Promise { return new Promise((resolve, reject) => { // Make the payload const payload: LoginRequestBodyType = { isPassCodeReset: false, isRedirectToMobile: false, password: params.pwd, username: params.username.toLowerCase().trim(), oneTimePassword: params.oneTimePassword, queryParams: { reason: 'session_expired', }, } const requestOptions: { method?: string, body?: string, headers: { [key: string]: string, }, credentials: 'include', referer: string, } = { method: 'POST', body: JSON.stringify(payload), headers: { 'Content-Type': 'application/json', }, credentials: 'include', referer: 'https://trader.degiro.nl/trader/', } // Do the request to get a session debug(`Making request to ${BASE_API_URL}${LOGIN_URL_PATH} with options:`) debug(JSON.stringify(requestOptions, null, 2)) fetch(`${BASE_API_URL}${LOGIN_URL_PATH}`, requestOptions) .then((res) => { if (!payload.oneTimePassword) return res debug('Sending OTP') return fetch(`${BASE_API_URL}${LOGIN_URL_PATH}/totp`, requestOptions); }) .then(res => res.json()) .then((res) => { if (!res.sessionId) return reject(res.statusText) debug('Login response: ', JSON.stringify(res, null, 2)) resolve(res) }) .catch(reject); }) } ================================================ FILE: src/api/logout.ts ================================================ // Import types import { AccountDataType, AccountConfigType } from '../types' // Import enums import { DEGIRO_API_PATHS } from '../enums' const { BASE_API_URL, LOGOUT_URL_PATH } = DEGIRO_API_PATHS // Import debug console log import { debug } from '../utils' export function logoutRequest(accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { // Do the request to get a session const url = `${BASE_API_URL}${LOGOUT_URL_PATH};jsessionid=${accountConfig.data.sessionId}?intAccount=${accountData.data.intAccount}&sessionId=${accountConfig.data.sessionId}` debug(`Making request to ${url}`) fetch(url) .then((res) => { if (res.status === 200) resolve() else reject(res.statusText || res.body) }) .catch(reject) }) } ================================================ FILE: src/api/searchProductRequest.ts ================================================ // Import types import { SearchProductOptionsType, AccountConfigType, AccountDataType, SearchProductResultType } from '../types' // Import debug console log import { debug } from '../utils' const createURLQuery = (options: SearchProductOptionsType): string => { // Destructure the options parameter const { text, type = undefined, sortColumn = undefined, sortType = undefined, limit = 10, offset = 0 } = options // Create the query let res = `&searchText=${encodeURIComponent(text)}` if (type) res += `&type=${encodeURIComponent(type)}` if (sortColumn) res += `&sortColumn=${encodeURIComponent(sortColumn)}` if (sortType) res += `&sortType=${encodeURIComponent(sortType)}` if (limit) res += `&limit=${encodeURIComponent(limit)}` if (offset) res += `&offset=${encodeURIComponent(offset)}` return res } export function searchProductRequest(options: SearchProductOptionsType, accountData: AccountDataType, accountConfig: AccountConfigType): Promise { return new Promise((resolve, reject) => { // Preparae de request const params = createURLQuery(options) // Do de request debug(`Making a search request to url: ${accountConfig.data.productSearchUrl}v5/products/lookup?intAccount=${accountData.data.intAccount}&sessionId=${accountData.data.id}&${params}}`) fetch(`${accountConfig.data.productSearchUrl}v5/products/lookup?intAccount=${accountData.data.intAccount}&sessionId=${accountConfig.data.sessionId}&${params}`) .then(res => res.json()) .then(({ products }) => resolve(products || [])) .catch(reject) }) } ================================================ FILE: src/enums/DeGiroEnums.ts ================================================ export enum DEGIRO_API_PATHS { BASE_API_URL = 'https://trader.degiro.nl/', BASE_REPORT_DOWNLOAD_URI = 'document/download/', LOGIN_URL_PATH = 'login/secure/login', LOGOUT_URL_PATH = 'trading/secure/logout', GET_ACCOUNT_CONFIG_PATH = 'login/secure/config', GET_GENERIC_DATA_PATH = 'v5/update/', CREATE_ORDER_PATH = 'v5/checkOrder', GET_TRANSACTIONS_PATH = 'v4/transactions', GET_ACCOUNT_STATE_PATH = 'v6/accountoverview', GET_ACCOUNT_INFO_PATH = 'v5/account/info/', GET_LATESTS_NEWS_PATH = 'newsfeed/v2/latest-news', GET_TOP_NEWS_PATH = 'newsfeed/v2/top-news-preview', GET_WEB_SETTINGS_PATH = 'settings/web', GET_WEB_USER_SETTINGS_PATH = 'settings/user', GET_ACCOUNT_REPORTS_PATH = 'document/list/report', STOCKS_SEARCH_PATH = 'v5/stocks', } export enum DeGiroActions { BUY = 'BUY', SELL = 'SELL', } export enum DeGiroMarketOrderTypes { LIMITED = 0, MARKET = 2, STOP_LOSS = 3, STOP_LOSS_LIMIT = 1, } export enum DeGiroTimeTypes { DAY = 1, PERMANENT = 3, } export enum DeGiroProducTypes { // all = undefined, undefined is not allowed to set on enum shares = 1, bonds = 2, futures = 7, options = 8, investmendFunds = 13, leveragedProducts = 14, etfs = 131, cfds = 535, warrants = 536, } export enum DeGiroSort { ASC = 'asc', DESC = 'desc', } export enum PORTFOLIO_POSITIONS_TYPE_ENUM { ALL = 'all', ALL_POSITIONS = 'allPositions', OPEN = 'open', CLOSED = 'closed', } export enum GET_ORDERS_TYPES { ACTIVE = 'orders', HISTORICAL = 'historicalOrders', TRANSACTIONS = 'transactions', } ================================================ FILE: src/enums/index.ts ================================================ import { DEGIRO_API_PATHS, DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes, DeGiroProducTypes, DeGiroSort, PORTFOLIO_POSITIONS_TYPE_ENUM, } from './DeGiroEnums' export { DEGIRO_API_PATHS, DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes, DeGiroProducTypes, DeGiroSort, PORTFOLIO_POSITIONS_TYPE_ENUM, } ================================================ FILE: src/interfaces/DeGiroClassInterface.ts ================================================ import { CashFoundType, AccountConfigType, GetPorfolioConfigType, AccountDataType, SearchProductOptionsType, SearchProductResultType, OrderType, CreateOrderResultType, IsLoginOptionsType, GetOrdersConfigType, GetOrdersResultType, GetAccountStateOptionsType, AccountReportsType, AccountInfoType, FavouriteProductType, StockType, GetHistoricalOrdersOptionsType, HistoricalOrdersType, GetNewsOptionsType, NewsType, WebSettingsType, WebUserSettingType, ConfigDictionaryType, i18nMessagesType, GetPopularStocksConfigType, } from '../types' /** * @interface DeGiroClassInterface */ export interface DeGiroClassInterface { /* Session methods */ login(): Promise logout(): Promise isLogin(options?: IsLoginOptionsType): boolean | Promise getJSESSIONID(): string | undefined /* Account methods */ getAccountConfig(sessionId: string): Promise getAccountData(): Promise getAccountState(options: GetAccountStateOptionsType): Promise getAccountReports(): Promise getAccountInfo(): Promise /* Search methods */ searchProduct(options: SearchProductOptionsType): Promise /* Cash Funds methods */ getCashFunds(): Promise /* Porfolio methods */ getPortfolio(config: GetPorfolioConfigType): Promise /* Stocks methods */ getFavouriteProducts(): Promise getPopularStocks(config: GetPopularStocksConfigType): Promise /* Orders methods */ getOrders(options: GetOrdersConfigType): Promise getHistoricalOrders(options: GetHistoricalOrdersOptionsType): Promise createOrder(order: OrderType): Promise executeOrder(order: OrderType, executeId: string): Promise deleteOrder(orderId: String): Promise /* Miscellaneous methods */ getProductsByIds(ids: string[]): Promise getNews(options: GetNewsOptionsType): Promise getWebi18nMessages(lang: string): Promise getWebSettings(): Promise getWebUserSettings(): Promise getConfigDictionary(): Promise } ================================================ FILE: src/interfaces/index.ts ================================================ import { DeGiroClassInterface } from './DeGiroClassInterface' export { DeGiroClassInterface, } ================================================ FILE: src/main.ts ================================================ require('es6-promise').polyfill() require('isomorphic-fetch') import { DeGiro } from './DeGiro' import * as DeGiroEnums from './enums/' import * as DeGiroTypes from './types/' export { DeGiroEnums, DeGiroTypes, } export default DeGiro ================================================ FILE: src/types/AccountConfigType.ts ================================================ export type AccountConfigType = { data: { betaLandingPath: string, cashSolutionsUrl?: string, clientId: number, companiesServiceUrl: string, dictionaryUrl: string, firstLoginWizardUrl?: string, i18nUrl: string, landingPath: string, loginUrl: string, mobileLandingPath: string, paUrl: string, paymentServiceUrl: string, productSearchUrl: string, productTypesUrl: string, reportingUrl: string, sessionId: string, taskManagerUrl: string, tradingUrl: string, vwdGossipsUrl: string, vwdNewsUrl: string, vwdQuotecastServiceUrl: string, }, } ================================================ FILE: src/types/AccountDataType.ts ================================================ export type AccountDataType = { data: { address: { city: string, country: string, streetAddress: string, streetAddressNumber: string, zip: string, }, bankAccount: { bankAccountId: number bic: string, iban: string, status: string, }, canUpgrade: boolean cellphoneNumber: string, clientRole: string, contractType: string, culture: string, displayName: string, effectiveClientRole: string, email: string, firstContact: { countryOfBirth: string, dateOfBirth: string, displayName: string, firstName: string, gender: string, lastName: string, nationality: string, placeOfBirth: string, }, id: number, intAccount: number, isAllocationAvailable: boolean, isAmClientActive: boolean, isCollectivePortfolio: boolean, isIskClient: boolean, isWithdrawalAvailable: boolean, language: string, locale: string, memberCode: string, username: string, }, } ================================================ FILE: src/types/AccountInfoType.ts ================================================ export type AccountInfoType = { baseCurrency: string, cashFunds: AccountInfoCashFunds, clientId: number, compensationCapping: number, currencyPairs: AccountInfoCurrencyPairs, marginType: string, } type CashFund = { id: number, name: string, productIds: number[], } type AccountInfoCashFunds = { [key: string]: CashFund[], } type AccountInfoCurrencyPairs = { [key: string]: { id: number, price: string, }, } ================================================ FILE: src/types/AccountReportsType.ts ================================================ export type ReportType = { id: number, type: string, description: string, stampCreated: string, uri: string, } export type AccountReportsType = ReportType[] ================================================ FILE: src/types/CashFoundType.ts ================================================ export type CashFoundType = { id: string, currencyCode: string, value: number, handling: string, } ================================================ FILE: src/types/ConfigDictionaryType.ts ================================================ /* Main items */ export type StockCountry = { id: number, country: number, indices?: number[], exchanges?: number[], } export type BondExchange = { id: number, country: number, exchange: number, postfix?: string, } export type BondIssuerType = { id: number, name: string, translation: string, } export type EurexCountry = { id: number, name: string, exchanges: Exchange[], underlyingExchangeIds: number[], } export type FutureExchange = { id: number, name: string, eurexCountries?: number[], } export type OptionExchange = { id: number, name: string, exchangeId: number, underlyingExchangeIds?: number[], eurexCountries?: number[], } export type CombinationExchange = { id: number, name: string, } export type CFDExchange = { id: number, country: number, exchange: number, } export type Exchange = { id: number, name: string, code?: string, hiqAbbr: string, country: string, city?: string, micCode?: string, } export type Index = { id: number, name: string, productId?: number, } export type Region = { id: number, name: string, translation: string, } export type Country = { id: number, name: string, translation: string, region: number, } /* Types */ type ProductTypes = { id: number, name: string, translation: string, briefTranslation: string, contractType: string, } /* Fee Types */ type FeeType = { id: number, name: string, translation: string, } /* Aggregates */ type AggregateListItem = { id: string, name: string, } /* Sort arrays */ type SortListItem = { id: string, } export type ConfigDictionaryType = { /* Main items */ stockCountries: StockCountry[], bondExchanges: BondExchange[], bondIssuerTypes: BondIssuerType[], eurexCountries: EurexCountry[], futureExchanges: FutureExchange[], optionExchanges: OptionExchange[], combinationExchanges: CombinationExchange[], cfdExchanges: CFDExchange[], exchanges: Exchange[], indices: Index[], regions: Region[], countries: Country[], /* Product types */ productTypes: ProductTypes[], /* Fee Types */ etfFeeTypes: FeeType[], investmentFundFeeTypes: FeeType[], /* Aggregates */ optionAggregateTypes: AggregateListItem[], leveragedAggregateTypes: AggregateListItem[], etfAggregateTypes: AggregateListItem[], investmentFundAggregateTypes: AggregateListItem[], warrantAggregateTypes: AggregateListItem[], /* Sort arrays */ lookupSortColumns: SortListItem[], stockSortColumns: SortListItem[], bondSortColumns: SortListItem[], cfdSortColumns: SortListItem[], etfSortColumns: SortListItem[], futureSortColumns: SortListItem[], investmentFundSortColumns: SortListItem[], leveragedSortColumns: SortListItem[], optionSortColumns: SortListItem[], warrantSortColumns: SortListItem[], } ================================================ FILE: src/types/CreateOrderResultType.ts ================================================ import { TransactionFeeType } from '.' export type CreateOrderResultType = { confirmationId: String, freeSpaceNew: Number, transactionFees: [TransactionFeeType], } ================================================ FILE: src/types/DeGiroSettupType.ts ================================================ export type DeGiroSettupType = { username?: string, pwd?: string, oneTimePassword?: string, jsessionId?: string, } ================================================ FILE: src/types/FavouriteProductType.ts ================================================ export type FavouriteProductType = { } ================================================ FILE: src/types/GetAccountStateOptionsType.ts ================================================ export type GetAccountStateOptionsType = { from: string, to: string, } ================================================ FILE: src/types/GetHistoricalOrdersOptionsType.ts ================================================ export type GetHistoricalOrdersOptionsType = { } ================================================ FILE: src/types/GetNewsOptionsType.ts ================================================ export type GetNewsOptionsType = { latest?: boolean, top?: boolean, latestOffset?: number, latestLimit?: number, languages?: string, } ================================================ FILE: src/types/GetOrdersConfigType.ts ================================================ export type GetOrdersConfigType = { active?: boolean, lastTransactions?: boolean, } ================================================ FILE: src/types/GetOrdersResultType.ts ================================================ export type GetOrdersResultType = { orders: [], lastTransactions: [], } ================================================ FILE: src/types/GetPopularStocksConfigType.ts ================================================ export type GetPopularStocksConfigType = { popularOnly?: boolean, requireTotal?: boolean, offset?: number, limit?: number, } ================================================ FILE: src/types/GetPorfolioConfigType.ts ================================================ import { PORTFOLIO_POSITIONS_TYPE_ENUM } from '../enums/DeGiroEnums' export type GetPorfolioConfigType = { type: PORTFOLIO_POSITIONS_TYPE_ENUM, getProductDetails?: boolean, } ================================================ FILE: src/types/GetTransactionsOptionsType.ts ================================================ export type GetTransactionsOptionsType = { fromDate: string, toDate: string, groupTransactionsByOrder: boolean, } ================================================ FILE: src/types/HistoricalOrdersType.ts ================================================ export type HistoricalOrdersType = { } ================================================ FILE: src/types/IsLoginOptionsType.ts ================================================ export type IsLoginOptionsType = { secure?: boolean, } ================================================ FILE: src/types/LoginRequestBodyType.ts ================================================ export type LoginRequestBodyType = { isPassCodeReset: boolean, isRedirectToMobile: boolean, password: string, username: string, oneTimePassword: string | undefined, queryParams: { reason: string, }, } ================================================ FILE: src/types/LoginRequestParamsType.ts ================================================ export type LoginRequestParamsType = { username: string, pwd: string, oneTimePassword: string | undefined, } ================================================ FILE: src/types/LoginResponseType.ts ================================================ export type LoginResponseType = { isPassCodeEnabled?: boolean, locale?: string, redirectUrl?: string, sessionId?: string, status: number, statusText: string, } ================================================ FILE: src/types/NewsType.ts ================================================ export type New = { brief: string, category: string, content: string, date: string, htmlContent: boolean, id: string, isins: string[], language: string, pictureUrl: string, source: string, title: string, } type NewsResponse = { offset?: number, total?: number, items: New[], } export type NewsType = { latest: NewsResponse, top: NewsResponse, } ================================================ FILE: src/types/OrderType.ts ================================================ import { DeGiroActions, DeGiroMarketOrderTypes, DeGiroTimeTypes } from '../enums/DeGiroEnums' export type OrderType = { buySell: DeGiroActions, orderType: DeGiroMarketOrderTypes, price?: Number, productId: string, size: number, stopPrice?: number, timeType: DeGiroTimeTypes, } ================================================ FILE: src/types/PortfolioPositionType.ts ================================================ // { // "portfolio": [ // { // "name": "positionrow", // "id": 1156604, // "value": [ // { // "name": "id", // "value": "1156604", // "isAdded": true // }, // { // "name": "product", // "value": "DEUTSCHE BANK AG COMMO", // "isAdded": true // }, // ... export type PortfolioPositionType = { foo?: string, } ================================================ FILE: src/types/SearchProductOptionsType.ts ================================================ import { DeGiroProducTypes } from '../enums/DeGiroEnums' export type SearchProductOptionsType = { text: string, type?: DeGiroProducTypes | undefined, sortColumn?: string, sortType?: any, limit?: number, offset?: number, } ================================================ FILE: src/types/SearchProductResultType.ts ================================================ export type SearchProductResultType = { id: string, name: string, isin: string, symbol: string, contractSize: number, productType: string, productTypeId: number, tradable: boolean, category: string, currency: string, exchangeId: string, orderTimeTypes: string[], gtcAllowed: boolean, buyOrderTypes: string[], sellOrderTypes: string[], marketAllowed: boolean, limitHitOrderAllowed: boolean, stoplossAllowed: boolean, stopLimitOrderAllowed: boolean, joinOrderAllowed: boolean, trailingStopOrderAllowed: boolean, combinedOrderAllowed: boolean, sellAmountAllowed: boolean, isFund: boolean, closePrice: number, closePriceDate: string, feedQuality: string, orderBookDepth: number, vwdIdentifierType: string, vwdId: string, qualitySwitchable: boolean, qualitySwitchFree: boolean, vwdModuleId: number, feedQualitySecondary: string, orderBookDepthSecondary: number, vwdIdentifierTypeSecondary: string, vwdIdSecondary: string, qualitySwitchableSecondary: boolean, qualitySwitchFreeSecondary: boolean, vwdModuleIdSecondary: number, } ================================================ FILE: src/types/StockType.ts ================================================ export type StockType = { id: string, name: string, isin: string, symbol: string, contractSize: number, productType: string, productTypeId: number, tradable: boolean, category: string, currency: string, strikePrice: number, exchangeId: string, orderTimeTypes: string[], gtcAllowed: boolean, buyOrderTypes: string[], sellOrderTypes: string[], productBitTypes: any[], marketAllowed: boolean, limitHitOrderAllowed: boolean, stoplossAllowed: boolean, stopLimitOrderAllowed: boolean, joinOrderAllowed: boolean, trailingStopOrderAllowed: boolean, combinedOrderAllowed: boolean, sellAmountAllowed: boolean, isFund: boolean, closePrice: number, closePriceDate: string, feedQuality: string, orderBookDepth: number, vwdIdentifierType: string, vwdId: string, qualitySwitchable: boolean, qualitySwitchFree: boolean, vwdModuleId: number, feedQualitySecondary: string, orderBookDepthSecondary: number, vwdIdentifierTypeSecondary: string, vwdIdSecondary: string, qualitySwitchableSecondary: boolean, qualitySwitchFreeSecondary: boolean, vwdModuleIdSecondary: number, } ================================================ FILE: src/types/TransactionFeeType.ts ================================================ export type TransactionFeeType = { amount: Number, currency: String, id: Number, } ================================================ FILE: src/types/TransactionType.ts ================================================ export type TransactionType = { buysell: string, counterParty: string, date: string, id: number, orderTypeId: number, price: number, productId: number, quantity: number, total: number, totalInBaseCurrency: number, totalPlusFeeInBaseCurrency: number, tradingVenue: string, transactionTypeId: number, transfered: boolean, } ================================================ FILE: src/types/WebSettingsType.ts ================================================ type MarketPageIndex = { closePrice: number, country: string, name: string, vwdId: string, id: number, } type MarketPageFuture = { country: string, name: string, vwdId: string, id: number, } type MarketPageCurrency = { fromCountry: string, toCountry: string, name: string, vwdId: string, id: number, } type MarketPageChartIndex = { closePrice: number, country: string, name: string, vwdId: string, id: number, } export type WebSettingsType = { defaultMarketMoversIndexId: number, marketMoversIndexIds: number[], marketPageChartIndex: MarketPageChartIndex, marketPageIndices: MarketPageIndex[], marketPageFutures: MarketPageFuture[], marketPageCurrencies: MarketPageCurrency[], defaultStockCountryId: number, defaultStockListType: string, defaultStockListId: number, defaultOptionExchangeId: number, defaultOptionCountryId: number, defaultOptionUnderlyingIsin: string, defaultFutureExchangeId: number, defaultFutureCountryId: number, defaultFutureUnderlyingIsin: string, defaultLeveragedExchangeId: number, defaultLeveragedShortLong: number, defaultLeveragedIssuerId: number, defaultLeveragedUnderlyingId: number, defaultLeveragedPopularOnly: boolean, defaultBondIssuerType: number, defaultBondExchangeId: number, defaultFundFeeType: number, defaultFundIssuerId: number, defaultEtfExchangeId: number, defaultEtfFeeType: number, defaultEtfIssuerId: number, defaultEtfPopularOnly: boolean, defaultCfdExchangeId: number, defaultWarrantUnderlyingName: string, defaultWarrantIssuerName: string, decimalDelimiter: string, thousandDelimiter: string, } ================================================ FILE: src/types/WebUserSettingType.ts ================================================ export type WebUserSettingType = { desktop: { hasClosedFeedbackPromotion: boolean, hasSeenProductTour: boolean, isAccountSummaryOpened: boolean, hasClosedInvitationPromotion: boolean, accountSummaryPosition: string, }, mobile: { hasSeenProductTour: boolean, }, } ================================================ FILE: src/types/i18nMessagesType.ts ================================================ export type i18nMessagesType = { [key: string]: string, } ================================================ FILE: src/types/index.ts ================================================ import { CashFoundType } from './CashFoundType' import { DeGiroSettupType } from './DeGiroSettupType' import { PortfolioPositionType } from './PortfolioPositionType' import { LoginResponseType } from './LoginResponseType' import { LoginRequestParamsType } from './LoginRequestParamsType' import { LoginRequestBodyType } from './LoginRequestBodyType' import { AccountConfigType } from './AccountConfigType' import { AccountDataType } from './AccountDataType' import { GetPorfolioConfigType } from './GetPorfolioConfigType' import { SearchProductOptionsType } from './SearchProductOptionsType' import { SearchProductResultType } from './SearchProductResultType' import { OrderType } from './OrderType' import { CreateOrderResultType } from './CreateOrderResultType' import { TransactionFeeType } from './TransactionFeeType' import { IsLoginOptionsType } from './IsLoginOptionsType' import { GetOrdersConfigType } from './GetOrdersConfigType' import { GetOrdersResultType } from './GetOrdersResultType' import { GetAccountStateOptionsType } from './GetAccountStateOptionsType' import { AccountReportsType, ReportType } from './AccountReportsType' import { AccountInfoType } from './AccountInfoType' import { FavouriteProductType } from './FavouriteProductType' import { StockType } from './StockType' import { GetHistoricalOrdersOptionsType } from './GetHistoricalOrdersOptionsType' import { HistoricalOrdersType } from './HistoricalOrdersType' import { GetNewsOptionsType } from './GetNewsOptionsType' import { NewsType, New } from './NewsType' import { WebSettingsType } from './WebSettingsType' import { WebUserSettingType } from './WebUserSettingType' import { i18nMessagesType } from './i18nMessagesType' import { GetPopularStocksConfigType } from './GetPopularStocksConfigType' import { GetTransactionsOptionsType } from './GetTransactionsOptionsType' import { TransactionType } from './TransactionType' import { ConfigDictionaryType, StockCountry, BondExchange, BondIssuerType, EurexCountry, FutureExchange, OptionExchange, CombinationExchange, CFDExchange, Exchange, Index, Region, Country, } from './ConfigDictionaryType' export { CashFoundType, DeGiroSettupType, PortfolioPositionType, LoginResponseType, LoginRequestParamsType, LoginRequestBodyType, AccountConfigType, AccountDataType, GetPorfolioConfigType, SearchProductOptionsType, SearchProductResultType, OrderType, CreateOrderResultType, TransactionFeeType, IsLoginOptionsType, GetOrdersConfigType, GetOrdersResultType, GetTransactionsOptionsType, GetAccountStateOptionsType, AccountReportsType, ReportType, AccountInfoType, FavouriteProductType, StockType, TransactionType, GetHistoricalOrdersOptionsType, HistoricalOrdersType, GetNewsOptionsType, NewsType, New, WebSettingsType, WebUserSettingType, ConfigDictionaryType, StockCountry, BondExchange, BondIssuerType, EurexCountry, FutureExchange, OptionExchange, CombinationExchange, CFDExchange, Exchange, Index, Region, Country, i18nMessagesType, GetPopularStocksConfigType, } ================================================ FILE: src/utils/debug.ts ================================================ const DEBUG = !!process.env.DEGIRO_DEBUG export const debug = DEBUG ? (...s: any) => console.log(...s) : () => {} ================================================ FILE: src/utils/generateReportURIFromID.ts ================================================ // Import types import { AccountDataType, AccountConfigType } from '../types' // Importamos enumerados de URLs import { DEGIRO_API_PATHS } from '../enums' const { BASE_REPORT_DOWNLOAD_URI } = DEGIRO_API_PATHS /** * Generate a download URL to the report with the `id` identifier * @param id Report id to generate download URL */ export const generateReportURIFromID = (reportId: number | string, accountData: AccountDataType, accountConfig: AccountConfigType): string => { return `${accountConfig.data.paUrl}${BASE_REPORT_DOWNLOAD_URI}${reportId}?sessionId=${accountConfig.data.sessionId}&intAccount=${accountData.data.intAccount}` } ================================================ FILE: src/utils/index.ts ================================================ import { debug } from './debug' import { processPortfolio } from './processPortfolio' import { processGetCashFundsResultListObject } from './processGetCashFundsResultListObject' import { processGetOrdersResultListObject } from './processGetOrdersResultListObject' export { debug, processPortfolio, processGetCashFundsResultListObject, processGetOrdersResultListObject, } ================================================ FILE: src/utils/processGetCashFundsResultListObject.ts ================================================ import { CashFoundType } from '../types' type ObjectDataType = { value: [], } type DataToParseObjectType = { name: string, value: any, isAdded: boolean, } export const processGetCashFundsResultListObject = (objectData: ObjectDataType): CashFoundType => { const arrayDataToExtract = objectData.value const result = {} for (let i = 0 ; i < arrayDataToExtract.length ; i++) { const data: DataToParseObjectType = arrayDataToExtract[i] if (data.isAdded) { Object.assign(result, { [data.name]: data.value, }) } } return result } ================================================ FILE: src/utils/processGetOrdersResultListObject.ts ================================================ type ObjectDataType = { value: [], } type DataToParseObjectType = { name: string, value: any, isAdded: boolean, } export const processGetOrdersResultListObject = (objectData: ObjectDataType) => { const arrayDataToExtract = objectData.value const result = {} for (let i = 0 ; i < arrayDataToExtract.length ; i++) { const data: DataToParseObjectType = arrayDataToExtract[i] if (data.isAdded) { Object.assign(result, { [data.name]: data.value, }) } } return result } ================================================ FILE: src/utils/processPortfolio.ts ================================================ import { GetPorfolioConfigType } from '../types' import { PORTFOLIO_POSITIONS_TYPE_ENUM } from '../enums/DeGiroEnums' /** * Transform the object format of a portfolio position * @param position */ const processPosition = (position: any) => { const result = {} for (let i = 0; i < position.value.length; i++) { if (position.value[i].value) { Object.assign(result, { [position.value[i].name]: position.value[i].value, }) } } return result } /** * Apply filter to get only open or closed positions or get all available positions * @param config */ const filterPorfolio = (config: GetPorfolioConfigType) => (position: any) => { // Check (non-check) all positions if (config.type === PORTFOLIO_POSITIONS_TYPE_ENUM.ALL) return true // Check if ID is not a number if (isNaN(parseInt(position.id, 10)) || position.positionType !== 'PRODUCT') return false if (config.type === PORTFOLIO_POSITIONS_TYPE_ENUM.ALL_POSITIONS) return true // Check if size is not 0 if (config.type === PORTFOLIO_POSITIONS_TYPE_ENUM.OPEN && position.size !== undefined) return parseFloat(position.size) !== 0 // Check if size is zero if (config.type === PORTFOLIO_POSITIONS_TYPE_ENUM.CLOSED) return position.size === undefined || parseFloat(position.size) === 0 return false } export function processPortfolio(positions: any[], config: GetPorfolioConfigType): any[] { const results = positions .map(processPosition) .filter(filterPorfolio(config)) return results } ================================================ FILE: tests/enviroment_vars.spec.ts ================================================ // Importamos código ha probar import DeGiro from '../src/main' // Importamos código para probar import { expect, should } from 'chai' import 'mocha' // Realizamos las pruebas describe('Environment variables', () => { it('DEGIRO_USER env var should exists', async () => { const DEGIRO_USER = process.env['DEGIRO_USER'] expect(DEGIRO_USER).to.be.a('string') expect(DEGIRO_USER).not.to.be.empty }) it('DEGIRO_PWD env var should exists', async () => { const DEGIRO_PWD = process.env['DEGIRO_PWD'] expect(DEGIRO_PWD).to.be.a('string') expect(DEGIRO_PWD).not.to.be.empty }) }) describe('Create DeGiro instance', () => { it('should create an instance of DeGiro class from env vars', async () => { const DEGIRO_USER = process.env['DEGIRO_USER'] const DEGIRO_PWD = process.env['DEGIRO_PWD'] expect(DEGIRO_USER).to.be.a('string') expect(DEGIRO_USER).not.to.be.empty expect(DEGIRO_PWD).to.be.a('string') expect(DEGIRO_PWD).not.to.be.empty const degiro = new DeGiro() expect(degiro).to.exist expect(degiro).to.be.a('object') expect(degiro).to.be.instanceOf(DeGiro) }) it('should create an instance of DeGiro class from constructor params', async () => { const DEGIRO_USER = process.env['DEGIRO_USER'] const DEGIRO_PWD = process.env['DEGIRO_PWD'] expect(DEGIRO_USER).to.be.a('string') expect(DEGIRO_USER).not.to.be.empty expect(DEGIRO_PWD).to.be.a('string') expect(DEGIRO_PWD).not.to.be.empty const degiro = new DeGiro({ username: DEGIRO_USER, pwd: DEGIRO_PWD, }) expect(degiro).to.exist expect(degiro).to.be.a('object') expect(degiro).to.be.instanceOf(DeGiro) }) }) ================================================ FILE: tests/getAccountConfig.spec.ts ================================================ // Importamos código ha probar import DeGiro from '../src/main' // Importamos código para probar import { expect } from 'chai' import 'mocha' // Realizamos las pruebas describe('DeGiro getAccountConfig', () => { it('should return a valid account config from server', async () => { // Creamos la instancia del objecto y comprobamos que se ha creado bien const degiro = new DeGiro() expect(degiro).to.exist expect(degiro).to.be.a('object') expect(degiro).to.be.instanceOf(DeGiro) // Iniciamos el proceso de login, procesamos el then, dejamos sin procesar el catch y devolvemos la promesa await degiro.login() return degiro.getAccountConfig().then((accountConfig) => { // Check account config exists expect(accountConfig).to.exist expect(accountConfig).to.be.a('object') // Check account config fields expect(accountConfig).to.have.property('data') const { data } = accountConfig expect(data).to.have.property('tradingUrl') expect(data).to.have.property('paUrl') expect(data).to.have.property('reportingUrl') expect(data).to.have.property('paymentServiceUrl') // expect(data).to.have.property('cashSolutionsUrl') This property is no longer present expect(data).to.have.property('productSearchUrl') expect(data).to.have.property('dictionaryUrl') expect(data).to.have.property('productTypesUrl') expect(data).to.have.property('companiesServiceUrl') expect(data).to.have.property('i18nUrl') expect(data).to.have.property('vwdQuotecastServiceUrl') expect(data).to.have.property('vwdNewsUrl') expect(data).to.have.property('vwdGossipsUrl') // expect(data).to.have.property('firstLoginWizardUrl') expect(data).to.have.property('taskManagerUrl') expect(data).to.have.property('landingPath') expect(data).to.have.property('betaLandingPath') expect(data).to.have.property('mobileLandingPath') expect(data).to.have.property('loginUrl') expect(data).to.have.property('sessionId') expect(data).to.have.property('clientId') expect(data.tradingUrl).to.be.a('string') expect(data.paUrl).to.be.a('string') expect(data.reportingUrl).to.be.a('string') expect(data.paymentServiceUrl).to.be.a('string') // expect(data.cashSolutionsUrl).to.be.a('string') This property is no longer present expect(data.productSearchUrl).to.be.a('string') expect(data.dictionaryUrl).to.be.a('string') expect(data.productTypesUrl).to.be.a('string') expect(data.companiesServiceUrl).to.be.a('string') expect(data.i18nUrl).to.be.a('string') expect(data.vwdQuotecastServiceUrl).to.be.a('string') expect(data.vwdNewsUrl).to.be.a('string') expect(data.vwdGossipsUrl).to.be.a('string') // expect(data.firstLoginWizardUrl).to.be.a('string') expect(data.taskManagerUrl).to.be.a('string') expect(data.landingPath).to.be.a('string') expect(data.betaLandingPath).to.be.a('string') expect(data.mobileLandingPath).to.be.a('string') expect(data.loginUrl).to.be.a('string') expect(data.sessionId).to.be.a('string') expect(data.clientId).to.be.a('number') // Check important fields are not empty expect(data.tradingUrl).not.be.empty expect(data.paUrl).not.be.empty expect(data.reportingUrl).not.be.empty expect(data.productSearchUrl).not.be.empty expect(data.sessionId).not.be.empty }) }) }) ================================================ FILE: tests/getAccountData.spec.ts ================================================ // Importamos código ha probar import DeGiro from '../src/main' // Importamos código para probar import { expect } from 'chai' import 'mocha' // Realizamos las pruebas describe('DeGiro getAccountData', () => { it('should return a valid account data from server', async () => { // Creamos la instancia del objecto y comprobamos que se ha creado bien const degiro = new DeGiro() expect(degiro).to.exist expect(degiro).to.be.a('object') expect(degiro).to.be.instanceOf(DeGiro) // Iniciamos el proceso de login, procesamos el then, dejamos sin procesar el catch y devolvemos la promesa await degiro.login() return degiro.getAccountData().then((accountData) => { // Check account config exists expect(accountData).to.exist expect(accountData).to.be.a('object') // Check account config fields expect(accountData).to.have.property('data') const { data } = accountData expect(data).to.have.property('id') expect(data).to.have.property('intAccount') expect(data).to.have.property('clientRole') expect(data).to.have.property('effectiveClientRole') expect(data).to.have.property('contractType') expect(data).to.have.property('username') expect(data).to.have.property('displayName') expect(data).to.have.property('email') expect(data).to.have.property('firstContact') expect(data).to.have.property('address') expect(data).to.have.property('cellphoneNumber') expect(data).to.have.property('locale') expect(data).to.have.property('language') expect(data).to.have.property('culture') expect(data).to.have.property('bankAccount') expect(data).to.have.property('memberCode') expect(data).to.have.property('isWithdrawalAvailable') expect(data).to.have.property('isAllocationAvailable') expect(data).to.have.property('isIskClient') expect(data).to.have.property('isCollectivePortfolio') expect(data).to.have.property('isAmClientActive') expect(data).to.have.property('canUpgrade') expect(data.id).to.be.a('number') expect(data.intAccount).to.be.a('number') expect(data.clientRole).to.be.a('string') expect(data.clientRole).to.be.a('string') expect(data.effectiveClientRole).to.be.a('string') expect(data.contractType).to.be.a('string') expect(data.username).to.be.a('string') expect(data.displayName).to.be.a('string') expect(data.email).to.be.a('string') expect(data.firstContact).to.be.a('object') expect(data.address).to.be.a('object') expect(data.cellphoneNumber).to.be.a('string') expect(data.locale).to.be.a('string') expect(data.language).to.be.a('string') expect(data.culture).to.be.a('string') expect(data.bankAccount).to.be.a('object') expect(data.memberCode).to.be.a('string') expect(data.isWithdrawalAvailable).to.be.a('boolean') expect(data.isAllocationAvailable).to.be.a('boolean') expect(data.isIskClient).to.be.a('boolean') expect(data.isCollectivePortfolio).to.be.a('boolean') expect(data.isAmClientActive).to.be.a('boolean') expect(data.canUpgrade).to.be.a('boolean') expect(data.firstContact.firstName).to.be.a('string') expect(data.firstContact.firstName).to.be.a('string') expect(data.firstContact.lastName).to.be.a('string') expect(data.firstContact.displayName).to.be.a('string') expect(data.firstContact.nationality).to.be.a('string') expect(data.firstContact.gender).to.be.a('string') expect(data.firstContact.dateOfBirth).to.be.a('string') expect(data.firstContact.placeOfBirth).to.be.a('string') expect(data.firstContact.countryOfBirth).to.be.a('string') expect(data.address.streetAddress).to.be.a('string') expect(data.address.streetAddressNumber).to.be.a('string') expect(data.address.zip).to.be.a('string') expect(data.address.city).to.be.a('string') expect(data.address.country).to.be.a('string') expect(data.bankAccount.bankAccountId).to.be.a('number') expect(data.bankAccount.bic).to.be.a('string') expect(data.bankAccount.iban).to.be.a('string') expect(data.bankAccount.status).to.be.a('string') // Check important fields are not empty expect(data.id).be.greaterThan(0) expect(data.intAccount).be.greaterThan(0) expect(data.username).not.be.empty expect(data.displayName).not.be.empty expect(data.email).not.be.empty expect(data.memberCode).not.be.empty }) }) }) ================================================ FILE: tests/getJSESSIONID.spec.ts ================================================ // Importamos código ha probar import DeGiro from '../src/main' // Importamos código para probar import { expect } from 'chai' import 'mocha' describe('DeGiro getJSESSIONID', () => { it('should return a valid jsessionId', async () => { // Creamos la instancia del objecto y comprobamos que se ha creado bien const degiro = new DeGiro() expect(degiro).to.exist expect(degiro).to.be.a('object') expect(degiro).to.be.instanceOf(DeGiro) // Hacemos login y esperamos con que no falle const loginPromise = degiro.login() expect(loginPromise).not.be.rejected loginPromise.then(() => { const jsessionId = degiro.getJSESSIONID() expect(jsessionId).to.exist expect(jsessionId).not.to.be.null expect(jsessionId).to.be.a('string') expect(jsessionId).to.have.length degiro.logout() // <-- Cerramos sesión pero nos "da igual que falle o no" }) }) it('should return undefined before log in', async () => { // Creamos la instancia del objecto y comprobamos que se ha creado bien const degiro = new DeGiro() expect(degiro).to.exist expect(degiro).to.be.a('object') expect(degiro).to.be.instanceOf(DeGiro) // Hacemos login y esperamos con que no falle const loginPromise = degiro.login() expect(loginPromise).not.be.rejected const jsessionId = degiro.getJSESSIONID() expect(jsessionId).to.not.exist expect(jsessionId).to.be.a('undefined') expect(jsessionId).to.be.eq(undefined) }) }) ================================================ FILE: tests/isLogin.spec.ts ================================================ // Importamos código ha probar import DeGiro from '../src/main' // Importamos código para probar import { expect } from 'chai' import 'mocha' // Realizamos las pruebas describe('DeGiro isLogin', () => { it('should return false before sign in', async () => { // Creamos la instancia del objecto y comprobamos que se ha creado bien const degiro = new DeGiro() const isLogin = degiro.isLogin() expect(isLogin).exist expect(isLogin).to.be.a('boolean') expect(isLogin).to.be.eq(false) }) it('should return true after sign in and before log out', async () => { // Creamos la instancia del objecto y comprobamos que se ha creado bien const degiro = new DeGiro() const loginPromise = degiro.login() expect(loginPromise).not.be.rejected loginPromise .then(() => { const isLogin = degiro.isLogin() expect(isLogin).exist expect(isLogin).to.be.a('boolean') expect(isLogin).to.be.eq(true) }) .catch((error) => { console.error(error) expect(error).not.exist }) .finally(() => { if (degiro.isLogin()) degiro.logout() // <-- Nos "da igual" si falla o no }) }) it('should return false after log out', async () => { // Creamos la instancia del objecto y comprobamos que se ha creado bien const degiro = new DeGiro() const loginPromise = degiro.login() expect(loginPromise).not.be.rejected loginPromise .then(() => { return degiro.logout().then(() => { const isLogin = degiro.isLogin() expect(isLogin).exist expect(isLogin).to.be.a('boolean') expect(isLogin).to.be.eq(false) }) }) .catch((error) => { console.error(error) expect(error).not.exist }) .finally(() => { if (degiro.isLogin()) degiro.logout() // <-- Nos "da igual" si falla o no }) }) }) ================================================ FILE: tests/login.spec.ts ================================================ // Importamos código ha probar import DeGiro from '../src/main' // Importamos código para probar import { expect } from 'chai' import 'mocha' // Realizamos las pruebas describe('DeGiro login process', () => { it('should successfully log in with environment credentials', async () => { // Creamos la instancia del objecto y comprobamos que se ha creado bien const degiro = new DeGiro() expect(degiro).to.exist expect(degiro).to.be.a('object') expect(degiro).to.be.instanceOf(DeGiro) // Iniciamos el proceso de login, procesamos el then, dejamos sin procesar el catch y devolvemos la promesa return degiro.login().then(() => {}) }) it('should login with previous jsessionId', async () => { // Creamos la instancia del objecto y comprobamos que se ha creado bien const degiroAux = new DeGiro() expect(degiroAux).to.exist expect(degiroAux).to.be.a('object') expect(degiroAux).to.be.instanceOf(DeGiro) // Hacemos login y esperamos con que no falle para obtener un jsessionId const loginPromiseAux = degiroAux.login() expect(loginPromiseAux).not.be.rejected loginPromiseAux.then(() => { // Obtenemos el jsessionID const jsessionId = degiroAux.getJSESSIONID() expect(jsessionId).exist expect(jsessionId).not.to.be.null expect(jsessionId).to.be.a('string') expect(jsessionId).to.have.length // Creamos el degiro a testear y le pasamos el jsession valido del anterior objeto const degiro = new DeGiro({ jsessionId }) const loginPromise = degiro.login() expect(loginPromise).not.be.rejected loginPromise .then((accountData) => { expect(accountData).exist }) .catch((error) => { console.error(error) expect(error).not.exist }) .finally(() => { // Cuando hemos acabado todo cerramos sesion degiroAux.logout() // <-- Cerramos sesión pero nos "da igual que falle o no" }) }) }) describe('DeGiro secure login process', () => { it('should return false before sign in', async () => { try { const degiro = new DeGiro() expect(await degiro.isLogin({ secure: true })).to.be.eq(false) } catch (error) { console.error(error) expect(error).not.exist } }) it('should return true after sign in', async () => { const degiro = new DeGiro() try { await degiro.login() expect(await degiro.isLogin({ secure: true })).to.be.eq(true) await degiro.logout() } catch (error) { console.error(error) expect(error).not.exist } }).timeout(10000) it('should return false after log out', async () =>{ const degiro = new DeGiro() try { await degiro.login() await degiro.logout() expect(await degiro.isLogin({ secure: true })).to.be.eq(false) } catch (error) { console.error(error) expect(error).not.exist } }).timeout(10000) it('should return false when jsessionid is not valid yet and isLogin with secure = false response true yet (secure nice-to-have case)', async () => { try { const degiro = new DeGiro() await degiro.login() const degiroAux = new DeGiro({ jsessionId: degiro.getJSESSIONID() }) await degiroAux.login() expect(await degiro.isLogin({ secure: true })).to.be.eq(true) expect(await degiroAux.isLogin({ secure: true })).to.be.eq(true) // Cerramos sesion desde el aux await degiroAux.logout() expect(degiro.isLogin()).to.be.eq(true) expect(await degiro.isLogin({ secure: true })).to.be.eq(false) expect(degiroAux.isLogin()).to.be.eq(false) expect(await degiroAux.isLogin({ secure: true })).to.be.eq(false) } catch (error) { console.error(error) expect(error).not.exist } }) }) }) ================================================ FILE: tests/logout.spec.ts ================================================ // Importamos código ha probar import DeGiro from '../src/main' // Importamos código para probar import chai, { expect, should } from 'chai' // Add chai as promised import chaiAsPromised from 'chai-as-promised' chai.use(chaiAsPromised) import 'mocha' // Realizamos las pruebas describe('DeGiro logout process', () => { it('should successfully log out after sign in', async () => { // Creamos la instancia del objecto y comprobamos que se ha creado bien const degiro = new DeGiro() expect(degiro).to.exist expect(degiro).to.be.a('object') expect(degiro).to.be.instanceOf(DeGiro) // Iniciamos el proceso de login, procesamos el then, dejamos sin procesar el catch y devolvemos la promesa await degiro.login() return degiro.logout().then(async () => { expect(degiro.isLogin()).to.be.equal(false) expect(degiro.getAccountConfig()).to.be.rejected expect(degiro.getAccountData()).to.be.rejected }) }) }) ================================================ FILE: tests/searchProduct.spec.ts ================================================ // Importamos código ha probar import DeGiro from '../src/main' // Importamos código para probar import { expect } from 'chai' import 'mocha' import { DeGiroProducTypes } from '../src/enums' import { SearchProductResultType } from '../src/types' import { TESLA_STOCK, APPLE_STOCK } from './test_constants' describe('DeGiro searchProduct', () => { it('should return Tesla ($TSLA) stock', async () => { try { const degiro = new DeGiro() await degiro.login() const products: SearchProductResultType[] = await degiro.searchProduct({ text: 'Tesla', type: DeGiroProducTypes.shares, limit: 1, }) // Check if result is an array with one result expect(products).to.be.a('array') expect(products.length).to.be.eq(1) // Check if the result is an object const result = products[0] expect(result).exist expect(result).to.be.a('object') // Check if is the correct object const { id, name, isin, symbol, exchangeId } = result expect(id).exist expect(id).to.be.a('string') expect(id).to.be.eq(TESLA_STOCK.ID) expect(name).exist expect(name).to.be.a('string') expect(name).to.be.eq(TESLA_STOCK.NAME) expect(isin).exist expect(isin).to.be.a('string') expect(isin).to.be.eq(TESLA_STOCK.ISIN) expect(symbol).exist expect(symbol).to.be.a('string') expect(symbol).to.be.eq(TESLA_STOCK.SYMBOL) expect(exchangeId).exist expect(exchangeId).to.be.a('string') expect(exchangeId).to.be.eq(TESLA_STOCK.EXCHANGE_ID) await degiro.logout() } catch (error) { console.error(error) expect(error).not.exist } }).timeout(10000) it('should return Apple Inc ($AAPL) stock', async () => { try { const degiro = new DeGiro() await degiro.login() const products: SearchProductResultType[] = await degiro.searchProduct({ text: 'Apple', type: DeGiroProducTypes.shares, limit: 1, }) // Check if result is an array with one result expect(products).to.be.a('array') expect(products.length).to.be.eq(1) // Check if the result is an object const result = products[0] expect(result).exist expect(result).to.be.a('object') // Check if is the correct object const { id, name, isin, symbol, exchangeId } = result expect(id).exist expect(id).to.be.a('string') expect(id).to.be.eq(APPLE_STOCK.ID) expect(name).exist expect(name).to.be.a('string') expect(name).to.be.eq(APPLE_STOCK.NAME) expect(isin).exist expect(isin).to.be.a('string') expect(isin).to.be.eq(APPLE_STOCK.ISIN) expect(symbol).exist expect(symbol).to.be.a('string') expect(symbol).to.be.eq(APPLE_STOCK.SYMBOL) expect(exchangeId).exist expect(exchangeId).to.be.a('string') expect(exchangeId).to.be.eq(APPLE_STOCK.EXCHANGE_ID) await degiro.logout() } catch (error) { console.error(error) expect(error).not.exist } }).timeout(10000) it('should return more that 5 items when search "a"', async () => { try { const degiro = new DeGiro() await degiro.login() // Search text "A" const products: SearchProductResultType[] = await degiro.searchProduct({ text: 'a', limit: 10 }) // Check if result is an array with one result expect(products).to.be.a('array') expect(products.length).to.be.gt(5) await degiro.logout() } catch (error) { console.error(error) expect(error).not.exist } }) }) ================================================ FILE: tests/test_constants.ts ================================================ /* Tesla ($TSLA) stock inmutable data */ export enum TESLA_STOCK { ID = '1153605', ISIN = 'US88160R1014', EXCHANGE_ID = '663', NAME = 'Tesla', SYMBOL = 'TSLA', } /* Apple ($AAPL) stock inmutable data */ export enum APPLE_STOCK { ID = '331868', ISIN = 'US0378331005', EXCHANGE_ID = '663', NAME = 'Apple Inc', SYMBOL = 'AAPL', } ================================================ FILE: tsconfig.json ================================================ { "compilerOptions": { /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ "declaration": true, /* Generates corresponding '.d.ts' file. */ "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ "outDir": "dist", /* Redirect output structure to the directory. */ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ // "removeComments": true, /* Do not emit comments to output. */ // "noEmit": true, /* Do not emit outputs. */ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ /* Strict Type-Checking Options */ "strict": true, /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ // "noUnusedLocals": true, /* Report errors on unused locals. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ /* Advanced Options */ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ }, "include": [ "src" ] } ================================================ FILE: tslint.json ================================================ { "defaultSeverity": "error", "extends": "tslint-config-airbnb", "jsRules": {}, "rules": { "eofline": false, "semicolon":false, "import-name": [false, "ignore-modules"], "no-increment-decrement": false, "max-line-length": [ true, { "limit": 200, "ignore-pattern": "^import |^export {(.*?)}", "check-strings": true, "check-regex": true } ], "quotemark":["true", "tick", "backtick"] }, "rulesDirectory": [] }