code: def yahoo(base, target):
      
      api_url = 'http://download.finance.yahoo.com/d/quotes.csv'
      resp = requests.get(
          api_url,
          params={
              'e': '.csv',
              'f': 'sl1d1t1',
              's': '{0}{1}=X'.format(base, target)
          },
          timeout=1,
      )
      value = resp.text.split(',', 2)[1]
      return decimal.Decimal(value)
docs: Parse data from Yahoo.