Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@
> [!TIP]
> Upcoming change: As part of the [Siebly.io](https://siebly.io/) brand, this SDK is now hosted under our [Siebly.io GitHub organisation](https://github.com/sieblyio). The migration is seamless and requires no user changes.

Updated & performant JavaScript & Node.js SDK for the Binance REST APIs and WebSockets:
Updated & performant JavaScript & Node.js SDK for the Binance REST APIs and WebSockets.

Spot user data stream (listen key is created and kept alive for you):

```javascript
import { WebsocketClient } from 'binance';
const ws = new WebsocketClient({ api_key: 'key', api_secret: 'secret' });
ws.on('formattedMessage', (data) => console.log(data));
ws.subscribeSpotUserDataStream();
```

- Professional, robust & performant Binance SDK with leading trading volume in production (livenet).
- Extensive integration with Binance REST APIs, WebSockets & WebSocket APIs.
Expand Down
525 changes: 264 additions & 261 deletions docs/endpointFunctionList.md

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions examples/apidoc/MainClient/closeMarginUserDataListenKeyV2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { MainClient } from 'binance';
// or, if require is preferred:
// const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v2/margin/listen-key
// METHOD: DELETE
// PUBLIC: YES

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.closeMarginUserDataListenKeyV2(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
22 changes: 22 additions & 0 deletions examples/apidoc/MainClient/getMarginUserDataListenKeyV2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { MainClient } from 'binance';
// or, if require is preferred:
// const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v2/margin/listen-key
// METHOD: POST
// PUBLIC: YES

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.getMarginUserDataListenKeyV2(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
22 changes: 22 additions & 0 deletions examples/apidoc/MainClient/keepAliveMarginUserDataListenKeyV2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { MainClient } from 'binance';
// or, if require is preferred:
// const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v2/margin/listen-key?listenKey=${listenKey}
// METHOD: PUT
// PUBLIC: YES

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.keepAliveMarginUserDataListenKeyV2(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Loading
Loading