open-index/open-npm huggingface dataset:
npm package: @shuchang/futu-mcp-server
Description: 富途API MCP服务器 - 完整的股票数据和交易功能MCP工具集
Author: TradeMind Team
Latest version: 1.1.13

# @shuchang/futu-mcp-server

富途API MCP服务器 - 完整的股票数据和交易功能MCP工具集

## 快速开始

使用 npx 直接运行（推荐）：

```bash
npx @shuchang/futu-mcp-server
```

或者全局安装：

```bash
npm install -g @shuchang/futu-mcp-server
futu-mcp
```

## 环境变量配置

可以通过环境变量配置富途API连接参数：

- `FUTU_API_HOST`: 富途API主机地址（默认：127.0.0.1）
- `FUTU_API_PORT`: 富途API端口（默认：11111）
- `FUTU_UNLOCK_PASSWORD`: 交易解锁密码（可选）

示例：

```bash
export FUTU_API_HOST=192.168.1.100
export FUTU_API_PORT=12345
export FUTU_UNLOCK_PASSWORD=your_password
npx @shuchang/futu-mcp-server
```

## 功能特点

- 自动设置Python虚拟环境
- 自动安装所需依赖
- 支持环境变量配置
- 完整的富途API功能支持
- MCP协议集成

## 系统要求

- Node.js >= 14.0.0
- Python 3.x
- 富途牛牛客户端 

# Futu MCP 使用指南

## 1. 功能介绍

### 1.1 行情查询
- 获取实时报价和盘口数据
- 查看K线数据（支持分钟、日、周、月K线）
- 获取股票快照数据（价格、成交量、市值等）
- 条件选股功能（支持财务指标、技术指标筛选）

### 1.2 交易功能
- 查看持仓信息
- 查看账户资金
- 股票交易（买入/卖出）
- 订单管理（改单/撤单）

### 1.3 自选股管理
- 获取自选股列表
- 查看自选股分组
- 管理自选股分组

## 2. 配置说明

### 2.1 环境要求
- 需要安装并运行 Futu OpenD
- 需要有效的 Futu 账户
- 需要相应的 API 权限

### 2.2 权限配置
1. 登录 Futu 账户
2. 打开 Futu OpenD
3. 配置 API 权限：
   - 行情权限
   - 交易权限（如需要）
   - 自选股权限

### 2.3 接口配置
```go
// 示例配置
{
    "FutuOpenD": {
        "Host": "localhost",
        "Port": 11111,
        "EnableEncrypt": true
    },
    "Market": ["HK", "US", "CN"],
    "Language": "zh-CN"
}
```

## 3. 权限说明

### 3.1 行情权限
- 基础行情：所有用户均可使用
- Level 2 行情：需要开通相应市场的 Level 2 行情权限
- 期权行情：需要开通期权市场权限

### 3.2 交易权限
- 查询权限：可查看持仓、资金等信息
- 交易权限：可进行买入、卖出等操作
- 需要在 Futu OpenD 中配置相应的交易密码和权限

### 3.3 自选股权限
- 读取权限：可查看自选股列表和分组
- 修改权限：可修改自选股分组和内容

## 4. 新增功能

### 4.1 条件选股增强
- 新增技术指标筛选
- 支持多个条件组合
- 支持自定义筛选条件保存

### 4.2 交易功能优化
- 支持条件单
- 支持止盈止损设置
- 订单状态实时推送

### 4.3 数据分析功能
- K线数据分析
- 成交量分析
- 技术指标计算

### 4.4 使用示例

```go
// 获取持仓信息
positions, err := client.GetPositions(ctx, &futu.GetPositionsRequest{
    AccountType: futu.AccountType_REAL
})

// 获取账户资金
funds, err := client.GetFunds(ctx, &futu.GetFundsRequest{
    TrdEnv: futu.TrdEnv_REAL
})

// 条件选股示例
filter, err := client.GetStockFilter(ctx, &futu.GetStockFilterRequest{
    Market: "HK",
    FilterList: []futu.StockFilter{
        {
            FieldName: "VOLUME",
            FilterMin: 1000000,
            FilterMax: 10000000,
        },
    },
})
```

## 注意事项

1. 请确保 Futu OpenD 正常运行
2. 使用交易功能前请仔细确认账户和权限设置
3. 注意遵守各市场的交易规则和时间
4. 建议在进行实盘交易前先使用模拟交易测试
5. 请妥善保管账户密码和交易密码

## 常见问题

1. 无法连接 Futu OpenD
   - 检查 OpenD 是否正常运行
   - 检查网络连接
   - 确认配置信息是否正确

2. 交易权限相关
   - 确认是否配置交易密码
   - 检查是否有相应市场的交易权限
   - 确认账户状态是否正常

3. 行情数据延迟
   - 检查网络连接质量
   - 确认是否订阅了相应的行情权限
   - 检查 OpenD 的性能状态

## 更新日志

### v1.0.0
- 基础功能实现
- 支持行情查询
- 支持基础交易功能

### v1.1.0
- 新增条件选股功能
- 优化交易接口
- 添加数据分析功能

### v1.2.0
- 新增止盈止损功能
- 优化数据推送机制
- 增加更多技术指标支持
npm package: @shuchun/demo-lib
Description: ## Installation
Author: ShuChun Wang
Latest version: 0.1.1

# demo-lib

## Installation

To install this library, run:

```bash
$ npm install demo-lib --save
```

## Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

```bash
$ npm install demo-lib
```

and then from your Angular `AppModule`:

```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { SampleModule } from 'demo-lib';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify your library as an import
    LibraryModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

Once your library is imported, you can use its components, directives and pipes in your Angular application:

```xml
<!-- You can now use your library component in app.component.html -->
<h1>
  {{title}}
</h1>
<sampleComponent></sampleComponent>
```

## Development

To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:

```bash
$ npm run build
```

To lint all `*.ts` files:

```bash
$ npm run lint
```

## License

MIT © [ShuChun Wang](mailto:shuchun.wang@bt.com)
npm package: @shuddho11288/llama-api
Description: A Node.js library for interacting with the Llama API
Author: Tasawar Ahmed Shuddho
Latest version: 1.1.0

# Using the Llama API

## Introduction
Llama is an API that generates predictions based on given prompts. This document provides guidance on how to use the Llama API.

## Installation
To use the Llama API, you'll need Node.js installed on your system.

1. Install Node.js from [nodejs.org](https://nodejs.org/).
2. Create a new directory for your project and navigate into it using the terminal.
3. Initialize a new Node.js project using `npm init -y`.
4. Install Llama API package using `npm install git+https://github.com/shuddho11288/llama-api.git`.

## Usage
Follow these steps to use the Llama API:

1. Import the Llama API package into your project.
2. Initialize the `llama` function by calling it with your desired prompt.
3. The function returns a promise with the predictions generated by Llama.

Here's an example code snippet:

```javascript
const { llama } = require('@shuddho11288/llama-api');

// Example usage
llama('Make me a for loop in assembly').then(data=>{
    console.log(data)
})
npm package: @shuddho11288/mistral-api
Description: A Node.js library for interacting with the Mistral API
Author: Tasawar Ahmed Shuddho
Latest version: 1.1.0

# Using the Mistral API

## Introduction
Mistral is an API that generates predictions based on given prompts. This document provides guidance on how to use the Mistral API.

## Installation
To use the Mistral API, you'll need Node.js installed on your system.

1. Install Node.js from [nodejs.org](https://nodejs.org/).
2. Create a new directory for your project and navigate into it using the terminal.
3. Initialize a new Node.js project using `npm init -y`.
4. Install Mistral API package using `npm install git+https://github.com/shuddho11288/mistral-api.git`.

## Usage
Follow these steps to use the Mistral API:

1. Import the Mistral API package into your project.
2. Initialize the `mistral` function by calling it with your desired prompt.
3. The function returns a promise with the predictions generated by Mistral.

Here's an example code snippet:

```javascript
const { mistral } = require('@shuddho11288/mistral-api');

// Example usage
mistral('Make me a for loop in assembly').then(data=>{
    console.log(data)
})
npm package: @shuddho11288/sdxl-imagine
Description: A Node.js library for interacting with the Stable Diffusion XL API
Author: Tasawar Ahmed Shuddho
Latest version: 1.1.0

# Using the Imagine API

## Introduction
Imagine is an API that generates predictions based on given prompts. This document provides guidance on how to use the Imagine API.

## Installation
To use the Imagine API, you'll need Node.js installed on your system.

1. Install Node.js from [nodejs.org](https://nodejs.org/).
2. Create a new directory for your project and navigate into it using the terminal.
3. Initialize a new Node.js project using `npm init -y`.
4. Install Imagine API package using `npm install git+https://github.com/shuddho11288/imagine-api.git`.

## Usage
Follow these steps to use the Imagine API:

1. Import the Imagine API package into your project.
2. Initialize the `imagine` function by calling it with your desired prompt.
3. The function returns a promise with the predictions generated by Imagine.

Here's an example code snippet:

```javascript
const { imagine } = require('@shuddho11288/sdxl-imagine');

// Example usage
imagine('among us impostor but in good mood!').then(data=>{
    console.log(data)
})
npm package: @shuffle-protocol/sdk
Description: CLI and SDK for the Shuffle privacy protocol on Solana
Author: tothster
Latest version: 0.4.0

# @shuffle-protocol/sdk

**CLI and SDK for the Shuffle Privacy Protocol on Solana**

Shuffle is a privacy-preserving DeFi protocol that uses Multi-Party Computation (MPC) to hide your trading intent until batch execution.

## 🚀 Quick Start

### Installation

```bash
npm install -g @shuffle-protocol/sdk
```

### Prerequisites

1. **Solana CLI** with a keypair:

   ```bash
   # Generate if you don't have one
   solana-keygen new

   # Configure for devnet
   solana config set --url devnet
   ```

### Get Started (Devnet)

```bash
# 1. Create your privacy account
shuffle init

# 2. Get test tokens (also airdrops 1 SOL for fees)
shuffle faucet 10000

# 3. Deposit into privacy account
shuffle shield USDC 1000

# 4. Place encrypted order
shuffle order TSLA_USDC buy 500

# Check status
shuffle status

# Settle order after batch execution
shuffle settle
```

### Other Commands

```bash
# View encrypted balances
shuffle balance

# Withdraw from privacy account
shuffle unshield USDC 500

# Private transfer to another user
shuffle transfer <solana-address> 100

# Get more SOL if needed
shuffle airdrop 2
```

## 📦 SDK Usage

```typescript
import {
  ShuffleClient,
  AssetId,
  PairId,
  Direction,
} from "@shuffle-protocol/sdk";

// Create client
const client = await ShuffleClient.create({
  connection,
  wallet,
});

// Initialize encryption
client.initEncryption(yourX25519PrivateKey);

// Create account
await client.createUserAccount();

// Deposit
await client.deposit(AssetId.USDC, 1_000_000_000); // 1000 USDC

// Check balance
const balances = await client.getBalance();
console.log("USDC:", balances.usdc);

// Place order
await client.placeOrder(
  PairId.TSLA_USDC,
  Direction.AtoB, // Buy TSLA with USDC
  500_000_000, // 500 USDC
  AssetId.USDC,
);
```

## 🃏 How It Works

1. **Deposit** tokens into your private account
2. **Place orders** that are encrypted using MPC
3. **Batch execution** aggregates all orders privately
4. **Settle** to receive your pro-rata payout

Your trading intent remains hidden until the batch executes!

## 🔧 Options

```bash
shuffle --help                    # Show all commands
shuffle --network localnet        # Use local validator
shuffle --keypair ~/custom.json   # Use custom keypair
shuffle --mock                    # Mock mode for testing
```

## License

MIT
npm package: @shufflies/eslint-config
Description: This probably isn't a useful package for you. It's my own personal set of reusable eslint configuration.
Author: Royston Shufflebotham
Latest version: 2.7.0

# @shufflies/eslint-config

This probably isn't a useful package for you.
It's my own personal set of reusable eslint configuration.

## Installation

Install the package:

```shell
npm install -D @shufflies/eslint-config
```

Reference it in an `eslint.config.mjs` or `eslint.config.ts`:

```typescript
// @ts-check
import { fileURLToPath, URL } from "node:url";

import { recommended } from "@shufflies/eslint-config";
import { defineConfig } from "eslint/config";

export default defineConfig(
  ...recommended({
    gitignorePaths: [fileURLToPath(new URL(".gitignore", import.meta.url))],
  }),

  // Other rule/config overrides
  {
    rules: {
      "some/rule": "off"
    }
  }
);
```
npm package: @shufo/tailwindcss-class-sorter
Description: A tailwindcss class sorter that respects tailwind config file
Author: Shuhei Hayashibara
Latest version: 3.0.1

[![npm](https://img.shields.io/npm/v/@shufo/tailwindcss-class-sorter)](https://www.npmjs.com/package/@shufo/tailwindcss-class-sorter)
[![CI](https://github.com/shufo/tailwindcss-class-sorter/actions/workflows/test.yml/badge.svg)](https://github.com/shufo/tailwindcss-class-sorter/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/shufo/tailwindcss-class-sorter/branch/main/graph/badge.svg?token=CuqqimnEC4)](https://codecov.io/gh/shufo/tailwindcss-class-sorter)

# tailwindcss-class-sorter

A tailwindcss class sorter that respects tailwind config file.

## Installation

```bash
$ npm install @shufo/tailwindcss-class-sorter
# yarn
$ yarn add @shufo/tailwindcss-class-sorter
```

## Usage

```typescript
// CommonJS
const { sortClasses } = require("@shufo/tailwindcss-class-sorter");

const sorted = sortClasses("pt-2 p-4");
console.log(sorted);
// => "p-4 pt-2"

// ESModule
import { sortClasses } from "tailwindcss-class-sorter";
const sorted = sortClasses("pt-2 p-4");
```

`tailwindcss-class-sorter` will automatically look for `tailwind.config.js` in the project directory.
Then if it exists, it will sort according to the tailwindcss configuration. If it does not exist, the default sort order of tailwindcss plugin will be used.

## API

### functions

#### sortClasses(classes: string, options: IOption)

`classes`: classes string e.g. `z-5 z-50`

### Interfaces

#### IOption

```typescript
export interface IOption {
  tailwindConfigPath?: string;
  tailwindConfig?: TailwindConfig;
}
```

| key                | value                                     |
| ------------------ | ----------------------------------------- |
| tailwindConfigPath | A path to tailwind config file            |
| tailwindConfig     | A configuration object of tailwind config |

## Testing

```bash
$ yarn install
$ yarn run test
```

## Benchmarking

```bash
$ yarn run benchmark
```

![image](https://user-images.githubusercontent.com/1641039/155764304-fd676354-1b29-4390-b035-96dc9aae051d.png)

## Contributing

1.  Fork it
2.  Create your feature branch (`git checkout -b my-new-feature`)
3.  Commit your changes (`git commit -am 'Add some feature'`)
4.  Push to the branch (`git push origin my-new-feature`)
5.  Create new Pull Request

## LICENSE

MIT
npm package: @shugaswap/swap-sdk
Description: 🛠 An SDK for building applications on top of SwapX.
Author: Abiodun Awoyemi
Latest version: 0.0.2

# Uniswap SDK

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Actions Status](https://github.com/Uniswap/uniswap-sdk/workflows/CI/badge.svg)](https://github.com/Uniswap/uniswap-sdk)
[![npm version](https://img.shields.io/npm/v/@swapx/sdk/latest.svg)](https://www.npmjs.com/package/@swapx/sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://swapx.org/docs/v2/SDK/getting-started/).

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/exxnetwork/swapx-sdk.git
```

Move into the swapx-sdk working directory

```sh
cd swapx-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @shughesuk/pipewrench
Description: [![Test](https://github.com/asledgehammer/PipeWrench/actions/workflows/test.yml/badge.svg)](https://github.com/asledgehammer/PipeWrench/actions/workflows/test.yml)
Author: asledgehammer
Latest version: 41.73.12


# PipeWrench

[![Test](https://github.com/asledgehammer/PipeWrench/actions/workflows/test.yml/badge.svg)](https://github.com/asledgehammer/PipeWrench/actions/workflows/test.yml)

PipeWrench is a set of TypeScript definitions for both the Java API and Lua codebase for the game Project Zomboid.

## Advantages

- TypeScript provides type safety where Lua does not.
- Code with errors will not compile in most TypeScript environments for improper usages of types.
- Writing Lua works with PipeWrench. (Lua Interfaces & separate Lua files)

## Caveats

- TypeScriptToLua Caveats: <https://typescripttolua.github.io/docs/caveats>
- Lua types are in BETA.
  - `lua/client/Context` and a couple other design patterns aren't processed so these calls will need their own Lua interfaces built manually.

# Development

## Releases

### Versioning

We automate the release process using github actions. Version numbers are based on PZ versions, with an additional patch release version at the end. For example `41.73.3` would be the `41.73` PZ version, but with 3 updates to correct typing issues. Note this is not strictly semver and there may be breaking fixes in a minor patch version!

### Creating a release

 To create a new release run

```shell
npm version 41.73.1
git push --tags && git push
```

# Support

![](https://i.imgur.com/ZLnfTK4.png)

## Discord Server

<https://discord.gg/u3vWvcPX8f>

If you like what I do and helped your community a lot, feel free to buy me a coffee!
<https://ko-fi.com/jabdoesthings>
<https://www.paypal.com/paypalme/JabJabJab>
npm package: @shughesuk/pipewrench-events
Description: ## Description PipeWrench-Events is an extension for the PipeWrench library, packaging Project Zomboid's events in an API that takes advantage of the TypeScript environment. [EventEmitters](https://github.com/asledgehammer/PipeWrench-Events/blob/398ab4405
Author: asledgehammer
Latest version: 41.73.6

# PipeWrench-Events

## Description
PipeWrench-Events is an extension for the PipeWrench library, packaging Project Zomboid's events in an API that takes advantage of the TypeScript environment. [EventEmitters](https://github.com/asledgehammer/PipeWrench-Events/blob/398ab440505416eb250f430c8776969a4ec8bd45/PipeWrench-Events.d.ts#L74-L89) and [EventConsumers](https://github.com/asledgehammer/PipeWrench-Events/blob/398ab440505416eb250f430c8776969a4ec8bd45/PipeWrench-Events.d.ts#L292-L298) , are provided as events and their associated consumer types for listeners.

## Custom EventEmitters
```ts
import * as Events from 'PipeWrench-Events';

// Example consumer type
export type MusicTrackUpdateListener = (
    track: string,
    volume: number
) => void;

// Example EventEmitter.
const MusicTrackUpdate = new Events.EventEmitter<MusicTrackUpdateListener>('MusicTrackUpdate');

// Example implementation.
MusicTrackUpdate.addListener((track: string, volume: number) => {
  print(`Playing Track: ${track} (Volume: ${volume})`);
});
```

## Setup
- (This library is installed in [PipeWrench-Template](https://github.com/asledgehammer/PipeWrench-Template))

## Notes
- The documentation is transcribed from [pzwiki.net](https://pzwiki.net/wiki/Modding:Lua_Events)

# Support

![](https://i.imgur.com/ZLnfTK4.png)

## Discord Server
https://discord.gg/u3vWvcPX8f

If you like what I do and helped your community a lot, feel free to buy me a coffee!
https://ko-fi.com/jabdoesthings
https://www.paypal.com/paypalme/JabJabJab