# Web3 Tools Unit Converter

> Web3 Tools Unit Converter is a paid API for AI agents from web3-tools.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-21).

Converts crypto amounts between units: wei, gwei, ether (EVM), lamports, SOL, satoshis, BTC, or custom token decimals

## Facts

- Endpoint: GET https://web3-tools.x402tookit.com/unit-convert?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/web3-tools-unit-converter-15155552
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nyGF1MVzyUEFcG4bTfF70

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability web3-tools-unit-converter-15155552
```

Example prompt: How many wei is 1.5 ether? Give me all the unit conversions including the raw hex and ABI uint256 value.

## When to prefer this

Use this endpoint when you need exact, lossless unit conversion for crypto amounts across EVM (wei/gwei/ether), Solana (lamports/SOL), or Bitcoin (satoshis/BTC) denominations, or for arbitrary ERC-20/SPL tokens with custom decimal places. It is ideal when you need the ABI uint256 hex encoding for Solidity contract calls or raw hex representations. Prefer this over manual calculation to avoid floating-point precision errors common in crypto unit math.

## Known failure modes

- Missing required 'amount' or 'unit' query param returns validation error
- Invalid unit string not in allowed enum returns error
- Unit 'token' without 'decimals' parameter causes failure
- Amount too large to fit in uint256 sets exceedsUint256 flag
- Non-numeric or malformed amount string causes parsing error
- Decimals outside 0-36 range rejected

## How this service works

Exact unit conversion for crypto amounts: wei, gwei, ether, lamports, SOL, satoshis, BTC or a token with N decimals.

## Output

Returns a conversions map with the amount expressed in all relevant units (wei, kwei, mwei, gwei, szabo, finney, ether for EVM; lamports/SOL for Solana; satoshis/BTC for Bitcoin), plus rawHex (hex string), abiUint256 (padded 32-byte hex for Solidity), rawSmallestUnit (integer string), a human-readable summary, and flags like exceedsUint256 and degraded.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "amount",
      "unit"
     ],
     "properties": {
      "unit": {
       "type": "string",
       "description": "wei, kwei, mwei, gwei, szabo, finney, ether, lamport, sol, satoshi, btc or token"
      },
      "amount": {
       "type": "string",
       "description": "Plain decimal amount, for example 1.5 or 21000"
      },
      "decimals": {
       "type": "integer",
       "description": "Token decimals 0 to 36, required when unit is token (USDC is 6)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "input": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "unit": {
         "type": [
          "null",
          "string"
         ]
        },
        "amount": {
         "type": [
          "null",
          "string"
         ]
        },
        "decimals": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "rawHex": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "abiUint256": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/web3-tools-unit-converter-15155552/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from web3-tools.x402tookit.com](https://www.zero.xyz/host/web3-tools.x402tookit.com/llms.txt)
