{"uid":"cap_iGfSZAKz33QQSMLVa__2p","slug":"saylor-innovations-data-desk-crypto-unit-converter-b7498cf7","name":"Saylor Innovations Data Desk: Crypto Unit Converter","description":"Convert crypto units exactly: wei, gwei, ether, lamports, SOL, satoshis, BTC and any token decimals, using integer math with no floating-point rounding errors.","url":"https://saylorinnovations.com/api/crypto/unit-convert?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mrYpZQIX9YriPGytK-jiJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"Convert 1.5 ether to wei using exact integer math — no floating-point errors.","exampleUseCases":[{"title":"Ether to Wei for smart contract","prompt":"I need to pass an exact wei value to a smart contract — can you convert 0.05 ether to wei with no rounding?"},{"title":"Lamports to SOL display amount","prompt":"My wallet shows 2500000000 lamports — how much SOL is that?"},{"title":"Custom token decimal conversion","prompt":"I have a token with 6 decimal places and I want to display 1500000 raw units as a human-readable amount — convert 1500000 from decimals:6 to decimals:0."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T00:38:10.630Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-data-desk-crypto-unit-converter-b7498cf7"}