Prices in today's money
Any price restated in one month's money, with the country's consumer price index.
Restating a price
Add real=latest to a pump price, benchmark or series call, and every price is restated in the money of the newest month the country's consumer price index has. Or name a month, real=2020-01, to see every price in that month's money. Each point keeps the price as it was beside it, as original.
curl -G "https://api.oilapi.net/v1/prices/retail" \ -d country=gb \ -d fuel=diesel \ -d from=2020-01-01 \ -d real=latest \ -H "X-API-Key: YOUR_API_KEY"
How it is worked out
A price is multiplied by the index for the month you name and divided by the index for the price's own month. An index comes out some weeks after its month ends, so a price newer than the index uses its latest month; the answer's meta.real says which month the index reaches. Dollar benchmarks with no country, such as Brent, use the United States' index.
With a currency
With currency as well, the price is restated in its own currency first, then converted at the rate of the month you name, not of each day, so the whole series reads in one month's money and one currency.
The indexes
Every country's index is a series of its own, monthly, such as cpi.gb, in Series values. A country with no index answers 422 no_index.