Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zbNode
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ken
zbNode
Commits
1a9b5d1b
Commit
1a9b5d1b
authored
Sep 11, 2018
by
ken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
depth
parent
c5ee1a2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
zb.js
zb.js
+3
-3
No files found.
zb.js
View file @
1a9b5d1b
const
stream
=
'wss://api.zb.cn:9999/websocket'
;
// const stream = "wss://kline.zb.com:2443
/websocket";
//
const stream = 'wss://api.zb.cn:9999/websocket';
const
stream
=
"wss://kline.zb.cn
/websocket"
;
const
WebSocket
=
require
(
'ws'
);
const
request
=
require
(
'request'
);
const
crypto
=
require
(
'ezcrypto'
).
Crypto
;
...
...
@@ -66,7 +66,7 @@ const _handleSocketError = function(error) {
const
_handleSocketOpen
=
function
(
opened_callback
)
{
console
.
log
(
"open"
);
for
(
const
symbol
of
observerSymbol
)
{
const
req
=
{
event
:
'addChannel'
,
channel
:
symbol
+
'_depth'
};
const
req
=
{
event
:
'addChannel'
,
channel
:
symbol
+
'_depth'
,
isZip
:
'true'
,
binary
:
'true'
};
console
.
log
(
JSON
.
stringify
(
req
));
this
.
send
(
JSON
.
stringify
(
req
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment