The Bullion API reports what central banks hold in gold. I wanted that to cover more countries, so I added nine more of them in one sweep: Denmark, Iceland, North Macedonia, Rwanda, Angola, Oman, Tajikistan, Tanzania and Moldova.
The central-bank gold pages now cover 52 countries.
Every central bank publishes differently
There is no common format for this. Some report a weight in ounces, some report a value in their own currency, some report both. Some publish monthly, some quarterly, some weekly, and Tajikistan publishes a single audited figure a year. The dates are their own too, so a monthly report is dated at the end of its month while a weekly one carries the exact day it was published.
Two things came out of it. Where a country reports a value but no weight, I can derive the weight by dividing that value by the gold price on the reference date, and the result is labelled as my calculation, not the bank's. And Tajikistan reports each year end in two separate statements, so where the two disagree on the value or the price I leave that year out instead of picking one.
One rule, everywhere
The longest part was getting the public series, the dashboard and the digest email to agree. Each one decided for itself whether a country's change in holdings could be shown. For the countries reported through the ECB, the public series hid the change while the dashboard and the digest email still showed a number. The dashboard could also label a change it had derived itself as buying.
I settled on one rule and applied it everywhere. A source whose reporting direction is unknown shows no tonnes change at all. A change I derived myself keeps its number but is never labelled as buying or selling.
The reason to be strict about this is that a change in reported holdings is not a purchase. I have written about that separately, and now the code enforces it. The monthly change pages say which countries added to or reduced their reported holdings, with the caveat attached.