# bfx-hf-util

> HF utilities

Latest version **1.0.11** (published 2020-08-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install bfx-hf-util
pnpm add bfx-hf-util
yarn add bfx-hf-util
bun add bfx-hf-util
```

## 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.11 |
| Published | 2020-08-25 |
| First published | 2018-10-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 31.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Cris Mihalache |
| Maintainers | jacob_plaster |
| Keywords | honey framework, bitfinex, bitcoin, BTC |

## Links

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

## Dependencies (4)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.10
- [bluebird](https://npm.io/package/bluebird.md) ^3.7.2
- [stackman](https://npm.io/package/stackman.md) ^4.0.0

## Recent versions

- 1.0.11 (latest) — 2020-08-25
- 1.0.10 — 2020-08-24
- 1.0.9 — 2020-03-31
- 1.0.8 — 2020-03-30
- 1.0.6 — 2020-03-09
- 1.0.5 — 2019-12-19
- 1.0.4 — 2019-10-11
- 1.0.1 — 2018-10-19
- 1.0.0 — 2018-10-17

## README

## Bitfinex Honey Framework Utilities

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

This library hosts a set of utility functions used throughout the Bitfinex Honey Framework & API Libraries.

### Features

* Logic for processing Bitfinex candle data
* Helper for catching uncaught errors (`require('bfx-hf-util/lib/catch_uncaught_errors)`)

### Installation

```bash
npm i --save bfx-hf-util
```

### Quickstart

```js
const { preprocessRemoteCandles } = require('bfx-hf-util')
const { RESTv2 } = require('bfx-api-node-rest')

const rest = new RESTv2()
const candles = await rest.candles({
  timeframe: '1m',
  symbol: 'tBTCUSD',
  query: {
    start: Date.now() - (24 * 60 * 60 * 1000),
    end: Date.now(),
    sort: 1,
  }
})

// Fill in empty candles to generate a consistent dataset
const processedCandles = preprocessRemoteCandles('1m', candles)

// Do something with data
processCandles.forEach(candle => console.log(JSON.stringify(candle)))
```

### Docs

For JSDoc-generated API documentation, [refer to `docs/api.md`](/docs/api.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

### Note

This package will be maintained only via github, please use latest relases from github instead of npm.

Example on how to install specific version from github:
```
npm i --save-prod https://github.com/bitfinexcom/bfx-hf-util.git#v1.0.11
```

Example on how to install it latest version from github:
```
npm i --save-prod https://github.com/bitfinexcom/bfx-hf-util.git
```

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