Merge pull request #445 from Chavithra/feature/DegiroIntegration

Degiro integration : update porfolio commands
This commit is contained in:
DidierRLopes
2021-05-17 23:21:48 +01:00
committed by GitHub
11 changed files with 850 additions and 173 deletions

View File

@@ -229,23 +229,41 @@ git stash pop
The project is build around several different API calls, whether it is to access historical data or financials.
These are the ones where a key is necessary:
* Alpha Vantage: https://www.alphavantage.co
* Quandl: https://www.quandl.com/tools/api
* Reddit: https://www.reddit.com/prefs/apps
* Twitter: https://developer.twitter.com
* Polygon: https://polygon.io
* Financial Modeling Prep: https://financialmodelingprep.com/developer
* FRED: https://fred.stlouisfed.org/docs/api/api_key.html
* News API: https://newsapi.org
* Tradier: https://developer.tradier.com/getting_started
* Oanda API: https://developer.oanda.com
* CoinMarketCap API: https://coinmarketcap.com/api/
* Finhub API: https://finnhub.io
* Binance: https://binance.us (US) / https://binance.com (Outside US)
* Alpha Vantage: https://www.alphavantage.co
* Binance: https://binance.us (US) / https://binance.com (Outside US)
* CoinMarketCap API: https://coinmarketcap.com/api
* Degiro API : https://www.degiro.fr
* FRED: https://fred.stlouisfed.org/docs/api/api_key.html
* Financial Modeling Prep: https://financialmodelingprep.com/developer
* Finhub API: https://finnhub.io
* News API: https://newsapi.org
* Oanda API: https://developer.oanda.com
* Polygon: https://polygon.io
* Quandl: https://www.quandl.com/tools/api
* Reddit: https://www.reddit.com/prefs/apps
* Tradier: https://developer.tradier.com/getting_started
* Twitter: https://developer.twitter.com
When these are obtained, don't forget to update [config_terminal.py](/gamestonk_terminal/config_terminal.py).
Alternatively, you can also set them to the following environment variables: GT_API_KEY_ALPHAVANTAGE, GT_API_KEY_FINANCIALMODELINGPREP, GT_API_KEY_QUANDL, GT_API_REDDIT_CLIENT_ID, GT_API_REDDIT_CLIENT_SECRET, GT_API_REDDIT_USERNAME, GT_API_REDDIT_USER_AGENT, GT_API_REDDIT_PASSWORD, GT_API_TWITTER_KEY, GT_API_TWITTER_SECRET_KEY, GT_API_TWITTER_BEARER_TOKEN, GT_API_POLYGON_KEY, GT_FRED_API_KEY, GT_API_NEWS_TOKEN, GT_OANDA_TOKEN, GT_OANDA_ACCOUNT, GT_TRADIER_TOKEN, GT_CMC_API_KEY, GT_CMC_API_KEY, API_FINNHUB_KEY, GT_API_BINANCE_KEY, GT_API_BINANCE_SECRET.
Alternatively, you can also set them to the following environment variables:
| Website | Variables |
| :--- | :--- |
| [Alpha Vantage](https://www.alphavantage.co) | GT_API_KEY_ALPHAVANTAGE |
| [Binance](https://binance.com) | GT_API_BINANCE_KEY <br/> GT_API_BINANCE_SECRET |
| [CoinMarketCap](https://coinmarketcap.com) | GT_CMC_API_KEY <br/> GT_CMC_API_KEY |
| [DEGIRO](https://www.degiro.fr) | DG_USERNAME <br/> DG_PASSWORD <br/> DG_TOTP <br/> DG_TOTP_SECRET |
| [FRED](https://fred.stlouisfed.org) | GT_FRED_API_KEY |
| [Financial Modeling Prep](https://financialmodelingprep.com) | GT_API_KEY_FINANCIALMODELINGPREP |
| [Finhub](https://finnhub.io) | API_FINNHUB_KEY |
| [News](https://newsapi.org) | GT_API_NEWS_TOKEN |
| [Oanda](https://developer.oanda.com) | GT_OANDA_TOKEN <br/> GT_OANDA_ACCOUNT |
| [Polygon](https://polygon.io) | GT_API_POLYGON_KEY |
| [Quandl](https://www.quandl.com) | GT_API_KEY_QUANDL |
| [Reddit](https://www.reddit.com) | GT_API_REDDIT_CLIENT_ID <br> GT_API_REDDIT_CLIENT_SECRET <br/> GT_API_REDDIT_USERNAME <br/> GT_API_REDDIT_USER_AGENT <br/> GT_API_REDDIT_PASSWORD|
| [Tradier](https://developer.tradier.com) | GT_TRADIER_TOKEN |
| [Twitter](https://developer.twitter.com) | GT_API_TWITTER_KEY <br/> GT_API_TWITTER_SECRET_KEY <br/> GT_API_TWITTER_BEARER_TOKEN |
Example:
```
@@ -362,6 +380,7 @@ Feel free to share loss porn, memes or any questions at:
* Get in touch in our [#gui](https://discord.gg/gQ3VxXEj) discord channel.
* **1lluz10n**, **crspy**, and **martiaaz** : Working on our landing page https://gamestonkterminal.vercel.app.
* Get in touch in our [#landing-page](https://discord.gg/wkyB4xcb) discord channel.
* **Chavithra** and **Deel18** : for Degiro's integration.
## Acknowledgments

View File

@@ -45,6 +45,7 @@ RH_PASSWORD = os.getenv("GT_RH_PASSWORD") or "REPLACE_ME"
# Degiro
DG_USERNAME = os.getenv("GT_DG_USERNAME") or "REPLACE_ME"
DG_PASSWORD = os.getenv("GT_DG_PASSWORD") or "REPLACE_ME"
DG_TOTP_SECRET = os.getenv("GT_DG_TOTP_SECRET") or None
# https://developer.oanda.com
OANDA_ACCOUNT = os.getenv("GT_OANDA_ACCOUNT") or "REPLACE ME"

View File

@@ -3,9 +3,10 @@
This page shows the available brokers for loading in data. If yours is not listed, please submit a new issue and we will look at adding it.
Current brokers:
* Robinhood
* Alpaca
* Ally
* rh : Robinhood
* alp : Alpaca
* ally: Ally
* dg : Degiro
Once this screen is accessed, the first command to be run is
@@ -41,6 +42,22 @@ Your login information should be stored as environment variables in [config fil
* [allyhold](#allyhold)
* Look at Ally Invest Holdings
[DEGIRO](#DEGIRO)
* [login](#login)
* Connect to your Degiro account
* [hold](#hold)
* Command to look at current holdings
* [topnews](#topnews)
* Command to get top news preview
* [lastnews](#lastnews)
* Command to get latest news
* [companynews](#companynews)
* Command to get news about a company with it's isin
* [lookup](#lookup)
* Command to search for a product by name
* [pending](#pending)
* Command to list pending orders
[Merge](#Merge)
* [hold](#hold)
* View holdings across all brokers
@@ -140,6 +157,112 @@ usage : allyhold
````
No additional flags.
## DEGIRO <a name="DEGIRO"></a>
**Sub-menu**
````
usage:
pa
degiro
login
````
To use the `degiro` sub-menu you need to :
* Enter `portfolio analysis`, with the command : `pa`
* Enter `degiro` sub-menu using the command: `degiro`
* Connect to `degiro` by typing : `login`
**Credentials**
In order to login you need to provide the following credentials :
| Parameter | Description |
| :--- | :--- |
| DG_USERNAME | Username used to log into Degiro's website. |
| DG_PASSWORD | Password used to log into Degiro's website. |
**2FA**
In order to use 2FA you need to provide one of these parameters :
| Parameter | Description |
| :--- | :--- |
| DG_TOTP_SECRET | This secret key will let Gamestonk generate the `OneTimePassword` for you. |
If you provide your `DG_TOTP_SECRET` : you won't have to type your `OneTimePassword`, Gamestonk will generate it for you at each connection.
`DG_TOTP_SECRET` is the text representation of the `QRCODE` that Degiro's provide you when you enable 2FA.
More information on 2FA credentials, in the documentation of this library :
https://github.com/Chavithra/degiro-connector
### login <a name="login"></a>
````
usage: login [-u USERNAME] [-p PASSWORD] [-o OTP] [-s TOPT_SECRET] [-h]
optional arguments:
-u USERNAME, --username USERNAME
Username in Degiro's account.
-p PASSWORD, --password PASSWORD
Password in Degiro's account.
-o OTP, --otp OTP One time password (2FA).
-s TOPT_SECRET, --topt-secret TOPT_SECRET
TOTP SECRET (2FA).
-h, --help show this help message
````
### hold <a name="hold"></a>
````
usage: hold
````
Displays current holdings to the console.
### topnews <a name="topnews"></a>
````
usage: topnews
````
### lastnews <a name="lastnews"></a>
````
usage: lastnews
````
### companynews <a name="companynews"></a>
````
usage: companynews NL0000235190
````
You need to provide the `ISIN` number of the company.
You can get this `ISIN` using the `dglookup` command for instance.
### lookup <a name="lookup"></a>
````
usage: lookup TESLA
````
It will display a result like this :
```
name isin symbol productType currency closePrice closePriceDate
0 Tesla US88160R1014 TSLA STOCK USD 571.690 2021-05-13
1 Tesla Inc US88160R1014 TL0 STOCK EUR 478.000 2021-05-13
2 Tesla Inc US88160R1014 TL0 STOCK EUR 467.650 2021-05-13
3 TurboC O.End Tesla 535,04 DE000VQ1S3R3 None WARRANT EUR 3.740 2021-05-13
4 TurboC O.End Tesla 591,4 DE000VQ5R6T9 None WARRANT EUR 0.001 2021-05-13
5 TurboP O.End Tesla 685,29 DE000VQ7HWU6 None WARRANT EUR 9.870 2021-05-13
6 TurboC O.End Tesla 448,63 DE000VQ1KYG8 None WARRANT EUR 10.890 2021-05-13
7 Call 17.12.21 Tesla 392 DE000VP53547 DE000VP53547 WARRANT EUR 8.960 2021-05-13
8 Call 20.01.23 Tesla 720 DE000VQ68691 None WARRANT EUR 1.160 2021-05-13
9 Leverage Shares 1x Tesla ETP IE00BKT6ZH01 STSL ETF GBX 135.550 2021-05-13
```
### pending <a name="pending"></a>
````
usage: pending
````
## Merge <a name="Merge"></a>
When logged into 1 or more brokers - this option is available. Currently, this allows for

View File

@@ -0,0 +1,537 @@
# IMPORTATION STANDARD
import argparse
# IMPORTATION THIRDPARTY
import pandas as pd
import quotecast.helpers.pb_handler as pb_handler
from prompt_toolkit.completion import NestedCompleter
from trading.api import API as TradingAPI
from trading.pb.trading_pb2 import (
Credentials,
LatestNews,
NewsByCompany,
ProductsInfo,
ProductSearch,
Update,
)
# IMPORTATION INTERNAL
import gamestonk_terminal.config_terminal as config
from gamestonk_terminal import feature_flags as gtff
from gamestonk_terminal.helper_funcs import (
get_flair,
parse_known_args_and_warn,
)
from gamestonk_terminal.menu import session
class DegiroController:
CHOICES = [
"companynews",
"hold",
"lastnews",
"login",
"logout",
"lookup",
"pending",
"q",
"quit",
"topnews",
]
@staticmethod
def filter_current_positions(
portfolio: Update.Portfolio,
) -> pd.DataFrame:
"""Filter the positions in order to keep only held ones.
Parameters
----------
portfolio : Update.Portfolio
Portfolio returned from the API.
Returns
-------
pd.DataFrame
Filtered portfolio.
"""
# CONVERT TO DATAFRAME
portfolio_dict = pb_handler.message_to_dict(message=portfolio)
positions = pd.DataFrame(portfolio_dict["values"])
# SETUP MASK
mask_product = positions["positionType"] == "PRODUCT"
mask_not_empty = positions["size"] > 0
mask_current_position = mask_product & mask_not_empty
# FILTER
positions = positions[mask_current_position]
return positions
def __init__(self, credentials: Credentials):
self.__default_credentials = credentials
self.__trading_api = TradingAPI(credentials=credentials)
self.__degiro_parser = argparse.ArgumentParser(
add_help=False,
prog="degiro",
)
self.__degiro_parser.add_argument("cmd", choices=self.CHOICES)
def q(self, _):
"""Process Q command - quit the menu"""
return False
def quit(self, _):
"""Process Quit command - quit the program"""
return True
def fetch_additional_information(
self,
positions: pd.DataFrame,
) -> pd.DataFrame:
"""Fetch extra information about the positions like :
- name
- isin
- symbol
- ...
Parameters
----------
positions : pd.DataFrame
Positions from which we want extra fields.
Returns
-------
pd.DataFrame
Positions with additional data.
"""
# GET ATTRIBUTES
trading_api = self.__trading_api
# EXTRACT POSITIONS IDS
positions_ids = positions["id"].astype("int32").tolist()
# FETCH EXTRA DATA
request = ProductsInfo.Request()
request.products.extend(positions_ids)
products_info_pb = trading_api.get_products_info(
request=request,
raw=False,
)
# CONVERT TO DICT
products_info_dict = pb_handler.message_to_dict(
message=products_info_pb,
)
# CONVERT TO DATAFRAME
products_info = pd.DataFrame(products_info_dict["values"].values())
# MERGE DATA WITH POSITIONS
positions_full = pd.merge(positions, products_info, on="id")
return positions_full
def fetch_current_positions(self) -> pd.DataFrame:
# GET ATTRIBUTES
trading_api = self.__trading_api
# FETCH HELD PRODUCTS
request_list = Update.RequestList()
request_list.values.extend(
[
Update.Request(
option=Update.Option.PORTFOLIO,
last_updated=0,
),
]
)
update_pb = trading_api.get_update(
request_list=request_list,
raw=False,
)
positions_partial = self.filter_current_positions(
portfolio=update_pb.portfolio,
)
# FETCH ADDITIONAL DATA ON PRODUCTS
positions = self.fetch_additional_information(
positions=positions_partial,
)
return positions
def help(self):
message = (
"Degiro:\n"
" companynews view news about a company with it's isin\n"
" hold view holdings\n"
" lastnews view latest news\n"
" login connect to degiro's api\n"
" logout disconnect from degiro's api\n"
" lookup view search for a product by name\n"
" pending view pending orders\n"
" topnews view top news preview\n"
)
print(message)
def login(self, l_args):
"""Connect to Degiro's API."""
# PARSING ARGS
default_credentials = self.__default_credentials
parser = argparse.ArgumentParser(
add_help=False,
prog="login",
)
parser.add_argument(
"-u",
"--username",
dest="username",
type=str,
default=default_credentials.username,
help="Username in Degiro's account.",
)
parser.add_argument(
"-p",
"--password",
dest="password",
type=str,
default=default_credentials.password,
help="Password in Degiro's account.",
)
parser.add_argument(
"-o",
"--otp",
dest="otp",
type=int,
default=None,
help="One time password (2FA).",
)
parser.add_argument(
"-s",
"--topt-secret",
dest="topt_secret",
type=str,
default=None,
help="TOTP SECRET (2FA).",
)
ns_parser = parse_known_args_and_warn(parser, l_args)
if ns_parser:
credentials = Credentials()
credentials.CopyFrom(default_credentials)
credentials.username = ns_parser.username
credentials.password = ns_parser.password
if ns_parser.otp is not None:
credentials.one_time_password = ns_parser.otp
if ns_parser.topt_secret is not None:
credentials.totp_secret_key = ns_parser.topt_secret
self.__trading_api = TradingAPI(credentials=credentials)
self.__trading_api.connect()
self.setup_extra_credentials()
print("You are now logged in !")
def logout(self, _):
"""Log out from Degiro's API."""
# GET ATTRIBUTES
trading_api = self.__trading_api
trading_api.logout()
print("You are now logged out !")
def setup_extra_credentials(self):
trading_api = self.__trading_api
client_details_table = trading_api.get_client_details()
int_account = client_details_table["data"]["intAccount"]
trading_api.credentials.int_account = int_account
def hold(self, _):
"""Display held products."""
# FETCH HELD PRODUCTS
positions = self.fetch_current_positions()
# FORMAT DATAFRAME
selected_columns = [
"symbol",
"size",
"price",
"closePrice",
"breakEvenPrice",
]
formatted_columns = [
"Stonk",
"Size",
"Last Price",
"Close Price",
"Break Even Price",
]
fmt_positions = positions[selected_columns].copy(deep=True)
fmt_positions.columns = formatted_columns
fmt_positions["% Change"] = positions["price"]
fmt_positions["% Change"] -= fmt_positions["Close Price"]
fmt_positions["% Change"] /= fmt_positions["Close Price"]
fmt_positions["% Change"] = fmt_positions["% Change"].round(3)
# DISPLAY DATAFRAME
print(fmt_positions)
def topnews(self, _):
"""Display pending orders."""
# GET ATTRIBUTES
trading_api = self.__trading_api
# FETCH DATA
news = trading_api.get_top_news_preview(raw=True)
# DISPLAY DATA
for article in news["data"]["items"]:
print("date", article["date"])
print("lastUpdated", article["lastUpdated"])
print("category", article["category"])
print("title", article["title"])
print("brief", article["brief"])
print("---")
def lookup(self, l_args):
"""Search for products by their name."""
# PARSING ARGS
parser = argparse.ArgumentParser(
add_help=False,
prog="lookup",
)
parser.add_argument(
"search_text",
type=str,
help="Name of the company or a text.",
)
parser.add_argument(
"-l",
"--limit",
type=int,
default=10,
help="Number of result expected (0 for unlimited).",
)
parser.add_argument(
"-o",
"--offset",
type=int,
default=0,
help="To use an offset.",
)
ns_parser = parse_known_args_and_warn(parser, l_args)
# GET ATTRIBUTES
trading_api = self.__trading_api
# SETUP REQUEST
limit = ns_parser.limit
offset = ns_parser.offset
search_text = ns_parser.search_text
request_lookup = ProductSearch.RequestLookup(
search_text=search_text,
limit=limit,
offset=offset,
)
# FETCH DATA
products = trading_api.product_search(
request=request_lookup,
raw=True,
)
# DISPLAY DATA
if "products" in products:
products_df = pd.DataFrame(products["products"])
products_selected = products_df[
[
"name",
"isin",
"symbol",
"productType",
"currency",
"closePrice",
"closePriceDate",
]
]
print(products_selected)
else:
print("0 results found.")
def lastnews(self, _):
"""Display latest news."""
# GET ATTRIBUTES
trading_api = self.__trading_api
# SETUP REQUEST
request = LatestNews.Request(
offset=0,
languages="en,fr",
limit=20,
)
# FETCH DATA
news = trading_api.get_latest_news(request=request, raw=True)
# DISPLAY DATA
for article in news["data"]["items"]:
print("date", article["date"])
print("title", article["title"])
print("content", article["content"])
print("---")
def companynews(self, l_args):
"""Display news related to a company using its ISIN."""
# PARSING ARGS
parser = argparse.ArgumentParser(
add_help=False,
prog="companynews",
)
parser.add_argument(
"isin",
type=str,
help="ISIN code of the company.",
)
ns_parser = parse_known_args_and_warn(parser, l_args)
# GET ATTRIBUTES
trading_api = self.__trading_api
# SETUP REQUEST
isin = ns_parser.isin
request = NewsByCompany.Request(
isin=isin,
limit=10,
offset=0,
languages="en,fr",
)
# FETCH DATA
news = trading_api.get_news_by_company(
request=request,
raw=True,
)
# DISPLAY DATA
for article in news["data"]["items"]:
print("date", article["date"])
print("title", article["title"])
print("content", article["content"])
print("isins", article["isins"])
print("---")
def pending(self, _):
"""Display pending orders."""
# GET ATTRIBUTES
trading_api = self.__trading_api
# SETUP REQUEST
request_list = Update.RequestList()
request_list.values.extend(
[
Update.Request(option=Update.Option.ORDERS, last_updated=0),
]
)
# FETCH DATA
update = trading_api.get_update(request_list=request_list)
# FORMAT DATA
update_dict = pb_handler.message_to_dict(message=update)
orders_df = pd.DataFrame(update_dict["orders"]["values"])
# DISPLAY DATA
if orders_df.shape[0] == 0:
print("No pending orders.")
else:
print(orders_df)
def switch(self, an_input: str):
"""Process and dispatch input
Returns
-------
True, False or None
False - quit the menu
True - quit the program
None - continue in the menu
"""
try:
degiro_parser = self.__degiro_parser
(known_args, other_args) = degiro_parser.parse_known_args(an_input.split())
return getattr(
self,
known_args.cmd,
lambda: "Command not recognized!",
)(other_args)
except Exception as e:
print(e)
print("")
return None
def menu():
"""Degiro Menu"""
# SETUP CREDENTIALS
credentials = Credentials(
int_account=None,
username=config.DG_USERNAME,
password=config.DG_PASSWORD,
one_time_password=None,
totp_secret_key=config.DG_TOTP_SECRET,
)
# SETUP CONTROLLER
degiro_controller = DegiroController(credentials=credentials)
degiro_controller.help()
while True:
# Get input command from user
if session and gtff.USE_PROMPT_TOOLKIT:
completer = NestedCompleter.from_nested_dict(
{c: None for c in degiro_controller.CHOICES}
)
an_input = session.prompt(
f"{get_flair()} (pa)>(degiro)> ",
completer=completer,
)
else:
an_input = input(f"{get_flair()} (pa)>(degiro)> ")
try:
process_input = degiro_controller.switch(an_input)
if process_input is not None:
return process_input
except SystemExit:
print("The command selected doesn't exist\n")
continue

View File

@@ -1,62 +0,0 @@
import degiroapi
import pandas as pd
import yfinance as yf
from termcolor import colored
from gamestonk_terminal.config_terminal import DG_USERNAME as user, DG_PASSWORD as pw
from gamestonk_terminal.portfolio.portfolio_helpers import dg_positions_to_df
degiro = degiroapi.DeGiro()
def login():
degiro.login(user, pw)
def logout():
degiro.logout()
def show_holdings():
# Fetch current portfolio
portfolio = degiro.getdata(degiroapi.Data.Type.PORTFOLIO, True)
print("")
print("Stonk\t Size\t last price \t prev close \t breakeven \t % Change")
print("")
# Loop to get stock info based on id provided in portfolio
# showcase portfolio
for stock in portfolio:
if stock["positionType"] == "PRODUCT":
stock_info = degiro.product_info(stock["id"])
real_time_info = degiro.real_time_price(
stock["id"], degiroapi.Interval.Type.One_Day
)
size = stock["size"]
break_even = stock["breakEvenPrice"]
stonk = stock_info["symbol"]
last_price = real_time_info[0]["data"]["lastPrice"]
prev_close = real_time_info[0]["data"]["previousClosePrice"]
pct_change = round((last_price - prev_close) / prev_close, 3)
to_pr = f"{stonk}\t {size}\t {last_price}\t\t {prev_close}\t\t {break_even}\t\t {pct_change}"
if last_price >= prev_close:
print(colored(to_pr, "green"))
else:
print(colored(to_pr, "red"))
print("")
def return_holdings() -> pd.DataFrame:
portfolio = degiro.getdata(degiroapi.Data.Type.PORTFOLIO, True)
holds = []
for stock in portfolio:
if stock["positionType"] == "PRODUCT":
stock_info = degiro.product_info(stock["id"])
yf_data = yf.Ticker(stock_info["symbol"])
stock["id"] = stock_info["symbol"]
stock["marketValue"] = (
yf_data.info["previousClose"] * yf_data.info["sharesOutstanding"]
)
holds.append(stock)
return dg_positions_to_df(holds)

View File

@@ -8,7 +8,12 @@ from prompt_toolkit.completion import NestedCompleter
from gamestonk_terminal import feature_flags as gtff
from gamestonk_terminal.helper_funcs import get_flair
from gamestonk_terminal.menu import session
from gamestonk_terminal.portfolio import rh_api, alp_api, ally_api, dg_api
from gamestonk_terminal.portfolio import (
rh_api,
alp_api,
ally_api,
degiro_api,
)
from gamestonk_terminal.portfolio.portfolio_helpers import (
merge_portfolios,
print_portfolio,
@@ -19,24 +24,23 @@ class PortfolioController:
"""Portfolio Controller"""
CHOICES = [
"alphist",
"alphold",
"allyhold",
"degiro",
"help",
"hold",
"login",
"q",
"quit",
"login",
"rhhold",
"rhhist",
"alphold",
"alphist",
"allyhold",
"dghold",
"hold",
]
BROKERS = [
"rh",
"alp",
"ally",
"dg",
"rh",
]
def __init__(self):
@@ -45,59 +49,40 @@ class PortfolioController:
self.broker_list = set()
self.merged_holdings = None
@staticmethod
def print_help(broker_list):
@classmethod
def print_help(cls, broker_list):
"""Print help"""
print("\nBrokers Supported: rh - Robinhood")
print(" alp - Alpaca")
print(" ally - Ally Invest")
print(" dg - Degiro")
print("\nPortfolio:")
print(" help show this menu again")
print(
" q quit this menu, and shows back to main menu, logs out of brokers"
)
print(" quit quit to abandon program, logs out of brokers")
print(
f"\nCurrent Broker: {('None', ', '.join(broker_list))[bool(broker_list)]}"
"Brokers Supported:\n"
" ally - Ally Invest\n"
" alp - Alpaca\n"
" rh - Robinhood\n"
"\nPortfolio:\n"
" help show this menu again\n"
" q quit this menu, and shows back to main menu, logs out of brokers\n"
" quit quit to abandon program, logs out of brokers\n"
)
print("")
print(" login login to your brokers")
print("\nRobinhood:")
print(" rhhold view rh holdings")
print(" rhhist plot rh portfolio history")
print("Alpaca:")
print(" alphold view alp holdings")
print(" alphist view alp portfolio history")
print("Ally:")
print(" allyhold view ally holdings")
print("Degiro:")
print(" dghold view dg holdings")
print("\nMerge:")
print(" hold view net holdings across all logins")
print("")
def print_portfolio_menu(self):
cls.print_portfolio_menu(broker_list)
@staticmethod
def print_portfolio_menu(broker_list):
print(
f"\nCurrent Brokers : {('None', ', '.join(self.broker_list))[bool(self.broker_list)]}"
f"Current Broker: {('None', ', '.join(broker_list))[bool(broker_list)]}\n\n"
"Ally:\n"
" allyhold view ally holdings\n"
"Alpaca:\n"
" alphold view alp holdings\n"
" alphist view alp portfolio history\n"
"Robinhood:\n"
" rhhold view rh holdings\n"
" rhhist plot rh portfolio history\n"
"\nDegiro:\n"
"> degiro view degiro sub-menu\n"
"\nMerge:\n"
" login login to your brokers\n"
" hold view net holdings across all logins\n"
)
print("\nRobinhood:")
print(" rhhold check holdings")
print(" rhhist plot historical RH portfolio")
print("\nAlpaca:")
print(" alphold view alpaca holdings")
print(" alphist plot historical alpaca portfolio")
print("\nAlly:")
print(" allyhold view ally holdings")
print("\nDegiro:")
print(" dghold view dg holdings")
print("\nMerge:")
print(" hold view net holdings across all logins")
print("")
def switch(self, an_input: str):
"""Process and dispatch input
@@ -109,6 +94,7 @@ class PortfolioController:
True - quit the program
None - continue in the menu
"""
(known_args, other_args) = self.port_parser.parse_known_args(an_input.split())
return getattr(
@@ -117,18 +103,21 @@ class PortfolioController:
def call_help(self, _):
"""Process Help command"""
self.print_help(self.broker_list)
def call_q(self, _):
"""Process Q command - quit the menu"""
return False
def call_quit(self, _):
"""Process Quit command - quit the program"""
return True
def call_login(self, other_args):
broker_list = self.broker_list
logged_in = False
if not other_args:
print("Please enter brokers you wish to login to")
@@ -152,7 +141,7 @@ class PortfolioController:
print(f"{broker} not supported")
if logged_in:
self.print_portfolio_menu()
self.print_portfolio_menu(broker_list)
def call_rhhist(self, other_args: List[str]):
rh_api.plot_historical(other_args)
@@ -181,12 +170,10 @@ class PortfolioController:
print(e)
print("")
def call_dghold(self, _):
try:
dg_api.show_holdings()
except Exception as e:
print(e)
print("")
def call_degiro(self, _):
""" "Process degiro command."""
return degiro_api.menu()
def call_hold(self, _):
holdings = pd.DataFrame(

View File

@@ -63,25 +63,6 @@ def rh_positions_to_df(holds: dict):
return df
def dg_positions_to_df(holds):
df = pd.DataFrame(columns=["Symbol", "MarketValue", "Quantity", "CostBasis"])
sym = []
mv = []
qty = []
cb = []
for stonk in holds:
sym.append(stonk["id"])
qty.append(stonk["size"])
mv.append(stonk["marketValue"])
cb.append(stonk["breakEvenPrice"])
df["Symbol"] = sym
df["MarketValue"] = mv
df["Quantity"] = qty
df["CostBasis"] = cb
df["Broker"] = "dg"
return df
def merge_portfolios(df: pd.DataFrame) -> pd.DataFrame:
if set(df.columns) != {"Symbol", "MarketValue", "Quantity", "CostBasis", "Broker"}:
print("Check df generation")

109
poetry.lock generated
View File

@@ -482,13 +482,26 @@ optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "degiroapi"
version = "0.9.5"
description = "An unofficial API for the trading platform Degiro written in Python"
name = "degiro-connector"
version = "0.0.9"
description = ""
category = "main"
optional = false
python-versions = ">=3.6"
[package.dependencies]
grpcio = "*"
onetimepass = "*"
orjson = "*"
pandas = "*"
protobuf = "*"
requests = "*"
wrapt = "*"
[package.extras]
lint = ["flake8"]
tests = ["pytest"]
[[package]]
name = "deprecated"
version = "1.2.12"
@@ -812,7 +825,7 @@ name = "grpcio"
version = "1.32.0"
description = "HTTP/2-based RPC framework"
category = "main"
optional = true
optional = false
python-versions = "*"
[package.dependencies]
@@ -1582,6 +1595,17 @@ rsa = ["cryptography"]
signals = ["blinker"]
signedtoken = ["cryptography", "pyjwt (>=1.0.0)"]
[[package]]
name = "onetimepass"
version = "1.0.1"
description = "Module for generating and validating HOTP and TOTP tokens"
category = "main"
optional = false
python-versions = "*"
[package.dependencies]
six = "*"
[[package]]
name = "opt-einsum"
version = "3.3.0"
@@ -1597,6 +1621,14 @@ numpy = ">=1.7"
docs = ["sphinx (==1.2.3)", "sphinxcontrib-napoleon", "sphinx-rtd-theme", "numpydoc"]
tests = ["pytest", "pytest-cov", "pytest-pep8"]
[[package]]
name = "orjson"
version = "3.5.2"
description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy"
category = "main"
optional = false
python-versions = ">=3.6"
[[package]]
name = "osqp"
version = "0.6.2.post0"
@@ -1892,7 +1924,7 @@ name = "protobuf"
version = "3.15.8"
description = "Protocol Buffers"
category = "main"
optional = true
optional = false
python-versions = "*"
[package.dependencies]
@@ -3088,7 +3120,7 @@ prediction = ["fbprophet", "tensorflow", "pmdarima", "transformers", "flair", "t
[metadata]
lock-version = "1.1"
python-versions = "^3.6.8"
content-hash = "9f2c8b046494863b5a83e395b8a79edbca42fd2b61b5e977877e08aedc53e165"
content-hash = "4e71fccadfe7d9d0836699350946b4c20193de5b5a8c46becdc130e1d9e722ab"
[metadata.files]
absl-py = [
@@ -3397,9 +3429,9 @@ defusedxml = [
{file = "defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61"},
{file = "defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69"},
]
degiroapi = [
{file = "degiroapi-0.9.5-py3-none-any.whl", hash = "sha256:b8da984f9d066ce8c8ae1319f43b1883db36e893d37bf431b3a6737256fea2b1"},
{file = "degiroapi-0.9.5.tar.gz", hash = "sha256:439557333aff551aa7550e2e1be96db73ff792a86529ef73c775ff61d5addc57"},
degiro-connector = [
{file = "degiro-connector-0.0.9.tar.gz", hash = "sha256:e3b230f1262e698189eaf3896c201f7ee53903cbb7a7a0799833b07c0f8e0ec5"},
{file = "degiro_connector-0.0.9-py3-none-any.whl", hash = "sha256:ad5b73ef2ee25b87a7ba5092e64d2e2668ee263061931e348c71a93acaa822e7"},
]
deprecated = [
{file = "Deprecated-1.2.12-py2.py3-none-any.whl", hash = "sha256:08452d69b6b5bc66e8330adde0a4f8642e969b9e1702904d137eeb29c8ffc771"},
@@ -3439,30 +3471,51 @@ entrypoints = [
]
ephem = [
{file = "ephem-3.7.7.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:0a6d6ed003383f702695094399728052981c567d423b25aa7163b3fd40de3d5a"},
{file = "ephem-3.7.7.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3cbc4f643329c4f64de63584e636625fa9f11b50209386ed99cbf508abe19488"},
{file = "ephem-3.7.7.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:e73b9997d7b844fabff988d7f66c3bad4e76ec8975ec9c60ec988037bb5c04b1"},
{file = "ephem-3.7.7.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:7619297a1103f6b3dac0c609bfa7c31e17678fb1a02653347ec030487e412031"},
{file = "ephem-3.7.7.1-cp27-cp27m-win32.whl", hash = "sha256:7756218a8b72ca50ee4f290b80828073412e7d7023389df5ead5d14839175bda"},
{file = "ephem-3.7.7.1-cp27-cp27m-win_amd64.whl", hash = "sha256:b8f9fb5b4184523b98f6629c6c927aeeba80d61df21f07af2844cdae45e1a294"},
{file = "ephem-3.7.7.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:37fd1abbebb821381d2865064a6fa9484ffdcd2161cf92193da8d42da79aa7db"},
{file = "ephem-3.7.7.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:ff4e1584cc232d8bc4aea405346eeb8a24b0fbe84c6331d4edb5d4456d19f1c3"},
{file = "ephem-3.7.7.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:c6081a9791e9de6511cddbeb9529bd5550fdb6f9e2a8dc9c2ec85911d67c6d11"},
{file = "ephem-3.7.7.1-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:d1d1ac8dc9be47dc6c7ec62800ca6557d03e8be3716c2a10ea0c8f1198c0a701"},
{file = "ephem-3.7.7.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:7f781d73e49caf7989c503a948471f1c8c1f738a450d557413999fb732f4dba3"},
{file = "ephem-3.7.7.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:f0959882bf73c8fe1cb801f42b0989e0ecb9d84b99eb8b8f70d61d16767a1e8a"},
{file = "ephem-3.7.7.1-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:06029db6b26f1764ed009360de8530f6cd759411232b3001df1b69ba6afa871d"},
{file = "ephem-3.7.7.1-cp35-cp35m-manylinux2014_s390x.whl", hash = "sha256:562baaeb3a46cf2248f97d2ad80092d747024e5dea62ebe50386a04b8e506c10"},
{file = "ephem-3.7.7.1-cp35-cp35m-win32.whl", hash = "sha256:2bcd953cced045e4232bcb71d60f6ba237f7944c880e83e74cc959449b192dee"},
{file = "ephem-3.7.7.1-cp35-cp35m-win_amd64.whl", hash = "sha256:fd0b922387df1ad8721f2fafd5dca51ce7105238f968e1532a177b781b8cae0e"},
{file = "ephem-3.7.7.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:e10c2c8afbb9e927d46d9bf3562441da2173ff196790a75ad0e5c5ee920d5922"},
{file = "ephem-3.7.7.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:592264e512b5658402e93903343eb26502c6f327df8a71847f3dcaea73908f32"},
{file = "ephem-3.7.7.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:8d586d970c42d62b1fc757a1c7c10679416a43e9e4a77391a05907159ce346f8"},
{file = "ephem-3.7.7.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:1a8ea6a045ff669011f8ecdeffadfc5eaa519fb56ab8dd40508910e9db5ec7b0"},
{file = "ephem-3.7.7.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c25993d6554820ff11fdd8f2ddb75bf99e70db01327f09700bf8811201e9daef"},
{file = "ephem-3.7.7.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:9180d953ff4cbe89fc9ccc78aea73f290c0166b8ddb01e9c837b4639a7492ec8"},
{file = "ephem-3.7.7.1-cp36-cp36m-win32.whl", hash = "sha256:72fdb72c813fc9780726aa732eb2193bbe1663549265ca5a746899215ecfbffd"},
{file = "ephem-3.7.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f5af029f8814aa8617e73b2ddcad2bd1c682ca13c31ee3b6f5825dd5cb43e777"},
{file = "ephem-3.7.7.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:e61c68f1c7d304a130bb6b88c1fca6600bbc1a1df6ca9a109b6eba4c6cbd3376"},
{file = "ephem-3.7.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fdf5f3ed8bd46ce2bf1145b26aec65a2c08ea7c97cf42b6b439af6e7bc6dc94d"},
{file = "ephem-3.7.7.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:31e2a17ca6f8d6bd44832574fea5461938ba034e52bf551e15e1a4c8f8c6c4fb"},
{file = "ephem-3.7.7.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:1ff5abefa230d5ab40846f1cb27d4f5583d46044fecf10e17bfb559bdc766a47"},
{file = "ephem-3.7.7.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:5ef34e3cfea0683998e867d7b8de642081e8821fafbd5e1d2dcab503c119c4a2"},
{file = "ephem-3.7.7.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:e2aca9edb59ee2bb3c8c36f17177966bc762da04af994450c8ad61a20fb6acdd"},
{file = "ephem-3.7.7.1-cp37-cp37m-win32.whl", hash = "sha256:71ea3935c658ee184575fd4cc2aa3e7fd6d6bac4a1ccff9ee5549cee67ff0385"},
{file = "ephem-3.7.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:34fd228105b89fefd20608420861a75a184db1edeaf0056cf2f85d2a2f768aee"},
{file = "ephem-3.7.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:189fcaeacb44dc5a1684ad489542f126d99d4a85e87d2fe73864c902f0bc2c71"},
{file = "ephem-3.7.7.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:a5ddf46ced515e4b81dfd22e6408fd06a329c31c6abb10af48d392641c490b0e"},
{file = "ephem-3.7.7.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:3530bee3eb7458d86d4c399f51f5b73ad7ea0441f0b2fb03de41d623789935af"},
{file = "ephem-3.7.7.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:77193de077e5fff453756144dee978e5fd6978c5c03ce3f67a09bb237e78f9d4"},
{file = "ephem-3.7.7.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:095ad42e8df6a5c91e0aeb5a68d76c0800b0283f72fc5f76e6df370ae1fb5537"},
{file = "ephem-3.7.7.1-cp38-cp38-win32.whl", hash = "sha256:33ad1a71b204aff123250b04e0ff2d5c3b8e9c6c814bf2c675d7752ce5896c02"},
{file = "ephem-3.7.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:4bc5140cc7218a53ee6d949110f6ed413b8e3165294100515cd0fb29aa8e3637"},
{file = "ephem-3.7.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7aa88d2a6d216c2044be2a3b3cb184e9c8a5022f12464220694017ea9d75209d"},
{file = "ephem-3.7.7.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:1a9822bde93205c67fd3399b26868204b67d9e4442af21a764307e51ea6dc672"},
{file = "ephem-3.7.7.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:15dd3dbb3864fb853388e39ac3c915c72873507f54ee6b3ede0033b03465d8ba"},
{file = "ephem-3.7.7.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:5763919cdf38cd0488172711da504c3be003b7c104ccd2516cc496ff05f146ae"},
{file = "ephem-3.7.7.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:cdea23a7caa1178b322e6e76484d40bd021672446ff51b512f35581e0f1b32b7"},
{file = "ephem-3.7.7.1-cp39-cp39-win32.whl", hash = "sha256:c3cbc973b334892972445cec3deb99aafd0c57cb4e50679d5f12fc8c51b4e65f"},
{file = "ephem-3.7.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:1af920c382980fe3566a31f36bd712973e1ca6049cbe07b4624214d5e1f144bc"},
{file = "ephem-3.7.7.1.tar.gz", hash = "sha256:36b51a8dc7cfdeb456dd6b8ab811accab8341b2d562ee3c6f4c86f6d3dbb984e"},
]
fbprophet = [
@@ -3821,30 +3874,40 @@ lxml = [
{file = "lxml-4.6.3-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:4bff24dfeea62f2e56f5bab929b4428ae6caba2d1eea0c2d6eb618e30a71e6d4"},
{file = "lxml-4.6.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:74f7d8d439b18fa4c385f3f5dfd11144bb87c1da034a466c5b5577d23a1d9b51"},
{file = "lxml-4.6.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f90ba11136bfdd25cae3951af8da2e95121c9b9b93727b1b896e3fa105b2f586"},
{file = "lxml-4.6.3-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:4c61b3a0db43a1607d6264166b230438f85bfed02e8cff20c22e564d0faff354"},
{file = "lxml-4.6.3-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:5c8c163396cc0df3fd151b927e74f6e4acd67160d6c33304e805b84293351d16"},
{file = "lxml-4.6.3-cp35-cp35m-win32.whl", hash = "sha256:f2380a6376dfa090227b663f9678150ef27543483055cc327555fb592c5967e2"},
{file = "lxml-4.6.3-cp35-cp35m-win_amd64.whl", hash = "sha256:c4f05c5a7c49d2fb70223d0d5bcfbe474cf928310ac9fa6a7c6dddc831d0b1d4"},
{file = "lxml-4.6.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d2e35d7bf1c1ac8c538f88d26b396e73dd81440d59c1ef8522e1ea77b345ede4"},
{file = "lxml-4.6.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:289e9ca1a9287f08daaf796d96e06cb2bc2958891d7911ac7cae1c5f9e1e0ee3"},
{file = "lxml-4.6.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:bccbfc27563652de7dc9bdc595cb25e90b59c5f8e23e806ed0fd623755b6565d"},
{file = "lxml-4.6.3-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d916d31fd85b2f78c76400d625076d9124de3e4bda8b016d25a050cc7d603f24"},
{file = "lxml-4.6.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:820628b7b3135403540202e60551e741f9b6d3304371712521be939470b454ec"},
{file = "lxml-4.6.3-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:c47ff7e0a36d4efac9fd692cfa33fbd0636674c102e9e8d9b26e1b93a94e7617"},
{file = "lxml-4.6.3-cp36-cp36m-win32.whl", hash = "sha256:5a0a14e264069c03e46f926be0d8919f4105c1623d620e7ec0e612a2e9bf1c04"},
{file = "lxml-4.6.3-cp36-cp36m-win_amd64.whl", hash = "sha256:92e821e43ad382332eade6812e298dc9701c75fe289f2a2d39c7960b43d1e92a"},
{file = "lxml-4.6.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:efd7a09678fd8b53117f6bae4fa3825e0a22b03ef0a932e070c0bdbb3a35e654"},
{file = "lxml-4.6.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:efac139c3f0bf4f0939f9375af4b02c5ad83a622de52d6dfa8e438e8e01d0eb0"},
{file = "lxml-4.6.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:0fbcf5565ac01dff87cbfc0ff323515c823081c5777a9fc7703ff58388c258c3"},
{file = "lxml-4.6.3-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:36108c73739985979bf302006527cf8a20515ce444ba916281d1c43938b8bb96"},
{file = "lxml-4.6.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:122fba10466c7bd4178b07dba427aa516286b846b2cbd6f6169141917283aae2"},
{file = "lxml-4.6.3-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:cdaf11d2bd275bf391b5308f86731e5194a21af45fbaaaf1d9e8147b9160ea92"},
{file = "lxml-4.6.3-cp37-cp37m-win32.whl", hash = "sha256:3439c71103ef0e904ea0a1901611863e51f50b5cd5e8654a151740fde5e1cade"},
{file = "lxml-4.6.3-cp37-cp37m-win_amd64.whl", hash = "sha256:4289728b5e2000a4ad4ab8da6e1db2e093c63c08bdc0414799ee776a3f78da4b"},
{file = "lxml-4.6.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b007cbb845b28db4fb8b6a5cdcbf65bacb16a8bd328b53cbc0698688a68e1caa"},
{file = "lxml-4.6.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:76fa7b1362d19f8fbd3e75fe2fb7c79359b0af8747e6f7141c338f0bee2f871a"},
{file = "lxml-4.6.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:26e761ab5b07adf5f555ee82fb4bfc35bf93750499c6c7614bd64d12aaa67927"},
{file = "lxml-4.6.3-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:e1cbd3f19a61e27e011e02f9600837b921ac661f0c40560eefb366e4e4fb275e"},
{file = "lxml-4.6.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:66e575c62792c3f9ca47cb8b6fab9e35bab91360c783d1606f758761810c9791"},
{file = "lxml-4.6.3-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:1b38116b6e628118dea5b2186ee6820ab138dbb1e24a13e478490c7db2f326ae"},
{file = "lxml-4.6.3-cp38-cp38-win32.whl", hash = "sha256:89b8b22a5ff72d89d48d0e62abb14340d9e99fd637d046c27b8b257a01ffbe28"},
{file = "lxml-4.6.3-cp38-cp38-win_amd64.whl", hash = "sha256:2a9d50e69aac3ebee695424f7dbd7b8c6d6eb7de2a2eb6b0f6c7db6aa41e02b7"},
{file = "lxml-4.6.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ce256aaa50f6cc9a649c51be3cd4ff142d67295bfc4f490c9134d0f9f6d58ef0"},
{file = "lxml-4.6.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:7610b8c31688f0b1be0ef882889817939490a36d0ee880ea562a4e1399c447a1"},
{file = "lxml-4.6.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f8380c03e45cf09f8557bdaa41e1fa7c81f3ae22828e1db470ab2a6c96d8bc23"},
{file = "lxml-4.6.3-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:3082c518be8e97324390614dacd041bb1358c882d77108ca1957ba47738d9d59"},
{file = "lxml-4.6.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:884ab9b29feaca361f7f88d811b1eea9bfca36cf3da27768d28ad45c3ee6f969"},
{file = "lxml-4.6.3-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:6f12e1427285008fd32a6025e38e977d44d6382cf28e7201ed10d6c1698d2a9a"},
{file = "lxml-4.6.3-cp39-cp39-win32.whl", hash = "sha256:33bb934a044cf32157c12bfcfbb6649807da20aa92c062ef51903415c704704f"},
{file = "lxml-4.6.3-cp39-cp39-win_amd64.whl", hash = "sha256:542d454665a3e277f76954418124d67516c5f88e51a900365ed54a9806122b83"},
{file = "lxml-4.6.3.tar.gz", hash = "sha256:39b78571b3b30645ac77b95f7c69d1bffc4cf8c3b157c435a34da72e78c82468"},
@@ -4124,10 +4187,38 @@ oauthlib = [
{file = "oauthlib-3.1.0-py2.py3-none-any.whl", hash = "sha256:df884cd6cbe20e32633f1db1072e9356f53638e4361bef4e8b03c9127c9328ea"},
{file = "oauthlib-3.1.0.tar.gz", hash = "sha256:bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889"},
]
onetimepass = [
{file = "onetimepass-1.0.1.tar.gz", hash = "sha256:a569dac076d6e3761cbc55e36952144a637ca1b075c6d509de1c1dbc5e7f6a27"},
]
opt-einsum = [
{file = "opt_einsum-3.3.0-py3-none-any.whl", hash = "sha256:2455e59e3947d3c275477df7f5205b30635e266fe6dc300e3d9f9646bfcea147"},
{file = "opt_einsum-3.3.0.tar.gz", hash = "sha256:59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549"},
]
orjson = [
{file = "orjson-3.5.2-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:2ba4165883fbef0985bce60bddbf91bc5cea77cc22b1c12fe7a716c6323ab1e7"},
{file = "orjson-3.5.2-cp310-cp310-manylinux2014_x86_64.whl", hash = "sha256:cee746d186ba9efa47b9d52a649ee0617456a9a4d7a2cbd3ec06330bb9cb372a"},
{file = "orjson-3.5.2-cp36-cp36m-macosx_10_7_x86_64.whl", hash = "sha256:8591a25a31a89cf2a33e30eb516ab028bad2c72fed04e323917114aaedc07c7d"},
{file = "orjson-3.5.2-cp36-cp36m-macosx_10_9_universal2.whl", hash = "sha256:38cb8cdbf43eafc6dcbfb10a9e63c80727bb916aee0f75caf5f90e5355b266e1"},
{file = "orjson-3.5.2-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:96b403796fc7e44bae843a2a83923925fe048f3a67c10a298fdfc0ff46163c14"},
{file = "orjson-3.5.2-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:5b66a62d4c0c44441b23fafcd3d0892296d9793361b14bcc5a5645c88b6a4a71"},
{file = "orjson-3.5.2-cp36-none-win_amd64.whl", hash = "sha256:609e93919268fadb871aafb7f550c3fe8d3e8c1305cadcc1610b414113b7034e"},
{file = "orjson-3.5.2-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:200bd4491052d13696456a92d23f086b68b526c2464248733964e8165ac60888"},
{file = "orjson-3.5.2-cp37-cp37m-macosx_10_9_universal2.whl", hash = "sha256:cc614bf6bfe0181e51dd98a9c53669f08d4d8641efbf1a287113da3059773dea"},
{file = "orjson-3.5.2-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:43576bed3be300e9c02629a8d5fb3340fe6474765e6eee9610067def4b3ac19c"},
{file = "orjson-3.5.2-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:acd735718b531b78858a7e932c58424c5a3e39e04d61bba3d95ce8a8498ea9e9"},
{file = "orjson-3.5.2-cp37-none-win_amd64.whl", hash = "sha256:7503145ffd1ae90d487860b97e2867ec61c2c8f001209bb12700ba7833df8ddf"},
{file = "orjson-3.5.2-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:9c37cf3dbc9c81abed04ba4854454e9f0d8ac7c05fb6c4f36545733e90be6af2"},
{file = "orjson-3.5.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:8e6ef00ddc637b7d13926aaccdabac363efdfd348c132410eb054c27e2eae6a7"},
{file = "orjson-3.5.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:9d0834ca40c6e467fa1f1db3f83a8c3562c03eb2b7067ad09de5019592edb88f"},
{file = "orjson-3.5.2-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:d4a2ddc6342a8280dafaa69827b387b95856ef0a6c5812fe91f5bd21ddd2ef36"},
{file = "orjson-3.5.2-cp38-none-win_amd64.whl", hash = "sha256:f54f8bcf24812a524e8904a80a365f7a287d82fc6ebdee528149616070abe5ab"},
{file = "orjson-3.5.2-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:8b429471398ea37d848fb53bca6a8c42fb776c278f4fcb6a1d651b8f1fb64947"},
{file = "orjson-3.5.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:13fd458110fbe019c2a67ee539678189444f73bc09b27983c9b42663c63e0445"},
{file = "orjson-3.5.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:8bf1145a06e1245f0c8a8c32df6ffe52d214eb4eb88c3fb32e4ed14e3dc38e0e"},
{file = "orjson-3.5.2-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:7e3434010e3f0680e92bb0a6094e4d5c939d0c4258c76397c6bd5263c7d62e86"},
{file = "orjson-3.5.2-cp39-none-win_amd64.whl", hash = "sha256:df9730cc8cd22b3f54aa55317257f3279e6300157fc0f4ed4424586cd7eb012d"},
{file = "orjson-3.5.2.tar.gz", hash = "sha256:f385253a6ddac37ea422ec2c0d35772b4f5bf0dc0803ce44543bf7e530423ef8"},
]
osqp = [
{file = "osqp-0.6.2.post0-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:21047e9ceb4c2224ba15dd95f5125e2dcabd178aa93d8efa407e67216ea4fe62"},
{file = "osqp-0.6.2.post0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:598a7bb1534a0ab69bcaf22d6e6c4ec042a41184f007c01b7fa863b528c6b61d"},

View File

@@ -60,7 +60,7 @@ pyportfolioopt = "^1.4.1"
selenium = "^3.141.0"
python-coinmarketcap = "^0.2"
oandapyV20 = "^0.6.3"
degiroapi = "^0.9.5"
degiro-connector = "^0.0.9"
valinvest = "^0.0.2"
bt = "^0.2.9"
python-binance = "^1.0.1"

View File

@@ -35,7 +35,7 @@ dataclasses==0.8; python_version >= "3.6" and python_version < "3.7" and python_
datetime==4.3; python_version >= "3.5"
decorator==4.4.2; python_full_version >= "3.6.1" and python_version >= "3.6" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.2.0" and python_version >= "3.6")
defusedxml==0.7.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
degiroapi==0.9.5; python_version >= "3.6"
degiro-connector==0.0.9; python_version >= "3.6"
deprecated==1.2.12; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
detecta==0.0.5; python_version >= "3.6"
ecos==2.0.7.post1; python_full_version >= "3.6.1" and python_full_version < "4.0.0" and python_version >= "3.5"

View File

@@ -29,7 +29,7 @@ dataclasses==0.8; python_version >= "3.6" and python_version < "3.7"
datetime==4.3; python_version >= "3.5"
decorator==4.4.2; python_full_version >= "3.6.1" and python_version >= "3.6" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.2.0" and python_version >= "3.6")
defusedxml==0.7.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
degiroapi==0.9.5; python_version >= "3.6"
degiro-connector==0.0.9; python_version >= "3.6"
detecta==0.0.5; python_version >= "3.6"
ecos==2.0.7.post1; python_full_version >= "3.6.1" and python_full_version < "4.0.0" and python_version >= "3.5"
entrypoints==0.3; python_version >= "3.6"