80trust / 100
Inflation Adjust
by Inflation Adjust in Onchain & crypto
x402 APIPassing, checked 2 h ago
Restate an amount from one year in another year's money, for any country in the World Bank consumer-price series (1960 onwards). Returns the adjusted amount, the cumulative inflation and both index values so the arithmetic is checkable. The series is annual and published with a lag, so a request for a year that does not exist yet answers with the newest one available and says which. For contract comparisons, historical pricing and long-running budgets.
GET https://402.com.tr/api/x402/inflation-adjust
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 665 ms typical, 665 ms slowest 5%
- Last check
- 2 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://402.com.tr/api/x402/inflation-adjust?amount=1000&country=TR&from=2015&to=2025"import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2F402.com.tr%2Fapi%2Fx402%2Finflation-adjust
const res = await pay("https://402.com.tr/api/x402/inflation-adjust?amount=1000&country=TR&from=2015&to=2025");
console.log(await res.json());Example input
{
"amount": "1000",
"country": "TR",
"from": "2015",
"to": "2025"
}Example output
{
"adjusted": 12215.704,
"amount": 1000,
"country": "TR",
"factor": 12.215704,
"fromYear": 2015,
"requestedToYear": 2025,
"toYear": 2025,
"usedLatestAvailable": false
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 2 h ago | Passed | 402 | 659 ms | $0.002 |
| 5 h ago | Passed | 402 | 682 ms | $0.002 |
| 10 h ago | Passed | 402 | 665 ms | $0.002 |