1.0.10 • Published 8 years ago

alh_node_lx v1.0.10

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

一、安装

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);

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago