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

[WIP] Plynk Support #424

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Conversation

matthew55
Copy link
Contributor

Welcome

General notes

This is a reverse engineered API that is being developed at Plynk-API. It uses curl_cffi for web requests and stores the session until it needs refreshed.

I heard of issues that some users require SMS authentication to login, but I have not been able to recreate that myself yet so there is no support for SMS authentication to this point. I am hoping for some help with some people testing this PR so that we can figure this SMS issue out for good.

Also, I commented out the updater for the time being because I could not launch the bot locally when it was there. This will of course be reversed before merging into main.

TODO

  • Login to account
  • Account holdings
  • Plynk transactions
  • Test on Docker
  • Test on CLI
  • One final cleanup and stress test before merging

To Conclude

Hopefully, we can get all the issues ironed out and figure this out soon.

@matthew55 matthew55 added enhancement New feature or request help wanted Extra attention is needed dependencies Pull requests that update a dependency file python Pull requests that update Python code docker Pull requests that update Docker code labels Nov 3, 2024
@matthew55 matthew55 marked this pull request as draft November 3, 2024 20:45
@MonkeyjoDev
Copy link
Contributor

Received an issue with SMS verification I believe. Here's the CLI output.

`Logging in to Plynk...
Error logging in to Plynk: Account number request failed with status code 403: { "status":{ "code":"100",
"Substatus":"101",
"text":"Login Required",
"Reason":"NoFC",
"Location":"/login/ftgw/Fas/nf/SSCorrClient/Login/Init?AuthRedUrl=https://www.digitalbrokerageservices.com/gateway/restrict/portfolio/v1/customer/accounts"
}}

Traceback (most recent call last):
File "C:\auto-rsa\SoFi\plynkAPI.py", line 59, in plynk_init
plynk.login(otp_callback=get_otp)
File "C:\auto-rsa\SoFi\src\plynk-api\plynk_api\plynk.py", line 138, in login
self.account_number = self._fetch_account_number()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\auto-rsa\SoFi\src\plynk-api\plynk_api\plynk.py", line 235, in _fetch_account_number
raise RuntimeError(f"Account number request failed with status code {response.status_code}: {response.text}")
RuntimeError: Account number request failed with status code 403: { "status":{ "code":"100",
"Substatus":"101",
"text":"Login Required",
"Reason":"NoFC",
"Location":"/login/ftgw/Fas/nf/SSCorrClient/Login/Init?AuthRedUrl=https://www.digitalbrokerageservices.com/gateway/restrict/portfolio/v1/customer/accounts"
}}`

@ImNotOssy
Copy link
Contributor

Received an issue with SMS verification I believe. Here's the CLI output.

`Logging in to Plynk... Error logging in to Plynk: Account number request failed with status code 403: { "status":{ "code":"100", "Substatus":"101", "text":"Login Required", "Reason":"NoFC", "Location":"/login/ftgw/Fas/nf/SSCorrClient/Login/Init?AuthRedUrl=https://www.digitalbrokerageservices.com/gateway/restrict/portfolio/v1/customer/accounts" }}

Traceback (most recent call last): File "C:\auto-rsa\SoFi\plynkAPI.py", line 59, in plynk_init plynk.login(otp_callback=get_otp) File "C:\auto-rsa\SoFi\src\plynk-api\plynk_api\plynk.py", line 138, in login self.account_number = self._fetch_account_number() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\auto-rsa\SoFi\src\plynk-api\plynk_api\plynk.py", line 235, in _fetch_account_number raise RuntimeError(f"Account number request failed with status code {response.status_code}: {response.text}") RuntimeError: Account number request failed with status code 403: { "status":{ "code":"100", "Substatus":"101", "text":"Login Required", "Reason":"NoFC", "Location":"/login/ftgw/Fas/nf/SSCorrClient/Login/Init?AuthRedUrl=https://www.digitalbrokerageservices.com/gateway/restrict/portfolio/v1/customer/accounts" }}`

we are aware of the issue

@MonkeyjoDev
Copy link
Contributor

Received an issue with SMS verification I believe. Here's the CLI output.
Logging in to Plynk... Error logging in to Plynk: Account number request failed with status code 403: { "status":{ "code":"100", "Substatus":"101", "text":"Login Required", "Reason":"NoFC", "Location":"/login/ftgw/Fas/nf/SSCorrClient/Login/Init?AuthRedUrl=https://www.digitalbrokerageservices.com/gateway/restrict/portfolio/v1/customer/accounts" }} Traceback (most recent call last): File "C:\auto-rsa\SoFi\plynkAPI.py", line 59, in plynk_init plynk.login(otp_callback=get_otp) File "C:\auto-rsa\SoFi\src\plynk-api\plynk_api\plynk.py", line 138, in login self.account_number = self._fetch_account_number() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\auto-rsa\SoFi\src\plynk-api\plynk_api\plynk.py", line 235, in _fetch_account_number raise RuntimeError(f"Account number request failed with status code {response.status_code}: {response.text}") RuntimeError: Account number request failed with status code 403: { "status":{ "code":"100", "Substatus":"101", "text":"Login Required", "Reason":"NoFC", "Location":"/login/ftgw/Fas/nf/SSCorrClient/Login/Init?AuthRedUrl=https://www.digitalbrokerageservices.com/gateway/restrict/portfolio/v1/customer/accounts" }}

we are aware of the issue

Got it, anything I can do on my end to help in terms of providing info?

@ImNotOssy
Copy link
Contributor

Received an issue with SMS verification I believe. Here's the CLI output.
Logging in to Plynk... Error logging in to Plynk: Account number request failed with status code 403: { "status":{ "code":"100", "Substatus":"101", "text":"Login Required", "Reason":"NoFC", "Location":"/login/ftgw/Fas/nf/SSCorrClient/Login/Init?AuthRedUrl=https://www.digitalbrokerageservices.com/gateway/restrict/portfolio/v1/customer/accounts" }} Traceback (most recent call last): File "C:\auto-rsa\SoFi\plynkAPI.py", line 59, in plynk_init plynk.login(otp_callback=get_otp) File "C:\auto-rsa\SoFi\src\plynk-api\plynk_api\plynk.py", line 138, in login self.account_number = self._fetch_account_number() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\auto-rsa\SoFi\src\plynk-api\plynk_api\plynk.py", line 235, in _fetch_account_number raise RuntimeError(f"Account number request failed with status code {response.status_code}: {response.text}") RuntimeError: Account number request failed with status code 403: { "status":{ "code":"100", "Substatus":"101", "text":"Login Required", "Reason":"NoFC", "Location":"/login/ftgw/Fas/nf/SSCorrClient/Login/Init?AuthRedUrl=https://www.digitalbrokerageservices.com/gateway/restrict/portfolio/v1/customer/accounts" }}

we are aware of the issue

Got it, anything I can do on my end to help in terms of providing info?

not yet

@braydio
Copy link

braydio commented Nov 12, 2024

Hmm ... did I open a PR on the wrong fork?
matthew55#1

@ImNotOssy
Copy link
Contributor

Hmm ... did I open a PR on the wrong fork? matthew55#1

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file docker Pull requests that update Docker code enhancement New feature or request help wanted Extra attention is needed python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants