@fantasia949/ib-connector
Advanced tools
Comparing version 1.0.33 to 1.0.34
@@ -46,3 +46,3 @@ import assert from 'assert' | ||
* @property {number=} serverLogLevel | ||
* @property {number=} isMaster | ||
* @property {number=} clientId | ||
*/ | ||
@@ -137,3 +137,3 @@ | ||
if (intent === INTENT.LIVE_PORTFOLIO) { | ||
message = makeRequestSubscriptionCommand(intent, true, icFactory.portfolioConfig(this.account)) | ||
message = makeRequestSubscriptionCommand(intent, true, icFactory.portfolioConfig(this._account)) | ||
} else if (intent === INTENT.OPEN_ORDERS) { | ||
@@ -174,3 +174,3 @@ // order events are registered by default, no need to register | ||
if (intent === INTENT.LIVE_PORTFOLIO) { | ||
message = makeRequestSubscriptionCommand(intent, false, icFactory.portfolioConfig(this.account)) | ||
message = makeRequestSubscriptionCommand(intent, false, icFactory.portfolioConfig(this._account)) | ||
} else { | ||
@@ -343,3 +343,3 @@ assert(reqId, 'reqId is required to cancel this intent subscription') | ||
async getOpenOrders (all) { | ||
if (all && !this._config.isMaster) { | ||
if (all && this._config.clientId === 0) { | ||
throw new Error('Only show all orders if the client is master client') | ||
@@ -438,3 +438,4 @@ } | ||
this._onceMessageEvent(EVENT.READY, account => { | ||
this.account = account | ||
this._account = account | ||
this._orders = [] | ||
@@ -614,3 +615,3 @@ if (this._marketDataType !== undefined) { | ||
_initConnection (config) { | ||
let { username, password, isMaster, endpoint } = this._config | ||
let { username, password, clientId, endpoint } = this._config | ||
@@ -630,4 +631,4 @@ if (config.username) { | ||
if (isMaster) { | ||
params.push([ 'isMaster', isMaster ]) | ||
if (clientId) { | ||
params.push([ 'clientId', clientId ]) | ||
} | ||
@@ -634,0 +635,0 @@ |
{ | ||
"name": "@fantasia949/ib-connector", | ||
"version": "1.0.33", | ||
"version": "1.0.34", | ||
"description": "Interactive Brokers connector", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/fantasia949/IB-Connector", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100392
3596