Difference between revisions of "Template:Currency convert"
Jump to navigation
Jump to search
(Using https://exchangeratesapi.io/ instead of Yahoo API) |
|||
Line 1: | Line 1: | ||
− | <includeonly>{{#get_web_data: url=https:// | + | <includeonly>{{#get_web_data: url=https://api.exchangeratesapi.io/latest?base={{{1}}}&symbols={{{2}}} |
|format=JSON | |format=JSON | ||
− | |data= | + | |data=rates=rates |
|cache seconds=43200 | |cache seconds=43200 | ||
− | }}{{#expr:{{{3|1}}}*{{#external_value: | + | }}{{#expr:{{{3|1}}}*{{#external_value:rates}} round 2}}{{#clear_external_data:}}<nowiki /></includeonly><noinclude> |
− | This template uses | + | This template uses https://exchangeratesapi.io/ to convert currencies. |
== Examples == | == Examples == |
Latest revision as of 16:58, 30 October 2019
This template uses https://exchangeratesapi.io/ to convert currencies.
Examples
Convert 32 Czech korunas to Polish zloty:
{{Currency convert|CZK|PLN|32}}
→ Expression error: Unexpected < operator.
Convert 1 Romanian leu to Hungarian forint:
{{Currency convert|RON|HUF}}
→ Expression error: Unexpected < operator.
For conversions to euros or US dollars you can also use Template:To EUR and Template:To USD:
{{To EUR|PLN|10}}
→ Expression error: Unexpected < operator.