NelsonDane / auto-rsa

A Discord bot and CLI for automating Reverse Split Arbitrage stock trading!
GNU General Public License v3.0
45 stars 31 forks source link

Rework fidelityAPI using Playwright #374

Closed kennyboy106 closed 6 days ago

kennyboy106 commented 1 week ago

Same code as previous pull request but with a few fixes

Added 2FA support Added extended hours trading support Fixed holdings functionality Cleaned up code using playwright and added lots of comments

Tested: Buying 2 stocks at a time Selling 2 stocks at a time Holdings

kennyboy106 commented 1 week ago

I'd love to continue contributing! If you'd like me to help with some development projects and want to include me in the conversation, my discord is the same as my github username

vue551 commented 1 week ago

i know this is still in the works tried to test Traceback (most recent call last): File "C:\Users\neten\OneDrive\Documents\kusg\fidelityAPI.py", line 516, in fidelity_init step_1, step_2 = fidelity_browser.login(account[0], account[1], account[2])


IndexError: list index out of range this is the error i got 
kennyboy106 commented 1 week ago

i know this is still in the works tried to test Traceback (most recent call last): File "C:\Users\neten\OneDrive\Documents\kusg\fidelityAPI.py", line 516, in fidelity_init step_1, step_2 = fidelity_browser.login(account[0], account[1], account[2]) ~~~^^^ IndexError: list index out of range this is the error i got

See the .env.example file for fidelity credentials

kennyboy106 commented 1 week ago

Found a bug when selling, more work needed. I'll resume working on this on 9/25

kennyboy106 commented 1 week ago

Buying and selling seems to be fixed now

kennyboy106 commented 1 week ago

Hey @matthew55, I was hoping to keep the fidelity automation class free from any custom functions so that I can try publishing the library for general use. Can you move the printanddiscord call in init outside of the class? Maybe we just throw a general exception in the init and catch it back in the fidelity_run function

NelsonDane commented 1 week ago

This has been working really well for me, well done!

Only feedback I have now would be to remove the "Summary of holdings," since the other brokers don't have that and if we were going to add it we'd do it in the helperAPI print holdings function.

kennyboy106 commented 1 week ago

Sounds good, I won't be able to make the change until later tonight or tomorrow, traveling all day today

kennyboy106 commented 6 days ago

Those last two errors are minor. I think the code is fine now