> For the complete documentation index, see [llms.txt](https://docs.koinju.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.koinju.io/exchanges/cryptodot-com.md).

# Crypto.com Spot historical trade data

Crypto.com Spot historical trade data since 2023-10-01, available through SQL or REST in one unified schema and checked every day against Crypto.com's own data.

Koinju provides Crypto.com Spot trades and OHLCV candles for all markets since **2023-10-01**, under the exchange ID `cryptodot-com`. This page explains what that gives you compared with Crypto.com's own API, how we collect the data, and how we verify that no trades are missed.

{% hint style="info" %}
How far back you can query depends on your plan: see [Pricing](/pricing.md). Every exchange and its start date is listed on [Coverage](/data/coverage.md).
{% endhint %}

## Why use Koinju for Crypto.com data

* **Full history in one place.** Crypto.com's REST trades endpoint, which our volume check uses to add missing trades, returns up to 150 trades per request, with each request covering at most 7 days ([Crypto.com docs](https://exchange-developer.crypto.com/exchange/v1/docs/api/rest/public-get-trades)). Koinju provides it as one continuous history since 2023-10-01, aligned to UTC days and queryable for any period through SQL or REST.
* **One schema across exchanges.** Unified symbols and columns across every exchange we cover, Crypto.com included, so the same query works on all of them.
* **Checked against Crypto.com's own data.** Every day, each market's volume is compared with Crypto.com's own daily candle and any missing trades are added.
* **Faithful to Crypto.com.** Crypto.com's own trade IDs and trade times, with prices and quantities exactly as Crypto.com publishes them.

## At a glance

| Property              | Value                                                                       |
| --------------------- | --------------------------------------------------------------------------- |
| Exchange ID           | `cryptodot-com`                                                             |
| Historical data since | 2023-10-01                                                                  |
| Data types            | Public trades, OHLCV                                                        |
| Collected from        | Crypto.com's real-time WebSocket, trade channel (`trade.<instrument_name>`) |
| Volume check          | Every day, against Crypto.com's UTC daily candles                           |

## How we collect Crypto.com trades

* **Every trade, individually.** We subscribe to Crypto.com's [trade channel](https://exchange-developer.crypto.com/exchange/v1/docs/api/websocket/ws-channel-trade-instrument-name) (`trade.<instrument_name>`) for every Crypto.com Spot market listed as tradable. Each Crypto.com message carries a list of trades, and each trade is stored as its own row with Crypto.com's own trade ID.
* **New listings picked up automatically.** The market list is refreshed every minute, and new markets are subscribed without a restart.
* **Active redundancy.** Every market is collected twice, by two collectors running in parallel. If one connection drops, it reconnects and resubscribes automatically while the other keeps collecting trades. Both copies of a trade share one key (exchange, market and trade ID), so the second copy is dropped before storage, and anything missed is recovered by the checks below.
* **Crypto.com's timestamps.** A trade's `timestamp` is the trade time reported by Crypto.com, not the time we received it.
* **Exact values.** Prices and quantities are stored exactly as Crypto.com publishes them, as high-precision decimals with no rounding.

## From Crypto.com's message to your data

Each trade Crypto.com publishes is stored as one row, with Crypto.com's fields mapped to the same columns used for every exchange:

| Crypto.com field  | Koinju column | Notes                                                                    |
| ----------------- | ------------- | ------------------------------------------------------------------------ |
| `instrument_name` | `market`      | Koinju's universal symbol, for example `BTC-USDT`                        |
| `d`               | `trade_id`    | Crypto.com's own trade ID                                                |
| `p`               | `price`       | Exact decimal, no rounding                                               |
| `q`               | `quantity`    | Exact decimal, as Crypto.com publishes it                                |
| `s`               | `side`        | `buy` or `sell`: the side of the taker order, as Crypto.com publishes it |
| `t`               | `timestamp`   | Crypto.com's trade time, in milliseconds                                 |

## How we verify that no Crypto.com trades are missed

### Volume check against Crypto.com's own candles

The reference is Crypto.com's own daily candle for each UTC day. A daily candle is only final once the day has closed, so each day is checked the morning after, against Crypto.com's final figures for that day. The daily rhythm follows the reference data rather than an arbitrary time window.

1. **Compare.** Each market's volume for the UTC day is compared with Crypto.com's daily candle. Markets where our volume is lower than Crypto.com's go to step 2.
2. **Add.** For those markets, the comparison is repeated hour by hour. The trades of the hours that differ are fetched from Crypto.com's REST API, and only trades we do not already hold are added.
3. **Re-check.** The whole comparison runs again on the updated data, and any difference that remains is flagged for review.

A day is marked as checked only after all three steps complete. If any step fails, the day stays open and is retried on the next run.

## Crypto.com-specific details

* **UTC daily candles.** Crypto.com's daily candles (`1D`) start at 00:00 UTC, the same day boundaries as our daily total.
* **The exact figure compared.** The volume check compares the daily candle's `v` field, its volume ([Crypto.com docs](https://exchange-developer.crypto.com/exchange/v1/docs/api/rest/public-get-candlestick)), with the sum of the trade quantities we hold for that day.
* **Taker side.** Crypto.com's `s` field is the side of the taker order ([Crypto.com docs](https://exchange-developer.crypto.com/exchange/v1/docs/api/websocket-change-log)). We store it as `buy` or `sell`.

## Access Crypto.com data

* [Public trades](/data/public-trades.md): every trade, through SQL (`api.trade`) or REST, with `exchange = 'cryptodot-com'`.
* [OHLCV](/data/ohlcv.md): candles for every market.
* [Market list](/data/market-list.md): all `cryptodot-com` markets and their symbols.
* [How to connect](/how-to-connect.md): SQL, REST and client setup.

## FAQ

**Which side does Koinju store for a Crypto.com trade?**

The side of the taker order, from Crypto.com's `s` field, stored as `buy` or `sell`.

**Which timestamp does Koinju store?**

The trade time reported by Crypto.com.

**Which Crypto.com Spot markets are included?**

Every Spot market Crypto.com lists as tradable. The market list is refreshed every minute, so a new listing is subscribed within a minute of appearing in Crypto.com's market list.
