Comparing version 0.1.24 to 0.1.25
@@ -1211,2 +1211,18 @@ var _ = require('lodash'); | ||
Incoming.prototype._DISPLAY_GROUP_LIST = function () { | ||
var version = this.dequeueInt(); | ||
var reqId = this.dequeueInt(); | ||
var list = this.dequeue(); | ||
this._emit("displayGroupList", reqId, list); | ||
}; | ||
Incoming.prototype._DISPLAY_GROUP_UPDATED = function () { | ||
var version = this.dequeueInt(); | ||
var reqId = this.dequeueInt(); | ||
var contractInfo = this.dequeue(); | ||
this._emit("displayGroupUpdated", reqId, contractInfo); | ||
}; | ||
Incoming.prototype._emit = function () { | ||
@@ -1213,0 +1229,0 @@ this._emitQueue.push(arguments); |
@@ -395,2 +395,36 @@ var assert = require('assert'); | ||
IB.prototype.queryDisplayGroups = function (reqId) { | ||
assert(_.isNumber(reqId), '"reqId" must be an integer - ' + reqId); | ||
this._send('queryDisplayGroups', reqId); | ||
return this; | ||
}; | ||
IB.prototype.updateDisplayGroup = function (reqId, contractInfo) { | ||
assert(_.isNumber(reqId), '"reqId" must be an integer - ' + reqId); | ||
assert(_.isString(contractInfo), '"contractInfo" must be an string - ' + contractInfo); | ||
this._send('updateDisplayGroup', reqId, contractInfo); | ||
return this; | ||
}; | ||
IB.prototype.subscribeToGroupEvents = function (reqId, groupId) { | ||
assert(_.isNumber(reqId), '"reqId" must be an integer - ' + reqId); | ||
assert(_.isString(groupId), '"groupId" must be an integer - ' + groupId); | ||
this._send('subscribeToGroupEvents', reqId, groupId); | ||
return this; | ||
}; | ||
IB.prototype.unsubscribeToGroupEvents = function (reqId) { | ||
assert(_.isNumber(reqId), '"reqId" must be an integer - ' + reqId); | ||
this._send('unsubscribeToGroupEvents', reqId); | ||
return this; | ||
}; | ||
// Attach constants. | ||
@@ -397,0 +431,0 @@ _.keys(C).forEach(function (key) { |
@@ -1327,3 +1327,19 @@ var _ = require('lodash'); | ||
Outgoing.prototype.queryDisplayGroups = function (reqId) { | ||
this._send(C.OUTGOING.QUERY_DISPLAY_GROUPS, 1, reqId); | ||
}; | ||
Outgoing.prototype.updateDisplayGroup = function (reqId, contractInfo) { | ||
this._send(C.OUTGOING.UPDATE_DISPLAY_GROUP, 1, reqId, contractInfo); | ||
}; | ||
Outgoing.prototype.subscribeToGroupEvents = function (reqId, groupId) { | ||
this._send(C.OUTGOING.SUBSCRIBE_TO_GROUP_EVENTS, 1, reqId, groupId); | ||
}; | ||
Outgoing.prototype.unsubscribeToGroupEvents = function (reqId) { | ||
this._send(C.OUTGOING.UNSUBSCRIBE_FROM_GROUP_EVENTS, 1, reqId); | ||
}; | ||
Outgoing.prototype.reqSecDefOptParams = function(reqId, underlyingSymbol, futFopExchange, underlyingSecType, underlyingConId) { | ||
@@ -1330,0 +1346,0 @@ if (this._controller._serverVersion < C.MIN_SERVER_VER.SEC_DEF_OPT_PARAMS_REQ) { |
{ | ||
"name": "ib", | ||
"description": "Interactive Brokers TWS (or IB Gateway) API client library for Node.js", | ||
"version": "0.1.24", | ||
"version": "0.1.25", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -95,2 +95,6 @@ [![Logo](https://raw.github.com/pilwon/node-ib/master/logo.jpg)](http://interactivebrokers.com/) | ||
.requestFA(faDataType) | ||
.queryDisplayGroups(reqId) | ||
.subscribeToGroupEvents(reqId, group) | ||
.unsubscribeToGroupEvents(reqId) | ||
.updateDisplayGroup(reqId, contract) | ||
.setServerLogLevel(logLevel) | ||
@@ -154,2 +158,4 @@ ``` | ||
.on('updatePortfolio', function (contract, position, marketPrice, marketValue, averageCost, unrealizedPNL, realizedPNL, accountName)) | ||
.on('displayGroupList', function(id, list)) | ||
.on('displayGroupUpdated', function(id, contract)) | ||
``` | ||
@@ -156,0 +162,0 @@ |
125149
3209
222