deribit-nodejs
v2.1.0
Published
Deribit.com NodeJS with WebSocket support
Downloads
7
Readme
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)