Closed jpg0203 closed 9 months ago
If you received a valid cookie from E-Trade customer service, it should look something like this:
{'name': 'SWH', 'value': 'GRDKRORF5-he5abv74-25oj', 'domain': '.etrade.com', 'secure': True, 'httpOnly': True}
You would then use keyring
to store locally on your computer:
import keyring
keyring.set_password("etrade", "etrade_cookie", "{'name': 'SWH', 'value': 'GRDKRORF5-he5abv74-25oj', 'domain': '.etrade.com', 'secure': True, 'httpOnly': True}"
keyring
can only saves your cookie as a string, but the cookie is given to you in the form a dictionary, like this -> {key, value} -> so you must save it to keyring
wrapped with quotation marks like the example above. Try that out to see if fixes your error.
If you received a valid cookie from E-Trade customer service, it should look something like this:
{'name': 'SWH', 'value': 'GRDKRORF5-he5abv74-25oj', 'domain': '.etrade.com', 'secure': True, 'httpOnly': True}
You would then use
keyring
to store locally on your computer:import keyring keyring.set_password("etrade", "etrade_cookie", "{'name': 'SWH', 'value': 'GRDKRORF5-he5abv74-25oj', 'domain': '.etrade.com', 'secure': True, 'httpOnly': True}"
keyring
can only saves your cookie as a string, but the cookie is given to you in the form a dictionary, like this -> {key, value} -> so you must save it tokeyring
wrapped with quotation marks like the example above. Try that out to see if fixes your error.
im getting a new error now all keyrings are in correctly
Traceback (most recent call last):
File " Type Status Report Message oauth_problem=timestamp_refused,oauth_acceptable_timestamps=1708624656-1708628256 Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).HTTP Status 400 – Bad Request
'.
E-Trade added two-factor authentication by phone to the login process. This is causing the automatic login feature of ETradeBot to break. I have since deprecated the ETradeBot project, as, even if I found a workaround, E-Trade would likely just change something else within a few weeks. This has been the pattern. I have decided to work on other trading bots for platforms that are much more friendlier to developers of algorithmic trading programs such as Alpaca.
I appreciate your interest, and please follow me on GitHub so you are the first to know when I've released my next trading bot program.
I'm encountering a SyntaxError: invalid decimal literal error and could use some assistance in understanding and resolving the issue. The error arises from a call to ast.literal_eval() with the string "(e trade cookie )". While investigating, I'm unsure why Python is attempting to interpret this string as a decimal literal. If you could provide any insights or suggestions on how to address this problem, I'd greatly appreciate it. i may just be being dumb here but i cant seem to figure this out.
here is the log im getting
thank you