Microsoft Money has a long history. From the first version of Windows 3.0 released in 1991 to the Plus version of 2007, Money was a handy tool for managing personal finances.
In addition to the usual management of accounts, Money also offered developed online services.
They can be divided into three components:
- Get data on quotes and currency conversion.
- Synchronization of data on accounts, as it is now fashionable to say, with the cloud.
- Work with online banking, including payment of bills via OFX protocol.
Unfortunately, in 2011, Microsoft supported the fashion for closing services, closed the online service MSN Money, and the first two functions stopped working.
')
And the free version of Money Plus Sunset, released in 2010, no longer contained support for online functions, becoming a simple tool for offline account management.
I have been using Microsoft Money 2004 Standard since 2006. During this time, there were attempts to go to other programs or online services, but nonetheless Money was more convenient. But the non-working functions were frankly frustrating. And if online banking in our country is useless, because As far as I know, not even one of the large banks supports work through OFX for individuals, there was a lack of exchange rate data. And online synchronization after working with one online service was a dream in general.
The community has created several tools of varying degrees of kontilnosti, but they have one fatal flaw: they are not integrated into Money and require manual labor to produce results.
Well, since it was not necessary to wait for a miracle, then the realization of a dream into reality
is the work of the hands of those who dream.
Immediately I will make a reservation, everything written below refers to version 2004. Perhaps previous versions will not have the necessary functionality, and subsequent ones will have different behavior from the expected one.
The task of returning online functions can be divided into two major steps:
- Obtain data on quotes and exchange rates.
- Synchronization with online service.
The default URL for Money trying to get quotes is
http:
Microsoft Money has a complex and flexible structure. Seemingly monolithic program
consists of many components connected through OLE. Most components have settings either in ini-files or in the registry, and this is a great opportunity to change the program's behavior without interfering with its files.
Therefore, it is possible to change the URL of the request by specifying its string value in the registry
HKLM\Software\\Microsoft\\Investor\\StockQuotes\\QuoteServerURL
Then we can redirect requests from Microsoft servers to our own server.
Money sends the request to the specified URL using the HTTP GET command including a list of required data as address parameters.
Example:
http://moneycentral.msn.com/Scripts/invisapi.dll?V=5&S=$US:INDU,/RUBUS,/ECUUS,/ATSUS,/BECUS,/DEMUS,/FIMUS,/FRFUS,/GRDUS,/IEPUS,/ITLUS,/LUFUS,/NLGUS,/PTEUS,/ESPUS&Q=19,15,32,0,3,5,1,2,10,4,17,18,8C,E9,EA,1E,8,9,A2,104,3A,3B,3C,3D,7F,7D,7,13,14,14E,14F,EB,21,192,16A&N=8,15&H=15,5,20002+20201+20170916+20180316,20006+20201+20170916+20180316,20000+20201+20170916+20180316,20001+20201+20170916+20180316,20004+20201+20170916+20180316
Here is a coded request for obtaining data on the index of the stock exchange INDU, its historical data for the year, as well as data on exchange rates.
It is interesting that instead of the modern currency code USD, the US is used, and the ruble code in the query uses the correct one: RUB.
In response, Money expects data in binary form. Unfortunately, the InvAPI protocol is very confusing and its recovery is very time consuming.
Fortunately for us, Money can work with two more formats: QWB and WebQUOTE.
Therefore, it is not very clear why Microsoft switched to using binary InvAPI by rejecting decently structured WebQUOTE based on XML, given that XML is used very widely in Money.
To use alternative protocols, you need to create a key in the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Money\12.0\Online\WebQuoteServers.
branch
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Money\12.0\Online\WebQuoteServers.
A subsection can have an arbitrary name and must contain the following parameters:
- WebQTSrvrURL - the main parameter that contains the URL to which the request will be sent
- ServerType - If the server is using QWB protocol, then the value of the parameter must be equal to QWB. If WebQUOTE is used, this parameter should be absent.
The following parameters should contain a list of countries, separated by commas, whose indexes are supported by the server:
- FundCountries - stock market
- MnyMktCountries - Cash Market, Shares
- StockCountries - promotions
- TBillCountries - Unknown
The purpose of the following parameters is unknown:
- LookUpURL
- XRateFrom
- XRateTo
There is a nuance with the order of server descriptions: if the WebQUOTE server is the first to be sorted, followed by the QWB, then the request will be made to both. If on the contrary, then only to the QWB server.
It was not possible to find out starting with which version of Money support for the QWB (Quotes Write Back) protocol appeared. But by all indications, this was the very first protocol used for data acquisition. Money 2000 was able to import files in this format. But version 2004 does not have this feature anymore.
When using QWB Money generates a URL with request parameters and sends it via HTTP using the GET method.
For example:
http:
Where
http:
- This is the value of the WebQTSrvrURL parameter.
The format of the answer is simple: the format header, date / time, and listing data by index.
Example:
<FORMAT>QWB2.0 <DATE>20180311105300 US:INDU@179.98@0@0@0@0@0@0@0@0@0@0@USD@
Date format - YYYYMMDDHHmmSS
Field value:
0 - WKN with country information, and in fact the name of the index from the query
1 - Last (Course at a specified time) (double)
2 - High (The highest bid on the day) (double)
3 - Low (Lowest bidding price on this day) (double)
4 - Open (Opening Price) (double)
5 - 52 week max (52 week range, from DATE) (double)
6 - 52 week min (Range in 52 weeks, from DATE) (double)
7 - P / E Ratio (EPS) (Price / Earnings (P / E)) (double)
8 - Volume (long) Trading Volume
9 - ? 1/0 (bool)
10 - Shares Outstanding (double)
11 - Market Capitalization (double)
12 - Currency Code (US, RUR ...)
This format is designed to receive data on stocks and indices (securities), the exchange rate cannot be obtained through it.
WebQUOTE is the next step in the development of the data acquisition protocol.
Its use allows to obtain more detailed data.
Money forms a request in the form of an XML document and sends it to the server using the POST method. The request body looks like this:
<?xml version="1.0" encoding="windows-1251"?> <WEBQUOTE Version="1.0" Source="Money2K"> <QUOTERQ Symbol="$INDU" Type="INDEX" Country="US"/> <HISTQUOTERQ Symbol="$INDU" Type="INDEX" Country="US" StartDate="20170918" EndDate="20180318"/> </WEBQUOTE>
The response format is as follows:
<WEBQUOTE> <EXRATERS CurrFrom="" CurrTo="" datetime="" rate=""/> <QUOTERS Symbol="" Country="" Type="STOCK|INDEX|MUTUAL|OTHER" Currency="string" DateTime="YYYYmmDD" Price="double" Low="double" High="double" Open="double" PrevClose="double" YearHigh="double" YearLow="double" Pe="double" Vol="dword" Out="double" Cap="double" NewsURL="string" Ask="double" Bid="double" Beta="double" DividendYield="double" AmtEPS="double" Size="long" LastUpdate="YYYYmmDD" FYI="YYYYmmDD" News="YYYYmmDD" PercentCash="double" PercentOther="double" PercentSmall="double" PercentLarge="double" PercentMedium="double" BaseUnit="long"/> <HISTQUOTERS Symbol="" Country="" Type="STOCK|INDEX|MUTUAL|OTHER" Currency="string" DateTime="YYYYmmDD" Price="double" Low="double" High="double" Open="double" PrevClose="double" YearHigh="double" YearLow="double" Pe="double" Vol="dword" Out="double" Cap="double" NewsURL="string" Ask="double" Bid="double" Beta="double" DividendYield="double" AmtEPS="double" Size="long" LastUpdate="YYYYmmDD" FYI="YYYYmmDD" News="YYYYmmDD" PercentCash="double" PercentOther="double" PercentSmall="double" PercentLarge="double" PercentMedium="double" BaseUnit="long"/> </WEBQUOTE>
Where
EXRATERS - currency conversion data.
QUOTERS - data on quotes at the time of the request.
HISTQUOTERS - historical data on quotes.
The set of returned data is much expanded compared to QWB. From the name of the attributes is quite clear what data they should contain.
Interestingly, Money never requests currency conversion data, but if it contains this data in response, it processes and stores it perfectly.
When forming a response using any protocol, currency codes stored in the database should be taken into account. For example, the ruble code in Money is recorded as RUR, and if you write RUB, the parsing will end with an error.
There is also a third option: the use of the OFX protocol. Data in this format can be imported by a file, for example, formed by one of the utilities, or obtained online
from a bank connected to Money. But this method is secondary to QWB and WebQUOTE and requires manual intervention.