1.0.3 • Published 3 years ago

@blueoceancomputing/binance-sdk v1.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

Binance-SDK

This package provides a wrapper around the Binance spot API, and conducts all the requests via axios. The specification for the API can be found here.

Installation

The package can be installed either by NPM or yarn using the respective command:

npm install @blueoceancomputing/binance-sdk
yarn add @blueoceancomputing/binance-sdk

Initialisation

The following section will detail how to get set up with the client, and explain where to obtain resource.

import BinanceClient from '@blueoceancomputing/binance-sdk';

const client = new BinanceClient().options({
  endpoint: Endpoint.PRIMARY,
  apiKey: '',
  apiSecret: ''
});

Endpoint enum

Endpoint enumAPI url
PRIMARYhttps://api.binance.com
SECONDARYhttps://api1.binance.com
TERTIARYhttps://api2.binance.com
QUATERNARYhttps://api3.binance.com

API key and secret

The API key and secret can be obtained from the Binance api management dashboard located here

Example requests

Now that the client has been initilised, you can make called to the API using the client. All endpoints with parameters have typed options and validation will detail if any parameters are missing.

Ping request

client.ping().then(data => console.log(data));
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.0

3 years ago