Bootstrap

新浪获取股票实时数据接口(22年春节后)

2022年春节前夕

新浪获取股票实时行情接口,获取数据进行调整。

请求:http://hq.sinajs.cn/list

调用返回:Kinsoku jikou desu!

以下为最新获取方法(Java):

        HtmlPage htmlPage;
		URL urlTabBet = null;
		String URL = "http://hq.sinajs.cn/list=sh601500";
		WebRequest webRequest;
		WebClient webClient = new WebClient(BrowserVersion.CHROME);
		webClient = new WebClient(BrowserVersion.CHROME);
		webClient.setCssErrorHandler(new SilentCssErrorHandler());
		webClient.setAjaxController(new NicelyResynchronizingAjaxController());
		webClient.getOptions().setJavaScriptEnabled(true);
		webClient.getOptions().setActiveXNative(false);
		webClient.getOptions().setCssEnabled(false);
		webClient.getOptions().setTimeout(120 * 1000);
		webClient.getOptions().setThrowExceptionOnScriptError(false);
		webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
		webClient.getOptions().setRedirectEnabled(true);
		webClient.get
;