Sportbook APISportbook API
  • 1. Member

    • 1.1 Create User (Common)
    • 1.2 Change Password (Common)
    • 1.3 Change Status (Common)
    • 1.4 Redirect Login (Common)
    • 1.5 Get Profile And Credit (Common)
  • 2. Deposit & Withdraw

    • 2.1 Normal Deposit And Withdraw
    • 2.2 Deposit And Withdraw Pending Transaction
    • 2.3 Get Deposit And Withdraw Transaction (Common)
    • 2.4 Get Deposit And Withdraw Transaction By User (Common)
    • 2.5 Get Credit Agent (Common)
    • 2.6 Get Deposit And Withdraw Transaction By Time (Common)
  • 3. Game

    • 3.1 Get Provider Prefix List (Common)
    • 3.2 Game List (Common)
    • 3.3 Get Game List By Provider (Common)
    • 3.4 Game Detail (Common)
    • 3.5 Start Games (Common)
    • 3.6 Start Lotto (Common)
    • 3.7 Get Recently Games (Common)
    • 3.8 Favourite Games
  • 4. Win/Lose & Report

    • 4.1 Get WinLose By DepositID (Common)
    • 4.2 Get WinLose Multi DepositID (Common)
    • 4.3 Get Bet History By DepositID (Common)
    • 4.4 Get WinLose And Turnover (Common)
    • 4.5 Get Winlose By Date
    • 4.6 Get Normal Baccarat Turnover (Common)
    • 4.7 Report Winlose Account
    • 4.8 Dashboard
    • 4.9 Win/Lose Detail Report
    • 4.10 Get WinLose And Turnover By Time (Common)
  • 5. Promotion

    • 5.1 Get Url Start Tournament (Common)
    • 5.2 Leader Board
    • 5.3 Free Spin
  • Detail Types
  • Rate Limit
  • Error Code
  • English
  • ภาษาไทย
  • 简体中文
  • 1. Member

    • 1.1 Create User (Common)
    • 1.2 Change Password (Common)
    • 1.3 Change Status (Common)
    • 1.4 Redirect Login (Common)
    • 1.5 Get Profile And Credit (Common)
  • 2. Deposit & Withdraw

    • 2.1 Normal Deposit And Withdraw
    • 2.2 Deposit And Withdraw Pending Transaction
    • 2.3 Get Deposit And Withdraw Transaction (Common)
    • 2.4 Get Deposit And Withdraw Transaction By User (Common)
    • 2.5 Get Credit Agent (Common)
    • 2.6 Get Deposit And Withdraw Transaction By Time (Common)
  • 3. Game

    • 3.1 Get Provider Prefix List (Common)
    • 3.2 Game List (Common)
    • 3.3 Get Game List By Provider (Common)
    • 3.4 Game Detail (Common)
    • 3.5 Start Games (Common)
    • 3.6 Start Lotto (Common)
    • 3.7 Get Recently Games (Common)
    • 3.8 Favourite Games
  • 4. Win/Lose & Report

    • 4.1 Get WinLose By DepositID (Common)
    • 4.2 Get WinLose Multi DepositID (Common)
    • 4.3 Get Bet History By DepositID (Common)
    • 4.4 Get WinLose And Turnover (Common)
    • 4.5 Get Winlose By Date
    • 4.6 Get Normal Baccarat Turnover (Common)
    • 4.7 Report Winlose Account
    • 4.8 Dashboard
    • 4.9 Win/Lose Detail Report
    • 4.10 Get WinLose And Turnover By Time (Common)
  • 5. Promotion

    • 5.1 Get Url Start Tournament (Common)
    • 5.2 Leader Board
    • 5.3 Free Spin
  • Detail Types
  • Rate Limit
  • Error Code
  • English
  • ภาษาไทย
  • 简体中文
  • Overview
  • 1. Member

    • 1.1 Create User (Common)
    • 1.2 Change Password (Common)
    • 1.3 Change Status (Common)
    • 1.4 Redirect Login (Common)
    • 1.5 Get Profile And Credit (Common)
  • 2. Deposit & Withdraw

    • 2.1 Normal Deposit And Withdraw
    • 2.2 Deposit And Withdraw Pending Transaction
    • 2.3 Get Deposit And Withdraw Transaction (Common)
    • 2.4 Get Deposit And Withdraw Transaction By User (Common)
    • 2.5 Get Credit Agent (Common)
    • 2.6 Get Deposit And Withdraw Transaction By Time (Common)
  • 3. Game

    • 3.1 Get Provider Prefix List (Common)
    • 3.2 Game List (Common)
    • 3.3 Get Game List By Provider (Common)
    • 3.4 Game Detail (Common)
    • 3.5 Start Games (Common)
    • 3.6 Start Lotto (Common)
    • 3.7 Get Recently Games (Common)
    • 3.8 Favourite Games
  • 4. Win/Lose & Report

    • 4.1 Get WinLose By DepositID (Common)
    • 4.2 Get WinLose Multi DepositID (Common)
    • 4.3 Get Bet History By DepositID (Common)
    • 4.4 Get WinLose And Turnover (Common)
    • 4.5 Get Winlose By Date
    • 4.6 Get Normal Baccarat Turnover (Common)
    • 4.7 Report Winlose Account
    • 4.8 Dashboard
    • 4.9 Win/Lose Detail Report
    • 4.10 Get WinLose And Turnover By Time (Common)
  • 5. Promotion

    • 5.1 Get Url Start Tournament (Common)
    • 5.2 Leader Board
    • 5.3 Free Spin

4.9 Win/Lose Detail Report

Use these APIs to build the two report pages of one member that the back office shows:

  • Page A – Ticket list: every settled ticket of a member in a date range, with stake, valid amount and win/lose.
  • Page B – Ticket actions: opened from "Detail (n item.)" on a ticket. Lists every bet / payout / cancel action inside that ticket, with the credit before and after each action.

Call order: 4.9.1 get the ticket list → take preCalId of a ticket → 4.9.2 get its actions → for a "Bet Details" link, call 3.4 Game Detail with values from the action row. Provider display names come from 3.1 Get Provider Prefix List.

*username must be a member directly under your agent. It is not case-sensitive.

*Set a request timeout on your side (for example 15 seconds) and show a retry message when it is reached.

4.9.1 Get Win/Lose Ticket List (Common)

Use for Merchant get the settled tickets of one member (Page 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}}"
}
KeyTypeExample ValueDescription
agentUsernameStringtestagThe agent's username.
keyStringtnyENKDWvOkBXpvm6UZVaThe agent's unique key.
usernameStringtestagninemb01Member to report, directly under the agent. Not case-sensitive.
betTypeArray["Slot","Casino"]Ticket types to include (see the list below). Must be an array; an empty array returns nothing. Case-sensitive.
startDateString16-11-2026DD-MM-YYYY, GMT+7, inclusive.
endDateString17-11-2026DD-MM-YYYY, GMT+7, exclusive. For one day send the next day (16-11 → 17-11).

*Send startDate / endDate exactly as DD-MM-YYYY. Another format is not always rejected: it can be read as a different date and return the wrong tickets without an error (for example 2026-11-01 is read as 20-11-2001). | page | Number | 1 | Page number, starts at 1. | | limit | Number | 100 | Rows per page, maximum 100 (larger values are cut to 100). | | gameName | Array | ["FOOTBALL"] | Optional. Only for Askmebet sport tickets: filter by sport type. Leave out or send [] for no filter. | | web | String | sportbook101 | Active websites. |

betType values

betTypeTicket
normalAskmebet sport, single bet
stepAskmebet sport, parlay
comboStepAskmebet sport, combo
Sbo, Saba, Plb, Vsb, Fbs, Umb, Afb, Lali, Wss, Dbs, M8, Ufa, Obx, PdxThird-party sportsbooks
Casino, Slot, Card, Keno, Trade, Poker, Esport, CockCasino and games
LottoLotto

gameName values (sport type of Askmebet sport tickets): FOOTBALL, BASKETBALL, VOLLEYBALL, BOXING, RUGBY, HANDBALL, ICEHOCKEY, TENNIS, BULLFIGHT, BASEBALL, AMERICAN, SNOOKER, BADMINTON, TABLETENNIS.

Which tickets are returned

  • Only settled tickets: status is done or cancelled. Running tickets are never returned.
  • Only tickets whose win/lose calculation has finished. A ticket that has just settled can take a few minutes to appear.
  • The date range is matched against the settlement time (updateDate), not the bet time.
  • Sorted by updateDate, newest first.

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
    }
}
KeyTypeDescription
data.docsArrayTickets of this page.
data.totalDocs / totalPages / page / limitNumberPaging. Request the next page with page + 1 while hasNextPage is true.
betIdStringTicket ID. Show the part after # (copy the full value). Lotto: show the full value.
preCalIdStringKey for 4.9.2 (ticket actions).
typeStringTicket type (same values as betType in the request). Decides how every column is built.
betTypeStringSub type. Askmebet sport: same as type. Lotto: lotto kind (thailotto, yeekeelotto, pingponglotto, zodiaclotto, ...).
providerStringProvider code. Look it up in 3.1 Get Provider Prefix List (case-insensitive) for providerName and detailStatus.
gameNameStringGame name. Lotto: the draw (round).
gameIdArrayGame ID(s).
ref1 / ref2 / ref3StringProvider references (Sbo/Saba round ID is ref2).
betAmtDecimalStake, negative. Show -betAmt.
validAmtDecimalValid amount (turnover), negative. Show -validAmt.
winLoseDecimalMember win/lose including commission.
commAmtNumberCommission paid to the member.
commRateNumberCommission rate, %.
stakeNumberNumber of bet actions inside this ticket ("Detail (n item.)").
statusStringdone or cancelled.
remarkStringReason, for cancelled tickets.
ip / device / os / browserStringMember's last login when the bet arrived. unknown when not captured.
createDateDateFirst bet time of the ticket (UTC).
updateDateDateSettlement time (UTC).
sportArrayAskmebet sport legs (normal has 1 leg, step / comboStep have several).
sboInfoArraySbo match detail.
sabaInfoArraySaba match detail, one entry per leg.
lottoObjectLotto detail: type (position), betPosition (numbers), result (JSON string).

betAmt, validAmt and winLose are returned as {"$numberDecimal": "..."}. Convert them to numbers before you calculate. Times are UTC; convert to GMT+7 (or the member's time zone) for display.

Error Code

Valuemsg
0Success
100001Missing 'agent Username' field.
100002Agent username is type string.
100003Missing 'key' field.
100004Key is type string.
100005Missing 'username' field.
100006Username is type string.
100012Key not found.
100013Agent not found.
100014Member not found. (no such username, or not directly under the agent)
100042betType is not array.
50010Something went wrong please try again. (startDate / endDate cannot be read as a date, or a temporary error: try again)
106missing 'page' field
103missing 'limit' field

4.9.2 Get Ticket Actions By PreCalId (Common)

Use for Merchant get every action inside one ticket (Page 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}}"
}
KeyTypeExample ValueDescription
agentUsernameStringtestagThe agent's username.
keyStringtnyENKDWvOkBXpvm6UZVaThe agent's unique key.
usernameStringtestagninemb01Owner of the ticket, 5–24 characters, directly under the agent.
idString{{preCalId}}preCalId of a ticket from 4.9.1 of the same member.
webStringsportbook101Active websites.
  • There is no paging: every action of the ticket is returned in one response.
  • An id that does not exist returns code: 0 with an empty data array.
  • Sort the rows by d, newest first, as the back office does. Do not rely on the order returned.

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}}"]
        }
    ]
}
KeyDescription
uMember username.
pfSite prefix.
tpreCalId of the ticket.
pPayment reference.
dTime the action was recorded (UTC). Use it for the Date - Time column and for sorting.
l[0]Action: BET, PAYOUT, CANCEL, WL, ...
l[1]Provider reference ID (refId).
l[2]ref1, for 3.4 Game Detail.
l[3]ref2, for 3.4 Game Detail.
l[4]ref3, for 3.4 Game Detail.
l[5]Bet time sent by the provider, for 3.4 Game Detail (betTime).
l[6]Amount of this action: negative = bet, positive or 0 = payout.
l[7]Credit before the action.
l[8]Credit after the action.
l[9]Provider.
l[10]Game name.
l[11]Ticket type (Slot, Casino, Sbo, ...).
l[12]Game ID, for 3.4 Game Detail (gameId).

Newer rows can carry more items after l[12]. Ignore indexes you do not use.

Error Code

Valuemsg
0Success
100001Missing 'agent Username' field.
100002Agent username is type string.
100003Missing 'key' field.
100004Key is type string.
100005Missing 'username' field.
100006Username is type string.
100009Your username must be between 5 and 24 character.
100012Key not found.
100013Agent not found.
100014Member not found.
5044Permission denied (the member is not under this agent).
999Data not found. (the log service did not answer normally; try again)
998System error.

4.9.3 How To Build The Pages

All amounts are shown with 2 decimals. The back office cuts extra decimals instead of rounding (12.349 → 12.34). Negative amounts are shown in red.

Page A – Ticket list

ColumnHow to build it
No.(page - 1) * limit + index + 1
InformationLine 1: ticket ID = part of betId after # (Lotto: full betId), with a copy button that copies the full betId.
Line 2: Sbo / Saba: Round ID: ref2 and Action Time: updateDate. Other types: label Bet Time for Slot, Card and Casino, Settle Time for the rest; value updateDate (dd/MM HH:mm:ss).
Line 3: Info: ip plus device, os, browser (icons or text).
EventSee "Event by type" below.
DetailSee "Detail by type" below.
StatusSee "Status by type" below.
AmountTop: -betAmt (stake). Below, smaller: -validAmt (valid amount).
Member – Win LosewinLose - commAmt
Member – CommcommAmt and (commRate %)
Member – TotalwinLose
FooterSum of the rows on the current page: -betAmt, -validAmt and winLose.

Event by type

typeShow
normalsport[0].leagueName[lang]; teams sport[0].matchName[lang].h vs .a; match time sport[0].gameDate (dd/MM/yyyy HH:mm). The back office shows the team named in sport[0].ahd (h = home, a = away) in red and the other team in blue. lang is th, en, cn or tw.
step, comboStepSame as normal for the first leg sport[0]. All legs are in sport[].
SbosboInfo[0].league, sboInfo[0].match, sboInfo[0].kickOffTime. If sboInfo[0].sportType is Mix Parlay, show only "Mix Parlay". Provider: providerName.
SabasabaInfo[0].leagueName, homeName vs awayName, matchDateTime. Provider: providerName.
LottoProvider: provider (AMBLOTTO → "Askmelotto"); lotto kind: betType; draw: gameName; result: JSON.parse(lotto.result), an object of position → numbers.
TradeGame: gameName. Provider: providerName, or "Askmetrade" when not found.
Slot, Casino, Card, Keno, Poker, Esport, Cock, Plb, Fbs, Umb, Vsb, Dbs, Lali, Afb, Wss, M8, Ufa, Obx, PdxGame: gameName. Provider: providerName.

providerName = the entry of 3.1 Get Provider Prefix List whose provider equals the ticket's provider, compared case-insensitively. Keep its detailStatus too: Page B needs it. If no entry matches, show the provider code.

Detail by type

typeShow
Slot, Casino, Card, Keno, Trade, Poker, Esport, Cock, Plb, Fbs, Umb, Vsb, Dbs, Lali, Afb, Wss, M8, Ufa, Obx, PdxLink Detail (stake item.) that opens Page B with preCalId (4.9.2), and start: createDate (dd-MM-yyyy HH:mm:ss).
normalSport: sport[0].sportType.
Selection: for betType ou / ou1st, option 0 = Over, 1 = Under; for oe / oe1st, 0 = Odd, 1 = Even; for the other markets, 0 = home team, 1 = away team, 2 = Draw.
Stake: x -betAmt.
Market: sport[0].betType: ah = HDP, ou = Over/Under, oe = Odd/Even, x12 = 1x2, ml = ML. The …1st variants are first half ("HT"); ah, ou, oe, x12 are full time ("FT").
Line: [value] (not for x12, oe).
Odds: Odd price plus the odds type: oddsType 0 = MY, 1 = HK, 2 = EU, 3 = ID; x12 and ml are always EU.
Live bets: when table is live, add live @ info.lt (info.h : info.a), the score when the bet was placed.
Cancelled ticket: strike the text through and show remark.
step, comboStep"Askmebet", (Parlay) for step or (Combo) for comboStep, then x -betAmt. Clicking it shows every leg of sport[] with the same rules as normal. Total odds = product of sport[].price.
SbosboInfo[0].sportType, sboInfo[0].betOption x -betAmt, and a Detail link: call 3.4 Game Detail with gameId: gameId[0], ref1 and ref2: ref2 without the SBO_ prefix, ref3: ref3 or "", username.
SabasabaInfo[0].sportTypeName.
Single bet (sabaInfo has 1 item): betChoice x -betAmt.
Parlay (more than 1 item): (Parlay), which shows every leg of sabaInfo[] (league, home vs away, matchDateTime, betTypeName, betChoice, odds), then x -betAmt. Total odds = product of sabaInfo[].odds.
Then: sabaInfo[0].betTypeName and (live) when sabaInfo[0].isLive.
Odds: single bet sabaInfo[0].odds; parlay the total odds.
LottoNumbers: lotto.betPosition (for zodiaclotto: comma separated zodiac names); position: lotto.type (top3, bottom2, row2, ...); discount: commRate %.

Status by type

typeShow
normal, step, comboStepCancelled when status is cancelled. Otherwise Win when winLose > 0, Draw when = 0, Lose when < 0. You can add the final score from sport[0].result (periodScores: first half / full time / quarters).
Sbo, Saba, Plb, Umb, Fbs, Vsb, Afb, Dbs, Lali, Wss, M8, Ufa, Obx, PdxPayout when betAmt is 0, Bet when betAmt < 0.
Lotto with betType yeekeelotto, thailotto or pingponglottoWin when winLose >= 0, otherwise Lose.
Everything else-

Page B – Ticket actions

Call 4.9.2 with the ticket's preCalId and sort the rows by d, newest first.

ColumnHow to build it
No.Row number.
Date - Timed (dd-MM-yyyy HH:mm:ss).
Actionl[0] in title case: BET → Bet, PAYOUT → Payout, CANCEL → Cancel.
Game / Providerl[10] (l[9])
Game DetailA Bet Details link when any of these is true:
• l[0] is WL
• l[0] is PAYOUT and the ticket's provider has detailStatus: true in 3.1 Get Provider Prefix List
• l[11] is one of Sbo, Saba, Plb, Vsb, Fbs, Umb, M8, Ufa, Obx, Pdx
• l[1] starts with PDX_
The link calls 3.4 Game Detail with gameId: l[12], ref1: l[2], ref2: l[3], ref3: l[4], betTime: l[5], username: u and opens data.url in a new tab. Success is code: "0000" (a string); otherwise show description.
Bet / Payoutl[6], red when negative, blue otherwise.
Before Creditl[7]
After Creditl[8]
TotalSum of l[6]. It normally equals Member – Win Lose of the ticket on Page A (winLose - commAmt).

The currency of every amount is the ticket's currency.

Prev
4.8 Dashboard
Next
4.10 Get WinLose And Turnover By Time (Common)