https://github.com/bitfinexcom/bfx-api-node-plugin-example
https://github.com/bitfinexcom/bfx-api-node-plugin-example
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bitfinexcom/bfx-api-node-plugin-example
- Owner: bitfinexcom
- License: mit
- Created: 2018-09-07T08:24:55.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-09T11:05:46.000Z (about 6 years ago)
- Last Synced: 2025-03-23T15:41:18.549Z (about 1 year ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 3
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE.md
Awesome Lists containing this project
README
# Bitfinex Example Plugin for the Node.JS API
[](https://travis-ci.org/bitfinexcom/bfx-api-node-plugin-example)
This repo provides an example plugin compatible with `bfx-api-node-core` which logs all emitted events to the console.
### Installation
```bash
npm i --save bfx-api-node-plugin-example
```
### Quickstart & Example
```js
const { Manager } = require('bfx-api-node-core')
const ExamplePlugin = require('bfx-api-node-plugin-example')
const m = new Manager({
plugins: [ExamplePlugin()],
// ...
})
m.openWS()
```
### Docs
For a full list of supported events, [see `lib/plugin.js`](/lib/plugin.js).
For a brief executable example, [see `examples/ws2_manager_usage.js`](/examples/ws2_manager_usage.js)
For more information on plugin development, check the [node API wiki](https://github.com/bitfinexcom/bitfinex-api-node/wiki)
### 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