title: Importing Data from CoinMarketCap
body: <p>I am following a Youtube tutorial that is importing data from Yahoo for the S&amp;P500 and I am attempting to instead import data from coinmarketcap to track cryptocurrency data.</p>
  
  <p>I am attempting to use Pandas DataReader to get data from coinmarketcap but am getting an error (NotImplementedError: data_source='coinmarketcap' is not implemented).</p>
  
  <p>I am not sure if my syntax is wrong or if I'm missing a module or I am using the incorrect data_source implementation.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>import coinmarketcap
  
  import bs4 as bs
  import datetime as dt
  import os
  import pandas_datareader as web
  import pickle
  import requests
  
  def save_cmc_tickers():
      resp = requests.get('https://coinmarketcap.com')
      soup = bs.BeautifulSoup(resp.text, "lxml")
      table = soup.find('table', {'class': 'table floating-header'})
      #table1 = soup.find('table', {'class': 'no-wrap text-right'})
      tickers = []
      for row in table.findAll('tr')[1:]:
          ticker = row.findAll('a')[0].text
          price = row.findAll('a', {'class': 'price'})[0].text
          tickers.append(ticker)
          tickers.append(price)
  
      with open("cmctickers.pickle", "wb") as f:
          pickle.dump(tickers, f)
  
      print(tickers)
  
      return tickers
  
      #save_cmc_tickers()
  
      def get_data_from_cmc(reload_cmc100=False):
  
      if reload_cmc100:
          tickers = save_cmc_tickers()
      else:
          with open("cmctickers.pickle", "rb") as f:
              tickers = pickle.load(f)
  
      if not os.path.exists('stock_dfs'):
          os.makedirs('stock_dfs')
  
      start = dt.datetime(2010, 1, 1)
      end = dt.datetime(2017, 12, 31)
  
      for ticker in tickers:
          print(ticker)
          if not os.path.exists('stock_dfs/{}.csv'.format(ticker)):
              df = web.DataReader(ticker, 'coinmarketcap', start, end)
              df.to_csv('stock_dfs/{}.csv'.format(ticker))
          else:
              print("Already have {}".format(ticker))
  
  get_data_from_cmc()
  </code></pre>
  
  <p>I was also getting a "EOFError: Ran out of input" error earlier, so I don't know if that has anything to do with it, but that is no longer appearing.</p>
  
  <p>Any information would help greatly. Thanks.</p>