Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Web Socket - No Output #17

Open
spapapan opened this issue Jan 26, 2018 · 3 comments
Open

Web Socket - No Output #17

spapapan opened this issue Jan 26, 2018 · 3 comments
Labels

Comments

@spapapan
Copy link

I am trying to run:

		BinanceSymbol symbol = new BinanceSymbol("ETHBTC");
		Session session = (new BinanceApi()).websocketTrades(symbol, new BinanceWebSocketAdapterAggTrades() {
		    @Override
		    public void onMessage(BinanceEventAggTrade message) { 
		        System.out.println(message.toString());
		    }
		});
		try { Thread.sleep(5000); } catch (InterruptedException e) {}
		session.close();

But I don't get any output. There are no errors and the program never stop. Is this somehow my fault?

@wcrbrm
Copy link
Member

wcrbrm commented Jan 27, 2018

That just means nothing happened during those 5 seconds on that particular market.
Try increasing time interval or even remove the last 2 lines - it will watch market till the user interrupts it

wcrbrm pushed a commit that referenced this issue Jan 27, 2018
@spapapan
Copy link
Author

That's not the case. I have tried it many times and I checked the market. I also tried the other class BinanceWebSocketAdapterDepth but still I don't get anything back.

@wcrbrm
Copy link
Member

wcrbrm commented Jan 27, 2018

well, I've double checked the code is valid, I've added it as groovy example and it works for me.
May me it is somehow connected with dependencies managed manually like described in your previous ticket

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants