Skip to content
This repository was archived by the owner on Sep 9, 2023. It is now read-only.

Commit 42dd0dc

Browse files
committed
binance+us+je: add l2 options to constructors
The options for l2updateSpeed and l2snapshotSpeed were added to the constructors Binance, BinanceUs and BinanceJe clients. Prior to this commit, it required setting the property explicitly before performing a subscription.
1 parent 022663c commit 42dd0dc

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/exchanges/binance-client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class BinanceClient extends BinanceBase {
88
socketThrottleMs = 1000,
99
restThrottleMs = 1000,
1010
watcherMs,
11+
l2updateSpeed,
12+
l2snapshotSpeed,
1113
} = {}) {
1214
super({
1315
name: "Binance",
@@ -19,6 +21,8 @@ class BinanceClient extends BinanceBase {
1921
socketThrottleMs,
2022
restThrottleMs,
2123
watcherMs,
24+
l2updateSpeed,
25+
l2snapshotSpeed,
2226
});
2327
}
2428
}

src/exchanges/binanceje-client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class BinanceJeClient extends BinanceBase {
88
socketThrottleMs = 1000,
99
restThrottleMs = 1000,
1010
watcherMs,
11+
l2updateSpeed,
12+
l2snapshotSpeed,
1113
} = {}) {
1214
super({
1315
name: "BinanceJe",
@@ -19,6 +21,8 @@ class BinanceJeClient extends BinanceBase {
1921
socketThrottleMs,
2022
restThrottleMs,
2123
watcherMs,
24+
l2updateSpeed,
25+
l2snapshotSpeed,
2226
});
2327
}
2428
}

src/exchanges/binanceus-client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class BinanceUSClient extends BinanceBase {
88
socketThrottleMs = 1000,
99
restThrottleMs = 1000,
1010
watcherMs,
11+
l2updateSpeed,
12+
l2snapshotSpeed,
1113
} = {}) {
1214
super({
1315
name: "BinanceUS",
@@ -19,6 +21,8 @@ class BinanceUSClient extends BinanceBase {
1921
socketThrottleMs,
2022
restThrottleMs,
2123
watcherMs,
24+
l2updateSpeed,
25+
l2snapshotSpeed,
2226
});
2327
}
2428
}

0 commit comments

Comments
 (0)