Method Deck / currency
Computes the cross exchange rate between two currencies from their two given rates against a common base currency, and converts an amount.
None.
| Name | Inputs | Answer |
|---|---|---|
| worked example | {"amount":10000,"base_currency":"USD","from_currency":"JPY","to_currency":"GBP","rate_from":149.5,"rate_to":0.783,"rate_date":"2026-09-30","rate_source":"Illustrative example rates for cross-rate arithmetic; replace rate_from, rate_to, rate_date, and rate_source with your own dated, cited quotes (for example the ECB euro reference rates page)."} | 52.37 GBP |
| test vector: USD/EUR to GBP cross | {"amount":100,"base_currency":"EUR","from_currency":"USD","to_currency":"GBP","rate_from":1.1,"rate_to":0.86,"rate_date":"2026-09-30","rate_source":"Illustrative example rates for cross-rate arithmetic; replace rate_from, rate_to, rate_date, and rate_source with your own dated, cited quotes (for example the ECB euro reference rates page)."} | 78.18 GBP |
| test vector: identical rates give a 1:1 cross rate | {"amount":250,"base_currency":"USD","from_currency":"CAD","to_currency":"AUD","rate_from":1.35,"rate_to":1.35,"rate_date":"2026-09-30","rate_source":"Illustrative example rates for cross-rate arithmetic; replace rate_from, rate_to, rate_date, and rate_source with your own dated, cited quotes (for example the ECB euro reference rates page)."} | 250.00 AUD |
570d44f9c1574ecd2104fbdcdc9fce0f2026-09-30T22:39:30.722Zb53c11ca67bc425d64cf1bf46e9efd80fe19aca01dc83f82091c5055ed18ae2a