Coin not increasing when logged off?

My coin hasn’t increased in the past couple days when i have been logged off is it only when your in the game it increases?? Please let me know or apply fix. Thought i would be around 5k coins and i have not gone up except the few from being logged in. Please let me know.