You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

bitfinex-terminal-order-book

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitfinex-terminal-order-book

Bitfinex Terminal Order Book Service

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
2
Created
Source

bitfinex-terminal-order-book

Bitfinex Orderbook Query API

npm install bitfinex-terminal-order-book

Usage

const buyer = dazaar.buy(card)

// make sure to follow the payment guide
buyer.on('feed', function (feed) {
  const o = new Orderbook(feed)
})

See https://github.com/bitfinexcom/bitfinex-terminal for more.

Orderbook API

const o = new Orderbook(feed, [pair])

Create a new orderbook. feed should be a Hypercore and pair is the string key identifying the order book pair. You only need to pass in pair if you plan to append to the feed.

When using Dazaar, you'd get the feed from the feed event.

buyer.on('feed', function (feed) {
  const o = new Orderbook(feed)
})

const book = await o.get(timestamp)

Will find the first orderbook snapshot >= than the timestamp.

const stream = o.createReadStream([options])

Make a stream of snapshots. Options include:

{
  gte: <timestamp> // find timestamps greater or equal to this
  le: <timestamp>, // find timestamps less than this
  limit: <number>, // how many to get at max?
  live: <bool> // keep the stream open?
}

The stream is also async iterable.

const { pair } = await o.info()

Get metadata about the orderbook. pair is the currency pair for it.

const book = await o.latest()

Get the latest entry added.

FAQs

Package last updated on 21 Apr 2021

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