Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

bfx-hf-ext-plugin-bitfinex

bitfinexcom24Apache-2.01.0.7

Bitfinex exchange plugin for the Honey Framework

honey framework, bitfinex, bitcoin, BTC

readme

Bitfinex Honey Framework Exchange Plugin for Node.JS

Build Status

This is the standard Bitfinex exchange adapter for the Honey Framework, for usage with bfx-hf-algo and any consumer of bfx-hf-models. It implements Trade and Candle sync methods, along with an algo order adapter necessary for executing algo orders with bfx-hf-algo.

Features

  • Trade model sync logic
  • Candle model sync logic
  • Algo Order adapter for usage with bfx-hf-algo

Installation

npm i --save bfx-hf-ext-plugin-bitfinex

Docs

For executable examples, refer to examples/

Examples

Using the DB schema

const HFDBLowDBAdapter = require('bfx-hf-models-adapter-lowdb')
const { schema: HFDBBitfinexSchema } = require('bfx-hf-ext-plugin-bitfinex')
const HFDB = require('bfx-hf-models')

const db = new HFDB({
  schema: HFDBBitfinexSchema,
  adapter: HFDBLowDBAdapter({
    dbPath: './SOME_DB_PATH.json',
    schema: HFDBBitfinexSchema
  })
})

// db can now be used throughout the HF for data storage

Using the algo order adapter

const { AOAdapter } = require('bfx-hf-ext-plugin-bitfinex')
const AOServer = require('bfx-hf-algo-server')
const db = {} // init as specified above

const adapter = new AOAdapter({
  apiKey: '...',
  apiSecret: '...',
  withHeartbeat: true, // optionally broadcasts a heartbeat to notify the BFX UI
                       // that a bfx ao host is available for orders
})

const server = new AOServer({
  db,
  adapter,
  port: 8877,
  aos: [ /* ... */ ], // see bfx-hf-algo
})

// orders submitted to the AO server will now be routed to bitfinex

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

changelog

1.0.6

  • fix: cleanup timeouts on AOAdapter disconnect()

1.0.5

  • feature: add updateAuthArgs() to AOAdapter

1.0.4

  • fix: restart HB interval when reconnecting
  • feature: support affiliate codes

1.0.3

  • feature: add reconnect method to AO adapter

1.0.2

  • refactor: use bulkUpsert() if available when saving candles

1.0.1

  • docs: create/update

1.0.0

  • manifest: bump deps
  • meta: add github issue/pr templates
  • meta: standardize travis config
  • meta: add placeholder npm test
  • meta: add example
  • meta: add readme
  • feature: add static getTimeFrames() to ao adapter
  • feature: add sendWithAnyConnection() method to ao adapter
  • fix: ws2 manager auth event names on binding event listeners

0.1.0

  • feature: add algo order adapter
  • refactor: remove send & sendWithConnection methods

0.0.2

  • initial version