CCXT

CCXT vs the DeepCoin API

DeepCoin publishes example scripts, not client libraries. CCXT versus the raw REST and WebSocket API on signing, rate limits, streaming and derivatives.

DeepCoin is a Singapore-registered venue running spot, margin and perpetual swap markets, documented at deepcoin.com/docs. Its GitHub organisation publishes two repositories — openapi_python_example and openapi_golang_example — and both are exactly what the names say: example scripts showing how to sign a request and open a socket, not installable packages.

There is one maintained third-party library, DeepCoin.Net by JKorf: a strongly-typed C#/.NET client on NuGet covering REST and WebSocket for spot and futures, MIT-licensed, most recently released as v4.4.0 in August 2026.

Everywhere else, the comparison is CCXT against your own client.

TL;DR

  • Write against the raw API if you need DeepCoin's stream-resume feature, copy-trading endpoints or step-margin data, and you are happy owning the signer and the socket.
  • Use DeepCoin.Net if you are on .NET only and want models shaped exactly like DeepCoin's payloads.
  • Pick CCXT if you want spot, margin and swaps behind one client in seven languages, with signing, per-endpoint rate limits, order-book maintenance and reconnects handled — and the same API on 103 other venues.

At a glance

CCXTRaw DeepCoin APIDeepCoin.Net
MaintainerCCXTDeepCoin (docs and examples)JKorf (third party)
Exchanges covered104DeepCoin onlyDeepCoin only
LanguagesTypeScript, JavaScript, Python, PHP, C#/.NET, Go, Javaany; examples in Python, Go, JavaC#/.NET
Installable packageyes — ccxtno — example scripts onlyyes — DeepCoin.Net on NuGet
Unified API across venuesyes — 64 unified capabilities, 28 fetch* methodsnono
Productsspot, margin, swapspot, margin, swapspot, futures
WebSocketsyes — 11 watch* and unWatch* methodsyes — separate spot and swap URLs, plus a private streamyes, with auto-reconnect
Raw endpoint accessyes — 53 endpoints as implicit methodsit is the whole productthe library's own surface
Built-in rate limiteryes, on by default (rateLimit 200ms)your codeyes, client-side
Unified error typesyes — 41 typed exceptions in one hierarchyHTTP status plus DeepCoin codes.NET result types
Testnet / sandboxnot available for DeepCoinnone documentednone documented
Popularity43.8k GitHub stars · 4.8M PyPI + 494k npm installs/monthopenapi_python_example 3 stars8 GitHub stars
LicenceMITn/aMIT
SupportDiscord, Telegram, GitHub issues — usually same-daydocs site, Telegram API groupGitHub issues

Figures verified September 2026 against CCXT v4.5.77, the DeepCoin API documentation, the Deepcoin-exchange GitHub organisation and the JKorf/DeepCoin.Net repository.

The same job, written both ways

Fetch a ticker

import ccxt

exchange = ccxt.deepcoin()
tickers = exchange.fetch_tickers(['BTC/USDT'])
print(tickers['BTC/USDT']['last'])

CCXT returns a unified ticker structure keyed by portable symbols. DeepCoin's own payload uses abbreviated field names — bidPx, bidSz, askPx, askSz — that you parse yourself, or that DeepCoin.Net maps into .NET models shaped for this venue.

Place a limit order

import ccxt

exchange = ccxt.deepcoin({
    'apiKey': '...', 'secret': '...', 'password': '...',   # passphrase
})
order = exchange.create_order('BTC/USDT:USDT', 'limit', 'buy', 0.001, 60000)
print(order['id'], order['status'])

DeepCoin needs three credentials, not two: an API key, a secret and a passphrase. The signature is HMAC-SHA256 over timestamp + method + requestPath + body, base64-encoded, and the timestamp must be an ISO-8601 UTC string with milliseconds — not a Unix epoch. Query parameters count as part of requestPath on GET requests, so the string you sign has to be assembled after the query string, not before. CCXT declares all three credentials in requiredCredentials and implements the signer once.

Stream an order book

import ccxt.pro
import asyncio

async def main():
    exchange = ccxt.pro.deepcoin()
    while True:
        orderbook = await exchange.watch_order_book('BTC/USDT:USDT')
        print(orderbook['bids'][0], orderbook['asks'][0])

asyncio.run(main())

DeepCoin's socket has its own vocabulary — Action, FilterValue, LocalNo, ResumeNo, TopicID — and spot and swap live on different URLs (.../public/spot and .../public/swap), so a client watching both maintains two connections. The server disconnects after 20 seconds without a ping, and one IP is limited to 10 concurrent connections.

CCXTraw stream
Pick the right spot or swap URL per symboldone for youyour code
Keep the 20-second ping alivedone for youyour code
Merge updates into a full order bookdone for youyour code
Reconnect and re-subscribe after a dropdone for youyour code
Acquire and extend the listen key for private streamsdone for youyour code
Stay under 10 connections per IPpooled per URLyour code

Where the differences actually bite

Rate limits you do not have to model

DeepCoin meters public endpoints by IP and private and trading endpoints by UID, with limits that differ sharply per endpoint: most trading endpoints allow 15 requests per second and 450 per minute, batch operations allow 5 per second and 150 per minute (with a maximum of five orders per batch request), candle data allows 50 per second and 600 per minute, most other market endpoints allow 10 per second and 600 per minute — and the step-margin endpoint allows 1 request per second. Different HTTP methods on the same endpoint share one rule, so you cannot get more headroom by switching verbs.

CCXT encodes per-endpoint weights and ships a throttler that is on by default (enableRateLimit = true, rateLimit = 200ms). You call methods in a loop; the library paces them.

Derivatives as unified methods

CCXT implements 64 unified capabilities for DeepCoin, and the derivatives-specific ones are the reason to care: fetchPositions, fetchPosition, fetchPositionsForSymbol, fetchPositionsHistory, closePosition, setLeverage, fetchFundingRate, fetchFundingRates, fetchFundingRateHistory, fetchMarkOHLCV, fetchIndexOHLCV, plus createTriggerOrder, createReduceOnlyOrder, createPostOnlyOrder and createOrderWithTakeProfitAndStopLoss. Those are the same method names on Bybit, OKX and Binance — so a position-management module written once runs against all of them.

Unified symbols carry the product: 'BTC/USDT' for spot, 'BTC/USDT:USDT' for the linear perpetual.

One error hierarchy

CCXT maps DeepCoin's error codes onto a typed exception treeInsufficientFunds, InvalidOrder, OrderNotFound, AuthenticationError, RateLimitExceeded, NetworkError, ExchangeNotAvailable and 34 more, all descending from BaseError.

Precision and string math

CCXT loads DeepCoin's instrument metadata and gives you amount_to_precision, price_to_precision and cost_to_precision, backed by the Precise string-arithmetic class, so contract sizes and prices do not drift through float rounding:

amount = exchange.amount_to_precision('BTC/USDT:USDT', 0.0012345678)
price = exchange.price_to_precision('BTC/USDT:USDT', 61234.56789)

Seven languages, one API

DeepCoin.Net covers .NET; DeepCoin's own examples cover Python, Go and Java as sample code. CCXT is written once in TypeScript and transpiled to seven languages with identical method names and return structures, so a strategy prototyped in Python ports to a Go or C# execution service without a second data model.

Nothing is hidden — the implicit API

Alongside the 64 unified capabilities, all 53 endpoints in CCXT's DeepCoin API block are generated as callable implicit methods — including the copy-trading, agent-rebate, internal-transfer and step-margin endpoints that have no unified equivalent:

response = exchange.publicGetDeepcoinMarketStepMargin({'instId': 'BTC-USDT'})

Browse them on the DeepCoin implicit API page.

What DeepCoin's own API and DeepCoin.Net do better

Honest advantages:

  • The socket can resume from a position. DeepCoin's subscribe message carries ResumeNo, which lets you reconnect and replay from a specific server-side point rather than from the latest message. CCXT's unified watch* API does not expose that — it re-seeds instead. For a recorder that must not drop a message, calling the socket directly is the way to use it.
  • DeepCoin.Net is a real, actively released .NET library. MIT, on NuGet, latest release v4.4.0 in August 2026, with strongly-typed models, client-side rate limiting, an order-book implementation and automatic WebSocket reconnection. If your stack is .NET only, it is a legitimate alternative to CCXT's C# build.
  • Official examples cover the signing recipe in three languages. DeepCoin's docs give reference code in Python, Go and Java, and the Deepcoin-exchange organisation publishes runnable Python and Go examples. That is a fast path if you are porting the signer into a runtime CCXT does not target.
  • Copy trading and agent rebates have no unified equivalent. DeepCoin exposes leader positions, follower ranks, estimated profit, rebate configuration and agent user lists. CCXT can call them as implicit methods, but there is no parsed unified structure behind them.
  • Field-for-field fidelity with the docs. Reading the DeepCoin reference and calling the endpoint directly means what the docs say is what you get back; CCXT's unified names are one hop away from that.

If DeepCoin is your only venue, you are on .NET, or you need stream resume or the copy-trading endpoints, going direct or using DeepCoin.Net is a reasonable choice.

Migrating from the raw DeepCoin API to CCXT

What you are doingRaw DeepCoin APICCXT
CredentialsDC-ACCESS-KEY, secret, DC-ACCESS-PASSPHRASEapiKey, secret, password
Symbols'BTC-USDT' with instType'BTC/USDT', 'BTC/USDT:USDT'
InstrumentsGET /deepcoin/market/instrumentsload_markets()
TickersGET /deepcoin/market/tickersfetch_tickers()
Order bookGET /deepcoin/market/booksfetch_order_book()
CandlesGET /deepcoin/market/candlesfetch_ohlcv()
Mark / index candlesmark-price-candles, index-candlesfetch_mark_ohlcv(), fetch_index_ohlcv()
New orderPOST /deepcoin/trade/ordercreate_order()
Amend orderPOST /deepcoin/trade/replace-orderedit_order()
Cancel orderPOST /deepcoin/trade/cancel-ordercancel_order()
Batch cancelPOST /deepcoin/trade/batch-cancel-ordercancel_orders()
Open ordersGET /deepcoin/trade/v2/orders-pendingfetch_open_orders()
FillsGET /deepcoin/trade/fillsfetch_my_trades()
BalanceGET /deepcoin/account/balancesfetch_balance()
PositionsGET /deepcoin/account/positionsfetch_positions()
LeveragePOST /deepcoin/account/set-leverageset_leverage()
Funding rateGET /deepcoin/trade/funding-ratefetch_funding_rate()
Streamsspot and swap socket URLs, plus the private streamwatch_* on ccxt.pro.deepcoin
Anything not listedthe endpoint URLthe same endpoint as an implicit method

FAQ

Does DeepCoin have an official SDK? Not an installable one. The Deepcoin-exchange GitHub organisation publishes openapi_python_example and openapi_golang_example — runnable example scripts — and the documentation gives reference code in Python, Go and Java. The only maintained third-party library is DeepCoin.Net for C#/.NET. CCXT is the option that covers the other six languages.

Does CCXT support DeepCoin swaps and positions? Yes. Spot, margin and perpetual swaps are served by one ccxt.deepcoin instance, with unified fetchPositions, closePosition, setLeverage, funding-rate methods and trigger, reduce-only and take-profit/stop-loss order types among its 64 capabilities.

Does CCXT stream DeepCoin over WebSocket? Yes — 11 watch* and unWatch* methods, covering the order book, ticker, trades, candles, orders, my trades and positions. CCXT picks the right spot or swap socket URL per symbol, keeps the 20-second ping alive, and handles the listen-key acquisition and extension needed for private streams.

How does DeepCoin authenticate requests? With four headers: DC-ACCESS-KEY, DC-ACCESS-SIGN, DC-ACCESS-TIMESTAMP and DC-ACCESS-PASSPHRASE. The signature is a base64-encoded HMAC-SHA256 of timestamp + method + requestPath + body, and the timestamp is an ISO-8601 UTC string with milliseconds. Query parameters are part of requestPath. CCXT's deepcoin class requires apiKey, secret and password and implements this signer.

Is there a DeepCoin testnet I can use with setSandboxMode? No. CCXT's DeepCoin class declares no sandbox because DeepCoin does not publish testnet base URLs.

Can I still call DeepCoin-specific endpoints through CCXT? Yes — all 53 endpoints in the class's API block, including copy-trading, agent-rebate, internal-transfer and step-margin, are generated as implicit methods with signing and throttling applied.

Is CCXT free? Yes. MIT-licensed, including the WebSocket support.

Next steps

On this page