Get the historic circulated suppy I'm looking for the historic circulated supply of Bitcoin.  I'm aware I can get the current supply by creating my own node.  But I need the supply at a given date.
Does anyone know of an API to get it.
gettxoutsetinfo will return the current supply in total_amount so it doesn't help. getblockstats doesn't return supply info for the block.

Bitcoinvisuals has the supply chart and you can move the cursor over the chart to know supply at any given date in past.




Since we know block rewards (new coins added to supply) and they are reduced to half after every 210,000 blocks, we can also write a simple script to know the supply at any given block:

def btcSupplyAtBlock(b):
    if b &gt;= 33 * 210000:
        return 20999999.9769
    else:
        reward = 50e8
        supply = 0
        y = 210000  
        while b &gt; y - 1:
            supply = supply + y * reward
            reward = int(reward / 2.0)
            b = b - y
        supply = supply + b * reward
        return (supply + reward) / 1e8


if __name__ == &quot;__main__&quot;:
    block = 1000000
    print(btcSupplyAtBlock(block))

Source: https://github.com/ndsvw/Bitcoin-Supply-Calculator

There are lot of third party APIs available like coinmetrics to achieve the same.

In 3 the script will not include lot of exceptions mentioned in this answer by sipa: https://bitcoin.stackexchange.com/a/38998/