Skip to content

Commit ce53c29

Browse files
authored
Merge pull request #604 from JJ-Cro/update14112025
feat(v3.1.4): New algo orders, minor changes
2 parents 5692d76 + 7d2823f commit ce53c29

22 files changed

+18901
-17995
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ wsClient.subscribe('btcusd@miniTicker', 'coinm');
431431

432432
// Or send many topics at once to a stream, e.g. the usdm futures stream:
433433
wsClient.subscribe(
434-
['btcusdt@aggTrade', 'btcusdt@markPrice', '!ticker@arr', '!miniTicker@arr'],
434+
['btcusdt@aggTrade', 'btcusdt@markPrice', '!miniTicker@arr'],
435435
'usdm',
436436
);
437437

docs/endpointFunctionList.md

Lines changed: 568 additions & 562 deletions
Large diffs are not rendered by default.

examples/WebSockets/ws-custom-parser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ ws.on('message', (msg) => {
3838
});
3939

4040
// Subscribe to a couple of topics
41-
ws.subscribe(['btcusdt@trade', '!ticker@arr'], 'main');
41+
// Note: '!ticker@arr' has been deprecated (2025-11-14). Using '!miniTicker@arr' instead.
42+
ws.subscribe(['btcusdt@trade', '!miniTicker@arr'], 'main');

examples/WebSockets/ws-public.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-unused-vars */
22
import {
33
DefaultLogger,
4-
isWsAggTradeFormatted,
5-
isWsFormatted24hrTicker,
6-
isWsFormatted24hrTickerArray,
7-
isWsFormattedForceOrder,
8-
isWsFormattedKline,
9-
isWsFormattedMarkPriceUpdateArray,
10-
isWsFormattedMarkPriceUpdateEvent,
11-
isWsFormattedRollingWindowTickerArray,
12-
isWsFormattedTrade,
4+
isWsDiffBookDepthEventFormatted,
135
isWsPartialBookDepthEventFormatted,
146
WebsocketClient,
157
} from '../../src';
@@ -188,9 +180,10 @@ import {
188180
// Individual Symbol Ticker Streams
189181
// https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-ticker-streams
190182
'btcusdt@ticker',
191-
// All Market Tickers Stream
183+
// All Market Tickers Stream - DEPRECATED (2025-11-14)
192184
// https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#all-market-tickers-stream
193-
'!ticker@arr',
185+
// '!ticker@arr', // DEPRECATED: Use '<symbol>@ticker' or '!miniTicker@arr' instead
186+
// Recommended alternative: '!miniTicker@arr' for all market mini tickers (already subscribed above)
194187
// Individual Symbol Rolling Window Statistics Streams
195188
// https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-rolling-window-statistics-streams
196189
'btcusdt@ticker_1h',
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { USDMClient } = require('binance');
2+
3+
// 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
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: fapi/v1/algoOrder
6+
// METHOD: DELETE
7+
// PUBLIC: NO
8+
9+
const client = new USDMClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.cancelAlgoOrder(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { USDMClient } = require('binance');
2+
3+
// 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
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: fapi/v1/algoOpenOrders
6+
// METHOD: DELETE
7+
// PUBLIC: NO
8+
9+
const client = new USDMClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.cancelAllAlgoOpenOrders(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { USDMClient } = require('binance');
2+
3+
// 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
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: fapi/v1/algoOrder
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new USDMClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.getAlgoOrder(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { USDMClient } = require('binance');
2+
3+
// 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
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: fapi/v1/allAlgoOrders
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new USDMClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.getAllAlgoOrders(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { USDMClient } = require('binance');
2+
3+
// 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
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: fapi/v1/openAlgoOrders
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new USDMClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.getOpenAlgoOrders(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { USDMClient } = require('binance');
2+
3+
// 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
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: fapi/v1/algoOrder
6+
// METHOD: POST
7+
// PUBLIC: NO
8+
9+
const client = new USDMClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.submitNewAlgoOrder(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});

0 commit comments

Comments
 (0)