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

investors-exchange.api

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

investors-exchange.api - npm Package Compare versions

Comparing version 0.0.25 to 0.0.26

2

distribution/index.js

@@ -1,1 +0,1 @@

'use strict';var _classCallCheck2=require('babel-runtime/helpers/classCallCheck'),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_reference=require('./reference'),_reference2=_interopRequireDefault(_reference),_stock=require('./stock'),_stock2=_interopRequireDefault(_stock);Object.defineProperty(exports,'__esModule',{value:!0});function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var IEX=function a(){(0,_classCallCheck3.default)(this,a)};IEX.market=(0,_stock2.default)(),IEX.reference=_reference2.default,IEX.stock=_stock2.default,exports.default=IEX;
'use strict';var _classCallCheck2=require('babel-runtime/helpers/classCallCheck'),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_lib=require('./lib'),_reference=require('./reference'),_reference2=_interopRequireDefault(_reference),_stock=require('./stock'),_stock2=_interopRequireDefault(_stock);Object.defineProperty(exports,'__esModule',{value:!0});function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var IEX=function a(){(0,_classCallCheck3.default)(this,a)};IEX.fetch=_lib.fetch,IEX.market=(0,_stock2.default)(),IEX.reference=_reference2.default,IEX.stock=_stock2.default,exports.default=IEX;

@@ -1,1 +0,1 @@

'use strict';var _typeof2=require('babel-runtime/helpers/typeof'),_typeof3=_interopRequireDefault(_typeof2),_regenerator=require('babel-runtime/regenerator'),_regenerator2=_interopRequireDefault(_regenerator),_slicedToArray2=require('babel-runtime/helpers/slicedToArray'),_slicedToArray3=_interopRequireDefault(_slicedToArray2),_asyncToGenerator2=require('babel-runtime/helpers/asyncToGenerator'),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_axios=require('axios'),_axios2=_interopRequireDefault(_axios);Object.defineProperty(exports,'__esModule',{value:!0}),exports.notAnObject=exports.fetch=void 0;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var base='https://api.iextrading.com/1.0',fetch=exports.fetch=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b,c,d){var e,f,g;return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=d?Object.entries(d):'',f=e?e.reduce(function(a,b,c){var d=(0,_slicedToArray3.default)(b,2),e=d[0],f=d[1];return''+a+(0<c?'&':'')+e+'='+f},'?'):'',g='https://api.iextrading.com/1.0'+c+f,a.next=5,_axios2.default.get(g);case 5:return a.abrupt('return',a.sent.data);case 6:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),isArray=function(a){return a&&Array.isArray(a)},isNumber=function(a){return a&&!isNaN(+a)},notAnObject=exports.notAnObject=function(a){return'object'!==('undefined'==typeof a?'undefined':(0,_typeof3.default)(a))||Array.isArray(a)};
'use strict';var _typeof2=require('babel-runtime/helpers/typeof'),_typeof3=_interopRequireDefault(_typeof2),_regenerator=require('babel-runtime/regenerator'),_regenerator2=_interopRequireDefault(_regenerator),_slicedToArray2=require('babel-runtime/helpers/slicedToArray'),_slicedToArray3=_interopRequireDefault(_slicedToArray2),_asyncToGenerator2=require('babel-runtime/helpers/asyncToGenerator'),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_axios=require('axios'),_axios2=_interopRequireDefault(_axios);Object.defineProperty(exports,'__esModule',{value:!0}),exports.notAnObject=exports.fetch=void 0;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var base='https://api.iextrading.com/1.0',fetch=exports.fetch=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b,c){var d,e,f;return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return d=c?Object.entries(c):'',e=d?d.reduce(function(a,b,c){var d=(0,_slicedToArray3.default)(b,2),e=d[0],f=d[1];return''+a+(0<c?'&':'')+e+'='+f},'?'):'',f='https://api.iextrading.com/1.0'+b+e,a.next=5,_axios2.default.get(f);case 5:return a.abrupt('return',a.sent.data);case 6:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),isArray=function(a){return a&&Array.isArray(a)},isNumber=function(a){return a&&!isNaN(+a)},notAnObject=exports.notAnObject=function(a){return'object'!==('undefined'==typeof a?'undefined':(0,_typeof3.default)(a))||Array.isArray(a)};

@@ -1,1 +0,1 @@

'use strict';var _regenerator=require('babel-runtime/regenerator'),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require('babel-runtime/helpers/asyncToGenerator'),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_lib=require('../lib');Object.defineProperty(exports,'__esModule',{value:!0});function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var path=function(a){return'/ref-data'+a},reference={};reference.corporate_actions=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_lib.fetch)('corporate_actions',path('/daily-list/corporate-actions'+(b?'/'+b:'')));case 2:return a.abrupt('return',a.sent);case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),reference.dividends=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_lib.fetch)('dividends',path('/daily-list/dividends'+(b?'/'+b:'')));case 2:return a.abrupt('return',a.sent);case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),reference.next_day_ex_date=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_lib.fetch)('next_day_ex_date',path('/daily-list/next-day-ex-date'+(b?'/'+b:'')));case 2:return a.abrupt('return',a.sent);case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),reference.symbols=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_lib.fetch)('symbols',path('/symbols'),b&&{csv:b});case 2:return a.abrupt('return',a.sent);case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),reference.symbol_directory=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_lib.fetch)('symbol_directory',path('/daily-list/symbol-directory'+(b?'/'+b:'')));case 2:return a.abrupt('return',a.sent);case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),exports.default=reference;
'use strict';var _regenerator=require('babel-runtime/regenerator'),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require('babel-runtime/helpers/asyncToGenerator'),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_lib=require('../lib');Object.defineProperty(exports,'__esModule',{value:!0});function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var path=function(a){return'/ref-data'+a},reference={};reference.corporate_actions=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_lib.fetch)(path('/daily-list/corporate-actions'+(b?'/'+b:'')));case 2:return a.abrupt('return',a.sent);case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),reference.dividends=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_lib.fetch)(path('/daily-list/dividends'+(b?'/'+b:'')));case 2:return a.abrupt('return',a.sent);case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),reference.next_day_ex_date=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_lib.fetch)(path('/daily-list/next-day-ex-date'+(b?'/'+b:'')));case 2:return a.abrupt('return',a.sent);case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),reference.symbols=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){var c=b.format,d=c===void 0?'json':c;return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_lib.fetch)(path('/symbols'),{format:d});case 2:return a.abrupt('return',a.sent);case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),reference.symbol_directory=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_lib.fetch)(path('/daily-list/symbol-directory'+(b?'/'+b:'')));case 2:return a.abrupt('return',a.sent);case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),exports.default=reference;

@@ -1,1 +0,1 @@

'use strict';var _extends2=require('babel-runtime/helpers/extends'),_extends3=_interopRequireDefault(_extends2),_regenerator=require('babel-runtime/regenerator'),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require('babel-runtime/helpers/asyncToGenerator'),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_classCallCheck2=require('babel-runtime/helpers/classCallCheck'),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_lib=require('../lib');Object.defineProperty(exports,'__esModule',{value:!0});function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var stock=function a(){(0,_classCallCheck3.default)(this,a),_initialiseProps.call(this);for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=c[0],f=void 0===e?'market':e;return this.symbol=f.toLowerCase(),this},_initialiseProps=function(){var a=this;this.book=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('book','/book');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.chart=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('chart','/chart/'+(d?d.join('/'):'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.company=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('company','/company');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.crypto=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('crypto','/crypto');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.delayed_quote=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.quote({delayed:!0,percent:c});case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.dividends=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('dividends','/dividends/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.earnings=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('earnings','/earnings');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.financials=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('financials','/financials');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.handle=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c,d,e){var f,g;return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return f=a.path,g=a.symbol,b.next=3,(0,_lib.fetch)(c,f(d),e);case 3:return b.abrupt('return',b.sent);case 4:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.historical=this.chart,this.largest_trades=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('largest_trades','/largest-trades');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.list=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('list:'+c,'/list/'+c);case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.logo=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('logo','/logo');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.news=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('news','/news/last/'+(c||1));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.ohlc=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.t0=_extends3.default,b.t1={symbol:a.symbol},b.next=4,a.handle('ohlc','/ohlc');case 4:return b.t2=b.sent,b.abrupt('return',(0,b.t0)(b.t1,b.t2));case 6:case'end':return b.stop();}},b,a)})),this.openclose=this.ohlc,this.path=function(b){return'/stock/'+a.symbol+b},this.peers=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('peers','/peers');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.price=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('price','/price');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.previous=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('previous','/previous');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.quote=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){var c,d,e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},f=e.delayed,g=e.percent;return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=a.handle,d=g&&{displayPercent:!0},!f){b.next=8;break}return b.next=5,c('delayed_quote','/delayed-quote',d);case 5:return b.abrupt('return',b.sent);case 8:return b.next=10,a.handle('quote','/quote',d);case 10:return b.abrupt('return',b.sent);case 11:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.relevant=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('relevant','/relevant');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.short_interest=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('short_interest','/short-interest/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.splits=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('splits','/splits/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.spread=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('spread','/effective-spread');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.stats=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('stats','/stats');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.threshold_securities=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('threshold_securities','/threshold-securities/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.time_series=this.chart,this.volume_by_venue=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('volume_by_venue','/volume-by-venue');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}))};exports.default=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return new(Function.prototype.bind.apply(stock,[null].concat(b)))};
'use strict';var _regenerator=require('babel-runtime/regenerator'),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require('babel-runtime/helpers/asyncToGenerator'),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_classCallCheck2=require('babel-runtime/helpers/classCallCheck'),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_lib=require('../lib');Object.defineProperty(exports,'__esModule',{value:!0});function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var stock=function a(){(0,_classCallCheck3.default)(this,a),_initialiseProps.call(this);for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=c[0],f=void 0===e?'market':e;return this.symbol=f.toLowerCase(),this},_initialiseProps=function(){var a=this;this.book=this.handle('/book'),this.chart=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('/chart/'+(d?d.join('/'):'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.collection=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c,d){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('/collection/'+c,{collectionName:d});case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.company=this.handle('/company'),this.crypto=this.handle('/crypto'),this.delayed_quote=this.handle('/delayed_quote'),this.dividends=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('/dividends/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.earnings=this.handle('/earnings'),this.effective_spread=this.handle('/effective-spread'),this.financials=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){var d=c.period,e=d===void 0?'quarter':d;return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle(path('/financials'),{period:e});case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.handle=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c,d){var e,f;return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return e=a.path,f=a.symbol,b.next=3,(0,_lib.fetch)(e(c),d);case 3:return b.abrupt('return',b.sent);case 4:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.ipos=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){var c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:'upcoming';return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('/'+c+'-ipos');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.historical=this.chart,this.largest_trades=this.handle('/largest-trades'),this.list=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('/list/'+c);case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.logo=this.handle('/logo'),this.news=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('/news/last/'+(c||1));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.ohlc=this.handle('/ohlc'),this.openclose=this.ohlc,this.path=function(b){return'/stock/'+a.symbol+b},this.peers=this.handle('/peers'),this.price=this.handle('/price'),this.previous=this.handle('/previous'),this.quote=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(){var c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},d=c.displayPercent;return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('/quote',{displayPercent:d});case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.relevant=this.handle('/relevant'),this.sector_performance=this.handle('/sector-performance'),this.short_interest=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('/short-interest/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.splits=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('/splits/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.spread=this.handle('/effective-spread'),this.stats=this.handle('/stats'),this.threshold_securities=function(){var b=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function b(c){return _regenerator2.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('/threshold-securities/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.time_series=this.chart,this.today_earnings=this.handle('/today-earnings'),this.volume_by_venue=this.handle('/volume-by-venue')};exports.default=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return new(Function.prototype.bind.apply(stock,[null].concat(b)))};
{
"name": "investors-exchange.api",
"version": "0.0.25",
"version": "0.0.26",
"description": "Unofficial Browser / NodeJS API for https://iextrading.com",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,64 +0,239 @@

# investors-exchange.api
Unaffiliated JavaScript API for the IEX Developer Platform - https://iextrading.com
# 📈
# Investors Exchange API Documentation
An unaffiliated JavaScript API for the IEX Developer Platform - [https://iextrading.com](https://iextrading.com/)
---
## Installation
```
npm install investors-exchange.api
```
# NPM
npm install investors-exchange.api --save
# YARN
yarn add investors-exchange.api
---
## Getting Started
```
import IEX from 'investors-exchange.api'
```
import IEX from 'investors-exchange.api'
---
## Miscellaneous Queries
**Fetch**
// https://iextrading.com/developer/docs/#financials
const endpoint = '/stock/snap/financials'
const params = {period: 'annual'}
const data = IEX.fetch(endpoint, params)
---
## Stock Queries
```
const AAPL = await IEX.stock('AAPL')
const book = await AAPL.book()
const chart = await AAPL.chart(range)
const company = await AAPL.company()
const dividends = await AAPL.dividends()
const earnings = await AAPL.earnings()
const financials = await AAPL.financials()
const historical = await AAPL.historical()
const largest_trades = await AAPL.largest_trades()
const logo = await AAPL.logo()
const news = await AAPL.news()
const ohlc = await AAPL.ohlc()
const peers = await AAPL.peers()
const previous = await AAPL.previous()
const price = await AAPL.price()
const quote = await AAPL.quote()
const relevant = await AAPL.relevant()
const splits = await AAPL.splits(range)
const time_series = await AAPL.time_series()
const volume_by_venue = await AAPL.volume_by_venue()
const spread = await AAPL.spread()
const stats = await AAPL.stats()
const quote = await AAPL.quote({delayed: bool, percent: bool})
```
**[Stock](https://iextrading.com/developer/docs/#stocks)**
const AAPL = IEX.stock('aapl') // Apple Inc.
const GOOG = IEX.stock('GOOG') // Alphabet Inc.
const SNAP = IEX.stock('Snap') // Snap Inc.
**[Book](https://iextrading.com/developer/docs/#book)**
const book = await AAPL.book()
**[Chart](https://iextrading.com/developer/docs/#chart)**
const chart = {}
chart.default = await AAPL.chart() // 1 Month (default).
chart.dynamic = await GOOG.chart('dynamic') // Dynamic
chart.fiveYear = await GOOG.chart('5y') // 5 year.
chart.specific = await SNAP.chart('20180730') // Specific Date.
**[Company](https://iextrading.com/developer/docs/#company)**
const company = await AAPL.company()
**[Dividends](https://iextrading.com/developer/docs/#dividends)**
const dividends = {}
dividends.default = await SNAP.dividends() // 1 Month (default).
dividends.ytd = await SNAP.dividends('ytd') // Year-To-Date.
dividends.twoYear = await GOOG.dividends('2y') // 2 Year.
**[Earnings](https://iextrading.com/developer/docs/#earnings)**
const earnings = await GOOG.earnings()
**[Earnings Today](https://iextrading.com/developer/docs/#earnings-today)**
const today_earnings = await SNAP.today_earnings()
**[Effective Spread](https://iextrading.com/developer/docs/#effective-spread)**
const effective_spread = await SNAP.effective_spread()
**[Financials](https://iextrading.com/developer/docs/#financials)**
const financials = {}
financials.quarter = await AAPL.financials()
financials.annual = await AAPL.financials({period: 'annual'})
**[Historical Prices](https://iextrading.com/developer/docs/#historical-prices)**
const historical = {}
historical.default = await AAPL.historical() // 1 Month (default).
historical.dynamic = await GOOG.historical('dynamic') // Dynamic
historical.fiveYear = await GOOG.historical('5y') // 5 year.
historical.specific = await SNAP.historical('20180730') // Specific Date.
**[Key Stats](https://iextrading.com/developer/docs/#key-stats)**
const stats = await AAPL.stats()
**[Largest Trades](https://iextrading.com/developer/docs/#largest-trades)**
const largest_trades = await AAPL.largest_trades()
**[Logo](https://iextrading.com/developer/docs/#logo)**
const logo = await SNAP.logo()
**[News](https://iextrading.com/developer/docs/#news)**
const news = {}
news.last_1 = await SNAP.news() // Last Article.
news.last_10 = await SNAP.news(10) // Last 10 Articles.
**[OHLC](https://iextrading.com/developer/docs/#ohlc)**
const ohlc = await AAPL.ohlc()
**[Peers](https://iextrading.com/developer/docs/#peers)**
const peers = await SNAP.peers()
**[Previous](https://iextrading.com/developer/docs/#previous)**
const previous = await AAPL.previous()
**[Price](https://iextrading.com/developer/docs/#price)**
const price = await GOOG.price()
**[Quote](https://iextrading.com/developer/docs/#quote)**
const quote = {}
quote.default = SNAP.quote()
quote.percent = SNAP.quote({displayPercent: true}) // Display Percent.
**[Relevant](https://iextrading.com/developer/docs/#relevant)**
const relevant = await AAPL.relevant()
**[Splits](https://iextrading.com/developer/docs/#splits)**
const splits = {}
splits.default = await AAPL.splits() // 1 Month (default).
splits.fiveYear = await AAPL.splits('5y') // 5 Year.
**[Time Series](https://iextrading.com/developer/docs/#time-series)**
const time_series = {}
time_series.default = await GOOG.time_series() // 1 Month (default).
time_series.ytd = await GOOG.time_series('ytd') // Year-To-Date.
**[Volume By Venue](https://iextrading.com/developer/docs/#volume-by-venue)**
const volume_by_venue = await AAPL.volume_by_venue()
---
## Market Queries
```
const market = IEX.market
const crypto = await market.crypto()
const gainers = await market.list(type)
const previous = await market.previous()
const threshold_securities = await market.threshold_securities()
const short_interest = await market.short_interest()
```
**[Market](https://iextrading.com/developer/docs/#iex-market-data)**
const market = IEX.market || IEX.stock()
**[Collections](https://iextrading.com/developer/docs/#collections)**
const collections = {}
collections.computer_hardware = await market.collection('tag', 'Computer%20Hardware')
collections.health_care = await market.collection('sector', 'Health%20Care')
**[Crypto](https://iextrading.com/developer/docs/#crypto)**
const crypto = await market.crypto()
**[IPO Calendar](https://iextrading.com/developer/docs/#ipo-calendar)**
const IPOs = {}
IPOs.upcoming = await market.ipos('upcoming')
IPOs.today = await market.ipos('today')
**[List](https://iextrading.com/developer/docs/#list)**
const list = {}
list.gainers = await market.list('gainers') // Gainers.
list.iex_volume = await market.list('iexvolume') // IEX Volume.
list.iex_percent = await market.list('iexpercent') // IEX Percent.
list.in_focus = await market.list('infocus') // In Focus.
list.losers = await market.list('losers') // Losers.
list.most_active = await market.list('mostactive') // Most Active.
**[Sector Performance](https://iextrading.com/developer/docs/#sector-performance)**
const sector_performance = await market.sector_performance()
**[Short Interest](https://iextrading.com/developer/docs/#iex-short-interest-list)**
const short_interest = {}
short_interest.recent = await market.short_interest()
short_interest.specific = await market.short_interest('20171210')
**[Threshold Securities](https://iextrading.com/developer/docs/#iex-regulation-sho-threshold-securities-list)**
const threshold_securities = {}
threshold_securities.recent = await market.threshold_securities()
threshold_securities.specific = await market.threshold_securities('20171210')
---
## Reference Queries
```
const reference = IEX.reference
const corporate_actions = await reference.corporate_actions(date)
const dividends = await reference.dividends(date)
const next_day_ex_date = await reference.next_day_ex_date(date)
const symbols = await ref.symbols(csv: bool)
const symbol_directory = await reference.symbol_directory(date)
```
**[Reference](https://iextrading.com/developer/docs/#reference-data)**
const reference = IEX.reference
**[Corporate Actions](https://iextrading.com/developer/docs/#iex-corporate-actions)**
const corporate_actions = {}
corporate_actions.recent = await reference.corporate_actions() // Recent (default).
corporate_actions.specific = await reference.corporate_actions('20171210') // Specific Date.
**[Dividends](https://iextrading.com/developer/docs/#iex-dividends)**
const dividends = {}
dividends.recent = await reference.dividends()
dividends.specific = await reference.dividends('20171210')
**[Next Day Ex Date](https://iextrading.com/developer/docs/#iex-next-day-ex-date)**
const next_day_e x_date = {}
next_day_ex_date.recent = await reference.next_day_ex_date() // Recent (default).
next_day_ex_date.recent = await reference.next_day_ex_date('20171210') // Specific Date.
**[Symbols](https://iextrading.com/developer/docs/#symbols)**
const symbols = {}
symbols.json = await ref.symbols() // JSON Format.
symbols.csv = await ref.symbols({format: 'csv'}) // CSV Format.
**[Symbols Directory](https://iextrading.com/developer/docs/#iex-listed-symbol-directory)**
const symbol_directory = {}
symbol_directory.recent = await reference.symbol_directory() // Recent (default).
symbol_directory.specific = await reference.symbol_directory('20171210') // Specific Date.
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