Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/injoyai/tdx
通达信的协议解析,用于获取股票信息
https://github.com/injoyai/tdx
Last synced: 2 months ago
JSON representation
通达信的协议解析,用于获取股票信息
- Host: GitHub
- URL: https://github.com/injoyai/tdx
- Owner: injoyai
- Created: 2024-10-11T11:58:14.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-11-04T16:32:24.000Z (2 months ago)
- Last Synced: 2024-11-04T16:33:34.476Z (2 months ago)
- Language: Go
- Homepage:
- Size: 1.58 MB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### 拉取通达信的数据
1. 参考 https://github.com/bensema/gotdx
2. 参考 https://github.com/mootdx/mootdx### 开发进度
* 基本信息(5档报价)
![](docs/plan20241025.png)
* 股票列表
![](docs/plan20241028-1.png)
* 分时成交
![](docs/plan20241028-2.png)
* K线
![](docs/plan20241029.png)### 数据校对
* 日K线校对
![](docs/check_kline.png)
![](docs/check_kline_right.png)* 校对分时成交
![](docs/check_trade.png)### 如何使用
```go
package mainimport (
"fmt"
"github.com/injoyai/tdx"
)func main() {
//连接服务器,开启日志,开启断连重试
c, err := tdx.Dial("124.71.187.122:7709", tdx.WithDebug(), tdx.WithRedial())
if err != nil {
panic(err)
}
resp, err := c.GetQuote("sz000001", "sh600008")
if err != nil {
panic(err)
}for _, v := range resp {
fmt.Printf("%#v\n", v)
}
<-c.Done()
}```
#### IP地址
| IP | 测试时间 |
|-----------------|------------|
| 124.71.187.122 | 2024-10-30 |
| 122.51.120.217 | 2024-10-30 |
| 111.229.247.189 | 2024-11-04 |
| 124.70.199.56 | 2024-11-04 |
| 124.70.176.52 | 2024-11-04 |
| 124.70.133.119 | 2024-11-04 |
| 123.60.84.66 | 2024-11-04 |
| 123.60.73.44 | 2024-11-04 |
| 123.60.70.228 | 2024-11-04 |
| 123.60.186.45 | 2024-11-04 |
| 123.40.164.122 | 2024-11-04 |
| 123.249.15.60 | 2024-11-04 |
| 122.51.232.182 | 2024-11-04 |
| 121.36.81.195 | 2024-11-04 |
| 121.36.54.217 | 2024-11-04 |
| 121.36.225.169 | 2024-11-04 |
| 120.46.186.223 | 2024-11-04 |
| 119.97.185.59 | 2024-11-04 |
| 118.25.98.114 | 2024-11-04 |
| 116.205.183.150 | 2024-11-04 |
| 116.205.171.132 | 2024-11-04 |
| 116.205.163.254 | 2024-11-04 |
| 111.230.186.52 | 2024-11-04 |
| 110.41.4.4 | 2024-11-04 |
| 110.41.2.72 | 2024-11-04 |
| 110.41.154.219 | 2024-11-04 |
| 110.41.147.114 | 2024-11-04 |* 从(https://github.com/mootdx/mootdx)复制,未校验
```
('深圳双线主站1', '110.41.147.114', 7709),
('深圳双线主站2', '8.129.13.54', 7709),
('深圳双线主站3', '120.24.149.49', 7709),
('深圳双线主站4', '47.113.94.204', 7709),
('深圳双线主站5', '8.129.174.169', 7709),
('深圳双线主站6', '110.41.154.219', 7709),
('上海双线主站1', '124.70.176.52', 7709),
('上海双线主站2', '47.100.236.28', 7709),
('上海双线主站3', '101.133.214.242', 7709),
('上海双线主站4', '47.116.21.80', 7709),
('上海双线主站5', '47.116.105.28', 7709),
('上海双线主站6', '124.70.199.56', 7709),
('北京双线主站1', '121.36.54.217', 7709),
('北京双线主站2', '121.36.81.195', 7709),
('北京双线主站3', '123.249.15.60', 7709),
('广州双线主站1', '124.71.85.110', 7709),
('广州双线主站2', '139.9.51.18', 7709),
('广州双线主站3', '139.159.239.163', 7709),
('上海双线主站7', '106.14.201.131', 7709),
('上海双线主站8', '106.14.190.242', 7709),
('上海双线主站9', '121.36.225.169', 7709),
('上海双线主站10', '123.60.70.228', 7709),
('上海双线主站11', '123.60.73.44', 7709),
('上海双线主站12', '124.70.133.119', 7709),
('上海双线主站13', '124.71.187.72', 7709),
('上海双线主站14', '124.71.187.122', 7709),
('武汉电信主站1', '119.97.185.59', 7709),
('深圳双线主站7', '47.107.64.168', 7709),
('北京双线主站4', '124.70.75.113', 7709),
('广州双线主站4', '124.71.9.153', 7709),
('上海双线主站15', '123.60.84.66', 7709),
('深圳双线主站8', '47.107.228.47', 7719),
('北京双线主站5', '120.46.186.223', 7709),
('北京双线主站6', '124.70.22.210', 7709),
('北京双线主站7', '139.9.133.247', 7709),
('广州双线主站5', '116.205.163.254', 7709),
('广州双线主站6', '116.205.171.132', 7709),
('广州双线主站7', '116.205.183.150', 7709)
```