sbx-socket-gateway
v2.0.7
Published
sbx-socket-gateway
Downloads
109
Readme
sbx-server-service
sbx-socket-gateway module
Requirements
- node >= 10
- sbx >=0.9.1
Peer dependencies
"geoip-lite": "^1.4.2",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.20",
"sbx-rest-gateway": "0.0.4",
"socket.io": "^2.3.0"
Installation
$ npm install sbx-socket-gateway
Use package:
const { RestService } = require('sbx-socket-gateway');
//Mixin to service
{
mixins: [
SocketService(broker, {
events: {
'quote.tick.:symbol': {
name: 'Quotes stream',
// access: ['user'],
params: {
symbol: {type: 'string', optional: true},
bid: {type: 'number', optional: true},
ask: {type: 'number', optional: false},
volume: {type: 'number', optional: false}
},
room: 'quote.tick'
},
'quote.candle.:symbol': {
name: 'Candles stream',
params: {
symbol: {type: 'string', optional: true},
data: {type: 'array', optional: true}
},
room: 'quote.candle'
}
}
})
]
}
Developers
- Viktor Fischer
TODO
- remove sbx-rest-gateway
License
Copyright (c) 2020 - 2021 Sobix Group LLC