@xtp-smart/ctp_terminal_info
v0.0.5
Published
对c++开发的CTP看穿式监管进行封装
Downloads
72
Keywords
Readme
CTP看穿式监管数据采集-Nodejs/Electron版本
对c++开发的CTP看穿式监管进行封装
- v6.7.2_20230913_winApi
- v6.7.2_20230913_api_traderapi_linux64
- TraderapiMduserapi_6.7.2_MacOS
install
npm i -D @xtp-smart/ctp_terminal_info
使用
const { getTerminalInfo, getApiVersion } = require("@xtp-smart/ctp_terminal_info");
function testGetTerminalInfo() {
getTerminalInfo((err, buffer) => {
if (err) {
console.info("error:", err.message);
}
console.log(Buffer.isBuffer(buffer));
console.log(buffer.length);
console.log("buffer:", buffer);
console.log("ctpApi采集的终端信息如下:", buffer.toString("base64"));
});
}
function testGetApiVersion() {
console.info("getApiVersion:", getApiVersion())
}
testGetTerminalInfo();
testGetApiVersion();