Miss any of our Open RFC calls?Watch the recordings here! »

deribit-nodejs

2.0.7 • Public • Published

deribit-nodejs

Deribit.com v2.0.0 NodeJS REST API

Install

yarn add deribit-nodejs

Setup

ENV vars (used if no params provided to constructor)

DERIBIT_SAFE=1              // Read-only mode
DERIBIT_TESTNET=1           // Testnet
DERIBIT_KEY=key_here        // API Key
DERIBIT_SECRET=secret_here  // API Secret

Import

import { REST } from 'deribit-nodejs'

REST

Constructor

const rest = new REST(key, secret, testnet = false, timeout = 500, keepAlive = true)

Generic API calls (case-insesitive) from https://docs.deribit.com/ and https://www.deribit.com/api_console/

const res = await rest.buy({
  // no need to write private/public
  instrument: 'BTC-PERPETUAL',
  amount: 100,
  type: 'market',
  label: 'my_label',
})
rest.get_account_summary().then(console.log)

Install

npm i deribit-nodejs

DownloadsWeekly Downloads

120

Version

2.0.7

License

MIT

Unpacked Size

10.5 kB

Total Files

5

Last publish

Collaborators

  • avatar