Skip to content

Commit

Permalink
Merge pull request #12 from 1nchaos/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
1nchaos authored Jul 2, 2023
2 parents 52b12a3 + 735003a commit fb75123
Show file tree
Hide file tree
Showing 24 changed files with 194 additions and 5,902 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ print(res_df)

请参考下面数据列表和相关字典文档,找到对应的函数并查看对应的函数注释,进行正确使用。

- [字典DIC](./docs/DIC.md)
- [字典DIC](docs/dataDic.md)

## 二、数据列表

Expand Down Expand Up @@ -213,6 +213,6 @@ print(res_df)

> 对于项目有支持,包括但不仅限:内容贡献,bug提交,思想交流等等,对项目有影响的个人和机构
| Simon |
| ----- |
| Simon | [bigbigbigfish](https://github.com/bigbigbigfish) |
| ----- | ------------------------------------------------- |

2 changes: 1 addition & 1 deletion adata/__version__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

VERSION = (0, 0, 24)
VERSION = (0, 0, 25)
# PRERELEASE = None # alpha, beta or rc
PRERELEASE = 'beta' # alpha, beta or rc
REVISION = None
Expand Down
4 changes: 1 addition & 3 deletions adata/stock/market/stock_market/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@
@log: change log
"""
from .stock_market import StockMarket
from .stock_market_qq import StockMarketQQ
from .stock_market_sina import StockMarketSina
from .stock_market_baidu import StockMarketBaiDu

4 changes: 3 additions & 1 deletion adata/stock/market/stock_market/stock_market.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

import pandas as pd

from adata.stock.market.stock_market import *
from .stock_market_baidu import StockMarketBaiDu
from .stock_market_qq import StockMarketQQ
from .stock_market_sina import StockMarketSina


class StockMarket(object):
Expand Down
2 changes: 1 addition & 1 deletion adata/stock/market/stock_market/stock_market_baidu.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from adata.common.headers import baidu_headers
from adata.common.utils import requests
from adata.stock.market.stock_market.stock_market_template import StockMarketTemplate
from .stock_market_template import StockMarketTemplate


class StockMarketBaiDu(StockMarketTemplate):
Expand Down
2 changes: 1 addition & 1 deletion adata/stock/market/stock_market/stock_market_qq.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pandas as pd

from adata.common import requests
from adata.stock.market.stock_market.stock_market_template import StockMarketTemplate
from .stock_market_template import StockMarketTemplate


class StockMarketQQ(StockMarketTemplate):
Expand Down
2 changes: 1 addition & 1 deletion adata/stock/market/stock_market/stock_market_sina.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from adata.common.headers import sina_headers
from adata.common.utils import requests
from adata.stock.market.stock_market.stock_market_template import StockMarketTemplate
from .stock_market_template import StockMarketTemplate


class StockMarketSina(StockMarketTemplate):
Expand Down
45 changes: 37 additions & 8 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,56 @@ import navbar from "./navbar";
import {searchPlugin} from "@vuepress/plugin-search";
import {seoPlugin} from "vuepress-plugin-seo2";
import clipboardPlugin from "vuepress-plugin-clipboard";
import {searchConsolePlugin} from "vuepress-plugin-china-search-console";
// 右侧目录
import vuepressPluginAnchorRight from 'vuepress-plugin-anchor-right';

let descStr: string = '免费开源A股量化数据库; 专注A股,专注量化,向阳而生; 开放、纯净、持续、为Ai(爱)发电。为个人量化交易而生,保卫3000点......【股票数据,股票行情数据,股票量化数据,k线行情数据,股票概念数据】'

export default defineUserConfig({
lang: 'zh-CN',
title: 'AData',
description: '专注股票量化数据,为Ai(爱)发电,向阳而生。',
title: '专注股票量化数据,为Ai(爱)发电,向阳而生。',
description: descStr,
head: [
["link", {rel: "icon", href: "/favicon.ico"}],
[
"meta",
{
name: "keywords",
content:
"免费开源A股量化数据库; 专注A股,专注量化,向阳而生; 开放、纯净、持续、为Ai(爱)发电。为个人量化交易而生,保卫3000点......【股票数据,股票行情数据,股票量化数据,k线行情数据,股票概念数据】"
content: descStr
}
],
[
"meta",
{
name: "description",
content:
"免费开源A股量化数据库; 专注A股,专注量化,向阳而生; 开放、纯净、持续、为Ai(爱)发电。为个人量化交易而生,保卫3000点......【股票数据,股票行情数据,股票量化数据,k线行情数据,股票概念数据】"
content: descStr
}
], [
"script", {},
`
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?b43925e6271a6ce5fcba28ecd1e6203e";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`
]
],
theme: defaultTheme({
logo: "logo.png",
repo: "1nchaos/adata",
home: "/",
sidebar,
navbar,
editLink: false,
contributors: false,
lastUpdated: false
lastUpdated: true,
lastUpdatedText: "最新更新时间",
colorModeSwitch: true,
sidebarDepth: 4
}),
plugins: [
searchPlugin({
Expand All @@ -50,8 +68,19 @@ export default defineUserConfig({
staticIcon: true
}),
seoPlugin({
hostname: "https://github.com/1nchaos/adata",
hostname: "https://adata.1nchaos.com",
author: "1nchaos"
}),
seoPlugin({
hostname: "https://gitee.com/inchaos/adata",
author: "1nchaos"
}),
vuepressPluginAnchorRight({
showDepth: 4,
}),
searchConsolePlugin({
// 改成自己的百度统计 id:https://tongji.baidu.com/
baiduId: "b43925e6271a6ce5fcba28ecd1e6203e"
})
]
})
3 changes: 2 additions & 1 deletion docs/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { NavbarConfig } from "@vuepress/theme-default/lib/shared/nav";

export default [
{text: '向阳花', link: '/向阳花.md'},
{text: '数据源',
collapsible: true,
children: [
{text:'同花顺',link:'https://www.10jqka.com.cn/'},
{text:'百度股市通',link:'https://gushitong.baidu.com/stock/ab-300033'},
{text:'东方财富',link:'https://data.eastmoney.com/center/'},
{text:'新浪财经',link:'https://finance.sina.com.cn/stock/'},
]
},
] as NavbarConfig;
Binary file added docs/.vuepress/public/logo1x1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions docs/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ export default [
link: '/',
},
{
text: '字典表',
link: '/DIC.md',
text: '数据字典',
link: '/dataDic.md',
collapsible: true,
},
{
text: '向阳花-谢天笑',
{
text: '向阳花-谢天笑.mp3',
link: '/向阳花.md',
collapsible: true,
},
] as SidebarConfig;
32 changes: 16 additions & 16 deletions docs/DIC.md → docs/dataDic.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

### 一、基本信息-Info

#### 1. 股票代码信息(info)
#### 1.股票代码信息(info)

| 字段 | 类型 | 注释 | 说明 |
| ---------- | ------ | ------ | --------------------------- |
| stock_code | string | 代码 | 600001 |
| short_name | string | 简称 | 中国平安 |
| exchange | string | 交易所 | SH:上交;BJ:北交;SZ:深交 |

#### 2. 概念指数信息(index-concept)
#### 2.概念指数信息(index-concept)

| 字段 | 类型 | 注释 | 说明 |
| ------------ | ------ | -------- | --------------------------------------------------- |
Expand All @@ -23,15 +23,15 @@
| concept_code | string | 概念代码 | 同花顺的概念代码是:3开头;例:309061;注意不要混淆 |
| source | string | 来源 | |

#### 3. 指数代码信息(index)
#### 3.指数代码信息(index)

| 字段 | 类型 | 注释 | 说明 |
| ---------- | ------ | -------- | ------ |
| short_name | string | 指数简称 | |
| index_code | string | 指数代码 | |
| source | string | 来源 | 同花顺 |

#### 11. 交易日历
#### 11.交易日历

| 字段 | 类型 | 注释 | 说明 |
| ------------ | ---- | ------------------------------ | -------------- |
Expand All @@ -41,7 +41,7 @@

### 二、行情信息-Market

#### 1. 分红(dividend)
#### 1.分红(dividend)

| 字段 | 类型 | 注释 | 说明 |
| ---------------- | ------ | ---------- | ---------------------------- |
Expand All @@ -52,9 +52,9 @@



#### 2. 行情(market)
#### 2.行情(market)

##### 2.1 k线
##### 2.1k线

| 字段 | 类型 | 注释 | 说明 |
| -------------- | ------- | ---------- | ----------------------------------------- |
Expand All @@ -72,7 +72,7 @@
| turnover_ratio | decimal | 换手率(%) | 0.38 |
| pre_close | decimal | 昨收(元) | 10.00 |

##### 2.2 分时
##### 2.2分时

| 字段 | 类型 | 注释 | 说明 |
| ---------- | ------- | ---------- | ----------------------------------------- |
Expand All @@ -86,7 +86,7 @@
| volume | decimal | 成交量(股) | 64745722 |
| amount | decimal | 成交额(元) | 934285179.00 |

##### 2.3 实时
##### 2.3实时

| 字段 | 类型 | 注释 | 说明 |
| ---------- | ------- | ------------ | -------- |
Expand All @@ -98,11 +98,11 @@
| volume | decimal | 成交量(股) | 34452500 |
| amount | decimal | 成交额(元) | |

#### 3. 概念&指数行情(concept market)&(index market)
#### 3.概念&指数行情(concept market)&(index market)

概念和指数字典表一致

##### 3.1 k线
##### 3.1k线

| 字段 | 类型 | 注释 | 说明 |
| ---------- | ------- | ---------- | ----------------------------------------- |
Expand All @@ -118,7 +118,7 @@
| change | decimal | 涨跌额(元) | -0.02 |
| change_pct | decimal | 涨跌幅(%) | -0.16 |

##### 3.2 分时
##### 3.2分时

| 字段 | 类型 | 注释 | 说明 |
| ---------- | ------- | ---------- | ----------------------------------------- |
Expand All @@ -134,7 +134,7 @@
| change | decimal | 涨跌额(元) | -0.02 |
| change_pct | decimal | 涨跌幅(%) | -0.16 |

##### 3.3 实时
##### 3.3实时

| 字段 | 类型 | 注释 | 说明 |
| ---------- | ------- | ---------- | ----------------------------------- |
Expand All @@ -152,7 +152,7 @@

### 一、基本信息-Info

#### 1. 可转换债券代码信息(info)
#### 1.可转换债券代码信息(info)

| 字段 | 类型 | 注释 | 说明 |
| ------------- | ------- | ------------ | --------------- |
Expand All @@ -170,7 +170,7 @@

### 一、基本信息-Info

#### 1. 场内可交易etf(info)
#### 1.场内可交易etf(info)

| 字段 | 类型 | 注释 | 说明 |
| ---------- | ------- | ------------ | ----------------- |
Expand All @@ -182,7 +182,7 @@

## 舆情

#### 1. 股票解禁
#### 1.股票解禁

| 字段 | 类型 | 注释 | 说明 |
| ---------- | ------- | ---------------- | ---------------- |
Expand Down
41 changes: 41 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
home: true
title: Home
heroImage: /logo1x1.png
actions:
- text: 快速开始
link: /quickStart.md
type: primary
- text: 数据字典
link: /dataDic.md
type: secondary
features:
- title: 专注
details: 专注A股,专注量化,专注交易数据,为Ai(爱)发电,向阳而生。
- title: 持续
details: 为个人量化交易而生,满足个人股票量化需求,永久免费开源,保卫3000点......
- title: 高可用
details: 为了保证数据的高可用性,采用多数据源融合切换,保障数据持续在线。

footer: Apache Licensed | Copyright © 2023-present 1nchaos
---

### 快速安装

<CodeGroup>
<CodeGroupItem title="python" active>

~~~python
# 首次安装
pip install adata
# 指定镜像源
pip install adata -i http://mirrors.aliyun.com/pypi/simple/

# 升级版本
pip install -U adata
# 指定镜像源
pip install -U adata -i http://mirrors.aliyun.com/pypi/simple/
~~~
</CodeGroupItem>

</CodeGroup>
Loading

0 comments on commit fb75123

Please sign in to comment.