-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
Issue type
- bug
- missing functionality
- performance
- feature request
Brief description
The handlers registered for public funding trades with onTrades
are not called when fte/ftu messages are received.
This is because the fte/ftu messages are not properly handled and the messages don't propagate to listener registered with onTrades
method.
Steps to reproduce
const ws = new WSv2()
ws.on('open', async () => {
ws.onTrades({ symbol: 'fUSD' }, (trades) => {
console.log('recv trades: %j', trades)
})
ws.subscribeTrades('fUSD')
})
await ws.open()
Additional Notes:
Possible bug fix:
Change
bitfinex-api-node/lib/transports/ws2.js
Lines 967 to 971 in fabfc1c
const eventName = msg[1][0] === 'f' | |
? msg[1] // Funding trades are passed to fte/ftu handlers | |
: msg[1] === 'te' | |
? 'trade-entry' | |
: 'trades' |
with
const eventName = msg[1] === 'te' || msg[1] === 'fte'
? 'trade-entry'
: 'trades'
Metadata
Metadata
Assignees
Labels
No labels