Is there an RPC to get the total amount of tezos in existence at some particular block (or cycle begin/end)?
2 Answers
The current protocol does not keep track of a tally of all tez on the network. It would be a good idea to do so, as it permits computing proportional reward, it can serve as a canari against money printing bugs, and it can be used to refine the governance model.
Since the protocol doesn't keep track of it, there's no node RPC that will give you that information. However, some indexers, like tzscan, do keep track of that info, and they do expose RPCs
TzScan has a service for that, but only for the current value:
https://api1.tzscan.io/v1/supply
returns
{
"dls":"76431859801260",
"foundation":"76431859801260",
"early_bakers":"3156502294100",
"contributors":"608297709519372",
"unfrozen_rewards":"19546676770764",
"missing_revelation":0,
"revelation_rewards":968500000,
"burned_tez_revelation":0,
"burned_tez_origination":"3546923000",
"burned_tez_double_baking":"153472908345",
"total_supply_ico":"764317931415992",
"circulating_supply":"783708546041411"
}
What you are looking for is probably circulating_supply
.