jessecooper / pyetrade

Python E-Trade API Wrapper
GNU General Public License v3.0
205 stars 96 forks source link

any1 has issues getting the request_token? #47

Closed hz2018tv closed 3 years ago

hz2018tv commented 3 years ago

pretty much failed here

    self.session = OAuth1Session(
        self.consumer_key,
        self.consumer_secret,
        callback_uri=self.callback_url,
        signature_type="AUTH_HEADER",
    )
    # get request token
    self.session.fetch_request_token(self.req_token_url)

also tried etrade official python client, also failed at this step.

1rocketdude commented 3 years ago

try this instead

import pyetrade

consumer_key = 'Etrade_consumer_key' consumer_secret ='Etrade_consumer_secret' oauth = pyetrade.ETradeOAuth(consumer_key, consumer_secret) print(oauth.get_request_token()) API_token = input('eTrade token: ') oauth.get_access_token(API_token) accounts_api = pyetrade.accounts.ETradeAccounts(consumer_key, consumer_secret, oauth.access_token['oauth_token'], oauth.access_token['oauth_token_secret'], dev=False)

On May 4, 2021, at 10:29 PM, hz2018tv @.***> wrote:

pretty much failed here

self.session = OAuth1Session(
    self.consumer_key,
    self.consumer_secret,
    callback_uri=self.callback_url,
    signature_type="AUTH_HEADER",
)
# get request token
self.session.fetch_request_token(self.req_token_url)

also tried etrade official python client, also failed at this step.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jessecooper/pyetrade/issues/47, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE3CHFEMKI6EK2FVSP6AJ3TMDCR3ANCNFSM44D5MIGQ.

hz2018tv commented 3 years ago

havent tried your code, but oauth.get_request_token() will do exactly self.session = OAuth1Session( self.consumer_key, self.consumer_secret, callback_uri=self.callback_url, signature_type="AUTH_HEADER", )

get request token

self.session.fetch_request_token(self.req_token_url)

it has been failing for me since monday. the above codes had been working for years till this monday.

hz2018tv commented 3 years ago

update. it works again without any code change after a couple of days. seems to be an etrade problem.

hz2018tv commented 3 years ago

seems to be an etrade problem.