title: Getting timeseries data from Tradermade with executor.map
body: <p>I am pulling rates from Tradermade in timeseries format and adding the timeseries object to a Rates class with some other data, the Rates class performs analysis on the timeseries data and the Rates object is then added to a dictionary with the symbol as its key.</p>
  <p>Being relatively new to programming I followed the synchronous method of getting the data from Tradermade. It's added 66 seconds to the time - which I want to avoid.</p>
  <p>Today I learned about using concurrent.futures and ThreadPoolExecutor.</p>
  <p>The problem I have run into is passing the kwarg arguments to executor.map using a list of symbols as the iterator.</p>
  <p>I have read the QnA on SO and other sites though I have not found a way to solve this problem - it's probably glaringly obvious, though I am a noob - so please be kind :)</p>
  <p>My previous code is pasted below. I will be taking the tm.timeseries part and executing it before I add the symbols and their timeseries objects to the Rates class.</p>
  <p>Though, I have no idea how to pass the arguments required for tm.timeseries into executor.map.</p>
  <p>Any advice?</p>
  <p>Note: from_date and to_datetime are the same for every symbol</p>
  <pre><code>    symbols = [
  
          'AUDUSD', 'EURUSD', 'GBPUSD', 'USDCAD', 'USDJPY', 'USDCHF', 'AUDCAD', 'AUDCHF', 'AUDJPY', 'AUDNZD', 'CADCHF', 'CADJPY',
          'CHFJPY', 'EURAUD', 'EURCHF', 'EURCAD', 'EURGBP', 'EURJPY', 'EURNZD', 'EURZAR', 'GBPAUD', 'GBPCAD', 'GBPCHF', 'GBPJPY',
          'GBPNZD', 'NZDCAD', 'NZDCHF', 'NZDJPY', 'NZDUSD', 'USDMXN', 'USDNOK', 'USDSEK', 'USDSGD', 'USDTRY', 'USDZAR'
      ]
  
      rates = {}
      for symbol in symbols:
          if &quot;JPY&quot; in symbol:
              point = 3
          else:
              point = 5
          rates[symbol] = Rates(
  
              symbol,
              point,
              tm.timeseries(currency=symbol, start=from_date, end=to_datetime,
                            interval=&quot;hourly&quot;, fields=[&quot;open&quot;, &quot;high&quot;, &quot;low&quot;, &quot;close&quot;])
  
          )
  </code></pre>