Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
6 changes: 4 additions & 2 deletions lib/websockets.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Sockets.initSocket = async function(params, eventHandler) {
try {
if ( !params.sign ) params.sign = false;
if ( !params.endpoint ) params.endpoint = false;
let [topic, endpoint, type] = Sockets.topics( params.topic, params.symbols, params.endpoint, params.sign )
let [topic, endpoint, type] = Sockets.topics( params.topic, params.symbols, params.type , params.endpoint, params.sign )
let sign = this.sign('/api/v1/bullet-private', {}, 'POST')
let websocket = await getSocketEndpoint(type, this.baseURL, this.environment, sign)
let ws = new WebSocket(websocket)
Expand Down Expand Up @@ -120,7 +120,7 @@ Sockets.unsubscribe = async function(topic, endpoint, type, eventHandler) {
ws.on('message', eventHandler)
}

Sockets.topics = function( topic, symbols = [], endpoint = false, sign = false ) {
Sockets.topics = function( topic, symbols = [], type , endpoint = false, sign = false ) {
if ( endpoint ) return [topic, endpoint + ( symbols.length > 0 ? ':' : '' ) + symbols.join( ',' ), sign ? 'private' : 'public']
if ( topic === 'ticker' ) {
return [topic, "/market/ticker:" + symbols.join( ',' ), 'public']
Expand All @@ -144,6 +144,8 @@ Sockets.topics = function( topic, symbols = [], endpoint = false, sign = false )
return [topic, "/spotMarket/level2Depth50:" + symbols.join( ',' ), 'public']
} else if ( topic === 'depth5' ) {
return [topic, "/spotMarket/level2Depth5:" + symbols.join( ',' ), 'public']
} else if ( topic === 'klines' ) {
return [topic, "/market/candles:" + symbols.join( ',' ) + '_' + type, 'public']
}
}

Expand Down
7 changes: 0 additions & 7 deletions node_modules/async-limiter/.travis.yml

This file was deleted.

8 changes: 0 additions & 8 deletions node_modules/async-limiter/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/async-limiter/coverage/coverage.json

This file was deleted.

This file was deleted.

This file was deleted.

Loading