# @2oolkit/pacifica-cli [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/haeminmoon/pacifica-cli  
**GitHub Stars:** 0  
**npm Downloads (last month):** 386  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/2oolkit-pacifica-cli

## Description
CLI toolkit & MCP server for trading perpetual futures on Pacifica exchange — crypto, forex, commodities, equities on Solana

## Tools
Capabilities this server exposes over MCP:

- **get_market_info** — Get market info for all available instruments
- **get_prices** — Get price information for all symbols
- **get_orderbook** — Get orderbook for a trading symbol
- **get_recent_trades** — Get recent trades for a symbol
- **get_candles** — Get candlestick (OHLCV) data for a symbol. A single API request returns up to 4000 candles; pass "count" above that to auto-paginate across requests.
- **get_historical_funding** — Get historical funding rates for a symbol
- **get_account_info** — Get account information
- **get_account_settings** — Get account margin/leverage settings
- **get_positions** — Get all open positions
- **get_open_orders** — Get all open orders
- **get_order_history** — Get order history
- **get_trade_history** — Get trade history
- **get_funding_history** — Get funding payment history
- **create_market_order** — Create a market order
- **create_limit_order** — Create a limit order
- **cancel_order** — Cancel a specific order
- **cancel_all_orders** — Cancel all orders
- **update_leverage** — Update leverage for a symbol
- **update_margin_mode** — Update margin mode for a symbol
- **approve_builder_code** — Approve the builder code for fee sharing

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "pacifica-cli": {
    "command": "npx",
    "args": ["-y","-p","@2oolkit/pacifica-cli","pacifica-mcp"],
    "env": {
      "PACIFICA_WALLET_PRIVATE_KEY": "",
      "PACIFICA_WALLET_ADDRESS": ""
    }
  }
}
```

**Requires environment variables:** `PACIFICA_WALLET_PRIVATE_KEY`, `PACIFICA_WALLET_ADDRESS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What @2oolkit/pacifica-cli does

@2oolkit/pacifica-cli provides three interfaces for Pacifica: a terminal CLI, an MCP server, and an OpenClaw skill definition. Pacifica is a decentralized derivatives exchange on Solana offering perpetual instruments such as BTC, ETH, SOL, EURUSD, XAU, XAG, NVDA, and GOOGL.

The CLI supports unauthenticated market-data queries, authenticated order management, position inspection, account operations, and configuration. The MCP interface makes these capabilities available to AI agents through 19 tools. The package also includes an OpenClaw skill file for OpenClaw, ClawdBot, and other agent skill platforms.

## How it works

Install the package globally with npm. This provides both `pacifica-cli` and `pacifica-mcp`. Node.js 20 or newer is required, along with a Solana wallet using an Ed25519 private key encoded in base58 for authenticated operations.

Market commands retrieve instrument information, prices, order books, recent trades, candles, and funding history. Candle requests support standard intervals from one minute through one day. Requests for more than 4,000 bars are split into paginated time windows, then deduplicated and sorted by time.

Order commands create market or limit orders, set time-in-force and slippage options, apply reduce-only behavior, attach take-profit or stop-loss prices, and cancel existing orders. Position and account commands retrieve positions, balances, equity, settings, trade history, and funding payments, while account commands can change leverage and margin mode.

## Setup and configuration

Install the package with:

```bash
npm install -g @2oolkit/pacifica-cli
```

Initialize credentials interactively with `pacifica-cli config init`, or set the private key directly with `pacifica-cli config set privateKey`. The account address is derived during interactive setup. Configuration is stored at `~/.pacifica-cli/config.json` with file permissions set to `0600`.

For CI/CD, Docker, or MCP configuration, provide `PACIFICA_WALLET_PRIVATE_KEY`. `PACIFICA_WALLET_ADDRESS` can also be supplied when using environment-based CLI configuration. An MCP client can pass credentials in its `env` block, or the MCP process can read the CLI configuration file.

Claude Code can register the server with `claude mcp add pacifica -- pacifica-mcp`. Claude Desktop, Cursor, and Windsurf can launch the command directly from an MCP configuration, or use `npx -y -p @2oolkit/pacifica-cli pacifica-mcp` without a global installation.

## Tools and capabilities

The MCP server groups its tools as follows:

- Market data: market information, prices, order books, recent trades, candles, and historical funding.
- Orders: market and limit order creation, order cancellation, open-order queries, and order history.
- Positions: open-position queries.
- Account: account information, settings, trade history, and funding history.
- Settings: leverage and margin-mode updates.

CLI commands support `-o json`, allowing results to be piped into scripts or tools such as `jq`. Examples include retrieving prices as JSON and extracting order IDs from open orders.

## Limitations and notes

Pacifica's candle endpoint accepts at most 4,000 bars per request. The CLI can retrieve larger recent-bar counts by making multiple requests, but an explicit start/end range wider than that limit is rejected; use the count option for pagination.

Market-data tools work without wallet authentication, while orders, positions, account queries, and account settings require credentials. Wallet private keys should be passed through the MCP environment or protected CLI configuration rather than exposed in ordinary command output. The package is intended for perpetual-futures workflows on Pacifica and does not describe support for other exchanges.

_Full upstream README: https://allmcps.com/mcp/2oolkit-pacifica-cli/readme_

