# CCXT

One client for seven prediction venues, inside a 104-exchange crypto library.

*https://predictionmarkets.tools/tools/ccxt · Trading Clients, SDKs & Bots*

## Also covered on

- [CCXT on CryptoMarkets.tools](https://cryptomarkets.tools/tools/ccxt.md) — the 104 crypto exchanges the same library carries, and the builder fee on seven of them

## Facts

### At a glance

| Field | Value |
| --- | --- |
| Vendor | CCXT |
| Category | Trading Clients, SDKs & Bots |
| Job | sdk |
| Website | https://github.com/ccxt/ccxt |
| Pricing model | open-source |
| Free tier | true |
| Open source | true |
| Licence | MIT |
| Self-hosted | true |
| Tested hands-on | false |
| Last updated | 2026-09-19 |

### Availability

| Field | Value |
| --- | --- |
| Jurisdictions | global |
| Open to US persons | true |
| KYC required | false |

### Markets

| Field | Value |
| --- | --- |
| Settlement | crypto |
| Resolved by | none |

### Economics

| Field | Value |
| --- | --- |
| Taker fee | none |
| Maker fee | none |
| Liquidity model | clob |
| Platforms | library, cli |
| AI features | none |

### Interfaces

| Field | Value |
| --- | --- |
| API | true |
| WebSocket | true |
| Scripting | none |
| Python | true |
| MCP server | true |
| Export | json |

### Capabilities

Yes: order_book, automation, live_trading, paper_trading, portfolio_tracking, cross_venue

No: charting, screening, backtesting, calibration_scoring, alerts, news, tax_reporting

*Verified: pricing 2026-09-19; availability 2026-09-19; capabilities 2026-09-19.*

## What it is

CCXT is a unified trading API. You write one integration and it talks to any supported exchange,
mapping each venue's idiosyncratic REST and WebSocket surface onto one vocabulary - `fetchTicker`,
`fetchOrderBook`, `createOrder`, `cancelOrder`, `fetchBalance`, `fetchPositions`. It ships in
JavaScript and TypeScript, Python, PHP, C#, Go, Java and Rust from a single generated codebase, and
it is MIT-licensed with nothing held back.

**Most of CCXT is not about this catalogue's subject, and that should be said plainly.** The
library carries 104 crypto-exchange classes, 76 of them with WebSocket support. Prediction markets
are a separate `prediction` namespace holding seven venues. If you install CCXT for event
contracts, you are installing a large crypto library to reach a small corner of it, and the issue
tracker, the release notes and the documentation you will be reading are overwhelmingly about
something else.

It earns its card anyway, because it is the only client here that speaks to more than one
prediction venue, and because the seven it covers are not toys - each implements order placement,
cancellation, positions and order books, and all but one of them candles.

## Availability

The package installs from PyPI, npm and the rest anywhere, and needs Python 3.10 or newer on the
Python side. Public market data needs no key at all - you can read Polymarket's and Kalshi's order
books with no account.

The flags here describe the library. Whether you may hold a funded position on any given venue is
that venue's question, answered on that venue's card, and CCXT will happily construct an
authenticated client for an exchange that will not serve you.

Sandbox mode is wired for some venues and not others. Among the prediction venues, CCXT carries
test hosts for Kalshi's demo environment, Myriad and Hyperliquid; Polymarket, Limitless, Opinion
and Binance prediction have no test URLs in their classes, so there is nothing to practise against.

## Pricing

Free and MIT-licensed, including the WebSocket half - what used to be sold as CCXT Pro is now a
free part of the library. There is no paid tier, no key, and no metered endpoint. The project takes
sponsorships through Open Collective and carries paid promotion slots in its README, neither of
which changes what the code costs.

Exchange fees are the exchange's. CCXT reads them back where the venue exposes them -
`fetchTradingFee` is implemented for Polymarket and Myriad among the prediction venues - but
charges nothing itself.

## Markets & resolution

CCXT resolves nothing and settles nothing. It is a transport, and the settlement type on this card
is the majority case among the venues it reaches rather than a property of the library - five of
the seven settle in stablecoin on-chain, while Kalshi settles in US dollars as a regulated exchange.
The same caveat applies to the liquidity model - most of these venues run an order book, but Myriad
is priced against a curve, and `fetchTradeQuote` exists precisely because an executable quote on an
automated market maker is not the same object as a book.

The data model is the part worth reading before you write anything. CCXT models prediction venues in
three levels - an **event** is the question, a **market** hangs off the event, and an **outcome**
(a YES or NO token, handled as something like `TRUMP_WINS:YES`) is the tradeable unit. Every price
and trade method takes an outcome handle where a crypto method would take a symbol. Prices are
probabilities between 0 and 1, `amount` is a number of shares, and `cost` is the collateral spent.

Discovery starts with `fetchEvents`, which takes a query, tags, an event id or a slug. Note one
sharp edge - calling `fetchTickers()` with no arguments raises `ArgumentsRequired` rather than
quietly returning a subset, because the venue has no all-tickers endpoint. Only Hyperliquid serves
its whole universe in one request; the other six all raise, though the documentation names only
four of them.

## Integrations

The seven prediction venues, as of 2026-09-19 - Polymarket, Kalshi, Limitless, Myriad, Opinion,
Binance's prediction markets and Hyperliquid's. Three of them have cards here for the underlying
APIs, at [polymarket-clob-api](https://predictionmarkets.tools/tools/polymarket-clob-api), [kalshi-api](https://predictionmarkets.tools/tools/kalshi-api) and
[limitless-api](https://predictionmarkets.tools/tools/limitless-api).

WebSocket streaming is implemented inside the prediction classes themselves rather than in a
separate Pro package, and only for three venues - Polymarket carries five watch methods over the
CLOB market and user channels, Myriad eight, Opinion five. Kalshi, Limitless, Binance and
Hyperliquid have none in their prediction classes, so anything live on those four means polling or
your own socket code.

CCXT also ships an official MCP server, published as `ccxt-mcp` and run locally over stdio, which
exposes market data, balances and opt-in trading to an MCP host. Keys stay on the machine; trading,
withdrawals and raw endpoints are separate opt-in tiers that are off by default. Every language
binding has a CLI as well, and the prediction namespace is reachable from it with a `-p` or
`--prediction` flag.

## Limitations

**You are reading somebody else's translation of the exchange.** That is the whole trade a unified
API makes. When a field's meaning differs between Polymarket and Kalshi, CCXT has picked one
mapping, and the error you get back is CCXT's rendering of the venue's error. For a single venue,
the venue's own SDK or its raw API will always be closer to the truth.

**The prediction support is newer and thinner than the crypto support.** 76 of 104 crypto exchanges
have WebSocket; three of seven prediction venues do. Capability varies enough between the seven that
`exchange.has[methodName]` is not optional reading - Kalshi has `editOrder` and `fetchSettlements`,
which Polymarket does not, while Polymarket has batch `createOrders`, `fetchOrderTrades` and
`fetchTradingFee`, which Kalshi does not.

**Python gets the async class or nothing.** `ccxt.prediction.<id>` *is* the asynchronous class;
there is no synchronous variant the way there is for crypto exchanges. Code that is otherwise
synchronous has to grow an event loop to reach an event venue.

**Documentation lags the code.** The prediction-markets page currently names five venues in its
opening sentence while the repository's own `exchanges.json` and README table both list seven. The
machine-readable list is better on that count and worse on another: the `predictionWs` array in
`exchanges.json` is empty, although three of the prediction classes do carry watch methods. Read
the classes.

**Size.** 236 issues are open against the repository, and roughly 500 more open items are pull
requests. Releases land about weekly - 39 of them in the six months to 2026-09-19, when 4.5.81 went
out - which is a strength for a library tracking a hundred moving APIs and a cost if you pin
versions carefully. Note that the npm and PyPI releases are not in step: PyPI had 4.5.81 on
2026-09-19 while npm was still on 4.5.78 from 2026-09-07.

## Alternatives

For one venue and nothing else, a single-venue client is a smaller dependency and a shorter path to
the exchange's actual semantics. Polymarket's is now `polymarket-client`, from the repository that
replaced [py-clob-client](https://predictionmarkets.tools/tools/py-clob-client); Kalshi's is
[kalshi-python](https://predictionmarkets.tools/tools/kalshi-python), which has not shipped since September 2025.

For reading prices without any client library, the venue REST APIs are plain HTTP - see
[polymarket-gamma-api](https://predictionmarkets.tools/tools/polymarket-gamma-api), [kalshi-api](https://predictionmarkets.tools/tools/kalshi-api) and
[limitless-api](https://predictionmarkets.tools/tools/limitless-api).

For prices from several venues in one response without writing the fan-out yourself, a cross-venue
data provider such as [adjacent](https://predictionmarkets.tools/tools/adjacent) or [finfeedapi](https://predictionmarkets.tools/tools/finfeedapi) is a different answer to a
neighbouring question - data only, no order path.

## FAQ

### Which prediction markets does CCXT support?

Seven, in a namespace of their own - Polymarket, Kalshi, Limitless, Myriad, Opinion, plus the prediction markets of Binance and Hyperliquid. That list comes from the repository's own exchanges.json and the table in its README, both read on 2026-09-19.

### Is prediction-market support in CCXT complete?

It is real but uneven. All seven venues implement order placement, cancellation, positions and order books over REST, but not more than that - Limitless declares fetchBalance false, and Binance's prediction class has no candles. Live WebSocket streaming exists for Polymarket, Myriad and Opinion only; Kalshi, Limitless, Binance and Hyperliquid have no watch methods in their prediction classes.

### How do I reach a prediction market from CCXT in Python?

Through the prediction namespace, which is async-only in Python - `import ccxt.prediction` then `ccxt.prediction.polymarket()` gives you the asynchronous class directly, with no synchronous twin. Prices are probabilities between 0 and 1, amounts are numbers of shares.

### Is CCXT mostly about prediction markets?

No, and the card says so on purpose. CCXT is a crypto-exchange library with 104 exchange classes; the seven prediction venues are a recent and much smaller part of it. It is listed here because it is the only client in this catalogue that speaks to more than one event venue.

## Background

- [What running a bot does not solve](https://predictionmarkets.tools/guides/what-a-bot-cannot-fix.md) — A bot fixes speed and consistency. Rate limits, a missing rehearsal, a field that stops arriving, a partial fill and a paused market are not coding problems.

- [Where weather data comes from and what you may do with it](https://predictionmarkets.tools/guides/where-weather-data-comes-from.md) — Observations, model output and archives are three products with three licences. The forecast is the cheap half; a clean observation history is not.

- [Where your key lives when software trades for you](https://predictionmarkets.tools/guides/where-your-key-lives.md) — Four different credentials are all called a key, and they differ in what a copy permits. What the clients in this catalogue ask for, and what to ask them back.

## Also worth comparing

- [PMXT](https://predictionmarkets.tools/tools/pmxt.md) — CCXT-shaped client for prediction markets, with a hosted API and a self-hosted mode.
- [limitless-sdk](https://predictionmarkets.tools/tools/limitless-sdk.md) — Limitless Exchange's own async Python SDK - CLOB and NegRisk orders, WebSocket, MIT.
- [polymarket-client](https://predictionmarkets.tools/tools/polymarket-client.md) — Polymarket's own unified Python SDK - sync and async, data through order signing.
- [py-clob-client](https://predictionmarkets.tools/tools/py-clob-client.md) — Polymarket's own Python CLOB client - archived, and declared non-functional by its README.
- [Kalshi Python SDK (sync and async)](https://predictionmarkets.tools/tools/kalshi-python-sync.md) — Kalshi's current official Python client - weekly releases, Python 3.13 only, no source.
- [kalshi-python](https://predictionmarkets.tools/tools/kalshi-python.md) — Kalshi's own generated Python client - closed-source, and unreleased since September 2025.

## Named as a replacement for

- [Dome API](https://predictionmarkets.tools/alternatives/dome.md)
- [Drift BET](https://predictionmarkets.tools/alternatives/drift-bet.md)
- [Metaforecast](https://predictionmarkets.tools/alternatives/metaforecast.md)
