Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

futuquant

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

futuquant

FutuQuant-Nodejs

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

futuquant的nodejs版本

基于futuquant v3.1.2,使用前需要先安装futuquant,并启动FutuOpenD服务。

依赖:

  • ES6,对应nodejs版本v8.5.0以上,启动时添加参数:--experimental-modules,参考:v8.5.0 proposal #15308
  • futuquant v3.1.2,参考:FutunnOpen/futuquant

安装

npm install futuquant

文档

点击查看文档

使用

import FtQuant from 'futuquant';

const ft = new FtQuant({
  ip: '127.0.0.1', // FutuOpenD服务IP
  port: 11111, // FutuOpenD服务端口
  userID: '5894668', // 牛牛号
});

const init = async () => {
  let res = null;
  res = await ft.initConnect(); // 初始化连接
  console.log('initConnect', res);
  res = await ft.getGlobalState(); // 获取全局状态
  console.log('getGlobalState', res);
  await ft.trdUnlockTrade(true, 'md5'); // 解锁交易密码
  await ft.setCommonTradeHeader(0); // 设置为港股的仿真环境
};

init();

测试

请先修改test/futuquant.test.jsFutuOpenDXMLPath的路径。

npm test

广告

如有需要,请填写推荐人牛牛号:5894668,谢谢!

FAQs

Package last updated on 16 Jul 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc