Skip to content
Skillpedia
APIs & servers (backend)45k Β· #6379

ccxt-cli

What it does

This skill shows how to use the ccxt command line tool to call exchange functions from a terminal, without writing code. It is for people who want quick access to exchange data or actions.

When to use it

  • βœ“When you want to check a crypto price or order book from the terminal.
  • βœ“When you want to view your exchange balance or open orders.
  • βœ“When you want to stream live tickers or order books in a terminal.

Skill link

https://github.com/ccxt/ccxt/blob/master/.claude/skills/ccxt-cli/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/ccxt/ccxt/blob/master/.claude/skills/ccxt-cli/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œShow me the current Bitcoin ticker on Kraken from my terminal.”

5 new skills a week. 1 minute to read.

How it works

You type a command with the exchange name and the method, such as a ticker lookup. The tool calls the exchange and prints the result.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

CCXT CLI

The CCXT CLI (ccxt-cli on npm) exposes the entire unified CCXT API as a terminal command. Anything you can call in code β€” fetchTicker, fetchOHLCV, createOrder, fetchBalance, withdraw, exchange-specific implicit methods β€” you can call as:

ccxt <exchangeId> <methodName> [args...] [options]

It supports 100+ exchanges, REST and WebSocket, public and private endpoints, live terminal dashboards, and interactive OHLCV charts.

Installation

npm install -g ccxt-cli     # installs the `ccxt` command
ccxt --help

One-off use without installing (note -p ccxt-cli β€” the package name differs from the binary name):

npx -y -p ccxt-cli ccxt kraken fetchTicker BTC/USD

From a clone of the CCXT repository (contributor mode β€” uses the local source tree instead of the published package):

npm run cli.ts -- kraken fetchTicker BTC/USD    # runs cli/ts/cli.ts against local ts/

Quick start

# Public data β€” no API keys needed
ccxt kraken fetchTicker BTC/USD
ccxt kraken fetchOrderBook ETH/BTC
ccxt bybit fetchOHLCV BTC/USDT 15m
ccxt okx fetchTrades BTC/USDT

# Private data β€” needs API keys (see Authentication)
ccxt kraken fetchBalance
ccxt binance fetchOpenOrders BTC/USDT

# Place an order (start with --sandbox and small amounts!)
ccxt binance createOrder BTC/USDT limit buy 0.001 60000 --sandbox

Every run prints the CCXT version, the resolved call (e.g. kraken.fetchTicker ("BTC/USD")), the result, and timing. Use --raw to suppress everything except the JSON result.

Discovering methods and arguments

ccxt --help                 # all options, commands, and the config path for your OS
ccxt methods kraken         # every method the exchange supports (its `has` capabilities)
ccxt explain createOrder    # required/optional arguments for any unified method
ccxt history                # your previously executed commands

ccxt explain <method> output shows the argument order you must follow:

Method: createOrder
Usage:
  binance createOrder <symbol> <type> <side> <amount> [price] [params]
Arguments:
  - symbol       (required) β€” Market symbol e.g., BTC/USDT
  - type         (required) β€” e.g., limit or market
  - side         (required) β€” order side e.g., buy or sell
  - amount       (required)
  - price        (optional) β€” Price per unit of asset e.g., 26000.50
  - params       (optional) β€” Extra parameters for the exchange

Argument rules (important)

Arguments are positional and must follow the method's signature order. The CLI auto-converts each argument:

You type The method receives
BTC/USDT string 'BTC/USDT'
0.001, 100 number
undefined undefined (placeholder to skip an optional arg β€” the call echo displays it as null, which is expected)
true / false / null boolean / null
"2025-05-01T01:23:45Z" milliseconds timestamp (ISO8601 datetimes auto-convert; date-only strings like 2025-05-01 do NOT β€” include the time part)
'{"recvWindow":5000}' object (JSON must be shell-quoted)
'["BTC/USDT","ETH/USDT"]' array (shell-quoted)

Rule 1 β€” pad skipped optionals with undefined. To pass limit without since:

ccxt binance fetchOHLCV BTC/USDT 1h undefined 10    # since=undefined, limit=10

Rule 2 β€” --param key=value appends to the trailing params object. Repeat it for multiple keys. Values are coerced the same way (true, false, null, numbers, strings):

ccxt binance createOrder BTC/USDT market buy 0.01 undefined --param test=true --param clientOrderId=myOrder

Rule 3 β€” when using --param, explicitly fill ALL earlier optional positionals with undefined. If you leave gaps, the CLI mis-assigns arguments (a known quirk β€” the params object can end up in the wrong position). Correct:

ccxt bybit fetchOHLCV BTC/USDT 15m undefined undefined --param until=1722161166530   # βœ…
ccxt bybit fetchOHLCV BTC/USDT --param until=1722161166530                           # ❌ args get scrambled

Authentication

Private methods (fetchBalance, createOrder, fetchMyTrades, ...) need credentials. Three sources:

1. Environment variables

Pattern: <EXCHANGEID>_<CREDENTIAL> upper-cased. The credential names come from each exchange's requiredCredentials (apiKey, secret, password, uid, walletAddress, privateKey, ...):

export BINANCE_APIKEY=your_api_key
export BINANCE_SECRET=your_s
FAQ

How do I install it?

The skill says to install the ccxt-cli package from npm globally, which provides the ccxt command.

Do I need API keys?

Public data needs no keys, but private data such as balances needs API keys.

Is there a safe way to test orders?

The skill recommends the sandbox option and small amounts when placing orders.

Details

Original description by the author

CCXT command-line interface (ccxt-cli) for interacting with 100+ cryptocurrency exchanges directly from the terminal β€” no code required. Covers installing the CLI, calling any unified CCXT method (fetchTicker, fetchOHLCV, createOrder, fetchBalance), passing arguments and exchange-specific params, authenticating with API keys, sandbox/testnet mode, streaming live tickers and orderbooks over WebSocket, plotting OHLCV charts, and scripting with raw JSON output. Use when the user wants to query an exchange, test API credentials, place or inspect orders, or debug exchange requests from the command

repo: ccxt/ccxt

Popularity

GitHub stars
45k
Ranking position
#6379
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills