npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yuants/app-trade-copier

v0.11.53

Published

在 Yuan 中,进行实盘自动交易的推荐方式是使用交易跟单器 (Trade Copier)。

Readme

Trade Copier

在 Yuan 中,进行实盘自动交易的推荐方式是使用交易跟单器 (Trade Copier)。

  • 支持选择跟单某个模型的信号。
  • 支持选择跟单某个交易员的交易。
  • 支持让一个账户带领其他账户。
  • 支持缩放头寸。
  • 支持不同的下单策略和参数。
  • 支持按照不同的品种使用不同的下单策略和参数。

📒 使用方法

  1. 在集群中部署 @yuants/app-trade-copier(交易跟单器)和 @yuants/app-account-composer(账户组合器)应用。
  2. 选择你需要进行实盘的账户作为实际账户 (Actual Account)。
  3. 配置预览账户 (Preview Account) 的构成,选取其他账户 (其他真实账户或者模型的模拟账户) 的全部或者某个头寸,乘以一个系数得到预览账户的头寸。
  4. 观察预览账户的头寸是否符合您的预期。
  5. 如果符合预期,将其发布至预期账户 (Expected Account),预期账户会与预览账户完全一致。
  6. 配置交易跟单器的选项,支持不同的下单策略和参数
  7. 启用跟单,交易跟单器会自动将预期账户的头寸复制到实际账户。

⚠️ 注意事项

  • 修改配置的瞬间,跟单器就会开始执行。因此,为了避免人为配置错误导致的错误交易损失,总是先配置预览账户,观察预览账户的头寸是否符合预期,再发布到预期账户。
  • 如果需要平仓,请设置预览账户对应的头寸配置的强制归零 (force_zero ) 选项为 true (推荐做法)。或者将其乘数 (multiple) 设置为 0。
  • 禁用预期账户的某个成分,可能会导致预期账户的该成分对应的品种的头寸消失,从而导致跟单器放弃管理这个品种的头寸,而不是平仓。
  • 禁用交易账户的跟单配置,会导致跟单器放弃管理这个实际账户的头寸,而不是平仓。
  • 避免在同一个主机集群中,部署两个及以上的跟单器,否则可能会导致竞争状态,导致头寸震荡,造成大量资金损失。

⚙️ 支持的交易策略

填写正确的下单策略 (strategy.type) 是成功使用交易跟单器的关键。

  • 市价追入 (DEFAULT): 以市价单的方式下单,直到头寸达到预期值为止。适合流动性十分充足的品种,或者需要快速成交的品种,适合非常小资金的实验性实盘。
  • 最优报价挂单成交 (BBO_MAKER): 将订单挂在最优报价上,等待成交。适合挂单手续费低于吃单手续费的品种,或者流动性匮乏的品种。
  • 最优报价单边挂单成交 (BBO_MAKER_BY_DIRECTION): 根据预期头寸的方向,只在需要的方向上挂单。适合流动性极度匮乏的品种,或者吃单手续费远高于挂单手续费的品种。支持滑点保护。
  • 多档位最优报价单边挂单成交 (MULTI_ORDER_MAKER_BY_DIRECTION): 根据预期头寸的方向,在需要的方向上挂多档位的订单,防止盘口晃骗。适合流动性极度匮乏的品种,或者吃单手续费远高于挂单手续费的品种。支持滑点保护。适合大资金实盘。

注意: 填写了不在上述列表中的策略类型,会报错但不会采取任何行动,且不会影响其他正常配置的策略。