title: error importing forex data from IG API - python
body: <p>I'm trying to import data using an API from IG. It seems to fetch historical prices with 'num_points' fine but when I try to use a date range, it returns an error.</p>
  <pre><code>session = requests_cache.CachedSession(cache_name='cache', backend='sqlite', expire_after=timedelta(hours=1))
  
  class config(object):
      username = &quot;xxx&quot;
      password = &quot;xxx&quot;
      api_key = &quot;xxx&quot;
      acc_type = &quot;Demo-cfd&quot;
      acc_number = &quot;xxx&quot;
  
  ig_service = IGService(config.username, config.password, config.api_key)
  ig_service.create_session()
  
  epic = 'CS.D.EURUSD.MINI.IP'
  resolution = 'D'
  num_points = 10
  
  response = ig_service.fetch_historical_prices_by_epic_and_num_points(epic, resolution, num_points)
  
  # works fine
  df_ask = response['prices']['ask']
  print(&quot;ask prices:\n%s&quot; % df_ask)
  </code></pre>
  <p>But if I replace the num_points parameter with a date range and change the function, I'm getting an error:</p>
  <pre><code>epic = 'CS.D.EURUSD.MINI.IP'
  resolution = 'D'
  (start_date, end_date) = ('2015-09-15', '2015-09-28')
  response = ig_service.fetch_historical_prices_by_epic_and_date_range(epic, resolution, start_date, end_date)
  
  df_ask = response['prices']['ask']
  print(&quot;ask prices:\n%s&quot; % df_ask)
  </code></pre>
  <p>Error:</p>
  <pre><code>  File &quot;/Users/xxx/untitled5.py&quot;, line 53, in &lt;module&gt;
      response = ig_service.fetch_historical_prices_by_epic_and_date_range(epic, resolution, start_date, end_date)
  
    File &quot;/opt/anaconda3/lib/python3.9/site-packages/trading_ig/rest.py&quot;, line 1618, in fetch_historical_prices_by_epic_and_date_range
  data = self.parse_response(response.text)
  
    File &quot;/opt/anaconda3/lib/python3.9/site-packages/trading_ig/rest.py&quot;, line 342, in parse_response
  raise (Exception(response[&quot;errorCode&quot;]))
  
  Exception: error.malformed.date
  </code></pre>