Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.10.0: fix(#402) ws diff book depth update speed for futures. Change default update speed to 100ms. #403

Merged
merged 1 commit into from
Feb 14, 2024
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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "binance",
"version": "2.9.6",
"version": "2.10.0",
"description": "Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
9 changes: 7 additions & 2 deletions src/websocket-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1593,11 +1593,16 @@ export class WebsocketClient extends EventEmitter {
}

/**
* Subscribe to spot orderbook depth updates to locally manage an order book.
* Subscribe to orderbook depth updates to locally manage an order book.
*
* Note that the updatems parameter depends on which market you're trading
*
* - Spot: https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
* - USDM Futures: https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
*/
public subscribeDiffBookDepth(
symbol: string,
updateMs: 1000 | 100 = 1000,
updateMs: 100 | 250 | 500 | 1000 = 100,
market: 'spot' | 'usdm' | 'coinm',
forceNewConnection?: boolean,
): WebSocket {
Expand Down