Database and action

Hello, can someone help me please, I started to create a multi device application, DOP, USD, HTG, and I would like to add a button so the user can convert the devices between , for example conversion DOP → USD, DOP → HTG, HTG → USD , I would like to know how to do this please? Of course I need to know how to add an exchange rate for each of these cases and I need to charge a conversion fee too, can I have some help please?