3.4 Bet Ticket Query API (Incremental Sync)
ExchangeGET /api/v1/exchange/report/bets/changesReturns the orders (with all their trades) that changed within a time range, for incrementally syncing bets into the merchant's system. Any change to the order itself or to any of its trades — a fill, a cancellation, settlement, re-settlement, rollback, voiding, and so on — counts as a change. The most recent 6 months of data is retained. Requests must include the HMAC authentication header.
TIP
This API is rate-limited to 100 requests / minute; exceeding it returns code:10060. The quota is counted per api_key × endpoint — endpoints do not share a quota, and every request (including those returning an error) counts toward it.
How this differs from the 3.3 Bet Ticket Query API
3.3 Bet Ticket Query filters by order time or settlement time and cannot fully reflect later changes such as rollbacks or voiding. This API filters by change time and is meant for periodically pulling changes to keep the merchant's data up to date. Both return the same order structure.
Request Parameters (Query String)
| Field | Required | Type | Description |
|---|---|---|---|
| start_time | TRUE | string | Start of the change time range (inclusive), RFC3339 UTC, aligned to whole seconds, e.g. 2026-10-20T00:00:00Z; must not be earlier than 6 months ago |
| end_time | TRUE | string | End of the change time range (inclusive), RFC3339 UTC, aligned to whole seconds; must be later than start_time and no more than 24 hours after it |
| cursor | FALSE | string | Pagination cursor; omit it for the first page, then pass the next_cursor from the previous response |
| lang | FALSE | string | LANGUAGE_ZH_CN / LANGUAGE_EN (defaults to English) |
TIP
This API uses cursor pagination with a fixed maximum of 100 items per page; page / page_size are not supported. A cursor is valid only for the same start_time / end_time pair that produced it — when you change the range, start again from the first page. The cursor format is not guaranteed; do not parse or construct it yourself.
Response data
{
"code": 0,
"message": "success",
"data": {
"items": [
{
"order_id": "019e0000-0000-0000-0000-000000000000",
"player_external_id": "player1",
"event_id": "sr:match:00000000",
"status": "EXCHANGE_ORDER_STATUS_FILLED",
"trades": [
{
"trade_id": "00000000-0000-0000-0000-000000000070",
"settlement_status": "EXCHANGE_TRADE_SETTLEMENT_STATUS_SETTLED",
"settlement_result": "EXCHANGE_TRADE_SETTLEMENT_RESULT_WIN",
"settled_time": "2026-10-20T04:33:09Z",
...
}
],
"order_time": "2026-10-19T04:01:59Z",
"changed_at": "2026-10-20T04:33:10.184553771Z",
...
}
],
"has_more": true,
"next_cursor": "djF8MTc5MjM2ODAwMDAwMDAwMDAwMHwxNzky..."
}
}The example above shows only some of the fields. Each order in
items[]has the same full set of fields as 3.3 Bet Ticket Query, pluschanged_at.
| Field | Type | Description |
|---|---|---|
| items | array | Orders that changed within the range, with their current state at query time (including all trades) |
| items[].changed_at | string | Last change time of the order and its trades (RFC3339 UTC, up to 9 fractional-second digits); never decreases for a given order, so it can be used as a version |
| has_more | boolean | Whether this range has another page |
| next_cursor | string | Cursor for the next page; an empty string when has_more is false |
TIP
changed_at is the time the platform's data changed. It is not the order time or the settlement time, so do not use it as a business time.
Sorting and Pagination
items[]is sorted bychanged_atfrom oldest to newest, then byorder_idwhenchanged_atis equal.- Omit
cursorfor the first page. Whilehas_moreistrue, passnext_cursorto fetch the next page, untilhas_moreisfalse. - If an order changes again while you are paging, it moves further back and appears once more; the other orders you already fetched are unaffected, so no order is missed.
Sync Recommendations
Recommended sync flow
- Run a sync round at a fixed interval (e.g. every 5 minutes). The range for each round is
[previous end_time, now − 3 minutes], and must not exceed 24 hours. - Fetch the first page without
cursor, then fetch every page by followinghas_more/next_cursor. - Upsert each order by
order_id: overwrite only whenchanged_atis newer than the stored data. - After all pages of the round are fetched, save the round's
end_timeas the next round'sstart_time.
- Keep
end_timeat least 3 minutes before the current time. Data comes from a standby database that syncs from the primary database with a delay; an end time too close to now may miss changes that have not been synced yet. - Ranges chain without gaps. Use this round's
end_timedirectly as the next round'sstart_time. Both ends of a range are inclusive, so an order exactly on the boundary may appear in both rounds. - Expect duplicates. The same order may appear on different pages or in different ranges. Upsert by
order_idon the merchant side to stay idempotent. - Occasional bulk changes. When the platform re-syncs data, a large number of orders may appear in the same range with unchanged content. Upsert them as usual.
- Compare
changed_atwhen processing in parallel or retrying. With several workers syncing at once, or a failed request retried later, an older result may be written after a newer one. Overwriting only whenchanged_atis newer prevents an old state from replacing a new one.
Error Codes
| code | Description |
|---|---|
| 10020 | Invalid parameter: start_time / end_time missing or not aligned to whole seconds, end_time not later than start_time, range longer than 24 hours, start_time earlier than 6 months ago, or cursor invalid or not belonging to this range |
Other error codes are the same as the other query APIs; see the Query APIs Error Reference.