Sub-Merchant Bet Records (Fetch Latest)
1. Sub-Merchant Bet Records (Fetch Latest)
Interface Path
- Get
- /api/game/transaction/sub/latest
Description
- Query the latest bet orders of sub-merchants under the main merchant
- Fetch the latest bet orders by the last time
- A maximum of 1000 records can be fetched at a time
- Bet orders are sorted by "update time"
- Please use the "update time" of the last record from the previous fetch as the starting time for the next search
- Note: If no orders are fetched in a certain fetch, set the next fetch time to one minute before the current time
Interface Frequency Description
- The query bet records API can be called at most once every 5 seconds
Request Parameters
| Parameter | Name | Type | Required | Description |
|---|---|---|---|---|
| agent_id | Merchant ID | string | Required | Main merchant ID, used to verify the signature |
| sub_agent_id | Sub-Merchant ID | string | Optional | Specify a sub-merchant ID; if not passed, returns bet orders of all direct sub-merchants |
| last_time | Last Time | string | Required | In milliseconds |
| timestamp | Current Timestamp | int64 | Required | Timestamp when calling the interface (in milliseconds, valid for ten minutes) |
| sign | Signature | string | Required | Signature algorithm details in the interface description |
Description
agent_idis the main merchant ID, required, used to verify the whitelist and signature- When
sub_agent_idis passed, the interface verifies whether the sub-merchant belongs toagent_id; a non-direct sub-merchant will return a parameter error - When
sub_agent_idis not passed, returns bet orders of all direct sub-merchants underagent_id sub_agent_idparticipates in the signature calculation (must be included in the signature when it has a value)
Response Parameters
| Parameter | Name | Type | Description |
|---|---|---|---|
| code | Response Code | int | Error Code |
| message | Response Message | string | Error Message |
| data | Response Data | dict | Response Data Details |
| --transactions | Bet Order List | List | Bet Order List |
| ----id | Order ID | string | Order ID |
| ----game_id | Game ID | string | Game ID, 101: Baccarat |
| ----user_id | User ID | string | User ID |
| ----inst_id | Table ID | string | Table ID |
| ----shoe_id | Shoe ID | int64 | Shoe ID |
| ----round_id | Round ID | int64 | Round ID |
| ----bet_time | Bet Time | int64 | Bet Time |
| ----settle_time | Settle Time | int64 | Settle Time |
| ----bet_amount | Bet Amount | string | Bet Amount |
| ----real_bet_amount | Real Bet Amount | string | Real Bet Amount |
| ----valid_bet_turnover | valid bet turnover | string | valid bet turnover |
| ----win_amount | Payout Amount | string | Payout Amount |
| ----real_win_amount | Real Win Amount | string | Real Win Amount = Payout Amount - Bet Amount |
| ----currency | Currency | string | Currency |
| ----bet_detail | Bet Details | dict | Bet Details, the key is the bet item, the value is the bet amount |
| ----win_detail | Win Details | dict | Win Details, the key is the bet item, the value is the win amount |
| ----no_comm | commission free | boolean | commission free |
| ----game_result | Game Result | Array | Game Result |
| ----open_cards | Open Cards | dict | banker: Banker, player: Player, result: game result |
| ----create_time | Order Create Time | int64 | Order Create Time |
| ----update_time | Order Update Time | int64 | Order Update Time |
| ----status | Order Status | int32 | 0- Bet Placed, 1- Settled, 2- Unsettled Order Changed to Invalid, 3- Invalid Order, 4- Settled Changed to Invalid |
Bet Items Description
| Bet Item | Description |
|---|---|
| Tie | Tie |
| Banker | Banker |
| Player | Player |
| Big | Big |
| Small | Small |
| PlayerPair | Player Pair |
| BankerPair | Banker Pair |
| Super6 | Super 6 |
| PDragonBonus | Player Bonus |
| BDragonBonus | Banker Bonus |
| AnyPair | Any Pair |
| PerfectPair | Prefect Pair |
| PlayerNatural | Player Natural |
| BankerNatural | Banker Natural |
Card Face Description
- The open card face is concatenated into a string in the order of opening
- For example, if the first card of the player is Hearts A, the second card is Clubs 6, and the third card is Diamonds J, the concatenated string is "HeartsA,Clubs6,DiamondsJ"
| Suit | Description |
|---|---|
| Hearts | Hearts |
| Diamonds | Diamonds |
| Clubs | Clubs |
| Spades | Spades |
Request Example (Specified Sub-Merchant)
curl --location 'https://staging.aig1234.com/api/game/transaction/sub/latest?agent_id=agent001&sub_agent_id=sub001&last_time=1732589000000×tamp=1734417236278&sign=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json'
Request Example (All Direct Sub-Merchants)
curl --location 'https://staging.aig1234.com/api/game/transaction/sub/latest?agent_id=agent001&last_time=1732589000000×tamp=1734417236278&sign=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json'
Response Example
{
"code": 200,
"message": "success",
"data": {
"transactions": [
{
"id": "67453d0923c36d2571d40815",
"user_id": "7797",
"game_id": "101",
"inst_id": "iN95KcYR",
"shoe_id": 10907,
"round_id": 9,
"bet_time": 1732590857359,
"settle_time": 1732590881164,
"bet_amount": "100",
"real_bet_amount": "100",
"valid_bet_turnover": "100",
"win_amount": "200.00",
"currency": "USD",
"real_win_amount": "100.00",
"bet_detail": {
"Banker": 100
},
"win_detail": {
"Banker": "200.00"
},
"no_comm": true,
"game_result": [
"Banker",
"Big"
],
"open_cards": {
"banker": "Spades9,Hearts5",
"player": "Clubs7,Clubs7,DiamondsA"
},
"create_time": 1732590857359,
"update_time": 1732590857359,
"status": 1
}
]
}
}
Error Codes
200 Success
408000 Request Parameter Error
408003 Whitelist Restriction
408004 API Frequency Limit
600100 Invalid Signature
600101 Invalid Parameter
700101 Merchant Does Not Exist