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

tiger-openapi-cli

v0.2.6

Published

CLI for the Tiger OpenAPI SDK.

Readme

tiger-openapi-cli

GitHub license CI npm version

tiger-openapi-cli is a command-line tool built on top of the tiger-openapi SDK. It helps you quickly validate configuration and query account and market data (stocks, options, funds, crypto, futures, warrants, and more).

Installation

# npm
npm i -g tiger-openapi-cli

# pnpm
pnpm add -g tiger-openapi-cli

# yarn
yarn global add tiger-openapi-cli

After installation, run:

tiger-openapi --help

Credentials Setup

The CLI requires the following credentials:

  • TIGER_ID (or TIGER_OPENAPI_TIGER_ID)
  • TIGER_ACCOUNT (or TIGER_OPENAPI_ACCOUNT)
  • TIGER_PRIVATE_KEY (or TIGER_OPENAPI_PRIVATE_KEY)

Optional:

  • TIGER_ENV (or TIGER_OPENAPI_ENV), available values: prod | us | sandbox, default is prod

Option 1: Use a .env file (recommended)

Create a .env file in your project root:

TIGER_ID=your_tiger_id
TIGER_ACCOUNT=your_account
TIGER_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
TIGER_ENV=prod

Option 2: Use the CLI config file

Write config with the command below (saved to ~/.tiger-openapi-cli.json):

tiger-openapi config \
  --tiger_id your_tiger_id \
  --account your_account \
  --private_key "your_private_key" \
  --env prod

Show current config:

tiger-openapi config

Configuration Priority

Command-line arguments > CLI config file > environment variables (including .env).

For example, --account xxx overrides account from both the config file and .env.

Check Configuration First

tiger-openapi check

This command prints whether the current configuration is valid, along with environment info and SDK version.

Common Commands

Account

tiger-openapi account

Stock

tiger-openapi stock --symbol AAPL

Options

# Query available expirations
tiger-openapi options --symbol AAPL

# Query option chain for a specific expiration
tiger-openapi options --symbol AAPL --expiry 2026-03-20

# Query option chain with market/right/strike and greek values
tiger-openapi options \
  --symbol AAPL \
  --expiry 2026-03-20 \
  --market US \
  --right CALL \
  --strike 250 \
  --return_greek_value true

Fund

tiger-openapi fund --symbol 000001

Crypto

tiger-openapi crypto --symbol BTCUSD

Futures

tiger-openapi futures --symbol ESmain

Warrants

tiger-openapi warrants --symbol 12345

Market Scanner

tiger-openapi scanner --market US --page 1 --page_size 20

Optional arguments:

  • --sec_type: for example STK, OPT, FUT
  • --page: page number, default 1
  • --page_size: page size, default 20

Order Commands

The order command group maps to the SDK order APIs for order placement, query, modification, cancellation, preview, transactions, and contract lookup.

Place / Preview / Modify / Cancel

# Place order
tiger-openapi order place \
  --action BUY \
  --order_type LMT \
  --symbol AAPL \
  --sec_type STK \
  --total_quantity 1 \
  --limit_price 180

# Preview order
tiger-openapi order preview \
  --action BUY \
  --order_type LMT \
  --symbol AAPL \
  --sec_type STK \
  --total_quantity 1 \
  --limit_price 180

# Modify order
tiger-openapi order modify \
  --id 123456 \
  --order_type LMT \
  --limit_price 181

# Cancel order
tiger-openapi order cancel --id 123456

Query Orders

# Query one order by id/order_id
tiger-openapi order query --id 123456

# Query orders list
tiger-openapi order query \
  --market US \
  --symbol AAPL \
  --states FILLED,CANCELLED \
  --limit 20

# Query open / cancelled / filled orders
tiger-openapi order open --market US --symbol AAPL
tiger-openapi order cancelled --market US --symbol AAPL
tiger-openapi order filled --market US --symbol AAPL

Transactions and Contracts

# Order transactions
tiger-openapi order transactions --order_id 100001 --limit 20

# Contract lookup (single or comma-separated symbols)
tiger-openapi order contract --symbol AAPL --sec_type STK
tiger-openapi order contract --symbol AAPL,TSLA --sec_type STK

# Contracts lookup
tiger-openapi order contracts --symbols AAPL,TSLA --sec_type STK

# Derivative contracts lookup
tiger-openapi order derivative-contracts \
  --symbol AAPL \
  --sec_type OPT \
  --expiry 2026-03-20

Common Override Flags

Most query commands support the following override flags (for temporary overrides):

  • --path <path>: specify a .env file path
  • --tiger_id <tiger_id>
  • --private_key <private_key>
  • --account <account>

Example:

tiger-openapi stock --symbol TSLA --path ./.env.prod

Development

Run these commands from the monorepo root:

pnpm --filter tiger-openapi-cli build
pnpm --filter tiger-openapi-cli dev
pnpm --filter tiger-openapi-cli typecheck

License

GPL-3.0-only