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 fidelity driver #372

Closed kennyboy106 closed 1 week ago

kennyboy106 commented 1 week ago

Recreate the fidelityAPI using playwright. This codes fixes the holdings feature. Previously, the holdings command did not display correct price values for holdings or shares owned. This code is also much easier to read and fix, thanks to playwrights codegen and autowaiting, and should be more resilient to changes in the website. Less css selectors are used and more text-based searching is used for interacting with the webpage.

Added support for TOTP secrets! Fidelity allows you to enable authenticator codes and will use that instead of text based codes.

This has been tested with: Buying and selling Holdings Terminal mode Discord docker

The code format follows the chaseAPI format.

PZES commented 1 week ago

I don't see any changes here, this just update the dev branch to main, u should just send pr to main as these branches are not used

kennyboy106 commented 1 week ago

Im trying to clean up my push since its affecting many files but not showing any changes in most of the files

PZES commented 1 week ago

just change the pr to push to main

kennyboy106 commented 1 week ago

Well, there's all the changes lol Not a simple pr

matthew55 commented 1 week ago

Thank you for your interest in contributing to this project. This would be quite a large PR with a lot of testing if we are to do this so let me make some initial thoughts I have.

  1. All the file permissions have been changed from 100644 ->100755. This needs to be reverted back because We do not need all these files to be executable.
  2. I would like to take advantage of this PR to make Fidelity more of a hybrid broker meaning we use Playwright to obtain cookies and other necessary information and then use those cookies in requests in order to try to make as many operations request based as possible. This is what the Charles Schwab API does. If you are not up to this, do not worry, I would be willing to try figuring this out on my end.
kennyboy106 commented 1 week ago

Ill look into changing the permissions on those. Id need some more information for that feature. Ill also have to go look at Charles Schwab API to see how that works.

There are still some issues in the playwright code when executing trading that I am trying to solve right now.