CCXT

v0.1.3
io.github.ccxt/ccxt-mcp Checked 6 hours ago Published 2 months ago

Official CCXT MCP server - Market data and trading across 100+ exchanges and prediction markets

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_exchanges List supported exchanges

List every exchange this server supports (built from ccxt.exchanges at runtime), with name, websocket and prediction-market availability. Filter by a name query or by support for a unified method.

ParameterTypeDescription
predictionbooleantrue: only prediction-market exchanges; false: exclude them
querystringcase-insensitive substring match on the exchange id or name
supportsstringkeep only exchanges supporting this unified method, e.g. "fetchOHLCV"

describe_exchange Describe an exchange's capabilities

One exchange's supported unified methods, market types, timeframes, required credential fields, sandbox availability and documentation URLs. Per-method detail lives in describe_method.

ParameterTypeDescription
exchange *stringexchange id, e.g. "binance" — validated against ccxt.exchanges; discover ids with list_exchanges
predictionbooleanset true to use the prediction-markets variant of an exchange that exists in both namespaces (e.g. hyperliquid)

describe_method Search or describe unified ccxt methods

Search unified method names by keyword, or get one method's signature and parameter documentation. With "exchange" it adds that exchange's own docs (including supported params.* keys and links to the exchange API reference), per-market-type feature support, and searches its implicit (exchange-specific) endpoints too. Full ccxt manual: https://docs.ccxt.com/

ParameterTypeDescription
exchangestringexchange id for per-exchange docs, feature support and implicit endpoints; when omitted a reference exchange (binance) is used, so implicit-endpoint results are binance-specific — pass "exchange" to…
methodstringexact method name to describe, e.g. "fetchOHLCV" (or an implicit endpoint name when "exchange" is set)
predictionbooleanset true to use the prediction-markets variant of an exchange that exists in both namespaces (e.g. hyperliquid)
querystringkeyword search over method names, e.g. "funding"

search_markets Search markets on an exchange

Search and filter the markets of one exchange (by text, base, quote, settle currency, market type), paginated. Use this to resolve unified symbols — there is deliberately no list-all-markets tool. On prediction exchanges use search_events instead.

ParameterTypeDescription
exchange *stringexchange id, e.g. "binance" — validated against ccxt.exchanges; discover ids with list_exchanges
activeOnlybooleanonly active markets (default true)
basestringbase currency filter, e.g. "BTC"
limitintegermax results (default 50, max 200)
offsetintegerpagination offset
predictionbooleanset true to use the prediction-markets variant of an exchange that exists in both namespaces (e.g. hyperliquid)
querystringcase-insensitive substring match on the symbol or market id
quotestringquote currency filter, e.g. "USDT"
reloadbooleanforce-refresh the markets cache
settlestringsettle currency filter (derivatives)
typestringmarket type filter: "spot", "swap", "future", "option", …

get_tickers Get price tickers

24h price tickers for one or more unified symbols on an exchange (outcome handles on prediction exchanges).

ParameterTypeDescription
exchange *stringexchange id, e.g. "binance" — validated against ccxt.exchanges; discover ids with list_exchanges
symbols *arrayunified symbols, e.g. ["BTC/USDT"] — resolve with search_markets
includeInfobooleaninclude the raw exchange payload (single symbol only)
marketTypestringmarket type routing for exchanges with several (e.g. "spot", "swap", "future", "option") — sets options.defaultType on a dedicated instance
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
predictionbooleanset true to use the prediction-markets variant of an exchange that exists in both namespaces (e.g. hyperliquid)

get_orderbook Get order book

Current order book (bids and asks) for one unified symbol.

ParameterTypeDescription
exchange *stringexchange id, e.g. "binance" — validated against ccxt.exchanges; discover ids with list_exchanges
symbol *stringunified symbol — resolve with search_markets
depthintegeralias for limit (price levels per side)
limitintegerprice levels per side (default 20, max 100)
marketTypestringmarket type routing for exchanges with several (e.g. "spot", "swap", "future", "option") — sets options.defaultType on a dedicated instance
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
predictionbooleanset true to use the prediction-markets variant of an exchange that exists in both namespaces (e.g. hyperliquid)

get_ohlcv Get OHLCV candles

Historical OHLCV candlestick data for a symbol and timeframe. Rows are [timestampMs, open, high, low, close, volume]. Page back with "since"; "params.until" bounds the end.

ParameterTypeDescription
exchange *stringexchange id, e.g. "binance" — validated against ccxt.exchanges; discover ids with list_exchanges
symbol *stringunified symbol
limitintegernumber of candles (default 100, max 500)
marketTypestringmarket type routing for exchanges with several (e.g. "spot", "swap", "future", "option") — sets options.defaultType on a dedicated instance
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
predictionbooleanset true to use the prediction-markets variant of an exchange that exists in both namespaces (e.g. hyperliquid)
sincenumber | stringearliest entry to fetch: timestamp in ms, or an ISO8601 string like "2024-01-01T00:00:00Z"
timeframestringcandle interval (default "1h") — valid values come from describe_exchange .timeframes

get_trades Get recent public trades

Recent public trades for one unified symbol.

ParameterTypeDescription
exchange *stringexchange id, e.g. "binance" — validated against ccxt.exchanges; discover ids with list_exchanges
symbol *stringunified symbol
limitintegernumber of trades (default 50, max 200)
marketTypestringmarket type routing for exchanges with several (e.g. "spot", "swap", "future", "option") — sets options.defaultType on a dedicated instance
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
predictionbooleanset true to use the prediction-markets variant of an exchange that exists in both namespaces (e.g. hyperliquid)
sincenumber | stringearliest entry to fetch: timestamp in ms, or an ISO8601 string like "2024-01-01T00:00:00Z"

search_events Search prediction-market events

Search events on a prediction-market exchange (polymarket, kalshi, limitless, myriad, hyperliquid with prediction=true). A scoping filter is required: query, tags, or params.eventId/params.slug. Returns events with their markets and outcome handles — outcome handles are what you pass as the symbol to get_tickers/get_orderbook/create_order on prediction exchanges.

ParameterTypeDescription
exchange *stringexchange id, e.g. "binance" — validated against ccxt.exchanges; discover ids with list_exchanges
limitintegermax events (default 25, max 100)
offsetintegerpagination offset
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
querystringkeyword search (required unless tags or params.eventId/params.slug are given)
sortstring"volume", "liquidity" or "newest"
statusstring"active" (default), "closed" or "all"
tagsarrayfilter by tags/categories

call_read_method Call any read-only unified ccxt method

Escape hatch covering every unified read method not served by a dedicated tool (fetchFundingRate, fetchLedger, fetchOpenInterest, fetchLiquidations, fetchEvent, fetchSettlements, …). Only fetch*/load* methods are accepted — writes are structurally rejected. Get the signature first with describe_method. Docs: https://docs.ccxt.com/

ParameterTypeDescription
exchange *stringexchange id, e.g. "binance" — validated against ccxt.exchanges; discover ids with list_exchanges
method *stringunified method name matching ^(fetch|load), e.g. "fetchFundingRate"
accountstringconfigured account name — required for private reads like fetchLedger
argsarraypositional arguments per the describe_method usage line; ISO8601 strings become ms timestamps; null skips an optional argument
includeInfobooleankeep the raw exchange payload inside unified structures
marketTypestringmarket type routing for exchanges with several (e.g. "spot", "swap", "future", "option") — sets options.defaultType on a dedicated instance
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
predictionbooleanset true to use the prediction-markets variant of an exchange that exists in both namespaces (e.g. hyperliquid)

call_implicit_get Call a raw GET endpoint (implicit API)

Call an exchange-specific implicit REST endpoint over HTTP GET, for data the unified API does not cover. Pass the implicit method name in the "method" argument (e.g. "publicGetTickerPrice"); these are exchange-specific — find them with describe_method {"query": ..., "exchange": ...} (its results list the name to pass here). The response is the raw exchange payload. Consult the exchange API reference (describe_exchange .urls.doc) and the ccxt manual: https://docs.ccxt.com/

ParameterTypeDescription
exchange *stringexchange id, e.g. "binance" — validated against ccxt.exchanges; discover ids with list_exchanges
method *stringimplicit method name whose HTTP verb is GET, e.g. "publicGetTickerPrice" (from describe_method)
accountstringconfigured account name for authenticated (private/signed) GET endpoints
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
predictionbooleanset true to use the prediction-markets variant of an exchange that exists in both namespaces (e.g. hyperliquid)

get_safety_status Show safety and configuration status

What this server is currently allowed to do: configured accounts (names only — never credentials), enabled capability tiers, caps, sandbox/live environments, journal location, unresolved order intents, and any configuration problems.

watch_subscribe Start a live WebSocket stream

Open a background WebSocket subscription to a ccxt.pro watch* method so the agent can pull fresh data on demand. Returns a subscriptionId and a "streamKind". STATE streams are snapshots of "what is X right now" — watchTicker(s), watchOrderBook(ForSymbols), watchOHLCV(ForSymbols), watchBalance, watchPositions, watchBidsAsks, watchMarkPrice(s), watchFundingRate(s): watch_read returns the COMPLETE current set in "latest" (the server merges live updates into a full snapshot, so a multi-symbol stream always shows every subscribed symbol, not just the one that just ticked). EVENT streams are logs…

ParameterTypeDescription
exchange *stringexchange id, e.g. "binance" — validated against ccxt.exchanges; discover ids with list_exchanges
method *stringa ccxt.pro watch* method, e.g. "watchOHLCV", "watchTicker", "watchOrderBook", "watchTrades"
accountstringconfigured account name — required for private streams (watchOrders, watchMyTrades, watchBalance, watchPositions, watchMyLiquidations)
argsarraypositional arguments — they differ per method (get the exact signature with describe_method): e.g. watchTicker ["BTC/USDT"], watchOHLCV ["BTC/USDT","1m"], watchOrderBook ["BTC/USDT", depthLimit], wa…
marketTypestringmarket type routing for exchanges with several (e.g. "spot", "swap")
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
predictionbooleanset true to use the prediction-markets variant of an exchange that exists in both namespaces (e.g. hyperliquid)
symbolstringconvenience alias for a single-symbol stream (watchTicker/watchOrderBook/watchTrades/watchOHLCV) — equivalent to passing it as args[0]; ignored if args is given
symbolsarrayconvenience alias for a multi-symbol stream (watchTickers/watchOrderBookForSymbols/…) — equivalent to passing the list as args[0]; ignored if args is given

watch_read Read from a live stream

Get the latest data from a stream. For a STATE stream (streamKind "state": ticker(s), order book(s), ohlcv, balance, positions, ...) it returns the COMPLETE current snapshot in "latest" — the full merged set, so call it whenever you need the current value; "updatesSinceRead" tells you how much changed since you last read. The shape of "latest" mirrors the fetch* method: a single object for watchTicker/watchOrderBook/watchBalance, keyed by symbol for watchTickers/watchBidsAsks ({"BTC/USDT": {...}}), an array for watchPositions, and nested by symbol then timeframe for watchOHLCV ("latest"["BTC…

ParameterTypeDescription
subscriptionId *stringid from watch_subscribe
cursorintegerEVENT streams only: the nextCursor from your previous watch_read (omit on the first read). Ignored for state streams.
depthintegerorder-book streams only: levels per side to return in "latest" (default 20, max 100). Use depth:1 for just top-of-book (best bid/ask) — much cheaper when comparing many venues.
timeoutMsintegermax time to block when waitForChange is set (default 25000, clamped to 1000–55000 — sub-second values are raised to ~1s, larger stay under host tool-call timeouts)
waitForChangebooleanblock until the next update lands (or timeoutMs elapses) instead of returning right away — use to wait for a fill/position change without polling. If something new is already available it returns im…

watch_unsubscribe Stop a live stream

Stop a WebSocket subscription and release its socket. Always stop streams you no longer need.

ParameterTypeDescription
subscriptionId *stringid from watch_subscribe

watch_list List active streams

List the currently active WebSocket subscriptions (id, exchange, method, streamKind, account and environment for private streams, args, active flag, age, seconds since last read, update count, and last error).

list_accounts List configured accounts

Locally configured named exchange accounts. Returns aliases and capability flags only — credential values are never exposed by any tool.

get_balance Get account balance

Balances for a named account. Returns non-zero balances by default (exchanges report every listed currency — hundreds of zero rows).

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
marketTypestringwallet/market type to query when the exchange has several (e.g. "spot", "swap", "future", "funding") — overrides the account default
nonzeroOnlybooleandefault true; false returns every currency
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method

get_orders Get orders

Orders for a named account: one order by id, or a list filtered by status ("open" default, "closed", "canceled", "all"). Many exchanges require a symbol for list queries.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
idstringorder id — fetches that single order
includeInfobooleaninclude the raw exchange payload (single order only)
limitintegermax orders (default 50, max 200)
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
sincenumber | stringearliest entry to fetch: timestamp in ms, or an ISO8601 string like "2024-01-01T00:00:00Z"
statusstring"open" (default), "closed", "canceled" or "all"
symbolstringunified symbol (required by many exchanges for list queries)

get_my_trades Get account trade history

The account's own executed trades (fills). Many exchanges require a symbol.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
limitintegermax trades (default 50, max 200)
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
sincenumber | stringearliest entry to fetch: timestamp in ms, or an ISO8601 string like "2024-01-01T00:00:00Z"
symbolstringunified symbol

get_positions Get open positions

Open derivatives positions for a named account (prediction-market positions on prediction exchanges).

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
marketTypestringderivatives type to query when the exchange has several (e.g. "swap", "future") — overrides the account default
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
symbolsarrayrestrict to these unified symbols

create_order Place an order

Place an order on a trading-enabled account (works on prediction exchanges with outcome handles as the symbol). Validated against market precision/limits and the account's notional caps. Whether it returns a preview + confirmToken first depends on the account's "confirm" policy: always = every order is previewed; live (the default) = only orders on a LIVE account are previewed, sandbox/demo execute immediately; never = no preview. So on a sandbox/demo account under the default policy an order executes without a confirm step. A stop/trigger order also returns meta.note flagging that conditional…

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
side *string
symbol *stringunified symbol (outcome handle on prediction exchanges)
type *stringorder type — usually "limit" or "market"; exchange-specific types pass through
amountnumberamount in base currency / contracts / shares
confirmstringconfirmation token from the preview response — repeat the identical call with this token to execute
costnumberspend this quote-currency value instead of specifying an amount (market buy/sell by cost, where the exchange supports it)
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
pricenumberlimit price — required for limit orders

edit_order Modify an open order

Modify price/amount of an open order. On exchanges without native edit, ccxt emulates it as cancel-then-replace — queue position is lost and the cancel can succeed while the replace fails. Runs the full order validation and confirmation.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
id *stringorder id to modify
symbol *stringunified symbol of the order
amountnumber
confirmstringconfirmation token from the preview response — repeat the identical call with this token to execute
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
pricenumber
sidestring
typestring

cancel_order Cancel an order

Cancel one open order by id. No confirmation step — canceling reduces risk and must never be blocked.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
id *stringorder id
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
symbolstringunified symbol (required by many exchanges)

cancel_all_orders Cancel all open orders

Cancel every open order on an account, optionally restricted to one symbol. The preview lists the orders that would be canceled.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
confirmstringconfirmation token from the preview response — repeat the identical call with this token to execute
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
symbolstringonly cancel orders on this unified symbol

set_leverage Set leverage

Set the leverage multiplier for a derivatives symbol on a trading-enabled account. Changing leverage changes the risk of existing positions.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
leverage *numberleverage multiplier, e.g. 5
confirmstringconfirmation token from the preview response — repeat the identical call with this token to execute
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
symbolstringunified symbol (required by most exchanges)

set_margin_mode Set margin mode

Set cross or isolated margin mode for a derivatives symbol on a trading-enabled account.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
marginMode *string
confirmstringconfirmation token from the preview response — repeat the identical call with this token to execute
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
symbolstringunified symbol (required by most exchanges)

call_write_method Call an allowlisted unified write method

Dispatch the unified write long tail on a trading-enabled account: cancelOrders, cancelOrdersForSymbols, cancelAllOrdersAfter, setPositionMode, addMargin, reduceMargin, setMargin, borrowCrossMargin, borrowIsolatedMargin, repayCrossMargin, repayIsolatedMargin, closePosition, closeAllPositions. Always previews and requires confirmation. Batch order placement is deliberately excluded — use create_order per order so the notional caps apply. Signatures: describe_method.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
method *stringone of the allowlisted method names
argsarraypositional arguments per describe_method; null skips an optional argument
confirmstringconfirmation token from the preview response — repeat the identical call with this token to execute
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method

withdraw Withdraw funds

Withdraw cryptocurrency from a funds-enabled account to an external address. Irreversible once dispatched. The preview echoes the exact destination address and network — verify them before confirming.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
address *stringdestination address
amount *number
code *stringunified currency code, e.g. "USDT"
confirmstringconfirmation token from the preview response — repeat the identical call with this token to execute
networkstringunified network code, e.g. "TRC20" — check describe_method {"method": "withdraw", "exchange": ...}
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method
tagstringmemo/tag where the network needs one

transfer Transfer between account wallets

Move funds between wallets of the same exchange account (e.g. spot ↔ swap, main ↔ funding) on a funds-enabled account. Wallet names are exchange-specific — see describe_method {"method": "transfer", "exchange": ...}.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
amount *number
code *stringunified currency code
fromAccount *stringsource wallet, e.g. "spot"
toAccount *stringdestination wallet, e.g. "swap"
confirmstringconfirmation token from the preview response — repeat the identical call with this token to execute
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method

get_deposit_address Get a deposit address

Deposit address for a currency on a funds-enabled account (creates one where none exists and the exchange supports creation). Gated behind the funds tier because transcript-visible addresses invite substitution scams — always verify addresses out-of-band before sending funds.

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
code *stringunified currency code
networkstringunified network code
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method

call_implicit_write Call a raw non-GET endpoint (implicit API)

Call an exchange-specific implicit REST endpoint over POST/PUT/DELETE/PATCH on an account with "implicitWrites" enabled — covers exchange features the unified API does not (including account/key management). No unified validation exists for raw endpoints, so every call previews and requires confirmation, and is journaled. Endpoint names: describe_method {"query": ..., "exchange": ...}; payload per the exchange API reference (describe_exchange .urls.doc).

ParameterTypeDescription
account *stringconfigured account name — discover with list_accounts; credentials are never tool parameters
method *stringimplicit method name with a non-GET verb, e.g. "privatePostMarginOrder"
confirmstringconfirmation token from the preview response — repeat the identical call with this token to execute
paramsobjectextra exchange-specific parameters passed through to ccxt unchanged (e.g. {"until": 1673000000000}) — discover supported keys with describe_method