cw-sdk-node - v1.0.0-beta.8 › StreamClient
↳ StreamClient
- addListener
- connect
- disconnect
- emit
- error
- eventNames
- getMaxListeners
- getSubscriptions
- listenerCount
- listeners
- off
- on
- onConnect
- onDisconnect
- onError
- onMarketUpdate
- onPairUpdate
- onStateChange
- once
- prependListener
- prependOnceListener
- rawListeners
- removeAllListeners
- removeListener
- send
- setMaxListeners
- state
- subscribe
- unsubscribe
- listenerCount
+ new StreamClient(opts
: Partial‹StreamOpts›): StreamClient
Overrides WebSocketClient.constructor
Defined in src/websocket/StreamClient.ts:18
Parameters:
Name | Type |
---|---|
opts |
Partial‹StreamOpts› |
Returns: StreamClient
• connState: symbol
Inherited from WebSocketClient.connState
Defined in src/websocket/WebSocketClient.ts:58
• subscriptions: object
Inherited from WebSocketClient.subscriptions
Defined in src/websocket/WebSocketClient.ts:47
- [ key: string]: ClientSubscription
▪ defaultMaxListeners: number
Inherited from void
Defined in node_modules/@types/node/events.d.ts:19
▸ addListener(event
: string | symbol, listener
: function): this
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:21
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ connect(): void
Inherited from WebSocketClient.connect
Defined in src/websocket/WebSocketClient.ts:101
Returns: void
▸ disconnect(): void
Inherited from WebSocketClient.disconnect
Defined in src/websocket/WebSocketClient.ts:161
Returns: void
▸ emit(event
: string | symbol, ...args
: any[]): boolean
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:33
Parameters:
Name | Type |
---|---|
event |
string | symbol |
...args |
any[] |
Returns: boolean
▸ error(e
: string): void
Inherited from WebSocketClient.error
Defined in src/websocket/WebSocketClient.ts:133
Parameters:
Name | Type |
---|---|
e |
string |
Returns: void
▸ eventNames(): Array‹string | symbol›
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:34
Returns: Array‹string | symbol›
▸ getMaxListeners(): number
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:30
Returns: number
▸ getSubscriptions(): ClientSubscription[]
Inherited from WebSocketClient.getSubscriptions
Defined in src/websocket/WebSocketClient.ts:173
Returns: ClientSubscription[]
▸ listenerCount(type
: string | symbol): number
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:35
Parameters:
Name | Type |
---|---|
type |
string | symbol |
Returns: number
▸ listeners(event
: string | symbol): Function[]
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:31
Parameters:
Name | Type |
---|---|
event |
string | symbol |
Returns: Function[]
▸ off(event
: string | symbol, listener
: function): this
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:27
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ on(event
: string | symbol, listener
: function): this
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:22
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ onConnect(fn
: function): void
Inherited from WebSocketClient.onConnect
Defined in src/websocket/WebSocketClient.ts:138
Parameters:
▪ fn: function
▸ (): void
Returns: void
▸ onDisconnect(fn
: function): void
Inherited from WebSocketClient.onDisconnect
Defined in src/websocket/WebSocketClient.ts:142
Parameters:
▪ fn: function
▸ (): void
Returns: void
▸ onError(fn
: function): void
Inherited from WebSocketClient.onError
Defined in src/websocket/WebSocketClient.ts:150
Parameters:
▪ fn: function
▸ (e
: Error): void
Parameters:
Name | Type |
---|---|
e |
Error |
Returns: void
▸ onMarketUpdate(fn
: function): void
Defined in src/websocket/StreamClient.ts:85
Parameters:
▪ fn: function
▸ (m
: MarketUpdate): void
Parameters:
Name | Type |
---|---|
m |
MarketUpdate |
Returns: void
▸ onPairUpdate(fn
: function): void
Defined in src/websocket/StreamClient.ts:76
Parameters:
▪ fn: function
▸ (m
: PairUpdate): void
Parameters:
Name | Type |
---|---|
m |
PairUpdate |
Returns: void
▸ onStateChange(fn
: function): void
Inherited from WebSocketClient.onStateChange
Defined in src/websocket/WebSocketClient.ts:146
Parameters:
▪ fn: function
▸ (s
: string): void
Parameters:
Name | Type |
---|---|
s |
string |
Returns: void
▸ once(event
: string | symbol, listener
: function): this
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:23
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ prependListener(event
: string | symbol, listener
: function): this
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:24
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ prependOnceListener(event
: string | symbol, listener
: function): this
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:25
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ rawListeners(event
: string | symbol): Function[]
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:32
Parameters:
Name | Type |
---|---|
event |
string | symbol |
Returns: Function[]
▸ removeAllListeners(event?
: string | symbol): this
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:28
Parameters:
Name | Type |
---|---|
event? |
string | symbol |
Returns: this
▸ removeListener(event
: string | symbol, listener
: function): this
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:26
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ send(data
: Buffer | Uint8Array): void
Inherited from WebSocketClient.send
Defined in src/websocket/WebSocketClient.ts:154
Parameters:
Name | Type |
---|---|
data |
Buffer | Uint8Array |
Returns: void
▸ setMaxListeners(n
: number): this
Inherited from void
Overrides void
Defined in node_modules/@types/node/events.d.ts:29
Parameters:
Name | Type |
---|---|
n |
number |
Returns: this
▸ state(): symbol
Inherited from WebSocketClient.state
Defined in src/websocket/WebSocketClient.ts:169
Returns: symbol
▸ subscribe(keys
: string[]): void
Defined in src/websocket/StreamClient.ts:44
Parameters:
Name | Type |
---|---|
keys |
string[] |
Returns: void
▸ unsubscribe(keys
: string[]): void
Defined in src/websocket/StreamClient.ts:60
Parameters:
Name | Type |
---|---|
keys |
string[] |
Returns: void
▸ listenerCount(emitter
: EventEmitter, event
: string | symbol): number
Inherited from void
Defined in node_modules/@types/node/events.d.ts:18
deprecated
since v4.0.0
Parameters:
Name | Type |
---|---|
emitter |
EventEmitter |
event |
string | symbol |
Returns: number