有没有获取比较全面的中国股市股票数据接口

vsvsvsvs
  • 851

目前参考了一些网上的数据,但是数据有些不是很全面,不好做数据分析。
考虑一个能获得股票历史交易数据和成交量信息的数据API。

回复
阅读 33.9k
5 个回答

给你一个思路,一个原本是从Excel获取股票信息。我相信要转换成其他语言并不困难。 我原本在一个Excel论坛看到的:http://www.exceltip.net/thread-34556-1-1-30639.html?1368860794

数据来源:http://www.shdjt.com/sh.asphttp://www.shdjt.com/sz.asp

Option Explicit
Sub a()
    Dim ie1 As Object, dmt As Object, r As Object, i As Long, url(1) As String, j As Long, p%

    Set ie1 = UserForm1.WebBrowser1
    url(0) = "http://www.shdjt.com/sh.asp"
    url(1) = "http://www.shdjt.com/sz.asp"

    For p = 1 To 2
        With ie1
            .Navigate url(p - 1)
            Do Until .ReadyState = 4 And .Busy = False
                DoEvents
            Loop
            Set dmt = .Document
        End With
        With Worksheets(p)
            .Select
            Application.ScreenUpdating = False
            .[a1].CurrentRegion.Clear

            Set r = dmt.All.tags("table")(11).Rows
            For i = 0 To r.Length - 1
                For j = 0 To r(i).Cells.Length - 1
                    .Cells(i + 1, j + 1) = r(i).Cells(j).innerText
                Next
            Next

            Set dmt = Nothing
            Set r = Nothing
            .Range("n1").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
            .Rows("2:2").Delete Shift:=xlUp
            .Range("m1").Value = "ddx10(次)"
            .Range("n1").Value = "ddx10(连)"
            .Columns("d").NumberFormat = "@"
            .[a1].CurrentRegion.Columns.AutoFit
        End With
        Application.ScreenUpdating = True
    Next
    Set ie1 = Nothing
    MsgBox "下载完毕!"
End Sub
skyblue
  • 2
新手上路,请多包涵

目前还没见到,所以我打算自己写一个

qqpukou
  • 1
新手上路,请多包涵
fx3377
  • 1
新手上路,请多包涵
你知道吗?

宣传栏