diff --git a/IQML.m b/IQML.m index d3d1bb5..aa293f7 100644 --- a/IQML.m +++ b/IQML.m @@ -5,18 +5,19 @@ % % Inputs: % -% action (String) - one of: license,version,update,revert,doc,quotes,intervalbars,fundamental,greeks,news,history,summary,lookup,alert,chain,disconnect,reconnect,time,stats,command,log,marketdepth,regional +% action (String) - one of: license,version,update,revert,doc,quotes,intervalbars,fundamental,greeks,news,history,summary,lookup,alert,chain,disconnect,reconnect,time,stats,command,log,marketdepth,regional,registry % % parameters - Matlab struct or XLS filename or parameter name/value pairs with the following optional parameters: % % Connection: % Username (String) the login ID for connecting to IQFeed via the client % Password (String) the password for connecting to IQFeed via the client +% Protocol (Number) default=latest; the IQFeed API protocol number to be used % % Message processing (also see Logging section below): % Timeout (Number) default=5; max # of seconds to wait for a response to a blocking query (0=infinite) % Debug (Logical) default=0 or false; if true or 1, extra data will be displayed in Matlab console -% AddPortStats (Logical) default=0 or false; if true or 1, extra port stats are streamed and returned when Action=stats +% AddPortStats (Logical) default=0 or false; if true or 1, extra port stats are streamed and reported when Action=stats % MsgParsingLevel (Integer) default=2; amount of parsing for incoming IQFeed messages (0=minimal, 1=partial, 2=maximal) % ProcessFunc (function handle or struct) default=[]; if non-empty, this function is invoked upon every IQFeed message % RaiseErrorMsgs (Logical) default=1 or true; if true or 1, IQFeed error messages raise a Matlab error in blocking query @@ -28,18 +29,43 @@ % NumOfEvents (Integer) default=inf; max # of IQFeed messages to process in streaming (non-blocking) data mode % MaxItems (Integer) default=1; size of the reported buffer accumulating the latest streaming quotes/ticks % Fields (String or cell-array) list of data fields to be reported by IQFeed (default: 16 fields) +% ClearBuffer (Logical) default=0 or false; if true or 1, internal cyclic quotes buffer is cleared when data is returned % % Interval bars: % Symbols (String :-delimited or cell-array) default=''; e.g., '@VX#' or 'IBM:GOOG' or {'IBM','GOOG'} % NumOfEvents (Integer) default=inf; max # of IQFeed messages to process in streaming (non-blocking) data mode % MaxItems (Integer) default=100; size of the reported buffer accumulating the latest streaming interval bars -% IntervalSize (Integer) default=60; size of interval bars in specified or default units (seconds) -% IntervalType (String) default='secs'; one of 'secs','volume','trades' % MaxDays (String) default=1; max number of days to be retrieved +% IntervalType (String) default='secs'; one of 'secs','volume','trades' +% IntervalSize (Integer) default=60; size of interval bars in specified or default units (seconds) % BeginFilterTime (String) default='00:00:00'; earliest bar time % EndFilterTime (String) default='23:59:59'; latest bar time % BeginDateTime (Integer or String) default=''; earliest bar date % +% Market depth: +% Symbols (String :-delimited or cell-array) default=''; e.g., '@VX#' or 'IBM:GOOG' or {'IBM','GOOG'} +% NumOfEvents (Integer) default=inf; max # of IQFeed messages to process in streaming (non-blocking) data mode +% IncludeEmptyQuotes (Logical) default=0 or false; if true or 1, Level 2 quotes with no Bid/Ask will also be reported +% +% Greeks: +% Symbol (String) default=''; e.g., 'IBM1814L116' +% UnderlyingSymbol (String) default=''; e.g., 'IBM' +% Side (String) default=''; either 'Call' or 'Put' +% HistoricVolatility (Number) default=-1; underlying asset's volatility (%) +% UseImpliedVolatility (Logical) default=0 or false; if true or 1, the implied (not historic) volatility will be used to calculate Greeks +% RiskFreeRate (Number) default=0; domestic risk-free rate (%) +% DividendsYield (Number) default=0; underlying asset's dividends yield (%) +% DaysToExpiration (Number) default=-1; days until the contract expires +% AnnualFactor (Number) default=365; used to de-annualize Theta,Charm,Veta,Color +% +% Summary: +% DataType (String) default='snapshot'; one of 'snapshot','fundamental','top' +% Exchange (String) default='NYSE'; one of 'NYSE','NASDAQ','AMEX','CBOT',... +% SecType (String) default='equity'; one of 'equity','bond','mutual fund',... +% Date (Integer or String) default=now; end-of-day (or latest) data for this date (only!) will be fetched +% ReportEmptyFields (Logical) default=0 or false; if true or 1, empty fields will be reported +% Filter (String or cell-array) list of criteria to filter the returned data +% % History: % DataType (String) default='day'; one of 'day','week','month','interval','ticks' % Symbol (String) default=''; e.g., '@VX#' @@ -47,31 +73,14 @@ % MaxItems (Integer) default=100; returns up to the specified # of bars % BeginDate (Integer or String) default=[]; earliest bar date (only relevant if DataType=day/week/month) % EndDate (Integer or String) default=[]; latest bar date (only relevant if DataType=day) -% IntervalSize (Integer) default=60; size of interval bars in seconds (only relevant if DataType=interval) % IntervalType (String) default='secs'; one of secs,volume,ticks (only relevant if DataType=interval) +% IntervalSize (Integer) default=60; size of interval bars in seconds (only relevant if DataType=interval) +% LabelAtBeginning(Logical) default=0 or false; if true or 1, 11:17:41 data is reported in '11:17' bar (otherwise: '11:18') % Days (Integer) default=1; # of calendar days to return, -1=all (only relevant if DataType=interval or ticks) -% BeginDateTime (Integer or String) default=''; earliest bar date (only relevant if DataType=interval or ticks) -% EndDateTime (Integer or String) default=''; latest bar date (only relevant if DataType=interval or ticks) % BeginFilterTime (String) default='00:00:00'; earliest bar time (only relevant if DataType=interval or ticks) % EndFilterTime (String) default='23:59:59'; latest bar time (only relevant if DataType=interval or ticks) -% -% Summary: -% DataType (String) default='snapshot'; one of 'snapshot','fundamental','top' -% SecType (String) default='equity'; one of 'equity','bond','mutual fund',... -% Exchange (String) default='NYSE'; one of 'NYSE','NASDAQ','AMEX','CBOT',... -% ReportEmptyFields (Logical) default=0 or false; if true or 1, empty fields will be reported -% Filter (String or cell-array) list of criteria to filter the returned data -% Date (Integer or String) default=now; end-of-day (or latest) data for this date (only!) will be fetched -% -% Greeks: -% Symbol (String) default=''; e.g., 'IBM1814L116' -% UnderlyingSymbol (String) default=''; e.g., 'IBM' -% HistoricVolatility (Number) default=-1; underlying asset's volatility (%) -% RiskFreeRate (Number) default=0; domestic risk-free rate (%) -% DividendsYield (Number) default=0; underlying asset's dividends yield (%) -% Side (String) default=''; either 'Call' or 'Put' -% DaysToExpiration (Number) default=-1; days until the contract expires -% AnnualFactor (Number) default=365; used to de-annualize Theta,Charm,Veta,Color +% BeginDateTime (Integer or String) default=''; earliest bar date (only relevant if DataType=interval or ticks) +% EndDateTime (Integer or String) default=''; latest bar date (only relevant if DataType=interval or ticks) % % News: % DataType (String) default='config'; one of 'config','headlines','story' @@ -80,10 +89,10 @@ % Date (Integer or String) default=[]; Date at which the news headline was published (or all dates, if empty) % NumOfEvents (Integer) default=inf; max # of headlines to process in streaming (non-blocking) data mode % MaxItems (Integer) default=inf; max # of headlines to be reported by IQFeed +% GetStory (Logical) default=false; if true or 1, automatically fetch the full story text for each headline % ID (Integer) default=[]; news story ID % BeginDate (Integer or String) default=[]; earliest date at which the news items were published % EndDate (Integer or String) default=[]; latest date at which the news items were published -% GetStory (Logical) default=false; if true or 1, automatically fetch the full story text for each headline % % Lookup: % DataType (String) default='symbols'; one of 'symbols','markets','sectypes','sic','naics','conditions' @@ -94,19 +103,6 @@ % Markets (Integers or Strings) default=[]; Limits results to those in the specified market (exchange) name(s) or code(s) % SecTypes (Integers or Strings) default=[]; Limits results to those with the specified security type(s) % -% Alert: -% Symbols (String :-delimited or cell-array) default=''; e.g., 'FB' or 'IBM:GOOG' or {'IBM','GOOG'} -% Trigger (String) alert trigger condition; composed of data type, parameter, operator, value (e.g. 'quote bid > 7') (case insensitive) -% AlertAction (String or function handle) default='display'; one of 'display','popup','email',function handle -% NumOfEvents (Integer) default=1; max # of times to trigger the alert -% AlertID (Numeric) the unique ID number assigned to each alert created, used for querying/editing/deleting existing alert -% GetStory (Logical) default=true; if true or 1, automatically fetch the full story (not just headline) of news alerts when AlertAction='email'/callback -% StartStream (Logical) default=false; if true or 1, automatically start data streaming -% EmailRecipients (String :/,-delimited or cell-array of Strings); only relevant when AlertAction='email' -% SmtpEmail (String) default='IQML.alerts@gmail.com'; sender address of email alerts. Only relevant if AlertAction='email' -% SmtpServer (String) default='smtp.gmail.com'; sender SMTP server. Only relevant if AlertAction='email', SmtpEmail~=default -% SmtpPassword (String) sender email password. Only relevant if AlertAction='email' and SmtpEmail~=default -% % Chain: % Symbol (String) default=''; e.g., 'GOOG' % DataType (String) default='options'; one of 'options','futures','foptions','spreads' @@ -121,9 +117,23 @@ % NumInMoney (Integer) default=[]; only report this number of options in the money; only relevant if DataType='options'. % NumOutOfMoney (Integer) default=[]; only report this number of options out of money; only relevant if DataType='options'. % +% Alert: +% Symbols (String :-delimited or cell-array) default=''; e.g., 'FB' or 'IBM:GOOG' or {'IBM','GOOG'} +% Trigger (String) alert trigger condition; composed of data type, parameter, operator, value (e.g. 'quote bid > 7') (case insensitive) +% AlertAction (String or function handle) default='display'; one of 'display','popup','email',function handle +% NumOfEvents (Integer) default=1; max # of times to trigger the alert +% AlertID (Numeric) the unique ID number assigned to each alert created, used for querying/editing/deleting existing alert +% GetStory (Logical) default=true; if true or 1, automatically fetch the full story (not just headline) of news alerts when AlertAction='email'/callback +% StartStream (Logical) default=false; if true or 1, automatically start data streaming +% EmailRecipients (String :/,-delimited or cell-array of Strings); only relevant when AlertAction='email' +% SmtpEmail (String) default='IQML.alerts@gmail.com'; sender address of email alerts. Only relevant if AlertAction='email' +% SmtpServer (String) default='smtp.gmail.com'; sender SMTP server. Only relevant if AlertAction='email', SmtpEmail~=default +% SmtpPassword (String) sender email password. Only relevant if AlertAction='email' and SmtpEmail~=default +% % Custom IQFeed command: % String (String) default=''; command to be sent to IQFeed % PortName (String) default='Level1'; one of 'Level1','Level2','Admin' +% ProcessFunc (Function handle) custom user callback function to process incoming IQFeed data messages % % Logging: % Path (String) default=''; Path of folder containing the log file diff --git a/IQML.p b/IQML.p index 34546db..58dd156 100644 Binary files a/IQML.p and b/IQML.p differ diff --git a/IQML_User_Guide.pdf b/IQML_User_Guide.pdf index 3ce3a71..b1535b2 100644 Binary files a/IQML_User_Guide.pdf and b/IQML_User_Guide.pdf differ diff --git a/changelog.log b/changelog.log index 3f98c55..e98092a 100644 --- a/changelog.log +++ b/changelog.log @@ -1,10 +1,23 @@ +2.31 (2019-12-12) + - [*.*] Fixed incompatibility with Matlab releases R2009a or older + - [4.2] Fixed bug in parsing of reported date fields + - [4.5] Added UseImpliedVolatility optional Greeks parameter + +2.30 (2019-12-08) + - [4.2] Improved processing speed of fundamental data queries + - [4.5] Improved resiliency of Greeks query to data problems (e.g. missing data) + - [5.*] Improved processing speed of historic data queries + - [8.1] Improved processing speed of symbol lookup queries + - [9.3] Fixed an edge-case problem with some client stats queries + - [11.2] Added support for regional update alerts and for the 'contains' operator + 2.29 (2019-11-21) - [2.2] Clarified activation error messages in deployed programs - [2.2] Improved activation resiliency to temporary network hickups - [2.2] Improved activation resiliency to MacOS-induced hostname changes - [2.4] Skip version update check in deployed (compiled) environments - [4.1] Improved processing speed of quotes queries with Fields parameter - - [4.2] Added SIC, NAICS sector classification data in fundamental data queries + - [4.2] Added SIC and NAICS sector classification data in fundamental data queries - [9.1] Improved report of port conflicts with other programs in deployed programs 2.28 (2019-11-09) diff --git a/functionSignatures.json b/functionSignatures.json index 87eb6f0..eee3d52 100644 --- a/functionSignatures.json +++ b/functionSignatures.json @@ -3,7 +3,7 @@ { "inputs": [ - {"name":"action", "kind":"required", "type":["char","string", "choices={'license','version','update','revert','doc','quotes',intervalbars','fundamental','greeks','news','history','summary','lookup','alert','chain','disconnect','reconnect','time','stats','command'}"], "purpose":"Processing action"}, + {"name":"action", "kind":"required", "type":["char","string", "choices={'license','version','update','revert','doc','quotes',intervalbars','fundamental','greeks','news','history','summary','lookup','alert','chain','disconnect','reconnect','time','stats','command','log','marketdepth','regional','registry'}"], "purpose":"Processing action"}, {"name":"parameters", "kind":"required", "type":["struct","table","class"], "purpose":"Action parameters (struct, table, or MCOS object)"} ], "outputs": @@ -27,6 +27,7 @@ {"name":"action", "kind":"required", "type":["char","string", "choices={'quotes','IntervalBars','fundamental','greeks','news','history','summary','MarketDepth','regional','lookup','alert','chain','reconnect','time','stats','command'}"], "purpose":"Processing action"}, {"name":"Username", "kind":"namevalue", "type":"char", "purpose":"IQFeed account username"}, {"name":"Password", "kind":"namevalue", "type":"char", "purpose":"IQFeed account password"}, + {"name":"Protocol", "kind":"namevalue", "type":"numeric", "purpose":"the IQFeed API protocol number to be used (default=current IQFeed client version)"}, {"name":"Timeout", "kind":"namevalue", "type":"numeric", "purpose":"max # of seconds to wait for blocking query (0=infinite; default=5)"}, {"name":"MsgParsingLevel", "kind":"namevalue", "type":["numeric","integer", "choices={0,1,2}"], "purpose":"parsing level of IQFeed msgs (default=2=maximal)"}, {"name":"ProcessFunc", "kind":"namevalue", "type":["struct","function_handle"], "purpose":"callback function of IQFeed msgs"}, @@ -59,16 +60,17 @@ { "inputs": [ - {"name":"action", "kind":"required", "type":["char","string", "choices={'greeks'}"], "purpose":"Processing action"}, - {"name":"Symbol", "kind":"namevalue", "type":["char","cellstr"], "purpose":"IQFeed symbol(s)"}, - {"name":"UseParallel", "kind":"namevalue", "type":["logical","scalar"], "purpose":"Process multiple symbols in parallel? (default=false)"}, - {"name":"UnderlyingSymbol", "kind":"namevalue", "type":["char"], "purpose":"Symbol of the underlying asset (optional)"}, - {"name":"HistoricVolatility", "kind":"namevalue", "type":["numeric"], "purpose":"Underlying price volatility in percent (optional)"}, - {"name":"RiskFreeRate", "kind":"namevalue", "type":["numeric"], "purpose":"Domestic RF rate in percent (default=0)"}, - {"name":"DividendsYield", "kind":"namevalue", "type":["numeric"], "purpose":"Underlying stock div yield or carry rate in percent (default=0)"}, - {"name":"Side", "kind":"namevalue", "type":["char","string", "choices={'Call','Put'}"], "purpose":"Contract side (optional)"}, - {"name":"DaysToExpiration", "kind":"namevalue", "type":["numeric"], "purpose":"# days until contract expires (optional)"}, - {"name":"AnnualFactor", "kind":"namevalue", "type":["numeric"], "purpose":"# of days per year (default=365)"} + {"name":"action", "kind":"required", "type":["char","string", "choices={'greeks'}"], "purpose":"Processing action"}, + {"name":"Symbol", "kind":"namevalue", "type":["char","cellstr"], "purpose":"IQFeed symbol(s)"}, + {"name":"UseParallel", "kind":"namevalue", "type":["logical","scalar"], "purpose":"Process multiple symbols in parallel? (default=false)"}, + {"name":"UnderlyingSymbol", "kind":"namevalue", "type":["char"], "purpose":"Symbol of the underlying asset (optional)"}, + {"name":"HistoricVolatility", "kind":"namevalue", "type":["numeric"], "purpose":"Underlying price volatility in percent (optional)"}, + {"name":"UseImpliedVolatility", "kind":"namevalue", "type":["logical","scalar"], "purpose":"Use implied (not historic) volatility to calculate Greeks? (default=false)"}, + {"name":"RiskFreeRate", "kind":"namevalue", "type":["numeric"], "purpose":"Domestic RF rate in percent (default=0)"}, + {"name":"DividendsYield", "kind":"namevalue", "type":["numeric"], "purpose":"Underlying stock div yield or carry rate in percent (default=0)"}, + {"name":"Side", "kind":"namevalue", "type":["char","string", "choices={'Call','Put'}"], "purpose":"Contract side (optional)"}, + {"name":"DaysToExpiration", "kind":"namevalue", "type":["numeric"], "purpose":"# days until contract expires (optional)"}, + {"name":"AnnualFactor", "kind":"namevalue", "type":["numeric"], "purpose":"# of days per year (default=365)"} ] }, "IQML": @@ -230,8 +232,9 @@ "inputs": [ {"name":"action", "kind":"required", "type":["char","string", "choices={'command'}"], "purpose":"Processing action"}, - {"name":"String", "kind":"namevalue", "type":["char","string"], "purpose":"IQFeed command string"} - ] + {"name":"String", "kind":"namevalue", "type":["char","string"], "purpose":"IQFeed command string"}, + {"name":"ProcessFunc", "kind":"namevalue", "type":["struct","function_handle"], "purpose":"callback function of IQFeed msgs"} + ] }, "IQML": {