Closed michael34435 closed 2 years ago
Hi,
I fixed this issue and am waiting for reviewing now.
Hi all, (and @crazyguitar )
I can read comment about 1 year and half ago stating the issue was fixed, but in v5.0.3 the issue is still alive.
Could I please have an estimation of when the fix will be merged and published?
Thank you
Hi @iccicci @crazyguitar , we'll take a look at the issue asap, thanks for the info
Hi @vigan-abd,
I've checked the funding_trade.js
file in the bfx-api-node-models
package:
const fields
mapping respects exactly what the API documentation says;console.log
in the unserialize
method, I saw the data is [ [ 267665633, 1644877838000, -0.1, 0.00002297, 2 ] ]
(I would say: ID, MTS_CREATE, AMOUNT, RATE, PERIOD
);I also checked the ws2.js
file in this package, and it seems the set of data is not configurable; it is as is when it arrives from the websocket: I'm afraid this needs to be escalated on BitFinex
There is a simple fix: to use PublicTrade instead of FundingTrade, since it is already designed for this, but this will be a breaking change
Public Funding trade has format
[
ID,
MTS,
AMOUNT,
RATE,
PERIOD
]
while finding trades
[
ID,
CURRENCY,
MTS_CREATE,
OFFER_ID,
AMOUNT,
RATE,
PERIOD,
MAKER
]
and as far as I found out correctly, _handleTradeMessage receives only data from public trades channel, so FundingTrade should not be used in this case
@vigan-abd wdyt?
thanks @vitaliystoliarovcc for investigating and providing a fix :) @iccicci can you confirm that we solved the issue so we can close the ticket? latest package release that includes the fix is https://www.npmjs.com/package/bitfinex-api-node/v/5.0.4
Sorry for my late reply @vigan-abd , I'm so busy in this period... Yes, it seems now the fields are correct. Thank you
thanks for confirming @iccicci, we're glad we could help :)
Issue type
Brief description
Public funding trade mapping is wrong. There is no maker column in public funding trades.
Steps to reproduce
output:
Additional Notes:
I had found the same issue in 4.0.2 - 4.0.15 ;(