Giter VIP home page Giter VIP logo

Comments (16)

jurepetrovic avatar jurepetrovic commented on July 30, 2024

Nobody noted that?

from xchange-stream.

badgerwithagun avatar badgerwithagun commented on July 30, 2024

Just so you know someone's listening... I don't use Bitstamp myself, sorry!

from xchange-stream.

jurepetrovic avatar jurepetrovic commented on July 30, 2024

Ok, I saw @pchertalev commited something in bitstamp v2. I'll wait a bit to see if he knows something.
If not, I'l dig in myself....just don't know where properly...maybe with wireshark ;)

from xchange-stream.

chachalaca avatar chachalaca commented on July 30, 2024

@jurepetrovic I've investigated this issue and found out it that the problem is in
https://github.com/bitrich-info/xchange-stream/blob/develop/xchange-bitstamp/src/main/java/info/bitrich/xchangestream/bitstamp/v2/BitstampStreamingService.java line 59. Name of the event in channels live_orders_... and live_trades_... is not data but trades or order_.... See https://www.bitstamp.net/websocket/v2/

from xchange-stream.

jurepetrovic avatar jurepetrovic commented on July 30, 2024

@chachalaca Nice! I see they also have javascript examples on the site. I will check, when I find some time...

from xchange-stream.

jurepetrovic avatar jurepetrovic commented on July 30, 2024

Ok, I changed that on my fork to come pass this line.
https://github.com/jurepetrovic/xchange-stream

And then it crashed on JSON to object mapping in
BitstampStreamingMarketDataService.java, line 67
Need to go deeper here.

Mapper Crash

from xchange-stream.

jurepetrovic avatar jurepetrovic commented on July 30, 2024

Seems like BitstampWebSocketTransaction.java class does not match the specs. Will need to update the mapping class.

from xchange-stream.

chachalaca avatar chachalaca commented on July 30, 2024

This is weird. I've made almost identical fix as you but it works flawlessly..

from xchange-stream.

jurepetrovic avatar jurepetrovic commented on July 30, 2024

java.lang.NoSuchMethodError: org.knowm.xchange.bitstamp.dto.marketdata.BitstampTransaction.(JJLjava/math/BigDecimal;Ljava/math/BigDecimal;I)V

I'm getting this exception when trying to call constructor of the parent class in BitstampWebSocketTransaction.java.

What version of basic xchange are you using?

Thanks,
Jure

from xchange-stream.

jurepetrovic avatar jurepetrovic commented on July 30, 2024

Ok, I got this. It works for me now.
Did a little cleanup and new class for v2 BitstampTrades.
Can somebody of you guys do a quick check?
jurepetrovic@580ce20

What do you think? Can we do PR?

from xchange-stream.

jurepetrovic avatar jurepetrovic commented on July 30, 2024

Ok, let's see how this pans out.
@badgerwithagun who's reviewing this part?

#451

from xchange-stream.

pchertalev avatar pchertalev commented on July 30, 2024

Guys, I'm not clear what is the problem I started BitstampManualExample and trades are recieved well:

15:43:29.390 [main] INFO  info.bitrich.xchangestream.bitstamp.v2.BitstampStreamingExchange - Calling Remote Init...
15:43:29.398 [main] DEBUG si.mazi.rescu.HttpTemplate - Executing GET request at https://www.bitstamp.net/api/v2/trading-pairs-info/
15:43:30.286 [main] DEBUG si.mazi.rescu.HttpTemplate - Request http status = 200
15:43:30.386 [main] INFO  info.bitrich.xchangestream.bitstamp.v2.BitstampStreamingService - Connecting to wss://ws.bitstamp.net
15:43:31.685 [nioEventLoopGroup-2-1] INFO  info.bitrich.xchangestream.service.netty.WebSocketClientHandler - WebSocket Client connected!
15:43:31.685 [nioEventLoopGroup-2-1] WARN  info.bitrich.xchangestream.bitstamp.v2.BitstampStreamingService - Resubscribing channels
15:43:31.687 [main] INFO  info.bitrich.xchangestream.bitstamp.v2.BitstampStreamingService - Subscribing to channel live_trades_btcusd
15:43:31.720 [main] DEBUG info.bitrich.xchangestream.bitstamp.v2.BitstampStreamingService - Sending message: {"event":"bts:subscribe","data":{"channel":"live_trades_btcusd"}}
15:43:31.760 [nioEventLoopGroup-2-1] DEBUG info.bitrich.xchangestream.service.netty.JsonNettyStreamingService - Received message: {"event":"bts:subscription_succeeded","channel":"live_trades_btcusd","data":{}}
15:43:32.992 [nioEventLoopGroup-2-1] DEBUG info.bitrich.xchangestream.service.netty.JsonNettyStreamingService - Received message: {"data": {"microtimestamp": "1574858612723759", "amount": 0.01006, "buy_order_id": 4387860425, "sell_order_id": 4387860983, "amount_str": "0.01006000", "price_str": "7268.04", "timestamp": "1574858612", "price": 7268.04, "type": 1, "id": 101101885}, "event": "trade", "channel": "live_trades_btcusd"}
15:43:41.185 [nioEventLoopGroup-2-1] DEBUG info.bitrich.xchangestream.service.netty.JsonNettyStreamingService - Received message: {"data": {"microtimestamp": "1574858621023145", "amount": 0.09047, "buy_order_id": 4387861204, "sell_order_id": 4387861446, "amount_str": "0.09047000", "price_str": "7263.35", "timestamp": "1574858621", "price": 7263.35, "type": 1, "id": 101101889}, "event": "trade", "channel": "live_trades_btcusd"}
15:43:44.136 [nioEventLoopGroup-2-1] DEBUG info.bitrich.xchangestream.service.netty.JsonNettyStreamingService - Received message: {"data": {"microtimestamp": "1574858623986044", "amount": 0.007401, "buy_order_id": 4387861720, "sell_order_id": 4387861684, "amount_str": "0.00740100", "price_str": "7265.58", "timestamp": "1574858623", "price": 7265.58, "type": 0, "id": 101101891}, "event": "trade", "channel": "live_trades_btcusd"}

from xchange-stream.

pchertalev avatar pchertalev commented on July 30, 2024

Ah! I got - subscriber is not recieving trades - there is just JsonNettyStreamingService log.

from xchange-stream.

pchertalev avatar pchertalev commented on July 30, 2024

Guys, sorry I don't like changes from @jurepetrovic.
I have opened my PR regarding this issue.

from xchange-stream.

pchertalev avatar pchertalev commented on July 30, 2024

#456

from xchange-stream.

mdvx avatar mdvx commented on July 30, 2024

With #456 I get trades again
image

from xchange-stream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.