New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bfx-hf-util

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bfx-hf-util

HF utilities

  • 1.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
89
increased by48.33%
Maintainers
1
Weekly downloads
 
Created
Source

Bitfinex Honey Framework Utilities

Build Status

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

npm i --save bfx-hf-util

Quickstart

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

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

Keywords

FAQs

Package last updated on 09 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc