Description
Uses http://quotes.yahoo.com/ web site. Fetches quotes (for any mutual fund, market index, or corporate bond) and reports a given quote if is below a minimum price or above a maximum price.Configuration Variables
symbolsThe list of ticker symbols and target prices.For example, the values "FMAGX:100:150", "JAGIX:18:" create a product when the Fidelity Magellen Fund (FMAGX) falls below $100 or rises above $150 and if Janus G&I (JAGIX) falls below $18.
Product
Builds a VectorProduct of quotes only if the last price is below the minimum price or if greater than the maximum price. The content of a single product contains the ticker symbol as its id and the target price that was triggered (min or max reached) as the description. The is set as the content of the product. If only a single quote is found then a single BasicProduct is produced.Every item in the product has
- an id which is ticker symbol
- a description containing the target price that was triggered "quote below min price" or "quote above min price"
- the content as a multi-line string where each line has a name-value pair for the full quote (last price, close date, volume, etc.)
- Min price: 40.0
Symbol: ACME
Last trade date: Aug 3
Last trade price: 24.13
Min change: -0.54
Change %: -2.19%
Volume: N/A
How it works
The PIM takes a series of ticker symbols and target prices as input and builds the search query URL. The PIM tries up to three times to contact quote.yahoo.com with the same query, which each attempt separated by 1 minute. If the URL connection successful returns a formatted HTML document with the given quotes then this HTML page is parsed and the prices are checked against the target prices.A search for the ticker symbols fmagx and jagix (example above) builds the following URL: http://quote.yahoo.com/q?d=v1&s=fmagx+jagix. Note that the yahoo script and query syntax is subject to change as well as the format of the query result. If the format changes and the result is no longer parseable or if the search is unsuccessful (e.g. server unavailable) then the PIM returns a null product and throws an exception that is reported in the log file.
First Available: Build 38
Revised: 4 August 1998