pandas-datareader
pandas-datareader copied to clipboard
stooq.com cannot get data related to USDJPY
Purpose:
I want to use pandas-datareader to retrieve USDJPY data.
Steps to reproduce
res = DataReader('USDJPY', 'stooq')res shows no data
Reason of Empty Data
-
The origin url is
https://stooq.com/q/d/l/?s=USDJPYIt returns data. -
But because of ⬇️ https://github.com/pydata/pandas-datareader/blob/b1247d1aeb0f2252b7e78b358e5c3046c6901cf2/pandas_datareader/stooq.py#L44
-
The url will be transformed to
GET /q/d/l/?s=USDJPY.US
Solutions
- Currently I couldn't figure out a way to make it.
- I noticed 3398e417a00017b4330349d249f355b93c09c173 this commit in the file
pandas_datareader/stooq.pyintroduced many complicated statements that make it impossibe to do this kind of API Request.
Maybe we can introduce a custom reader for users to do it themselves?