docs: def chart_json(start, end, period, symbol):
      """ Requests chart data from Poloniex API
      
      Args:
          start: Int epoch date to START getting market stats from.
              Note that this epoch is FURTHER from the current date.
          end: Int epoch date to STOP getting market stats from.
              Note that this epoch is CLOSER to the current date.
          period: Int defining width of each chart candlestick in seconds.
              Valid values: 300, 900, 1800, 7200, 14400, 86400
          symbol: String of currency pair, like a ticker symbol.
  
      Returns:
          Tuple of (JSON data, URL to JSON).
          JSON data as a list of dict dates, where the keys are
          the raw market statistics.
          String URL to Poloniex API representing the given JSON.
      """
      url = ('https://poloniex.com/public?command'
             '=returnChartData&currencyPair={0}&start={1}'
             '&end={2}&period={3}').format(symbol, start, end, period) 
      logger.debug(' HTTP Request URL:\n{0}'.format(url))
      json = requests.get(url).json()
      logger.debug(' JSON:\n{0}'.format(json))
  
      if 'error' in json:
          logger.error(' Invalid parameters in URL for HTTP response')
          raise SystemExit
      elif all(val == 0 for val in json[0]):
          logger.error(' Bad HTTP response.  Time unit too short?')
          raise SystemExit
      elif len(json) < 1: # time to short
          logger.error(' Not enough dates to calculate changes')
          raise SystemExit
  
      return json, url