{"uid":"cap_xwfdhhEbj7X_Yo19JmIZn","slug":"coinlight-unit-converter-d7181a14","name":"Coinlight Unit Converter","description":"Coinlight charges USDC per API call with the x402 protocol on Solana and Base.","url":"https://coinlight-app.vercel.app/p/units-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","examples":[{"from":"usdc","amount":"0.01"}],"required":["amount","from"],"properties":{"from":{"enum":["sol","lamports","eth","gwei","wei","usdc","usdc_atomic","units","atomic"],"type":"string","description":"Unit of amount."},"amount":{"type":"string","description":"Amount to convert, e.g. 1.5"},"decimals":{"type":"string","description":"Decimals when from is units/atomic. Default 6."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"endpoint":"Crypto unit converter"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_v5GHX9fEvYnpJsCXppzS3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts cryptocurrency amounts between human-readable and atomic units for SOL/lamports, ETH/gwei/wei, USDC, and any custom decimal token — bigint-safe.","exampleAgentPrompt":"Convert 1.5 SOL to lamports for me — I need the exact bigint-safe value without any floating point rounding.","exampleUseCases":[{"title":"Prepare Solana transaction amount","prompt":"I need to send 0.75 SOL in a transaction but the program expects lamports — convert 0.75 SOL to lamports for me."},{"title":"Parse ETH gas fee in human units","prompt":"I got back a gas fee of 21000000000 gwei from a transaction — convert that to ETH so I can display it to the user."},{"title":"USDC DeFi contract amount encoding","prompt":"I want to deposit 50 USDC into a smart contract that takes atomic units with 6 decimals — what's 50 USDC in usdc_atomic?"}],"resultDescription":"Returns a JSON object with the converted amount in the target unit(s), e.g. the lamport count for a given SOL amount, or the wei equivalent of an ETH value. The result is bigint-safe, meaning full integer precision without floating-point rounding errors, along with metadata identifying the endpoint.","failureModes":["Missing required 'amount' or 'from' query parameter returns an error","Unsupported unit type not in the enum returns an error","Non-numeric 'amount' string causes a parse error","Missing 'decimals' when using 'units' or 'atomic' from-type may default to 6 or error","Very large numbers beyond safe integer range may cause unexpected behavior if not handled"],"whenToPreferThis":"Use this endpoint when you need exact, bigint-safe conversion between cryptocurrency denominations — especially for Solana (SOL/lamports), Ethereum (ETH/gwei/wei), or USDC and other SPL tokens with configurable decimals. Prefer it over manual math when floating-point precision errors would corrupt a transaction amount or contract call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T00:33:48.815Z","isFirstParty":false,"canonicalSlug":"coinlight-unit-converter-d7181a14"}