@taichunmin/bitfinex
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

@taichunmin/bitfinex

An unofficial implementation of the Bitfinex REST APIs written in TypeScript.

DocumentationReference

npm version jsdelivr hits Build status Coverage Status install size npm bundle size npm downloads GitHub contributors Known vulnerabilities MIT License

Installation

# npm
npm i --save @taichunmin/bitfinex

# yarn
yarn add @taichunmin/bitfinex

Quickstart

const { Bitfinex } = require('@taichunmin/bitfinex')

// For public endpoints
console.log(await Bitfinex.v2PlatformStatus())
// { status: 1 }

// For authenticated endpoints
const bitfinex = new Bitfinex({ apiKey: 'apiKey', apiSecret: 'apiSecret' })
console.log(await bitfinex.v2AuthReadPermissions())
/* {
  account: { read: false, write: false },
  history: { read: true, write: false },
  orders: { read: false, write: false },
  positions: { read: false, write: false },
  funding: { read: true, write: true },
  settings: { read: false, write: false },
  wallets: { read: true, write: false },
  withdraw: { read: false, write: false },
  ui_withdraw: { read: false, write: false },
  bfxpay: { read: false, write: false },
  eaas_agreement: { read: false, write: false },
  eaas_withdraw: { read: false, write: false },
  eaas_deposit: { read: false, write: false },
  eaas_brokerage: { read: false, write: false }
} */

Docs

FAQ

nonce too small

I make multiple parallel request and I receive an error that the nonce is too small. What does it mean?

Nonces are used to guard against replay attacks. When multiple HTTP requests arrive at the API with the wrong nonce, e.g. because of an async timing issue, the API will reject the request.

If you need to go parallel, you have to use multiple API keys right now.

Readme

Keywords

Package Sidebar

Install

npm i @taichunmin/bitfinex

Weekly Downloads

6

Version

0.0.11

License

MIT

Unpacked Size

36.9 MB

Total Files

39

Last publish

Collaborators

  • taichunmin