Hello
I have done this is excel using blockchair API data.
https://bitcointalk.org/index.php?topic=5245623.0The user Coding Enthusiast did that in C.
https://bitcointalk.org/index.php?topic=1616888.0....
IntroductionThis is a simple open source tool which can help users keep track of their
bitcoin addresses,
balance of each address,
bitcoin price and
Total balance value in BTC, $ and user's local currency,
balances at a specific height.
The main focus will be in keeping this tool light and fast.
*Click on the image to see bigger size*
↑...
There is also the website
http://www.homebitcoin.com/easybalance/ which does that but it doesn't support segwit addresses.
Maybe those projects can help you in your project. I don't know how to use your local bitcoin core RPC api, but I believe it should be easy.
You can click in those respective threads for more details, I just quoted a small part of each.