@@ -0,0 +1,1473 @@
+package nxt.http.rpc;%0A%0Aimport java.util.List;%0A%0Aimport nxt.MofoQueries;%0Aimport nxt.MofoQueries.ForgingStatStruct;%0Aimport nxt.http.ParameterException;%0Aimport nxt.http.websocket.JSONData;%0Aimport nxt.http.websocket.RPCCall;%0Aimport nxt.Nxt;%0A%0Aimport org.json.simple.JSONArray;%0Aimport org.json.simple.JSONObject;%0Aimport org.json.simple.JSONStreamAware;%0A%0Apublic class GetForgingStats extends RPCCall %7B%0A   %0A    public static RPCCall instance = new GetForgingStats(%22getForgingStats%22);%0A%0A    public GetForgingStats(String identifier) %7B%0A        super(identifier);%0A    %7D%0A  %0A    @SuppressWarnings(%22unchecked%22)%0A    @Override%0A    public JSONStreamAware call(JSONObject arguments) throws ParameterException %7B%0A        int timestamp = ParameterParser.getTimestamp(arguments);%0A        if (timestamp == 0) %7B%0A            timestamp = Nxt.getBlockchain().getLastBlock().getTimestamp();%0A        %7D%0A%0A        List%3CForgingStatStruct%3E list = MofoQueries.getForgingStats24H(timestamp);%0A        %0A        JSONArray forgers = new JSONArray();%0A        for (ForgingStatStruct stat : list) %7B%0A            JSONObject json = new JSONObject();%0A            JSONData.putAccount(json, %22account%22, stat.getAccountId());%0A            json.put(%22feeNQT%22, String.valueOf(stat.getTotalFeeNQT()));%0A            json.put(%22count%22, stat.getBlockCount());%0A            forgers.add(json);%0A        %7D%0A        %0A        JSONObject response = new JSONObject();%0A        response.put(%22forgers%22, forgers);%0A        return response;%0A    %7D  %0A%0A%7D%0A

Add websocket API GetForgingStats