def to_fiat(ccy, value, api_code=None):
res = '<STR_LIT>'.format(ccy, value*<NUM_LIT>)<EOL>if api_code is not None:<EOL><INDENT>res += '<STR_LIT>' + api_code<EOL><DEDENT>return float(util.call_api(res))<EOL>
Call the 'frombtc' method and convert x value in the provided currency to BTC.

    :param str ccy: currency code
    :param float value: BTC value to convert
    :param str api_code: Blockchain.info API code
    :return: the value in fiat currency