Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

zerion

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zerion

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

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source
Logo

Zerion SDK

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

NPM Version License TypeScript

🚀 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

Keywords

zerion

FAQs

Package last updated on 03 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts