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
8 changes: 4 additions & 4 deletions src/node-binance-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5544,7 +5544,7 @@ export default class Binance {
this.Options.balance_callback = balance_callback;
this.Options.execution_callback = execution_callback ? execution_callback : balance_callback;//This change is required to listen for Orders
this.Options.list_status_callback = list_status_callback;
const subscription = this.subscribe(this.Options.listenKey, this.userDataHandler, reconnect);
const subscription = this.subscribe(this.Options.listenKey, this.userDataHandler.bind(this), reconnect);
if (subscribed_callback) subscribed_callback(subscription.endpoint);
});
}
Expand Down Expand Up @@ -5580,7 +5580,7 @@ export default class Binance {
this.Options.margin_balance_callback = balance_callback;
this.Options.margin_execution_callback = execution_callback;
this.Options.margin_list_status_callback = list_status_callback;
const subscription = this.subscribe(this.Options.listenMarginKey, this.userMarginDataHandler, reconnect);
const subscription = this.subscribe(this.Options.listenMarginKey, this.userMarginDataHandler.bind(this), reconnect);
if (subscribed_callback) subscribed_callback(subscription.endpoint);
});
}
Expand Down Expand Up @@ -5618,7 +5618,7 @@ export default class Binance {
this.Options.future_account_update_callback = account_update_callback;
this.Options.future_account_config_update_callback = account_config_update_callback;
this.Options.future_order_update_callback = order_update_callback;
const subscription = this.futuresSubscribe(this.Options.listenFutureKey, this.userFutureDataHandler, { reconnect });
const subscription = this.futuresSubscribe(this.Options.listenFutureKey, this.userFutureDataHandler.bind(this), { reconnect });
if (subscribed_callback) subscribed_callback(subscription.endpoint);

});
Expand Down Expand Up @@ -5679,7 +5679,7 @@ export default class Binance {
this.Options.delivery_order_update_callback = order_update_callback;
const subscription = this.deliverySubscribe(
this.Options.listenDeliveryKey,
this.userDeliveryDataHandler,
this.userDeliveryDataHandler.bind(this),
{ reconnect }
);
if (subscribed_callback) subscribed_callback(subscription.endpoint);
Expand Down
1 change: 0 additions & 1 deletion tests/binance-class-live.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ describe('trades', function () {
const trades = await binance.trades('BTCUSDT');
assert(typeof (trades) === 'object', WARN_SHOULD_BE_OBJ);
assert(trades !== null, WARN_SHOULD_BE_NOT_NULL);
assert(Object.keys(trades).length === 0);

}).timeout(TIMEOUT);
});
Expand Down