ccxt-cli
यह क्या करती है
यह स्किल दिखाती है कि ccxt कमांड लाइन टूल से टर्मिनल में बिना कोड लिखे एक्सचेंज फ़ंक्शन कैसे कॉल करें। यह उन लोगों के लिए है जिन्हें एक्सचेंज डेटा या कार्रवाइयों तक त्वरित पहुँच चाहिए।
कब इस्तेमाल करें
- ✓जब आप टर्मिनल से क्रिप्टो कीमत या ऑर्डर बुक देखना चाहें।
- ✓जब आप अपना एक्सचेंज बैलेंस या खुले ऑर्डर देखना चाहें।
- ✓जब आप टर्मिनल में लाइव टिकर या ऑर्डर बुक देखना चाहें।
Skill का लिंक
https://github.com/ccxt/ccxt/blob/master/.claude/skills/ccxt-cli/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे टर्मिनल से Kraken पर बिटकॉइन का मौजूदा टिकर दिखाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
आप एक्सचेंज के नाम और मेथड के साथ कमांड टाइप करते हैं, जैसे टिकर लुकअप। टूल एक्सचेंज को कॉल करता है और नतीजा प्रिंट करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
इसे कैसे इंस्टॉल करूँ?
स्किल कहती है कि npm से ccxt-cli पैकेज ग्लोबल रूप से इंस्टॉल करें, जिससे ccxt कमांड मिलता है।
क्या API key चाहिए?
सार्वजनिक डेटा के लिए key की ज़रूरत नहीं, पर बैलेंस जैसे निजी डेटा के लिए API key चाहिए।
ऑर्डर टेस्ट करने का सुरक्षित तरीका क्या है?
स्किल sandbox विकल्प और ऑर्डर देते समय छोटी मात्रा का सुझाव देती है।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 45k
- रैंकिंग में स्थान
- #6379
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
binance-agentic-wallet
45kआपके एजेंट को baw कमांड लाइन से Binance Web3 वॉलेट मैनेज करने देती है, जिसमें साइन-इन, बैलेंस, ट्रांसफ़र, टोकन स्वैप और लिमिट ऑर्डर शामिल हैं।
binance-sports-ai-analyzer
45kआपके एजेंट को World Cup मैच की AI भविष्यवाणी, विश्लेषण और समाचार की जानकारी देखने में मदद करती है, और संकेत बदलने पर जीत की संभावना दोबारा गिनती है।
binance-tokenized-securities-info
45kआपके एजेंट को Binance Web3 पर Ondo टोकनाइज़्ड अमेरिकी स्टॉक की जानकारी देखने देती है, जिसमें टोकन सूची, कंपनी की जानकारी, ट्रेडिंग स्थिति और ऑन-चेन कीमतें शामिल हैं।
binance
45kआपके एजेंट को binance-cli टूल के ज़रिए Binance Spot, USD-M Futures और Convert इस्तेमाल करने देती है। पहले ऑथेंटिकेशन सेट करना ज़रूरी है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।