3.1 Bet Ticket Query API
GET /api/v1/exchange/report/betsPaginated, multi-condition query of exchange orders and their associated trades. Data comes from the historical store and may have a few seconds of sync delay; 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 (per api_key); exceeding it returns code:10060.
Request Parameters (Query String)
TIP
Provide one of two time ranges: order_start_time/end_time (order time) or settlement_start_time/end_time (settlement time). At least one pair is required, and the span must not exceed 90 days.
| Field | Required | Type | Description |
|---|---|---|---|
| order_start_time / order_end_time | TRUE | string | Order time range (start_time ≥, end_time ≤), RFC3339 UTC, e.g. 2026-05-19T00:00:00Z; may be omitted if the settlement time range is provided |
| settlement_start_time / settlement_end_time | Conditional* | string | Settlement time range (start_time ≥, end_time ≤), RFC3339 UTC; may be omitted if the order time range is provided |
| lang | FALSE | string | LANGUAGE_ZH_CN / LANGUAGE_EN (defaults to English) |
| order_id | FALSE | string | Order number |
| trade_id | FALSE | string | Trade number; filters orders containing this trade |
| idempotency_key | FALSE | string | Idempotency key |
| player_external_id / player_name | FALSE | string | Player ID / name |
| sport_id / tournament_id / event_id / market_id / outcome_id | FALSE | string | Event / tournament filters |
| side | FALSE | string | EXCHANGE_SIDE_BACK / EXCHANGE_SIDE_LAY |
| status | FALSE | string | Order status (see enum) |
| settlement_status | FALSE | string | Settlement status filter (see enum) |
| currency | FALSE | string | Currency filter; must match the currency bound to the agent; see supported currency list |
| page / page_size | TRUE | integer | Pagination. page starts at 1, default 1; page_size default 10, max 200; values ≤0 or >200 fall back to 10 |
Response data
data contains items[] (orders) and pagination fields. Amount fields: the usd_ prefix denotes USD; no prefix denotes player currency.
{
"code": 0,
"message": "success",
"data": {
"items": [
{
"order_id": "019e0000-0000-0000-0000-000000000000",
"idempotency_key": "00000000-0000-0000-0000-000000000000",
"player_id": "00000000-0000-0000-0000-000000000000",
"player_external_id": "player1",
"player_name": "player1_name",
"agent_id": "00000000-0000-0000-0000-000000000001",
"agent_name": "agent_demo",
"sport_id": "sr:sport:1",
"sport_name": "足球",
"tournament_id": "sr:tournament:16",
"tournament_name": "World Cup",
"event_id": "sr:match:00000000",
"event_name": "Team A vs Team B",
"event_start_time": "2026-06-13T01:00:00Z",
"market_id": "1",
"market_name": "Match Winner",
"outcome_id": "1",
"outcome_name": "Team A",
"home_competitor_id": "sr:competitor:0001",
"home_competitor": "Team A",
"away_competitor_id": "sr:competitor:0002",
"away_competitor": "Team B",
"home_score": "1",
"away_score": "0",
"period_home_score": "1",
"period_away_score": "0",
"match_status": "6",
"event_status": "1",
"source_odds": "1.9",
"source_back_odds": "1.9",
"source_lay_odds": "2.23",
"source_active": true,
"side": "EXCHANGE_SIDE_BACK",
"odds": "1.91",
"currency": "EUR",
"mid_rate": "0.86",
"stake": "85",
"usd_stake": "98.83",
"deducted_amount": "85",
"usd_deducted_amount": "98.83",
"usd_filled": "98.83",
"usd_unmatched": "0",
"status": "EXCHANGE_ORDER_STATUS_FILLED",
"trades": [
{
"account_id": "00000000-0000-0000-0000-000000000000",
"name": "player1_name",
"event_id": "sr:match:00000000",
"market_id": "1",
"outcome_id": "1",
"order_id": "019e0000-0000-0000-0000-000000000000",
"trade_id": "00000000-0000-0000-0000-000000000070",
"side": "back",
"role": "taker",
"odds": "1.91",
"usd_stake": "98.83",
"usd_matched_delta": "98.83",
"matched_delta": "85",
"currency": "EUR",
"mid_rate": "0.86",
"fx_base": "85",
"fx_usd_base": "98.83",
"settlement_status": "EXCHANGE_TRADE_SETTLEMENT_STATUS_SETTLED",
"settlement_result": "EXCHANGE_TRADE_SETTLEMENT_RESULT_WIN",
"usd_settlement_pnl": "89.94",
"usd_net_pnl": "85.44",
"usd_commission": "4.50",
"settlement_pnl": "77.35",
"net_pnl": "73.48",
"commission": "3.87",
"commission_rate": "0.05",
"status": "accepted",
"trade_time": "2026-06-12T04:01:59Z",
"settled_time": "2026-06-13T04:33:09Z"
}
],
"total_pnl": "73.48",
"order_time": "2026-06-12T04:01:59Z",
"updated_at": "2026-06-13T04:33:09Z",
"client_ip": "0.0.0.0",
"device_type": "PC",
"device_id": "00000000000000000000000000000000",
"url": "https://backoffice.example.com/#/orders?order_id=019e0000-0000-0000-0000-000000000000&key=xxxx&exp=0000000000"
}
],
"total": 6,
"page": 1,
"page_size": 20,
"total_pages": 1
}
}items[] Fields
| Field | Type | Description |
|---|---|---|
| order_id | string | Order number, unique per order |
| idempotency_key | string | Idempotency key |
| player_id | string | Platform-internal player UUID |
| player_external_id | string | Player ID (merchant side) |
| player_name | string | Player name |
| agent_id | string | Platform-internal agent UUID |
| agent_name | string | Agent name |
| sport_id | string | Sport ID |
| sport_name | string | Sport name |
| tournament_id | string | Tournament ID |
| tournament_name | string | Tournament name |
| event_id | string | Event ID |
| event_name | string | Event name |
| event_start_time | string | Event start time (RFC3339 UTC) |
| market_id | string | Market ID |
| market_name | string | Market name |
| outcome_id | string | Outcome ID |
| outcome_name | string | Outcome name |
| specifiers | string | Market specifiers (e.g. hcp=1.25); empty string for markets without specifiers |
| extended_specifiers | string | Extended market specifiers; present only for variant-type markets |
| home_competitor_id / away_competitor_id | string | Home / away team ID |
| home_competitor / away_competitor | string | Home / away team name |
| home_score / away_score | string | Current home / away score; returned only for in-progress or finished events |
| period_home_score / period_away_score | string | Current period / half score; returned only for in-progress or finished events |
| match_status | string | Match status code |
| event_status | string | Event status code (see enum) |
| source_odds | string | Source reference odds (European/decimal) |
| source_back_odds | string | Source Back odds (European/decimal) |
| source_lay_odds | string | Source Lay odds (European/decimal) |
| source_active | boolean | Whether the market is active |
| side | string | Bet side (EXCHANGE_SIDE_*) |
| odds | string | Matched odds (European/decimal) |
| currency | string | Player currency |
| mid_rate | string | Exchange rate at order time (1 USD = mid_rate player currency) |
| stake | string | Stake (player currency) |
| usd_stake | string | Stake (USD) |
| deducted_amount | string | Actual deduction (player currency) |
| usd_deducted_amount | string | Actual deduction (USD) |
| usd_filled | string | Matched amount (USD) |
| usd_unmatched | string | Unmatched amount (USD) |
| status | string | Order status (see enum) |
| cancel_cause | string | Cancellation reason; returned only when status = CANCELLED / PARTIAL_CANCELLED |
| trades | array | Trade list for this order; contains only matched trades — empty array if the order has not been matched |
| total_pnl | string | Final net profit of this order (player currency, commission deducted); see formula; not returned before settlement completes |
| order_time | string | Order time (RFC3339 UTC) |
| updated_at | string | Last update time (RFC3339 UTC) |
| client_ip | string | Client IP at order time |
| device_type | string | Device type (e.g. PC) |
| device_id | string | Device identifier |
| url | string | Back-office ticket detail page link |
trades[] Fields
An order can be split into multiple trades; each successful match generates one trade.
| Field | Type | Description |
|---|---|---|
| account_id | string | Player account UUID (same as player_id) |
| name | string | Player name |
| event_id | string | Event ID |
| market_id | string | Market ID |
| specifiers | string | Market specifiers (present only for variant-type markets) |
| outcome_id | string | Outcome ID |
| order_id | string | Parent order number, unique per order |
| trade_id | string | Trade number, unique per trade |
| side | string | Side back / lay; determines the sign of PnL |
| role | string | Role maker / taker; determines commission_rate |
| odds | string | Trade odds (European/decimal) |
| usd_stake | string | Stake (USD) |
| usd_matched_delta | string | Amount matched this time (USD) |
| matched_delta | string | Amount matched this time (player currency) |
| currency | string | Player currency |
| mid_rate | string | Exchange rate (1 USD = mid_rate player currency) |
| fx_base | string | Maximum exposure of this order (player currency); matches the order-level deducted_amount |
| fx_usd_base | string | Maximum exposure of this order (USD); matches usd_deducted_amount |
| settlement_status | string | Settlement status (see enum) |
| settlement_result | string | Settlement result (see enum) |
| usd_settlement_pnl | string | Settlement PnL (USD); see formula; not returned before settlement |
| usd_net_pnl | string | Net profit after settlement (USD, commission deducted); see formula; not returned before settlement |
| usd_commission | string | Commission (USD); see formula |
| settlement_pnl | string | Settlement PnL (player currency); see formula; not returned before settlement |
| net_pnl | string | Net profit after settlement (player currency, commission deducted); see formula; not returned before settlement |
| commission | string | Commission (player currency); see formula |
| commission_rate | string | Commission rate; taker = 0.05, maker = 0.03 |
| void_reason | string | Void reason; returned only when settlement_result = VOID |
| status | string | Trade status (accepted) |
| trade_time | string | Trade time (RFC3339 UTC) |
| settled_time | string | Settlement time (RFC3339 UTC); not returned before settlement |
Amount Calculation Formulas
TIP
All player-currency amounts = the corresponding USD amount × mid_rate; for USD players mid_rate = 1, so the values are equal.
Settlement PnL usd_settlement_pnl
| Scenario | Formula |
|---|---|
| back win | usd_matched_delta × (odds − 1) |
| back lose | −usd_matched_delta |
| lay win / lose | Opposite of the counterparty back, = −back_pnl |
| push / full void (void_factor = 1) | 0 |
| half void (void_factor = 0.5) | The above result ÷ 2 |
| dead heat | Winning side result × dead_heat_factor; losing side unchanged |
Commission usd_commission
Charged only on the winning side: when usd_settlement_pnl > 0, = usd_settlement_pnl × commission_rate; otherwise 0.
Net PnL usd_net_pnl
usd_net_pnl = usd_settlement_pnl − usd_commission
Player Currency Conversion
settlement_pnl = usd_settlement_pnl × mid_rate
commission = usd_commission × mid_rate
net_pnl = settlement_pnl − commission
Order Total Net PnL total_pnl
total_pnl = Σ net_pnl of all matched trades in this order (player currency)
Enums
Order Status (prefix EXCHANGE_ORDER_STATUS_)
| Value | Description | Fund Status |
|---|---|---|
| PENDING | Order placed, awaiting engine confirmation | Deducted |
| OPEN | Confirmed by engine, resting order awaiting match | Deducted |
| PARTIALLY_FILLED | Partially matched | Deducted |
| FILLED | Fully matched | Deducted |
| CANCELLED | Cancelled (no matches) | Fully refunded |
| PARTIAL_CANCELLED | Cancelled (matched portion kept, remainder refunded) | Unmatched portion refunded |
| FAILED | Order failed, rejected by engine | Fully refunded |
Settlement Status (prefix EXCHANGE_TRADE_SETTLEMENT_STATUS_)
| Value | Description |
|---|---|
| PENDING | Awaiting settlement |
| SETTLED | Settled |
| VOIDED | Voided |
Settlement Result (prefix EXCHANGE_TRADE_SETTLEMENT_RESULT_)
| Value | Description |
|---|---|
| UNSPECIFIED | Not yet settled |
| WIN | Full win |
| HALF_WIN | Half win |
| PUSH | Push refund |
| HALF_LOSE | Half lose |
| LOSE | Full lose |
| VOID | Void |
Event Status (event_status)
| Value | Label | Description |
|---|---|---|
| 0 | not_started | Match scheduled, not yet started |
| 1 | live | Match in progress |
| 2 | suspended | Match suspended |
| 3 | ended | Match ended |
| 4 | closed | Match result confirmed |
Trade Status Combinations
Business meaning of the combinations of the three fields status / settlement_status / settlement_result:
| status | settlement_status | settlement_result | Business Meaning |
|---|---|---|---|
| pending | PENDING | UNSPECIFIED | Matching |
| accepted | PENDING | UNSPECIFIED | Matched, awaiting event settlement |
| accepted | SETTLED | WIN | Settled, win |
| accepted | SETTLED | HALF_WIN | Settled, half win (e.g. 0.25 handicap) |
| accepted | SETTLED | PUSH | Settled, push refund |
| accepted | SETTLED | HALF_LOSE | Settled, half lose |
| accepted | SETTLED | LOSE | Settled, lose |
| accepted | VOIDED | VOID | Bet voided and refunded |
| rejected | PENDING | UNSPECIFIED | Matching failed, refunded |