Jarloo

Menu

Download Stock Symbols

The BATS Exchange offers a nice download of all the stock symbols they offer. They have both CSV and XML downloads you can use to get the data. Here are the URL’s:

Bats Exchange Symbol Download (CSV)

Bats Exchange Symbol Download (XML)

C# Code for Downloading Stock Symbols

If your using C# you can easily get the XML data using LINQ:

string url = "http://www.batstrading.com/market_data/symbol_listing/xml/";

XDocument doc = XDocument.Load(url);

var symbols = from s in doc.Root.Element("symbols").Elements("symbol")
                select new {Name = s.Attribute("name").Value};
            
foreach (var symbol in symbols)
{
    Console.WriteLine(symbol.Name);
}

Categories:   Code, Finance

Comments

Sorry, comments are closed for this item.