2.1.3 • Published 7 years ago

@tigerbrokers/mqtt-pipe v2.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
7 years ago

@tigerbrokers/mqtt-pipe

TigerTrade 长连接库,封装连接层。

Usage

import TigerPipe from 'tiger-pipe'

const pipe = new TigerPipe({
  test: true,
  clientId: 'web2018xxxxxxx'
})
pipe.connect('uuid', 'token')

pipe.disconnect()

API

Attributes

  • mqtt
  • connected
  • reconnecting

Methods

  • connect(username, password)
  • disconnect(force, cb)
  • subscribe(topic)
  • unsubscribe(topic)
  • on(topic|event, cb)
  • off(topic|event, cb)
  • subscribeQuote (symbol, type = 'simple') {
  • subscribeAsset () {
  • subscribeOrder (symbol = '+') {
  • subscribePosition (symbol = '+') {

## Events

  • connect
  • reconnect
  • error
  • message
  • offline
  • close
  • packetsend
  • packetreceive

Test

npm test

Build

npm run build

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

1.2.7

8 years ago

1.2.5

8 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago