Hope you're having a great day!
Should this kind of feature be implemented in a theme or as an app?
You could support multiple currencies and languages in your theme (See the help here)
which legal external currency conversion API should I use ?
No need for an external currency conversion API. When you sell to multiple countries or regions, your customers can view prices in your store, pay for their orders at checkout, and receive refunds in their local currency. You can choose to have prices converted automatically using the current market exchange rate, or converted manually using an exchange rate that you choose. Only stores using Shopify Payments can use this feature.