### Install zzshare Source: https://github.com/zzquant/zzshare/blob/main/README.md Install the zzshare library using pip. For the latest development version, install directly from GitHub. ```bash pip install zzshare ``` ```bash pip install git+https://github.com/zzquant/zzshare.git ``` ```bash git clone https://github.com/zzquant/zzshare.git cd zzshare pip install -e . ``` -------------------------------- ### Get Daily Data for a Single Stock (Paginated) Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve daily historical data for a single stock using pagination. This example shows fetching 100 rows per page for three pages. ```python # Get daily data for a single stock (specified date range), paginated. For example: fetch 100 rows per page, get three pages. df = api.daily( ts_code='600871.SH', start_date='20250101', end_date='20260423' , offset=0, limit=100) df = api.daily( ts_code='600871.SH', start_date='20250101', end_date='20260423' , offset=100, limit=100) df = api.daily( ts_code='600871.SH', start_date='20250101', end_date='20260423' , offset=200, limit=100) ``` -------------------------------- ### Get Today's Hot Stocks for Limit Up Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve a list of hot stocks that hit the daily limit up today. ```python # Get today's hot stocks for limit up hot = api.uplimit_hot(date1='20250205') ``` -------------------------------- ### Get All Market Stocks (Default Exchange) Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve a list of all stocks in the market using the default exchange setting, specifying fields. ```python # Exchange is empty by default, querying the entire market (SS/KSH/SZ/GEM/BJ) df_all_default = api.stock_basic( exchange='', list_status='L', fields='ts_code,symbol,name,exchange,list_status' ) ``` -------------------------------- ### Get Top 100 Stocks by Sina Finance Popularity Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve the top 100 stocks based on their popularity on Sina Finance. ```python # Get the Top 100 stocks by Sina Finance popularity ths_top = api.ths_hot_top(date1='20250205', top_n=100) ``` -------------------------------- ### Initialize DataApi and Get Daily Data Source: https://github.com/zzquant/zzshare/blob/main/README.md Initialize the DataApi with an optional API token and retrieve daily stock market data for a specified code and date range. ```python from zzshare.client import DataApi # [Optional, for increased access frequency] Token can be obtained from the official website's profile page (https://quant.zizizaizai.com/me/profile) api = DataApi(token='your_api_token_here') # Get daily market data df = api.daily(ts_code='000001.SZ', start_date='20260302', end_date='20260331') print(df) ``` -------------------------------- ### Tushare Compatible: Get Stock List Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve a stock list using the Tushare compatible interface, specifying exchange and listing status. ```python # Tushare compatible: Get stock list basic = api.stock_basic(exchange='SSE', list_status='L', fields='ts_code,symbol,name,exchange,list_status') ``` -------------------------------- ### Get Trading Days Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve a list of trading days, specifying the number of days to fetch. ```python # Get trading days days = api.trade_days(days=30) ``` -------------------------------- ### Get STAR Market Stocks Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve a list of stocks from the STAR Market (KSH) with specified fields. ```python # Get STAR Market stocks (expanded market) df_ksh = api.stock_basic( exchange='KSH', fields='ts_code,symbol,name,market,exchange' ) ``` -------------------------------- ### Get All Stocks Data for a Trade Date (Paginated) Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve data for all stocks in the market on a specific trade date, fetching 10 records at a time. ```python # Get all stock data for a specific trade date (paginated, 10 records at a time) df = api.daily(trade_date='20260203',offset=0,limit=10) ``` -------------------------------- ### Get All Market Stocks (Explicit) Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve a list of all stocks across all markets (main board, STAR, GEM, Beijing) with specified fields. ```python # Get all markets (including Main Board/STAR/GEM/Beijing Stock Exchange) df_all = api.stock_basic( exchange='ALL', list_status='L', fields='ts_code,symbol,name,market,exchange,list_status' ) ``` -------------------------------- ### Get SSE Listed Stocks Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve a list of stocks listed on the Shanghai Stock Exchange (SSE) with specified fields. ```python # Get SSE listed stocks (default list_status='L') df_sse = api.stock_basic( exchange='SSE', list_status='L', fields='ts_code,symbol,name,exchange,list_status' ) ``` -------------------------------- ### Get Daily Data for a Single Stock (Single Trade Date) Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve daily market data for a single stock on a specific trade date. ```python # Get daily data for a single stock (specified single trade date) df = api.daily(ts_code='600871.SH', trade_date='20260203') ``` -------------------------------- ### Get All Stocks Data for a Trade Date (Full) Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve all available stock data for a specific trade date in a single request, using a limit of 6000. ```python # Get all stock data for a specific trade date (fetch all at once, limit=6000) df = api.daily(trade_date='20260203', limit=6000) ``` -------------------------------- ### Get Dragon Tiger List Data Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve data from the Dragon Tiger list, which shows significant trading activity. ```python # Get the Dragon Tiger list lhb = api.lhb_list(date1='20250205') ``` -------------------------------- ### Get Daily Data with Specific Fields Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve daily stock data for a specified stock and date range, selecting only specific fields to return. ```python # Specify returned fields df = api.daily( ts_code='600871.SH', start_date='20260201', end_date='20260203', fields='ts_code,trade_date,open,high,low,close,pct_chg,vol,amount' ) ``` -------------------------------- ### Get Daily Data for a Single Stock (Date Range) Source: https://github.com/zzquant/zzshare/blob/main/README.md Retrieve daily historical data for a single stock within a specified date range. Note the 1000-row limit per request and pagination for more data. ```python # Get daily data for a single stock (specified date range), within 1000 rows, use pagination for more. df = api.daily( ts_code='600871.SH', start_date='20260201', end_date='20260203') ``` -------------------------------- ### Query Stock List Source: https://github.com/zzquant/zzshare/blob/main/README.md Query the list of all stocks in the market, specifying fields to retrieve. ```python # Query the list of all stocks in the market (SS/KSH/SZ/GEM/BJ) stock_list = api.stock_basic(exchange='',fields='ts_code,name,exchang') ``` -------------------------------- ### Update zzshare Source: https://github.com/zzquant/zzshare/blob/main/README.md Update the zzshare library to the latest version using pip. ```bash pip install zzshare --upgrade ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.