{"_id":"zerion","_rev":"3-c8cefd16ecbdf9d81525f532a5f297b3","name":"zerion","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"zerion","version":"1.0.0","keywords":["npm-module"],"author":{"url":"https://romankurnovskii.com","name":"Roman Kurnovskii","email":"r.kurnovskii@gmail.com"},"license":"MIT","_id":"zerion@1.0.0","maintainers":[{"name":"romankurnovskii","email":"r.kurnovskii@gmail.com"}],"homepage":"https://github.com/romankurnovskii/PACKAGE_NAME#readme","bugs":{"url":"https://github.com/romankurnovskii/PACKAGE_NAME/issues"},"bin":{"zerion":"dist/bin.js"},"dist":{"shasum":"eeab305abe18429f3f57edade55600cf1a031c98","tarball":"https://registry.npmjs.org/zerion/-/zerion-1.0.0.tgz","fileCount":3,"integrity":"sha512-yk+/KNRY75fOi99T07vm9xh4Dmk7LzsCO1OTNIFuOL8Apm6iWtBhAvgvqnJWPtR6vumSPpnNl054VGJxUYoPMQ==","signatures":[{"sig":"MEYCIQC1sxBZHdxfruS++I5tem8cpMAUy1F+IUfp8jBkHo7qJQIhAN6KKnbXMZtZBxZh1B5NqnhhJn7424PlxTRRRhYw/o9V","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5544},"type":"module","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"9c24aa998cc9eb16308d67939ca581bc88541228","scripts":{"lint":"eslint \"{src,tests,example/src}/**/*.{ts,tsx}\"","test":"vitest run","build":"tsc","start":"tsx src/bin.ts","format":"prettier --write \"{src,tests,example/src}/**/*.{js,ts,jsx,tsx}\"","prepare":"husky","release":"changeset publish","lint:fix":"eslint --fix \"{src,tests,example/src}/**/*.{ts,tsx}\"","test:watch":"vitest","type-check":"tsc --noEmit","format:check":"prettier --check \"{src,tests,example/src}/**/*.{js,ts,jsx,tsx}\"","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"romankurnovskii","email":"r.kurnovskii@gmail.com"},"repository":{"url":"git+https://github.com/romankurnovskii/PACKAGE_NAME.git","type":"git"},"_npmVersion":"11.10.1","description":"DESCRIPTION","directories":{},"lint-staged":{"*.{ts,tsx,js,jsx}":["eslint --fix","prettier --write"]},"sideEffects":false,"_nodeVersion":"25.7.0","dependencies":{"commander":"^14.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","husky":"^9.1.7","eslint":"^10.0.2","vitest":"^4.0.18","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.2.3","lint-staged":"^16.3.1","@changesets/cli":"^2.29.8","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","@typescript-eslint/parser":"^8.55.0","@changesets/changelog-github":"^0.5.2","@typescript-eslint/eslint-plugin":"^8.56.1"},"_npmOperationalInternal":{"tmp":"tmp/zerion_1.0.0_1772532227897_0.6312441309668604","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"zerion","version":"1.0.1","keywords":["zerion","web3","defi","crypto","blockchain","sdk","typescript","api"],"author":{"url":"https://romankurnovskii.com","name":"Roman Kurnovskii","email":"r.kurnovskii@gmail.com"},"license":"MIT","_id":"zerion@1.0.1","maintainers":[{"name":"romankurnovskii","email":"r.kurnovskii@gmail.com"}],"homepage":"https://github.com/romankurnovskii/zerion-sdk#readme","bugs":{"url":"https://github.com/romankurnovskii/zerion-sdk/issues"},"bin":{"zerion":"dist/bin.js"},"dist":{"shasum":"8f7e24ef57c0eeac177105329b02642df88c0b80","tarball":"https://registry.npmjs.org/zerion/-/zerion-1.0.1.tgz","fileCount":11,"integrity":"sha512-XrPEPxyITYGYvLwz3p7YJV7yuzCsAxjT2W9a7tTL6oaXrOdbhRB55+JBpLCzt9KJu0mc/3Ab/hRPzOB+RZLmxw==","signatures":[{"sig":"MEUCIQCZK15GKf8Pva+TRxz6w3pJMxKRiCVxUwh7mFy98yXrcAIgS05UyqbQa3uSTMKkZgRnyYNl1BWNDsmLFFgueFF8uM8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70870},"type":"module","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"c9766ea1dc8ac40e1afff35e94891541f34809a8","scripts":{"lint":"eslint \"{src,tests,example/src}/**/*.{ts,tsx}\"","test":"vitest run","build":"tsc","start":"tsx src/bin.ts","format":"prettier --write \"{src,tests,example/src}/**/*.{js,ts,jsx,tsx}\"","prepare":"husky","release":"changeset publish","lint:fix":"eslint --fix \"{src,tests,example/src}/**/*.{ts,tsx}\"","test:watch":"vitest","type-check":"tsc --noEmit","format:check":"prettier --check \"{src,tests,example/src}/**/*.{js,ts,jsx,tsx}\"","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"romankurnovskii","email":"r.kurnovskii@gmail.com"},"repository":{"url":"git+https://github.com/romankurnovskii/zerion-sdk.git","type":"git"},"_npmVersion":"11.10.1","description":"A TypeScript SDK for the Zerion API, providing access to rich web3 wallet data and analytics.","directories":{},"lint-staged":{"*.{ts,tsx,js,jsx}":["eslint --fix","prettier --write"]},"sideEffects":false,"_nodeVersion":"25.7.0","dependencies":{"commander":"^14.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","husky":"^9.1.7","eslint":"^10.0.2","vitest":"^4.0.18","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.3.3","lint-staged":"^16.3.1","@changesets/cli":"^2.29.8","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","@typescript-eslint/parser":"^8.56.1","@changesets/changelog-github":"^0.6.0","@typescript-eslint/eslint-plugin":"^8.56.1"},"_npmOperationalInternal":{"tmp":"tmp/zerion_1.0.1_1772552428499_0.3159625162741526","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"zerion","version":"1.0.2","description":"A TypeScript SDK for the Zerion API, providing access to rich web3 wallet data and analytics.","license":"MIT","type":"module","sideEffects":false,"bin":{"zerion":"dist/bin.js"},"scripts":{"start":"tsx src/bin.ts","build":"tsc","type-check":"tsc --noEmit","lint":"eslint \"{src,tests,example/src}/**/*.{ts,tsx}\"","lint:fix":"eslint --fix \"{src,tests,example/src}/**/*.{ts,tsx}\"","format":"prettier --write \"{src,tests,example/src}/**/*.{js,ts,jsx,tsx}\"","format:check":"prettier --check \"{src,tests,example/src}/**/*.{js,ts,jsx,tsx}\"","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","prepare":"husky","release":"changeset publish"},"dependencies":{"commander":"^14.0.3"},"devDependencies":{"@changesets/changelog-github":"^0.6.0","@changesets/cli":"^2.30.0","@types/node":"^25.3.3","@typescript-eslint/eslint-plugin":"^8.56.1","@typescript-eslint/parser":"^8.56.1","eslint":"^10.0.2","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","husky":"^9.1.7","lint-staged":"^16.3.1","prettier":"^3.8.1","tsx":"^4.21.0","typescript":"^5.9.3","vitest":"^4.0.18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"lint-staged":{"*.{ts,tsx,js,jsx}":["eslint --fix","prettier --write"]},"engines":{"node":">=22.0.0"},"homepage":"https://github.com/romankurnovskii/zerion-sdk#readme","repository":{"type":"git","url":"git+https://github.com/romankurnovskii/zerion-sdk.git"},"bugs":{"url":"https://github.com/romankurnovskii/zerion-sdk/issues"},"keywords":["zerion","web3","defi","crypto","blockchain","sdk","typescript","api"],"author":{"name":"Roman Kurnovskii","email":"r.kurnovskii@gmail.com","url":"https://romankurnovskii.com"},"gitHead":"1446a44aff58d9dcbd089b0ae4178cc571bee5a3","_id":"zerion@1.0.2","_nodeVersion":"25.7.0","_npmVersion":"11.10.1","dist":{"integrity":"sha512-yqrsqX6pkWwZGTwi8iBDpU44oQIKX4vrz9F1e09rel7hPg+UJjp/FZhjHysUJz0HCh3hEkx1ZT3ZwoXsjOljWw==","shasum":"7a114dc270d12f13542713563a297dbd21bbff08","tarball":"https://registry.npmjs.org/zerion/-/zerion-1.0.2.tgz","fileCount":11,"unpackedSize":73369,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCDn4Z8gSIiPD3vHoNn9kPJpQ3fbJN4GIgjuaqKT5A44AIhAIiDwbpP2WWM2bQXQwpMpgDbLZ0162ZQ1w+hNar/8DE4"}]},"_npmUser":{"name":"romankurnovskii","email":"r.kurnovskii@gmail.com"},"directories":{},"maintainers":[{"name":"romankurnovskii","email":"r.kurnovskii@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/zerion_1.0.2_1772562593091_0.2899612643489564"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-03T10:03:47.896Z","modified":"2026-03-03T18:29:53.427Z","1.0.0":"2026-03-03T10:03:48.055Z","1.0.1":"2026-03-03T15:40:28.660Z","1.0.2":"2026-03-03T18:29:53.289Z"},"bugs":{"url":"https://github.com/romankurnovskii/zerion-sdk/issues"},"author":{"name":"Roman Kurnovskii","email":"r.kurnovskii@gmail.com","url":"https://romankurnovskii.com"},"license":"MIT","homepage":"https://github.com/romankurnovskii/zerion-sdk#readme","keywords":["zerion","web3","defi","crypto","blockchain","sdk","typescript","api"],"repository":{"type":"git","url":"git+https://github.com/romankurnovskii/zerion-sdk.git"},"description":"A TypeScript SDK for the Zerion API, providing access to rich web3 wallet data and analytics.","maintainers":[{"name":"romankurnovskii","email":"r.kurnovskii@gmail.com"}],"readme":"<div align=\"center\">\n  <a href=\"https://github.com/romankurnovskii/zerion-sdk\">\n    <img src=\"./assets/icon.png\" alt=\"Logo\" width=\"250\" style=\"border-radius: 10px; object-fit: cover;\">\n  </a>\n\n  <h1 align=\"center\">Zerion SDK</h1>\n\n  <p align=\"center\">\n    <strong>A comprehensive TypeScript SDK for the <a href=\"https://zerion.io/api\">Zerion API</a>, providing access to rich web3 wallet data and analytics.</strong>\n  </p>\n\n  <p align=\"center\">\n    <a href=\"https://www.npmjs.com/package/zerion\">\n      <img src=\"https://img.shields.io/npm/v/zerion?style=flat-square&color=blue\" alt=\"NPM Version\">\n    </a>\n    <a href=\"https://github.com/romankurnovskii/zerion-sdk/blob/main/LICENSE\">\n      <img src=\"https://img.shields.io/github/license/romankurnovskii/zerion-sdk?style=flat-square&color=green\" alt=\"License\">\n    </a>\n    <a href=\"https://www.typescriptlang.org/\">\n      <img src=\"https://img.shields.io/badge/TypeScript-5.x-blue?style=flat-square&logo=typescript\" alt=\"TypeScript\">\n    </a>\n  </p>\n</div>\n\n---\n\n## 🚀 Features\n\n- **Wallet Portfolio**: Get comprehensive portfolio data including tokens, NFTs, and DeFi positions\n- **Wallet Charts**: Historical balance charts with multiple time periods (hour, day, week, month, year, max)\n- **Profit & Loss (PnL)**: Detailed PnL analytics including realized/unrealized gains\n- **Transactions**: Full transaction history with filtering and pagination\n- **NFT Support**: NFT positions, collections, and portfolio data\n- **Fungibles**: Search and retrieve fungible asset data with market information\n- **Chains**: Access to all supported blockchain networks\n- **Swap**: Get available swap offers and fungibles for bridge exchange\n- **Gas Prices**: Real-time gas prices across supported networks\n- **TypeScript Support**: Full type definitions for all API responses\n\n## 🛠️ Installation\n\n```bash\nnpm install zerion\n```\n\n## 📖 Usage\n\n### Basic Example\n\n```typescript\nimport { ZerionAPI, createZerionClient } from 'zerion';\n\n// Create client with API key\nconst client = new ZerionAPI({ apiKey: 'your-api-key' });\n\n// Or use the factory function\nconst client = createZerionClient({ apiKey: 'your-api-key' });\n```\n\n### Get Wallet Portfolio\n\n```typescript\nconst portfolio = await client.getWalletPortfolio('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045');\nconsole.log(portfolio);\n```\n\n### Get Wallet Positions\n\n```typescript\nconst positions = await client.listWalletPositions('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', {\n  positions: 'no_filter',\n  currency: 'usd',\n});\nconsole.log(positions);\n```\n\n### Get Wallet Transactions\n\n```typescript\nconst transactions = await client.listWalletTransactions('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', {\n  page: { size: 50 },\n});\nconsole.log(transactions);\n```\n\n### Get NFT Positions\n\n```typescript\nconst nftPositions = await client.listWalletNFTPositions('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', {\n  currency: 'usd',\n});\nconsole.log(nftPositions);\n```\n\n### Get Fungibles\n\n```typescript\nconst fungibles = await client.listFungibles({\n  searchQuery: 'bitcoin',\n  currency: 'usd',\n});\nconsole.log(fungibles);\n```\n\n### Get Chains\n\n```typescript\nconst chains = await client.listChains();\nconsole.log(chains);\n```\n\n### Get Gas Prices\n\n```typescript\nconst gasPrices = await client.listGasPrices();\nconsole.log(gasPrices);\n```\n\n### CLI Usage\n\n```bash\n# Initialize the CLI\nnpx zerion --api-key your-api-key\n\n# Query a wallet\nnpx zerion --api-key your-api-key --address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\n```\n\n## 💻 Development\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/romankurnovskii/zerion-sdk.git\n\n# Install dependencies\nnpm install\n```\n\n### Scripts\n\n- `npm run build`: Build for production\n- `npm run test`: Run tests with Vitest\n- `npm run test:watch`: Run tests in watch mode\n- `npm run lint`: Lint code with ESLint\n- `npm run format`: Format code with Prettier\n- `npm run release`: Create a release with Changesets\n\n## API Endpoints\n\nThe SDK provides access to the following Zerion API endpoints:\n\n### Wallets\n- `getWalletChart` - Get wallet's balance chart\n- `getWalletPNL` - Get wallet's PnL\n- `getWalletPortfolio` - Get wallet's portfolio\n- `listWalletPositions` - Get list of wallet's fungible positions\n- `listWalletTransactions` - Get list of wallet's transactions\n- `listWalletNFTPositions` - Get list of wallet's NFT positions\n- `listWalletNFTCollections` - Get list of NFT collections held by a wallet\n- `getWalletNFTPortfolio` - Get wallet's NFT portfolio\n\n### Fungibles\n- `listFungibles` - Get list of fungible assets\n- `getFungibleById` - Get fungible asset by ID\n- `getFungibleChart` - Get a chart for a fungible asset\n\n### Chains\n- `listChains` - Get list of all chains\n- `getChainById` - Get chain by ID\n\n### Swap\n- `getSwapFungibles` - Get fungibles available for bridge\n- `getSwapOffers` - Get available swap offers\n\n### Gas\n- `listGasPrices` - Get list of all available gas prices\n\n### NFTs\n- `listNFTs` - Get list of NFTs\n- `getNFTById` - Get single NFT by ID\n\n## 🤝 Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## 📄 License\n\nMIT © [Roman Kurnovskii](https://romankurnovskii.com)\n","readmeFilename":"README.md"}