Catfood Quote - Catfood Quote Service Editor

Catfood Quote Service Editor is used to define Catfood Quote Service (*.cqs) files. Service files allow Catfood Quote to connect to different stock market web sites in order to download quote data.

If you want to try and create your own service download the service editor (1.45 MB) and print this page as a reference. You'll need a good understanding of HTML in order to write a service file. If the exchange you want to access isn't available you can also submit a support incident - we'll work on providing service files for the most requested exchanges.

The service editor requires that Internet Explorer 5.0 or later is installed and will run on all 32-bit versions of Windows. There is no support for proxy servers and so to test a service you will need to have a direct connection to the Internet.

Catfood Quote Service Editor

The service version must be a whole number and should be incremented each time you update the service. Catfood Quote uses the version number to decide which service files to download during automatic update.

Catfood Quote displays the service description to users when they select the service to use for a symbol. You should make sure that the description includes information about the market and any special instructions (in the example above you need to look up the quote by SEDOL rather than the symbol).

You can enter your name, company, web site or other information in the author field. This is displayed in the Catfood Quote Services dialog.

The Query String is used to fetch the page containing quote information. This is the GET form sent to the server when you submit a search for the symbol in question. Catfood quote will replace %s in this string with the symbol entered by the user. Catfood Quote does not support POST forms at present.

Data can be retrieved using two methods for the fields under Screen Scraping. The first (default) method is a simple string search strategy. Catfood Quote will first look for the Preamble string. When this has been found Quote will then extract data between the strings specified as Pre-clip and Post-clip. For example if the page contains the following HTML:

   Stock Name: <em>My Stock</em>

You would specify Stock Name: as the preamble, and then <em> and </em> as the pre-clip and post-clip.

The second method is to extract the contents of one cell in a table. To select this method check the Table checkbox next to the field. Preamble is now used to specify the address of the cell as table number, row number, column number. Pre-clip and Post-clip work the same way, so you can remove any extraneous formatting from the cell. For example, if there was a single table on the web page like this:

   <table>
   <tr><td>Stock Name:</td><td><em>My Stock</em></td>
   </table>

You would specify 1,1,2 (first table, first row second column) as the preamble and then <em> and </em> as the pre-clip and post-clip.

Lastly, some exchange sites list the previous close and the change but in some cases only one of these fields is present. Use the drop-down box to pick which field you wish to capture.

Select Test Service from the Tools menu to make sure that your service is working as expected.

Test Service

Make sure that you test with several different symbols to ensure that small formatting changes are not breaking your service.

If you want to share the service you have created with other Catfood Quote users please contact us. We can host the service for you, or configure our automatic update system to download it from your site.