https://github.com/bitfinexcom/bfx-api-node-ws1
https://github.com/bitfinexcom/bfx-api-node-ws1
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bitfinexcom/bfx-api-node-ws1
- Owner: bitfinexcom
- License: mit
- Created: 2018-08-23T14:58:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-10-02T18:35:09.000Z (over 2 years ago)
- Last Synced: 2025-04-11T06:13:38.506Z (about 1 year ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 2
- Watchers: 6
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE.md
Awesome Lists containing this project
README
# Bitfinex WSv1 Reference Implementation for Node.JS
[](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