-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CheckPrice (Subsribe to order book) doesn't work ? #79
Comments
So it's not that it doesn't return anything but if it returns too many items, the callback won't be called. One quiet trade to test this on is Bitstamp XRP/JPY (will definitely change) with Request request =c.subscribeBookOffers(Issue.XRP, Issue.fromString("JPY/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"));
request.on(Request.OnSuccess.class, new Request.OnSuccess() {
@Override
public void called(Response response) {
if (response.succeeded) {
JSONArray offersJSON = response.result.optJSONArray("offers");
STArray offers = STArray.translate.fromJSONArray(offersJSON);
//etc
}
});
request.request(); It's also unclear if subscribe to book offer like this will listen (subscribe) to a stream or just be one-shot request which immediately returns. |
I'm not sure what's going on there, as I don't use ripple(-lib-java)? very much these days. My guess is that subscribing to the orders books, and getting the subscriptions works fine, due to the implementation happening to always (last I looked) write to all connected subscribers on ledger close. The requests on the other hand, have to go into the Job Queue and with the network currently having some troubles (I saw a rippled issue) there may not ever be a response ... Actually, I tried a simple Try the the "book_offers" command via the WebSocket tool and see if you can get a timely response. |
It only makes the request. You'll have to do a separate request and use |
To see this problem simply run CheckPrice with already embedded Bitstamp address.
The result is empty and it looks like
Response.OnResponse
callback is never called.When tested with Ripple's websocket tool, you can see that Bitstamp is pretty busy. At the very least BTC/USD and USD/XRP should always have activities.
The text was updated successfully, but these errors were encountered: