pandas-datareader icon indicating copy to clipboard operation
pandas-datareader copied to clipboard

stooq.com cannot get data related to USDJPY

Open begoat opened this issue 4 years ago • 1 comments

Purpose: I want to use pandas-datareader to retrieve USDJPY data.

Steps to reproduce

  1. res = DataReader('USDJPY', 'stooq')
  2. res shows no data

Reason of Empty Data

  1. The origin url is https://stooq.com/q/d/l/?s=USDJPY It returns data.

  2. But because of ⬇️ https://github.com/pydata/pandas-datareader/blob/b1247d1aeb0f2252b7e78b358e5c3046c6901cf2/pandas_datareader/stooq.py#L44

  3. The url will be transformed to GET /q/d/l/?s=USDJPY.US

Solutions

  1. Currently I couldn't figure out a way to make it.
  2. I noticed 3398e417a00017b4330349d249f355b93c09c173 this commit in the file pandas_datareader/stooq.py introduced many complicated statements that make it impossibe to do this kind of API Request.

begoat avatar Aug 01 '21 17:08 begoat

Maybe we can introduce a custom reader for users to do it themselves?

begoat avatar Aug 02 '21 00:08 begoat