Skip to main content

同花顺行业板块及概念板块数据本地化

Project description

boards

Release Status CI Status Documentation Status

同花顺概念板块与行业板块数据本地化项目

Features

自动同步

通过boards serve启动服务器之后,每日凌晨5时自动同步板块数据,并将其按当天日期保存。

注意我们使用了akshare来从同花顺获取板块数据。akshare的相应接口并没有时间参数,也即,所有同步的板块数据都只能是最新的板块数据。但如果在当天5时之后,同花顺更新的板块数据,则更新的数据将不会反映在当天日期为索引的数据当中。

板块操作

提供了根据板块代码获取板块名字(get_name)、根据名字查代码(get_code)、根据名字进行板块名的模糊查找(fuzzy_match_board_name增)等功能。

此外,我们还提供了filter方法,允许查找同时属于于多个板块的个股。

获取新增加的概念板块

新概念板块往往是近期炒作的热点。您可以通过ConceptBoard.find_new_concept_boards来查询哪些板块是新增加的。

此功能对行业板块无效。

获取新加入概念板块的个股

对某个概念而言,新加入的个股可能是有资金将要运作的标志。通过ConceptBoard.new_members_in_board可以查询新加入某个概念板块的个股列表。

命令行接口

提供了命令行接口,以查询服务状态(status), 启动服务(serve), 停止服务(stop)及以下命令:

查询新增概念板块

boards new_boards

查询概念板块新增个股

boards new_members

上述两个命令需要至少有两天以上的同步数据。

查询个股所属概念

boards show concepts 000001

列出所有的概念板块

boards show concepts

查询同时处于某几个概念板块中的个股

boards filter 医药 医疗器械 --without 跨境支付

其他

boards使用akshare来下载数据。下载速度较慢,且可能遇到服务器拒绝应答的情况。这种情况下,boards将会以退火算法,自动延迟下载速度重试5次,以保证最终能完全下载数据,且不被封IP。在此过程中,您可能看到诸如下面的信息输出,这是正常现象。

Document is empty, retrying in 30 seconds...
Document is empty, retrying in 30 seconds...
Document is empty, retrying in 30 seconds...
Document is empty, retrying in 60 seconds...
Document is empty, retrying in 120 seconds...

Credits

This package was created with the ppw tool. For more information, please visit the project page.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zillionare-ths-boards-0.1.4.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

zillionare_ths_boards-0.1.4-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file zillionare-ths-boards-0.1.4.tar.gz.

File metadata

  • Download URL: zillionare-ths-boards-0.1.4.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for zillionare-ths-boards-0.1.4.tar.gz
Algorithm Hash digest
SHA256 7711762e4262ee1f593c0bd442d875c366f13dea86992265bf2f9fd59f3f329b
MD5 57699ce85aefa519c79928b31d0a142b
BLAKE2b-256 7f0d38bd16fb7f70f102c46c58d5534601b238bbf96175262fef9d7aea40594c

See more details on using hashes here.

File details

Details for the file zillionare_ths_boards-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for zillionare_ths_boards-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 62f2a5348d28af749c2228ed79ec7517baded042c992a793fdeec1c24cc5bef4
MD5 15d6d441c4c05d4ea59995b5bd6b0d20
BLAKE2b-256 b141e194230f7fa824789ee3fdab8e2a848f9bd1f7be709fbd36a90a90a618f6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page