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

binance-nodejs

3.0.0 • Public • Published

binance-nodejs

Binance.com v3 NodeJS REST API

Install

yarn add binance-nodejs

Setup

ENV vars (used if no params provided to constructor)

BINANCE_SAFE=1              // Read-only mode
BINANCE_TESTNET=1           // Testnet
BINANCE_KEY=key_here        // API Key
BINANCE_SECRET=secret_here  // API Secret

Import

import { REST } from 'binance-nodejs'

REST

Constructor

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

Documentation https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md

const info = await rest.exchangeInfo()

GET /api/v3/ticker/price

rest.ticker_price({ symbol: 'BTCUSDT' })

POST /api/v3/order

const res = await rest.order(
    {
      symbol: 'BTCUSDT',
      side: 'BUY',
      type: 'MARKET',
      quantity: .1,
    },
    'POST'
  )

Install

npm i binance-nodejs

DownloadsWeekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

7.01 kB

Total Files

4

Last publish

Collaborators

  • avatar