拉取游戏交易信息
URl: https://{{gmag_game_data_url
}}/history/gameTrans?hash={{xxx}}。
方式:POST。
目的:用于根据交易产生时间获取玩家游戏中发生的交易记录,拉取的最长时间段为15分钟。
代理调用 gameTrans 命令的时长最小单位为分钟。在 GM-Ag 系统中,最近15天的游戏交易记录为可访问记录,超过30天的记录不能被拉取到。在系统对接过程中,以上规定需要再次确认。
在API的响应中,游戏交易的最大条数为10,000条。
代理保存的交易条数应该与 gameTrans 响应中的参数 total 的值始终保持一致。为了保证所有交易数据的准确性,代理可以对同一交易进行多次拉取。
拉取游戏交易信息,必须使用专用API域名gmag_game_data_url
。关于实际名称,请查看GM-Ag发送的开户信息相关内容。
请求
参数名 | 类型 | 必选 | 参数说明 |
---|---|---|---|
startTime | String(32) | 是 | GMT+0的日期和时间 |
endTime | String(32) | 是 | GMT+0的日期和时间 |
size | Int | 否 | 每页交易的条数,默认值 = 5000。 |
page | Int | 否 | 页码值,默认值 = 1。 |
playerId | String(24) | 否 | 玩家的唯一标识,用于获取某个玩家的交易信息。 |
showAll | Int | 否 | 1 - 包含子代理,0 - 不包含子代理。默认为0。 |
providerCode | String(32) | 否 | 游戏供应商唯一标识,用户获取某个供应商的交易信息 |
currency | String(8) | 否 | 根据玩家货币获取交易信息 |
响应
参数名 | 类型 | 必选 | 参数说明 |
---|---|---|---|
total | Int | 是 | 游戏交易的总条数 |
pages | Int | 是 | 交易的总页数 |
size | Int | 是 | 每页交易的条数 |
current | Int | 否 | 当前的页码 |
records | Array | 是 | gameTrans数据的数组,可以为空。 |
GameTrans数组元素
参数名 | 类型 | 必选 | 参数说明 |
---|---|---|---|
transId | String(64) | 是 | 游戏交易的唯一标识 |
playerId | String(24) | 是 | 玩家的唯一标识 |
brandId | bigInt | 是 | 代理的唯一标识 |
providerCode | String(8) | 是 | 游戏供应商的编码 |
sessionId | String(32) | 是 | 游戏会话的唯一标识 |
roundId | String(127) | 是 | 游戏回合的唯一标识 |
gameCode | String(32) | 是 | 交易的游戏代码 |
currency | String(8) | 是 | 交易的币种编码 |
platform | String(16) | 是 | 启动游戏的玩家设备平台(web, mobile, download) |
amount | numeric(16, 4) | 是 | 交易的金额(包含奖池赢取金额jpw) |
balanceBefore | numeric(16, 4) | 是 | 交易发生前,玩家的余额 |
balanceAfter | numeric(16, 4) | 是 | 交易发生后,玩家的余额 |
transTime | DateTime | 是 | 交易操作的时间 |
transType | String(16) | 是 | 交易的类型(bet, transIn, win, transOut, cancel。transIn = 从玩家转账到游戏,transOut = 从游戏转账到玩家) |
referenceId | String(64) | 否 | 当transType = ‘cancel’时,该值为对应上一条bet的transId |
bonusBalanceEnd | numeric(16, 4) | 否 | 游戏交易完成时,玩家的奖金余额 |
validBet | numeric(16, 4) | 否 | 有效投注,当transType = ‘transOut’时使用 |
validWin | numeric(16, 4) | 否 | 有效盈利,当transType = ‘transOut’时使用 |
jpc | numeric(16, 4) | 否 | 累积奖金池的贡献 |
jpw | numeric(16, 4) | 否 | 当transType = ‘win’,奖金池赢取的金额 |
jpDetails | text | 否 | 奖金池赢取的详细信息,如id |
rake | numeric(16, 4) | 否 | 抽水的金额 |
roundType | String(16) | 是 | 回合的类型(normal, freegame, bonusgame) |
roundStatus | String(8) | 是 | 回合的状态(active, end) |
additionalData | text | 否 | 交易的额外参数及参数值 |
description | String(512) | 否 | 交易的描述信息 |
detailUrl | String(2048) | 否 | 游戏的详情的链接,有些平台暂时无法提供 |
gameType | String(16) | 是 |
|
createdAt | DateTime | 是 | 创建时间 |
请求例子
{
"requestId": "requestId1234",
"brandId": "1001",
"startTime": "2021-06-10 10:00:00",
"endTime": "2021-06-10 10:05:00",
"size": 1000,
"page": 1,
}
响应例子
//success
{
"requestId":"requestId1234",
"error":"0",
"message":"success",
"total":2200,
"size":1000,
"current":1,
"pages":2,
"records":[
{
{
"transId":"pt4509924",
"sessionId":"06d3231d9a524d2290d0e8d809cdd9be",
"playerId":"SDFDF",
"currency":"IDR",
"providerCode":"pt",
"brandId":214,
"gameCode":"gpas_pluck_pop",
"roundId":"gpas_FyVN_Dw7-Qvjfdd7n4Lg",
"roundType":"normal",
"roundStatus":"end",
"transType":"win",
"transTime":"2021-06-10 10:01:02",
"createdAt": "2021-08-11 15:48:24.038",
"amount":1000.0000,
"balanceBefore":143421.7900,
"balanceAfter":144421.7900,
"platform":"web",
"bonusBalanceEnd":0.0000,
"validBet":0.0000,
"validWin":0.0000,
"jpc":0.0000,
"jpw":0.0000,
"rake":0.0000,
"gameType": "slots",
"detailUrl":"https://cashier.gmgiantgold.com/getgamehistoryurl.php?casino=1club&username=3MPL_AAAAAAA003K&ngscode=1989542&remotesessionenddate=2021-08-04+05%3A03%3A24&token=e1cf86c9be08c693e611101bc10668e33b9636e8daa16a26427528cb45894ed1&language=EN&showFullHistoryPerBet=false"
},
{
"transId":"pt4509923"
"sessionId":"06d3231d9a524d2290d0e8d809cdd9be",
"playerId":"SDFDF",
"currency":"IDR",
"providerCode":"pt",
"brandId":214,
"gameCode":"gpas_pluck_pop",
"requestId":"7be1089e-1eba-4484-8c4a-4009f42cdfca",
"roundId":"gpas_FyVN_Dw7-Qvjfdd7n4Lg",
"roundType":"normal",
"roundStatus":"active",
"transType":"bet",
"transTime":"2021-06-10 10:03:02.000",
"createdAt": "2021-08-11 15:48:24.038",
"amount":2500.0000,
"balanceBefore":145921.7900,
"balanceAfter":143421.7900,
"platform":"web",
"bonusBalanceEnd":0.0000,
"validBet":0.0000,
"validWin":0.0000,
"jpc":0.0000,
"jpw":0.0000,
"rake":0.0000,
"gameType": "slots"
}
]
}
//error
{
"requestId": "requestId1234",
"error": "P_02",
"message": "Invalid hash",
}