{"_id":"@1llet.xyz/sdk-currency","_rev":"2-bc6ac87f3de490a853b68c7d018c2557","name":"@1llet.xyz/sdk-currency","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@1llet.xyz/sdk-currency","version":"0.1.0","keywords":["currency","price","coingecko","conversion"],"author":"","license":"MIT","_id":"@1llet.xyz/sdk-currency@0.1.0","maintainers":[{"name":"1llet.xyz","email":"sebastian@1llet.xyz"}],"dist":{"shasum":"8197f36af195e32a598a62ba14b0658f27267b95","tarball":"https://registry.npmjs.org/@1llet.xyz/sdk-currency/-/sdk-currency-0.1.0.tgz","fileCount":8,"integrity":"sha512-tucsZA+LlY85y3RV+Hg76EprkBMcDnPqeJfFIwyH18PbcPTRxjEKdD4aVJga/hLCctkj6q9SiZHL8QX4PHaZXA==","signatures":[{"sig":"MEQCIBiUfe8pRyMUZFmIgllb3SyeVsLs309eu/xrYOhjUwWsAiAtaelUn+W3CWSH+F0Z/k8GITT14QchpFtPUlosTC8/WA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15005},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"217be1f53f2539862b476b02159c642cad379791","scripts":{"dev":"tsup --watch","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"1llet.xyz","email":"sebastian@1llet.xyz"},"_npmVersion":"10.8.2","description":"SDK for Crypto and Fiat Price Conversions","directories":{},"_nodeVersion":"20.17.0","dependencies":{"axios":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-currency_0.1.0_1767745162642_0.16438796928809185","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@1llet.xyz/sdk-currency","version":"0.1.1","description":"SDK for Crypto and Fiat Price Conversions","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"tsup","dev":"tsup --watch","prepublishOnly":"npm run build"},"keywords":["currency","price","coingecko","conversion"],"author":"","license":"MIT","dependencies":{"axios":"^1.6.0"},"devDependencies":{"typescript":"^5.0.0","tsup":"^8.0.0","@types/node":"^20.0.0"},"_id":"@1llet.xyz/sdk-currency@0.1.1","gitHead":"b80196df5bbcf4480aeeb4781bde065bd233b86f","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-sQ/NvL8f+hAMog1Y+nC5P/PPDfSyCghV93e+vtxEQXtCPnqTOhfiYnpxf+DIK2HjFcXEgniGDlilBUxNQ++XsQ==","shasum":"19dadce1102fafa34c55b8bc3aa0df386ac87e5f","tarball":"https://registry.npmjs.org/@1llet.xyz/sdk-currency/-/sdk-currency-0.1.1.tgz","fileCount":8,"unpackedSize":19001,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCTI31rm7y9mpPaOrTMdKHD1i2IaXwsVtDyWt5epjdyywIgNqlOhiMT755uVqxmNHeqMHbRtehhFtxLJFKbO4ZdBnw="}]},"_npmUser":{"name":"1llet.xyz","email":"sebastian@1llet.xyz"},"directories":{},"maintainers":[{"name":"1llet.xyz","email":"sebastian@1llet.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk-currency_0.1.1_1767745668568_0.05542192577453453"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-07T00:19:22.562Z","modified":"2026-01-07T00:27:48.957Z","0.1.0":"2026-01-07T00:19:22.810Z","0.1.1":"2026-01-07T00:27:48.759Z"},"license":"MIT","keywords":["currency","price","coingecko","conversion"],"description":"SDK for Crypto and Fiat Price Conversions","maintainers":[{"name":"1llet.xyz","email":"sebastian@1llet.xyz"}],"readme":"# Currency SDK 💰\n\nA standalone SDK for fetching crypto/fiat prices and performing conversions using CoinGecko.\n\n## 📦 Installation\n\n```bash\nnpm install @1llet.xyz/sdk-currency\n```\n\n## 🚀 Usage\n\n### Initialize\n\n```typescript\nimport { PriceService } from \"@1llet.xyz/sdk-currency\";\n\nconst service = new PriceService();\n```\n\n### 1. Get Bulk Prices\n\nFetch multiple prices at once.\n\n```typescript\nconst prices = await service.getPrices(\n    [\"bitcoin\", \"ethereum\", \"tether\", \"usd-coin\"], \n    [\"usd\", \"eur\", \"ars\"]\n);\n\nconsole.log(prices.bitcoin.usd); // 95000\nconsole.log(prices.ethereum.ars); // ...\n```\n\n### 2. Get Price & Convert\n\nFetch a single price and calculate the value of an amount.\n\n```typescript\n// Example: Get value of 10 USDT in Argentine Peso (ARS)\nconst result = await service.getPrice(\"tether\", \"ars\", \"10\");\n\nconsole.log(`Rate: 1 USDT = ${result.price} ARS`);\nconsole.log(`Total Value: ${result.value} ARS`);\n\n// 3. Auto-Detect Currency\n// Detects user's currency from IP (e.g. if in UK -> GBP)\nconst autoResult = await service.getPrice(\"bitcoin\", \"auto\");\nconsole.log(`BTC Price in local currency: ${autoResult.price} ${autoResult.currency.toUpperCase()}`);\n\n// 4. Default Currency (USD)\nconst usdResult = await service.getPrice(\"ethereum\"); // Defaults to 'usd'\nconsole.log(`ETH Price in USD: ${usdResult.price}`);\n```\n","readmeFilename":"README.md"}