# kucoin.websocket

> kucoin websocket api utils

Latest version **0.1.2** (published 2018-10-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install kucoin.websocket
pnpm add kucoin.websocket
yarn add kucoin.websocket
bun add kucoin.websocket
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2018-10-07 |
| First published | 2018-10-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 148 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | vitace |
| Keywords | crypto-exchanges-gateway, exchanges, cryptocurrency, kucoin, websocket, api |

## Links

- npm: https://www.npmjs.com/package/kucoin.websocket
- Repository: https://github.com/qhxin/kucoin.websocket
- Homepage: https://github.com/qhxin/kucoin.websocket#readme
- Issues: https://github.com/qhxin/kucoin.websocket/issues
- npm.io page: https://npm.io/package/kucoin.websocket

## Dependencies (11)

- [qs](https://npm.io/package/qs.md) ^6.5.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [moment](https://npm.io/package/moment.md) ^2.22.2
- [dva-core](https://npm.io/package/dva-core.md) ^1.4.0
- [form-data](https://npm.io/package/form-data.md) ^2.3.2
- [socket.io](https://npm.io/package/socket.io.md) ^2.1.1
- [decimal.js](https://npm.io/package/decimal.js.md) ^10.0.1
- [es6-promise](https://npm.io/package/es6-promise.md) ^4.2.5
- [path-to-regexp](https://npm.io/package/path-to-regexp.md) ^2.4.0
- [dva-model-extend](https://npm.io/package/dva-model-extend.md) ^0.1.2
- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^2.2.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2018-10-07
- 0.1.1 — 2018-10-06
- 0.1.0 — 2018-10-06

## README

# kucoin.websocket

This is a websocket library for KuCoin's open market datas. Don't need any API secrets or Auth tokens.

## Install

Npm: `npm install --save kucoin.websocket`

Or you can clone the codes from git and direct import to your demo.

## Usage

```
// import from package
import kucoinWs from 'kucoin.websocket';

// initialize
const app = kucoinWs();

// start
app.start();

// use state
const state = app._store.getState();
```

## Runtime

This Lib using dva-core and it provides a Redux Store to outside programs, no UI or Browser specific codes, so it can work on Node.js and Browsers. If you know how to use dva model and even redux-saga, it's better for you to fork and change models for yourself.

## Develop

### Step1.

clone from git

### Step2.

Change demo codes then `npm run demo`. Or write your codes and rebuild.

### Step3.

`npm run build`

# kucoin.websocket

这是一个使用 websocket 获取 KuCoin 公开市场数据的库。由于使用的是公开接口，所以不需要任何 API 密钥或者其他身份认证的 token。

## 安装

Npm: `npm install --save kucoin.websocket`

你也可以从 git 上克隆代码到你的项目里直接引用。使用方式参考demo。

## 使用

```
// import from package
import kucoinWs from 'kucoin.websocket';

// initialize
const app = kucoinWs();

// start
app.start();

// use state
const state = app._store.getState();
```

## 运行环境

这个库主要依赖 dva-core，它提供了一个 Redux Store 作为一个数据源，这个库就是负责通过 websocket 来更新这个数据源。所以你可以在外部程序直接使用这个库提供的 state，它没有其他 UI 或者浏览器相关的代码，你可以在 Node.js 或者浏览器环境使用这个库。如果你有 dva 的模型使用经验或者 redux-saga 的使用经验，可以 fork 这个库来添加自己需要的逻辑。

## 开发

### Step1.

从 git 克隆代码；

### Step2.

更改自带的 demo 的代码然后运行 `npm run demo`。 或者如果你有更多的改动，随便怎么改都行。

### Step3.

`npm run build`

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