quantskills/agent-quantspace/ingest

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when tasks need PandaData/PandaAI stock, fund, ETF, index, or futures data, reference data, adjustment factors, futures tick downloads, or symbol conversion.

Install

npx vskill@latest install quantskills/agent-quantspace/ingest

SKILL.md

PandaData Ingest

Use this skill when a task needs stock, listed-fund/ETF, index, or futures market data; reference data; adjustment factors; or futures tick data from the PandaData SDK.

Prerequisites

  • Install optional SDK dependencies with uv sync --extra panda_data.
  • Set PANDA_DATA_USERNAME and PANDA_DATA_PASSWORD in the environment.
  • PandaDataClient fetches data only. Persist normalized OHLCV with

skills.store.data_manager.DataManager.

Public API

python
from skills.ingest import PandaDataClient
from skills.ingest import to_panda_data_symbol, to_quantspace_symbol

PandaDataClient accepts QuantSpace symbols such as SHSE.510300 and panda_data native symbols such as 510300.SH. Returned symbol columns are converted back to QuantSpace format by default.

Wrapped Endpoints

Bars

  • fetch_market_data(symbol, start_date, end_date, type="stock")
  • fetch_market_min_data(symbol, start_date, end_date, symbol_type="stock", frequency="1m")
  • fetch_hk_daily(symbol, start_date, end_date)
  • fetch_us_daily(symbol, start_date, end_date)
  • get_fund_daily(start_date, end_date, symbol=...)
  • get_fund_daily_pre(start_date, end_date, symbol=...)
  • get_fund_daily_post(start_date, end_date, symbol=...)

Reference

  • get_stock_detail
  • get_fund_detail
  • get_index_detail
  • get_index_indicator
  • get_index_weights
  • get_industry_detail
  • get_industry_constituents
  • get_stock_industry
  • get_concept_list
  • get_concept_constituents
  • get_adj_factor

ETF Creation/Redemption

  • get_fund_etf_cr_limits
  • get_fund_etf_cr_net
  • get_fund_etf_constituents
  • get_fund_etf_cr

Listed ETFs and LOFs are funds, not A-share stocks. Fetch their bars with get_fund_daily*; do not send them to get_stock_daily, get_factor, or fetch_market_data(..., type="stock"). The get_fund_etf_* methods provide creation/redemption data and are not price-bar replacements.

The three get_fund_daily* methods accept an inclusive YYYYMMDD range of any length. PandaDataClient automatically sends contiguous requests of at most 365 calendar days and concatenates the returned frames in request order. This handling applies only to listed-fund daily bars, not get_fund_etf_* creation/redemption endpoints.

Futures Tick Utility

skills.ingest.panda_future_tick contains offline-testable helpers and CLI building blocks for PandaData futures tick downloads.

Progressive References

Detailed PandaAI docs are split by task under references/. Open only the specific file needed for the endpoint you are using.

ReferenceOpen when you needMain methods
pandaai-01-overview-setup.mdsetup and authinit_token
pandaai-02-market-daily.mdA-share/index/futures daily barsget_market_data
pandaai-03-market-minute.mdA-share/index/futures intraday barsget_market_min_data
pandaai-04-market-hk-us.mdHK/US daily barsget_hk_daily, get_us_daily
pandaai-05-reference-securities.mdstock/index metadataget_stock_detail, get_index_detail
pandaai-06-reference-classification-index.mdclassifications and index weightsget_index_weights
pandaai-07-equity-market-events.mdmarket eventsget_lhb_list, get_margin
pandaai-08-equity-corporate-info.mdholders and corporate infoget_top_holders
pandaai-09-financial-reports.mdfinancial reportsget_fina_reports
pandaai-10-factors-adjustment.mdfactors and adjustment eventsget_factor, get_adj_factor
pandaai-11-trading-tools.mdcalendars and trade listsget_trade_cal, get_trade_list
pandaai-12-futures.mdfutures metadata and dominant contractsget_future_detail
pandaai-13-funds-etf.mdfund metadata, listed-fund bars, ETF creation/redemptionget_fund_detail, get_fund_daily*, get_fund_etf_*

Recipes

Daily A-share bars

python
from skills.ingest import PandaDataClient
client = PandaDataClient()
df = client.fetch_market_data("SHSE.600000", "20230101", "20231231", type="stock")

Daily ETF bars

python
from skills.ingest import PandaDataClient
client = PandaDataClient()
df = client.get_fund_daily(
"20250610",
"20250613",
symbol="SHSE.510300",
fields=["open", "high", "low", "close", "volume", "amount"],
)

Use get_fund_daily_pre or get_fund_daily_post when the research explicitly requires forward- or backward-adjusted fund prices.

The market-data API frequency remains the real bar interval. For example, adjusted daily bars still use freq="1d" (or the endpoint's daily API); do not send "1d_adj" to an ingest endpoint as a frequency. 1d_adj is only the QuantSpace storage directory/data-set name for adjusted 1d bars. The same rule applies to other intervals: a directory such as 5m_adj contains adjusted 5m bars, while the ingest frequency is still 5m.

Normalize and save bars

python
import pandas as pd
from skills.ingest import PandaDataClient
from skills.store.data_manager import DataManager
client = PandaDataClient()
raw = client.fetch_market_data("SHSE.600000", "20230101", "20231231", type="stock")
bars = raw.copy()
bars["eob"] = pd.to_datetime(bars["date"])
bars = bars.set_index("eob")[["open", "high", "low", "close", "volume"]].sort_index()
DataManager().save_symbol("SHSE.600000", bars, frequency="1d", source="panda_data")

When saving adjusted bars, pass the storage directory key, for example frequency="1d_adj", to DataManager; the fetch frequency stays 1d.

The same store boundary applies to listed funds: normalize the returned date column to the timezone-naive eob index, keep OHLCV columns, and call DataManager.save_symbol. PandaDataClient never writes local files.

Symbol conversion

python
from skills.ingest import to_panda_data_symbol, to_quantspace_symbol
assert to_panda_data_symbol("SHSE.510300") == "510300.SH"
assert to_quantspace_symbol("RB_DOMINANT.SHF") == "SHFE.RB99"

CLI command reference

<!-- BEGIN GENERATED: qs commands -->

Transport: --input-json FILE|-, --preview N, and --log-level LEVEL; flags override JSON. Use --print-template [FIELD] for fillable templates.

Shared parameter groups
OutputOptions
OptionType / defaultDescription
--outputpath? / nullExplicit output path outside managed store namespaces.
--overwriteboolean / falseAllow replacing an existing output artifact.
--data-rootpath? / nullManaged data root; otherwise QUANTSPACE_DATA_ROOT or repository data/.
uv run qs ingest bars

Fetch stock, index, future, fund, HK or US bars; optionally store them.

Priority: P0. Side effects: network, writes-output, writes-store.

Shared parameters: OutputOptions.

OptionType / defaultDescription
--asset`stock\index\future\fund\hk\us / required`Asset class. Listed ETF and LOF are fund, not stock.
--symbolslist[string] / factoryQuantSpace (SHSE.510300) or native (510300.SH) symbols; repeat flag or comma-separate.
--symbols-filepath? / nullText lines or JSON list of symbols, instead of symbols.
--startstring / requiredInclusive start date: YYYY-MM-DD or YYYYMMDD.
--endstring? / nullInclusive end date: YYYY-MM-DD or YYYYMMDD; defaults to today.
--freq`1d\1m\5m\15m\60m / 1d`Real bar interval sent to PandaData (never 1d_adj). Only stock, index (1m only) and future have minute bars; the provider caps rows per minute request, so split long minute ranges across runs.
--adjust`none\pre\post / none`Fund price adjustment: none, pre (forward) or post (backward). Fund only.
--fieldslist[string] / factorySDK fields subset; empty returns all columns.
--indicatorstring? / nullStock pool code for daily stock bars only; empty means all stocks.
--stboolean / trueInclude ST stocks; --no-st excludes them. Daily stock bars only.
--save-frequencystring? / nullMarket store directory under data/market, for example 1d or 1d_adj (adjusted 1d bars). Without --write this is a dry run that only reports planned paths.
--writeboolean / falseWrite bars into data/market/<save-frequency>/<symbol>.parquet; requires --save-frequency.

Output data fields: asset, freq, adjust, start, end, requested_symbols, dry_run, saved, rows, columns, symbols, no_data, output, target_frequency, planned_paths, written_paths, preview.

Inspect schemas: uv run qs schema ingest.bars (add --part input|output or --file-field FIELD).

uv run qs ingest adj-factor

Fetch stock adjustment-factor events; optionally store them per symbol.

Priority: P1. Side effects: network, writes-output, writes-store.

Shared parameters: OutputOptions.

OptionType / defaultDescription
--symbolslist[string] / factoryStock symbols (QuantSpace or native); empty queries the whole market.
--symbols-filepath? / nullText lines or JSON list of symbols, instead of symbols.
--startstring? / nullInclusive start date: YYYY-MM-DD or YYYYMMDD.
--endstring? / nullInclusive end date: YYYY-MM-DD or YYYYMMDD.
--fieldslist[string] / factorySDK fields subset; empty returns all columns.
--writeboolean / falseWrite one data/adj_factor/<symbol>.parquet per symbol (ex_date index). A bounded --start/--end stores only the events in that range. With neither --output nor --write the command is a dry run: nothing is fetched.

Output data fields: scope, requested_symbols, start, end, dry_run, saved, rows, columns, symbols, no_data, output, planned_paths, path_template, written_paths, preview.

Inspect schemas: uv run qs schema ingest.adj-factor (add --part input|output or --file-field FIELD).

uv run qs ingest ref stock-detail

Fetch stock basic information (get_stock_detail).

Priority: P1. Side effects: network, writes-output.

Shared parameters: OutputOptions.

OptionType / defaultDescription
--symbolslist[string] / factoryStock symbols; empty returns all. Symbols (QuantSpace or native); repeat flag or comma-separate.
--marketstring / cnMarket code passed to get_stock_detail.
--statusinteger? / nullListing status filter.
--fieldslist[string] / factorySDK fields subset; empty returns all columns.

Output data fields: endpoint, rows, columns, output, preview.

Inspect schemas: uv run qs schema ingest.ref.stock-detail (add --part input|output or --file-field FIELD).

uv run qs ingest ref fund-detail

Fetch fund and ETF metadata (get_fund_detail).

Priority: P1. Side effects: network, writes-output.

Shared parameters: OutputOptions.

OptionType / defaultDescription
--symbolslist[string] / factoryFund symbols, listed or *.OF. Symbols (QuantSpace or native); repeat flag or comma-separate.
--exchangelist[string] / factoryExchange filter, SH or SZ.
--typelist[string] / factoryFund type filter.
--operation-modelist[string] / factoryOperation mode filter.
--etf-lof-typelist[string] / factoryETF or LOF subtype; ETF discovers listed ETFs.
--is-class-fundlist[integer] / factoryClass-fund flag filter, 0 or 1.
--index-fund-typelist[string] / factoryIndex fund type filter.
--statuslist[string] / factoryListing status filter, e.g. L.
--fund-statuslist[string] / factoryFund status filter.
--fieldslist[string] / factorySDK fields subset; empty returns all columns.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
57
Repository forks
11
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/quantskills/agent-quantspace/ingest/badge)](https://verified-skill.com/skills/quantskills/agent-quantspace/ingest)

Something wrong with this skill or its page? Tell us.