q********e 发帖数: 161 | 1 Hi friends,
I am looking for code example to get market data into my application? Anyone
know any free/cheap webservice/api available? Or if you have any code
snippets to grap the data directly from web?
Many Thanks !
quick | w***g 发帖数: 5958 | 2 #!/bin/bash
#
# I use this to get stock data from Yahoo.
# opentick is a good choice if you want more than this.
#
if [ -z "$1" ]
then
printf "Fetch historical data from yahoo.com.\n"
printf "Usage:\n\t%s [output]\n\n" $0
exit
fi
wget --quiet -O $2 "http://ichart.finance.yahoo.com/table.csv?s=$1&g=d"
n=`head -1 $2 | grep "Date,Open,High,Low,Close,Volume,Adj Close" | wc -l`
if [ $n -ne 1 ]
then
rm $2
printf "Error fetching the symbol \"$1\".\n"
【在 q********e 的大作中提到】 : Hi friends, : I am looking for code example to get market data into my application? Anyone : know any free/cheap webservice/api available? Or if you have any code : snippets to grap the data directly from web? : Many Thanks ! : quick
|
|