Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

ccxt-python

verified

CCXT cryptocurrency exchange library for Python developers. Covers both REST API (standard) and WebSocket API (real-time). Helps install CCXT, connect to exchanges, fetch market data, place orders, stream live tickers/orderbooks, handle authentication, and manage errors in Python. Use when working with crypto exchanges in Python projects, trading bots, data analysis, or portfolio management. Supports both sync and async (asyncio) usage.

View on GitHub

Repository
Verified Org

ccxt/ccxt
40.8kstars

.claude/skills/ccxt-python/SKILL.md

Last Verified

February 5, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/ccxt/ccxt/blob/0c7a01553eb8e9150ee5ac39bd64b3e9f0713955/.claude/skills/ccxt-python/SKILL.md -a claude-code --skill ccxt-python

Installation paths:

Claude
.claude/skills/ccxt-python/
Powered by add-skill CLI

Instructions

# CCXT for Python

A comprehensive guide to using CCXT in Python projects for cryptocurrency exchange integration.

## Installation

### REST API (Standard)
```bash
pip install ccxt
```

### WebSocket API (Real-time, ccxt.pro)
```bash
pip install ccxt
```

### Optional Performance Enhancements
```bash
pip install orjson      # Faster JSON parsing
pip install coincurve   # Faster ECDSA signing (45ms → 0.05ms)
```

Both REST and WebSocket APIs are included in the same package.

## Quick Start

### REST API - Synchronous
```python
import ccxt

exchange = ccxt.binance()
exchange.load_markets()
ticker = exchange.fetch_ticker('BTC/USDT')
print(ticker)
```

### REST API - Asynchronous
```python
import asyncio
import ccxt.async_support as ccxt

async def main():
    exchange = ccxt.binance()
    await exchange.load_markets()
    ticker = await exchange.fetch_ticker('BTC/USDT')
    print(ticker)
    await exchange.close()  # Important!

asyncio.run(main())
```

### WebSocket API - Real-time Updates
```python
import asyncio
import ccxt.pro as ccxtpro

async def main():
    exchange = ccxtpro.binance()
    while True:
        ticker = await exchange.watch_ticker('BTC/USDT')
        print(ticker)  # Live updates!
    await exchange.close()

asyncio.run(main())
```

## REST vs WebSocket

| Import | For REST | For WebSocket |
|--------|----------|---------------|
| **Sync** | `import ccxt` | (WebSocket requires async) |
| **Async** | `import ccxt.async_support as ccxt` | `import ccxt.pro as ccxtpro` |

| Feature | REST API | WebSocket API |
|---------|----------|---------------|
| **Use for** | One-time queries, placing orders | Real-time monitoring, live price feeds |
| **Method prefix** | `fetch_*` (fetch_ticker, fetch_order_book) | `watch_*` (watch_ticker, watch_order_book) |
| **Speed** | Slower (HTTP request/response) | Faster (persistent connection) |
| **Rate limits** | Strict (1-2 req/sec) | More lenient (continuous stream) |
| **Best for** | Trading, account management |

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
28542 chars