搜索

PythonReactSEOPDF
OpenClaw

pywencai

Query Chinese A-share stock data from Tonghuashun Wencai (同花顺问财) using natural language.

coderwpf0 来源安装数☆ 0 仓库 Starsv1.0.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install coderwpf/pywencai

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

PyWenCai (同花顺问财数据查询)

Query Chinese A-share stock market data from 同花顺问财 using natural language queries via Python.

⚠️ Cookie required: You must provide a valid cookie from the Wencai website. See How to get cookie below.

Prerequisites

  • Python 3.7+
  • Node.js v16+ (pywencai executes JS internally)
  • pip package manager

Install

pip install pywencai --upgrade

How to get cookie

  1. Open https://www.iwencai.com/ in your browser and log in.
  2. Open DevTools (F12) → Network tab.
  3. Perform any query on the page.
  4. Find the request to iwencai.com, copy the Cookie header value.
  5. Use that string as the cookie parameter.

Basic usage

import pywencai

res = pywencai.get(query='今日涨幅前10', cookie='your_cookie_here')
print(res)

API: pywencai.get(**kwargs)

Required parameters
  • query — Natural language query string, e.g. '今日涨停股票', '市盈率小于20的股票'
  • cookie — Cookie string from Wencai website (required)
Optional parameters
  • sort_key — Column name to sort by, e.g. '退市@退市日期'
  • sort_order — 'asc' or 'desc'
  • page — Page number (default: 1)
  • perpage — Items per page (default & max: 100)
  • loop — True to fetch all pages; or integer n to fetch n pages
  • query_type — Query category (default: 'stock'). Options:
    • stock — A股股票
    • zhishu — 指数
    • fund — 基金
    • hkstock — 港股
    • usstock — 美股
    • threeboard — 新三板
    • conbond — 可转债
    • insurance — 保险
    • futures — 期货
    • lccp — 理财产品
  • retry — Retry count on failure (default: 10)
  • sleep — Seconds between requests when looping (default: 0)
  • log — True to print logs to console
  • pro — True for paid version (requires cookie)
  • no_detail — True to always return DataFrame or None (never dict)
  • find — List of stock codes to prioritize, e...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/coderwpf/pywencai
Version
1.0.0
Commit
12e46092eeb95b4a940f21d8c559e06d9237cc1b
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# PyWenCai (同花顺问财数据查询)

Query Chinese A-share stock market data from [同花顺问财](https://www.iwencai.com/) using natural language queries via Python.

> ⚠️ **Cookie required**: You must provide a valid cookie from the Wencai website. See [How to get cookie](#how-to-get-cookie) below.

## Prerequisites

- **Python 3.7+**
- **Node.js v16+** (pywencai executes JS internally)
- **pip** package manager

## Install

```bash
pip install pywencai --upgrade
```

## How to get cookie

1. Open https://www.iwencai.com/ in your browser and log in.
2. Open DevTools (F12) → Network tab.
3. Perform any query on the page.
4. Find the request to `iwencai.com`, copy the `Cookie` header value.
5. Use that string as the `cookie` parameter.

## Basic usage

```python
import pywencai

res = pywencai.get(query='今日涨幅前10', cookie='your_cookie_here')
print(res)
```

## API: `pywencai.get(**kwargs)`

### Required parameters

- **query** — Natural language query string, e.g. `'今日涨停股票'`, `'市盈率小于20的股票'`
- **cookie** — Cookie string from Wencai website (required)

### Optional parameters

- **sort_key** — Column name to sort by, e.g. `'退市@退市日期'`
- **sort_order** — `'asc'` or `'desc'`
- **page** — Page number (default: `1`)
- **perpage** — Items per page (default & max: `100`)
- **loop** — `True` to fetch all pages; or integer `n` to fetch `n` pages
- **query_type** — Query category (default: `'stock'`). Options:
  - `stock` — A股股票
  - `zhishu` — 指数
  - `fund` — 基金
  - `hkstock` — 港股
  - `usstock` — 美股
  - `threeboard` — 新三板
  - `conbond` — 可转债
  - `insurance` — 保险
  - `futures` — 期货
  - `lccp` — 理财产品
- **retry** — Retry count on failure (default: `10`)
- **sleep** — Seconds between requests when looping (default: `0`)
- **log** — `True` to print logs to console
- **pro** — `True` for paid version (requires cookie)
- **no_detail** — `True` to always return `DataFrame` or `None` (never dict)
- **find** — List of stock codes to prioritize, e...

相关技能

OpenClaw

x402hub

capncoconut

Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...

OpenClaw

claw

capevace

Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.

OpenClaw

captchas-openclaw

captchasco

OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.