Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bfx-api-node-util

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bfx-api-node-util

Utilities for the Bitfinex node API

  • 1.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
553
decreased by-38.83%
Maintainers
4
Weekly downloads
 
Created
Source

Bitfinex API Utilities for Node.JS

Build Status

This repo contains minor utilities shared by the Bitfinex Node.JS API libraries.

Features

  • prepareAmount and preparePrice for making values API-compatible
  • nonce generator function
  • padCandles for handling gaps in candle data returned by the Bitfinex APIs

Installation

npm i --save bfx-api-node-util

Quickstart

const { nonce } = require('bfx-api-node-util')
const n = nonce()

// n is ready to be passed to API requests, or used as order CIDs, etc

Docs

Refer to docs/func_docs.md for JSDoc-generated API documentation

Example: Padding Candles

const { padCandles } = require('bfx-api-node-util')
const { RESTv2 } = require('bfx-api-node-rest')
const rest = new RESTv2()

const candles = await rest.candles({
  symbol: 'tBTCUSD',
  timeframe: '1m',
})

const paddedCandles = padCandles(candles, 60 * 1000)

// paddedCandles are ready to be used for processing where 0-volume candles are required

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 17 Sep 2024

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