Headers
Section titled “Headers”| Header | Value | Description |
|---|---|---|
Api-Id | agent_id | AL Agent |
Api-Key | your_api_key | API KEY from us |
The User Bet History endpoint allows you to retrieve the betting history for a specific player or all players within a date range.
| Header | Value | Description |
|---|---|---|
Api-Id | agent_id | AL Agent |
Api-Key | your_api_key | API KEY from us |
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | ✅ | Page number (Min: 1) |
type | string | ✅ | Type of history (ALL, END, ING) |
user_id | string | ❌ | Your player’s unique identifier |
start_date | string | ❌ | Search start date |
end_date | string | ❌ | Search end date |
last_index | number | ❌ | Last index from previous request |
bet_index | number | ❌ | Specific bet index to search |
Successful Response
interface BetHistoryResponse { code: number data: { total_page: number req_page: number list: { game_no: string table_no: string user_id: string bet_index: string start_date: string bet_date: string end_date: string bet_type: string bet_amount: number winlose: number stat: string balance_before: number balance_after: number currency: string game_type: string result: string result_detail: string }[], }}Failed Response
interface BetHistoryResponse { code: number message: string}Server Error
interface BetHistoryResponse { code: number message: string}fetch('https://API-PLATFORM/bet-history', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Api-Id': 'YOUR_SECRET_TOKEN', 'Api-Key': 'YOUR_SECRET_TOKEN' }, body: JSON.stringify({ type: 'ALL', page: 1, user_id: '', start_date: '', end_date: '', last_index: 1, bet_index: 1 })})import axios from 'axios';
const options = { method: 'POST', url: 'https://API-PLATFORM/bet-history', headers: { 'Content-Type': 'application/json', 'Api-Id': 'YOUR_SECRET_TOKEN', 'Api-Key': 'YOUR_SECRET_TOKEN' }, data: { type: 'ALL', page: 1, user_id: '', start_date: '', end_date: '', last_index: 1, bet_index: 1 }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error); console.error(error.response.data)}