新东方教育科技集团有限公司(以下简称“新东方”)是国内知名的综合性教育集团,于2006年在纽交所上市,股票代码为“EDU”。2021年10月,新东方完成私有化交易,从纽交所退市。2022年3月,新东方在港交所重新上市,股票代码为“601866”。
今日行情
指标
|
数值
|
---|
当前价格
|
涨跌幅
|
涨跌额
|
成交量
|
成交金额
|
最高价
|
最低价
|
开盘价
|
收盘价
|
// 获取新东方股票实时行情const fetchStockQuote = () => {fetch("https://hq.sinajs.cn/list=sh601866").then(res => res.text()).then(data => {const stockInfo = data.split(",");// 更新页面上的行情数据document.getElementById("current-price").innerHTML = stockInfo[3];document.getElementById("change").innerHTML = stockInfo[4] + "%";document.getElementById("change-amount").innerHTML = stockInfo[5];document.getElementById("volume").innerHTML = stockInfo[8];document.getElementById("turnover").innerHTML = stockInfo[9];document.getElementById("high").innerHTML = stockInfo[10];document.getElementById("low").innerHTML = stockInfo[11];document.getElementById("open").innerHTML = stockInfo[12];document.getElementById("close").innerHTML = stockInfo[13];})
.catch(error => {console.error("Error fetching stock quote:", error);});};// 渲染股票走势图const renderStockChart = () => {// 从 Sina Finance 获取股票历史数据fetch("https://finance.sina.com.cn/realstock/company/sh601866/hisdata/klc.csv").then(res => res.text()).then(data => {// 将数据解析成 Highcharts 可识别的格式const stockData = data.split("\n").map(row => {const [date, open, high, low, close, volume] = row.split(",");return [Date.parse(date), parseFloat(open), parseFloat(high), parseFloat(low), parseFloat(close), parseFloat(volume)];});// 创建 Highcharts 股票走势图Highcharts.stockChart("stock-chart", {series: [{
name: "新东方股票",data: stockData}],title: {text: "新东方股票走势图"},rangeSelector: {buttons: [{type: "week",count: 1,text: "1w"}, {type: "month",count: 1,text: "1m"}, {type: "month",count: 3,text: "3m"}, {type: "month",count: 6,text: "6m"}, {type: "ytd",text: "YTD"}, {type: "year",count: 1,text: "1y"}, {type: "all",text: "All"}],selected: 1},navigator: {enabled: false},scrollbar: {enabled: false},xAxis: {type: "datetime"},yAxis: {title: {text: "价格"}},credits: {enabled: false}});}).catch(error => {console.error("Error fetching stock history:", error);});};// 每秒钟更新一次行情数据setInterval(fetchStockQuote, 1000);// 渲染股票走势图renderStockChart();
版权声明:除非特别标注,否则均为本站转摘于网络,转载时请以链接形式注明文章出处。