public?class?StockConnection?{
public?static?void?main(String[]?args)?{
URL?ur?=?null;
try?{
//搜狐股票行情歷史接口
//ur?=?new?URL();
//新浪股票行情歷史接口
ur?=?new?URL((10000)&symbol=sh600000&end_date=20150809&begin_date=20000101&type=plain);
HttpURLConnection?uc?=?(HttpURLConnection)?ur.openConnection();
BufferedReader?reader?=?new?BufferedReader(new?InputStreamReader(ur.openStream(),GBK));
String?line;
while((line?=?reader.readLine())?!=?null){
System.out.println(line);
}
}?catch?(Exception?e)?{
//?TODO?Auto-generated?catch?block
e.printStackTrace();
}
}
}
風險與收益是成正比的,收益越大風險也越高,所以在配資時選擇適當的槓桿倍數。超凡脫俗
好的配資公司還是有的,配資是一種合作,安全是股民一箇永恆的話題die, the better she gets over
如果要獲得股票歷史數據的話,推薦你用免費開源的Python數據接口平臺tushare。
tushare 不僅能獲取股票數據,其他行情歷史數據如基金、期貨、債券、外匯和行業的都能獲取。目前已經運行四年了,而且使用很穩定,現在已經升級到Pro版了。