Knowledge Base | How to Load Historical Stock Prices from MSN Money to CSV

Contents

Historical Prices at MSN Money

MSN Money provides data for a lot of exchanges.

You may open http://www.msn.com/en-us/money, search a ticker like MSFT, and click the 'History' tab.

You may use URLs like http://www.msn.com/en-us/money/stockdetails/history/fi-126.1.MSFT.NAS or http://www.msn.com/en-us/money/stockdetails/history/fi-MSFT (for US tickers) to open pages with historical prices directly.

MSN Money has no links to download historical prices to CSV.

Undocumented URLs to Download Historical Prices from MSN Money

MSN Money uses a web service to load historical stock and currency prices into web pages.

You may use specialized download and parser utilities like gwebcmd to download and convert JSON data to CSV.

For example, to get daily historical prices use the command:

gwebcmd webtocsv ^
    "http://finance.services.appex.bing.com/Market.svc/ChartAndQuotes?symbols=MSFT&chartType=1y&isEOD=True&isCS=true&isVol=true" ^
    msft.csv /rootPath=Chart.Series /skippedNodes=IsStitched

To get weekly historical prices:

gwebcmd webtocsv ^
    "http://finance.services.appex.bing.com/Market.svc/ChartAndQuotes?symbols=MSFT&chartType=5y&isEOD=False&isCS=true&isVol=true" ^
    msft-weekly.csv /rootPath=Chart.Series /skippedNodes=IsStitched

To get monthly historical prices:

gwebcmd webtocsv ^
    "http://finance.services.appex.bing.com/Market.svc/ChartAndQuotes?symbols=MSFT&chartType=max&isEOD=False&isCS=true&isVol=true" ^
    msft-monthly.csv /rootPath=Chart.Series /skippedNodes=IsStitched

To get 15-minute historical prices:

gwebcmd webtocsv ^
    "http://finance.services.appex.bing.com/Market.svc/ChartAndQuotes?symbols=MSFT&chartType=5d&isEOD=False&isCS=true&isVol=true" ^
    msft-15.csv /rootPath=Chart.Series /skippedNodes=IsStitched

To get 5-minute historical prices:

gwebcmd webtocsv ^
    "http://finance.services.appex.bing.com/Market.svc/ChartAndQuotes?symbols=MSFT&chartType=1D_5M&isEOD=False&isCS=true&isVol=true" ^
    msft-5.csv /rootPath=Chart.Series /skippedNodes=IsStitched

gwebcmd in the webtocsv mode loads web data (JSON, XML, HTML, CSV) and converts the data to CSV.

Specify the /rootPath=Chart.Series parser parameter that points to the JSON root of historical prices.

You may load historical prices for currencies. Just use tickers like 245.20.GBPUSDLITE.

Loading Historical Prices from MSN Money with Batch Files

Create a text file like 'task.txt' and place tickers one by line like:

TICKERS.TXT
AAPL
FB
GOOGL
YHOO

Create a batch file like 'load.cmd' with the following commands:

LOAD.CMD
@echo off

@for /F %%i in (tickers.txt) do (
    gwebcmd webtocsv ^
        "http://finance.services.appex.bing.com/Market.svc/ChartAndQuotes?symbols=%%i&chartType=1y&isEOD=True&isCS=true&isVol=true" ^
        %%i.CSV /delay=200 /echoOutputFileName /rootPath=Chart.Series /skippedNodes=IsStitched
)

Run it. You will see the result:

C:>load.cmd
AAPL.CSV - 253 rows
FB.CSV - 253 rows
GOOGL.CSV - 253 rows
YHOO.CSV - 253 rows

Pay attention to the /delay parameter. Use the delay to avoid banning your IP due to frequent multiple automatic requests.

Downloading Historical Prices from MSN Money using Market.csv

Market.csv is a specialized tool for loading data from Yahoo Finance, Google Finance, and MSN Money.

You place the required tickers to a file like tickers.txt.

TICKERS.TXT
^VIX
SPY
126.1.AAPL.NAS
NYSE:BRK.B
RIO.L
GBPUSD

Then you execute commands to download data using the required data providers:

C:\MarketData
market.csv.exe download MsnMoneyHistoricalPricesDaily
market.csv.exe download MsnMoneyHistoricalPricesWeekly
market.csv.exe download MsnMoneyHistoricalPricesMonthly
market.csv.exe download MsnMoneyIntradayPrices1m
market.csv.exe download MsnMoneyIntradayPrices5m
market.csv.exe download MsnMoneyIntradayPrices15m

The tool downloads data, archives the data to zip files and converts the data to CSV.

You may get results in the output files like MsnMoneyHistoricalPricesDaily.csv, MsnMoneyHistoricalPricesWeekly.csv, etc.

Moreover, Market.csv includes ready-to-use SQL codes and format files to import CSV data into a Microsoft SQL Server database.

Downloads

Products for Traders and Investors
WEB.CSV aka gwebcmd
The app loads data from the web (HTML, XML, JSON, and CSV) into CSV
Version: 4.6 | 08/22/2017 | 1.4MB | Home | What's New | Editions
Market.csv
The app loads data from Yahoo Finance, Google Finance, and MSN Money to CSV and databases
Version: 2.5 | 08/22/2017 | 0.9MB | Home | What's New | Editions

Disclaimer

MSN is a logo and registered trademark of Microsoft Corporation.