diff --git a/docs/content/releases/4.19.2.md b/docs/content/releases/4.19.2.md new file mode 100644 index 0000000..da21b15 --- /dev/null +++ b/docs/content/releases/4.19.2.md @@ -0,0 +1,4 @@ +**Bug Fixes** + +* Updated the `AlertManager.filterPropertiesForSymbol` function to further limit options-flow properties (to US equities, indices, and ETFs). +* Updated the `AlertManager.filterTemplatesForSymbol` function to further limit options-flow properties (to US equities, indices, and ETFs). \ No newline at end of file diff --git a/lib/AlertManager.js b/lib/AlertManager.js index 4de1841..185ff26 100644 --- a/lib/AlertManager.js +++ b/lib/AlertManager.js @@ -1093,7 +1093,7 @@ module.exports = (() => { } if (valid && (property.property_id === 238 || property.property_id === 239)) { - valid = instrument.hasOptions && (instrument.symbolType === 1 || instrument.symbolType === 9); + valid = instrument.hasOptions && (instrument.symbolType === 1 || instrument.symbolType === 7 || instrument.symbolType === 9); } if (valid && is.number(target)) { @@ -1234,7 +1234,7 @@ module.exports = (() => { } if (valid && properties.some(p => p === 238 || p === 239)) { - valid = instrument.hasOptions && (instrument.symbolType === 1 || instrument.symbolType === 9); + valid = instrument.hasOptions && (instrument.symbolType === 1 || instrument.symbolType === 7 || instrument.symbolType === 9); } return valid; diff --git a/lib/data/validators/instrument.js b/lib/data/validators/instrument.js index bc31c3c..e7ee044 100644 --- a/lib/data/validators/instrument.js +++ b/lib/data/validators/instrument.js @@ -29,7 +29,7 @@ module.exports = (() => { throw new Error(`${symbol} does not have options and cannot be used for option flow alerts`); } - if ((property.property_id === 238 || property.property_id === 239) && !(instrument.symbolType === 1 || instrument.symbolType === 9)) { + if ((property.property_id === 238 || property.property_id === 239) && !(instrument.symbolType === 1 || instrument.symbolType === 7 || instrument.symbolType === 9)) { throw new Error(`${symbol} does not support option flow alerts`); } }