成分股与市场行情
IndexStockMapping
¶
字段映射 指数成分股数据
IndexStock
¶
IndexStock(
index_name: Optional[
Literal["沪深300", "上证50", "中证500", "科创50"]
] = None,
size: Optional[int] = 50,
verbose: Optional[bool] = False,
logger: Optional[Callable] = None,
**kwargs: Any
)
查询 指数成分股数据
Notes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index_name
|
Optional[Literal['沪深300', '上证50', '中证500', '科创50']]
|
指数名称 |
None
|
size
|
Optional[int]
|
返回条数 |
50
|
verbose
|
Optional[bool]
|
是否打印日志 |
False
|
logger
|
Optional[Callable]
|
自定义日志 |
None
|
**kwargs
|
Any
|
其他参数 |
{}
|
Source code in wisecon\stock\index\index.py
CurrentMarketMapping
¶
字段映射 ETF/LOF/Stock
当前市场行情
CurrentMarket
¶
CurrentMarket(
market: TypeMarket = "ETF",
sort_by: Optional[str] = "f3",
page_size: Optional[int] = 20,
page_number: Optional[int] = 1,
verbose: Optional[bool] = False,
logger: Optional[Callable] = None,
**kwargs: Any
)
查询 ETF/LOF/Stock
当前市场行情
Notes
from wisecon.stock.market import *
# 查询ETF市场当前行情
data = CurrentMarket(market="ETF",).load()
data.to_frame(chinese_column=True)
# 查询LOF市场当前行情
data = CurrentMarket(market="LOF",).load()
data.to_frame(chinese_column=True)
# 查询封闭基金当前行情
data = CurrentMarket(market="封闭基金",).load()
data.to_frame(chinese_column=True)
# 查询沪深京A股当前行情
data = CurrentMarket(market="沪深京A股",).load()
data.to_frame(chinese_column=True)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
market
|
TypeMarket
|
市场类型: |
'ETF'
|
sort_by
|
Optional[str]
|
排序字段 |
'f3'
|
page_size
|
Optional[int]
|
每页数据量 |
20
|
page_number
|
Optional[int]
|
页码 |
1
|
verbose
|
Optional[bool]
|
是否打印日志 |
False
|
logger
|
Optional[Callable]
|
自定义日志打印函数 |
None
|
**kwargs
|
Any
|
其他参数 |
{}
|