# Buggy code
def _find_price(self, crypto_symbol: str, fiat_symbol: str) -> float:
    """
    Call CoinMarketCap API to retrieve the price in the FIAT
    :param crypto_symbol: Crypto-currency you want to convert (e.g BTC)
    :param fiat_symbol: FIAT currency you want to convert to (e.g USD)
    :return: float, price of the crypto-currency in Fiat
    """
    # Check if the fiat convertion you want is supported
    if not self._is_supported_fiat(fiat=fiat_symbol):
        raise ValueError("The fiat {} is not supported.".format(fiat_symbol))

    return float(
        self._coinmarketcap.ticker(currency=crypto_symbol, convert=fiat_symbol)[
            "price_" + fiat_symbol.lower()
        ]
    )


# Traceback (urllib3.exceptions.NewConnectionError)
[freqtrade] $ python3 freqtrade/main.py hyperopt -e 10
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x114221b38>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x114221b38>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='files.coinmarketcap.com', port=443): Max retries exceeded with url: /generated/search/quick_search.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x114221b38>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "freqtrade/main.py", line 15, in <module>
from freqtrade import __version__, exchange, persistence, rpc, DependencyException, \
File "/Users/shusso/GoogleDrive/code/freqtrade/freqtrade/rpc/__init__.py", line 3, in <module>
from . import telegram
File "/Users/shusso/GoogleDrive/code/freqtrade/freqtrade/rpc/telegram.py", line 27, in <module>
_FIAT_CONVERT = CryptoToFiatConverter()
File "/Users/shusso/GoogleDrive/code/freqtrade/freqtrade/fiat_convert.py", line 60, in __init__
self._coinmarketcap = Pymarketcap()
File "/usr/local/lib/python3.6/site-packages/pymarketcap/core.py", line 48, in __init__
self.correspondences = self._cache_symbols()
File "/usr/local/lib/python3.6/site-packages/pymarketcap/core.py", line 81, in _cache_symbols
currencies = get(url).json()
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='files.coinmarketcap.com', port=443): Max retries exceeded with url: /generated/search/quick_search.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x114221b38>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

# Fixed code
def _find_price(self, crypto_symbol: str, fiat_symbol: str) -> float:
    """
    Call CoinMarketCap API to retrieve the price in the FIAT
    :param crypto_symbol: Crypto-currency you want to convert (e.g BTC)
    :param fiat_symbol: FIAT currency you want to convert to (e.g USD)
    :return: float, price of the crypto-currency in Fiat
    """
    # Check if the fiat convertion you want is supported
    if not self._is_supported_fiat(fiat=fiat_symbol):
        raise ValueError("The fiat {} is not supported.".format(fiat_symbol))
    try:
        return float(
            self._coinmarketcap.ticker(currency=crypto_symbol, convert=fiat_symbol)[
                "price_" + fiat_symbol.lower()
            ]
        )
    except BaseException:
        return 0.0