Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gets all current securities, open trades, investopedia quotes #13

Merged
merged 15 commits into from Jun 14, 2017

Conversation

stellarore
Copy link
Contributor

Added function to load all current securities from a portfolio, load all currently open trades, and get quotes from the investopedia site.

Running with python 3.6.1.

I started with @Scorpio1987 's fork which may have been the wrong decision. Sorry, it's my first time on Github.

Gopinadh Garlapati and others added 15 commits July 30, 2016 02:57
Robobrowser hasn't been updated in 2 years, but mechanicalsoup is still going strong, using beautifulsoup4
added placeholder definitions for future work
…iple lines in tables. need to make new Object for options (exp date)
get_current_securities handles multiple entries to each of bought, options, shorted.  quantity, prices, and gain_loss are now floats.  calculates gain_loss from current and purchase prices.
get_open_trades handles multiple entries. quantity as float
@kirkthaker
Copy link
Owner

Thanks for the pull request! It looks mostly good, although I get the following error when I call get_open_trades:

open_trades = client.get_open_trades()
Traceback (most recent call last):
File "", line 1, in
File "/Users/kirkthaker/ita/investopedia-trading-api/investopedia.py", line 200, in get_open_trades
openTable = parsed_html.find('table', attrs={'class':'table1'}).text
AttributeError: 'NoneType' object has no attribute 'text'

I'll be working on bug fixes too, and we'll iron them out and merge your pull request. I agree that it's high time this project was Python 3 first, and not Python 2.

@kirkthaker
Copy link
Owner

^ The above error might happen because my portfolio is currently empty, although I need to double check that.

@kirkthaker
Copy link
Owner

I made a separate branch where we can make changes in isolation from master (paltryore-master)

@kirkthaker kirkthaker merged commit 73e1c90 into kirkthaker:master Jun 14, 2017
@kirkthaker
Copy link
Owner

I made some fixes to your code and merged it. Thank you for the help - I really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants