Pandas datareader ‘iex-last’ results in "failed to interpret response as JSON"

  pandas, pandas-datareader, python, python-3.x

I’m trying to get the last price for TLT from iex. It was working when I tried it last month, but when I tried it today I was met with the error:

TypeError: Failed to interpret response as JSON

The code I’m using is:

import pandas as pd
from pandas_datareader import data

tlt_price = data.DataReader('TLT', 'iex-last')

I tried using the example on the docs page that reads:

import pandas_datareader.data as web
f = web.DataReader('gs', 'iex-tops')
f[:10]

But the same error occurs.
Any idea how to get it working again?

Thanks!

Source: Python Questions

LEAVE A COMMENT