12/03/2009

Get HK stock quote from curl

Reference for neat way to download stock data from HK Yahoo.

[[http://www.gummy-stuff.org/Yahoo-data.htm]]

http://finance.yahoo.com/d/quotes.csv?s= a BUNCH of STOCK SYMBOLS separated by "+" &f=a bunch of special tags

The following is an example to get 1398.hk

s=Symbol
n=Name
d1=Last Trade Date
l1=Last Trade(Price Only)
r=P/E Ratio
e=Earnings/Share
c=Change & Percent Change


#!/bin/bash

#Get the stock price and information from yahoo.
curl -s 'http://hk.finance.yahoo.com/d/quotes.csv?s=1398.hk&f=snd1l1cer'

沒有留言: