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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@pinax/token-api-cli

v0.1.7

Published

Pinax Token API CLI - Power your apps & AI agents with real-time token data

Readme

Token API CLI @pinax/token-api

Power your apps & AI agents with real-time token data.

npm version License

Overview

The @pinax/token-api-cli provides a CLI for The Graph's Token API. Access blockchain token information including:

  • Token Transfers - ERC-20 and native token transfers
  • DEX Swaps - Uniswap and other DEX swap events
  • Token Metadata - Symbol, name, decimals, supply
  • Balances - Real-time token holdings
  • Prices - Current USD prices and OHLCV data
  • Liquidity Pools - DEX pool information

Supported Networks

The SDK provides typed chain constants for type-safe network selection:

  • EVM Chains: Ethereum, ArbitrumOne, Unichain, Base, Optimism, Polygon, BNB Chain & Avalanche.
  • Solana: Mainnet.
  • Tron: Mainnet.

Supported environment variables

| Variable | Description | |----------|-------------| | TOKENAPI_KEY | API Token (Authentication JWT) | | TOKEN_API_BASE_URL | Custom base URL for the Token API |

CLI Usage

The SDK includes a command-line interface for quick access to the Token API.

Installation

After installing the package globally, you can use the CLI directly:

npm install -g @pinax/token-api-cli

or call npmx without global install:

npx @pinax/token-api-cli evm tokens transfers --network mainnet --limit 10

Commands

# EVM token transfers
token-api evm tokens transfers --network mainnet --from 0xd8da6bf26964af9d7eed9e03e53415d37aa96045 --limit 10

# EVM token balances
token-api evm tokens balances --network mainnet --address 0xd8da6bf26964af9d7eed9e03e53415d37aa96045

# EVM DEX swaps
token-api evm dexs swaps --network mainnet --limit 10

# SVM (Solana) token transfers
token-api svm tokens transfers --network solana --limit 10

# TVM (Tron) token transfers
token-api tvm tokens transfers --network tron --limit 10

# Monitoring commands
token-api monitoring health
token-api monitoring version
token-api monitoring networks

Development Usage

When running from the repository using npm run cli, use -- to separate npm arguments from CLI options:

# Correct usage with npm run
npm run cli -- evm tokens transfers --network mainnet --limit 10
npm run cli -- svm tokens transfers --network solana --limit 10
npm run cli -- monitoring health

Help

View all available commands and options:

token-api --help
token-api evm --help
token-api evm tokens --help
token-api evm tokens transfers --help

Development

Building from Source

# Clone the repository
git clone https://github.com/pinax-network/token-api-cli.git
cd token-api-cli

# Install dependencies
bun install

# Build the package
bun run build

Related Resources

License

Apache 2.0 - see LICENSE for details.