Game Open API (2.0.4)

Download OpenAPI specification:Download

Call API Mode 调用 API 方式

REST API

Method : GET/POST, depends on each endpoint spec 依接口规格说明

Format : JSON

Uri prefix : /gameapi/v2

Example:

POST /gameapi/v2/create_player HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: <api server>
Connection: close
Content-Length: 255

Request

{
  "merchant_code": "04e17735ba374dcd898746c6ac8118e4",
  "auth_token": "59ddb8dd71f8494485ff200f78bc4dba",
  "username": "merchant.player2",
  "sign": "20fbee96a0f436a6d8386b192a569a27bcc1c689"
}

Response

{
  "success": true,
  "code": 0,
  "detail": {
    "id": 11216,
    "role": 3,
    "username": "o2p1632998628",
    "company": 11198
  }
}

Standard result:

  • success : Boolean, means this action don’t find any error, if it’s false, should set “message” field. 表示此接口操作成功或失败,如果失败,则 message 字段会提供错误信息
  • code : Result code, only for backward compatibility.
  • message : string, if operation is not successful (success: false), this will be error message; please refer to Error List for details. 失败情境时,此字段会返 回具体错误信息,详细内容请见错误列表
  • detail : could be any data, depends api. 依据各个接口规格返回的内容细节

Game List 游戏列表

  • 根据受欢迎程度每月更新

Lobby

Game Code Name en Name zh
lobby Game Lobby 游戏大厅

Classic

Game Code Game Tag Name en Name zh Rank of last month Released
crash 1 Crash 暴力弹 1 2022/6/30
mine 1 Mine 挖矿弹 2 2022/6/30
plinko 1 Plinko 叮咚球 3 2022/6/30
dice 1 Lucky Beer 幸运啤酒 4 2022/6/30
coin 1 Goal 点球 5 2022/6/30
limbo 1 Limbo 凌波弹 6 2022/6/30
space-max 2 Space Max 星际探险 - 2023/5/15
double 1 Double 轮盘 - 2022/6/30
keno 1 Keno 基诺球 - 2022/6/30
crypto 1 Crypto 宝石 - 2022/6/30
triple 1 Triple 三联爆 - 2022/6/30
hilo 1 Hilo 西洛 - 2022/6/30
tower 1 Tower 爬塔 - 2022/6/30
bingo 1 Bingo 宾果 - 2023/3/1
poker 1 Video Poker 电子扑克 - 2023/4/1
wheel 1 Wheel 转盘 - 2023/6/30
nine 1 Nine 拆弹专家 - 2023/10/4
color 1 Color 颜色 - 2024/1/3
racing 1 Racing 赛车 - 2024/1/26
space 1 Space 星际迷航 - 2024/8/8
baccarat 1 Baccarat 百家乐 - 2024/12/26

Monster

Game Code Game Tag Name en Name zh Rank of last month Released
m-mine 3 Monster Mine 怪兽扫雷 1 2023/9/1
m-plinko 3 Monster Plinko 怪兽弹珠 2 2023/9/1
m-tower 3 Monster Tower 怪兽爬塔 3 2023/9/1
m-fight 3 Monster Fight 怪兽斗争 4 2023/9/1
m-crypto 3 Monster Crypto 怪兽宝石 - 2023/9/1
m-triple 3 Monster Triple 怪兽三联 - 2023/9/1
m-hilo 3 Monster HiLo 怪兽西洛 - 2024/3/1
m-dice 3 Monster Dice 怪兽骰宝 - 2024/3/1
m-crash 3 Monster Crash 怪兽飞船 - 2024/4/9

Scratch

Game Code Game Tag Name en Name zh Rank of last month Released
3001 10 Happy Farm 快乐农场 2024/1/25
3002 10 Lucky 10 幸运十倍 2024/1/25
3003 10 Super 777 超级777 2024/1/25
3004 10 Jungle Adventure 丛林探险 2024/1/25
3005 10 Shoot out 点球大战 2024/1/25
3006 10 Niu Niu 牛牛 2024/1/25

Slot

Game Code Game Tag Name en Name cn Released
7001 30 Molten Dragon 熔火幼龙 2024/9/12
7002 30 Magic Girl 小魔女 2024/9/12
7003 30 Jungle Travel 丛林旅行 2024/9/12

Error List 错误列表

Code Message Description
1 InvalidSignature 无效的签名
2 InvalidMerchantCode 无效的商户号
3 InvalidSecureKey 无效的安全密钥
4 InvalidAuthToken 无效的授权书识别符
5 InvalidGamePlatformId 无效的游戏平台识别码
6 InvalidUsername 无效的用户名
7 InvalidPassword 无效的密码
8 DuplicateUsername 用户名重复
9 InvalidExtraInfo 无效的额外信息
10 InvalidGamePlatformSettings 无效的游戏平台配置
11 InvalidBetLimit 无效的限注配置
12 InvalidActionType 无效的动作类型
13 InvalidAmount 无效的金额
14 DuplicateExternalTransId 外部交易识别码重复
15 NoEnoughBalance 余额不足
16 InvalidFromDateTime 无效的启示时间
17 InvalidToDateTime 无效的结束时间
18 InvalidExternalTransId 无效的外部交易识别码
19 SecureKeyNotAllowed 不允许此安全密钥
20 BonusRequired 需要奖金组
21 InvalidBonus 无效的奖金组
22 InvalidRebate 无效的返点比例
23 AccountDuplicated 账号用户名重复
24 SubAccountNotFound 未找到指定子账号
25 InvalidParent 无效的上级代理
26 RequestDataRequired 需要请求资料
27 RequestTooFast 请求频率过快
28 TransactionIdRequired 请传入交易号或外部交易号
29 PlayerNotFound 未找到指定玩家

Security Mode 安全模式

Server Domain or ip 服务器域名或 ip

put server or ip which don’t give to player 隐藏对外 ip

White IP 白名单 IP

Setup white ip on servers 服务器上设置白名单 IP

For staging environment, it is necessary to add allowed ips for visiting game front-end through back office 测试环境需要在管理后台增加访问游戏的 IP 白名单

Merchant Code and Secure Key 商户号和安全秘钥

Any 32 chars(letter and number), Will send by email

Testing key: dd35aPO0bd186dc6ace6We2e0fb48s70

Sign Key 签名秘钥

Any 32 chars(letter and number), Will send by email

Testing key: dd35aPO0bd186dc6ace6We2e0fb48s70

Signature 签名

  1. Always use utf-8
    所有参数默认编码 所有参数默认编码 utf-8

  2. Ignore sign field or object type field
    忽略参数名为 sign 的字段,或参数值为 object 类型的字段

  3. The order should be sorted by parameter name in alphabetical order
    所有参数名,按字母顺序排序

  4. Concat all non-empty values to one string , append sign key to last, then use SHA1 to get signature
    把所有非空参数的值,连接成一个字符串,把签名秘钥放到结尾,然使用 SHA1 加密算法生成签名

Example:

Suppose the sign key is SIGN_KEY_EXAMPLE, and we need to sign following parameter object
假如商户的签名秘钥为 SIGN_KEY_EXAMPLE ,我们需要对此参数进行签名

{
  "b": 1.1,
  "a": 1,
  "d": "some string",
  "e": "",
  "c": true,
  "sign": "abcdefg",
  "g": {
    "x": 1,
    "y": 2
  },
  "f": null
}

以下为计算签名流程 The sign procedure is as below

  1. Ignore fields without value, of object type, or having name “sign”, then we have
    忽略 value 为空的字段,忽略 object 类型字段,忽略 key 为 sign 的字段,得到

     {
       "b": 1.1,
       "a": 1,
       "d": "some string",
       "c": true
     }
    
  2. Order the params by key ascendingly, then we have
    将 key 按字母顺序排序,得到

     {
       "a": 1,
       "b": 1.1,
       "c": true,
       "d": "some string"
     }
    
  3. Put the values together (without key) in the order of their key, and add the sign key to the end, then we have the string before sign
    将 value(不需 key)按顺序连接起来,并且在最后拼接上签名密钥,得到签名 之前的字符串

     11.1truesome stringSIGN_KEY_EXAMPLE
    
  4. Perform sha1 hash on the string before sign, then we get the sign value 对原始字符串进行 sha1 加密,得到签名

     91bef33b208ba98ac2d889b9c4e996651ca58146
    

Authentication 身份验证

Get auth_token by merchant_code and secure_key
使用 merchant_code 商户号和 secure_key 安全秘钥获得 auth_token 身份 token

Send auth_token as parameter when call api
每次调用 api 的时候传送参数身份 token

Client Webhook

If client wants to use seamless mode of chain games, client has to implement webhooks described below, and provide us client’s host_url. 如果接入方想要使用区块链游戏的单钱包模式,接入方需要按照下列规格实现 webhook,并提供我们对应的服务器网址.

Sign algorithm is the same as described in Security Mode chapter. 签名算法同安全模式章节说明.


Get player information

query client side player information

查询接入方玩家信息

URL: /{host_url}/player_summary

Method: POST

Body

Name Type Description
unique_id string unique id for each transaction 独立识别每次调用接口的 id
timestamp number unix time (s) 当前时间戳 unix 秒
merchant_code string merchant code 商户号
username string player username 玩家用户名
sign string Signature 参数签名
{
  "unique_id": "sampleId",
  "timestamp": 1654752446,
  "merchant_code": "testMerchant",
  "username": "testPlayer",
  "sign": "testSign"
}

Response

Name Type Description
is_success boolean if the bet is successful or not, default true 投注是否成功,不传默认为成功
err_msg string error message if error 操作失败的错误说明
username string player username 玩家用户名
balance number balance 玩家余额
currency string currency 玩家货币
{
  "is_success": true,
  "err_msg": "",
  "username": "test",
  "balance": 100,
  "currency": "test"
}

Bet

Bet

投注

URL: /{host_url}/bet

Method: POST

Body

Name Type Description
unique_id string unique id for each transaction 独立识别每次调用接口的 id
timestamp number unix time (s) 当前时间戳 unix 秒
merchant_code string merchant code 商户号
username string player username 玩家用户名
amount number bet amount 投注金额
currency string currency 玩家货币
game_code string game code 游戏代码
bet_id number bet number 投注 id
round_id string or number round number 局号;目前只有 double 游戏为 string 格式
number string updated bet content 投注内容
sign string Signature 参数签名

number detail

game Type Description
crash string sample: 1000
double string sample: 1; 0 yellow, 1 green, 2 blue
plinko string sample: {"layer":8,"level":0}; level: 0 blue, 1 green, 2 red
keno string sample: {"number":"[1,2,3]","level":0}; level (risk): 0 low, 1 medium, 2 high
dice string sample: {"point":90,"game_type":1}; type 1 under, 2 over
triple string sample: {"position":[10,2,3],"level":0}, level (risk): 0 low, 1 medium, 2 high
bingo string sample: {"card":"[44,53,63,9,64,30,13,57,17,24,36,71,1,58,35,61,7,48,75,45,40,18,69,16]","count":45}; card: cards dealt to player; count: reveal cards count chosen by player
limbo string sample: {"point":2}; point: cashout point
crypto string sample: {}; constant
coin string sample: {"position":"[1]","type":1} for instant, {"type":2} for multiple; position: 1 head, 2 tail; type: 1 instant, 2 multiple
mine string sample: {"count":1} for normal bet or {"count":1,"position":"[0]"} for instant bet; count: how many ghosts; position: player's choice
tower string sample: {"count":1} for normal bet or {"count":1,"position":"[0]"} for instant bet; count: bombs per floor; position: player's choice at each floor
hilo string sample: {}; constant
poker string sample: {"poker_init":"[49,18,31,7,11]"} initial hand, 0~51 ♠♥♣♦
wheel string sample: {"level":1,"segments":20}, level: difficulty; segments: player's choice
nine string sample: {} for normal bet or {"position":"[0]"} for instant bet; position: the line player cuts
3001 string sample: {"content":[49,49,20,"顺",15,51,22,9,49,44,3,46,4],"lucky_draw":[6,8,16,18,66,68,88,"顺","发"]}; scratch card content and symbols that are counted as hits
3002 string sample: {"content":[15,28,24,51,77,47,75,12,29,59,36,91,6,9,88,22,41,12,26,73,90,33,55,94,94,64,48,86,55,95,85,14,66,13,89,72,69,12,95,66,16,58,90,96,14,24,74,62,41,62,30,38],"lucky_draw":46}; scratch card content and symbol which is counted as hit
3003 string sample: {"content":[220,158,398,519,638,514,893,238,602,215,830,126,780,524,66,758,350,809,396,192,894,667,107,694,234,535,159,226,917,912,85,194,344,740,506,378,327,707,410,684,466,246,147,840,605,0,24,717,722],"lucky_draw":[0,7,77,777]}; scratch card content and symbols that are counted as hits
3004 string sample: {"content":[2,7,1,8,5,4,0,4,7],"lucky_draw":[]}; scratch card content, only 7 are considered for hit patterns; lucky_draw is always empty
3005 string sample: {"content":[1,0,0,0,0,0,0,0,0,0,0,0],"lucky_draw":[1]}; scratch card content, 1 means hit; lucky_draw is always one element of 1
{
  "unique_id": "testId",
  "timestamp": 1654752446,
  "merchant_code": "testMerchant",
  "username": "testPlayer",
  "amount": 30,
  "currency": "USD",
  "game_code": "double",
  "bet_id": 99,
  "round_id": "testRound",
  "number": "white",
  "sign": "testSign"
}

Response

Name Type Description
is_success boolean if the bet is successful or not, default true 投注是否成功,不传默认为成功
err_msg string error message if error 操作失败的错误说明
balance number balance 玩家余额
currency string currency 玩家货币
need_refund boolean if the failed bet needs refund, default true 此失败注单是否需要退款,不传默认为需要退款

退款控制

  1. 接入方如果返回投注失败,可以增加返回一个字段 need_refund, 不传的时候默认为 true,具体情形如下
    • need_refund值为false的时候,我们不会再调用refund webhook
    • need_refund值为true的时候,我们会调用refund webhook 退回玩家投注金额
    • 如果接入方没有返回need_refund字段,我们会调用refund webhook 退回玩家投注金额,跟目前的行为一致
  2. 如果投注成功,则不需要返回need_refund这个字段

Refund Control

  1. If client responds with failed bet (is_success false), client can add a field need_refund, which is optional and defaults to true; the effects are as follows
    • need_refund false: we don't invoke client's refund webhook for this failed bet
    • need_refund true: we invoke client's refund webhook for this failed bet
    • need_refund is not in response: we invoke client's refund webhook for this failed bet, like the behavior before we introduce this field
  2. If client responds with successful bet (is_success true), client don't have to specify this field in response
{
  "is_success": true,
  "err_msg": "",
  "balance": 100,
  "currency": "test",
}

Payout

payout

派彩

This api will be invoked when a bet is settled, no matter win or lose

当注单结算,无论输赢,都会调用此接口

URL: /{host_url}/payout

Method: POST

Body

Name Type Description
unique_id string unique id for each transaction 独立识别每次调用接口的 id
timestamp number unix time (s) 当前时间戳 unix 秒
merchant_code string merchant code 商户号
username string player username 玩家用户名
amount number payout amount 派彩金额
currency string currency 玩家货币
game_code string game code 游戏代码
bet_id number bet number 投注 id
round_id string or number round number 局号;目前只有 double 游戏为 string 格式
number string updated bet content 更新后的投注内容
sign string Signature 参数签名

number detail

game Type Description
crash string sample: 1.2
double string sample: 1; 0 yellow, 1 green, 2 blue
plinko string sample: {"layer":8,"level":0}; level: 0 blue, 1 green, 2 red
keno string sample: {"number":[1,2,3],"level":0}; level (risk): 0 low, 1 medium, 2 high
dice string sample: 90
triple string sample: {"position":[10,2,3],"level":0}, level (risk): 0 low, 1 medium, 2 high
bingo string sample: [58,22,65,39,5,17,68,18,29,38,47,46,45,48,11,41,74,64,20,51,73,63,21,57]
limbo string sample: 2
crypto string always an empty string
coin string sample: 1 or "[1,1]" (instant or multiple); 1 head, 2 tail
mine string sample: [0]
tower string sample: [0]
hilo string sample: [0,2,3]; 0 skip, 1 equal, 2 less, 3 larger
poker string sample: [ 32, 44, 26, 39, 2 ]
wheel string always an empty string
nine string sample: [0]
3001 string sample: {"content":[49,49,20,"顺",15,51,22,9,49,44,3,46,4],"lucky_draw":[6,8,16,18,66,68,88,"顺","发"]}; scratch card content and symbols that are counted as hits
3002 string sample: {"content":[15,28,24,51,77,47,75,12,29,59,36,91,6,9,88,22,41,12,26,73,90,33,55,94,94,64,48,86,55,95,85,14,66,13,89,72,69,12,95,66,16,58,90,96,14,24,74,62,41,62,30,38],"lucky_draw":46}; scratch card content and symbol which is counted as hit
3003 string sample: {"content":[220,158,398,519,638,514,893,238,602,215,830,126,780,524,66,758,350,809,396,192,894,667,107,694,234,535,159,226,917,912,85,194,344,740,506,378,327,707,410,684,466,246,147,840,605,0,24,717,722],"lucky_draw":[0,7,77,777]}; scratch card content and symbols that are counted as hits
3004 string sample: {"content":[2,7,1,8,5,4,0,4,7],"lucky_draw":[]}; scratch card content, only 7 are considered for hit patterns; lucky_draw is always empty
3005 string sample: {"content":[1,0,0,0,0,0,0,0,0,0,0,0],"lucky_draw":[1]}; scratch card content, 1 means hit; lucky_draw is always one element of 1
{
  "unique_id": "testId",
  "timestamp": 1654752446,
  "merchant_code": "testMerchant",
  "username": "testPlayer",
  "amount": 60,
  "currency": "USD",
  "game_code": "double",
  "bet_id": 99,
  "round_id": "testRound",
  "number": "white",
  "sign": "testSign"
}

Response

Name Type Description
is_success boolean if the bet is successful or not, default true 投注是否成功,不传默认为成功
err_msg string error message if error 操作失败的错误说明
balance number balance 玩家余额
currency string currency 玩家货币
{
  "is_success": true,
  "err_msg": "",
  "balance": 100,
  "currency": "test"
}

Return a betting

Client needs to check bet_id and round_id, and whether the amount is same with the value of parameter

接入方需要检查投注 id、局号、以及退回金额是否与投注时参数金额一致

Important Note 重要事项

For all failed bets, we will invoke refund endpoint. Client needs to check if player balance has been deducted for these failed bets; if not, client's refund webhook should not add bet amount back to player balance.

针对所有投注失败的注单,我们会进行退款,接入方要判断这一局是否有成功扣除余额,若没有扣除余额的话,refund webhook 实现逻辑不需要加回余额。

URL: /{host_url}/refund

Method: POST

Body

Name Type Description
unique_id string unique id for each transaction 独立识别每次调用接口的 id
timestamp number unix time (s) 当前时间戳 unix 秒
merchant_code string merchant code 商户号
username string player username 玩家用户名
amount number refund amount 退回金额
currency string currency 玩家货币
game_code string game code 游戏代码
bet_id number bet number 投注 id
round_id string or number round number 局号;目前只有 double 游戏为 string 格式
type integer 1: refund 2: payout failed 3: issue cancel; 1:退回 2:派彩失败 3:取消
sign string Signature 参数签名
{
  "unique_id": "testId",
  "timestamp": 1654752446,
  "merchant_code": "testMerchant",
  "username": "testPlayer",
  "amount": 30,
  "currency": "USD",
  "game_code": "double",
  "bet_id": 99,
  "round_id": "testRound",
  "type": 1,
  "sign": "testSign"
}

Response

Name Type Description
is_success boolean if the bet is successful or not, default true 投注是否成功,不传默认为成功
err_msg string error message if error 操作失败的错误说明
balance number balance 玩家余额
currency string currency 玩家货币
{
  "is_success": true,
  "err_msg": "",
  "balance": 100,
  "currency": "test"
}

Authentication

Generate Token

Generate token by merchant code and secure key

使用商户号和安全秘钥生成 token

  • timeout在600之内时,会生成返回新的auth token,并刷新过期时间

  • if timeout less than 600, will generate new auth token and refresh timeout

Request Body schema: application/json
merchant_code
required
string
secure_key
required
string
sign
required
string

signatrue of request payload, created by rule written in Security Mode

参数签名,依据安全模式的签名规则

Responses

Request samples

Content type
application/json
{
  • "merchant_code": "string",
  • "secure_key": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Player

Create player

create player account

创建玩家游戏账号

Request Body schema: application/json
auth_token
required
string 32 characters

from authentication API;来自身份 认证 API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore;玩家用户名

sign
required
string

signatrue of request payload, created by rule written in Security Mode

参数签名,依据安全模式的签名规则

Responses

Request samples

Content type
application/json
{
  • "auth_token": "stringstringstringstringstringst",
  • "merchant_code": "string",
  • "username": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Query Player

query player detail

查询玩家信息

query Parameters
auth_token
required
string 32 characters

from authentication API;来自身份 认证 API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore;玩家用户名

sign
required
string

signatrue of request payload, created by rule written in Security Mode

参数签名,依据安全模式的签名规则

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Kick player

kick player

剔除玩家

Request Body schema: application/json
auth_token
required
string 32 characters

from authentication API;来自身份 认证 API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore;玩家用户名

sign
required
string

signatrue of request payload, created by rule written in Security Mode

参数签名,依据安全模式的签名规则

Responses

Request samples

Content type
application/json
{
  • "auth_token": "stringstringstringstringstringst",
  • "merchant_code": "string",
  • "username": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": "ok"
}

Block player

block player

禁用玩家

Request Body schema: application/json
auth_token
required
string 32 characters

from authentication API;来自身份 认证 API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore;玩家用户名

sign
required
string

signatrue of request payload, created by rule written in Security Mode

参数签名,依据安全模式的签名规则

Responses

Request samples

Content type
application/json
{
  • "auth_token": "stringstringstringstringstringst",
  • "merchant_code": "string",
  • "username": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Unblock player

unblock player

启用玩家

Request Body schema: application/json
auth_token
required
string 32 characters

from authentication API;来自身份 认证 API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore;玩家用户名

sign
required
string

signatrue of request payload, created by rule written in Security Mode

参数签名,依据安全模式的签名规则

Responses

Request samples

Content type
application/json
{
  • "auth_token": "stringstringstringstringstringst",
  • "merchant_code": "string",
  • "username": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Chain

Launch Game

launch game

启动游戏

query Parameters
auth_token
required
string 32 characters

from authentication API;来自身份 认证 API

merchant_code
required
string
game_code
required
string

参考游戏列表的 Game Code 值

传入 lobby 时启动游戏大厅

Values of Game Code in Game List section

If game code is passed with value lobby, the url will launch game lobby

username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore;玩家用户名

language
required
string
Enum: "en" "zh" "vi" "th" "id" "pt" "ar" "de" "es-MX" "es" "fr" "hu" "it" "ro" "ko" "ja" "tr" "ru"
语系 mini 刮刮乐
en 英文 o o
zh 简体中文 o o
vi 越南文 o
th 泰文 o o
id 印尼文 o o
pt 葡萄牙文 o o
ar 阿拉伯语 o
de 德语 o
es-MX 墨西哥文 o
es 西班牙文 o
fr 法文 o
hu 匈牙利语 o
it 意大利语 o
ro 罗马尼亚语 o
ko 韩文 o o
ja 日文 o o
tr 土耳其语 o o
ru 俄語 o
sign
required
string

signatrue of request payload, created by rule written in Security Mode

参数签名,依据安全模式的签名规则

home_link
string

If provided, game UI will display a button to navigate user to this url;如果传入,则游 戏页面会显示一个可以导向此网址的按钮

trial
boolean

whether launch trial game or not 是否启动试玩页面

  • if true, will launch trial game 传 true 时会启动试玩页面
  • if not passed or false, will launch normal game 不传入、或是传 false 时,启动正常游戏页面
  • player in trial game is different from original player, and will have 2000 trial credit which cannot be used in transfer; trial game bet history is not provided in open API 试玩页面的玩家独立于原玩家,有2000试玩金,不可转入和转出,试玩的游戏记录不提供拉取

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Query Mini Game History Stream

query mini game history stream (recommended)

串流查询游戏历史 (建议使用)

  • Gap between requests has to be more than 3s;两次请求间隔不可低于3s
  • Only accepts query of history within one month;只可请求一个月内游戏数据
  • Each query returns at most 10000 records;每次查询最多返回 10000 笔记录
  • Records in response are sorted by bet_time in ascending order, i.e., oldest records is the first one;返回的游戏记录按照投注时间以递增方式排序,也就是最久远的资料为第 1 笔
  • uniqueid field of the last record can be passed to last_bet_id query parameter to query next page;利用返回游戏记录的最后一笔的 uniqueid 值,传入查询参数的 last_bet_id 栏位时,可以实现下页查询
query Parameters
auth_token
required
string 32 characters

from authentication API;来自身份 认证 API

merchant_code
required
string
from
required
string

start of bet time range, format YYYYMMDDHHmmss, timezone is UTC+8;投注时间范围起始,东八时区的日期时间字串

to
required
string

end of bet time range, format YYYYMMDDHHmmss, timezone is UTC+8;投注时间范围终点,东八时区的日期时间字串

sign
required
string

signatrue of request payload, created by rule written in Security Mode

参数签名,依据安全模式的签名规则

game_code
string

参考游戏列表 Classic 系列与 Monster 系列的 Game Code 值

Values of Game Code of Classic series and Monster series in Game List section

time_type
integer
Enum: 1 2

time type for query filter; default to 1

过滤的时间类型,预设 1

  • 1: bet_time 投注时间
  • 2: payout_time 派彩时间
last_bet_id
string

指定要返回 ID 比这个值更大的记录

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "time": 1708570865824,
  • "rid": 1923,
  • "cost": 10,
  • "detail": {
    }
}

Scratch

Query Scratch Game History Stream

query scratch game history stream (recommended)

串流查询游戏历史 (建议使用)

  • Gap between requests has to be more than 3s;两次请求间隔不可低于3s
  • Only accepts query of history within one month;只可请求一个月内游戏数据
  • Each query returns at most 10000 records;每次查询最多返回 10000 笔记录
  • Records in response are sorted by bet_time in ascending order, i.e., oldest records is the first one;返回的游戏记录按照投注时间以递增方式排序,也就是最久远的资料为第 1 笔
  • uniqueid field of the last record can be passed to last_bet_id query parameter to query next page;利用返回游戏记录的最后一笔的 uniqueid 值,传入查询参数的 last_bet_id 栏位时,可以实现下页查询
query Parameters
auth_token
required
string 32 characters

from authentication API;来自身份 认证 API

merchant_code
required
string
from
required
string

start of bet time range, format YYYYMMDDHHmmss, timezone is UTC+8;投注时间范围起始,东八时区的日期时间字串

to
required
string

end of bet time range, format YYYYMMDDHHmmss, timezone is UTC+8;投注时间范围终点,东八时区的日期时间字串

sign
required
string

signatrue of request payload, created by rule written in Security Mode

参数签名,依据安全模式的签名规则

game_code
string

参考游戏列表 Scratch 系列的 Game Code 值

Values of Game Code of Scratch series in Game List section

time_type
integer
Enum: 1 2

time type for query filter; default to 1

过滤的时间类型,预设 1

  • 1: bet_time 投注时间
  • 2: payout_time 派彩时间
last_bet_id
string

指定要返回 ID 比这个值更大的记录

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "time": 1708572889906,
  • "rid": 2173,
  • "cost": 11,
  • "detail": {
    }
}

Slot

Query Slot Game History Stream

query slot game history stream (recommended)

串流查询游戏历史 (建议使用)

  • Gap between requests has to be more than 3s;两次请求间隔不可低于3s
  • Only accepts query of history within one month;只可请求一个月内游戏数据
  • Each query returns at most 10000 records;每次查询最多返回 10000 笔记录
  • Records in response are sorted by bet_time in ascending order, i.e., oldest records is the first one;返回的游戏记录按照投注时间以递增方式排序,也就是最久远的资料为第 1 笔
  • uniqueid field of the last record can be passed to last_bet_id query parameter to query next page;利用返回游戏记录的最后一笔的 uniqueid 值,传入查询参数的 last_bet_id 栏位时,可以实现下页查询
query Parameters
auth_token
required
string 32 characters

from authentication API;来自身份 认证 API

merchant_code
required
string
from
required
string

start of bet time range, format YYYYMMDDHHmmss, timezone is UTC+8;投注时间范围起始,东八时区的日期时间字串

to
required
string

end of bet time range, format YYYYMMDDHHmmss, timezone is UTC+8;投注时间范围终点,东八时区的日期时间字串

sign
required
string

signatrue of request payload, created by rule written in Security Mode

参数签名,依据安全模式的签名规则

game_code
string

参考游戏列表 Slot 系列的 Game Code 值

Values of Game Code of Slot series in Game List section

time_type
integer
Enum: 1 2

time type for query filter; default to 1

过滤的时间类型,预设 1

  • 1: bet_time 投注时间
  • 2: payout_time 派彩时间
last_bet_id
string

指定要返回 ID 比这个值更大的记录

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "time": 1728878471091,
  • "rid": 7801,
  • "cost": 33,
  • "detail": {
    }
}