Giter Club home page Giter Club logo

trading212desktopapp's Introduction

Trading212DesktopApp

Description

The goal of this project is to get your Trading212 portfolio, calculate your returns and show everything clearly without having to log in to the Trading 212 website. This is achieved by getting the order information from a provided csv and searching in yahoo finance for the current prices of the stocks. This is a more interactive version of my Trading212Portfolio.

Image example of program output

When you hover over a slice of the donut chart it shows you the stock ticker, the current value of this investment and the percentage of your portfolio it occupies. Click on any any ticker in the legend under the chart to remove it or add it back in the chart.

Information

This project is designed for accounts with EURO currency. It converts Usd, GBp, and Nok to euro. If you want to change it to your currency or add more conversions follow the instructions here

Installation

  • Run the command npx create-electron-app trading212_desktop_app to create the skeleton of an electon app using electron forge.
  • Delete the package.json file and src folder in your install location and replace them with my own files. (Alternatively you can keep your package.json if you change "main": "src/index.js" to "main": "src/main.js")
  • Go to src\python (inside your install location) and replace my orders.csv with your own. (Don't forget to name it the same).

Instructions on how to download your order data from Trading 212 here. Select ONLY the orders as included data.

How to use

  • Open src\python\myPortfolio.py and run it in order to make a local server
  • Open a terminal and cd to your install location. Run the command npm start

How to create a proper executable

  • Open a terminal and cd to your install location. Run the command npm run make

Change or add currencies

  1. Go to the yahooInfo function of src\python\stockAndCurrencyData.py and locate where we get the currency rates
  • Here you can add more currency conversions. For example to get the conversion rate from Swedish Krona to Euro add sekEuroRate = c.getRate('SEK', 'EUR')
  • If you want to change the currency from Euro to your currency (for example Usd) you need to change the commands like this:

euroUsdRate = c.getRate('EUR', 'USD')

gbpUsdRate = c.getRate('GBP', 'USD')

nokUsdRate = c.getRate('NOK', 'USD')

  1. Locate where we convert everything to euros

  • To add your currency conversion add another elif statement after the last one. For example to use the sekEuroRate which we created in the above example you need to add

elif currency == "SEK": curPrice = sekEurRate*curPrice (use the correct python spacing)

  • To change the currency from Euro to your currency (for example Usd) you need to change the commands like this:

if currency == "EUR": curPrice = eurUsdRate*curPrice elif currency == "GBp": curPrice = gbpUsdRate*curPrice*0.01 elif currency == "NOK": curPrice = nokUsdRate*curPrice (use the correct python spacing)

Dependencies

For Electron

For Python

trading212desktopapp's People

Contributors

alexandros-aristovoulos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.