How do you determine whether Bitcoin Core is synced fully or not from the RPC API? I keep getting the wrong numbers returned daily in the beginning of the day because Bitcoin Core has not yet synced the blockchain from the computer being powered off during the night. So I need a way to determine if it's been synced fully or not, so that I can avoid using the numbers until it has synced fully.
I've looked through https://bitcoincore.org/en/doc/0.21.0/ but can't find anything such as &quot;getsyncamount&quot; or &quot;isfullysynced&quot;.
How is it done?
Use getblockchaininfo and check the value of the initialblockdownload field. If it is true, BItcoin Core is still syncing. If it is false, it is done syncing (or very very close to done).