# CCXT — card for AI agents

Unified library to fetch market data and place orders across 100+ crypto exchanges from JS, Python, PHP and more.

Maker: CCXT · category: Stock and financial data

## Price (official page)
- Free tier: none listed
- Free tier terms: open source (read from the wording above and the pricing page; empty = not stated)
- Note: MIT-licensed library with no paid API of its own; each exchange's own API limits, keys and trading fees apply. The MCP server runs locally.

## Connect
- Official MCP server: ccxt-mcp
- MCP server card (how to connect it): https://agentgid.com/mcp/servers/io-github-ccxt-ccxt-mcp/agent.md
- npm: `npm install ccxt`
- PyPI: `pip install ccxt`
- Repository: https://github.com/ccxt/ccxt

## For AI agents on CCXT's own site (AgentGid check 2026-11-13: 4 of 6)
- llms.txt: https://docs.ccxt.com/llms.txt (full text: https://docs.ccxt.com/llms-full.txt)
- OpenAPI description: none found at the usual places
- Official MCP server: yes · official SDK: yes · status page: no
- robots.txt lets AI assistants (ChatGPT-User, Claude-User) read the site: yes

## Price history in AgentGid's catalog (since 2026-10-10)
- Changes recorded: 0 (a vendor price change or an editor's correction; the evidence archive keeps the pricing page of each date)

## Other APIs in this category
- Marketstack: https://agentgid.com/apis/marketstack/agent.md
- Fixer: https://agentgid.com/apis/fixer/agent.md
- Alpaca Market Data API: https://agentgid.com/apis/alpaca/agent.md
- Finnhub: https://agentgid.com/apis/finnhub/agent.md
- OpenBB: https://agentgid.com/apis/openbb/agent.md

## Links
- AgentGid page: https://agentgid.com/apis/ccxt/


## CCXT: one code library for 100+ crypto exchanges

CCXT is a free, open-source code library, not an online service. Your program uses it to talk to more than 100 cryptocurrency exchanges and prediction markets in one common way. It reads public prices, order books and price history without any account, and with your own exchange keys it can read balances and place orders, connecting to each exchange directly.

### Where to use it
- Show live prices from several exchanges: Your app or dashboard shows the current price of a coin pair on different exchanges, with the same code for each one and no exchange account.
- Price history for charts and research: Download past candles (open, high, low, close and volume) for a pair, store them, and draw charts or study them later.
- One view of your own exchange balances: With read-only keys from each of your exchange accounts, a private script lists your balances in one place.
- Test a trading bot on a test network: Run your bot against an exchange's test network with play money first, before any real funds are involved.
- Let an AI assistant look up prices: Connect the official local tool server to Claude or Cursor so the assistant can read prices and order books; out of the box it has public data only.
- Price alert for your own watchlist: A small script checks a few pairs every few minutes and sends you a message when a price crosses a level you chose. (idea, not from the official pages)

### How to start
- Install the library for your language (here Python).

```
pip install ccxt
```

- List the supported exchanges; this works offline.

```
import ccxt
print(ccxt.exchanges) # print a list of all available exchange classes
```

- Read public prices with no account; for balances or orders, create keys on the exchange's website and pass them in.

```
kraken = ccxt.kraken({
    'apiKey': 'YOUR_PUBLIC_API_KEY',
    'secret': 'YOUR_SECRET_PRIVATE_KEY',
})
```


### License
CCXT is free and open source under the MIT license, so you may use it in paid products and change it. It comes with no warranty. Each exchange's own terms, limits and fees still apply.

### Good to know
- Public prices and price history need no account. Balances and orders need keys from each exchange, and some exchanges ask for identity checks first.
- Keep the built-in speed limit on. Switching it off or flooding an exchange with requests can get you banned there.
- A leaked secret key can cost real money. Keep keys in a private file on your own machine, never in shared code or a web page.
- CCXT is funded by rebates from exchanges' broker programs. The project says you pay the same trading fees as going to the exchange directly.
- The local assistant tool server is read-only by default. Trading must be switched on per account in its settings file, with your own order limits.

Checked 2026-11-10 against: https://ccxt.com, https://docs.ccxt.com, https://docs.ccxt.com/llms.txt, https://docs.ccxt.com/docs/install, https://docs.ccxt.com/docs/manual, https://docs.ccxt.com/docs/mcp, https://docs.ccxt.com/docs/faq, https://docs.ccxt.com/docs/ai-skills, https://docs.ccxt.com/docs/pro-manual, https://github.com/ccxt/ccxt/blob/master/README.md, https://github.com/ccxt/ccxt/blob/master/LICENSE.txt, https://pypi.org/pypi/ccxt/json, https://registry.npmjs.org/ccxt/latest, https://registry.npmjs.org/ccxt-mcp/latest

### Mistakes to avoid
- Don't: Setting enableRateLimit to false or creating many instances of the same exchange to go faster. → Do: Keep one instance per exchange with the rate limiter on; slow down on RateLimitExceeded or DDoSProtection. (Each instance has its own limiter, and exceeding exchange limits can get the client banned.)
- Don't: Calling set_sandbox_mode(True) after load_markets or another call. → Do: Call it right after creating the exchange, before anything else. (The docs require it as the very first call.)
- Don't: Using production keys on the test network, or test keys on the real exchange. → Do: Create a separate key pair on the exchange's sandbox site for testing. (The two kinds of keys do not work in each other's place.)
- Don't: Retrying an order automatically after InsufficientFunds or InvalidOrder. → Do: Retry only network errors; for order errors stop and show the reason. (The library's own retry covers server and network issues only.)
- Don't: Giving the MCP server or a script exchange keys that can withdraw funds. → Do: Create keys with withdrawals disabled and an IP allowlist; enable trading only when the person asks, with order caps. (The CCXT docs recommend these exchange-side limits as a backstop.)

### Questions
- Is CCXT a paid service? No. It is free MIT-licensed software you run yourself; it is not a service or a server.
- Do I need an exchange account to get prices? No. Public market data such as tickers, order books and candles works without an account or key.
- Can it create exchange accounts or keys for me? No. You register on each exchange yourself and create the keys there.
- Can I try orders without real money? On exchanges that offer a test network, yes, with sandbox mode and separate test keys.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
