1. 主页
  2. 文档
  3. Mega API Document
  4. API Interface
  5. View agent accounts (view the accounts group by day)

View agent accounts (view the accounts group by day)

Interface URL address 

Loading table...

Interface description

Loading table...

Response parameter 

Loading table...

result

Loading table...

items element attribute description 

Loading table...

Request Example

public static void test() {
		
	String sn = "ld00";
	String random = String.valueOf(System.currentTimeMillis());
	String agentLoginId = "Mega1-10";
	String secretCode = "oOGKmN8zAycJtz9cYJQXr8ddMYQ=";
	String digest = HashUtil.md5Hex(random+sn+agentLoginId+secretCode);
	try {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("sn", sn);
		params.put("agentLoginId", agentLoginId);
		params.put("random", random);
		params.put("digest", digest);
		params.put("type", 1);
		params.put("startTime", "2022-11-09 00:00:00");
		params.put("endTime", "2022-11-09 23:59:59");
		String json = buildParams(params, "open.mega.player.total.report");
		String result = OkHttpUtils.post("https://ae8855.feiyanma.com/mega-cloud/api/", json);
		System.out.println(result);
	} catch (Exception e) {
		e.printStackTrace();
	}
}

private static String buildParams(Map<String, Object> postData, String method) {
	
	Map<String, Object> rpcMap = new HashMap<>();
	rpcMap.put("jsonrpc", "2.0");
	rpcMap.put("method", method);
	rpcMap.put("params", postData);
	rpcMap.put("id", SeqUUIDUtil.toSequenceUUID());
	String param = JsonUtil.toJson(rpcMap);
	return param;
}

Response Example

{
    "id": "1700553450077",
    "result": {
        "totalBet": 974.47,
        "items": [{
                "statisticDate": "2022-11-14 ",
                "bet": 974.47,
                "win": 72.72,
                "yield": 3.48,
                "jackpotWin": 0,
                "redpocketWin": 27
            }
        ],
        "totalWin": 72.72
    },
    "error": null,
    "jsonrpc": "2.0"
}

我们要如何帮助您?