Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

chartDF throws PyException #64

Closed
LEO-E-100 opened this issue Jun 25, 2019 · 4 comments
Closed

chartDF throws PyException #64

LEO-E-100 opened this issue Jun 25, 2019 · 4 comments

Comments

@LEO-E-100
Copy link

After running:

import pandas as pd
import numpy as np
from datetime import datetime
import matplotlib.pyplot as plt
import pyEX as p

ticker = 'AMD'
timeframe = '1y'

df = p.chartDF(ticker, timeframe)

I get

PyEXception: ('Response 403 - ', 'Forbidden')
@timkpaine
Copy link
Member

If you haven't done so you should onboard to IEX cloud. The legacy APIs are being decommissioned

@LEO-E-100
Copy link
Author

Sorry, but this response doesn't make a lot of sense to me. Do you mean I should interface directly with IEX REST API?

@timkpaine
Copy link
Member

timkpaine commented Jun 25, 2019

https://iextrading.com/developer/
https://iextrading.com/developer/#sunset-schedule

According to schedule, IEX has begun decommissioning the old routes. This means pyEX.chartDF(...) has stopped working unless you provide an IEX Cloud token.

instead you can do c = pyEX.client.Client(<your token>); c.chartDF(...)

Data is still free, you can # and grab a token at https://iexcloud.io

Then for pyEX you can instantiate a client directly with your token or put it in the IEX_TOKEN environment variable.

Docs are here:
https://pyex.readthedocs.io/en/latest/api/pyEX.html#pyEX.client.Client

Xref
#65

@LEO-E-100
Copy link
Author

Ah I see, thank you so much.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Development

No branches or pull requests

2 participants