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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dripjs

v0.1.1

Published

用于构建高效且可扩展的交易程序的渐进式Node.js开源量化框架

Downloads

41

Readme

简介

see the English

Drip.js旨在提供一个开箱即用的量化交易程序体系架构,允许开发者轻松创建高可用、可扩展且易于维护的量化交易程序。

设计哲学

让量化开发者将大部分精力、时间花费在核心:交易策略的开发上。 Drip.js提供除此之外的一切,使得开发者不必再为重复造轮子而苦恼

简书专题文章

https://www.jianshu.com/c/520f18fa56cb

安装

由于此框架全部模块化,可以使用下面命令安装到您的程序中

npm install dripjs

如果只想用框架中的某子模块

// 假设想要使用bitmex api模块时
npm install dripjs-bitmex

使用

  • import
import { IntelFactory, BitmexSpy } from 'dripjs';

// 生成指定交易所的数据接口
const bitmexSpy = IntelFactory.create(BitmexSpy, {
  apiKey: `你的bitmex交易所apiKey`,
  apiSecret: `你的bitmex交易所apiSecret`,
  testnet: true,
});
const pair = 'XBTUSD';
// 订阅逐笔数据
bitmexSpy.getTicker$(pair).subscribe((res) => {
  console.log(res);
});
setTimeout(() => {
  console.log('do stop ticker subscription');
  // 不用时,别忘记退订
  bitmexSpy.stopTicker(pair);
}, 5000);
  • require
const dripjs = require('dripjs');

// 生成指定交易所的数据接口
const bitmexSpy = dripjs.IntelFactory.create(dripjs.BitmexSpy, {
  apiKey: `你的bitmex交易所apiKey`,
  apiSecret: `你的bitmex交易所apiSecret`,
  testnet: true,
});
const pair = 'XBTUSD';
// 订阅逐笔数据
bitmexSpy.getTicker$(pair).subscribe((res) => {
  console.log(res);
});

setTimeout(() => {
  console.log('do stop ticker subscription');
  // 不用时,别忘记退订
  bitmexSpy.stopTicker(pair);
}, 5000);

模块列表

| 模块名 | 描述 | | ------------------------------------------------------------ | ---------------------------------------------------- | | dripjs | 框架主模块,可使用全部子模块 | | dripjs-common | 通用函数模块 | | dripjs-types | 类型定义模块 | | dripjs-bitmex | bitmex 交易接口模块(包含 rest 接口和 websocket 接口) |

参考文档

框架功能

此框架正在开发中,暂定实现如下功能,以后会陆续增加其他功能

  • 数据获取 - 通过交易所、数据库(回测时)
  • 数据本地保存
  • 方便日后回测
  • 回测
  • 生成策略模型
  • 交易评级
  • 实盘交易