# ftx-ws

> FTX ws connector

Latest version **0.0.1** (published 2020-05-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install ftx-ws
pnpm add ftx-ws
yarn add ftx-ws
bun add ftx-ws
```

## 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.0.1 |
| Published | 2020-05-01 |
| First published | 2020-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shubham Singh |
| Maintainers | zenshubham |
| Keywords | bitcoin, trading, crypto, exchange, profit, ftx, websocket |

## Links

- npm: https://www.npmjs.com/package/ftx-ws
- Repository: github.com/zenshubham/ftx-ws
- npm.io page: https://npm.io/package/ftx-ws

## Dependencies (1)

- [ws](https://npm.io/package/ws.md) ^7.1.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.0.1 (latest) — 2020-05-01

## README

# ftx-api-ws

    npm install ftx-ws

API wrapper for the [FTX WS API](https://docs.ftx.com/#ws-api). Please refer to [their documentation](https://docs.ftx.com/#ws-api) for eveything explained. Check out `sample.js` for lib usage.

# Sample
```
const FTXWs = require('ftx-ws');

// including private channels:
// const ftx = new FTXWs({
//   key: 'x',
//   secret: 'y',
//   subaccount: 'z'
// })

// only public channels:
const ftx = new FTXWs();

const go = async () => {
  await ftx.connect();

  ftx.subscribe('ticker', 'BTC-PERP');
  ftx.on('BTC-PERP::ticker', console.log);

  if you passed api credentials:
  ftx.subscribe('fills');
  ftx.on('fills', console.log);

  if you want to know when the status of underlying socket changes
  ftx.on('statusChange', console.log);
}

go();
```

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