2.6 Get Deposit And Withdraw Transaction By Time (Common)
สำหรับ Merchant ดึงรายการฝาก-ถอนของ member ทุกคนที่อยู่ใต้เอเย่นต์โดยตรง ตามช่วงวัน และเวลา ผลเหมือน 2.3 Get Deposit And Withdraw Transaction ทุกอย่าง ต่างกันแค่ startDate / endDate ใส่เวลาได้ และเลือกโซนเวลาได้
Method : [Post]
Path : {{domain}}/ext/depositWithdrawTransactionHistoryByTime/{{prefix}}/{{agentUsername}}
Content-Type : application/json
Request Body
{
"agentUsername": "{{agentUsername}}",
"key": "{{key}}",
"startDate": "01-11-2026 09:00:00",
"endDate": "01-11-2026 18:29:59",
"gmt": "+07:00",
"web": "{{whiteLabel}}"
}
| Key | Type | Example Value | Description |
|---|---|---|---|
| agentUsername | String | testag | เอเย่นต์ที่ใช้งาน |
| key | String | tnyENKDWvOkBXpvm6UZVa | คีย์ของเอเย่นต์ |
| startDate | String | 01-11-2026 09:00:00 | เวลาเริ่ม DD-MM-YYYY HH:mm:ss นับรวม |
| endDate | String | 01-11-2026 18:29:59 | เวลาสิ้นสุด DD-MM-YYYY HH:mm:ss นับรวมจนจบวินาทีนั้น |
| gmt | String | +07:00 | ไม่บังคับ โซนเวลาของ startDate / endDate รูปแบบ +HH:MM หรือ -HH:MM (นาทีเป็น 00, 15, 30 หรือ 45 ตั้งแต่ -12:00 ถึง +14:00) ไม่ส่ง = เวลาไทย (GMT+7) |
| web | String | sportbook101 | เว็บที่ใช้งาน |
กติกาช่วงเวลา
- รูปแบบต้องตรงเป๊ะ วัน เดือน ชั่วโมง นาที วินาที ต้องเป็นเลขสองหลัก เช่น
01-11-2026 09:05:00ส่งแค่วันที่ไม่มีเวลาจะได้ 50013 - นับรวมทั้งสองปลาย และ
endDateนับถึงสิ้นวินาทีนั้น01-11-2026 00:00:00→01-11-2026 23:59:59คือทั้งวัน ได้รายการเดียวกับ 2.3 ที่ส่ง01-11-2026→02-11-2026· ถ้าจะดึงเป็นช่วงต่อกัน ให้จบก่อนช่วงถัดไปหนึ่งวินาที เช่น00:00:00–00:59:59,01:00:00–01:59:59 startDateเท่ากับendDateได้ (หนึ่งวินาที) แต่ห้ามมากกว่า (50014)- เวลาเดียวกันที่ส่งคนละโซนได้ผลเท่ากัน:
01-11-2026 07:00:00กับ+07:00=01-11-2026 00:00:00กับ+00:00 dateของรายการคือเวลาที่บันทึกจริง ช่วงเวลาจึงแม่นถึงวินาที- ได้เฉพาะรายการที่
transaction: "success"ของ member ที่อยู่ใต้เอเย่นต์โดยตรง ไม่ได้เรียงลำดับ
Response
{
"code": 0,
"data": [
{
"_id": "62b974f56e82c478362086bb",
"transaction": "success",
"user": "auto0859765751",
"actionBy": "API",
"currency": "THB",
"action": "DEPOSIT",
"amount": 10,
"withdraw": 0,
"from": "CASH",
"date": "2026-11-01T02:14:29.256Z",
"__v": 0,
"afterCredit": 10,
"beforeCredit": 0
}
]
}
| Key | Type | Description |
|---|---|---|
| code | Number | รหัสผลลัพธ์ของ API |
| data | Array | รายการฝาก-ถอน ฟิลด์เหมือน 2.3 ไม่มีรายการ = array ว่าง |
| data[].user | String | username ของ member |
| data[].action | String | DEPOSIT หรือ WITHDRAW |
| data[].amount | Number | จำนวนเงิน |
| data[].currency | String | สกุลเงิน |
| data[].beforeCredit / afterCredit | Number | เครดิตก่อนและหลัง |
| data[].date | Date | เวลาของรายการ (UTC) |
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. |
| 100012 | Key not found. |
| 100013 | Agent not found. |
| 104 | missing 'startDate' field |
| 105 | missing 'endDate' field |
| 50012 | Invalid 'gmt' field. Expected format '+07:00'. |
| 50013 | Invalid 'startDate' or 'endDate'. Expected format 'DD-MM-YYYY HH:mm:ss'. |
| 50014 | 'startDate' must not be after 'endDate'. |
| 50010 | Something went wrong please try again. (ผิดพลาดชั่วคราว ลองใหม่) |