# bfx-api-node-ws1

> Legacy WSv1 transport for the Bitfinex Node API

Latest version **1.0.4** (published 2021-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install bfx-api-node-ws1
pnpm add bfx-api-node-ws1
yarn add bfx-api-node-ws1
bun add bfx-api-node-ws1
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2021-11-22 |
| First published | 2018-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7 |
| Dependencies | 5 |
| Unpacked size | 29.5 KB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Bitfinex |
| Maintainers | bitfinexorg, vigan-abd, prdn |
| Keywords | bitfinex, bitcoin, BTC |

## Links

- npm: https://www.npmjs.com/package/bfx-api-node-ws1
- Repository: https://github.com/bitfinexcom/bfx-api-node-ws1
- Homepage: https://github.com/bitfinexcom/bfx-api-node-ws1#readme
- Issues: https://github.com/bitfinexcom/bfx-api-node-ws1/issues
- npm.io page: https://npm.io/package/bfx-api-node-ws1

## Dependencies (5)

- [ws](https://npm.io/package/ws.md) 3.0.0
- [debug](https://npm.io/package/debug.md) 4.1.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [bluebird](https://npm.io/package/bluebird.md) 3.5.5
- [bfx-api-node-util](https://npm.io/package/bfx-api-node-util.md) ^1.0.10

## Recent versions

- 1.0.4 (latest) — 2021-11-22
- 1.0.3 — 2020-02-26
- 1.0.2 — 2019-10-10
- 1.0.1 — 2019-09-26
- 1.0.0 — 2018-10-12

## README

# Bitfinex WSv1 Reference Implementation for Node.JS

[![Build Status](https://travis-ci.org/bitfinexcom/bfx-api-node-ws1.svg?branch=master)](https://travis-ci.org/bitfinexcom/bfx-api-node-ws1)

This repo contains the reference implementation for version 1 of the websocket Bitfinex API. It is deprecated in favour of version 2, and should no longer be used.

For the version 2 API library, see [bitfinex-api-node](https://github.com/bitfinexcom/bitfinex-api-node)

### Features

* Emits API data as events from the class instance
* Provides methods for channel management & listening to incoming data

### Installation

```bash
npm i --save bfx-api-node-ws1
```

### Quickstart & Example

```js
const WSv1 = require('bfx-api-node-ws1')
const ws = new WSv1()

ws.open()

ws.on('open', () => {
  ws.subscribeTrades('BTCUSD')
})

ws.on('trades', (pair, trade) => {
  console.log(JSON.stringify({ pair, trade }, null, 2))
})
```

### Docs

For JSDoc-generated API documentation, [see `docs/ws1.md`](/docs/ws1.md)

### Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

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