python call tushare A-share listed companies to obtain basic information

Interface: stock_company

Description: Get the basic information of listed companies

Points: Users need at least 120 points can be retrieved, as described in the bottom of obtaining integral way

Note: tushare library download and initialization, please consult my previous article

Input parameters

Name | Type | Default display | Description

exchange | str | N | Code Exchange, the Shanghai Stock Exchange SSE SZSE the Shenzhen Stock Exchange, the default SSE

Output parameters

Name | Type | Default display | Description

ts_code | str | Y | ticker

exchange | str | Y | Exchange Symbol, SSE the Shanghai Stock Exchange SZSE the Shenzhen Stock Exchange

chairman | str | Y | legal representative

manager | str | Y | General Manager

secretary | str | Y | secretaries

reg_capital | float | Y | Registered Capital

setup_date | str | Y | Registration Date

province | str | Y | where the provinces

city ​​| str | Y | city

introduction | str | N | Profile

website | str | Y | Homepage

email | str | Y | e-mail

office | str | N | office

employees | int | Y | Employees

main_business | str | N | main business and products

business_scope | str | N | Business

Interface Example

pro = ts.pro_api()

#or

#pro = ts.pro_api('your token')

df = pro.stock_company(exchange='SZSE', fields='ts_code,chairman,manager,secretary,reg_capital,setup_date,province')

Data example

                ts_code chairman manager secretary  reg_capital setup_date province  \

0 000001.SZ Xie Yonglin Zhou Qiang, Hu Yuefei Guangdong 1.717041e + 06 19871222 

1 000002.SZ Zhu Xu Yu Liang Zhu Jiusheng Guangdong 1.103915e + 06 19840530 

2 000003.SZ Mazhong Hong Mazhong Hong Ann Wang 3.334336e + 04 19880208, Guangdong 

3 000004.SZ Li Linlin Li Linlin Xu Su 8.397668e + 03 19860505, Guangdong 

4 000005.SZ Ding Peng Zheng Luo Xiaochun column column 1.058537e + 05 19870730, Guangdong 

5 000006.SZ Zhao Hongwei Zhu Xinhong Du Guangdong flood 1.349995e + 05 19850525 

6 000007.SZ Wisdom Wisdom Yu Yu Chen Weibin 3.464480e + 04 19830311, Guangdong 

7 000008.SZ Wang Zhigang full-Bell Rock 2.818330e + 05 19891011 Beijing 

8 000009.SZ Chen Zheng Li Chen Zheng Li Guoshan Qing 2.149345e + 05 19830706, Guangdong 

9 000010.SZ Lide have Rong Jin Xiaogang 8.198547e + 04 19881231, Guangdong 

10 000011.SZ sound to Liu Fan Weiping Wang Hangjun Guangdong 5.959791e + 04 19830117 

11 000012.SZ Chen Lin Wang Jian Xin Yu Yang Guangdong 2.863277e + 05 19840910 

12 000013.SZ Li Nujiang Nguyen Khac vertical Liu Yu Min 3.033550e + 04 19920114, Guangdong 

13 000014.SZ Yong Wen Yi Wang Fan 2.017052e + 04 19870727, Guangdong 

14 000015.SZ places South-South Ma Xiang Jiangxiao An 1.598761e + 05 19880408, Guangdong 

15 000016.SZ Liu Fengxi Zhou Bin Wu Yongjun 2.407945e + 05 19801001, Guangdong 

tushare how to get points

    I do quantitative investment team in transition, for the trading strategy,

    We do have more idle transfer departure colleagues.

    600: Original 50, only 39 yuan

    1,500 points price: $ 140 only 109 yuan (sold out)

    2000 points: the original price of 190 yuan, only 149 yuan

    5000 points: the original price of 490 yuan, only 388 yuan (sold out).

    The small number even need to ask the Department of VX: a56746435 (Note tushare)

.

Guess you like

Origin www.cnblogs.com/tushare/p/11763484.html