Skip to main content

download financial data

None

Project description

  • You will never make

  • Money beyond your cognition

  • Unless you rely on luck

  • But the money made by luck

  • In the end, they often lose by strength

  • This is a necessity

  • Every penny you make

  • Is the realization of your perception of the world

  • Every penny you lose

  • Because of a flawed perception of the world

  • The biggest fairness in this world is: when a person’s wealth is greater than what they know, there are 100 ways in this society to harvest you

  • Until your cognition and wealth match

Target Users

  • anyone

Installation

pip install chives

Upgrade

pip install chives –upgrade

Quick Start

from chives import ChivesDemo

chi = ChivesDemo()
print(chi.keys)                                                             # 查看Chives板块下载列表

# 切换到本地mysql数据库
sqlUrl = chi.switchDB('user:password', 'ip:port', 'dbname')

# 查询板块列表
df=chi.board('债券指数',1)              # 1:实时下载,2:数据库下载,3:数据库上传
print(df)

# 查询个股信息
df=chi.does('1.600322',4)                   # 4:当天分时数据,5、网友股评,6-11、日线分钟线,12,个股基础信息
print(df)

# 沪深基础信息
df = chi.base('20200224')                   # 传入日期参数格式:yyyymmdd
print(df)

return:

       代码     名称     最新价   涨跌幅   涨跌额  ...   流通市值  60日涨跌幅 年初至今涨跌幅 涨速 5分钟涨跌
0  000022   沪公司债  204.88  0.04  0.09  ...      -    1.42    0.99  0     0
1  000013   企债指数  240.99  0.04   0.1  ...      -    1.45    0.95  0     0
2  000061  沪企债30  159.91  0.04  0.06  ...      -    1.44    1.21  0     0
3  000012   国债指数  178.82  0.01  0.01  ...      -    1.43    0.87  0     0
4  395032   债券回购       -     -     -  ...      -       -       -  -     -
5  395031     国债       -     -     -  ...      -       -       -  -     -
6  395022    企业债       -     -     -  ...      -       -       -  -     -
7  395021  可 转 债       -     -     -  ...      -       -       -  -     -
8  399481   企债指数  128.32 -0.01 -0.01  ...      -    0.12    0.21  0     0
[9 rows x 24 columns]


          时间   成交价    手数  买卖
0      91502  2660    59   4
1      91505  2650   101   4
2      91553  2640   367   4
3      91708  2650   162   4
4      92459  2660   564   4
5      92504  2660   564   2
6      93002  2650   703   1
7      93005  2650   152   2
8      93008  2660   504   2
9      93011  2650   113   1
10     93014  2650     4   2



      index     f43     f57    f58 ...        f277      f278 f279 f288
0         0   17.14  603719    N良品 ...           -         -    0    0
1         1   77.06  688159   有方科技 ...    91679495  22920000    1    0
2         2   101.1  688298   东方生物 ...   120000000  30000000    1    0
3         3   186.5  688058    宝兰德 ...    40000000  10000000    1    0
4         4    69.5  688300   联瑞新材 ...    85973400  21493400    1    0
5         5    3.14  300247   融捷健康 ...           -         -    0    0
6         6    3.25  002662   京威股份 ...           -         -    0    0
7         7    3.91  000413   东旭光电 ...           -         -    0    0

Project details

None

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

Chives-0.0.1-py3-none-any.whl (403.8 kB view hashes)

Uploaded Python 3

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