Security master returning unexpected results

The security master appears to be returning incorrect results with certain filter combinations; see example below.

Query for FOSLL without --sec-type filter

jupyter:/var/lib/quantrocket $ quantrocket master get --symbols FOSLL --vendors alpaca usstock | csvlook
| Sid            | Symbol | Exchange | Country | Currency | SecType |   Etf | Timezone         | Name                                        | PriceMagnifier | Multiplier | Delisted | DateDelisted | LastTradeDate | RolloverDate |
| -------------- | ------ | -------- | ------- | -------- | ------- | ----- | ---------------- | ------------------------------------------- | -------------- | ---------- | -------- | ------------ | ------------- | ------------ |
| FIBBG0139M5F14 | FOSLL  | XNAS     | US      | USD      | STK     |  True | America/New_York | FOSSIL GROUP INC                            |           True |       True |    False |              |               |              |
| QL000000030152 | FOSLL  | XNAS     | US      | USD      | STK     | False | America/New_York | Fossil Group, Inc. 7% Senior Notes due 2026 |           True |       True |    False |              |               |              |

Query for FOSLL with --sec-type filter

jupyter:/var/lib/quantrocket $ quantrocket master get --symbols FOSLL --vendors alpaca usstock --sec-types STK | csvlook
| Sid            | Symbol | Exchange | Country | Currency | SecType |   Etf | Timezone         | Name                                        | PriceMagnifier | Multiplier | Delisted | DateDelisted | LastTradeDate | RolloverDate |
| -------------- | ------ | -------- | ------- | -------- | ------- | ----- | ---------------- | ------------------------------------------- | -------------- | ---------- | -------- | ------------ | ------------- | ------------ |
| QL000000030152 | FOSLL  | XNAS     | US      | USD      | STK     | False | America/New_York | Fossil Group, Inc. 7% Senior Notes due 2026 |           True |       True |    False |              |               |              |

Given that SecType for both of these securities are STK, I wouldn't expect different results. Am I missing something?

Oddly, if I filter using only the --sec-type filter, it doesn't filter out the second result?

jupyter:/var/lib/quantrocket $ quantrocket master get --symbols FOSLL --sec-types STK | csvlook
| Sid            | Symbol | Exchange | Country | Currency | SecType |   Etf | Timezone         | Name                                        | PriceMagnifier | Multiplier | Delisted | DateDelisted | LastTradeDate | RolloverDate |
| -------------- | ------ | -------- | ------- | -------- | ------- | ----- | ---------------- | ------------------------------------------- | -------------- | ---------- | -------- | ------------ | ------------- | ------------ |
| FIBBG0139M5F14 | FOSLL  | XNAS     | US      | USD      | STK     |  True | America/New_York | FOSSIL GROUP INC                            |           True |       True |    False |              |               |              |
| QL000000030152 | FOSLL  | XNAS     | US      | USD      | STK     | False | America/New_York | Fossil Group, Inc. 7% Senior Notes due 2026 |           True |       True |    False |              |               |              |

In summary, the difference appears to happen only if both --vendors and --sec-types filters are used together.

--sec-types accepts STK or ETF among other choices. ETF handling is outlined in the docs. --vendors can affect results because only those vendors are searched, and vendors may disagree about sids, whether it’s an ETF, etc.

Ok, that makes sense. When you supply a vendor, only those vendor fields are used for applying filters. Thanks for the clarification!