Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stoqey/ib

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stoqey/ib - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

14

dist/incoming.js

@@ -56,6 +56,12 @@ "use strict";

//FIXME need to fix the version check once v100 is implemented in issue #3
//const unrealizedPnL = this.dequeueFloat();
/* if (m_serverVersion >= EClient.MIN_SERVER_VER_UNREALIZED_PNL) {
unrealizedPnL = readDouble();
} */
/*
let unrealizedPnL = Number.MAX_VALUE;
let realizedPnL = Number.MAX_VALUE;
if (m_serverVersion >= EClient.MIN_SERVER_VER_UNREALIZED_PNL) {
unrealizedPnL = readDouble();
}
if (m_serverVersion >= EClient.MIN_SERVER_VER_REALIZED_PNL) {
realizedPnL = readDouble();
}
*/
this._emit('pnl', reqId, dailyPnL);

@@ -62,0 +68,0 @@ };

@@ -77,4 +77,4 @@ /// <reference types="node" />

reqPositions: () => any;
reqPnl: (reqId: any, account: any, modelCode: any) => void;
cancelPnl: (reqId: any) => any;
reqPnL: (reqId: any, account: any, modelCode: any) => void;
cancelPnL: (reqId: any) => any;
reqPositionsMulti: (reqId: any, account: any, modelCode: any) => any;

@@ -81,0 +81,0 @@ reqRealTimeBars: (tickerId: any, contract: any, barSize: any, whatToShow: any, useRTH: any) => any;

@@ -308,11 +308,11 @@ "use strict";

// public synchronized void reqPnL(int reqId, String account, String modelCode) {
_this.reqPnl = function (reqId, account, modelCode) {
_this.reqPnL = function (reqId, account, modelCode) {
assert_1.default(lodash_1.default.isNumber(reqId), '"reqId" must be an integer - ' + reqId);
assert_1.default(lodash_1.default.isString(account), '"account" must be a string - ' + account);
assert_1.default(lodash_1.default.isString(modelCode) || lodash_1.default.isNull(modelCode), '"modelCode" must be a string or null - ' + modelCode);
this._send('reqPnl', reqId, account, modelCode);
this._send('reqPnL', reqId, account, modelCode);
};
_this.cancelPnl = function (reqId) {
_this.cancelPnL = function (reqId) {
assert_1.default(lodash_1.default.isNumber(reqId), '"reqId" must be an integer - ' + reqId);
this._send('cancelPnl', reqId);
this._send('cancelPnL', reqId);
return this;

@@ -319,0 +319,0 @@ };

@@ -642,3 +642,3 @@ "use strict";

};
Outgoing.prototype.reqPnl = function (reqId, account, modelCode) {
Outgoing.prototype.reqPnL = function (reqId, account, modelCode) {
//FIXME when #3 is done we should reinstate this check

@@ -650,3 +650,3 @@ /* if (this._controller._serverVersion < C.MIN_SERVER_VER.PNL) {

};
Outgoing.prototype.cancelPnl = function (reqId) {
Outgoing.prototype.cancelPnL = function (reqId) {
//FIXME when #3 is done we should check server version

@@ -653,0 +653,0 @@ this._send(constants_1.default.OUTGOING.CANCEL_PNL, reqId);

@@ -20,6 +20,6 @@ "use strict";

var reqId = 123456;
ib.reqPnl(reqId, 'U1234567', null);
ib.reqPnL(reqId, 'U1234567', null);
setTimeout(function () {
console.log("canceling pnl");
ib.cancelPnl(reqId);
ib.cancelPnL(reqId);
console.log("sent cancel for pnl");

@@ -26,0 +26,0 @@ console.log("about to disconnect");

{
"name": "@stoqey/ib",
"private": false,
"version": "0.1.2",
"version": "0.1.3",
"description": "Interactive Brokers TWS/IB Gateway API client library for Node.js (TS)",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

@@ -92,3 +92,3 @@

.cancelOrder(id)
.cancelPnl(reqId);
.cancelPnL(reqId);
.cancelPositions()

@@ -122,3 +122,3 @@ .cancelPositionsMulti(requestId)

.reqOpenOrders()
.reqPnl()
.reqPnL(reqId, account, modelCode)
.reqPositions()

@@ -125,0 +125,0 @@ .reqPositionsMulti(requestId, account, modelCode)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc