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

Getting error 403,Tried replacing token with a new one, used try except clause #54

Open
Shanu2092 opened this issue Apr 4, 2023 · 4 comments

Comments

@Shanu2092
Copy link

final_dataframe = pd.DataFrame(columns = mycolumns)

for stock in stocks['Ticker']:
api_url = f'https://sandbox.iexapis.com/stable/stock/{stock}/quote/?token=sk_b92781ff259841bead23d3012a9f8cf3'
data = requests.get(api_url)

if data.status_code == 200:
    data = data.json()
    final_dataframe = final_dataframe.append(
        pd.Series(
            [stock, data['latestPrice'], data['marketCap'], 'N/A'], 
            index = mycolumns
        ), 
        ignore_index = True
    )
else:
    print(f'An error occurred, status code: {data.status_code}')
@Shanu2092 Shanu2092 changed the title Getting error 403,Tried replacing token with a new one, used try excel clause Getting error 403,Tried replacing token with a new one, used try except clause Apr 4, 2023
@rayna0921
Copy link

me2!!!! still dont know how to fix this

@syedr-prog
Copy link

Let me know if you guys find something!

@joethesaint
Copy link

I think the solution have already been solved

@joethesaint
Copy link

Okay, it has not been solved. Instead, IEX Cloud seems to have updated over the years

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants