Kind: global class
- BitfinexWS
- new BitfinexWS(APIKey, APISecret)
- instance
- static
- .WebSocketURI :
String
- .WebSocketURI :
Handles communitaction with Bitfinex WebSocket API.
Param | Type |
---|---|
APIKey | sting |
APISecret | string |
Subscribe to Order book updates. Snapshot will be sended as multiple updates.
Event will be emited as PAIRNAME_book
.
Kind: instance method of BitfinexWS
See: http://docs.bitfinex.com/#order-books
Param | Type | Description |
---|---|---|
[pair] | string |
BTCUSD, LTCUSD or LTCBTC. Default BTCUSD |
[precision] | string |
Level of price aggregation (P0, P1, P2, P3). The default is P0. |
[length] | string |
Number of price points. 25 (default) or 100. |
Subscribe to trades. Snapshot will be sended as multiple updates.
Event will be emited as PAIRNAME_trades
.
Kind: instance method of BitfinexWS
See: http://docs.bitfinex.com/#trades75
Param | Type | Description |
---|---|---|
[pair] | string |
BTCUSD, LTCUSD or LTCBTC. Default BTCUSD |
Subscribe to ticker updates. The ticker is a high level overview of the state of the market. It shows you the current best bid and ask, as well as the last trade price.
Event will be emited as PAIRNAME_ticker
.
Kind: instance method of BitfinexWS
See: http://docs.bitfinex.com/#ticker76
Param | Type | Description |
---|---|---|
[pair] | string |
BTCUSD, LTCUSD or LTCBTC. Default BTCUSD |
Unsubscribe to a channel.
Kind: instance method of BitfinexWS
Param | Type | Description |
---|---|---|
chanId | number |
ID of the channel received on subscribed event. |
Autenticate the user. Will receive executed traded updates.
Kind: instance method of BitfinexWS
See: http://docs.bitfinex.com/#wallet-updates
Kind: event emitted by BitfinexWS
WebSocket connection is open. Ready to send.
Kind: event emitted by BitfinexWS
Kind: event emitted by BitfinexWS
WebSocket connection is closed.
Kind: event emitted by BitfinexWS
Kind: event emitted by BitfinexWS
Properties
Name | Type | Description |
---|---|---|
channel | string |
Channel type |
pair | string |
Currency pair. |
chanId | number |
Channel ID sended by Bitfinex |
Kind: event emitted by BitfinexWS
position snapshot
Kind: event emitted by BitfinexWS
new position
Kind: event emitted by BitfinexWS
position update
Kind: event emitted by BitfinexWS
position close
Kind: event emitted by BitfinexWS
wallet snapshot
Kind: event emitted by BitfinexWS
wallet snapshot
Kind: event emitted by BitfinexWS
order snapshot
Kind: event emitted by BitfinexWS
new order
Kind: event emitted by BitfinexWS
order update
Kind: event emitted by BitfinexWS
order cancel
Kind: event emitted by BitfinexWS
trade executed
Kind: event emitted by BitfinexWS
trade execution update
Kind: event emitted by BitfinexWS
Kind: event emitted by BitfinexWS
Properties
Name | Type |
---|---|
bid | number |
bidSize | number |
ask | number |
askSize | number |
dailyChange | number |
dailyChangePerc | number |
lastPrice | number |
volume | number |
high | number |
low | number |
Kind: event emitted by BitfinexWS
See: http://docs.bitfinex.com/#trades75
Properties
Name | Type |
---|---|
seq | string |
timestamp | number |
price | number |
amount | number |
Kind: event emitted by BitfinexWS
See: http://docs.bitfinex.com/#trades75
Properties
Name | Type |
---|---|
seq | string |
id | number |
timestamp | number |
price | number |
amount | number |
Kind: event emitted by BitfinexWS
See: http://docs.bitfinex.com/#order-books
Properties
Name | Type |
---|---|
price | string |
count | number |
amount | number |
Kind: static constant of BitfinexWS