alh_node_lx
一、安装
Last updated 4 years ago by alien381 .
ISC · Original npm · Tarball · package.json
$ cnpm install alh_node_lx 
SYNC missed versions from official npm registry.

一、安装

windows下编译需要安装的软件

nodejs 6.5.0

python 2.7.12

vs2015

npm install -g node-gyp

如果编译有问题可以尝试 npm install -g npm@next

npm install alh_node_cc

安装windows下的插件

npm install alh_node_lx

安装Linux下的插件

二、使用

//引入插件

const SFIT = require('alh_node_cc');

//创建一个实例

var obj = SFIT.CreateObject();

//设置服务器IP,用户名,密码,BrokerID

obj.SetParam("tcp://180.168.146.186:10013","068716","112233123","9999");

//设置要订阅的行情代码,可以添加多个

obj.AddID("RM701");

//开始接受数据,并设置回调函数,obj为实时行情数据,

//正常情况errorcode为0,

//登录失败为-1

//连接断开为-2,连接超时为-3

obj.Run(function(obj,errorcode) {

if (errorcode==0)
	
	console.log(obj);

if (errorcode==-1)
	
	console.log("login error!");

if (errorcode==-2)
	
	console.log("Disconnected!");

if (errorcode==-3)
	
	console.log("Timeout!");

});

setInterval(function(){ console.log("---------------------------"); }, 1000);

Current Tags

  • 1.0.10                                ...           latest (4 years ago)

11 Versions

  • 1.0.10                                ...           4 years ago
  • 1.0.9                                ...           4 years ago
  • 1.0.8                                ...           4 years ago
  • 1.0.7                                ...           4 years ago
  • 1.0.6                                ...           4 years ago
  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 9
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |