> ## Documentation Index
> Fetch the complete documentation index at: https://doc.va777.net/llms.txt
> Use this file to discover all available pages before exploring further.

# List bet records

> List bet records: request parameters, response format and response codes.

> [!NOTE]
>
> * Bet records are kept for at most 2 hours.
> * If one bet ID has more than one record (for example, after a correction), the most recently created record is returned.
> * This service is rate limited to 2 calls per second (2/s).
> * Returns bets whose time, as selected by searchMode, falls within the search range (start and end times inclusive).
> * The maximum time range per search is 15 minutes.
> * The search end time must be at least 2 minutes before the current time.
> * This feature is not available to seamless wallet operators.

## Path

```text theme={null}
GET {host}/api/v1.0/betlog/listByTime
```

## Headers

<table>
  <colgroup>
    <col width="27%" />

    <col width="10%" />

    <col width="7%" />

    <col width="56%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`Authorization`</td><td>string</td><td>Yes</td><td>Token we provide</td></tr>
  </tbody>
</table>

## Request parameters

<table>
  <colgroup>
    <col width="27%" />

    <col width="10%" />

    <col width="7%" />

    <col width="11%" />

    <col width="45%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Signed</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`channelId`</td><td>number</td><td>Yes</td><td>✓</td><td>Channel ID (use 1 if you have no channels; 0 queries all)</td></tr>
    <tr><td>`searchMode`</td><td>number</td><td>Yes</td><td>✓</td><td>Search mode (0: bet time)</td></tr>
    <tr><td>`startTime`</td><td>string</td><td>Yes</td><td>✓</td><td>Search start time (see [Time format](https://doc.va777.net/en/v1/guides/request-format.md#time-format))</td></tr>
    <tr><td>`endTime`</td><td>string</td><td>Yes</td><td>✓</td><td>Search end time (see [Time format](https://doc.va777.net/en/v1/guides/request-format.md#time-format))</td></tr>
    <tr><td>`page`</td><td>number</td><td>Yes</td><td>✓</td><td>Page number (minimum 1)</td></tr>
    <tr><td>`pageSize`</td><td>number</td><td>Yes</td><td>✓</td><td>Records per page (minimum 2000, maximum 5000)</td></tr>
    <tr><td>`sign`</td><td>string</td><td>Yes</td><td /><td>Signature. See [Signature](https://doc.va777.net/en/v1/guides/signature.md) for how to generate it</td></tr>
  </tbody>
</table>

## Response

Success (the HTTP status code is always 200; check `status.code` for the result)

<table>
  <colgroup>
    <col width="34%" />

    <col width="12%" />

    <col width="54%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`data`</td><td>object</td><td /></tr>
    <tr><td>`data.betlogList`</td><td>object\[]</td><td>Bet records</td></tr>
    <tr><td>`data.betlogList[].versionKey`</td><td>number</td><td>Bet version key (serial number; always 0 for performance reasons)</td></tr>
    <tr><td>`data.betlogList[].betId`</td><td>string</td><td>Bet ID (unique per bet record)</td></tr>
    <tr><td>`data.betlogList[].channelId`</td><td>number</td><td>Channel ID</td></tr>
    <tr><td>`data.betlogList[].account`</td><td>string</td><td>Member account</td></tr>
    <tr><td>`data.betlogList[].currency`</td><td>string</td><td>Currency (contact our business team)</td></tr>
    <tr><td>`data.betlogList[].gameId`</td><td>number</td><td>Game ID</td></tr>
    <tr><td>`data.betlogList[].gameType`</td><td>string</td><td>Game type \[slot, fishing, tableGame]</td></tr>
    <tr><td>`data.betlogList[].bet`</td><td>number</td><td>Bet amount</td></tr>
    <tr><td>`data.betlogList[].payout`</td><td>number</td><td>Payout amount</td></tr>
    <tr><td>`data.betlogList[].winLose`</td><td>number</td><td>Win/loss amount</td></tr>
    <tr><td>`data.betlogList[].freeGame`</td><td>number</td><td>Whether free games are included (0: no, 1: yes)</td></tr>
    <tr><td>`data.betlogList[].status`</td><td>number</td><td>Bet status (0: not paid out, 1: paid out)</td></tr>
    <tr><td>`data.betlogList[].betMode`</td><td>string</td><td>Bet mode (main: base game, special: feature game, item: item card)</td></tr>
    <tr><td>`data.betlogList[].betTime`</td><td>string</td><td>Bet time (see [Time format](https://doc.va777.net/en/v1/guides/request-format.md#time-format))</td></tr>
    <tr><td>`data.betlogList[].createTime`</td><td>string</td><td>Record creation time (see [Time format](https://doc.va777.net/en/v1/guides/request-format.md#time-format))</td></tr>
    <tr><td>`data.betlogList[].settleTime`</td><td>string</td><td>Settlement time (see [Time format](https://doc.va777.net/en/v1/guides/request-format.md#time-format))</td></tr>
    <tr><td>`data.currentPage`</td><td>number</td><td>Current page</td></tr>
    <tr><td>`data.from`</td><td>number</td><td>Index of the first bet returned</td></tr>
    <tr><td>`data.to`</td><td>number</td><td>Index of the last bet returned</td></tr>
    <tr><td>`data.perPage`</td><td>number</td><td>Records per page</td></tr>
    <tr><td>`data.lastPage`</td><td>number</td><td>Total pages</td></tr>
    <tr><td>`data.total`</td><td>number</td><td>Total number of bets in the search range</td></tr>
    <tr><td>`status`</td><td>object</td><td>Response status. See [Response format](https://doc.va777.net/en/v1/guides/request-format.md#response-format)</td></tr>
  </tbody>
</table>

### Response example

```json theme={null}
{
  "data": {
    "betlogList": [
      {
        "versionKey": 20201231,
        "betId": "428263_1-1_22882_24",
        "channelId": 1,
        "account": "player001",
        "currency": "CNY",
        "gameid": 22,
        "gameType": "slot",
        "bet": 4.5,
        "payout": 9,
        "winLose": 4.5,
        "freeGame": 0,
        "status": 1,
        "betMode": "main",
        "betTime": "2022-07-04T22:54:29.649+08:00",
        "createTime": "2022-07-04T22:54:29.649+08:00",
        "settleTime": "2022-07-04T22:54:29.649+08:00"
      }
    ],
    "currentPage": 2,
    "from": 2001,
    "to": 4000,
    "perPage": 2000,
    "lastPage": 62,
    "total": 123597
  },
  "status": {
    "code": "0",
    "message": "success",
    "datetime": "2022-07-04T23:13:54.920+08:00",
    "traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
  }
}
```

## Response codes

Besides the [common codes](https://doc.va777.net/en/v1/reference/response-codes.md), this API may also return:

| Code | Description |
| - | - |
| `429` | Too many requests |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.