It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
import io.socket.*;
import org.json.*;
import net.tootallnate.websocket.*;
public class MtGoxStreaming {
private static final String tickerChannel = "d5f06780-30a8-4a48-a2f8-7ed181b4a13f";
private static final String tradesChannel = "dbf1dee9-4f2e-4a08-8cb7-748919a71b21";
private static final String depthChannel = "24e67e0d-1cad-4cc0-9e7a-f8523ef460fe";
public static void main(String[] args) throws Exception {
SocketIO socket = new SocketIO("https://socketio.mtgox.com/mtgox");
socket.connect(new IOCallback() {
@Override
public void onMessage(JSONObject json, IOAcknowledge ack) {
try {
System.out.println("We received a message: " + json.toString(2));
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onMessage(String data, IOAcknowledge ack) {
System.out.println("We received a message:" + data);
}
@Override
public void onError(SocketIOException socketIOException) {
System.out.println("Something went wrong: " + socketIOException);
socketIOException.printStackTrace();
//System.exit(0);
}
@Override
public void onDisconnect() {
System.out.println("Disconnected");
System.exit(0);
}
@Override
public void onConnect() {
System.out.println("Connected");
}
@Override
public void on(String event, IOAcknowledge ack, Object... args) {
System.out.println("got: " + event);
ack.ack("Roger that!");
//socket.emit("answer", new JSONObject().put("msg", "Hello again Socket.io!"));
}
});
// This will be cached until the server is connected.
//socket.emit("hello", new JSONObject().put("msg", "Hello Socket.io! :D"));
JSONObject obj = new JSONObject();
obj.put("op", "subscribe");
//obj.put("channel", depthChannel);
obj.put("channel", "d5f06780-30a8-4a48-a2f8-7ed181b4a13f");
socket.send(obj);
}
}
Connected
> 1::/mtgox
> 4::/mtgox:{"op":"subscribe","channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f"}
> 2::
> 2::
> 2::
> 2::
> 2::
> 2::
> 2::
< 7:::1+0
Something went wrong: io.socket.SocketIOException: 1+0
io.socket.SocketIOException: 1+0