.. _api-data-api: ================== 数据查询接口 ================== .. module:: rqalpha.api 市场基础数据 ====================================================== all_instruments - 所有合约基础信息 ------------------------------------------------------ .. autofunction:: all_instruments instruments - 合约详细信息 ------------------------------------------------------ .. autofunction:: instruments get_trading_dates - 交易日列表 ------------------------------------------------------ .. autofunction:: get_trading_dates(start_date, end_date) get_previous_trading_date - 上一交易日 ------------------------------------------------------ .. autofunction:: get_previous_trading_date(date) get_next_trading_date - 下一交易日 ------------------------------------------------------ .. autofunction:: get_next_trading_date(date) get_yield_curve - 收益率曲线 ------------------------------------------------------ .. autofunction:: get_yield_curve(date=None, tenor=None) 行情 ================= history_bars - 某一合约历史 bar 数据 ------------------------------------------------------ .. autofunction:: history_bars current_snapshot - 当前快照数据 ------------------------------------------------------ .. autofunction:: current_snapshot(order_book_id) history_ticks - 指定合约的历史 tick 数据 ------------------------------------------------------ .. autofunction:: history_ticks get_price - 合约历史数据 ------------------------------------------------------ .. autofunction:: get_price get_price_change_rate - 历史涨跌幅 ------------------------------------------------------ .. autofunction:: get_price_change_rate 股票 ================= industry - 行业股票列表 ------------------------------------------------------ .. autofunction:: industry sector - 板块股票列表 ------------------------------------------------------ .. autofunction:: sector get_dividend - 获取分红数据 ------------------------------------------------------ .. autofunction:: get_dividend is_suspended - 全天停牌判断 ------------------------------------------------------ .. autofunction:: is_suspended(order_book_id) is_st_stock - ST股判断 ------------------------------------------------------ .. autofunction:: is_st_stock(order_book_id) get_split - 拆分数据 ------------------------------------------------------ .. autofunction:: get_split get_securities_margin - 融资融券信息 ------------------------------------------------------ .. autofunction:: get_securities_margin concept - 概念股列表 ------------------------------------------------------ .. autofunction:: concept get_margin_stocks - 融资融券列表 ------------------------------------------------------ .. autofunction:: get_margin_stocks get_shares - 流通股信息 ------------------------------------------------------ .. autofunction:: get_shares get_turnover_rate - 历史换手率 ------------------------------------------------------ .. autofunction:: get_turnover_rate get_factor - 因子 ------------------------------------------------------ .. autofunction:: get_factor get_industry - 行业股票列表 ------------------------------------------------------ .. autofunction:: get_industry get_instrument_industry - 股票行业分类 ------------------------------------------------------ .. autofunction:: get_instrument_industry get_stock_connect - 沪深港通持股信息 ------------------------------------------------------ .. autofunction:: get_stock_connect current_performance - 财务快报数据 ------------------------------------------------------ .. autofunction:: current_performance get_pit_financials_ex - 季度财务信息 ------------------------------------------------------ .. autofunction:: get_pit_financials_ex 指数 ================= index_components - 指数成分股 ------------------------------------------------------ .. autofunction:: index_components index_weights - 指数成分股权重 -------------------------------------------------------- .. autofunction:: index_weights 期货 ================= .. module:: rqalpha.api.futures futures.get_dominant - 期货主力合约 ------------------------------------------------------ .. autofunction:: get_dominant futures.get_member_rank - 期货会员持仓等排名 ------------------------------------------------------ .. autofunction:: get_member_rank futures.get_warehouse_stocks - 期货仓单数据 ------------------------------------------------------ .. autofunction:: get_warehouse_stocks futures.get_dominant_price - 期货主力合约连续合约行情数据 ------------------------------------------------------ .. autofunction:: get_dominant_price 宏观经济 ================= .. module:: rqalpha.api.econ econ.get_reserve_ratio - 存款准备金率 ------------------------------------------------------ .. autofunction:: get_reserve_ratio econ.get_money_supply - 货币供应量 ------------------------------------------------------ .. autofunction:: get_money_supply