4.9 Win/Lose Detail Report
使用本组 API 搭建后台中单个 member 的两个报表页面:
- 页面 A – 注单列表: member 在日期范围内所有已结算的注单,包含投注额、有效投注和输赢。
- 页面 B – 注单动作: 从注单的 "Detail (n item.)" 打开。列出该注单内每一次 bet / payout / cancel,以及每次动作前后的余额。
调用顺序:4.9.1 获取注单列表 → 取注单的 preCalId → 4.9.2 获取该注单的动作 → "Bet Details" 链接用动作行的值调用 3.4 Game Detail。厂商显示名称来自 3.1 Get Provider Prefix List。
*username 必须是代理的直属 member,不区分大小写。
*请在调用方设置请求超时(例如 15 秒),超时后提示用户重试。
4.9.1 Get Win/Lose Ticket List (Common)
供 Merchant 获取单个 member 已结算的注单(页面 A)
Method : [Post]
Path : {{domain}}/ext/reportWinLoseDetailByUsername/{{prefix}}/{{agentUsername}}
Content-Type : application/json
Request Body
{
"agentUsername": "{{agentUsername}}",
"key": "{{key}}",
"username": "{{agentUsername}}ninemb01",
"betType": ["normal","comboStep","step","Casino","Slot","Lotto","Keno","Trade","Card","Poker","Esport","Cock","Sbo","Saba","Plb","Vsb","Fbs","Umb","Afb","Lali","Wss","Dbs","M8","Ufa","Obx","Pdx"],
"startDate": "16-11-2026",
"endDate": "17-11-2026",
"page": 1,
"limit": 100,
"gameName": [],
"web": "{{whiteLabel}}"
}
| Key | Type | Example Value | Description |
|---|---|---|---|
| agentUsername | String | testag | 代理账号 |
| key | String | tnyENKDWvOkBXpvm6UZVa | 代理密钥 |
| username | String | testagninemb01 | 要查询的 member,代理的直属会员,不区分大小写 |
| betType | Array | ["Slot","Casino"] | 要查询的注单类型(见下表)。必须是数组;空数组不返回任何数据。区分大小写。 |
| startDate | String | 16-11-2026 | DD-MM-YYYY,GMT+7,包含当天 |
| endDate | String | 17-11-2026 | DD-MM-YYYY,GMT+7,不包含当天。查询一天请传下一天(16-11 → 17-11) |
*startDate / endDate 必须严格使用 DD-MM-YYYY。其他格式不一定会被拒绝,可能被识别为其他日期并在没有错误的情况下返回错误范围的注单(例如 2026-11-01 会被识别为 20-11-2001)。 | page | Number | 1 | 页码,从 1 开始 | | limit | Number | 100 | 每页条数,最大 100(超过按 100 处理) | | gameName | Array | ["FOOTBALL"] | 可选。仅用于 Askmebet 体育注单,按运动类型筛选。不传或传 [] 表示不筛选 | | web | String | sportbook101 | 使用的网站 |
betType 取值
| betType | 注单 |
|---|---|
| normal | Askmebet 体育单注 |
| step | Askmebet 体育串关 (Parlay) |
| comboStep | Askmebet 体育组合 (Combo) |
| Sbo, Saba, Plb, Vsb, Fbs, Umb, Afb, Lali, Wss, Dbs, M8, Ufa, Obx, Pdx | 第三方体育 |
| Casino, Slot, Card, Keno, Trade, Poker, Esport, Cock | 真人与游戏 |
| Lotto | 彩票 |
gameName 取值(Askmebet 体育注单的运动类型):FOOTBALL, BASKETBALL, VOLLEYBALL, BOXING, RUGBY, HANDBALL, ICEHOCKEY, TENNIS, BULLFIGHT, BASEBALL, AMERICAN, SNOOKER, BADMINTON, TABLETENNIS
返回哪些注单
- 仅已结算注单:
status为done或cancelled。未结算(running)的注单不会返回。 - 仅输赢计算已完成的注单。刚结算的注单可能需要几分钟才会出现。
- 日期范围按 结算时间(
updateDate)匹配,不是投注时间。 - 按
updateDate从新到旧排序。
Response
{
"code": 0,
"msg": "success",
"data": {
"docs": [
{
"_id": "6738a1f0c2b54e0012a3f0b1",
"betId": "{{hash}}#1794829800977IL45854",
"preCalId": "{{preCalId}}",
"memberId": "6738a1f0c2b54e0012a30001",
"username": "testagninemb01",
"currency": "THB",
"type": "Slot",
"betType": "Slot",
"provider": "RPG",
"gameName": "Bonanza Gold",
"gameId": ["{{gameId}}"],
"ref1": "{{ref1}}", "ref2": "{{ref2}}", "ref3": "{{ref3}}",
"betAmt": { "$numberDecimal": "-168" },
"validAmt": { "$numberDecimal": "-168" },
"winLose": { "$numberDecimal": "-133" },
"commAmt": 0,
"commRate": 0,
"stake": 12,
"status": "done",
"ip": "2001:44c8:4091:e6cc:dc8e:6495:8065:7101",
"device": "mobile",
"os": "ios",
"browser": "safari",
"createDate": "2026-11-16T11:50:00.000Z",
"updateDate": "2026-11-16T11:50:00.000Z"
}
],
"totalDocs": 7,
"limit": 100,
"page": 1,
"totalPages": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}
}
| Key | Type | Description |
|---|---|---|
| data.docs | Array | 本页注单 |
| data.totalDocs / totalPages / page / limit | Number | 分页。hasNextPage 为 true 时用 page + 1 请求下一页 |
| betId | String | 注单号。显示 # 之后的部分(复制按钮复制完整值)。彩票显示完整值 |
| preCalId | String | 用于 4.9.2(注单动作) |
| type | String | 注单类型(与请求中的 betType 取值相同),决定每一列如何显示 |
| betType | String | 子类型。Askmebet 体育与 type 相同;彩票为彩种(thailotto、yeekeelotto、pingponglotto、zodiaclotto 等) |
| provider | String | 厂商代码。在 3.1 Get Provider Prefix List 中查找(不区分大小写)得到 providerName 和 detailStatus |
| gameName | String | 游戏名称。彩票为期号 |
| gameId | Array | 游戏 ID |
| ref1 / ref2 / ref3 | String | 厂商参考号(Sbo/Saba 的 Round ID 是 ref2) |
| betAmt | Decimal | 投注额,负数。显示 -betAmt |
| validAmt | Decimal | 有效投注(流水),负数。显示 -validAmt |
| winLose | Decimal | member 输赢,已包含佣金 |
| commAmt | Number | member 获得的佣金 |
| commRate | Number | 佣金比例 % |
| stake | Number | 该注单内的动作数量("Detail (n item.)" 中的 n) |
| status | String | done 或 cancelled |
| remark | String | 取消原因(已取消的注单) |
| ip / device / os / browser | String | 注单到达时 member 最近一次登录的信息,未采集时为 unknown |
| createDate | Date | 注单第一次投注时间(UTC) |
| updateDate | Date | 结算时间(UTC) |
| sport | Array | Askmebet 体育的每一腿(normal 1 腿,step / comboStep 多腿) |
| sboInfo | Array | Sbo 赛事详情 |
| sabaInfo | Array | Saba 赛事详情,每腿一条 |
| lotto | Object | 彩票详情:type(位置)、betPosition(投注号码)、result(开奖结果,JSON 字符串) |
betAmt、validAmt、winLose 以 {"$numberDecimal": "..."} 返回,计算前需转为数字。所有时间为 UTC,显示前请转换为 GMT+7(或 member 所在时区)。
Error Code
| Value | msg |
|---|---|
| 0 | Success |
| 100001 | Missing 'agent Username' field. |
| 100002 | Agent username is type string. |
| 100003 | Missing 'key' field. |
| 100004 | Key is type string. |
| 100005 | Missing 'username' field. |
| 100006 | Username is type string. |
| 100012 | Key not found. |
| 100013 | Agent not found. |
| 100014 | Member not found.(无此 username,或不是该代理的直属会员) |
| 100042 | betType is not array. |
| 50010 | Something went wrong please try again.(startDate / endDate 无法识别为日期,或临时错误,请重试) |
| 106 | missing 'page' field |
| 103 | missing 'limit' field |
4.9.2 Get Ticket Actions By PreCalId (Common)
供 Merchant 获取单张注单内的所有动作(页面 B)
Method : [Post]
Path : {{domain}}/ext/winLoseFindByPreCalId/{{prefix}}/{{agentUsername}}
Content-Type : application/json
Request Body
{
"agentUsername": "{{agentUsername}}",
"key": "{{key}}",
"username": "{{agentUsername}}ninemb01",
"id": "{{preCalId}}",
"web": "{{whiteLabel}}"
}
| Key | Type | Example Value | Description |
|---|---|---|---|
| agentUsername | String | testag | 代理账号 |
| key | String | tnyENKDWvOkBXpvm6UZVa | 代理密钥 |
| username | String | testagninemb01 | 注单所属 member,5–24 个字符,代理的直属会员 |
| id | String | {{preCalId}} | 同一 member 在 4.9.1 中注单的 preCalId |
| web | String | sportbook101 | 使用的网站 |
- 无分页:一次返回该注单的所有动作。
- 不存在的
id返回code: 0和空的data数组。 - 请按
d从新到旧排序(与后台一致),不要依赖返回顺序。
Response
{
"code": 0,
"msg": "SUCCESS",
"data": [
{
"u": "testagninemb01",
"t": "{{preCalId}}",
"p": "{{paymentId}}",
"d": "2026-11-16T11:50:24.000Z",
"l": ["PAYOUT", "{{refId}}", "{{ref1}}", "{{ref2}}", "{{ref3}}", "2026-11-16T11:50:24.000Z", 0, 10000.49, 10000.49, "RPG", "Bonanza Gold", "Slot", "{{gameId}}"]
},
{
"u": "testagninemb01",
"t": "{{preCalId}}",
"p": "{{paymentId}}",
"d": "2026-11-16T11:50:24.000Z",
"l": ["BET", "{{refId}}", "{{ref1}}", "{{ref2}}", "{{ref3}}", "2026-11-16T11:50:24.000Z", -28, 10028.49, 10000.49, "RPG", "Bonanza Gold", "Slot", "{{gameId}}"]
}
]
}
| Key | Description |
|---|---|
| u | member 账号 |
| pf | 网站前缀 |
| t | 注单的 preCalId |
| p | 资金参考号 |
| d | 动作记录时间(UTC),用于 Date - Time 列和排序 |
| l[0] | 动作:BET、PAYOUT、CANCEL、WL 等 |
| l[1] | 厂商参考号(refId) |
| l[2] | ref1,用于 3.4 Game Detail |
| l[3] | ref2,用于 3.4 Game Detail |
| l[4] | ref3,用于 3.4 Game Detail |
| l[5] | 厂商发送的投注时间,用于 3.4 Game Detail(betTime) |
| l[6] | 本次动作金额:负数 = 投注,正数或 0 = 派彩 |
| l[7] | 动作前余额 |
| l[8] | 动作后余额 |
| l[9] | 厂商 |
| l[10] | 游戏名称 |
| l[11] | 注单类型(Slot、Casino、Sbo 等) |
| l[12] | 游戏 ID,用于 3.4 Game Detail(gameId) |
较新的记录可能在 l[12] 之后还有更多项,未使用的索引请忽略。
Error Code
| Value | msg |
|---|---|
| 0 | Success |
| 100001 | Missing 'agent Username' field. |
| 100002 | Agent username is type string. |
| 100003 | Missing 'key' field. |
| 100004 | Key is type string. |
| 100005 | Missing 'username' field. |
| 100006 | Username is type string. |
| 100009 | Your username must be between 5 and 24 character. |
| 100012 | Key not found. |
| 100013 | Agent not found. |
| 100014 | Member not found. |
| 5044 | Permission denied(该 member 不在此代理之下) |
| 999 | Data not found.(日志服务返回异常,请重试) |
| 998 | System error. |
4.9.3 页面搭建说明
所有金额显示 2 位小数。后台对多余的小数直接截断,不四舍五入(12.349 → 12.34)。负数显示为红色。
页面 A – 注单列表
| 列 | 搭建方式 |
|---|---|
| No. | (page - 1) * limit + index + 1 |
| Information | 第 1 行: 注单号 = betId 中 # 之后的部分(彩票用完整 betId),复制按钮复制完整 betId。第 2 行: Sbo / Saba 显示 Round ID: ref2 和 Action Time: updateDate;其他类型中 Slot、Card、Casino 标题为 Bet Time,其余为 Settle Time,值为 updateDate(dd/MM HH:mm:ss)。第 3 行: Info: ip,后接 device、os、browser(图标或文字)。 |
| Event | 见下方 "按类型显示 Event"。 |
| Detail | 见下方 "按类型显示 Detail"。 |
| Status | 见下方 "按类型显示 Status"。 |
| Amount | 上:-betAmt(投注额)。下方小字:-validAmt(有效投注)。 |
| Member – Win Lose | winLose - commAmt |
| Member – Comm | commAmt 和 (commRate %) |
| Member – Total | winLose |
| 合计行 | 当前页各行之和:-betAmt、-validAmt、winLose。 |
按类型显示 Event
| type | 显示 |
|---|---|
| normal | sport[0].leagueName[lang];球队 sport[0].matchName[lang].h vs .a;比赛时间 sport[0].gameDate(dd/MM/yyyy HH:mm)。后台将 sport[0].ahd(h = 主队,a = 客队)指定的球队显示为红色,另一队为蓝色。lang 为 th、en、cn 或 tw。 |
| step, comboStep | 与 normal 相同,使用第一腿 sport[0]。所有腿在 sport[] 中。 |
| Sbo | sboInfo[0].league、sboInfo[0].match、sboInfo[0].kickOffTime。若 sboInfo[0].sportType 为 Mix Parlay,只显示 "Mix Parlay"。厂商:providerName。 |
| Saba | sabaInfo[0].leagueName、homeName vs awayName、matchDateTime。厂商:providerName。 |
| Lotto | 厂商:provider(AMBLOTTO → "Askmelotto");彩种:betType;期号:gameName;开奖结果:JSON.parse(lotto.result),得到 位置 → 号码 的对象。 |
| Trade | 游戏:gameName。厂商:providerName,找不到时显示 "Askmetrade"。 |
| Slot, Casino, Card, Keno, Poker, Esport, Cock, Plb, Fbs, Umb, Vsb, Dbs, Lali, Afb, Wss, M8, Ufa, Obx, Pdx | 游戏:gameName。厂商:providerName。 |
providerName = 3.1 Get Provider Prefix List 中 provider 与注单 provider 相同(不区分大小写)的那一项。同时保存该项的 detailStatus,页面 B 需要用到。找不到时显示厂商代码。
按类型显示 Detail
| type | 显示 |
|---|---|
| Slot, Casino, Card, Keno, Trade, Poker, Esport, Cock, Plb, Fbs, Umb, Vsb, Dbs, Lali, Afb, Wss, M8, Ufa, Obx, Pdx | 链接 Detail (stake item.),用 preCalId 打开页面 B(4.9.2),以及 start: createDate(dd-MM-yyyy HH:mm:ss)。 |
| normal | 运动: sport[0].sportType。投注方: betType 为 ou / ou1st 时,option 0 = 大 (Over),1 = 小 (Under);为 oe / oe1st 时,0 = 单 (Odd),1 = 双 (Even);其他玩法 0 = 主队,1 = 客队,2 = 和局 (Draw)。投注额: x -betAmt。玩法: sport[0].betType:ah = HDP,ou = 大/小,oe = 单/双,x12 = 1x2,ml = ML。以 …1st 结尾的是上半场("HT");ah、ou、oe、x12 是全场("FT")。盘口: [value](x12、oe 不显示)。赔率: Odd price,后接赔率类型:oddsType 0 = MY,1 = HK,2 = EU,3 = ID;x12 和 ml 固定为 EU。滚球: table 为 live 时加上 live @ info.lt (info.h : info.a),即投注时的比分。已取消注单: 文字加删除线并显示 remark。 |
| step, comboStep | "Askmebet",step 显示 (Parlay),comboStep 显示 (Combo),然后 x -betAmt。点击后按 normal 的规则显示 sport[] 的每一腿。总赔率 = sport[].price 的乘积。 |
| Sbo | sboInfo[0].sportType、sboInfo[0].betOption x -betAmt,以及 Detail 链接:调用 3.4 Game Detail,参数 gameId: gameId[0],ref1 和 ref2 = 去掉 SBO_ 前缀的 ref2,ref3: ref3 或 "",username。 |
| Saba | sabaInfo[0].sportTypeName。单注( sabaInfo 只有 1 项):betChoice x -betAmt。串关(多于 1 项): (Parlay),点击后显示 sabaInfo[] 的每一腿(联赛、主队 vs 客队、matchDateTime、betTypeName、betChoice、odds),然后 x -betAmt。总赔率 = sabaInfo[].odds 的乘积。然后: sabaInfo[0].betTypeName,sabaInfo[0].isLive 时加 (live)。赔率: 单注为 sabaInfo[0].odds;串关为总赔率。 |
| Lotto | 号码:lotto.betPosition(zodiaclotto 为逗号分隔的生肖名);位置:lotto.type(top3、bottom2、row2 等);折扣:commRate %。 |
按类型显示 Status
| type | 显示 |
|---|---|
| normal, step, comboStep | status 为 cancelled 时显示 Cancelled。否则 winLose > 0 为 Win,= 0 为 Draw,< 0 为 Lose。可从 sport[0].result(periodScores:上半场 / 全场 / 每节)补充最终比分。 |
| Sbo, Saba, Plb, Umb, Fbs, Vsb, Afb, Dbs, Lali, Wss, M8, Ufa, Obx, Pdx | betAmt 为 0 时显示 Payout,betAmt < 0 时显示 Bet。 |
Lotto 且 betType 为 yeekeelotto、thailotto 或 pingponglotto | winLose >= 0 为 Win,否则 Lose。 |
| 其他 | - |
页面 B – 注单动作
用注单的 preCalId 调用 4.9.2,并按 d 从新到旧排序。
| 列 | 搭建方式 |
|---|---|
| No. | 行号 |
| Date - Time | d(dd-MM-yyyy HH:mm:ss) |
| Action | l[0] 首字母大写:BET → Bet,PAYOUT → Payout,CANCEL → Cancel |
| Game / Provider | l[10] (l[9]) |
| Game Detail | 满足以下任一条件时显示 Bet Details 链接:• l[0] 为 WL• l[0] 为 PAYOUT,且注单厂商在 3.1 Get Provider Prefix List 中 detailStatus: true• l[11] 为 Sbo、Saba、Plb、Vsb、Fbs、Umb、M8、Ufa、Obx、Pdx 之一• l[1] 以 PDX_ 开头链接调用 3.4 Game Detail,参数 gameId: l[12]、ref1: l[2]、ref2: l[3]、ref3: l[4]、betTime: l[5]、username: u,并在新标签页打开 data.url。成功时 code 为字符串 "0000",否则显示 description。 |
| Bet / Payout | l[6],负数红色,其余蓝色 |
| Before Credit | l[7] |
| After Credit | l[8] |
| Total | l[6] 之和,通常等于页面 A 中该注单的 Member – Win Lose(winLose - commAmt) |
所有金额的币种为注单的 currency。