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

Fixes #477 and #834 #854

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions node-binance-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2062,7 +2062,7 @@ let api = function Binance( options = {} ) {
if ( Binance.options.execution_callback ) Binance.options.execution_callback( data );
} else if ( type === 'listStatus' ) {
if ( Binance.options.list_status_callback ) Binance.options.list_status_callback( data );
} else if ( type === 'outboundAccountPosition' ) {
} else if ( type === 'outboundAccountPosition' || type === 'balanceUpdate' ) {
Binance.options.balance_callback( data );
} else {
Binance.options.log( 'Unexpected userData: ' + type );
Expand All @@ -2082,7 +2082,7 @@ let api = function Binance( options = {} ) {
if ( Binance.options.margin_execution_callback ) Binance.options.margin_execution_callback( data );
} else if ( type === 'listStatus' ) {
if ( Binance.options.margin_list_status_callback ) Binance.options.margin_list_status_callback( data );
} else if ( type === 'outboundAccountPosition' || type === 'balanceUpdate') {
} else if ( type === 'outboundAccountPosition' || type === 'balanceUpdate' ) {
Binance.options.margin_balance_callback( data );
} else {
Binance.options.log( 'Unexpected userMarginData: ' + type );
Expand Down Expand Up @@ -5347,7 +5347,7 @@ let api = function Binance( options = {} ) {
}
}, 60 * 30 * 1000 ); // 30 minute keepalive
Binance.options.balance_callback = callback;
Binance.options.execution_callback = execution_callback ? callback : execution_callback;//This change is required to listen for Orders
Binance.options.execution_callback = execution_callback === false ? callback : execution_callback;
Binance.options.list_status_callback = list_status_callback;
const subscription = subscribe( Binance.options.listenKey, userDataHandler, reconnect );
if ( subscribed_callback ) subscribed_callback( subscription.endpoint );
Expand Down