npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

zerion

v1.0.2

Published

A TypeScript SDK for the Zerion API, providing access to rich web3 wallet data and analytics.

Downloads

1,250

Readme


🚀 Features

  • Wallet Portfolio: Get comprehensive portfolio data including tokens, NFTs, and DeFi positions
  • Wallet Charts: Historical balance charts with multiple time periods (hour, day, week, month, year, max)
  • Profit & Loss (PnL): Detailed PnL analytics including realized/unrealized gains
  • Transactions: Full transaction history with filtering and pagination
  • NFT Support: NFT positions, collections, and portfolio data
  • Fungibles: Search and retrieve fungible asset data with market information
  • Chains: Access to all supported blockchain networks
  • Swap: Get available swap offers and fungibles for bridge exchange
  • Gas Prices: Real-time gas prices across supported networks
  • TypeScript Support: Full type definitions for all API responses

🛠️ Installation

npm install zerion

📖 Usage

Basic Example

import { ZerionAPI, createZerionClient } from 'zerion';

// Create client with API key
const client = new ZerionAPI({ apiKey: 'your-api-key' });

// Or use the factory function
const client = createZerionClient({ apiKey: 'your-api-key' });

Get Wallet Portfolio

const portfolio = await client.getWalletPortfolio('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045');
console.log(portfolio);

Get Wallet Positions

const positions = await client.listWalletPositions('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', {
  positions: 'no_filter',
  currency: 'usd',
});
console.log(positions);

Get Wallet Transactions

const transactions = await client.listWalletTransactions('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', {
  page: { size: 50 },
});
console.log(transactions);

Get NFT Positions

const nftPositions = await client.listWalletNFTPositions('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', {
  currency: 'usd',
});
console.log(nftPositions);

Get Fungibles

const fungibles = await client.listFungibles({
  searchQuery: 'bitcoin',
  currency: 'usd',
});
console.log(fungibles);

Get Chains

const chains = await client.listChains();
console.log(chains);

Get Gas Prices

const gasPrices = await client.listGasPrices();
console.log(gasPrices);

CLI Usage

# Initialize the CLI
npx zerion --api-key your-api-key

# Query a wallet
npx zerion --api-key your-api-key --address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

💻 Development

Setup

# Clone the repository
git clone https://github.com/romankurnovskii/zerion-sdk.git

# Install dependencies
npm install

Scripts

  • npm run build: Build for production
  • npm run test: Run tests with Vitest
  • npm run test:watch: Run tests in watch mode
  • npm run lint: Lint code with ESLint
  • npm run format: Format code with Prettier
  • npm run release: Create a release with Changesets

API Endpoints

The SDK provides access to the following Zerion API endpoints:

Wallets

  • getWalletChart - Get wallet's balance chart
  • getWalletPNL - Get wallet's PnL
  • getWalletPortfolio - Get wallet's portfolio
  • listWalletPositions - Get list of wallet's fungible positions
  • listWalletTransactions - Get list of wallet's transactions
  • listWalletNFTPositions - Get list of wallet's NFT positions
  • listWalletNFTCollections - Get list of NFT collections held by a wallet
  • getWalletNFTPortfolio - Get wallet's NFT portfolio

Fungibles

  • listFungibles - Get list of fungible assets
  • getFungibleById - Get fungible asset by ID
  • getFungibleChart - Get a chart for a fungible asset

Chains

  • listChains - Get list of all chains
  • getChainById - Get chain by ID

Swap

  • getSwapFungibles - Get fungibles available for bridge
  • getSwapOffers - Get available swap offers

Gas

  • listGasPrices - Get list of all available gas prices

NFTs

  • listNFTs - Get list of NFTs
  • getNFTById - Get single NFT by ID

🤝 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

📄 License

MIT © Roman Kurnovskii