Quote: What's the difference between Exchange ID vs Listed Market in the Fundamental msg?
One is more specific than the other.
Recently, the exchanges started splitting into what can best be described as sub-exchanges. For example, what we think of as NASDAQ technically consists of several different exchanges: NCM (NASDAQ Capital Market), NGM (NASDAQ Global Market), and NGSM (NASDAQ Global Select Market), and others such as OTC and OTCBB.
In the F message, ExchangeID stores the broader group code (NASDAQ). Listed Market stores the more specific exchange code (NGSM). For example, the F message for MSFT would indicate 5 (NASDAQ) for Exchange ID and 21 (NGSM) for Listed Market. An NGM commodity would have 5 and 1, respectively.
The SLM command, as you noted, returns all the Listed Markets, and the exchange ID to which they belong:
1,NGM,Nasdaq Global Market,5,NASDAQ,
2,NCM,National Capital Market,5,NASDAQ,
3,OTC,Nasdaq other OTC,5,NASDAQ,
4,OTCBB,Nasdaq OTC Bulletin Board,5,NASDAQ,
6,NYSE_AMERICAN,NYSE American (Equities and Bonds),6,NYSE_AMERICAN,
7,NYSE,New York Stock Exchange,7,NYSE,
8,CHX,Chicago Stock Exchange,0,NONE,
Listed Markets 1, 2, 3, 4, and 5 are all part of Exchange ID 5. (An exchange can be part of itself.) In some cases there is no group ID, in which case that field will return 0.
The documentation seems to use the terms "Exchange ID", "Exchange Group", and "Group ID" interchangeably. They all mean the same thing: the broader definition of the exchange. We intend to edit this to make it more clear, and to explain the relationship between these terms and Listed Market.
Both the ExchangeID and Listed Market fields say "use the Listed Markets lookup to decode this value." This is correct; the list you get with SLM command consists of both.
Please note that you must specify Protocol 5.2 or later to see the exchange IDs with the SLM command. On 5.1 or the API default of 4.9, they will not be there.
Let me know if you still have any questions on this! I'll post in this thread if there are any related updates on this.