Closed RaptaG closed 7 months ago
Something like that, you already found the solution. The default base is USD. https://raw.githubusercontent.com/ismartcoding/currency-api/main/latest/data.json
I kept it here so that other people can see it before requesting basing from all currencies, which would increase the APIs size without reason.
I recommend you reopen and pin this so that other developers can see it
This can be achieved by a simple division:
currency1 =
rate of currency2 / rate of currency1
currency2Example
1 Euro =
(the value for Yen from the API) / (the value for Euro from the API)
YenMathematical explanation
x
is the rate $ to € from the APIy
is the rate $ to ¥ from the API1$ = x € 1$ = y ¥
1$ = 1$ <=> x € = y ¥ <=> 1€ = y/x ¥