Summary API Documentation
Description
This document is an API documentation provided by PV to external developers for querying user betting, profit and other actions during gameplay. All interfaces mentioned below use POST requests and require ts, sign, mch_id and data parameters.
1. Amount Parameters
Amount parameters in interface interactions are in li (厘) units, with data type int64.
1 yuan = 1000 li
1 fen = 10 li
2. Time
All times in the interface are in UTC, with time filtering rules being left-closed and right-open: time_start <= query_time < time_end.
3. Global Request Interface Format
Request Method: POST Request Structure:
{
"ts": 1742452087, # int
"sign": "5b53eb607246fbfc94d16b7806ec7613",
"mch_id": 101, # int
"data": {}
}
Request Parameter Description:
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
ts | 10-digit timestamp | int | Yes | |
sign | Signature | str | Yes | Fixed 32 characters |
mch_id | Merchant ID | int | Yes | |
data | Interface parameters | dict | Yes |
4. Global Interface Response Format
All normal responses will have a status_code of 200. Please handle exceptions according to the code field in the response body.
{
"code": 200,
"msg": "",
"data": {...} | [...]
}
Response Field Description:
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
code | Error code | int | Yes | |
msg | Error message | str | Yes | |
data | Interface response | dict | list | Yes | Returns dictionary or list depending on interface |
5. Error Code
Error Code | Error Message | Description |
---|---|---|
200 | Success | |
400 | Parameter Error | |
500 | Internal Error |
Interface Signature (sign) Algorithm
Note: Convert the data dictionary into a compact JSON string (remove spaces), with key-value pairs separated by commas, keys and values separated by colons, and keys sorted alphabetically(ASCII code order). Then append ts and key (merchant key, provided by us) to calculate the md5 value.
Python
import hashlib
import json
def compute_md5(data: str, ts_str: str, key: str) -> str:
m = hashlib.md5()
m.update(data.encode("utf-8"))
m.update(ts_str.encode("utf-8"))
m.update(key.encode("utf-8"))
return m.hexdigest()
if __name__ == "__main__":
# mch key
key = "xxxxxxxxxxxxxxx"
request_json = {
"ts": 1742452087, # int
"mch_id": 101, # int
"data": { # data is empty also needs to calculate data_str = "{}"
"game_id": 1011,
"draw_id": "1011-12312-1232131"
}
}
# Sort and convert to string
data_str = json.dumps(
{k: v for k, v in request_json['data'].items()},
separators=(",", ":"),
sort_keys=True)
sign = compute_md5(data_str, str(request_json['ts']), key)
API Documentation
Note: The following API documentation only covers the interface fields (data) and does not include the globally required ts, sign, and mch_id parameters
1. All Games Summary Interface
1.1 All Games List /api/all/list
Method: POST
URI: /api/all/list
Description: Returns GameList information and icon resource URLs to OP for convenient game update queries.
Request Body:
Content-Type: application/json
"data": {}
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": [
{
"game_id": 1006,
"game_name": "Elves",
"game_type": "Slots",
"resource_url": "https://www.google.com",
"resource_with_name_url": "https://www.google.com"
},
{
"game_id": 1007,
"game_name": "777-fruit",
"game_type": "Slots",
"resource_url": "https://www.google.com",
"resource_with_name_url": "https://www.google.com"
}
]
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
game_id | Game ID | int | |
game_name | Game Name | str | |
game_type | Game Type | str | Slots, Multiplayer, Crypto, Table, Fish |
resource_url | Game Resource URL | str | |
resource_with_name_url | Game Resource URL with name | str |
1.2 All Games Stage Summary /api/all/stage/summary
Method: POST
URI: /api/all/stage/summary
Description: Used to get summary data for all game stages.
Request Body:
Content-Type: application/json
"data": {
"time_start": 1742365687,
"time_end": 1742452087
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
time_start | Start time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
time_end | End time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": {
"day_list": [
{
"date": "2025-03-20",
"bet_count": 102,
"bet_amount": 38388400,
"gain_amount": -19038400,
"company_gain_amount": 19038400
},
{
"date": "2025-03-19",
"bet_count": 278,
"bet_amount": 255164400,
"gain_amount": -36218400,
"company_gain_amount": 36218400
}
],
"summary": {
"bet_count": 380,
"bet_amount": 293552800,
"gain_amount": -55256800,
"company_gain_amount": 55256800
}
}
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
day_list | List split by date | list | |
date | Date | str | |
bet_count | Total number of bets by all players on that day | int | |
bet_amount | Total bet amount by all players on that day | int | |
gain_amount | Total winning amount by all players on that day | int | |
company_gain_amount | Company profit/loss on that day | int | |
summary | Period summary dict | dict | |
bet_count | Total number of bets by all players during the period | int | |
bet_amount | Total bet amount by all players during the period | int | |
gain_amount | Total winning amount by all players during the period | int | |
company_gain_amount | Company profit/loss during the period | int |
1.3 All Games Betting History /api/all/history
Method: POST
URI: /api/all/history
Description: Used by [OP Merchants] to query betting history data for various types of games
Request Body:
Content-Type: application/json
"data": {
"time_start": 1744790000,
"time_end": 1744990439,
"page_size": 2000,
"page": 1,
"game_ids": [2000, 3015]
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
time_start | Start time, 10-digit timestamp | int | Yes | Start and end times must be within the same day, time span cannot exceed 1 hour |
time_end | End time, 10-digit timestamp | int | Yes | Start and end times must be within the same day, time span cannot exceed 1 hour |
page_size | Page size | int | No | Default 1000, maximum 2000 |
page | Page number | int | No | Default 1 |
game_ids | Game ID List | list[int] | No | [] or not submit field means all games |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": {
"items": [
{
"event_id": "8234c460-481e-11f0-a82e-12cf39a4209e",
"draw_id": "1062-0-311-1744790148-0",
"game_id": 1062,
"user_id": 102115212044,
"op_id": "",
"bet_amount": 100000,
"gain_amount": -100000,
"credit_before_bet": 120589196,
"credit": 120489196,
"start_at": 1744790148,
"end_at": 1744790148
},
{
"event_id": "8290ab4a-481e-11f0-a82e-12cf39a4209e",
"draw_id": "1062-0-311-1744790151-0",
"game_id": 1062,
"user_id": 102115212044,
"op_id": "",
"bet_amount": 100000,
"gain_amount": -100000,
"credit_before_bet": 120489196,
"credit": 120389196,
"start_at": 1744790151,
"end_at": 1744790151
}
],
"total": 115,
"page": 20,
"page_size": 3
}
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
items | Record List | list | |
event_id | Event ID | str | |
draw_id | Round ID | str | |
game_id | Game ID | int | |
user_id | User ID | int | |
op_id | OP ID | str | |
bet_amount | Bet Amount | int | |
gain_amount | Win/Loss Amount | int | |
credit_before_bet | Balance Before Game | int | |
credit | Balance After Game | int | |
start_at | Round Start Time, 10-digit timestamp | int | |
end_at | Round End Time, 10-digit timestamp | int | |
total | Total Count | int | |
page | Page Number | int | |
page_size | Page Size | int |
1.4 Bonus Summary /api/all/bonus/summary
Method: POST
URI: /api/all/bonus/summary
Description: Used by [OP merchants] to query bonus summary data
Request Body:
Content-Type: application/json
"data": {
"mch_id": 114,
"user_id": 102115212044,
"op_id": "21312312",
"game_ids": [1033, 1062],
"create_type_list": [1, 2, 3],
"state_list": [1, 2, 3, 4, 5],
"time_start": 1744790000,
"time_end": 1744990439
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
mch_id | Merchant ID | int | Yes | This merchant or its subordinate merchant |
user_id | User ID | int | No | |
op_id | OP user ID | str | No | |
game_ids | Game ID list | list[int] | No | [] or not providing the field returns all games |
create_type_list | Creation type list [1: API created | 2: Backend created | 3: Officially created] | list[int] | No | [] or not providing the field returns all creation methods |
state_list | Bonus status list [1: Active | 2: Wagering | 3: Completed | 4: Cancelled | 5: Expired] | list[int] | No | [] or not providing the field returns all statuses |
time_start | Creation start time, 10-digit timestamp | int | No | Time range limit 60 days |
time_end | Creation end time, 10-digit timestamp | int | No | Time range limit 60 days |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": {
"release_count": 71,
"used_count": 45,
"release_bonus": 24109360.0,
"converted_cash": 1205500.0,
"bet_amount": 21055500,
"win_amount": -8534000
}
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
release_count | Cumulative number of BG issued within query conditions | int | |
used_count | Cumulative number of BG used within query conditions | int | |
release_bonus | Total bonus amount issued for used BG | float | |
converted_cash | Total bonus amount successfully converted to cash | float | |
bet_amount | Total bet amount during wagering period | int | |
win_amount | Total win amount during wagering period | int |
2. Games Interface
2.1 Player Game History /api/games/user/history
Method: POST
URI: /api/games/user/history
Description: Returns the game history records for Games type games by player.
Request Body:
Content-Type: application/json
"data": {
"user_id": 101106411105,
"op_id": "1234",
"time_start": 1741588087,
"time_end": 1742452087,
"limit": 10
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
user_id | User ID | int | NO | |
op_id | OP ID | str | NO | Either user_id or op_id must be provided |
time_start | Start time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
time_end | End time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
limit | Page size | int | No | Default 50, maximum 500 |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": [
{
"event_id": "3fe51802-481b-11f0-a315-72635f25a731",
"draw_id": "34063215",
"game_id": 2011,
"bet_amount": 600000,
"gain_amount": 2550000,
"credit_before_bet": 7764606460,
"credit": 7767156460,
"start_at": 1742284371,
"end_at": 1742284389,
"bet_areas": [
78,
144
],
"win_areas": [
107,
125
],
"game_result": 25,
"award_odds": null
}
]
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
event_id | Event ID | str | |
draw_id | Round ID | str | |
game_id | Game ID | int | |
bet_amount | Bet Amount | int | |
gain_amount | Win/Loss Amount | int | |
credit_before_bet | Balance Before Game | int | |
credit | Balance After Game | int | |
start_at | Round Start Time, 10-digit timestamp | int | |
end_at | Round End Time, 10-digit timestamp | int | |
bet_areas | Bet Areas | list | Multiplayer & Casual |
win_areas | Winning Areas | list | Sicbo, Roulette, Zoo, AndarBahar etc. |
game_result | Game Result | int | Multiplayer |
award_odds | Crash Multiplier | float | CrashI&CrashII |
2.2 Game History Records /api/games/game/history
Method: POST
URI: /api/games/game/history
Description: Returns historical game records for Games type games.
Request Body:
Content-Type: application/json
"data": {
"game_id": 3011,
"time_start": 1741588087,
"time_end": 1742452087,
"limit": 10
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
game_id | Game ID | int | Yes | |
time_start | Start time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
time_end | End time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
limit | Page size | int | No | Default 50, maximum 500 |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": [
{
"event_id": "167ff845-481b-11f0-a315-72635f25a731",
"draw_id": "34063215",
"game_id": 2011,
"user_id": 101115163288,
"op_id": "",
"bet_amount": 600000,
"gain_amount": 2550000,
"start_at": 1742284371,
"end_at": 1742284389,
"bet_areas": [
78,
144
],
"win_areas": [
107,
125
],
"game_result": 25,
"award_odds": null
}
]
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
event_id | Event ID | str | |
draw_id | Round ID | str | |
game_id | Game ID | int | |
user_id | User ID | int | |
op_id | OP ID | str | |
bet_amount | Bet Amount | int | |
gain_amount | Win/Loss Amount | int | |
start_at | Round Start Time, 10-digit timestamp | int | |
end_at | Round End Time, 10-digit timestamp | int | |
bet_areas | Bet Actions | list | Multiplayer & Casual |
win_areas | Winning Areas | list | Sicbo, Roulette, Zoo, AndarBahar etc. |
game_result | Game Result | int | |
award_odds | Crash Multiplier | float | CrashI&CrashII |
2.3 Player Stage Summary /api/games/user/stage/summary
Method: POST
URI: /api/games/user/stage/summary
Description: Returns stage summary data for Games type games by player.
Request Body:
Content-Type: application/json
"data": {
"user_id": 101115163288,
"op_id": "1234",
"time_start": 1741588087,
"time_end": 1742452087
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
user_id | User ID | int | NO | Either user_id or op_id must be provided |
op_id | OP ID | str | NO | Either user_id or op_id must be provided |
time_start | Start time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
time_end | End time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": {
"bet_amount": 266200000,
"gain_amount": -259940000,
"credit_before_game": 7764606460,
"credit": 7503186460
}
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
bet_amount | Total bet amount during period | int | |
gain_amount | Total win/loss amount during period | int | |
credit_before_game | Balance before game | int | |
credit | Balance after game | int |
2.4 Game Stage Summary /api/games/game/stage/summary
Method: POST
URI: /api/games/game/stage/summary
Description: Returns stage summary data for Games type games.
Request Body:
Content-Type: application/json
"data": {
"game_id": 2011,
"time_start": 1741588087,
"time_end": 1742452087
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
game_id | Game ID | int | Yes | |
time_start | Start time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
time_end | End time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": {
"bet_amount": 330400880,
"gain_amount": -31202080,
"user_count": 16,
"bet_count": 451,
"win_user_count": 8,
"lose_user_count": 8
}
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
bet_amount | Total bet amount during period | int | |
gain_amount | Total win/loss amount during period | int | |
user_count | Number of players who placed bets during period | int | |
bet_count | Total number of bets during period | int | |
win_user_count | Number of winning players during period | int | |
lose_user_count | Number of losing players during period | int |
3. Slots Game Interface
3.1 Player Game History /api/slots/user/history
Method: POST
URI: /api/slots/user/history
Description: Returns the game history records for Slots type games by player.
Request Body:
Content-Type: application/json
"data": {
"user_id": 101106411105,
"op_id": "1234",
"time_start": 1741588087,
"time_end": 1742452087,
"limit": 10
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
user_id | User ID | int | NO | Either user_id or op_id must be provided |
op_id | OP ID | str | NO | Either user_id or op_id must be provided |
time_start | Start time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
time_end | End time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
limit | Page size | int | No | Default 50, maximum 500 |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": [
{
"event_id": "9529eb15-481c-11f0-a82e-12cf39a4209e",
"draw_id": "1056-0-989-1742205595-0",
"user_id": 101106411105,
"op_id": "",
"currency": "$",
"game_id": 1056,
"feature": 0,
"extra_business": {
"award_type": 0,
"base_amount": 12000,
"free_amount": 0,
"bonus_amount": 0,
"jackpot_amount": 0,
"extra_spins": 0
},
"bet_amount": 100000,
"gain_amount": -100000,
"credit_before_bet": 7767687460,
"credit": 7767587460,
"start_at": 1742205595,
"end_at": 1742205596,
"is_buy": false
}
]
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
event_id | Event ID | str | |
draw_id | Round ID | str | |
user_id | User ID | int | |
op_id | OP ID | str | |
currency | Player Currency | str | |
game_id | Game ID | int | |
feature | Game Type | int | 0-base, 1-free, 2-bonus, 3-jackpot |
extra_business | Additional business information | dict | |
extra_business.award_type | Award type | int | 0-normal,1-freegame,2-bonus |
extra_business.base_amount | Total award excluding JP in base game | int | |
extra_business.free_amount | Total winnings in feature, excluding trigger round and JP awards | int | |
extra_business.bonus_amount | Total winnings in feature, excluding trigger round and JP awards | int | |
extra_business.jackpot_amount | Total JP winnings in a single game (including std and feature JP) | int | |
extra_business.extra_spins | Number of extra free games in a single game | int | |
bet_amount | Bet Amount | int | |
gain_amount | Win/Loss Amount | int | |
credit_before_bet | Balance Before Transaction | int | |
credit | Balance After Transaction | int | |
start_at | Bet Start Time | int | |
end_at | Bet End Time | int | |
is_buy | Whether Free Game Purchase Type | bool |
3.2 Player Stage Summary /api/slots/user/stage/summary
Method: POST
URI: /api/slots/user/stage/summary
Description: Returns stage summary data for Slots type games by player.
Request Body:
Content-Type: application/json
"data": {
"user_id": 101115163288,
"op_id": "1234",
"time_start": 1741588087,
"time_end": 1742452087
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
user_id | User ID | int | NO | Either user_id or op_id must be provided |
op_id | OP ID | str | NO | Either user_id or op_id must be provided |
time_start | Start time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
time_end | End time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": [
{
"user_id": 101106411105,
"op_id": "",
"game_id": 1056,
"bet_count": 2,
"bet_amount": 200000,
"gain_amount": -200000,
"currency": "$"
},
{
"user_id": 101106411105,
"op_id": "",
"game_id": 1019,
"bet_count": 15,
"bet_amount": 1350000,
"gain_amount": -1070000,
"currency": "$"
}
]
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
user_id | User ID | int | |
op_id | OP ID | str | |
game_id | Game ID | int | |
bet_count | Number of bets during period for this game | int | |
bet_amount | Total bet amount during period for this game | int | |
gain_amount | Total win amount during period for this game | int | |
currency | Player Currency | str |
3.3 Game Stage Summary /api/slots/game/stage/summary
Method: POST
URI: /api/slots/game/stage/summary
Description: Returns stage summary data for Slots type games.
Request Body:
Content-Type: application/json
"data": {
"time_start": 1741588087,
"time_end": 1742452087
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
time_start | Start time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
time_end | End time, 10-digit timestamp | int | Yes | Maximum time range 60 days |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": [
{
"game_id": 1041,
"bet_count": 3,
"bet_amount": 300000,
"gain_amount": 825000,
"company_gain_amount": -825000
},
{
"game_id": 1065,
"bet_count": 35,
"bet_amount": 3500000,
"gain_amount": -770000,
"company_gain_amount": 770000
}
]
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
game_id | Game ID | int | |
bet_count | Total number of player bets during period | int | |
bet_amount | Total player bet amount during period | int | |
gain_amount | Total player winnings during period | int | |
company_gain_amount | Company profit/loss during period | int |
3.4 Game Detail URL /api/slots/detail/url
Method: POST
URI: /api/slots/detail/url
Description: Returns the web URL for Slots type game round details.
Request Body:
Content-Type: application/json
"data": {
"game_id": 1044,
"draw_id": "1044-2-685-1742794635-0"
}
Request Parameter Description
Parameter | Description | Type | Required | Note |
---|---|---|---|---|
game_id | Game ID | int | Yes | |
draw_id | Round ID | str | Yes |
Response Body:
Content-Type: application/json
{
"code": 200,
"msg": "",
"data": {
"url": "https://www.google.com"
}
}
Response Field Description
Field Name | Description | Type | Note |
---|---|---|---|
url | Game detail page URL | str |