Web Service API v3.0.20
Technical Guide
1.Introduction
The Web Service API interface is for accessing the SA Gaming Platform. Including user registration, user balance query, user betting records and charging to or withdraw from a user account. This document includes both Transfer Wallet and Seamless Wallet.
2.Version
Version | Description | Date |
---|---|---|
3.0.15 |
| 2020/07/17 |
3.0.16 |
| 2020/12/07 |
3.0.17 |
| 2021/02/22 |
3.0.18 |
| 2021/09/27 |
3.0.19 |
| 2021/12/06 |
3.0.20 |
| 2022/04/11 |
3.API Calling Restriction Information
The following APIs have calling restriction.
Name of API | Frequency of calls |
---|---|
GetAllBetDetailsDV | Every 5 minutes no more than 10 calls |
GetAllBetDetailsForTimeIntervalDV | Every 5 minutes no more than 10 calls |
ResendTransaction | Every 5 minutes no more than 1 call |
Accuracy of point value
The accuracy of all point value is limited two decimal place. For example:
1000.23, 89.32, 1002304.89
4.Encryption
4.1.Encryption Requirements
All of the web service queries require DES encryption and MD5 hashing before sending to ensure the content has no modification during transmission.
Please ask us for the following information:
- Secret Key
- EncrypKey
- MD5Key
- API
url - Live game client loader
- Lobby name (supplied during startup the client)
Example DES Encrypt function in ASP.Net C#:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
protected byte[] EncryptKey = ASCIIEncoding.ASCII.GetBytes("ask_us_for_key"); public string DESEncrypt( string inString) { MemoryStream ms = new MemoryStream(); CryptoStream cs = new CryptoStream (ms, new DESCryptoServiceProvider ().CreateEncryptor(EncryptKey, EncryptKey), CryptoStreamMode .Write); StreamWriter sw = new StreamWriter (cs); sw.Write(inString); sw.Flush(); cs.FlushFinalBlock(); sw.Flush(); return Convert.ToBase64String(ms.GetBuffer(), 0, ( int )ms.Length); } |
Example DES Encrypt function in PHP:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<?php class DES { var $key; var $iv; function DES( $key, $iv=0 ) { $this->key = $key; if( $iv == 0 ) { $this->iv = $key; } else { $this->iv = $iv; } } function encrypt($str) { return base64_encode( openssl_encrypt($str, 'DES-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv ) ); } } ?> |
Example in PHP:
1 2 3 4 5 6 7 8 |
<?php $str = "method=GetUserStatusDV&Key=01234567789ABCDEF0123456789ABCDE&Time=20150101012345&Username=abcd12345"; // for example $key = 'ZyXw4321'; // for example $crypt = new DES($key); $mstr = $crypt->encrypt($str); $urlemstr = urlencode($mstr); echo "[ $str ] Encrypted: [ $mstr ] UrlEncoded encrypted string: [ $urlemstr ]"; ?> |
Example MD5 function in ASP.Net C#:
1 2 3 4 5 6 7 8 9 10 |
public string BuildMD5(string inString) { byte[] hashed = MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(inString)); StringBuilder sb = new StringBuilder(hashed.Length * 2); for (int i = 0; i < hashed.Length; i++) { sb.Append(hashed[i].ToString("x2")); } return sb.ToString(); } |
Example MD5 function in PHP:
1 2 3 4 5 6 7 8 9 |
<?php $str = "method=GetUserStatusDV&Key=01234567789ABCDEF0123456789ABCDE&Time=20150101012345&Username=abcd12345"; // for example $md5key = "abcdefg"; // for example $Time = "20150101012345"; // for example $SecretKey = "01234567789ABCDEF0123456789ABCDE"; // for example $PreMD5Str = $str . $md5key . $Time . $SecretKey; $OutMD5 = md5($PreMD5Str); echo "md5:[ $OutMD5 ]"; ?> |
4.2.Encryption Procedures
- Construct a Query String (QS) with required parameters (including the web service method name itself (e.g. method=RegUserInfo)
- DES encrypt the Query String with the supplied EncryptKey and obtain the encrypted query string (q)
- Build an MD5 hash according to (QS) and other parameters to form a signature (s)
- Use HTTP POST request to API url.
- Obtain the resulting XML response.
4.3.Example to call API
Let’s take RegUserInfo as an example.
Encryption requires the following parameters
- method (String, “RegUserInfo”)
- Key (String, the Secret Key)
- Time (DateTime, Current Time, in yyyyMMddHHmmss format)
- Username (String)
- CurrencyType (String)
method, Key and Time are always inserted. Other parameters please follow the parameter list in each API function.
Let say, the Secret Key is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX and md5key is YYYYYYYY.
Example Query String (QS):
1 2 3 |
QS = “method=RegUserInfo&Key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&Time=20140101123456&Username=DemoUser001&CurrencyType=EUR”; q = HttpUtility.UrlEncode( DESencrypt(QS) ); |
For example, q = ‘j4tjorjwarfj3trwise0safrwg2wt4awari0fwjfeoh’
Example MD5 String for building the signature (QS + md5key + Time + Key):
1 |
s = BuildMD5(QS + “YYYYYYYY” + “20140101123456” + “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”); |
For example, s = ‘1234567890abcdef’
Resulting POST method query (using “Content-Type: application/x-www-form-urlencoded”):
q=j4tjorjwarfj3trwise0safrwg2wt4awari0fwjfeoh&s=1234567890abcdef
POST to: http://
Output
1 2 3 4 5 6 |
<?xml version="1.0" encoding="utf-8"?> <RegUserInfoResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Username>DemoUser001</Username> <ErrorMsgId>0</ErrorMsgId> <ErrorMsg>Success</ErrorMsg> </RegUserInfoResponse> |
4.4.Error handling
If there are decryption error or the md5 not matching, a generic error response will be output.
ErrorMsgId 128 for decryption error.
ErrorMsgId 132 for md5 sign unmatch.
1 2 3 4 5 |
<?xml version="1.0" encoding="utf-8"?> <APIResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ErrorMsgId>128</ErrorMsgId> <ErrorMsg>Decryption error</ErrorMsg> </APIResponse> |
5.Web Service Interface
All services require a secret key to access. Please contact us to get one.

5.1.User Account Manipulation
5.1.1.RegUserInfo
Create a user by username and currency type.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "RegUserInfo" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | User name. Alphanumeric (5~20 characters) | String (20) | Y |
CurrencyType | Currency: USD Refer to Supported currencies | String (16) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Username | User name | String | Y |
ErrorMsgId | Error message: 0: Success 108: Username length/format incorrect 113: Username duplicated 114: Currency not exist 133: Create user failed | Byte | Y |
ErrorMsg | Error message details | String | Y |
5.1.2.VerifyUsername
Check if a username is already existing in database of a lobby.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be “VerifyUsername” | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in “yyyyMMddHHmmss” format | DateTime | Y |
Username | User name | String (20) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Username | User name | String (20) | Y |
IsExist | User existing? True: user existing False: user not existing | Bool | Y |
ErrorMsgId | Error message: 0: Success 108: Username length/format incorrect | Byte | Y |
ErrorMsg | Error message details | String | Y |
Output
1 2 3 4 5 6 7 8 9 |
<?xml version="1.0" encoding="utf-8"?> <VerifyUsernameResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <IsExist>True</IsExist> <Username>DemoUser001</Username> <ErrorMsgId>0</ErrorMsgId> <ErrorMsg>Success</ErrorMsg> </VerifyUsernameResponse> |
5.1.3.GetUserStatusDV
The status of a user including:
- Online/offline
- Bet exist
- Bet amount and remain balance
- Maximum balance
- Maximum daily winning
Name | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "GetUserStatusDV" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
IsSuccess | Success? True: Success False: Failed | Bool | Y |
Username | Username | String | Y |
Balance | Active balance, excluding betted amount. Correct to cent. (Not applicable for seamless wallet) | Decimal | Y |
Online | online? | Bool | Y |
Betted | betted? (Not applicable for seamless wallet) | Bool | Y |
BettedAmount | Total betted amount (Not applicable for seamless wallet) | Decimal | Y |
MaxBalance | Upper limit in user's balance to place bet (Not applicable for seamless wallet) | Decimal | Y |
MaxWinning | Daily winning limitation to allow place bet | Decimal | Y |
WithholdAmount | Amount withhold in the system from the balance (Not applicable for seamless wallet) | Decimal | Y |
ErrorMsgId | Error message 0: Success 100: Username error 108: Username length/format incorrect 116: Username does not exist | Byte | Y |
ErrorMsg | Error message detail | String | Y |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<?xml version="1.0" encoding="utf-8"?> <VerifyUsernameResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <IsSuccess>True</IsSuccess> <Username>DemoUser001</Username> <Balance>1234567.89</Balance> <Online>False</Online> <Betted>False</Betted> <BettedAmount>0</BettedAmount> <MaxBalance>0</MaxBalance> <MaxWinning>0</MaxWinning> <WithholdAmount>0</WithholdAmount> <ErrorMsgId>0</ErrorMsgId> <ErrorMsg>Success</ErrorMsg> </VerifyUsernameResponse> |
5.1.4.QueryBetLimit
Query all of the bet limit for specified currency.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "QueryBetLimit" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Currency | Currency: USD Refer to Supported currencies | String (16) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
BetLimitList | BetLimit lists | XML Structure | Y |
ErrorMsgId | Error message: 0: Success 114: Currency not exist | Byte | Y |
ErrorMsg | Error message detail | String | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
RuleID | ID of the bet limit | Int64 | Y |
Min | Minimum of the limit | Int | Y |
Max | Maximum of the limit | Int | Y |
BetLimit example
1 2 3 4 5 6 7 8 9 10 11 12 |
<BetLimitList> <BetLimit> <RuleID>1</RuleID> <Min>5</Min> <Max>500</Max> </BetLimit> <BetLimit> <RuleID>2</RuleID> <Min>100</Min> <Max>5000</Max> </BetLimit> </BetLimitList> |
5.1.5.SetBetLimit
Set a maximum 5 sets of bet limit to a user.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "SetBetLimit" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | Y |
Currency | Currency: USD Refer to Supported currencies | String (16) | Y |
Set1 | ID from QueryBetLimit | Int64 | Y |
Set2 | ID from QueryBetLimit | Int64 | N |
Set3 | ID from QueryBetLimit | Int64 | N |
Set4 | ID from QueryBetLimit | Int64 | N |
Set5 | ID from QueryBetLimit | Int64 | N |
Gametype | roulette - for Roulette sicbo - for SicBo pokdeng - for Pok Deng others - for the rest of gametype Please note that without Gametype parameter, the bet limit will be applied to "others" by default. If need to change two types or more at the same time, each parameter have to use comma to separate: Gametype=roulette,sicbo,pokdeng,others | String | N |
Name | Description | Type and Limit | Required? |
---|---|---|---|
ErrorMsgId | Error message: 0: Success 108: Username length/format incorrect 114: Currency not exist 116: Username does not exist 142: Parameter(s) error 147: BetLimit does not existed | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.1.6.GetUserMaxBalance
Return the user’s maximum balance limit.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "GetUserMaxBalance" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
MaxBalance | Maximum balance | Decimal | Y |
ErrorMsgId | Error message: 0: Success 100: Username error 108: Username length/format incorrect 116: Username does not exist | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.1.7.SetUserMaxBalance
Set the maximum balance limit to a user.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "SetUserMaxBalance" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | Y |
MaxBalance | Maximum balance | Decimal | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
ErrorMsgId | Error message: 0: Success 116: Username does not exist 142: Parameter(s) error 148: MaxBalance not zero or smaller than user balance | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.1.8.SetUserMaxWinning
Set the user’s maximum daily winning. User cannot place bet if his winning exceed this setting.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "SetUserMaxWinning" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | Y |
MaxWinning | Maximum daily winning | Decimal | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
ErrorMsgId | Error message: 0: Success 116: Username does not exist 142: Parameter(s) error | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.2.Login Access
5.2.1.LoginRequest
It is the function to request the login token. If the username doesn’t exist, it will be created automatically.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be “LoginRequest” | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | current time in “yyyyMMddHHmmss” format | DateTime | Y |
Username | User name (5 ~ 20 characters) | String (20) | Y |
CurrencyType | Currency: USD Refer to Supported currencies | String (16) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Token # | Token for Live game | String | Y |
DisplayName * | Internal assigned username | String (31) | Y |
ErrorMsgId | Error message: 0: Success 129: System under maintenance 130: User account is locked (disabled) 133: Create user failed 134: Game code not found 135: Game access denied | Byte | Y |
ErrorMsg | Error message detail | String | Y |
# If login request failed, there is no Token node in the response.
* All username will be added a suffix @xxx. The DisplayName will be the actual username in our database.
Output
1 2 3 4 5 6 7 |
<?xml version="1.0" encoding="utf-8"?> <LoginRequestResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Token>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</Token> <DisplayName>satest@xxx</DisplayName> <ErrorMsgId>0</ErrorMsgId> <ErrorMsg>Success</ErrorMsg> </LoginRequestResponse> |
5.2.2.LoginRequestForFun
Login to the system in Fun mode. The username will be generated automatically.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be “LoginRequestForFun” | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | current time in “yyyyMMddHHmmss” format | DateTime | Y |
Amount | Initial amount | Decimal | Y |
CurrencyType | Currency: USD Refer to Supported currencies | String (16) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Token# | Token for Live game | String | Y |
DisplayName | Internal assigned username | String (31) | Y |
ErrorMsgId | Error message: 0: Success 129: System under maintenance 134: Game code not found 135: Game access denied | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.2.3.KickUser
Kick user to offline.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "KickUser" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | User name | String (20) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
ErrorMsgId | Error message: 0: Success 104: Service not available 108: Username length/format incorrect 116: Username does not exist 125: Kick user fail | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.3.Bet Records Query
5.3.1.GetAllBetDetailsDV
This Web service will fetch bet details for the current lobby of the specified date from 12:00 PM to 11:59:59 AM. If no Date input, the current date will be used. The frequency of the call should be made to this API 10 times per 5 minutes otherwise it will throw an error.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "GetAllBetDetailsDV" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | User name | String (20) | N |
Date | Date for details “yyyy-MM-dd” | Date | N |
Name | Description | Type and Limit | Required? |
---|---|---|---|
BetDetailList | Bet details structure | XML | Y |
ErrorMsgId | Error message: 0: Success 108: Username length/format incorrect 112: API recently called 116: Username does not exist 142: Parameter(s) error | Byte | Y |
ErrorMsg | Error message detail | String | Y |
Name | Description | Type and Limit | Required? | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BetTime | Bet start time | Date Time | Y | ||||||||||
PayoutTime | Payout time | Date Time | Y | ||||||||||
Username | Player name | String(20) | Y | ||||||||||
HostID | Host table ID | Int(16) | Y | ||||||||||
Detail | Reserved | String | N | ||||||||||
GameID | Game ID | String(64) | Y | ||||||||||
Round | Game Round | Int | Y | ||||||||||
Set | Game Set | Int | Y | ||||||||||
BetID | Bet ID | Int(64) | Y | ||||||||||
BetAmount | Bet amount | Decimal | Y | ||||||||||
Rolling | Rolling | Decimal | Y | ||||||||||
ResultAmount | Payout | Decimal | Y | ||||||||||
Balance | Balance after this bet | Decimal | Y | ||||||||||
GameType | Game type. For details please click here | String | Y | ||||||||||
BetType | Live game: Bet type of different games | Int | Y | ||||||||||
BetSource |
| Int | Y | ||||||||||
TransactionID | Seamless wallet PlaceBet transaction ID. -1 if not using seamless wallet | Int(64) | Y | ||||||||||
GameResult | The result of the game (details in another table, do not include "ResultDetail") Baccarat Dragon Tiger Sicbo Roulette Pok Deng | XML | Y |
Output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
<!--?xml version="1.0" encoding="UTF-8"?--> <getallbetdetailsresponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <betdetaillist> <betdetail> <bettime>2021-03-19T16:11:47.191</bettime> <payouttime>2021-03-19T16:12:28.877</payouttime> <username>DemoUser001</username> <hostid>123</hostid> <detail> <gameid>1234567890123456</gameid> <round>10</round> <set>34</set> <betid>1234567890</betid> <betamount>123.45</betamount> <rolling>123.45</rolling> <balance>434456.35</balance> <resultamount>246.90</resultamount> <gametype>bac</gametype> <bettype>123</bettype> <betsource>2</betsource> <tranactionid>2</tranactionid> <gameresult> <baccaratresult> <playercard1> <suit>2</suit> <rank>12</rank> </playercard1> <playercard2> <suit>1</suit> <rank>11</rank> </playercard2> <playercard3> <suit>3</suit> <rank>9</rank> </playercard3> <bankercard1> <suit>3</suit> <rank>5</rank> </bankercard1> <bankercard2> <suit>1</suit> <rank>13</rank> </bankercard2> </baccaratresult> </gameresult> </detail></betdetail> </betdetaillist> <errormsgid>0</errormsgid> <errormsg>Success</errormsg> </getallbetdetailsresponse> |
5.3.2.GetAllBetDetailsForTimeIntervalDV
This web service will fetch bet details of a lobby for a time interval maximum 24 hours. The frequency of the call should be made to this API is 10 times per 5 minutes otherwise it will throw an error.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "GetAllBetDetailsForTimeIntervalDV" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | User name | String (20) | N |
FromTime | Date for details “yyyy-MM-dd HH:mm:ss” | Date Time | Y |
ToTime | Date for details “yyyy-MM-dd HH:mm:ss” | Date Time | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
BetDetailList | Bet details structure | XML | Y |
ErrorMsgId | Error message: 0: Success 108: Username length/format incorrect 111: Query time range out of limitation 112: API recently called 116: Username does not exist 142: Parameter(s) error | Byte | Y |
ErrorMsg | Error message detail | String | Y |
BetDetails is the same as GameAllBetDetailsDV.
5.3.3.GetAllBetDetailsForTransactionID
This web service is used for seamless wallet to fetch the bet records details of a PlaceBet, PlayerWin or PlayerLost transaction ID. Example:
1. use PlaceBet’s transaction ID will return the related transaction ID’s bet details
2. use PlayerWin or PlayerLost transaction ID will return whole game round result of the related player.
Name | Description | Type and Limit | Required? |
---|---|---|---|
method | must be "GetAllBetDetailsForTransactionID" | String (32) | Y |
Key | secret key | String (32) | Y |
Time | current time in "yyyyMMddHHmmss" format | DateTime | Y |
TransactionID | Transaction ID of a PlayerWin or PlayerLost | String (16) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Result | The result of the game (details in another table, do not include "ResultDetail") Baccarat Dragon Tiger Roulette Sicbo Pok Deng | XML | Y |
BetList | Bet details structure | XML | Y |
ErrorMsgId | Error message 0: Success 106: Server not ready 152: Transaction ID not found | Byte | Y |
ErrorMsg | Error message detail | String | Y |
Name | Description | Type and Limit | Required? | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BetTime | Bet start time | Date Time | Y | ||||||||||
PayoutTime | Payout time | Date Time | Y | ||||||||||
Username | Player name | String(31) | Y | ||||||||||
HostID | Host table ID | Int16 | Y | ||||||||||
GameID | Game ID | String | Y | ||||||||||
Round | Game Round | Int | Y | ||||||||||
Set | Game Set | Int | Y | ||||||||||
BetID | Bet ID | Int64 | Y | ||||||||||
BetAmount | Bet amount | Decimal | Y | ||||||||||
Rolling | Rolling | Decimal | Y | ||||||||||
ResultAmount | Payout | Decimal | Y | ||||||||||
Balance | Balance after this bet | Decimal | Y | ||||||||||
GameType | Game type. For details please click here | String | Y | ||||||||||
BetType | Live game: Bet type of different games | Int | Y | ||||||||||
BetSource |
| Int | Y | ||||||||||
Detail | Reserved | String | N | ||||||||||
TransactionID | Seamless wallet PlaceBet transaction ID. -1 if not using seamless wallet | Int64 | Y |
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
<getallbetdetailsfortransactionidresponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <errormsgid>0</errormsgid> <errormsg>Success</errormsg> <result> <baccaratresult> <playercard1> <suit>2</suit> <rank>2</rank> </playercard1> <playercard2> <suit>4</suit> <rank>3</rank> </playercard2> <playercard3> <suit>4</suit> <rank>5</rank> </playercard3> <bankercard1> <suit>4</suit> <rank>1</rank> </bankercard1> <bankercard2> <suit>1</suit> <rank>13</rank> </bankercard2> <bankercard3> <suit>3</suit> <rank>3</rank> </bankercard3> <resultdetail> <brtie>false</brtie> <brplayerwin>false</brplayerwin> <brbankerwin>true</brbankerwin> <brplayerpair>false</brplayerpair> <brbankerpair>false</brbankerpair> <brstotalcardsmall>false</brstotalcardsmall> <brstotalcardbig>true</brstotalcardbig> <brsplayerdragon>false</brsplayerdragon> <brsbankerdragon>true</brsbankerdragon> <brsstie>false</brsstie> <brssplayerwin>false</brssplayerwin> <brssbankerwin>true</brssbankerwin> <brssplayerpair>false</brssplayerpair> <brssbankerpair>false</brssbankerpair> <brplayernatural>false</brplayernatural> <brbankernatural>false</brbankernatural> <brssplayernatural>false</brssplayernatural> <brssbankernatural>false</brssbankernatural> <brcowplayerwin>false</brcowplayerwin> <brcowbankerwin>true</brcowbankerwin> <brcowtie>false</brcowtie> <brcowplayerpair>false</brcowplayerpair> <brcowbankerpair>false</brcowbankerpair> <brcowplayernatural>false</brcowplayernatural> <brcowbankernatural>false</brcowbankernatural> <brssstotalcardsmall>false</brssstotalcardsmall> <brssstotalcardbig>true</brssstotalcardbig> <brsssplayerdragon>false</brsssplayerdragon> <brsssbankerdragon>true</brsssbankerdragon> <brsssluckysix>false</brsssluckysix> <brsluckysix>false</brsluckysix> </resultdetail> </baccaratresult> </result> <betdetaillist> <betdetail> <bettime>2021-05-25T10:33:47.897</bettime> <payouttime>2021-05-25T10:34:23.687</payouttime> <username>satest</username> <hostid>834</hostid> <gameid>25682834104320</gameid> <round>42</round> <set>21</set> <betid>15704772288</betid> <betamount>15</betamount> <rolling>15</rolling> <resultamount>15</resultamount> <balance>40</balance> <gametype>bac</gametype> <bettype>27</bettype> <betsource>8792</betsource> <detail> <transactionid>5318767948</transactionid> <state>true</state> </detail></betdetail> <betdetail> <bettime>2021-05-25T10:33:56.71</bettime> <payouttime>2021-05-25T10:34:23.687</payouttime> <username>satest</username> <hostid>834</hostid> <gameid>25682834104320</gameid> <round>42</round> <set>21</set> <betid>15704773687</betid> <betamount>10</betamount> <rolling>10</rolling> <resultamount>10</resultamount> <balance>50</balance> <gametype>bac</gametype> <bettype>27</bettype> <betsource>8792</betsource> <detail> <transactionid>5318768770</transactionid> <state>true</state> </detail></betdetail> </betdetaillist> </getallbetdetailsfortransactionidresponse> |
5.3.4.GetUserBetItemDV
Retrieve a list of bet record of a user within 7 days
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "GetUserBetItemDV" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | Y |
FromTime | Query start time: “yyyy-MM-dd” or “yyyy-MM-dd HH:mm:ss” | DateTime | Y |
ToTime | Query end time: “yyyy-MM-dd” or “yyyy-MM-dd HH:mm:ss” | DateTime | Y |
Offset | Query offset id. First query input 0. For the next query, using the offset from result | Int64 | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Username | Username | String (20) | Y |
FromTime | Query start time | DateTime | Y |
ToTime | Query end time | DateTime | Y |
Offset | Offset | Int64 | Y |
More | True: data still existing for query, using the Offset to start again. False: all data has been send | bool | Y |
ItemCount | Number of item queried | Int | Y |
UserBetItemList | List of bet item details UserBetItem | XML | Y |
ErrorMsgId | Error message: 0: Success 111: Query time range out of limitation 116: Username does not exist | Byte | Y |
ErrorMsg | Error message detail | String | Y |
Output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
<!--?xml version="1.0" encoding="utf-8"?--> <getuserbetitemresponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <username>DemoUser001</username> <fromtime>2021-03-19T00:00:00</fromtime> <totime>2021-03-20T00:00:00</totime> <offset>0</offset> <more>false</more> <itemcount>2</itemcount> <userbetitemlist> <userbetitem> <betid>1</betid> <bettime>2021-03-19T16:11:47.19</bettime> <payouttime>2021-03-19T16:12:28.877</payouttime> <gameid>135450624</gameid> <hostid>831</hostid> <hostname>百家樂E01</hostname> <gametype>bac</gametype> <set>3</set> <round>48</round> <bettype>2</bettype> <betamount>100</betamount> <rolling>100</rolling> <detail> <gameresult> <baccaratresult> <playercard1> <suit>1</suit> <rank>8</rank> </playercard1> <playercard2> <suit>3</suit> <rank>3</rank> </playercard2> <playercard3> <suit>2</suit> <rank>7</rank> </playercard3> <bankercard1> <suit>1</suit> <rank>12</rank> </bankercard1> <bankercard2> <suit>2</suit> <rank>4</rank> </bankercard2> <bankercard3> <suit>4</suit> <rank>11</rank> </bankercard3> <resultdetail> <brtie>false</brtie> <brplayerwin>true</brplayerwin> <brbankerwin>false</brbankerwin> <brplayerpair>false</brplayerpair> <brbankerpair>false</brbankerpair> <brstotalcardsmall>false</brstotalcardsmall> <brstotalcardbig>true</brstotalcardbig> <brsplayerdragon>true</brsplayerdragon> <brsbankerdragon>false</brsbankerdragon> <brsstie>false</brsstie> <brssplayerwin>true</brssplayerwin> <brssbankerwin>false</brssbankerwin> <brssplayerpair>false</brssplayerpair> <brssbankerpair>false</brssbankerpair> <brplayernatural>false</brplayernatural> <brbankernatural>false</brbankernatural> <brssplayernatural>false</brssplayernatural> <brssbankernatural>false</brssbankernatural> <brcowplayerwin>true</brcowplayerwin> <brcowbankerwin>false</brcowbankerwin> <brcowtie>false</brcowtie> <brcowplayerpair>false</brcowplayerpair> <brcowbankerpair>false</brcowbankerpair> <brcowplayernatural>false</brcowplayernatural> <brcowbankernatural>false</brcowbankernatural> <brssstotalcardsmall>false</brssstotalcardsmall> <brssstotalcardbig>true</brssstotalcardbig> <brsssplayerdragon>true</brsssplayerdragon> <brsssbankerdragon>false</brsssbankerdragon> <brsssluckysix>false</brsssluckysix> <brsluckysix>false</brsluckysix> </resultdetail> </baccaratresult> </gameresult> <resultamount>-100</resultamount> <balance>0</balance> <state>true</state> </detail></userbetitem> <userbetitem> <betid>29221310</betid> <bettime>2021-03-19T16:12:55.543</bettime> <payouttime>2021-03-19T16:13:31.443</payouttime> <gameid>23547430039552</gameid> <hostid>831</hostid> <hostname>百家樂E01</hostname> <gametype>bac</gametype> <set>3</set> <round>49</round> <bettype>1</bettype> <betamount>100</betamount> <rolling>0</rolling> <detail> <gameresult> <baccaratresult> <playercard1> <suit>1</suit> <rank>10</rank> </playercard1> <playercard2> <suit>3</suit> <rank>8</rank> </playercard2> <bankercard1> <suit>1</suit> <rank>12</rank> </bankercard1> <bankercard2> <suit>2</suit> <rank>7</rank> </bankercard2> <resultdetail> <brtie>false</brtie> <brplayerwin>true</brplayerwin> <brbankerwin>false</brbankerwin> <brplayerpair>false</brplayerpair> <brbankerpair>false</brbankerpair> <brstotalcardsmall>true</brstotalcardsmall> <brstotalcardbig>false</brstotalcardbig> <brsplayerdragon>true</brsplayerdragon> <brsbankerdragon>false</brsbankerdragon> <brsstie>false</brsstie> <brssplayerwin>true</brssplayerwin> <brssbankerwin>false</brssbankerwin> <brssplayerpair>false</brssplayerpair> <brssbankerpair>false</brssbankerpair> <brplayernatural>true</brplayernatural> <brbankernatural>false</brbankernatural> <brssplayernatural>true</brssplayernatural> <brssbankernatural>false</brssbankernatural> <brcowplayerwin>true</brcowplayerwin> <brcowbankerwin>false</brcowbankerwin> <brcowtie>false</brcowtie> <brcowplayerpair>false</brcowplayerpair> <brcowbankerpair>false</brcowbankerpair> <brcowplayernatural>true</brcowplayernatural> <brcowbankernatural>false</brcowbankernatural> <brssstotalcardsmall>true</brssstotalcardsmall> <brssstotalcardbig>false</brssstotalcardbig> <brsssplayerdragon>true</brsssplayerdragon> <brsssbankerdragon>false</brsssbankerdragon> <brsssluckysix>false</brsssluckysix> <brsluckysix>false</brsluckysix> </resultdetail> </baccaratresult> </gameresult> <resultamount>100</resultamount> <balance>26171.38</balance> <state>true</state> </detail></userbetitem> </userbetitemlist> <errormsgid>0</errormsgid> <errormsg>Success</errormsg> </getuserbetitemresponse> |
5.3.5.GetUserBetAmountDV
This Web service will fetch the live game stake amount for a lobby.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "GetUserBetAmountDV" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | N |
StartDate | Query start date/time: “yyyy-MM-dd” (default time 00:00:00) or “yyyy-MM-dd HH:mm:ss” | DateTime | N |
TimeRange | Range in hour from 0 to 23 (default 0 = 24 hours) | Int | N |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Username | Username | String (20) | Y |
StakeAmount | Sum of bet amount for all games | Decimal | Y |
ErrorMsgId | Error message: 0: Success 108: Username length/format incorrect 116: Username does not exist 142: Parameter(s) error | Byte | Y |
ErrorMsg | Error message detail | String | Y |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<?xml version="1.0" encoding="utf-8"?> <GetUserBetAmountResponse> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <BetAmountDetailList> <BetAmountDetails> <Username>user001</Username> <StakeAmount>1105.45</StakeAmount> </BetAmountDetails> </BetAmountDetailList> <ErrorMsgId>0</ErrorMsgId> <ErrorMsg>Success</ErrorMsg> </GetUserBetAmountResponse> |
5.3.6.GetUserWinLost
This API function is to get a user’s win/loss summary for a period of time with maximum of 31 days.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "GetUserWinLost" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | Y |
FromTime | Date for details “yyyy-MM-dd HH:mm:ss” | DateTime | Y |
ToTime | Date for details “yyyy-MM-dd HH:mm:ss” | DateTime | Y |
Type | 0 - includes win and loss 1 - only includes win 2 - only includes loss | Int | N |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Username | Username | String (20) | Y |
Winlost | Win or loss summary value | Decimal | Y |
ErrorMsgId | Error message: 0: Success 106: Server not ready 108: Username length/format incorrect 111: Query time range out of limitation 116: Username does not exist 144: Query type invalid | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.3.7.GetTransactionDetails
This web service will fetch the transaction details of a lobby for a time interval maximum 31 days. You may specify an username to query transaction details of a certain user.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "GetTransactionDetails" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | N |
FromTime | Date for details “yyyy-MM-dd HH:mm:ss” | DateTime | Y |
ToTime | Date for details “yyyy-MM-dd HH:mm:ss” | DateTime | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
TransactionDetails | Transaction details structure | XML | Y |
ErrorMsgId | Error message: 0: Success 106: Server not ready 111: Query time range out of limitation 116: Username does not exist | Byte | Y |
ErrorMsg | Error message detail | String | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
CurrencyName | Currency: USD Refer to Supported currencies | String (16) | Y |
Count | Number of transactions | Int | Y |
Winlost | Win/lose | Decimal | Y |
TotalBet | Total bet amount | Decimal | Y |
TotalRolling | Total rolling amount | Decimal | Y |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
<?xml version="1.0" encoding="utf-8"?> <GetTransactionDetailsResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ErrorMsgId>0</ErrorMsgId> <ErrorMsg>Success</ErrorMsg> <Details> <TransactionDetails> <CurrencyName>EUR</CurrencyName> <Count>9</Count> <Winlose>-40</Winlose> <TotalBet>275</TotalBet> <TotalRolling>75</TotalRolling> </TransactionDetails> <TransactionDetails> <CurrencyName>THB</CurrencyName> <Count>1</Count> <Winlose>-20</Winlose> <TotalBet>20</TotalBet> <TotalRolling>20</TotalRolling> </TransactionDetails> <TransactionDetails> <CurrencyName>VND</CurrencyName> <Count>1</Count> <Winlose>-20</Winlose> <TotalBet>20</TotalBet> <TotalRolling>20</TotalRolling> </TransactionDetails> </Details> </GetTransactionDetailsResponse> |
5.4.Transfer Wallet
The Transfer wallet API includes a transfer in, out and order status checking functions.
Throughout those functions, there is an OrderID inside each of them. In case a transfer was failed due to network problem and become unsuccessful, be sure to use the same OrderID to initiate another try. We guarantee the same OrderID will not be processed twice. Using a new OrderID for the same transfer may cause a duplicate transfer. Even you have checked the OrderID not existing by using CheckOrderID, you should still use the same OrderID.
5.4.1.DebitBalanceDV
Transfer from the user’s balance.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "DebitBalanceDV" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | Y |
OrderId | Order ID: OUT+yyyyMMddHHmmss+Username e.g. “OUT20131129130345peter1235” | String (40) | Y |
DebitAmount | Debit amount. Maximum two decimal only. | Decimal | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Username | Username | String | Y |
Balance | Remained active balance | Decimal | Y |
DebitAmount | Debited amount | Decimal | Y |
OrderId | Order ID | String (40) | Y |
ErrorMsgId | Error message: 0: Success 106: Server not ready. Try again later. 108: Username length/format incorrect 116: Username does not exist 120: Amount must be larger than zero 121: Not enough points to credit/debit 122: Order ID already exists 124: Database error 127: Invalid order ID format 142: Error Parameter 145: Parameter decimal point greater than 2 | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.4.2.DebitAllBalanceDV
Transfer all amount from the user’s balance.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "DebitAllBalanceDV" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | Y |
OrderId | Order ID: OUT+yyyyMMddHHmmss+Username e.g. “OUT20131129130345peter1235” | String (40) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Username | Username | String | Y |
DebitAmount | Debited amount | Decimal | Y |
OrderId | Order ID | String (40) | Y |
ErrorMsgId | Error message: 0: Success 106: Server not ready. Try again later. 116: Username does not exist 122: Order ID already exists 124: Database error 127: Invalid order ID format | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.4.3.CreditBalanceDV
Transfer fund to user’s balance.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "CreditBalanceDV" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
Username | Username | String (20) | Y |
OrderId | Order ID: IN+yyyyMMddHHmmss+Username e.g. “IN20131129130345peter1235” | String (40) | Y |
CreditAmount | Credit amount. | Decimal | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
Username | Username | String | Y |
Balance | Balance after credit | Decimal | Y |
CreditAmount | Credited amount. | Decimal | Y |
OrderId | Order ID | String | Y |
ErrorMsgId | Error message: 0: Success 106: Server not ready. Try again later. 108: Username length/format incorrect 116: Username does not exist 120: Amount must be larger than zero 121: Not enough points to credit/debit 122: Order ID already exists 124: Database error 127: Invalid order ID format 142: Error Parameter 145: Parameter decimal point greater than 2 | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.4.4.CheckOrderId
Check the OrderId that generated in DebitBalanceDV/DebitAllBalanceDV/CreditBalanceDV is existing or not in our system.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "CheckOrderId" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
OrderId | The OrderId used in
| String (40) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
isExist | The OrderId exist or not
| string | Y |
ErrorMsgId | Error message: 0: Success 106: Server not ready. Try again later. 124: Database error 127: Invalid order ID format | Byte | Y |
ErrorMsg | Error message detail | String | Y |
5.4.5.CheckOrderDetailsDV
Check the OrderId details of fund transfer orders (deposit & withdrawal)
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "CheckOrderDetailsDV" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
OrderId | The OrderId used in
| String (40) | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
isExist | The OrderId exist or not
If true, the Date, Type, Currency, Amount, PreviousBalance and Balance parameter will be returned | string | Y |
ErrorMsgId | Error message: 0: Success 106: Server not ready. Try again later. 124: Database error 127: Invalid order ID format | Byte | Y |
ErrorMsg | Error message detail | String | Y |
Date | Transaction time | DateTime | N |
Type |
| Byte | N |
Currency | Currency: USD Refer to Supported currencies | String (16) | N |
Amount | Transfer amount (withdraw or deposit) (decimal format and max. 2 decimal places) | Decimal | N |
PreviousBalance | Amount before adjustment (decimal format and max. 2 decimal places) | Decimal | N |
Balance | Amount after adjustment (decimal format and max. 2 decimal places) | Decimal | N |
5.5.Seamless Wallet
5.5.1.ResendTransaction
For PlayerWin, PlayerLost & PlaceBetCancel request, SA will keep re-sending it until receiving proper response. If SA couldn’t receive proper response after 2 hours, SA will consider it as failed and move it to unsuccessful transaction list.
This Web service can be used for re-sending the requests under unsuccessful transaction list by gameid. The frequency of the call should be made to this API 1 per 5 minutes otherwise it will throw an error.
ParametersName | Description | Type and Limit | Required? |
---|---|---|---|
method | Must be "ResendTransaction" | String (32) | Y |
Key | Secret key | String (32) | Y |
Time | Current time in "yyyyMMddHHmmss" format | DateTime | Y |
GameID | Game ID | String | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
TransactionDetailList | Transaction ID details structure | XML | Y |
ErrorMsgId | Error message: 0: Success 142: Parameter(s) error | Byte | Y |
ErrorMsg | Error message detail | String | Y |
Name | Description | Type and Limit | Required? |
---|---|---|---|
ID | Seamless wallet transaction ID. | Int64 | Y |
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<?xml version="1.0" encoding="utf-8"?> <ResendTransactionResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ErrorMsgId>0</ErrorMsgId> <ErrorMsg>Success</ErrorMsg> <TransactionDetailList> <TransactionDetail> <ID>1567164744</ID> </TransactionDetail> <TransactionDetail> <ID>1567164826</ID> </TransactionDetail> </TransactionDetailList> </ResendTransactionResponse> |
6.Seamless Wallet Integration
6.1.Introduction
This section is to illustrate the detail of implementing seamless wallet in external partner system.
Important: While probably obvious, it’s worth stating that when Seamless Wallet is in use, the CreditBalanceDV/DebitBalanceDV/DebitAllBalanceDV API should not be used to modify a player’s balance.
6.2.Workflow
Basically the partner system have to provide a set of API functions for our system to call:
- GetUserBalance
- Fund Transfer
GetUserBalance will be called when the user login to our platform or user click refresh balance in the web client.
Fund Transfer function includes four types of transfer:
- PlaceBet
- It is sent to the partner system when the user going to place a bet. The function will be timed out after 3 seconds and PlaceBetCancel will be sent.
- PlayerWin
- When a bet placed before is winning (bet amount + result amount > 0), the total amount (including stakes) will send to partner system.
- PlayerLost
- When a bet placed before is losing, this request will be sent to the partner system. Although it is no amount adjustment, it is still worth to let partner system to update the state of an open transaction.
- PlaceBetCancel
- PlaceBetCancel will only be sent when previous PlaceBet is failed due to timeout or partner system error. Partner system should refund the user if the transaction has been done in the partner system side.
For PlayerWin, PlayerLost & PlaceBetCancel request, SA will keep re-sending it until receiving proper response. If SA couldn’t receive proper response after 2 hours, SA will consider it as failed and move it to unsuccessful transaction list.
For re-sending the requests under unsuccessful transaction list, operator can either visit back office or using API 5.5.1 ResendTransaction.
General Case:
- Received GetUserBalance request: No balance adjustment is required, return error=0 with user’s current balance.
- Received PlaceBet request: Deduct the bet amount, return us error=0 with user’s current balance.
- Received PlayerWin request: Credit balance to user, return us error=0 with user’s current balance.
- Received PlayerLost request: No balance adjustment is required, return us error=0 with user’s current balance.
- Received PlaceBetCancel request: Refund the corresponding PlaceBet bet amount to user, return us error=0 with user’s current balance.
Special Case:
- Received PlaceBetCancel without corresponding PlaceBet request. No balance adjustment is required, return us error=0 with user’s current balance.
> We suggested to record “txn_reverse_id” in PlaceBetCancel request.
> If partner system receive the corresponding PlaceBet request later than PlaceBetCancel request , some incorrect operation requests might happen at partner system. To deal with this weird situation, we suggest partner system should setup a job to run periodically (e.g. every 15 minutes)
- Check all pending PlaceBetCancel request, compare its txn_reverse_id with all PlaceBet request’s txnid for past 15 minutes
- If corresponding PlaceBet request is found, partner system should refund the bet amount to player and finish both PlaceBet & PlaceBetCancel request at partner end
- If corresponding PlaceBet request is NOT found, partner system should finish this PlaceBetCancel request
Note: We suggest the regular check period in every 15 minutes, but it is configurable based on partner system needs.
- Received duplicate PlayerWin, PlayerLost or PlaceBetCancel request. No balance adjustment is required, return us error=0 with user’s current balance.
**All above Fund Transfer functions provide a unique transaction ID and partner system should only process once and only once, but must always respond. SA Gaming platform assumes that the partner system will handle duplicate transaction request properly and send back a success response ( error=0 ) for a request that had already been processed.
Operator should provide these five individual aspx, php, etc. to allow SA Gaming platform to call:
E.g.:
- /GetUserBalance.aspx
- /PlaceBet.aspx
- /PlayerWin.aspx
- /PlayerLost.aspx
- /PlaceBetCancel.aspx
** Operator can only use ONE type of extension, no multiple extension is allowed.
6.3.Seamless Wallet Protocol
SA Gaming platform will use HTTP POST request to communicate with the external wallet. All of the parameters will be encrypted and pass as a text value.
The following is an example of a request string that SA Gaming platform sends to external wallet before encryption:
1 |
username=satest¤cy=EUR |
6.3.1.Encryption procedures
We will use DES CBC encryption. The following are the example of DES Encrypt/Decrypt function:
ASP.Net version
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
protected byte[] EncryptKey = ASCIIEncoding.ASCII.GetBytes("ask_us_for_key"); public string DESEncrypt(string inString) { MemoryStream ms = new MemoryStream(); CryptoStream cs = new CryptoStream(ms, new DESCryptoServiceProvider().CreateEncryptor(EncryptKey, EncryptKey), CryptoStreamMode.Write); StreamWriter sw = new StreamWriter(cs); sw.Write(inString); sw.Flush(); cs.FlushFinalBlock(); sw.Flush(); return Convert.ToBase64String(ms.GetBuffer(), 0, (int)ms.Length); } public string DESDecrypt(string inString) { try { return new StreamReader(new CryptoStream(new MemoryStream( Convert.FromBase64String(inString)), new DESCryptoServiceProvider().CreateDecryptor(EncryptKey, EncryptKey), CryptoStreamMode.Read)).ReadToEnd(); } catch { } return ""; } |
PHP version
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<?php class DES { var $key; var $iv; function __construct( $key, $iv=0 ) { $this->key = $key; if( $iv == 0 ) { $this->iv = $key; } else { $this->iv = $iv; } } function encrypt($str) { return base64_encode( openssl_encrypt($str, 'DES-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv ) ); } function decrypt($str) { $str = openssl_decrypt(base64_decode($str), 'DES-CBC', $this->key, OPENSSL_RAW_DATA | OPENSSL_NO_PADDING, $this->iv); return rtrim($str, "x01..x1F"); } } ?> |
6.3.2.POST
After encrypted the request string, we will POST the encrypted string with urlencoded as plain text:
1 2 3 4 |
POST / HTTP/1.0 Content-Type: text/plain MDQGx7yYdmaqv8cOcA9dc4fDJocHtaTJnmz7TM4fNvE%3d |
Partner system have to urldecode and decrypt the string by the provided key and perform the requested function.
6.3.3.Response data
Partner system should respond the request in XML format:
1 2 3 4 5 6 7 |
<?xml version="1.0" encoding="utf-8"?> <RequestResponse> <username>satest</username> <currency>EUR</currency> <amount>1532.36</amount> <error>0</error> </RequestResponse> |
6.4.GetUserBalance
This request is sent to the partner system to retrieve the balance of a user.

Name | Description | Type and Limit | Required? |
---|---|---|---|
username | Username of the user | String (20) | Y |
currency | ISO 3 characters e.g. USD/EUR. Except mXBT | String (16) | Y |
E.g.
1 |
username=satest¤cy=EUR |
Name | Description | Type and Limit | Required? |
---|---|---|---|
username | Username of the user | String (20) | Y |
currency | ISO 3 characters e.g. USD/EUR. Except mXBT | String (16) | Y |
amount | Decimal format and max. 2 decimal places | Decimal | Y |
error | Error code | Int | Y |
6.5.Fund Transfer
SA Gaming platform makes different fund transfer request to partner system to modify the balance of the player, either to withdraw funds for a bet, or to deposit funds for a win.
6.5.1.PlaceBet
When a player makes a bet in a game, SA Gaming platform will send this request to partner system. This request must be responded within 3 seconds, otherwise it is defined as timeout and PlaceBetCancel will be sent to cancel/refund the unsuccessful bet.
Please noted:
1. Bets on Cow Cow Banker or Cow Cow Player will withhold 9 times of the bet amount
2. Bets on Pok Deng Player 1 to Player 5 will withhold 2 times of the bet amount
Name | Description | Type and Limit | Required? |
---|---|---|---|
username | Username of the user | String (20) | Y |
currency | ISO 3 characters e.g. USD | String (16) | Y |
amount | Amount to bet (decimal format and max. 2 decimal places) | Decimal | Y |
txnid | A unique id for all fund transfer | String (16) | Y |
timestamp | Timestamp in yyyy-MM-dd HH:mm:ss.fff (GMT +8) E.g. 2019-10-22 13:34:45.456 | DateTime | Y |
ip | IP of the user | String | Y |
gametype | Game type bac - Baccarat dtx - Dragon & Tiger sicbo - Sic Bo rot - Roulette pokdeng - Pok Deng | String | Y |
platform | 0 - desktop 1 - mobile | Byte | Y |
hostid | Host ID, please refer to Section 10. | Int | Y |
gameid | Game ID | String | Y |
betdetails | Bet details array type - Bet type amount - Bet amount | JSON | Y |
E.g. :
username=satest¤cy=EUR&amount=200.00&txnid=312355&gametype=bac&platform=0×tamp=2021-03-19 16:11:36.344&gameid=23547362930688&hostid=831&ip=121.122.123.124&betdetails={“details”:[{“type”:2,”amount”:100},{“type”:3,”amount”:100}]}
Response parameters:Name | Description | Type and Limit | Required? |
---|---|---|---|
username | Username of the user | String (20) | Y |
currency | ISO 3 characters e.g. USD. Except mXBT | String (16) | Y |
amount | Amount after adjustment (decimal format and max. 2 decimal places) | Decimal | Y |
error | Error code | Int | Y |

6.5.2.PlayerWin
When a game completed and the player win (even bet return when result is Tie in Baccarat) PlayerWin will send to partner system to adjust the balance of the player. This request will keep trying if partner system no response or respond error.

Name | Description | Type and Limit | Required? |
---|---|---|---|
username | Username of the user | String (20) | Y |
currency | ISO 3 characters e.g. USD | String (16) | Y |
amount | Amount to add back (decimal format and max. 2 decimal places) | Decimal | Y |
txnid | A unique id for all fund transfer | String (16) | Y |
timestamp | Timestamp in yyyy-MM-dd HH:mm:ss.fff (GMT +8) E.g. 2019-10-22 13:34:45.456 | DateTime | Y |
gametype | Game type bac - Baccarat dtx - Dragon & Tiger sicbo - Sic Bo rot - Roulette pokdeng - Pok Deng | String | Y |
Payouttime | Time of the payout | DateTime | Y |
hostid | Host ID, please refer to Section 10. | Int | Y |
gameid | Game ID | String | Y |
E.g. :
username=satest¤cy=EUR&amount=200.00&txnid=312360&gametype=bac&Payouttime=2021-03-19 16:13:31×tamp=2021-03-19 16:13:21.092&gameid=23547430039552&hostid=831
Response parameters:Name | Description | Type and Limit | Required? |
---|---|---|---|
username | Username of the user | String (20) | Y |
currency | ISO 3 characters e.g. USD. Except mXBT | String (16) | Y |
amount | Amount after adjustment (decimal format and max. 2 decimal places) | Decimal | Y |
error | Error code | Int | Y |
6.5.3.PlayerLost
When a game completed and the player lost. (no winning amount,) PlayerLost will be sent to the partner system. Since it is a loss so there is no amount parameter in the request. This request will keep trying if the partner system no response or responding error.
Parameters:Name | Description | Type and Limit | Required? |
---|---|---|---|
username | Username of the user | String (20) | Y |
currency | ISO 3 characters e.g. USD | String (3) | Y |
txnid | A unique id for all fund transfer | String (16) | Y |
timestamp | Timestamp in yyyy-MM-dd HH:mm:ss.fff (GMT +8) E.g. 2019-10-22 13:34:45.456 | DateTime | Y |
gametype | Game type bac - Baccarat dtx - Dragon & Tiger sicbo - Sic Bo rot - Roulette pokdeng - Pok Deng | String | Y |
Payouttime | Time of the payout | DateTime | Y |
hostid | Host ID, please refer to Section 10. | Int | Y |
gameid | Game ID | String | Y |
E.g. :
username=satest¤cy=EUR&txnid=312358&gametype=bac&Payouttime=2021-03-19 16:12:28×tamp=2021-03-19 16:12:18.531&gameid=23547362930688&hostid=831
Response parameters:Name | Description | Type and Limit | Required? |
---|---|---|---|
username | Username of the user | String (20) | Y |
currency | ISO 3 characters e.g. USD. Except mXBT | String (16) | Y |
amount | Amount after adjustment (decimal format and max. 2 decimal places) | Decimal | Y |
error | Error code | Int | Y |
6.5.4.PlaceBetCancel
If a PlaceBet request timeout or partner system responded an error, a PlaceBetCancel request will send to partner system. SA Gaming platform will treat it as bet failed and report to player that his bet has been failed. Partner system must handle this request once and only once and must respond to our platform. In case you cannot find previous transaction by the txn_reverse_id, you have to send us error = 0, else we will keep sending this request.
Parameters:Name | Description | Type and Limit | Required? |
---|---|---|---|
username | Username of the user | String (20) | Y |
currency | ISO 3 characters e.g. USD | String (16) | Y |
amount | Amount to add back (decimal format and max. 2 decimal places) | Decimal | Y |
txnid | A unique id for all fund transfer | String (16) | Y |
timestamp | Timestamp in yyyy-MM-dd HH:mm:ss.fff (GMT +8) E.g. 2019-10-22 13:34:45.456 | DateTime | Y |
gametype | Game type bac - Baccarat dtx - Dragon & Tiger sicbo - Sic Bo rot - Roulette pokdeng - Pok Deng | String | Y |
hostid | Host ID, please refer to Section 10. | Int | Y |
gameid | Game ID | String | Y |
txn_reverse_id | Previous txnid in PlaceBet request which the response was not received within 3 seconds or responded with an error. | String (16) | Y |
gamecancel | Brief reason for cancellation 1 - Cancellation due to dealer operation problems 0 - other reasons (For example: PlaceBet response timeout or respond with error) | Byte | Y |
E.g. :
username=satest¤cy=EUR&amount=100.00&txnid=312357&gametype=bac&txn_reverse_id=312356×tamp=2021-03-19 16:12:05.312&gameid=23547362930688&hostid=831&gamecancel=0
Response parameters:Name | Description | Type and Limit | Required? |
---|---|---|---|
username | Username of the user | String (20) | Y |
currency | ISO 3 characters e.g. USD. Except mXBT | String (16) | Y |
amount | Amount after adjustment (decimal format and max. 2 decimal places) | Decimal | Y |
error | Error code | Int | Y |

6.6.Error code list
Partner system should report to our platform with the following error codes:
ID | Description |
---|---|
0 | Success |
1000 | User account doesn’t exist |
1001 | Invalid currency |
1002 | Invalid amount |
1003 | Locked account |
1004 | Insufficient balance |
1005 | General error |
1006 | Decryption error |
1007 | Session expired error |
9999 | System error |
7.Error message code reference
Common error message code
ID | Description |
---|---|
100 | Username error |
101 | Account locked |
102 | Secret key incorrect |
104 | Service not available |
105 | Client side error |
106 | Server busy. Try again later. |
107 | Username empty |
108 | Username length/format incorrect |
110 | User not online |
111 | Query time range out of limitation |
112 | API recently called |
113 | Username duplicated |
114 | Currency not exist |
116 | Username does not exist |
120 | Amount must greater than zero |
121 | Not enough points to credit/debit/bet |
122 | Order ID already exists |
125 | Kick user fail |
127 | Invalid order ID format |
128 | Decryption error |
129 | System under maintenance |
130 | User account is locked (disabled) |
132 | Sign unmatch |
133 | Create user failed |
134 | Game code not found |
135 | Game access denied |
136 | Not enough point to bet |
137 | Bet string error |
138 | Bet time ended or not started |
142 | Parameter(s) error |
144 | Query type invalid |
145 | Parameter decimal point greater than 2 |
146 | API access denied |
147 | BetLimit does not existed |
148 | MaxBalance not zero or smaller than user balance |
149 | Input amount under minimum value |
150 | Function has been deprecated |
151 | Duplicate login |
152 | Transaction ID not found |
153 | The API does not exist |
154 | Trial Player Not Support |
8.Game Launching Procedures
8.1.Live Game
The Token is required for each login. Please construct a query string with the following parameters and using GET to send to Game Client Launching URL (e.g. xx.sa-api.net/app.aspx.)
Parameter | Description | Required? |
---|---|---|
username | The username display in the client | Y |
token | The token returned from LoginRequest | Y |
lobby | The lobby code we provided, it is to show the correct logo while loading | Y |
lang | Default language to be used in the client. Check in the table below for details | N |
returnurl | Optional parameter The URL will be invoked when the client logs out | N |
mobile | Optional parameter true - Start the client in HTML5 mobile version | N |
options | Optional parameters to enable feature while entering game lobby (URL Encoding will be needed)
Each parameter have to use comma to separate: options=defaulttable=830,hidelogo=1 | N |
Code | Description |
---|---|
en_US | English |
es | Spanish |
hi* | Hindi |
id | Bahasa Indonesia |
it | Italiano |
jp | Japanese |
ms | Malay |
th | Thai |
vn | Vietnamese |
zh_CN | Simplified Chinese |
zh_TW | Traditional Chinese |
*Currently only support h5 version. SA APP currently does not support
9.UserBetItem
UserBetItem is a complex structure for the details of a bet per different game type.
Name | Description | Type and Limit | Required? |
---|---|---|---|
BetID | Bet record Id | Int64 | Y |
BetTime | Bet time | DateTime | Y |
PayoutTime | Payout time | DateTime | Y |
GameID | Game ID | String | Y |
HostID | Host table ID | Int16 | Y |
HostName | Table name | String | Y |
GameType | Game type name. Click here for details | String | Y |
Detail | Reserved | String | N |
Set | Game set | Int | Y |
Round | Game round | Int | Y |
BetType | Bet item Baccarat Dragon Tiger Sicbo Roulette Pok Deng | Byte | Y |
BetAmount | Bet amount (correct to cent) | Decimal | Y |
Rolling | Rolling (correct to cent) | Decimal | Y |
GameResult | The result of the game (details in another table) Baccarat Dragon Tiger Sicbo Roulette Pok Deng | XML | Y |
ResultAmount | Win or Lost amount (correct to cent) | Decimal | Y |
Balance | Remain balances (correct to cent) | Decimal | Y |
Samples of each game type GameResult:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
<gameresult> <baccaratresult> <playercard1> <suit>1</suit> <rank>4</rank> </playercard1> <playercard2> <suit>3</suit> <rank>4</rank> </playercard2> <bankercard1> <suit>2</suit> <rank>2</rank> </bankercard1> <bankercard2> <suit>4</suit> <rank>12</rank> </bankercard2> <resultdetail> <brtie>false</brtie> <brplayerwin>true</brplayerwin> <brbankerwin>false</brbankerwin> <brplayerpair>true</brplayerpair> <brbankerpair>false</brbankerpair> <brsstie>false</brsstie> <brssplayerwin>true</brssplayerwin> <brssbankerwin>false</brssbankerwin> <brssplayerpair>true</brssplayerpair> <brssbankerpair>false</brssbankerpair> <brplayernatural>true</brplayernatural> <brbankernatural>false</brbankernatural> <brssplayernatural>true</brssplayernatural> <brssbankernatural>false</brssbankernatural> <brcowplayerwin>true</brcowplayerwin> <brcowbankerwin>false</brcowbankerwin> <brcowtie>false</brcowtie> <brcowplayerpair>true</brcowplayerpair> <brcowbankerpair>false</brcowbankerpair> <brcowplayernatural>true</brcowplayernatural> <brcowbankernatural>false</brcowbankernatural> </resultdetail> </baccaratresult> </gameresult> <gameresult> <dragontigerresult> <dragoncard> <suit>4</suit> <rank>4</rank> </dragoncard> <tigercard> <suit>2</suit> <rank>1</rank> </tigercard> <resultdetail> <dtrtie>false</dtrtie> <dtrdragonwin>true</dtrdragonwin> <dtrtigerwin>false</dtrtigerwin> </resultdetail> </dragontigerresult> </gameresult> <gameresult> <sicboresult> <dice1>1</dice1> <dice2>2</dice2> <dice3>6</dice3> <totalpoint>9</totalpoint> <resultdetail> <srbigsmall>2</srbigsmall> <sroddeven>1</sroddeven> <srtriplearmyone>true</srtriplearmyone> <srtriplearmytwo>true</srtriplearmytwo> <srtriplearmythree>false</srtriplearmythree> <srtriplearmyfour>false</srtriplearmyfour> <srtriplearmyfive>false</srtriplearmyfive> <srtriplearmysix>true</srtriplearmysix> <srtriple>0</srtriple> <sralltriple>false</sralltriple> <srpoint>9</srpoint> <srlongonetwo>true</srlongonetwo> <srlongonethree>false</srlongonethree> <srlongonefour>false</srlongonefour> <srlongonefive>false</srlongonefive> <srlongonesix>true</srlongonesix> <srlongtwothree>false</srlongtwothree> <srlongtwofour>false</srlongtwofour> <srlongtwofive>false</srlongtwofive> <srlongtwosix>true</srlongtwosix> <srlongthreefour>false</srlongthreefour> <srlongthreefive>false</srlongthreefive> <srlongthreesix>false</srlongthreesix> <srlongfourfive>false</srlongfourfive> <srlongfoursix>false</srlongfoursix> <srlongfivesix>false</srlongfivesix> <srshort>0</srshort> <sroddevencombination>2</sroddevencombination> <sr_1_2_3_4>false</sr_1_2_3_4> <sr_2_3_4_5>false</sr_2_3_4_5> <sr_2_3_5_6>false</sr_2_3_5_6> <sr_3_4_5_6>false</sr_3_4_5_6> <srcombination>31</srcombination> </resultdetail> </sicboresult> </gameresult> <gameresult> <rouletteresult> <point>13</point> <resultdetail> <rrzero>false</rrzero> <rrone>false</rrone> <rrtwo>false</rrtwo> <rrthree>false</rrthree> <rrfour>false</rrfour> <rrfive>false</rrfive> <rrsix>false</rrsix> <rrseven>false</rrseven> <rreight>false</rreight> <rrnine>false</rrnine> <rrten>false</rrten> <rreleven>false</rreleven> <rrtwelve>false</rrtwelve> <rrthirteen>true</rrthirteen> <rrforteen>false</rrforteen> <rrfifthteen>false</rrfifthteen> <rrsixteen>false</rrsixteen> <rrseventeen>false</rrseventeen> <rreighteen>false</rreighteen> <rrnineteen>false</rrnineteen> <rrtwenty>false</rrtwenty> <rrtwentyone>false</rrtwentyone> <rrtwentytwo>false</rrtwentytwo> <rrtwentythree>false</rrtwentythree> <rrtwentyfour>false</rrtwentyfour> <rrtwentyfive>false</rrtwentyfive> <rrtwentysix>false</rrtwentysix> <rrtwentyseven>false</rrtwentyseven> <rrtwentyeight>false</rrtwentyeight> <rrtwentynine>false</rrtwentynine> <rrthirty>false</rrthirty> <rrthirtyone>false</rrthirtyone> <rrthirtytwo>false</rrthirtytwo> <rrthirtythree>false</rrthirtythree> <rrthirtyfour>false</rrthirtyfour> <rrthirtyfive>false</rrthirtyfive> <rrthirtysix>false</rrthirtysix> <rrset1>false</rrset1> <rrset2>true</rrset2> <rrset3>false</rrset3> <rrrow1>true</rrrow1> <rrrow2>false</rrrow2> <rrrow3>false</rrrow3> <rr1to18>true</rr1to18> <rr19to36>false</rr19to36> <rrodd>true</rrodd> <rreven>false</rreven> <rrred>false</rrred> <rrblack>true</rrblack> </resultdetail> </rouletteresult> </gameresult> <gameresult> <pokdengresult> <player1card1> <suit>3</suit> <rank>2</rank> </player1card1> <player1card2> <suit>1</suit> <rank>8</rank> </player1card2> <player2card1> <suit>1</suit> <rank>7</rank> </player2card1> <player2card2> <suit>1</suit> <rank>3</rank> </player2card2> <player3card1> <suit>2</suit> <rank>13</rank> </player3card1> <player3card2> <suit>3</suit> <rank>13</rank> </player3card2> <player4card1> <suit>4</suit> <rank>11</rank> </player4card1> <player4card2> <suit>1</suit> <rank>9</rank> </player4card2> <player5card1> <suit>4</suit> <rank>2</rank> </player5card1> <player5card2> <suit>3</suit> <rank>1</rank> </player5card2> <bankercard1> <suit>1</suit> <rank>7</rank> </bankercard1> <bankercard2> <suit>3</suit> <rank>6</rank> </bankercard2> <resultdetail> <pdr_bankerpoint>4</pdr_bankerpoint> <pdr_bankerpair>false</pdr_bankerpair> <pdr_player1point>1</pdr_player1point> <pdr_player1result>2</pdr_player1result> <pdr_player1pair>false</pdr_player1pair> <pdr_player2point>9</pdr_player2point> <pdr_player2result>1</pdr_player2result> <pdr_player2pair>false</pdr_player2pair> <pdr_player3point>11</pdr_player3point> <pdr_player3result>1</pdr_player3result> <pdr_player3pair>true</pdr_player3pair> <pdr_player4point>15</pdr_player4point> <pdr_player4result>1</pdr_player4result> <pdr_player4pair>false</pdr_player4pair> <pdr_player5point>4</pdr_player5point> <pdr_player5result>3</pdr_player5result> <pdr_player5pair>false</pdr_player5pair> </resultdetail> </pokdengresult> </gameresult> |
9.1.GameType
Code name | Description |
---|---|
bac | Baccarat |
dtx | Dragon Tiger |
sicbo | Sic Bo |
rot | Roulette |
pokdeng | Pok Deng |
9.2.Baccarat
All baccarat type games share the same structure of section 9.2: GameResult, CardDetail, BetType and ResultDetail of Baccarat.
(Baccarat, Squeeze Baccarat, Speed Baccarat)
9.2.1.GameResult of Baccarat
Name | Description | Type |
---|---|---|
PlayerCard1 | CardDetail | Structure |
PlayerCard2 | CardDetail | Structure |
PlayerCard3 | CardDetail (may not exist) | Structure |
BankerCard1 | CardDetail | Structure |
BankerCard2 | CardDetail | Structure |
BankerCard3 | CardDetail (may not exist) | Structure |
ResultDetail | Details of the result | Structure |
9.2.2.CardDetail of Baccarat
Name | Description | Type |
---|---|---|
Suit | ♠ = 1 ♥ = 2 ♣ = 3 ♦ = 4 | Byte |
Rank | A = 1 2 = 2 … 10 = 10 J = 11 Q = 12 K = 13 | Byte |
9.2.3.BetType for Baccarat
ID | Description |
---|---|
0 | Tie |
1 | Player |
2 | Banker |
3 | Player Pair |
4 | Banker Pair |
25 | NC. Tie |
26 | NC. Player |
27 | NC. Banker |
28 | NC. Player Pair |
29 | NC. Banker Pair |
36 | Player Natural |
37 | Banker Natural |
40 | NC. Player Natural |
41 | NC. Banker Natural |
42 | Cow Cow Player |
43 | Cow Cow Banker |
44 | Cow Cow Tie |
53 | NC. LuckySix |
54 | LuckySix |
9.2.4.ResultDetail for Baccarat
Name | Description | Type and Limit |
---|---|---|
BRTie | Tie | Bool |
BRPlayerWin | Player | Bool |
BRBankerWin | Banker | Bool |
BRPlayerPair | Player Pair | Bool |
BRBankerPair | Banker Pair | Bool |
BRSLuckySix | Lucky Six | Bool |
BRSSTie | NC. Tie | Bool |
BRSSPlayerWin | NC. Player | Bool |
BRSSBankerWin | NC. Bander | Bool |
BRSSPlayerPair | NC. Player Pair | Bool |
BRSSBankerPair | NC. Banker Pair | Bool |
BRSSSLuckySix | NC. Lucky Six | Bool |
BRPlayerNatural | Player Natural | Bool |
BRBankerNatural | Banker Natural | Bool |
BRSSPlayerNatural | NC. Player Natural | Bool |
BRSSBankerNatural | NC. Banker Natural | Bool |
BRCowPlayerWin | Cow Cow Player | Bool |
BRCowBankerWin | Cow Cow Banker | Bool |
BRCowTie | Cow Cow Tie | Bool |
9.3.Dragon & Tiger
9.3.1.GameResult of Dragon Tiger
Name | Description | Type and Limit |
---|---|---|
DragonCard | CardDetail | Structure |
TigerCard | CardDetail | Structure |
ResultDetail | Details of the result | Structure |
9.3.2.BetType for Dragon Tiger
ID | Description |
---|---|
0 | Tie |
1 | Dragon |
2 | Tiger |
9.3.3.ResultDetail for Dragon Tiger
Name | Description | Type and Limit |
---|---|---|
DTRTie | Tie game | Bool |
DTRDragonWin | Dragon win | Bool |
DTRTigerWin | Tiger win | Bool |
9.4.Sic Bo
9.4.1.GameResult of Sic Bo
Name | Description | Type and Limit |
---|---|---|
Dice 1 | Dice 1 | Int |
Dice 2 | Dice 2 | Int |
Dice 3 | Dice 3 | Int |
ResultDetail | Details of the result | Structure |
9.4.2.BetType for Sic Bo
ID | Description | ID | Description |
---|---|---|---|
0 | Small | 55 | Three Even |
1 | Big | 56 | 1 2 3 4 |
2 | Odd | 57 | 2 3 4 5 |
3 | Even | 58 | 2 3 5 6 |
4 | Number 1 | 59 | 3 4 5 6 |
5 | Number 2 | 60 | 112 |
6 | Number 3 | 61 | 113 |
7 | Number 4 | 62 | 114 |
8 | Number 5 | 63 | 115 |
9 | Number 6 | 64 | 116 |
10 | All 1 | 65 | 221 |
11 | All 2 | 66 | 223 |
12 | All 3 | 67 | 224 |
13 | All 4 | 68 | 225 |
14 | All 5 | 69 | 226 |
15 | All 6 | 70 | 331 |
16 | All same | 71 | 332 |
17 | Point 4 | 72 | 334 |
18 | Point 5 | 73 | 335 |
19 | Point 6 | 74 | 336 |
20 | Point 7 | 75 | 441 |
21 | Point 8 | 76 | 442 |
22 | Point 9 | 77 | 443 |
23 | Point 10 | 78 | 445 |
24 | Point 11 | 79 | 446 |
25 | Point 12 | 80 | 551 |
26 | Point 13 | 81 | 552 |
27 | Point 14 | 82 | 553 |
28 | Point 15 | 83 | 554 |
29 | Point 16 | 84 | 556 |
30 | Point 17 | 85 | 661 |
31 | Specific double 1, 2 | 86 | 662 |
32 | Specific double 1, 3 | 87 | 663 |
33 | Specific double 1, 4 | 88 | 664 |
34 | Specific double 1, 5 | 89 | 665 |
35 | Specific double 1, 6 | 90 | 126 |
36 | Specific double 2, 3 | 91 | 135 |
37 | Specific double 2, 4 | 92 | 234 |
38 | Specific double 2, 5 | 93 | 256 |
39 | Specific double 2, 6 | 94 | 346 |
40 | Specific double 3, 4 | 95 | 123 |
41 | Specific double 3, 5 | 96 | 136 |
42 | Specific double 3, 6 | 97 | 145 |
43 | Specific double 4, 5 | 98 | 235 |
44 | Specific double 4, 6 | 99 | 356 |
45 | Specific double 5, 6 | 100 | 124 |
46 | Pair 1 | 101 | 146 |
47 | Pair 2 | 102 | 236 |
48 | Pair 3 | 103 | 245 |
49 | Pair 4 | 104 | 456 |
50 | Pair 5 | 105 | 125 |
51 | Pair 6 | 106 | 134 |
52 | Three Odd | 107 | 156 |
53 | Two Odd One Even | 108 | 246 |
54 | Two Even One Odd | 109 | 345 |
9.4.3.ResultDetail for Sic Bo
Name | Description | Type and Limit |
---|---|---|
SRBigSmall | 0 - Triple 1 - Big 2 - Small | Byte |
SROddEven | 0 - Triple 1 - Odd 2 - Even | Byte |
SRTripleArmyOne | Triple army 1 | Bool |
SRTripleArmyTwo | Triple army 2 | Bool |
SRTripleArmyThree | Triple army 3 | Bool |
SRTripleArmyFour | Triple army 4 | Bool |
SRTripleArmyFive | Triple army 5 | Bool |
SRTripleArmySix | Triple army 6 | Bool |
SRTriple | 0 - NA 1 - Triple 1 2 - Triple 2 3 - Triple 3 4 - Triple 4 5 - Triple 5 6 - Triple 6 | Byte |
SRAllTriple | All triple | Bool |
SRPoint | 0 - NA 4 - Point 4 5 - Point 5 6 - Point 6 7 - Point 7 8 - Point 8 9 - Point 9 10 - Point 10 11 - Point 11 12 - Point 12 13 - Point 13 14 - Point 14 15 - Point 15 16 - Point 16 17 - Point 17 | Byte |
SRLongOneTwo | Long 1 2 | Bool |
SRLongOneThree | Long 1 3 | Bool |
SRLongOneFour | Long 1 4 | Bool |
SRLongOneFive | Long 1 5 | Bool |
SRLongOneSix | Long 1 6 | Bool |
SRLongTwoThree | Long 2 3 | Bool |
SRLongTwoFour | Long 2 4 | Bool |
SRLongTwoFive | Long 2 5 | Bool |
SRLongTwoSix | Long 2 6 | Bool |
SRLongThreeFour | Long 3 4 | Bool |
SRLongThreeFive | Long 3 5 | Bool |
SRLongThreeSix | Long 3 6 | Bool |
SRLongFourFive | Long 4 5 | Bool |
SRLongFourSix | Long 4 6 | Bool |
SRLongFiveSix | Long 5 6 | Bool |
SRShort | 0 - NA 1 - Short 1 2 - Short 2 3 - Short 3 4 - Short 4 5 - Short 5 6 - Short 6 | Byte |
SROddEvenCombination | 0 - Three Odd 1 - Two Odd One Even 2 - Two Even One Odd 3 - Three Even | Byte |
SR_1_2_3_4 | 1 2 3 4 | Bool |
SR_2_3_4_5 | 2 3 4 5 | Bool |
SR_2_3_5_6 | 2 3 5 6 | Bool |
SR_3_4_5_6 | 3 4 5 6 | Bool |
SRCombination | 0 - NA 1 - 112 2 - 113 3 - 114 4 - 115 5 - 116 6 - 221 7 - 223 8 - 224 9 - 225 10 - 226 11 - 331 12 - 332 13 - 334 14 - 335 15 - 336 16 - 441 17 - 442 18 - 443 19 - 445 20 - 446 21 - 551 22 - 552 23 - 553 24 - 554 25 - 556 26 - 661 27 - 662 28 - 663 29 - 664 30 - 665 31 - 126 32 - 135 33 - 234 34 - 256 35 - 346 36 - 123 37 - 136 38 - 145 39 - 235 40 - 356 41 - 124 42 - 146 43 - 236 44 - 245 45 - 456 46 - 125 47 - 134 48 - 156 49 - 246 50 - 345 | Byte |
9.5.Roulette
9.5.1.GameResult of Roulette
Name | Description | Type and Limit |
---|---|---|
Point | 0 to 36 | Int |
ResultDetail | Details of the result | Structure |
9.5.2.BetType for Roulette
ID | Description | ID | Description |
---|---|---|---|
0~36 | 0~36 | 97 | 0,1,2 |
37 | 0,1 | 98 | 0,2,3 |
38 | 0,2 | 99 | 1,2,3 |
39 | 0,3 | 100 | 4,5,6 |
40 | 1,2 | 101 | 7,8,9 |
41 | 1,4 | 102 | 10,11,12 |
42 | 2,3 | 103 | 13,14,15 |
43 | 2,5 | 104 | 16,17,18 |
44 | 3,6 | 105 | 19,20,21 |
45 | 4,5 | 106 | 22,23,24 |
46 | 4,7 | 107 | 25,26,27 |
47 | 5,6 | 108 | 28,29,30 |
48 | 5,8 | 109 | 31,32,33 |
49 | 6,9 | 110 | 34,35,36 |
50 | 7,8 | 111 | 1,2,4,5 |
51 | 7,10 | 112 | 2,3,5,6 |
52 | 8,9 | 113 | 4,5,7,8 |
53 | 8,11 | 114 | 5,6,8,9 |
54 | 9,12 | 115 | 7,8,10,11 |
55 | 10,11 | 116 | 8,9,11,12 |
56 | 10,13 | 117 | 10,11,13,14 |
57 | 11,12 | 118 | 11,12,14,15 |
58 | 11,14 | 119 | 13,14,16,17 |
59 | 12,15 | 120 | 14,15,17,18 |
60 | 13,14 | 121 | 16,17,19,20 |
61 | 13,16 | 122 | 17,18,20,21 |
62 | 14,15 | 123 | 19,20,22,23 |
63 | 14,17 | 124 | 20,21,23,24 |
64 | 15,18 | 125 | 22,23,25,26 |
65 | 16,17 | 126 | 23,24,26,27 |
66 | 16,19 | 127 | 25,26,28,29 |
67 | 17,18 | 128 | 26,27,29,30 |
68 | 17,20 | 129 | 28,29,31,32 |
69 | 18,21 | 130 | 29,30,32,33 |
70 | 19,20 | 131 | 31,32,34,35 |
71 | 19,22 | 132 | 32,33,35,36 |
72 | 20,21 | 133 | 1,2,3,4,5,6 |
73 | 20,23 | 134 | 4,5,6,7,8,9 |
74 | 21,24 | 135 | 7,8,9,10,11,12 |
75 | 22,23 | 136 | 10,11,12,13,14,15 |
76 | 22,25 | 137 | 13,14,15,16,17,18 |
77 | 23,24 | 138 | 16,17,18,19,20,21 |
78 | 23,26 | 139 | 19,20,21,22,23,24 |
79 | 24,27 | 140 | 22,23,24,25,26,27 |
80 | 25,26 | 141 | 25,26,27,28,29,30 |
81 | 25,28 | 142 | 28,29,30,31,32,33 |
82 | 26,27 | 143 | 31,32,33,34,35,36 |
83 | 26,29 | 144 | 1st 12 (1~12) |
84 | 27,30 | 145 | 2nd 12 (13~24) |
85 | 28.29 | 146 | 3rd 12 (25~36) |
86 | 28,31 | 147 | 1st Row |
87 | 29,30 | 148 | 2nd Row |
88 | 29,32 | 149 | 3rd Row |
89 | 30,33 | 150 | 1~18 (Small) |
90 | 31,32 | 151 | 19~36 (Big) |
91 | 31,34 | 152 | Odd |
92 | 32,33 | 153 | Even |
93 | 32,35 | 154 | Red |
94 | 33,36 | 155 | Black |
95 | 34,35 | 156 | 0,1,2,3 |
96 | 35,36 |
9.5.3.ResultDetail for Roulette
Name | Description | Type and Limit |
---|---|---|
RRZero | 0 | Bool |
RROne | 1 | Bool |
RRTwo | 2 | Bool |
RRThree | 3 | Bool |
RRFour | 4 | Bool |
RRFive | 5 | Bool |
RRSix | 6 | Bool |
RRSeven | 7 | Bool |
RREight | 8 | Bool |
RRNine | 9 | Bool |
RRTen | 10 | Bool |
RREleven | 11 | Bool |
RRTwelve | 12 | Bool |
RRThirteen | 13 | Bool |
RRForteen | 14 | Bool |
RRFifthteen | 15 | Bool |
RRSixteen | 16 | Bool |
RRSeventeen | 17 | Bool |
RREighteen | 18 | Bool |
RRNineteen | 19 | Bool |
RRTwenty | 20 | Bool |
RRTwentyOne | 21 | Bool |
RRTwentyTwo | 22 | Bool |
RRTwentyThree | 23 | Bool |
RRTwentyFour | 24 | Bool |
RRTwentyFive | 25 | Bool |
RRTwentySix | 26 | Bool |
RRTwentySeven | 27 | Bool |
RRTwentyEight | 28 | Bool |
RRTwentyNine | 29 | Bool |
RRThirty | 30 | Bool |
RRThirtyOne | 31 | Bool |
RRThirtyTwo | 32 | Bool |
RRThirtyThree | 33 | Bool |
RRThirtyFour | 34 | Bool |
RRThirtyFive | 35 | Bool |
RRThirtySix | 36 | Bool |
RRSet1 | 1st 12 (1~12) | Bool |
RRSet2 | 2nd 12 (13~24) | Bool |
RRSet3 | 3rd 12 (25~36) | Bool |
RRRow1 | 1st Row | Bool |
RRRow2 | 2nd Row | Bool |
RRRow3 | 3rd Row | Bool |
RR1To18 | Small | Bool |
RR19To36 | Big | Bool |
RROdd | Odd | Bool |
RREven | Even | Bool |
RRRed | Red | Bool |
RRBlack | Black | Bool |
9.6.Pok Deng
9.6.1.GameResult of Pok Deng
Name | Description | Type and Limit |
---|---|---|
Player1Card1 | CardDetail | Structure |
Player1Card2 | CardDetail | Structure |
Player2Card1 | CardDetail | Structure |
Player2Card2 | CardDetail | Structure |
Player3Card1 | CardDetail | Structure |
Player3Card2 | CardDetail | Structure |
Player4Card1 | CardDetail | Structure |
Player4Card2 | CardDetail | Structure |
Player5Card1 | CardDetail | Structure |
Player5Card2 | CardDetail | Structure |
BankerCard1 | CardDetail | Structure |
BankerCard2 | CardDetail | Structure |
9.6.2.BetType for Pok Deng
ID | Description |
---|---|
0 | Player 1 |
1 | Player 2 |
2 | Player 3 |
3 | Player 4 |
4 | Player 5 |
5 | Player 1 Pair |
6 | Player 2 Pair |
7 | Player 3 Pair |
8 | Player 4 Pair |
9 | Player 5 Pair |
9.6.3.ResultDetail for Pok Deng
Name | Description | Type and Limit |
---|---|---|
PDR_BankerPoint | Banker total point | Byte |
PDR_BankerPair | Banker pair | Bool |
PDR_Player1Point | Player 1 total point | Byte |
PDR_Player1Result | Player 1 result state | Byte |
PDR_Player1Pair | Player 1 pair | Bool |
PDR_Player2Point | Player 2 total point | Byte |
PDR_Player2Result | Player 2 result state | Byte |
PDR_Player2Pair | Player 2 pair | Bool |
PDR_Player3Point | Player 3 total point | Byte |
DR_Player3Result | Player 3 result state | Byte |
PDR_Player3Pair | Player 3 pair | Bool |
PDR_Player4Point | Player 4 total point | Byte |
DR_Player4Result | Player 4 result state | Byte |
PDR_Player4Pair | Player 4 pair | Bool |
PDR_Player5Point | Player 5 total point | Byte |
DR_Player5Result | Player 5 result state | Byte |
PDR_Player5Pair | Player 5 pair | Bool |
9.6.4.Result state for Pok Deng
ID | Description |
---|---|
0 | No Result |
1 | Player Win |
2 | Banker Win |
3 | Tie |
9.6.5.Total point for Pok Deng
ID | Description |
---|---|
0 | No Result |
1 | Total point 0 |
2 | Total point 1 |
3 | Total point 2 |
4 | Total point 3 |
5 | Total point 4 |
6 | Total point 5 |
7 | Total point 6 |
8 | Total point 7 |
9 | Total point 7.1 |
10 | Total point 7.2 |
11 | Total point 7.3 |
12 | Total point 7.4 |
13 | Total point 7.5 |
14 | Total point 8 |
15 | Total point 9 |
10.Host ID to Game mapping
ID | Game |
---|---|
830 | E - Roulette |
831 | Baccarat E01 |
832 | Baccarat E02 |
833 | Baccarat E03 |
834 | Baccarat E04 |
835 | Baccarat E05 |
836 | Baccarat E06 |
837 | Baccarat E07 |
838 | Baccarat E08 |
839 | Speed Baccarat E09 |
841 | Speed Baccarat E10 |
842 | E - Sic Bo |
843 | E - Dragon Tiger |
844 | Speed Baccarat E11 |
845 | Speed Baccarat E12 |
846 | E - Pok Deng |
11.Supported currencies
The following is the list of currencies we supported. Please notice that currency has to be enabled in your api account before you can use it, you may contact our CS for queries.
Currency ISO name | Currency |
---|---|
AED | Emirati Dirham |
ARS | Argentina Peso |
AUD | Australian Dollar |
BDT | Bangladeshi Taka |
BND | Bruneian Dollar |
BRL | Brazilian Real |
CAD | Canadian Dollar |
CHF | Swiss Franc |
CLP | Chilean Peso |
DKK | Danish Krone |
EUR | Euro |
GBP | British Pound |
HUF | Hungarian Forint |
IDR* | Indonesian Rupiah |
INR | Indian Rupee |
JPY | Japanese yen |
KHR* | Cambodian Riel |
KZT | Kazakhstani Tenge |
LKR | Sri Lankan Rupee |
MMK* | Burmese Kyat |
MXN | Mexican Peso |
MYR | Malaysian Ringgit |
mXBT | milli Bitcoin |
NGN | Nigerian Naira |
NOK | Norwegian Krone |
NZD | New Zealand Dollar |
PEN | Peruvian Nuevo Sol |
PHP | Philippine peso |
PLN | Polish Zloty |
RUB | Russian Ruble |
SEK | Swedish Krone |
SGD | Singapore Dollar |
THB | Thai Baht |
TND | Tunisian Dinar |
TRY | Turkish Lira |
TWD | Taiwan New Dollar |
UAH | Ukrainian Hryvnia |
USD | US Dollar |
USDT | Tether |
VND* | Vietnamese Dong |
ZAR | South Africa Rand |
In our system, currency with * is divided by 1000 from real-world currency.