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

@pacifica-dev/cli

v0.1.5

Published

CLI and core library for trading on Pacifica — the #1 Solana perps DEX. 36 tools for market data, trading, positions, and account management.

Downloads

698

Readme

@pacifica-dev/cli

CLI and core library for trading on Pacifica — the #1 Solana perps DEX. 36 tools for market data, trading, account management, and real-time monitoring.

Install

npm install -g @pacifica-dev/cli

CLI Usage

Market Data

# All market prices
pacifica prices

# Single market
pacifica prices --symbol BTC

# Orderbook depth
pacifica orderbook --symbol ETH

# Candles
pacifica candles --symbol SOL --interval 1h --limit 20

# Funding rates
pacifica funding-rates --symbol BTC --limit 5

Account Monitoring

# Account overview
pacifica account --account Hwv9DcDacBD3NPGPvkppSQ8bzGQv1AdxfVMF538fh63e

# Open positions
pacifica positions

# Trade history
pacifica trade-history --limit 10

# Portfolio equity curve
pacifica portfolio --time-range 7d

# Open orders
pacifica orders

Trading

# Market order — bid = long, ask = short
pacifica market-order --symbol ETH --side bid --amount 0.1

# Limit order
pacifica limit-order --symbol BTC --side ask --amount 0.001 --price 80000

# Set stop loss
pacifica set-tpsl --symbol ETH --side bid --sl 2100

# Cancel an order
pacifica cancel --symbol ETH --order-id 306672002

# Cancel all orders
pacifica cancel --all-symbols

# Set leverage
pacifica set-leverage --symbol SOL --leverage 10

Subaccounts

# Create a subaccount (key saved locally)
pacifica create-subaccount

# List subaccounts
pacifica list-subaccounts

# Transfer funds
pacifica transfer-funds --to <address> --amount 100

Real-Time WebSocket

# Watch prices for 10 seconds
pacifica watch --channel prices --duration 10

# Watch specific market trades
pacifica watch --channel trades --symbol BTC --duration 5

# Start persistent monitoring
pacifica watch-start --channel account_positions
pacifica watch-read --subscription-id account_positions_1
pacifica watch-stop --subscription-id account_positions_1

Wallet & System

# Show wallet address, balance, subaccounts
pacifica wallet

# List all commands
pacifica tools

# Full help
pacifica --help

Library Usage

This package also exports createMcpServer() for building custom MCP server wrappers:

import { createMcpServer } from "@pacifica-dev/cli";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = createMcpServer();
const transport = new StdioServerTransport();
await server.connect(transport);

All 36 Tools

Market Data (7)

| Command | Description | |---------|-------------| | markets | List all perpetual markets with specs | | prices | Real-time mark/oracle prices, funding, OI, volume | | orderbook | Order book bids & asks | | candles | OHLCV candlestick data | | mark-candles | Mark price OHLCV candles | | recent-trades | Recent trades for a market | | funding-rates | Historical funding rate data |

Account Monitoring (9)

| Command | Description | |---------|-------------| | account | Balance, equity, margin, positions count | | account-settings | Leverage & margin mode per market | | positions | Open positions with entry price | | trade-history | Historical trades with P&L and fees | | portfolio | Equity history over time | | balance-history | Deposits, withdrawals, funding events | | orders | All open orders | | order-history | Historical orders | | order-by-id | Full event history for a specific order |

Trading (11)

| Command | Description | |---------|-------------| | market-order | Place a market order (bid=long, ask=short) | | limit-order | Place a limit order with TIF options | | stop-order | Place a stop order | | edit-order | Edit an existing order's price/amount | | batch-order | Submit up to 10 create/cancel actions | | set-tpsl | Set take-profit / stop-loss | | cancel | Cancel order(s) | | cancel-stop | Cancel a stop order | | set-leverage | Set leverage for a market | | set-margin-mode | Switch cross / isolated margin | | withdraw | Withdraw USDC from Pacifica |

Subaccounts (3)

| Command | Description | |---------|-------------| | create-subaccount | Create subaccount (key saved locally) | | list-subaccounts | List all subaccounts | | transfer-funds | Transfer USDC between accounts |

Real-Time (4)

| Command | Description | |---------|-------------| | watch | Snapshot: collect data for N seconds | | watch-start | Start persistent background subscription | | watch-read | Read buffered events | | watch-stop | Stop a subscription |

System (2)

| Command | Description | |---------|-------------| | wallet | Wallet address, balance, subaccounts | | tools | List all available commands |

Configuration

On first run, a Solana wallet is auto-generated at ~/.pacifica-mcp/config.json (mode 0600). Subaccount keys are saved to ~/.pacifica-mcp/subaccounts/. Private keys never leave your machine.

| Variable | Default | Description | |----------|---------|-------------| | PACIFICA_NETWORK | testnet | testnet or mainnet | | PACIFICA_PRIVATE_KEY | — | Override wallet (base58) | | LOG_LEVEL | info | Logging level |

Links

License

MIT