QUANTAXIS的数据获取部分

具体可以参见jupyter notebook

1. 从网上获取 | FROM WEBSITE

QA.QAfetch_get 系列:

从网上获取数据

1.1. 股票/日线 | STOCK_CN/DAY

QA.QA_util_log_info('日线数据')
QA.QA_util_log_info('不复权')  
data=QA.QAFetch.QATdx.QA_fetch_get_stock_day('00001','2017-01-01','2017-01-31')

QA.QA_util_log_info('前复权')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_day('00001','2017-01-01','2017-01-31','01')

QA.QA_util_log_info('后复权')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_day('00001','2017-01-01','2017-01-31','02')

QA.QA_util_log_info('定点前复权')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_day('00001','2017-01-01','2017-01-31','03')


QA.QA_util_log_info('定点后复权')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_day('00001','2017-01-01','2017-01-31','04')

1.2. 股票/分钟线 | STOCK_CN/MIN

QA.QA_util_log_info('分钟线')
QA.QA_util_log_info('1min')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_min('000001','2017-07-01','2017-08-01','1min')

QA.QA_util_log_info('5min')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_min('000001','2017-07-01','2017-08-01','5min')

QA.QA_util_log_info('15min')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_min('000001','2017-07-01','2017-08-01','15min')

QA.QA_util_log_info('30min')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_min('000001','2017-07-01','2017-08-01','30min')

QA.QA_util_log_info('60min')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_min('000001','2017-07-01','2017-08-01','60min')

1.3. 股票/权息数据 | STOCK_CN/XDXR

QA.QA_util_log_info('除权除息')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_xdxr('00001')

1.4. 股票/列表 | STOCK_CN/LIST

QA.QA_util_log_info('股票列表')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_list('stock')

1.5. 指数/列表 | IDNEX_CN/LIST

QA.QA_util_log_info('指数列表')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_list('index')

1.6. 指数/日线 | INDEX_CN/DAY

QA.QA_util_log_info('指数日线')
data=QA.QAFetch.QATdx.QA_fetch_get_index_day('000001','2017-01-01','2017-09-01')

1.7. 指数/分钟线 | INDEX_CN/MIN

QA.QA_util_log_info('指数分钟线')
QA.QA_util_log_info('1min')
data=QA.QAFetch.QATdx.QA_fetch_get_index_min('000001','2017-07-01','2017-08-01','1min')


QA.QA_util_log_info('5min')
data=QA.QAFetch.QATdx.QA_fetch_get_index_min('000001','2017-07-01','2017-08-01','5min')


QA.QA_util_log_info('15min')
data=QA.QAFetch.QATdx.QA_fetch_get_index_min('000001','2017-07-01','2017-08-01','15min')

1.8. 期货/日线 | FUTURE DAY


QA.QA_util_log_info('期货日线')

QA.QAFetch.QATdx.QA_fetch_get_future_day('RBL8','2018-08-01','2018-08-30')

1.9. 最新交易价格STOCK | LAST PRICE

QA.QA_util_log_info('最后一次交易价格')
QA.QA_util_log_info('参数为列表')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_latest(['000001','000002'])


QA.QA_util_log_info('参数为一只股票')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_latest('000001')

1.10. 实时上下五档 STOCK_CN/QUOTATION

QA.QA_util_log_info('实时价格')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_realtime(['000001','000002'])

1.11. 分笔数据 | STOCK_CN/TRANSACTION

QA.QA_util_log_info('分笔成交')

历史分笔
data=QA.QAFetch.QATdx.QA_fetch_get_stock_transaction('000001','2001-01-01','2001-01-15')
实时分笔(当天)
data=QA.QAFetch.QATdx.QA_fetch_get_stock_transaction_realtime('000001')

1.12. 版块数据 | STOCK_CN/BLOCK

QA.QA_util_log_info('板块数据')
data=QA.QAFetch.QATdx.QA_fetch_get_stock_block()

1.13 期货分钟线 | Future_Min


QA.QAFetch.QATdx.QA_fetch_get_future_min('RBL8','2018-08-30','2018-09-06','1min')

2. 从数据库获取 | FROM LOCALHOST

QA.QAfetch 系列

从本地数据库获取数据

2.1. 股票日线 | STOCK_CN/DAY

QA_fetch_stock_day_adv(code,start,end)

2.2. 股票分钟线 | STOCK_CN/MIN

QA_fetch_stock_min_adv(code,start,end,frequence='1min') # frequence可以选1min/5min/15min/30min/60min

2.3. 指数/基金日线 | INDEX_CN,ETF_CN/DAY

QA_fetch_index_day_adv(code,start,end)

2.4. 指数/基金分钟线 | INDEX_CN,ETF_CN/MIN

QA_fetch_index_min_adv(code,start,end,frequence='1min') # frequence可以选1min/5min/15min/30min/60min

2.5. 板块 | STOCK_CN/ BLOCK

QA_fetch_stock_block_adv(code)

results matching ""

    No results matching ""