python call tushare get real-time stock market data daily

Interface: daily

Data Description: The trading day between 15:00 - 16:00 every day. This port is not right to re-market, it does not provide data during the suspension.

The transfer of explanation: the transfer of up to 200 basis points times per minute, each time the 4000 data, the equivalent of more than 18 years of history, as described in this article at the bottom of the points earning way.

Description: Get stock quotes data, or obtain market data through common interfaces, including the right to re-data before and after.

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

Input parameters

Name | Type | Required | Description

ts_code | str | N | stock code (choose one)

trade_date | str | N | transaction date (choose one)

start_date | str | N | start date (YYYYMMDD)

end_date | str | N | end date (YYYYMMDD)

Note: Dates are filled YYYYMMDD format such as 20181010

Output parameters

Name | Type | Description

ts_code | str | ticker

trade_date | str | Trading Date

open | float | opening price

high | float | Highest Price

low | float | Lowest Price

close | float | closing price

pre_close | float | Zuoshou price

change | float | Change Amount

pct_chg | float | Quote change (not suspended and if it is right to re-use your common market Interface)

vol | float | volume (hand)

amount | float | Turnover ($)

Interface Example

pro = ts.pro_api()

df = pro.daily(ts_code='000001.SZ', start_date='20180701', end_date='20180718')

or

df = pro.query('daily', ts_code='000001.SZ', start_date='20180701', end_date='20180718')

The whole history of history can also take a certain day by date

df = pro.daily(trade_date='20180810')

Sample data

ts_code trade_date  open  high  low  close  pre_close  change    pct_chg  vol        amount

0  000001.SZ  20180718  8.75  8.85  8.69  8.70      8.72  -0.02      -0.23  525152.77  460697.377

1  000001.SZ  20180717  8.74  8.75  8.66  8.72      8.73  -0.01      -0.11  375356.33  326396.994

2  000001.SZ  20180716  8.85  8.90  8.69  8.73      8.88  -0.15      -1.69  689845.58  603427.713

3  000001.SZ  20180713  8.92  8.94  8.82  8.88      8.88    0.00        0.00  603378.21  535401.175

4  000001.SZ  20180712  8.60  8.97  8.58  8.88      8.64    0.24        2.78  1140492.31  1008658.828

5  000001.SZ  20180711  8.76  8.83  8.68  8.78      8.98  -0.20      -2.23  851296.70  744765.824

6  000001.SZ  20180710  9.02  9.02  8.89  8.98      9.03  -0.05      -0.55  896862.02  803038.965

7  000001.SZ  20180709  8.69  9.03  8.68  9.03      8.66    0.37        4.27  1409954.60  1255007.609

8  000001.SZ  20180706  8.61  8.78  8.45  8.66      8.60    0.06        0.70  988282.69  852071.526

9  000001.SZ  20180705  8.62  8.73  8.55  8.60      8.61  -0.01      -0.12  835768.77  722169.579

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/11770424.html