Rechercher

PythonReactSEOPDF
OpenClaw

pywencai

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

coderwpf0 installations selon la source☆ 0 Étoiles du dépôtv1.0.0

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

SkillHub CLI

skillhub install coderwpf/pywencai

Examinez la source et la compatibilité, puis suivez les étapes d’installation.

Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.

Voir la source ↗Guides

Instructions

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...

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/coderwpf/pywencai
Version
1.0.0
Commit
12e46092eeb95b4a940f21d8c559e06d9237cc1b
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

Contenu extrait

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...

Skills associés

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.