All Projects → pladaria → Degiro

pladaria / Degiro

Licence: mit
DEGIRO (unoficial) API

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Degiro

Microcks
Kubernetes native tool for mocking and testing API and micro-services
Stars: ✭ 325 (-3.27%)
Mutual labels:  api
Comet
Modern PHP framework for building blazing fast REST APIs, CRUDs and microservices
Stars: ✭ 328 (-2.38%)
Mutual labels:  api
Swaggymnia
Generate Swagger 🌀 documentation for your existing API in Insomnia
Stars: ✭ 336 (+0%)
Mutual labels:  api
Api Guidelines
Microsoft REST API Guidelines
Stars: ✭ 17,897 (+5226.49%)
Mutual labels:  api
The Seo Framework
The SEO Framework WordPress plugin.
Stars: ✭ 329 (-2.08%)
Mutual labels:  api
Clash Royale Api
👑 Clash Royale API that provides information about the game.
Stars: ✭ 333 (-0.89%)
Mutual labels:  api
Laravel Api To Postman
Generate a Postman collection automatically from your Laravel API
Stars: ✭ 320 (-4.76%)
Mutual labels:  api
Socialreaper
Social media scraping / data collection library for Facebook, Twitter, Reddit, YouTube, Pinterest, and Tumblr APIs
Stars: ✭ 338 (+0.6%)
Mutual labels:  api
Ex rated
ExRated, the Elixir OTP GenServer with the naughty name that allows you to rate-limit calls to any service that requires it.
Stars: ✭ 328 (-2.38%)
Mutual labels:  api
Yandex Music Api
Неофициальная Python библиотека для работы с API сервиса Яндекс.Музыка
Stars: ✭ 335 (-0.3%)
Mutual labels:  api
Ccxt
A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
Stars: ✭ 22,501 (+6596.73%)
Mutual labels:  api
Airtable Python Wrapper
Python Airtable Client Wrapper
Stars: ✭ 328 (-2.38%)
Mutual labels:  api
Laravel Api
Laravel API starter Kit will provide you with the tools for making API's that everyone will love
Stars: ✭ 334 (-0.6%)
Mutual labels:  api
Wp Graphql Woocommerce
Add WooCommerce support and functionality to your WPGraphQL server
Stars: ✭ 318 (-5.36%)
Mutual labels:  api
React Refetch
A simple, declarative, and composable way to fetch data for React components
Stars: ✭ 3,418 (+917.26%)
Mutual labels:  api
Zoonavigator
Web-based ZooKeeper UI / editor / browser
Stars: ✭ 326 (-2.98%)
Mutual labels:  api
Materialhome
一个基于 Material Design 风格设计的图书展示类App,豆瓣图书,在线电子书。
Stars: ✭ 331 (-1.49%)
Mutual labels:  api
Iota.py
PyOTA: The IOTA Python API Library
Stars: ✭ 337 (+0.3%)
Mutual labels:  api
Powershellforgithub
Microsoft PowerShell wrapper for GitHub API
Stars: ✭ 337 (+0.3%)
Mutual labels:  api
Mtapi
MetaTrader API
Stars: ✭ 334 (-0.6%)
Mutual labels:  api

DeGiro API

This is an unofficial Node.js API client 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.

DeGiro is Europe's fastest growing online stockbroker. DeGiro distinguishes itself by offering institutional fees to retail investors.

⚠️ DeGiro could change their API at any moment, if something is not working, please open an issue.

Install

# using npm
npm install --save degiro

# using yarn
yarn add degiro

Examples

create

const DeGiro = require('degiro');
const degiro = DeGiro.create({username: 'johndoe', password: '1234'});

You can also provide your user and pass via environment variables:

// run as:
// DEGIRO_USER=johndoe DEGIRO_PASS=1234 node app.js

const DeGiro = require('degiro');
// now you don't need to provide your credentials
const degiro = DeGiro.create();

login

Performs the login to DeGiro using the username and password and gets a new session id and the account number.

degiro.login().then(session => console.log(session));
// prints session info (session id and account number)

Two factor authentication is also supported. Pass the 2fa token through javascript or as an environment variable.

const DeGiro = require('degiro');
// alternatively run as:
// DEGIRO_USER=johndoe DEGIRO_PASS=1234 DEGIRO_ONE_TIME_PASS=123456 node app.js
const degiro = DeGiro.create({username: 'johndoe', password: '1234', oneTimePassword: '123456'});

You can reuse your sessions if you provide the id and account number via environment variables (DEGIRO_SID and DEGIRO_ACCOUNT), direct assignment or constructor parameters.

// set session info via constructor
const degiro = DeGiro.create({sessionId: '', account: 123456});

// set session assigning session variables
degiro.session.id = 'your-session-id';
degiro.session.account = 'your-account-number';

getCashFunds

degiro.getCashFunds().then(console.log);
// {
//   cashFunds: [
//     {id: '2', name: 'EUR', value: 1935.8, valueBaseCurr: 1935.8, rate: 1},
//     {id: '9885', name: 'USD', value: 0, valueBaseCurr: 0, rate: 0.9102},
//     ...
//   ]
// }

getPortfolio

degiro.getPortfolio().then(console.log);
// {
//   "portfolio": [
//     {
//       "name": "positionrow",
//       "id": 1156604,
//       "value": [
//         {
//           "name": "id",
//           "value": "1156604",
//           "isAdded": true
//         },
//         {
//           "name": "product",
//           "value": "DEUTSCHE BANK AG COMMO",
//           "isAdded": true
//         },
//         ...

setOrder (buy/sell)

This example sets a permanent buy order 10 Google shares at a fixed price of $900

degiro
    .setOrder({
        buySell: DeGiro.Actions.buy,
        orderType: DeGiro.OrderTypes.limited,
        productId: '8066561',
        timeType: DeGiro.TimeTypes.permanent,
        size: 10,
        price: 900,
    })
    .then(console.log); // prints the order id

This example sets a sell order of 5 Google shares at market price

degiro
    .setOrder({
        buySell: DeGiro.Actions.sell,
        orderType: DeGiro.OrderTypes.marketOrder,
        productId: '8066561',
        size: 5,
    })
    .then(console.log); // prints the order id

Order options

  • orderType: number
    • DeGiro.OrderTypes.limited
    • DeGiro.OrderTypes.marketOrder
    • DeGiro.OrderTypes.stopLoss
    • DeGiro.OrderTypes.stopLimited
  • productId: string
  • timeType: number
    • DeGiro.TimeTypes.day
    • DeGiro.TimeTypes.permanent
  • price: number - Required for limited and stopLimited orders
  • size: number - Order size
  • stopPrice: number - Required for stopLoss and stopLimited orders

searchProduct

degiro.searchProduct({text: 'GOOG'})).then(console.log);
/*
{ offset: 0,
  products:
   [ { vwdIdentifierType: 'issueid',
       productTypeId: 1,
       symbol: 'GOOGL',
       tradable: true,
       marketAllowed: true,
       sellAmountAllowed: true,
       orderBookDepth: 0,
       joinOrderAllowed: false,
       vwdId: '350009261',
       contractSize: 1,
       isFund: false,
       stopLimitOrderAllowed: true,
       putCall: '0',
       currency: 'USD',
       id: '8066561',
       category: 'A',
       limitHitOrderAllowed: false,
       feedQuality: 'D15',
       stoplossAllowed: true,
       name: 'ALPHABET INC. - CLASS',
       gtcAllowed: true,
       exchangeId: '663',
       isin: 'US02079K3059' },
     ...
*/

Search options

  • text string - Search term. For example: "Netflix" or "NFLX"
  • productType number - See DeGiro.ProductTypes. Defaults to all
  • sortColumn number - Column to sory by. For example: 'name'.
  • sortType number
    • DeGiro.SortTypes.asc
    • DeGiro.SortTypes.desc
  • limit number - Results limit. Defaults to 7
  • offset number - Results offset. Defaults to 0

askBidPrice

degiro.getAskBidPrice('350009261').then(console.log);

getProductsById

degiro.getProductsByIds(['8066561', '350009261'])).then(console.log);
// displays product details

getClientInfo

Requests client info (name, email, address, role, etc) to the server and updates the session information

degiro.getClientInfo().then(console.log);
// displays client information

You can also access this information in degiro.session.clientInfo after a successful login

Examples

See examples

Contributors

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].