Socket
Socket
Sign inDemoInstall

dripjs

Package Overview
Dependencies
235
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dripjs

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


Version published
Weekly downloads
36
increased by300%
Maintainers
1
Install size
47.4 MB
Created
Weekly downloads
 

Readme

Source

Dripjs Logo

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

NPM Version Package License NPM Downloads Tiavis Coverage Gitter

简介

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-bitmexbitmex 交易接口模块(包含 rest 接口和 websocket 接口)

参考文档

框架功能

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

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

Keywords

FAQs

Last updated on 21 May 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc