how do i get the recharge countdown of my currency?
You can use GetUserInventory function to get the countdown. In its response, you can find a VirtualCurrencyRechargeTimes and I'd think its SecondsToRecharge property is what you want.
Yes..
What is the best practice yo get the update time?
Call this every second? Call this in "update" function?
I am using unity.
Calling any API endpoint every second would get your title throttled and possibly blocked entirely, as that would be considered abusive behavior. You should only need to request the countdown time once - the clock on the local device is going to be able to track time just as accurately, so you can just use that timestamp to inform your local code.
2 People are following this question.