Difference between revisions of "Template:Exchange rate"
imported>QEDK |
imported>Evad37 (Wikilinks instead of external links in first column, per edit request) |
||
| Line 6: | Line 6: | ||
}} | }} | ||
|- | |- | ||
| − | | From [ | + | | From [[Google Finance]]: |
|{{#ifeq:{{{1}}}|AUD||[https://www.google.com/finance?q=AUD{{#if:1|{{{1|}}}}} AUD]}} {{#ifeq:{{{1}}}|CAD||[https://www.google.com/finance?q=CAD{{#if:1|{{{1|}}}}} CAD]}} {{#ifeq:{{{1}}}|CHF||[https://www.google.com/finance?q=CHF{{#if:1|{{{1|}}}}} CHF]}} {{#ifeq:{{{1}}}|EUR||[https://www.google.com/finance?q=EUR{{#if:1|{{{1|}}}}} EUR]}} {{#ifeq:{{{1}}}|GBP||[https://www.google.com/finance?q=GBP{{#if:1|{{{1|}}}}} GBP]}} {{#ifeq:{{{1}}}|HKD||[https://www.google.com/finance?q=HKD{{#if:1|{{{1|}}}}} HKD]}} {{#ifeq:{{{1}}}|JPY||[https://www.google.com/finance?q=JPY{{#if:1|{{{1|}}}}} JPY]}} {{#ifeq:{{{1}}}|USD||[https://www.google.com/finance?q=USD{{#if:1|{{{1|}}}}} USD]}} {{#if:{{{2|}}} | |{{#ifeq:{{{1}}}|AUD||[https://www.google.com/finance?q=AUD{{#if:1|{{{1|}}}}} AUD]}} {{#ifeq:{{{1}}}|CAD||[https://www.google.com/finance?q=CAD{{#if:1|{{{1|}}}}} CAD]}} {{#ifeq:{{{1}}}|CHF||[https://www.google.com/finance?q=CHF{{#if:1|{{{1|}}}}} CHF]}} {{#ifeq:{{{1}}}|EUR||[https://www.google.com/finance?q=EUR{{#if:1|{{{1|}}}}} EUR]}} {{#ifeq:{{{1}}}|GBP||[https://www.google.com/finance?q=GBP{{#if:1|{{{1|}}}}} GBP]}} {{#ifeq:{{{1}}}|HKD||[https://www.google.com/finance?q=HKD{{#if:1|{{{1|}}}}} HKD]}} {{#ifeq:{{{1}}}|JPY||[https://www.google.com/finance?q=JPY{{#if:1|{{{1|}}}}} JPY]}} {{#ifeq:{{{1}}}|USD||[https://www.google.com/finance?q=USD{{#if:1|{{{1|}}}}} USD]}} {{#if:{{{2|}}} | ||
|[https://www.google.com/finance?q={{#if:1|{{{2}}}}}{{#if:1|{{{1|}}}}} {{#if:1|{{{2}}}}}]}} {{#if:{{{3|}}} | |[https://www.google.com/finance?q={{#if:1|{{{2}}}}}{{#if:1|{{{1|}}}}} {{#if:1|{{{2}}}}}]}} {{#if:{{{3|}}} | ||
| Line 12: | Line 12: | ||
|[https://www.google.com/finance?q={{#if:1|{{{4}}}}}{{#if:1|{{{1|}}}}} {{#if:1|{{{4}}}}}]}} | |[https://www.google.com/finance?q={{#if:1|{{{4}}}}}{{#if:1|{{{1|}}}}} {{#if:1|{{{4}}}}}]}} | ||
|- | |- | ||
| − | | From [ | + | | From [[Yahoo! Finance]]: |
|{{#ifeq:{{{1}}}|AUD||[https://finance.yahoo.com/currency-converter/#from=AUD;to={{#if:1|{{{1|}}}}} AUD]}} {{#ifeq:{{{1}}}|CAD||[https://finance.yahoo.com/currency-converter/#from=CAD;to={{#if:1|{{{1|}}}}} CAD]}} {{#ifeq:{{{1}}}|CHF||[https://finance.yahoo.com/currency-converter/#from=CHF;to={{#if:1|{{{1|}}}}} CHF]}} {{#ifeq:{{{1}}}|EUR||[https://finance.yahoo.com/currency-converter/#from=EUR;to={{#if:1|{{{1|}}}}} EUR]}} {{#ifeq:{{{1}}}|GBP||[https://finance.yahoo.com/currency-converter/#from=GBP;to={{#if:1|{{{1|}}}}} GBP]}} {{#ifeq:{{{1}}}|HKD||[https://finance.yahoo.com/currency-converter/#from=HKD;to={{#if:1|{{{1|}}}}} HKD]}} {{#ifeq:{{{1}}}|JPY||[https://finance.yahoo.com/currency-converter/#from=JPY;to={{#if:1|{{{1|}}}}} JPY]}} {{#ifeq:{{{1}}}|USD||[https://finance.yahoo.com/currency-converter/#from=USD;to={{#if:1|{{{1|}}}}} USD]}} {{#if:{{{2|}}} | |{{#ifeq:{{{1}}}|AUD||[https://finance.yahoo.com/currency-converter/#from=AUD;to={{#if:1|{{{1|}}}}} AUD]}} {{#ifeq:{{{1}}}|CAD||[https://finance.yahoo.com/currency-converter/#from=CAD;to={{#if:1|{{{1|}}}}} CAD]}} {{#ifeq:{{{1}}}|CHF||[https://finance.yahoo.com/currency-converter/#from=CHF;to={{#if:1|{{{1|}}}}} CHF]}} {{#ifeq:{{{1}}}|EUR||[https://finance.yahoo.com/currency-converter/#from=EUR;to={{#if:1|{{{1|}}}}} EUR]}} {{#ifeq:{{{1}}}|GBP||[https://finance.yahoo.com/currency-converter/#from=GBP;to={{#if:1|{{{1|}}}}} GBP]}} {{#ifeq:{{{1}}}|HKD||[https://finance.yahoo.com/currency-converter/#from=HKD;to={{#if:1|{{{1|}}}}} HKD]}} {{#ifeq:{{{1}}}|JPY||[https://finance.yahoo.com/currency-converter/#from=JPY;to={{#if:1|{{{1|}}}}} JPY]}} {{#ifeq:{{{1}}}|USD||[https://finance.yahoo.com/currency-converter/#from=USD;to={{#if:1|{{{1|}}}}} USD]}} {{#if:{{{2|}}} | ||
|[https://finance.yahoo.com/currency-converter/#from={{#if:1|{{{2}}}}}&to={{#if:1|{{{1|}}}}} {{#if:1|{{{2}}}}}]}} {{#if:{{{3|}}} | |[https://finance.yahoo.com/currency-converter/#from={{#if:1|{{{2}}}}}&to={{#if:1|{{{1|}}}}} {{#if:1|{{{2}}}}}]}} {{#if:{{{3|}}} | ||
| Line 18: | Line 18: | ||
|[https://finance.yahoo.com/currency-converter/#from={{#if:1|{{{4}}}}}&to={{#if:1|{{{1|}}}}} {{#if:1|{{{4}}}}}]}} | |[https://finance.yahoo.com/currency-converter/#from={{#if:1|{{{4}}}}}&to={{#if:1|{{{1|}}}}} {{#if:1|{{{4}}}}}]}} | ||
|- | |- | ||
| − | | From [ | + | | From [[XE.com]]: |
|{{#ifeq:{{{1}}}|AUD||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=AUD&To={{#if:1|{{{1|}}}}} AUD]}} {{#ifeq:{{{1}}}|CAD||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=CAD&To={{#if:1|{{{1|}}}}} CAD]}} {{#ifeq:{{{1}}}|CHF||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=CHF&To={{#if:1|{{{1|}}}}} CHF]}} {{#ifeq:{{{1}}}|EUR||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=EUR&To={{#if:1|{{{1|}}}}} EUR]}} {{#ifeq:{{{1}}}|GBP||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=GBP&To={{#if:1|{{{1|}}}}} GBP]}} {{#ifeq:{{{1}}}|HKD||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=HKD&To={{#if:1|{{{1|}}}}} HKD]}} {{#ifeq:{{{1}}}|JPY||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=JPY&To={{#if:1|{{{1|}}}}} JPY]}} {{#ifeq:{{{1}}}|USD||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=USD&To={{#if:1|{{{1|}}}}} USD]}} {{#if:{{{2|}}} | |{{#ifeq:{{{1}}}|AUD||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=AUD&To={{#if:1|{{{1|}}}}} AUD]}} {{#ifeq:{{{1}}}|CAD||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=CAD&To={{#if:1|{{{1|}}}}} CAD]}} {{#ifeq:{{{1}}}|CHF||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=CHF&To={{#if:1|{{{1|}}}}} CHF]}} {{#ifeq:{{{1}}}|EUR||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=EUR&To={{#if:1|{{{1|}}}}} EUR]}} {{#ifeq:{{{1}}}|GBP||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=GBP&To={{#if:1|{{{1|}}}}} GBP]}} {{#ifeq:{{{1}}}|HKD||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=HKD&To={{#if:1|{{{1|}}}}} HKD]}} {{#ifeq:{{{1}}}|JPY||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=JPY&To={{#if:1|{{{1|}}}}} JPY]}} {{#ifeq:{{{1}}}|USD||[https://www.xe.com/currencyconverter/convert/?Amount=1&From=USD&To={{#if:1|{{{1|}}}}} USD]}} {{#if:{{{2|}}} | ||
|[https://www.xe.com/currencyconverter/convert/?Amount=1&From={{#if:1|{{{2}}}}}&To={{#if:1|{{{1|}}}}} {{#if:1|{{{2}}}}}]}} {{#if:{{{3|}}} | |[https://www.xe.com/currencyconverter/convert/?Amount=1&From={{#if:1|{{{2}}}}}&To={{#if:1|{{{1|}}}}} {{#if:1|{{{2}}}}}]}} {{#if:{{{3|}}} | ||
| Line 24: | Line 24: | ||
|[https://www.xe.com/currencyconverter/convert/?Amount=1&From={{#if:1|{{{4}}}}}&To={{#if:1|{{{1|}}}}} {{#if:1|{{{4}}}}}]}} | |[https://www.xe.com/currencyconverter/convert/?Amount=1&From={{#if:1|{{{4}}}}}&To={{#if:1|{{{1|}}}}} {{#if:1|{{{4}}}}}]}} | ||
|- | |- | ||
| − | | From | + | | From OANDA: |
|{{#ifeq:{{{1}}}|AUD||[https://www.oanda.com/currency/converter/?value=1&exch=AUD&expr={{#if:1|{{{1|}}}}} AUD]}} {{#ifeq:{{{1}}}|CAD||[https://www.oanda.com/currency/converter/?value=1&exch=CAD&expr={{#if:1|{{{1|}}}}} CAD]}} {{#ifeq:{{{1}}}|CHF||[https://www.oanda.com/currency/converter/?value=1&exch=CHF&expr={{#if:1|{{{1|}}}}} CHF]}} {{#ifeq:{{{1}}}|EUR||[https://www.oanda.com/currency/converter/?value=1&exch=EUR&expr={{#if:1|{{{1|}}}}} EUR]}} {{#ifeq:{{{1}}}|GBP||[https://www.oanda.com/currency/converter/?value=1&exch=GBP&expr={{#if:1|{{{1|}}}}} GBP]}} {{#ifeq:{{{1}}}|HKD||[https://www.oanda.com/currency/converter/?value=1&exch=HKD&expr={{#if:1|{{{1|}}}}} HKD]}} {{#ifeq:{{{1}}}|JPY||[https://www.oanda.com/currency/converter/?value=1&exch=JPY&expr={{#if:1|{{{1|}}}}} JPY]}} {{#ifeq:{{{1}}}|USD||[https://www.oanda.com/currency/converter/?value=1&exch=USD&expr={{#if:1|{{{1|}}}}} USD]}} {{#if:{{{2|}}} | |{{#ifeq:{{{1}}}|AUD||[https://www.oanda.com/currency/converter/?value=1&exch=AUD&expr={{#if:1|{{{1|}}}}} AUD]}} {{#ifeq:{{{1}}}|CAD||[https://www.oanda.com/currency/converter/?value=1&exch=CAD&expr={{#if:1|{{{1|}}}}} CAD]}} {{#ifeq:{{{1}}}|CHF||[https://www.oanda.com/currency/converter/?value=1&exch=CHF&expr={{#if:1|{{{1|}}}}} CHF]}} {{#ifeq:{{{1}}}|EUR||[https://www.oanda.com/currency/converter/?value=1&exch=EUR&expr={{#if:1|{{{1|}}}}} EUR]}} {{#ifeq:{{{1}}}|GBP||[https://www.oanda.com/currency/converter/?value=1&exch=GBP&expr={{#if:1|{{{1|}}}}} GBP]}} {{#ifeq:{{{1}}}|HKD||[https://www.oanda.com/currency/converter/?value=1&exch=HKD&expr={{#if:1|{{{1|}}}}} HKD]}} {{#ifeq:{{{1}}}|JPY||[https://www.oanda.com/currency/converter/?value=1&exch=JPY&expr={{#if:1|{{{1|}}}}} JPY]}} {{#ifeq:{{{1}}}|USD||[https://www.oanda.com/currency/converter/?value=1&exch=USD&expr={{#if:1|{{{1|}}}}} USD]}} {{#if:{{{2|}}} | ||
|[https://www.oanda.com/currency/converter/?value=1&exch={{#if:1|{{{2}}}}}&expr={{#if:1|{{{1|}}}}} {{#if:1|{{{2}}}}}]}} {{#if:{{{3|}}} | |[https://www.oanda.com/currency/converter/?value=1&exch={{#if:1|{{{2}}}}}&expr={{#if:1|{{{1|}}}}} {{#if:1|{{{2}}}}}]}} {{#if:{{{3|}}} | ||
| Line 30: | Line 30: | ||
|[https://www.oanda.com/currency/converter/?value=1&exch={{#if:1|{{{4}}}}}&expr={{#if:1|{{{1|}}}}} {{#if:1|{{{4}}}}}]}} | |[https://www.oanda.com/currency/converter/?value=1&exch={{#if:1|{{{4}}}}}&expr={{#if:1|{{{1|}}}}} {{#if:1|{{{4}}}}}]}} | ||
|- | |- | ||
| − | | From | + | | From fxtop.com: |
|{{#ifeq:{{{1}}}|AUD||[http://fxtop.com/en/currency-pair.php?C1=AUD&C2={{#if:1|{{{1|}}}}} AUD]}} {{#ifeq:{{{1}}}|CAD||[http://fxtop.com/en/currency-pair.php?C1=CAD&C2={{#if:1|{{{1|}}}}} CAD]}} {{#ifeq:{{{1}}}|CHF||[http://fxtop.com/en/currency-pair.php?C1=CHF&C2={{#if:1|{{{1|}}}}} CHF]}} {{#ifeq:{{{1}}}|EUR||[http://fxtop.com/en/currency-pair.php?C1=EUR&C2={{#if:1|{{{1|}}}}} EUR]}} {{#ifeq:{{{1}}}|GBP||[http://fxtop.com/en/currency-pair.php?C1=GBP&C2={{#if:1|{{{1|}}}}} GBP]}} {{#ifeq:{{{1}}}|HKD||[http://fxtop.com/en/currency-pair.php?C1=HKD&C2={{#if:1|{{{1|}}}}} HKD]}} {{#ifeq:{{{1}}}|JPY||[http://fxtop.com/en/currency-pair.php?C1=JPY&C2={{#if:1|{{{1|}}}}} JPY]}} {{#ifeq:{{{1}}}|USD||[http://fxtop.com/en/currency-pair.php?C1=USD&C2={{#if:1|{{{1|}}}}} USD]}} {{#if:{{{2|}}} | |{{#ifeq:{{{1}}}|AUD||[http://fxtop.com/en/currency-pair.php?C1=AUD&C2={{#if:1|{{{1|}}}}} AUD]}} {{#ifeq:{{{1}}}|CAD||[http://fxtop.com/en/currency-pair.php?C1=CAD&C2={{#if:1|{{{1|}}}}} CAD]}} {{#ifeq:{{{1}}}|CHF||[http://fxtop.com/en/currency-pair.php?C1=CHF&C2={{#if:1|{{{1|}}}}} CHF]}} {{#ifeq:{{{1}}}|EUR||[http://fxtop.com/en/currency-pair.php?C1=EUR&C2={{#if:1|{{{1|}}}}} EUR]}} {{#ifeq:{{{1}}}|GBP||[http://fxtop.com/en/currency-pair.php?C1=GBP&C2={{#if:1|{{{1|}}}}} GBP]}} {{#ifeq:{{{1}}}|HKD||[http://fxtop.com/en/currency-pair.php?C1=HKD&C2={{#if:1|{{{1|}}}}} HKD]}} {{#ifeq:{{{1}}}|JPY||[http://fxtop.com/en/currency-pair.php?C1=JPY&C2={{#if:1|{{{1|}}}}} JPY]}} {{#ifeq:{{{1}}}|USD||[http://fxtop.com/en/currency-pair.php?C1=USD&C2={{#if:1|{{{1|}}}}} USD]}} {{#if:{{{2|}}} | ||
|[http://fxtop.com/en/currency-pair.php?C1={{#if:1|{{{2}}}}}&C2={{#if:1|{{{1|}}}}} {{#if:1|{{{2}}}}}]}} {{#if:{{{3|}}} | |[http://fxtop.com/en/currency-pair.php?C1={{#if:1|{{{2}}}}}&C2={{#if:1|{{{1|}}}}} {{#if:1|{{{2}}}}}]}} {{#if:{{{3|}}} | ||
Revision as of 06:37, 3 April 2020
| Current exchange rates | |
|---|---|
| From Google Finance: | AUD CAD CHF EUR GBP HKD JPY USD |
| From Yahoo! Finance: | AUD CAD CHF EUR GBP HKD JPY USD |
| From XE.com: | AUD CAD CHF EUR GBP HKD JPY USD |
| From OANDA: | AUD CAD CHF EUR GBP HKD JPY USD |
| From fxtop.com: | AUD CAD CHF EUR GBP HKD JPY USD |
Contents
Instruction
It is very easy to use this template. You will know right away when you see this example:
{{Exchange rate|TWD}}
which produces
| Current TWD exchange rates | |
|---|---|
| From Google Finance: | AUD CAD CHF EUR GBP HKD JPY USD |
| From Yahoo! Finance: | AUD CAD CHF EUR GBP HKD JPY USD |
| From XE.com: | AUD CAD CHF EUR GBP HKD JPY USD |
| From OANDA: | AUD CAD CHF EUR GBP HKD JPY USD |
| From fxtop.com: | AUD CAD CHF EUR GBP HKD JPY USD |
Additional currencies
You may also specify up to 3 additional foreign currencies.
{{Exchange rate|SGD|MYR|CNY|IDR}}
produces
| Current SGD exchange rates | |
|---|---|
| From Google Finance: | AUD CAD CHF EUR GBP HKD JPY USD MYR CNY IDR |
| From Yahoo! Finance: | AUD CAD CHF EUR GBP HKD JPY USD MYR CNY IDR |
| From XE.com: | AUD CAD CHF EUR GBP HKD JPY USD MYR CNY IDR |
| From OANDA: | AUD CAD CHF EUR GBP HKD JPY USD MYR CNY IDR |
| From fxtop.com: | AUD CAD CHF EUR GBP HKD JPY USD MYR CNY IDR |
Alternative layouts
If you don't like navbox style you can specify style = h3 or style = h2 which produces something more like standard text. Using header = h3 or header = h2 also have the same effect.
{{Exchange rate|EUR|style=h3}}
produces
| From Google Finance: | AUD CAD CHF GBP HKD JPY USD |
| From Yahoo! Finance: | AUD CAD CHF GBP HKD JPY USD |
| From XE.com: | AUD CAD CHF GBP HKD JPY USD |
| From OANDA: | AUD CAD CHF GBP HKD JPY USD |
| From fxtop.com: | AUD CAD CHF GBP HKD JPY USD |
The |style= parameter overrides the |header= parameter, but not vice versa. Thus, if the template is called with header = h3 but style = navbox, it will display as a navbox. If it is called with header = h3 and no specification for |style=, on the other hand, |header= will be used and it will show up as text instead of as a nabvox.
You may specify header = h3 or header = h2 so that the mock header looks like the level 3 header or level 2 header, respectively. By default, the template displays like a navbox. This template currently only supports an overridden mock headers 2 and 3, not level 4, 5, or 6.
{{Exchange rate|EUR|header = h3}}
produces
| From Google Finance: | AUD CAD CHF GBP HKD JPY USD |
| From Yahoo! Finance: | AUD CAD CHF GBP HKD JPY USD |
| From XE.com: | AUD CAD CHF GBP HKD JPY USD |
| From OANDA: | AUD CAD CHF GBP HKD JPY USD |
| From fxtop.com: | AUD CAD CHF GBP HKD JPY USD |
Sites managed
- Google finance : live exchange rates with history since mid 2003
- Yahoo! Finance : currency converter with pocket guide
- XE : currency converter and 10 years history charts
- OANDA : currency converter, pocket guide, live exchange rates, with history since 1990
- fxtop : exchange rates from central banks, daily historical rates and charts from 1953, currency converter (10 currencies at the same time), cross exchange rates, world map and pocket guide
Caveat
- "Current XYZ exchange rates" looks like a section title, but it's not. This was done to "remove" the edit links on the right so that people won't accidentally change the template. However, the side-effect of that is the font size won't change in IE (at least IE 6) if I enlarge or shrink my font size.
Choice of currencies
Currently, the 8 default currencies listed here are Bloomberg's benchmark currencies [1].
See also
| The above documentation is transcluded from Template:Exchange rate/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |