Add get coin function.