Skip to content
Back to skills

Akshare Margin

ASecurity

AkShare 融资融券数据,提供两融余额、杠杆资金监控、两融标的筛选。当用户需要通过 AkShare 获取融资融券数据时使用。

  • 232 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 7, 2026
developmentpythonbash

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 5 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add aifinlab/FinClaw --skill akshare-margin --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Akshare Margin?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Akshare Margin
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aifinlab-akshare-margin/badge)](https://www.skillsdirectory.com/skills/aifinlab-akshare-margin)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: AkShare 融资融券数据,提供两融余额、杠杆资金监控、两融标的筛选。当用户需要通过 AkShare 获取融资融券数据时使用。
---

# akshare-margin

融资融券数据查询与分析 Skill。提供A股市场融资融券余额、杠杆资金监控、两融标的筛选等功能。

## 功能

- 沪深两市融资融券余额查询
- 个股融资融券明细
- 两融标的股筛选
- 杠杆资金流向分析
- 融资买入/偿还排行

## 使用示例

查询沪深两市融资融券余额:
```bash
python scripts/margin_balance.py
```

查询个股融资融券数据:
```bash
python scripts/margin_stock.py --code 000001
```

查询融资买入排行:
```bash
python scripts/margin_rank.py --type buy --limit 20
```

查询融券卖出排行:
```bash
python scripts/margin_rank.py --type sell --limit 20
```

## 数据来源

- AkShare 融资融券数据接口

## 依赖

- Python 3.8+
- akshare
- pandas
- argparse

## 安装依赖

```bash
pip install akshare pandas
```

## 输出说明

- 融资余额:投资者向券商借钱买入股票的未还金额
- 融券余额:投资者向券商借股卖出的未还金额
- 融资融券余额 = 融资余额 + 融券余额
- 融资买入额:当日融资买入金额
- 融资偿还额:当日融资偿还金额
- 净买入 = 融资买入额 - 融资偿还额

## License

MIT

Files in this skill

  • SKILL.md1.4 KB
  • scripts/margin_balance.py3.2 KB
  • scripts/margin_flow.py3.1 KB
  • scripts/margin_rank.py4.7 KB
  • scripts/margin_stock.py3.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…