Comparing version 0.1.9 to 0.1.10
@@ -6,2 +6,3 @@ exports.VERSION = 'twsapi_macunix.970.01'; | ||
exports.DEFAULT_CLIENT_ID = 0; | ||
exports.MAX_REQ_PER_SECOND = 40; | ||
@@ -8,0 +9,0 @@ exports.CLIENT_VERSION = 62; |
exports.combo = require('./combo'); | ||
exports.forex = require('./forex'); | ||
exports.future = require('./future'); | ||
exports.fop = require('./fop'); | ||
exports.option = require('./option'); | ||
exports.stock = require('./stock'); | ||
exports.cfd = require('./cfd'); | ||
exports.index = require('./ind'); |
@@ -765,3 +765,2 @@ var _ = require('lodash'); | ||
var algoParamsCount; | ||
var tagValue; | ||
@@ -768,0 +767,0 @@ if (version >= 21) { |
@@ -5,1 +5,2 @@ exports.limit = require('./limit'); | ||
exports.stopLimit = require('./stopLimit'); | ||
exports.marketClose = require('./marketClose'); |
@@ -7,3 +7,3 @@ var assert = require('assert'); | ||
assert(_.isString(action), 'Action must be a string.'); | ||
assert(_.isNumber(quantity), 'Quantity must be a string.'); | ||
assert(_.isNumber(quantity), 'Quantity must be a number.'); | ||
assert(_.isNumber(price), 'Price must be a number.'); | ||
@@ -10,0 +10,0 @@ |
var _ = require('lodash'); | ||
var rateLimit = require('function-rate-limit'); | ||
var C = require('./constants'); | ||
@@ -17,6 +19,6 @@ | ||
Outgoing.prototype._send = function () { | ||
Outgoing.prototype._send = rateLimit(C.MAX_REQ_PER_SECOND, 1000, function () { | ||
var args = Array.prototype.slice.call(arguments); | ||
this._controller.run('send', _.flatten(args)); | ||
}; | ||
}); | ||
@@ -23,0 +25,0 @@ Outgoing.prototype.calculateImpliedVolatility = function (reqId, contract, optionPrice, underPrice) { |
{ | ||
"name": "ib", | ||
"description": "Interactive Brokers TWS (or IB Gateway) API client library for Node.js", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"license": "MIT", | ||
@@ -44,3 +44,4 @@ "author": { | ||
"command-buffer": "0.1.0", | ||
"lodash": "4.6.1" | ||
"lodash": "4.6.1", | ||
"function-rate-limit": "1.1.0" | ||
}, | ||
@@ -47,0 +48,0 @@ "devDependencies": { |
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
113009
26
2952
3
+ Addedfunction-rate-limit@1.1.0
+ Addedfunction-rate-limit@1.1.0(transitive)