A slight generalization of doc's answer:
First, get currency data into a cell with the base currency of your choice (in this example, ILS is the base currency):
Let's say that the output resides in cell I17.
Now, the foreign-to-base ratio can be obtained by (example for GBP):
The number 9 here represents the number of characters of the exchange rate that are used (number of digits + decimal point). You may use more or less as required (number is concatenated, not rounded), but not more than 12. If you don't need high accuracy, it may be safer to use just 4 characters in case the api changes in the future.
[I used exchangeratesapi.io since it is a public service provided by the European Central Bank, which I think makes it unlikely to be discontinued]