Redian新闻
>
Looking for code example to get stock data
avatar
Looking for code example to get stock data# Programming - 葵花宝典
q*e
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
avatar
w*g
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

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。