def convert_currency(self, base_fiat, base_amount, target_fiat):
url = "<STR_LIT>" % base_fiat<EOL>data = self.get_url(url).json()<EOL>try:<EOL><INDENT>return data['<STR_LIT>'][target_fiat.upper()] * base_amount<EOL><DEDENT>except KeyError:<EOL><INDENT>raise Exception("<STR_LIT>" % (base_fiat, target_fiat))<EOL><DEDENT>
Convert one fiat amount to another fiat. Uses the fixer.io service.