Convert Figma logo to code with AI

LeekHub logoleek-fund

:chart_with_upwards_trend: 韭菜盒子——VSCode 里也可以看股票 & 基金实时数据,做最好用的投资插件 🐥

2,939
420
2,939
39

Top Related Projects

6,578

stock,股票系统。使用python进行开发。

12,780

TuShare is a utility for crawling historical data of China stocks

25,149

基于Python的开源量化交易平台开发框架

提供同花顺客户端/国金/华泰客户端/雪球的基金、股票自动程序化交易以及自动打新,支持跟踪 joinquant /ricequant 模拟交易 和 实盘雪球组合, 量化交易组件

Quick Overview

LeekHub/leek-fund is a Visual Studio Code extension for monitoring stock and fund data in real-time. It provides a convenient way for developers and investors to keep track of their investments directly within their coding environment, offering features like stock price alerts, fund tracking, and customizable watchlists.

Pros

  • Seamless integration with VS Code, allowing users to monitor investments without leaving their development environment
  • Real-time updates on stock and fund prices, providing up-to-date information
  • Customizable watchlists and alerts for personalized tracking
  • Open-source project with active community contributions

Cons

  • Limited to Visual Studio Code users, not available as a standalone application
  • Primarily focused on Chinese markets, which may limit its usefulness for international investors
  • Potential for distraction from coding tasks due to constant financial updates
  • Relies on third-party data sources, which may occasionally lead to data accuracy issues

Getting Started

To install and use the Leek Fund extension in Visual Studio Code:

  1. Open Visual Studio Code
  2. Go to the Extensions view (Ctrl+Shift+X)
  3. Search for "Leek Fund"
  4. Click "Install" on the Leek Fund extension
  5. Once installed, click "Reload" to activate the extension
  6. Access the Leek Fund sidebar by clicking on the leek icon in the Activity Bar
  7. Configure your watchlist by editing the leek-fund.stocks and leek-fund.funds settings in VS Code's settings.json file

Example configuration:

{
  "leek-fund.stocks": [
    "sh000001",
    "sh600519",
    "hk00700"
  ],
  "leek-fund.funds": [
    "001618",
    "161725"
  ]
}

After configuration, you'll see your selected stocks and funds displayed in the Leek Fund sidebar, with real-time updates on their prices and performance.

Competitor Comparisons

6,578

stock,股票系统。使用python进行开发。

Pros of stock

  • More comprehensive stock analysis tools and algorithms
  • Includes machine learning models for prediction
  • Supports multiple data sources and APIs

Cons of stock

  • Less user-friendly interface compared to leek-fund
  • Requires more technical knowledge to set up and use
  • Documentation is primarily in Chinese, limiting accessibility for non-Chinese speakers

Code Comparison

leek-fund:

const stockCode = '000001';
const url = `https://api.example.com/stock/${stockCode}`;
fetch(url)
  .then(response => response.json())
  .then(data => console.log(data));

stock:

import tushare as ts
ts.set_token('YOUR_TOKEN')
pro = ts.pro_api()
df = pro.daily(ts_code='000001.SZ', start_date='20210101', end_date='20210630')
print(df)

Summary

While stock offers more advanced features and analysis capabilities, leek-fund provides a more user-friendly experience for casual investors. stock is better suited for developers and data scientists looking to perform in-depth analysis, while leek-fund is ideal for users who want a simple, easy-to-use tool for tracking stocks and funds.

12,780

TuShare is a utility for crawling historical data of China stocks

Pros of tushare

  • More comprehensive data coverage, including stocks, funds, futures, and macroeconomic data
  • Supports both real-time and historical data retrieval
  • Well-documented API with extensive examples and tutorials

Cons of tushare

  • Requires a paid subscription for full access to all features
  • Steeper learning curve due to its extensive functionality
  • Less focus on visualization compared to leek-fund

Code Comparison

tushare:

import tushare as ts
ts.set_token('your_token_here')
pro = ts.pro_api()
df = pro.daily(ts_code='000001.SZ', start_date='20200101', end_date='20200331')

leek-fund:

const { getStockData } = require('leek-fund');
const stockData = await getStockData('sh000001');
console.log(stockData);

Summary

tushare offers a more comprehensive solution for financial data analysis in Python, while leek-fund provides a simpler, JavaScript-based approach focused on stock and fund data visualization. tushare's extensive features come with a steeper learning curve and potential cost, whereas leek-fund is more accessible for beginners and free to use.

25,149

基于Python的开源量化交易平台开发框架

Pros of vnpy

  • More comprehensive trading platform with support for multiple asset classes
  • Extensive documentation and active community support
  • Modular architecture allowing for easy customization and extension

Cons of vnpy

  • Steeper learning curve due to its complexity and extensive features
  • Requires more system resources and setup time compared to leek-fund

Code Comparison

leek-fund (JavaScript):

async function getStockData(codes) {
  const url = `https://api.example.com/stock?codes=${codes.join(',')}`;
  const response = await axios.get(url);
  return response.data;
}

vnpy (Python):

class StockDataEngine(BaseEngine):
    def __init__(self, event_engine: EventEngine):
        super().__init__(event_engine, "StockData")
        self.api = StockDataAPI()

    def get_stock_data(self, codes: List[str]) -> Dict:
        return self.api.query_stock_data(codes)

Summary

vnpy is a more robust and feature-rich trading platform suitable for professional traders and institutions, while leek-fund is a simpler, lightweight solution focused on stock and fund tracking for individual investors. vnpy offers greater flexibility and customization options but requires more technical expertise to set up and use effectively. leek-fund provides a more straightforward experience for basic stock and fund monitoring needs.

提供同花顺客户端/国金/华泰客户端/雪球的基金、股票自动程序化交易以及自动打新,支持跟踪 joinquant /ricequant 模拟交易 和 实盘雪球组合, 量化交易组件

Pros of easytrader

  • More comprehensive trading functionality, supporting multiple brokers and trading platforms
  • Offers automated trading capabilities and strategy implementation
  • Provides a wider range of financial instruments, including stocks, funds, and options

Cons of easytrader

  • More complex setup and configuration process
  • Steeper learning curve for users new to algorithmic trading
  • Less focus on real-time market data visualization compared to leek-fund

Code Comparison

easytrader:

user = easytrader.use('ths')
user.prepare('config/ths.json')
user.buy('162411', price=0.55, amount=100)

leek-fund:

const { getStockData } = require('leek-fund');
const data = await getStockData(['sh000001', 'sh000300']);
console.log(data);

Summary

easytrader is a more powerful and versatile trading tool, offering automated trading capabilities across multiple platforms. It's better suited for experienced traders looking to implement complex strategies. leek-fund, on the other hand, focuses on providing real-time market data and visualization, making it more accessible for beginners and those primarily interested in monitoring their investments.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

韭菜盒子

leek-fund(韭菜盒子)

韭菜盒子——VSCode 里也可以看股票 & 基金 & 期货实时数据,做最好用的投资插件。

Leek box - Monitor the real-time data of stock & fund & future in VSCode, Be the most excellent investment extension.

Marketplace Installs Rating

投资有风险,入市需谨慎!

Table of contents

投资其实就是一次心态修炼,稳住心态长期投资都会有收益的!!

功能特性

本插件具有以下特点:

  • 基金实时涨跌,实时数据,支持海外基展示
  • 股票实时涨跌,支持 A 股、港股、美股
  • 期货实时涨跌,支持国内期货
  • 底部状态栏信息
  • 开市自动刷新,节假日关闭轮询
  • 支持升序/降序排序、基金持仓金额升序/降序
  • 基金实时走势图和历史走势图
  • 基金排行榜
  • 基金持仓信息
  • 股市资金流向(沪深港通资金流向、北向资金、南向资金)
  • 支持 GUI 操作新增&删除 基金 和 股票
  • 通过 GUI 添加基金和股票时,支持模糊搜索匹配
  • 支持 GUI 设置涨跌颜色、状态栏股票自定义等
  • 雪球用户动态关注(雪球新闻)
  • 自定义涨跌图标(吃面、吃肉、烤韭菜、烤肉、喝酒)
  • 基金持仓金额设置(用于动态计算盈亏)
  • 基金盈亏展示(根据实时基金涨跌情况动态实时计算盈亏)
  • 支持维护持仓成本价,自动计算收益率
  • 基金趋势统计图
  • 基金支持分组展示
  • 股票支持分组展示(A 股、港股、美股)
  • 股票涨跌提醒设置
  • 状态栏、侧栏支持自定义模板格式
  • OUTPUT 面板支持选股宝异动快讯,金十资讯
  • 数据中心>牛熊风向标数据统计
  • 新增支持期货
  • 外汇牌价
  • 欢迎 PR Github 源码

安装使用

安装插件:VisualStudio - Marketplace,VSCode 最低版本要求:^1.44.0

插件介绍

概览

韭菜中心

插件设置

添加/删除股票或基金时,建议使用新增按钮模糊搜索添加(支持名称和编码搜索),详细可查看 韭菜盒子使用文档

自定义配置在 Settings 视图下:

社区交流

因恶意举报,不再提供微信官方群聊,可加电报群:https://t.me/+P1p3nJoqKR45MzQ1

公众号:

微信公众号

知识星球(赞助插件):

PR 贡献开发者可以联系我邀请直接加入

知识星球(赞助插件)

Core Contributors

感谢 PR

更多贡献者 contributors,欢迎来贡献 PR~

Changelog

CHANGELOG

代码目录说明

历史原因,仓库中类文件并没有以PascalCase规范,导致有些文件不好区分是函数方式书写还是面向对象类的写法。


src
├── data                        # 静态数据
│   └── fundSuggestData.ts      # 基金数据,执行 `node ./demo/fundSuggestList.js` 更新生成
├── explorer                    # 侧边栏核心代码
│   ├── binanceProvider.ts      # 数字货币
│   ├── binanceService.ts
│   ├── forexProvider.ts        # 外汇
│   ├── forexService.ts
│   ├── fundProvider.ts         # 基金
│   ├── fundService.ts
│   ├── leekService.ts
│   ├── newsProvider.ts         # 雪球新闻
│   ├── newsService.ts
│   ├── stockProvider.ts        # 股票
│   └── stockService.ts
├── extension.ts                # 插件初始化入口
├── globalState.ts              # 全局缓存,插件激活到销毁周期内的变量缓存
├── output                      # Terminal 视图下的OUTPUT栏输出新闻
│   └── flash-news
├── registerCommand.ts          # 注册命令
├── shared                      # 工具函数或者类
│   ├── WVMessageUtils.ts
│   ├── constant.ts
│   ├── holidayHelper.ts
│   ├── leekConfig.ts
│   ├── leekTreeItem.ts
│   ├── remindNotification.ts
│   ├── telemetry.ts
│   ├── typed.ts
│   └── utils.ts
├── statusbar                   # 状态栏
│   ├── Profit.ts
│   └── statusBar.ts
└── webview   # webview 页面

赞助支持一下 ↓↓

Buy me a coffee

License

LICENSE