# node-api-cryptocom

> Non-official implementation of Crypto.com's Exchange API's

Latest version **0.2.5** (published 2026-01-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-api-cryptocom
pnpm add node-api-cryptocom
yarn add node-api-cryptocom
bun add node-api-cryptocom
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.2.5 |
| Published | 2026-01-01 |
| First published | 2023-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 89.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Alexander-hagen |
| Maintainers | alexander-hagen |
| Keywords | cryptodotcom, tradebots.nl |

## Links

- npm: https://www.npmjs.com/package/node-api-cryptocom
- Repository: https://github.com/alexander-hagen/node-api-cryptocom
- Homepage: https://github.com/alexander-hagen/node-api-cryptocom#readme
- Issues: https://github.com/alexander-hagen/node-api-cryptocom/issues
- npm.io page: https://npm.io/package/node-api-cryptocom

## Dependencies (3)

- [ws](https://npm.io/package/ws.md) ^8.18.3
- [axios](https://npm.io/package/axios.md) ^1.11.0
- [limiter](https://npm.io/package/limiter.md) ^3.0.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.2.5 (latest) — 2026-01-01
- 0.2.4 — 2025-12-28
- 0.2.3 — 2025-10-23
- 0.2.2 — 2025-10-11
- 0.2.1 — 2025-10-11
- 0.2.0 — 2025-10-11
- 0.1.17 — 2025-09-08
- 0.1.16 — 2025-09-06
- 0.1.15 — 2025-08-13
- 0.1.14 — 2025-08-12
- 0.1.13 — 2025-08-12
- 0.1.12 — 2025-08-12
- 0.1.11 — 2025-06-10
- 0.1.10 — 2025-06-07
- 0.1.9 — 2025-06-05
- … 9 more at https://npm.io/package/node-api-cryptocom/versions

## README

# node-api-cryptocom

![Statements](https://img.shields.io/badge/statements-81%25-brightgreen.svg?style=flat) ![Branches](https://img.shields.io/badge/branches-60.19%25-yellow.svg?style=flat) ![Functions](https://img.shields.io/badge/functions-83.23%25-brightgreen.svg?style=flat) ![Lines](https://img.shields.io/badge/lines-86.35%25-brightgreen.svg?style=flat)

Non-official implementation of Crypto.com's Exchange API's. Developed for personal use.

For support on using the API's or development issues, please refer to the official API documentation. For questions regarding this package, please consult the code first.

## __PUBLIC API__

```javascript
  const cryptocom=require('node-api-cryptocom');

  const publicAPI=new cryptocom.publicApi();

```

### Market Data

| API                | DESCRIPTION                                                                                         |
| :----              | :----                                                                                               |
| getRiskParameters  | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-risk-parameters          |
| getSymbols         | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-instruments              |
| getOrderBook       | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-book                     |
| getCandles         | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-candlestick              |
| getTrades          | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-trades                   |
| getTicker          | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-tickers                  |
| getValuations      | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-valuations               |
| getSettlementPrice | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-expired-settlement-price |
| getInsurance       | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-insurance                |

## __PRIVATE API__

```javascript
  const cryptocom=require('node-api-cryptocom');

  const auth = {
    apikey: 'MY_API_KEY',
    secret: 'MY_API_SECRET'
  };

  const privateAPI=new cryptocom.privateApi(auth);

```

### Account Balance and Position API

| API                      | DESCRIPTION                                                                                        |
| :----                    | :----                                                                                              |
| getSpotBalance           | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-user-balance               |
| getSpotBalanceHistory    | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-user-balance-history       |
| getAccounts              | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-accounts               |
| createSubaccountTransfer | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-subaccount-transfer |
| getSubaccountBalance     | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-subaccount-balances    |
| getPositions             | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-positions              |

### Trading API

| API              | DESCRIPTION                                                                                     |
| :----            | :----                                                                                           |
| createSpotOrder  | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order            |
| cancelSpotOrder  | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order            |
| cancelSpotOrders | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-all-orders       |
| closePosition    | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-close-position          |
| getSpotOrders    | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-open-orders         |
| getSpotOrder     | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-order-detail        |
| setLeverage      | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-change-account-leverage |
| setSettings      | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-change-account-settings |
| getSettings      | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-account-settings    |
| getAccountFees   | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-fee-rate            |
| getSymbolFees    | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-instrument-fee-rate |

### Advanced Order Management API

| API                       | DESCRIPTION                                                                                    |
| :----                     | :----                                                                                          |
| createOrderList           | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order-list-list https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order-list-oco |
| cancelOrderList           | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order-list-list https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order-list-oco |
| getOrderList              | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-order-list-oco     |

### Order, Trade, Transaction History API

| API             | DESCRIPTION                                                                               |
| :----           | :----                                                                                     |
| getOrderHistory | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-order-history |
| getTrades       | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-trades        |
| getTransactions | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-transactions  |

### Wallet API

| API                  | DESCRIPTION                                                                                    |
| :----                | :----                                                                                          |
| createWithdrawal     | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-withdrawal      |
| getCurrencyNetworks  | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-currency-networks  |
| getDepositAddress    | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-address    |
| getDepositHistory    | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-history    |
| getWithdrawalHistory | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-withdrawal-history |

### Staking API

| API                  | DESCRIPTION                                                                                             |
| :----                | :----                                                                                                   |
| stake                | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-staking-stake                   |
| unstake              | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-staking-unstake                 |
| getStakingPosition   | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-staking-get-staking-position    |
| getStakingSymbols    | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-staking-get-staking-instruments |
| getOpenStake         | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-staking-get-open-stake          |
| getStakeHistory      | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-staking-get-stake-history       |
| getRewardHistory     | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-staking-get-reward-history      |
| convert              | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-staking-convert                 |
| getOpenConvert       | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-staking-get-open-convert        |
| getConvertHistory    | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-staking-get-convert-history     |
| getConversionRate    | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-staking-get-conversion-rate      |

## __WEBSOCKET API__

```javascript
  const cryptocom=require('node-api-cryptocom');

  const auth = {
    apikey: 'MY_API_KEY',
    secret: 'MY_API_SECRET'
  };

  const marketAPI=new cryptocom.sockets.marketApi();
  marketAPI.socket._ws.on('initialized', async () => {
    // do your own initialization
  });

  const privateAPI=new cryptocom.sockets.privateApi(auth);
  privateAPI.setHandler('user.order', (method,data,symbol,option) => { updateOrders(method,data,user,api,handler); });

  privateAPI.socket._ws.on('authenticated', async () => {
    const res=await privateAPI.subscribeOrders();
  });

  privateAPI.socket._ws.on('closed', async () => {
    // do something, like clean-up and reconnect
  });

  function updateOrders(method,orders,user,api,handler) {
    // do something
  };

```

### Websocket Market API

| API                                                   | HANDLER          | DESCRIPTION |
| :----                                                 | :----            | :---- |
| subscribeOrderbook unsubscribeOrderbook               | book             | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name-depth |
| subscribeTicker unsubscribeTicker                     | ticker           | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name                 |
| subscribeTrades unsubscribeTrades                     | trade            | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name                  |
| subscribeCandles unsubscribeCandles                   | candlestick      | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#candlestick-time_frame-instrument_name |
| subscribeIndex unsubscribeIndex                       | index            | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#index-instrument_name                  |
| subscribeMarkPrices unsubscribeMarkPrices             | mark             | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#mark-instrument_name                   |
| subscribeSettlementPrices unsubscribeSettlementPrices | settlement       | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#settlement-instrument_name             |
| subscribeFunding unsubscribeFunding                   | funding          | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#funding-instrument_name                |
| subscribeEstimatedFunding unsubscribeEstimatedFunding | estimatedfunding | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#estimatedfunding-instrument_name       |

### Socket Authentication

| API                   | DESCRIPTION                                                                                      |
| :----                 | :----                                                                                            |
| login                 | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-auth                      |
| setHandler            |                                                                                                  |
| setCancelOnDisconnect | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-set-cancel-on-disconnect |
| getCancelOnDisconnect | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-cancel-on-disconnect |

### Websocket User API

| API                                                   | HANDLER               | DESCRIPTION |
| :----                                                 | :----                 | :---- |
| subscribeOrders unsubscribeOrders                     | user.order            | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-order-instrument_name |
| subscribeMyTrades unsubscribeMyTrades                 | user.trade            | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-trade-instrument_name |
| subscribeSpotBalances unsubscribeSpotBalances         | user.balance          | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-balance               |
| subscribePositions unsubscribePositions               | user.positions        | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-positions             |
| subscribeRiskStatus unsubscribeRiskStatus             | user.account_risk     | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-account_risk          |
| subscribePositionBalances unsubscribePositionBalances | user.position_balance | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-position_balance      |

### Socket Account Balance and Position API

| API                   | DESCRIPTION                                                                                     |
| :----                 | :----                                                                                           |
| getSpotBalance        | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-user-balance            |
| getPositions          | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-positions           |

### Trading API

| API                   | DESCRIPTION                                                                                     |
| :----                 | :----                                                                                           |
| createSpotOrder       | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order            |
| cancelSpotOrder       | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order            |
| cancelSpotOrders      | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-all-orders       |
| closePositions        | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-close-position          |
| getSpotOrders         | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-open-orders         |

### Advanced Order Management API

| API                   | DESCRIPTION                                                                                     |
| :----                 | :----                                                                                           |
| createOrderList       | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order-list-list https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order-list-oco |
| cancelOrderList       | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order-list-list https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order-list-oco |

### Wallet API

| API                   | DESCRIPTION                                                                                     |
| :----                 | :----                                                                                           |
| createWithdrawal      | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-withdrawal       |
| getWithdrawalHistory  | https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-withdrawal-history  |

---
_Source: https://npm.io/package/node-api-cryptocom · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
