wiki/AI-Skills.md
CCXT provides language-specific skills for Claude Code and OpenCode AI assistants. These skills help developers quickly learn and use CCXT in their projects with comprehensive guides, code examples, and a complete API reference.
Skills are interactive documentation modules that AI coding assistants (like Claude Code and OpenCode) can load to provide context-aware help when working with CCXT. When you ask questions about CCXT, the AI assistant uses these skills to give accurate, detailed answers with working code examples.
Each skill includes:
Five language-specific skills are available:
| Skill | Language | Coverage |
|---|---|---|
| ccxt-typescript | TypeScript/JavaScript | Node.js, browser, REST & WebSocket |
| ccxt-python | Python | Sync, async, asyncio, REST & WebSocket |
| ccxt-php | PHP | Sync, async (ReactPHP), REST & WebSocket |
| ccxt-csharp | C#/.NET | .NET Standard 2.0+, REST & WebSocket |
| ccxt-go | Go | REST & WebSocket |
Each skill is tailored to the specific language with appropriate idioms, naming conventions, and best practices.
You need either Claude Code or OpenCode installed on your system.
Install all skills with a single command using the skills CLI:
npx skills add ccxt/ccxt
This works with Claude Code, Cursor, Copilot, Windsurf, Codex, and 30+ other AI coding assistants.
curl -fsSL https://raw.githubusercontent.com/ccxt/ccxt/master/install-skills.sh | bash
This will automatically download and install all five CCXT skills to your system.
If you have the CCXT repository cloned, you can use these options:
./install-skills.sh
This will present an interactive menu where you can choose which skills to install:
Select which skills to install:
1) ccxt-typescript - TypeScript/JavaScript (Node.js & browser, REST & WebSocket)
2) ccxt-python - Python (sync & async, REST & WebSocket)
3) ccxt-php - PHP (sync & async, REST & WebSocket)
4) ccxt-csharp - C#/.NET (REST & WebSocket)
5) ccxt-go - Go (REST & WebSocket)
6) All skills - Install all of the above
7) Exit - Cancel installation
Enter your choice (1-7):
./install-skills.sh --all
# Install single skill
./install-skills.sh --typescript
# Install multiple skills
./install-skills.sh --python --go
# Install with flags
./install-skills.sh --typescript --php --csharp
Skills are installed to:
~/.claude/skills/ (for Claude Code)~/.opencode/skills/ (for OpenCode)The installation script automatically detects both and installs to the appropriate locations.
Once installed, you can invoke skills directly in Claude Code or OpenCode:
/ccxt-typescript
/ccxt-python
/ccxt-php
/ccxt-csharp
/ccxt-go
The AI assistant will load the skill and be ready to answer questions about CCXT in that language.
You don't need to explicitly invoke skills - just ask natural questions:
Basic usage:
Specific features:
Advanced topics:
The AI assistant will automatically reference the appropriate skill to provide accurate answers with working code examples.
Tickers & Prices:
fetchTicker - Get ticker for one symbolfetchTickers - Get multiple tickers at oncefetchBidsAsks - Get best bid/ask pricesfetchMarkPrices - Get mark prices for derivativesfetchLastPrices - Get last traded pricesOrder Books:
fetchOrderBook - Get full order bookfetchL2OrderBook - Level 2 order bookfetchL3OrderBook - Level 3 order book (full depth)watchOrderBook - Live order book updatesTrades & History:
fetchTrades - Get public trade historyfetchMyTrades - Get your trade history (authenticated)fetchOHLCV - Get candlestick/OHLCV datawatchTrades, watchOHLCV - Live updatesOrder Types (20+ supported):
createMarketOrder, createMarketBuyOrder, createMarketSellOrdercreateLimitOrder, createLimitBuyOrder, createLimitSellOrdercreateStopLossOrder, createStopMarketOrder, createStopLimitOrdercreateTakeProfitOrdercreateTrailingAmountOrder, createTrailingPercentOrdercreatePostOnlyOrder, createReduceOnlyOrder, createTriggerOrdercreateOrderWithTakeProfitAndStopLossOrder Management:
fetchOrder - Get single orderfetchOrders - Get all ordersfetchOpenOrders - Get open ordersfetchClosedOrders - Get closed orderscancelOrder - Cancel single ordercancelAllOrders - Cancel all orderseditOrder - Modify existing orderwatchOrders - Live order updatesfetchBalance - Get account balancefetchAccounts - Get sub-accountsfetchLedger - Get ledger historyfetchDeposits - Get deposit historyfetchWithdrawals - Get withdrawal historyfetchTransactions - Get transaction historywatchBalance - Live balance updatesPositions:
fetchPosition - Get single positionfetchPositions - Get all positionsclosePosition - Close a positionsetPositionMode - Set hedge/one-way modewatchPositions - Live position updatesMargin & Leverage:
fetchLeverage - Get current leveragesetLeverage - Set leveragesetMarginMode - Set cross/isolated marginborrowMargin - Borrow marginrepayMargin - Repay borrowed marginFunding & Settlement:
fetchFundingRate - Get current funding ratefetchFundingRateHistory - Get funding rate historyfetchFundingHistory - Get your funding paymentsfetchSettlementHistory - Get settlement historyOpen Interest & Liquidations:
fetchOpenInterest - Get open interestfetchOpenInterestHistory - Get OI historyfetchLiquidations - Get public liquidationsfetchMyLiquidations - Get your liquidationsOptions:
fetchOption - Get option informationfetchOptionChain - Get option chainfetchGreeks - Get option greeksfetchVolatilityHistory - Get volatility historyfetchDepositAddress - Get deposit addresscreateDepositAddress - Create new deposit addresswithdraw - Withdraw fundsfetchDeposit - Get deposit infofetchWithdrawal - Get withdrawal infofetchTradingFee - Get trading fee for symbolfetchTradingFees - Get trading feesfetchTradingLimits - Get trading limitsfetchDepositWithdrawFee - Get deposit/withdrawal feesAll fetch* methods have WebSocket equivalents with watch* prefix:
watchTicker - Live ticker updateswatchTickers - Live multiple ticker updateswatchOrderBook - Live order book updateswatchTrades - Live trade streamwatchOHLCV - Live candlestick updateswatchBalance - Live balance updates (auth required)watchOrders - Live order updates (auth required)watchMyTrades - Live trade updates (auth required)watchPositions - Live position updates (auth required)Each skill teaches proper exception handling:
Skills cover both built-in and manual rate limiting:
# Enable built-in rate limiter (recommended)
exchange.enableRateLimit = true
Secure API key handling:
# Use environment variables (recommended)
exchange.apiKey = process.env.EXCHANGE_API_KEY
exchange.secret = process.env.EXCHANGE_SECRET
Checking if an exchange supports a method:
if (exchange.has['fetchOHLCV']) {
// Method is supported
}
ls ~/.claude/skills/ccxt-*
ls ~/.opencode/skills/ccxt-*
Restart Claude Code / OpenCode
Re-run installation:
./install-skills.sh --all
Make sure you're using the correct skill name:
/ccxt-typescript (not /ccxt-ts or /typescript)/ccxt-python (not /ccxt-py or /python)The AI assistant automatically uses skills when you ask CCXT-related questions. You don't need to explicitly invoke them unless you want to.
If the installation script doesn't work, you can install manually:
# Create directories
mkdir -p ~/.claude/skills/
mkdir -p ~/.opencode/skills/
# Copy skills
cp -r .claude/skills/ccxt-typescript ~/.claude/skills/
cp -r .claude/skills/ccxt-python ~/.claude/skills/
cp -r .claude/skills/ccxt-php ~/.claude/skills/
cp -r .claude/skills/ccxt-csharp ~/.claude/skills/
cp -r .claude/skills/ccxt-go ~/.claude/skills/
# For OpenCode
cp -r .claude/skills/ccxt-* ~/.opencode/skills/
.claude/skills/README.md in the CCXT repository.claude/skills/GENERATION_STRATEGY.mdIf you have suggestions for improving the skills or find issues:
The skills are actively maintained and updated alongside CCXT releases.