77trust / 100
Unit Convert
by Unit Convert in Documents & files
x402 APIPassing, checked 3 h ago
Convert an amount between wei, kwei, mwei, gwei, szabo, finney and ether — or between any token decimals (pass a number like 6 for USDC). Integer-exact, no precision loss. Pass amount, from, to. Pure compute, sub-cent — the unit-conversion commodity agents call constantly when building transactions. Not financial advice.
GET https://402.com.tr/api/x402/unit-convert
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 464 ms typical, 650 ms slowest 5%
- Last check
- 3 h ago
- Next check
- any minute now
How to call it
# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X GET 'https://402.com.tr/api/x402/unit-convert?amount=1.5&from=ether&to=wei'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%2Funit-convert
const res = await pay("https://402.com.tr/api/x402/unit-convert?amount=1.5&from=ether&to=wei");
console.log(await res.json());Example input
{
"amount": "1.5",
"from": "ether",
"to": "wei"
}Example output
{
"amount": "1.5",
"baseUnits": "1500000000000000000",
"checkedAt": "2026-10-10T23:00:49.045Z",
"from": "ether",
"fromDecimals": 18,
"result": "1500000000000000000",
"to": "wei",
"toDecimals": 0
}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 |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 757 ms | $0.002 |
| 7 h ago | Passed | 402 | 457 ms | $0.002 |
| 11 h ago | Passed | 402 | 445 ms | $0.002 |
| 15 h ago | Passed | 402 | 452 ms | $0.002 |
| 19 h ago | Passed | 402 | 650 ms | $0.002 |
| 22 h ago | Passed | 402 | 621 ms | $0.002 |
| 26 h ago | Passed | 402 | 464 ms | $0.002 |
| 29 h ago | Passed | 402 | 387 ms | $0.002 |
| 33 h ago | Passed | 402 | 518 ms | $0.002 |
| 36 h ago | Passed | 402 | 453 ms | $0.002 |
| 40 h ago | Passed | 402 | 534 ms | $0.002 |
| 44 h ago | Passed | 402 | 357 ms | $0.002 |
| 2 days ago | Passed | 402 | 465 ms | $0.002 |
| 2 days ago | Passed | 402 | 511 ms | $0.002 |
| 2 days ago | Passed | 402 | 588 ms | $0.002 |