bitrich-info / xchange-stream

XChange-stream is a Java library providing a simple and consistent streaming API for interacting with Bitcoin and other crypto currency exchanges via WebSocket protocol. It is build on top of of XChange library providing new interfaces for streaming API. User can subscribe for live updates via reactive streams of RxJava library.
Apache License 2.0
413 stars 223 forks source link

[kraken] Exchange orderbook timestamp parse incorrect! #448

Open sudo168 opened 4 years ago

sudo168 commented 4 years ago

The Kraken exchange orderbook timestamp is a seconds format since epoch. So need to multiply 1000. But this logic appear in two places:

One in: info.bitrich.xchangestream.kraken.KrakenOrderBookUtils

private static long timestampToMs(String timestamp) { return new BigDecimal(timestamp).multiply(new BigDecimal(1000)).longValue(); }

The other in: org.knowm.xchange.kraken.KrakenAdapters.adaptOrders(...)

pchertalev commented 4 years ago

@sudo168 Thank you for the issue. I have opend fix PR.

mdvx commented 4 years ago

I am good with this

makarid commented 4 years ago

Have we fix this issue? If yes can we close it?

pchertalev commented 4 years ago

I believe we can close it because PR is merged

TSavo commented 4 years ago

@badgerwithagun Bump for closing due to merged PR.