Menu

#92 QuotePlugin example for non-URL retrieval needed

open
nobody
None
5
2008-07-09
2008-07-09
R P Herrold
No

I have reviewed the CME, NYBOT, and Yahoo, and each seems to be in the business of building and doing a network retrieval of a file, which is then parsed (see also the CSV non-retrieving example)

The trading shim has the capacity to be fed a text command, and to return a event when a database has been loaded with the requested value [it can also return a stdout stream with the detail, which might be massaged into something which looks like delimited text] -- see my example at:

http://sourceforge.net/forum/forum.php?thread_id=2094734&forum_id=80700

extracting from that post:

A sample command to the 'shim, and then qtstalker processing the returned data might look like this:

echo "select past 2 7 now; wait 10; exit;" | \
./shim --data cout

[our symbology entry 2 is AIG, and query type 7 is 5 minute OHLC during regular trading hours.]

Returns the day's 5 minute OHLC details in about 13 seconds, when I ran it, building this email.

20125|71872| 7349073|3| 1| 1|20080619 09:30:00|32.38|32.52|32.3|32.4|
13367|32.42|false|STK:SMART:AIG:

20125|71872| 7349096|3| 1| 1|20080619 09:35:00|32.41|32.41|32.22|32.25|
7665|32.31|false|STK:SMART:AIG:
...

20125|71872| 7359778|3| 1| 1|20080626 15:50:00|28.1|28.11|28.02|28.02|
9858|28.06|false|STK:SMART:AIG:

20125|71872| 7359800|3| 1| 1|20080626 15:55:00|28.02|28.13|28.01|28.08|
14417|28.07|false|STK:SMART:AIG:

20125|71872| 7473104|4|110| 0|# |4|110|0|event: history
insert|(33, 7, 20080619 09:30:00 -- 20080626 15:55:00)|

... I have broken up the files; the last line would be the item to look for to hand back a 'done' event.

I would be interested in getting a pointer on how to have qtstalker hand a query into a pipe to a child process, and then having a method for 1) doing a database retrieval, or 2) in the alternative 'using the delimited file.

Discussion

MongoDB Logo MongoDB