# Saylor Innovations Data Desk: Crypto Unit Converter

> Saylor Innovations Data Desk: Crypto Unit Converter is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-30).

Converts between cryptocurrency units (wei, gwei, ether, lamports, SOL, satoshis, BTC, and custom token decimals) using exact integer math with no floating-point rounding errors.

## Facts

- Endpoint: GET https://saylorinnovations.com/api/crypto/unit-convert?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saylor-innovations-data-desk-crypto-unit-converter-b7498cf7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iGfSZAKz33QQSMLVa__2p

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 saylor-innovations-data-desk-crypto-unit-converter-b7498cf7
```

Example prompt: Convert 1.5 ether to wei using exact integer math — no floating-point errors.

## When to prefer this

Choose this endpoint when you need mathematically exact cryptocurrency unit conversions without any floating-point rounding errors — critical for DeFi, smart contract interactions, wallet displays, and any financial calculation where precision is non-negotiable. Prefer it over general-purpose conversion libraries when working with wei/gwei/ether, lamports/SOL, satoshis/BTC, or custom ERC-20/SPL token decimals specified via the 'decimals:N' syntax.

## Known failure modes

- Missing required query parameters (amount, from, to) returns an error
- Unknown or unsupported unit name for 'from' or 'to' may return an error or require decimals:N syntax
- Non-numeric or negative amount string returns a validation error
- Extremely large numbers may hit string length or processing limits
- Payment failure (x402) if USDC not provided or insufficient balance

## How this service works

Convert crypto units exactly: wei, gwei, ether, lamports, SOL, satoshis, BTC and any token decimals, using integer math with no floating-point rounding errors.

## Output

Returns a JSON object with the converted result as a string (to avoid precision loss), the result expressed in the smallest unit, the number of decimals for both source and target units, a boolean indicating whether the result is exact, a note with context or caveats, and the data source used.

## 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",
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "unit name or decimals:N"
      },
      "from": {
       "type": "string",
       "description": "unit name (wei, gwei, ether, lamport, sol, satoshi, btc, usdc, ...) or decimals:N"
      },
      "amount": {
       "type": "string",
       "description": "non-negative decimal string, for example 1.5"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "amount",
      "from",
      "from_decimals",
      "to",
      "to_decimals",
      "result",
      "result_smallest_unit",
      "exact",
      "note",
      "source"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "End of the range"
      },
      "from": {
       "type": "string",
       "description": "Start of the range"
      },
      "note": {
       "type": "string",
       "description": "Caveat or context for reading the result"
      },
      "exact": {
       "type": "boolean"
      },
      "amount": {
       "type": "string",
       "description": "Amount"
      },
      "result": {
       "type": "string",
       "description": "Result of the operation"
      },
      "source": {
       "type": "string",
       "description": "Data source the values come from"
      },
      "to_decimals": {
       "type": "number",
       "description": "To decimals"
      },
      "from_decimals": {
       "type": "number",
       "description": "From decimals"
      },
      "result_smallest_unit": {
       "type": "string",
       "description": "Result smallest unit"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saylor-innovations-data-desk-crypto-unit-converter-b7498cf7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
