technical guide - documentation · 2019. 10. 18. · roulette bet limit. 2019/03/04 3.0.6 baccarat...

79
TECHNICAL GUIDE Web Service API Version 3.0.8 The information presented herein this document is Confidential Information of SA Gaming created and owned by SA Gaming and is also protected by copyright and applicable laws. Unauthorised use, copying, transmission and disclosure of such information to any person is strictly prohibited without SA Gaming’s prior written consent. In the absence of any specific agreement to the contrary, reverse engineering, recompilation and disassembly are prohibited in any event as to any information or software content/materials provided by SA Gaming. While all efforts have been made to ensure that the content of this document is accurate at the time of publication, the data upon which this document is based is subject to future change at the sole and discretion of SA Gaming. Updated version of this document will be released when necessary, resources permitting.

Upload: others

Post on 29-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE Web Service API

Version 3.0.8 The information presented herein this document is Confidential Information of SA Gaming created and owned by SA Gaming and is also protected by copyright and applicable laws. Unauthorised use, copying, transmission and disclosure of such information to any person is strictly prohibited without SA Gaming’s prior written consent. In the absence of any specific agreement to the contrary, reverse engineering, recompilation and disassembly are prohibited in any event as to any information or software content/materials provided by SA Gaming. While all efforts have been made to ensure that the content of this document is accurate at the time of publication, the data upon which this document is based is subject to future change at the sole and discretion of SA Gaming. Updated version of this document will be released when necessary, resources permitting.

Page 2: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Content  1. Introduction 5

2. Version 5

3. API Calling Restriction Information 5 Accuracy of point value 6

4. Encryption Procedures 6 Encryption Requirements 6 Encryption Procedures 8 Example to call API 8 Error handling 9

5. Web service interface 10 User Account Manipulation 10

RegUserInfo 10 VerifyUsername 11 GetUserStatusDV 12 QueryBetLimit 14 SetBetLimit 15 GetUserMaxBalance 16 SetUserMaxBalance 17 SetUserMaxWinning 17

Login Access 18 LoginRequest 18 LoginRequestForFun 19 KickUser 20

Bet Records Query 21 GetAllBetDetailsDV 21

BetDetail structure 22 GetAllBetDetailsForTimeIntervalDV 24 GetAllBetDetailsFor30secondsDV 25 GetUserBetItemDV 26 GetUserBetAmountDV 28 GetUserWinLost 29 GetTransactionDetails 30

Transfer Wallet 31 DebitBalanceDV 31 DebitAllBalanceDV 33

Copyright © SA Gaming 2019 All right reserved 2/79

Page 3: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

CreditBalanceDV 34 CheckOrderId 35

6. Seamless Wallet Integration 36 Introduction 36 Workflow 36 Seamless Wallet Protocol 37

Encryption procedures 37 ASP.Net version 37 PHP version 38

POST 39 Response data 39

GetUserBalance 39 Fund Transfer 41

PlaceBet 41 PlayerWin 44 PlayerLost 46 PlaceBetCancel 47

Error code list 50

7. Error message code reference 50

8. Game Launching Procedures 53

9. UserBetItem 54 GameType 55 Baccarat 55

GameResult of Baccarat 55 CardDetail 56 BetType for Baccarat 56 ResultDetail for Baccarat 57

Dragon Tiger 58 GameResult of Dragon Tiger 58 BetType for Dragon Tiger 58 ResultDetail for Dragon Tiger 58

Sic Bo 60 GameResult of Sic Bo 60 BetType for Sic Bo 60 ResultDetail for Sic Bo 62

Fan Tan 66 GameResult of Fan Tan 66

Copyright © SA Gaming 2019 All right reserved 3/79

Page 4: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

BetType for Fan Tan 66 ResultDetail for Fan Tan 67

Roulette 68 GameResult of Roulette 69 BetType for Roulette 69 ResultDetail for Roulette 71

Money Wheel 74 GameResult of Money Wheel 74 BetType for Money Wheel 74 ResultDetail for Roulette 75

Tips 76 GameResult for Tips 76 BetType for Money Wheel 76 ResultDetails for Tips 76

10. Host ID to Game mapping 76

11. Supported currencies 77

 

   

Copyright © SA Gaming 2019 All right reserved 4/79

Page 5: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

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.5 ● Adjust the naming of different Integer (8/16/32/64bit). ● Change LoginRequest's GameURL to include all

necessary parameters, no need to append unless you need to customize it.

● NEW API: SetUserMaxWinning: A function to limit the player's maximum winning amount per day.

● NEW PARAMETERS: "MaxWinning" and “MaxBalance” were added to GetUserStatusDV's response.

● Added Gametype parameter in SetBetLimit to set Roulette bet limit.

2019/03/04

3.0.6 ● Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use defaulttable to enter those tables, you have to change the table ID.

2019/04/15

3.0.7 ● Add new game type: Money Wheel and Tips 2019/07/10

3.0.8 ● Added a new parameter in GetUserStatusDV response to indicate how much amount the system has been holding for playing certain games.

2019/10/14

3. API Calling Restriction Information 

The following APIs have calling restriction.

Name of API Frequency of calls

Copyright © SA Gaming 2019 All right reserved 5/79

Page 6: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

GetAllBetDetailsDV Every 5 minutes no more than 10 calls

GetAllBetDetailsFor30secondsDV Every 30 seconds no more than 2 calls

GetAllBetDetailsForTimeIntervalDV Every 5 minutes no more than 10 calls

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 Procedures 

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:

1. Secret Key 2. EncrypKey 3. MD5Key 4. API url 5. Client loader 6. Lobby name (supplied during startup the client)

Example DES Encrypt function: 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);

}

DES Encrypt function in PHP

Copyright © SA Gaming 2019 All right reserved 6/79

Page 7: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

<?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 <?php

$str =

"method=GetUserStatus&Key=01234567789ABCDEF0123456789ABCDE&Time=20150101012345&Username=abcd

12345"; // 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: 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 in PHP <?php

$str =

"method=GetUserStatus&Key=01234567789ABCDEF0123456789ABCDE&Time=20150101012345&Username=abcd

12345"; // for example

$md5key = "abcdefg"; // for example

$Time = "20150101012345"; // for example

$SecretKey = "01234567789ABCDEF0123456789ABCDE"; // for example

Copyright © SA Gaming 2019 All right reserved 7/79

Page 8: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

$PreMD5Str = $str . $md5key . $Time . $SecretKey;

$OutMD5 = md5($PreMD5str);

echo "md5:[ $OutMD5 ]";

?>

4.2 Encryption Procedures 

1. Construct a Query String (QS) with required parameters (including the web service

method name itself (e.g. method=RegUserInfo)

2. DES encrypt the Query String with the supplied EncryptKey and obtain the encrypted

query string (q)

3. Build a MD5 hash according to (QS) and other parameters to form a signature (s)

4. Use HTTP POST request to call the web service.

5. Obtain the resulting XML response.

4.3 Example to call API 

Let’s take RegUserInfo as an example:

Encryption required parameters:

method (String, “RegUserInfo”)

Key (String, the Secret Key)

Time (DateTime, Current Time, in yyyyMMddHHmmss format)

Username (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): QS =

“method=RegUserInfo&Key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&Time=20140101123456&U

sername=DemoUser001”;

q = HttpUtility.UrlEncode( DESencrypt(QS) );

Copyright © SA Gaming 2019 All right reserved 8/79

Page 9: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

For example, q = 'j4tjorjwarfj3trwise0safrwg2wt4awari0fwjfeoh'

Example MD5 String for building the signature (QS + md5key + Time + Key): 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://<api-domain>/api/api.aspx Output: <?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 

When we received the q and s, if it is decrypted with error or the md5 is not match, a generic error response will be output.

ErrorMsgId 128 for decryption error. ErrorMsgId 132 for md5 sign unmatch. <?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>

 

Copyright © SA Gaming 2019 All right reserved 9/79

Page 10: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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.

Parameters:

Copyright © SA Gaming 2019 All right reserved 10/79

Page 11: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Name 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: CNY USD Refer to 11. Supported currencies

String (4) Y

Result:

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 detail String Y

5.1.2 VerifyUsername 

Check if a username is already existing in database of a lobby.

Parameters:

Name Description Type and Limit Required?

method must be “VerifyUsername” String (32) Y

Key secret key String (32) Y

Time current time in DateTime Y

Copyright © SA Gaming 2019 All right reserved 11/79

Page 12: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

“yyyyMMddHHmmss” format

Username User name String (20) Y

Result:

Name Description Type and Limit Required?

IsExist User exist? True: user existing False: user not existing

Bool Y

Username User name String Y

ErrorMsgId Error message: 0: Success 108: Username length/format incorrect

Byte Y

ErrorMsg Error message detail String Y

Output:

<?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

Parameters:

Name Description Type and Limit Required?

Copyright © SA Gaming 2019 All right reserved 12/79

Page 13: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

method must be “GetUserStatusDV” String (32) Y

Key secret key String (32) Y

Time current time in “yyyyMMddHHmmss” format

DateTime Y

Username User name String (20) Y

Result:

Name Description Type and Limit Required?

IsSuccess Success? True: Success False: Failed

Bool Y

Username User name String Y

Balance Active balance, excluding betted amount. Correct to cent.

Decimal Y

Online online? Bool Y

Betted betted? Bool Y

BettedAmount Total betted amount Decimal Y

MaxBalance Upper limit in user's balance to place bet Decimal Y

MaxWinning Daily winning limitation to allow place bet Decimal Y

WithholdAmount Amount withhold in the system from the 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

Output:

<?xml version="1.0" encoding="utf-8"?>

<GetUserStatusResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema"

Copyright © SA Gaming 2019 All right reserved 13/79

Page 14: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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>

</GetUserStatusResponse>

5.1.4 QueryBetLimit 

Query all of the bet limit for specified currency.

Parameters:

Name 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: CNY USD Refer to 11. Supported currencies

String (4) Y

Result:

Name Description Type and Limit

Required?

BetLimitList

<BetLimitList> <BetLimit> <RuleID>1</RuleID> <Min>5</Min> <Max>500</Max> </BetLimit>

Structure Y

Copyright © SA Gaming 2019 All right reserved 14/79

Page 15: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

<BetLimit> <RuleID>2</RuleID> <Min>100</Min> <Max>5000</Max> </BetLimit> </BetLimitList>

ErrorMsgId Error message: 0: Success 114: Currency not exist

Byte Y

ErrorMsg Error message detail String Y

5.1.5 SetBetLimit 

Set a maximum 5 sets of bet limit to a user.

Parameters:

Name 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 User name String (20) Y

Currency Currency: CNY USD Refer to 11. Supported currencies

String (4) 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, otherwise Int64 N

Copyright © SA Gaming 2019 All right reserved 15/79

Page 16: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

no need this parameter or empty

Result:

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.

Parameters:

Name 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 User name String (20) Y

Result:

Name Description Type and Limit Required?

MaxBalance Maximum balance Decimal Y

ErrorMsgId Error message Byte Y

Copyright © SA Gaming 2019 All right reserved 16/79

Page 17: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

0: Success 100: Username error 108: Username length/format incorrect 116: Username does not exist

ErrorMsg Error message detail String Y

5.1.7 SetUserMaxBalance 

Set the maximum balance limit to a user.

Parameters:

Name 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 User name String (20) Y

MaxBalance Maximum balance Decimal Y

Result:

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. Parameters:

Copyright © SA Gaming 2019 All right reserved 17/79

Page 18: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Name 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 User name String (20) Y

MaxWinning Maximum daily winning Decimal Y

Result:

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.

Parameters:

Name 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

Copyright © SA Gaming 2019 All right reserved 18/79

Page 19: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

CurrencyType Currency: CNY USD Refer to 11. Supported currencies

String (4) Y

Result:

Name Description Type and Limit Required?

Token Token for login# 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

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 @XX. The DisplayName will be the actual username in our database. You must provide this DisplayName to later login to our server!

Output:

<?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>”cstest@cs”</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.

Parameters:

Copyright © SA Gaming 2019 All right reserved 19/79

Page 20: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Name 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 ISO Currency ID String (4) Y

Result:

Name Description Type and Limit Required?

Token Token for login# String Y

DisplayName* Internal assigned username String (31) Y

ErrorMsgId Error message 0: Success 129: System under maintenance

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 @XX. The DisplayName will be the actual username in our database. You must provide this DisplayName to later login to our server!

Output:

<?xml version="1.0" encoding="utf-8"?>

<LoginRequestForFun xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<DisplayName>sa-test1@xx</DisplayName>

<Token>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</Token>

<ErrorMsgId>0</ErrorMsgId>

<ErrorMsg>Success</ErrorMsg>

</LoginRequestForFun>

5.2.3 KickUser 

Copyright © SA Gaming 2019 All right reserved

20/79

Page 21: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Kick user to offline.

Parameters:

Name 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

Result:

Name Description Type and Limit Required?

ErrorMsgId Error message 0: Success 102: Secret key incorrect 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

Output:

<?xml version="1.0" encoding="utf-8"?>

<KickUserResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ErrorMsgId>0</ErrorMsgId>

<ErrorMsg>Success</ErrorMsg>

</KickUserResponse>

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

Copyright © SA Gaming 2019 All right reserved 21/79

Page 22: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

should be made to this API 5 times per 5 minutes otherwise it will throw an error. Parameters:

Name 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 (optional)

User name String (20) N

Date (optional) Date for details “yyyy-MM-dd”

Date N

Result:

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 128: Decryption error 142: Parameter(s) error

Byte Y

ErrorMsg Error message detail String Y

BetDetail structure 

Name Description Type and Limit Required?

BetTime Bet start time Date Time Y

PayoutTime Payout Time DateTime Y

Copyright © SA Gaming 2019 All right reserved 22/79

Page 23: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Username Player name String(31) Y

HostID Host table ID (0 for Multiplayer game) Int16 Y

Detail Reserved String N

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 String Y

BetType Live game: Bet type of different games Int Y

BetSource

2 / 2114 /2640

Web

3 / 2115 /2641

Multibet in Web

16 / 600/ 8792/8793

HTML5 Mobile Web

1160/1161/5248/5249

iOS app

1288/1289/5379/5377

Android app

Int Y

TransactionID Seamless wallet PlaceBet transaction ID. -1 if not using seamless wallet

Int64 Y

State Is the bet success or failed? Bool Y

Copyright © SA Gaming 2019 All right reserved 23/79

Page 24: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Output:

<?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>2014-01-01T00:00:00</BetTime>

<PayoutTime>2014-01-01T00:01:12</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>

<TransactionID>-1</TransactionID>

<State>true</State>

</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 5 times per 5 minutes otherwise it will throw an error.

Parameters:

Name 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

Copyright © SA Gaming 2019 All right reserved 24/79

Page 25: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

(optional)

FromTime Date for details “yyyy-MM-dd hh:mm:ss”

DateTime Y

ToTime Date for details “yyyy-MM-dd hh:mm:ss”

DateTime Y

Result:

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

5.3.3 GetAllBetDetailsFor30secondsDV 

This web service will fetch bet details of a lobby for last 30 seconds. The frequency of the call should be made to this API 2 times per 30 seconds otherwise it will throw an error.

Parameters:

Name Description Type and Limit Required?

method must be “GetAllBetDetailsFor30secondsDV” String (32) Y

Key secret key String (32) Y

Time current time in “yyyyMMddHHmmss” format DateTime Y

Result:

Name Description Type and Limit Required?

BetDetailList Bet details structure XML Y

Copyright © SA Gaming 2019 All right reserved 25/79

Page 26: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

ErrorMsgId Error message 0: Success 108: Username length/format incorrect 112: API recently called

Byte Y

ErrorMsg Error message detail String Y

5.3.4 GetUserBetItemDV 

Retrieve a list of bet record of a user within 7 days.

Parameters:

Name 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 User name String (20) Y

FromTime Query start time: 2013-11-01 or 2013-11-01 03:02:45

DateTime Y

ToTime Query end time DateTime Y

Offset Query offset id. First query input 0. For the next query, using the offset from result

Int64 Y

Result:

Name Description Type and Limit Required?

Username User name String Y

FromTime Query start time DateTime Y

ToTime Query end time DateTime Y

Copyright © SA Gaming 2019 All right reserved 26/79

Page 27: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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 User betted item detail list 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:

<?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>2014-01-01 00:00:00</FromTime>

<ToTime>2014-02-01 23:59:59</ToTime>

<Offset>0</Offset>

<More>false</More>

<ItemCount>2</ItemCount>

<UserBetItemList>

<UserBetItem>

<BetID>1</BetID>

<BetTime>2014-04-24T11:20:49</BetTime>

<GameID>135450624</GameID>

<HostID>301</HostID>

<HostName>百家樂1</HostName>

<GameType>bac</GameType>

<Set>1</Set>

<Round>2</Round>

<BetType>2</BetType>

<BetAmount>5</BetAmount>

<Rolling>5</Rolling>

<GameResult>

<BaccaratResult>

<PlayerCard1>

<Suit>2</Suit>

<Rank>3</Rank>

</PlayerCard1>

<PlayerCard2>

<Suit>4</Suit>

<Rank>J</Rank>

</PlayerCard2>

<BankerCard1>

<Suit>1</Suit>

<Rank>9</Rank>

</BankerCard1>

<BankerCard2>

Copyright © SA Gaming 2019 All right reserved 27/79

Page 28: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

<Suit>3</Suit>

<Rank>K</Rank>

</BankerCard2>

<ResultDetail>

<BRTie>false</BRTie>

<BRPlayerWin>false</BRPlayerWin>

<BRBankerWin>true</BRBankerWin>

<BRPlayerPair>true</BRPlayerPair>

<BRBankerPair>false</BRBankerPair>

<BRSuperSix>false</BRSuperSix>

</ResultDetail>

</BaccaratResult>

</GameResult>

<ResultAmount>0</ResultAmount>

<Balance>0</Balance>

<State>true</State>

</UserBetItem>

<UserBetItem>

<BetID>3</BetID>

<BetTime>2014-04-24T11:23:00</BetTime>

<GameID>269668352</GameID>

<HostID>301</HostID>

<HostName>百家樂1</HostName>

<GameType>bac</GameType>

<Set>1</Set>

<Round>4</Round>

<BetType>2</BetType>

<BetAmount>5</BetAmount>

<Rolling>5</Rolling>

<GameResult>

<BaccaratResult />

</GameResult>

<ResultAmount>0</ResultAmount>

<Balance>0</Balance>

<State>true</State>

</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.

Parameters:

Name Description Type and Limit Required?

method must be “GetUserBetAmounDV” String (32) Y

Key secret key String (32) Y

Time current time in “yyyyMMddHHmmss” format

DateTime Y

Username User name String (20) N

Copyright © SA Gaming 2019 All right reserved 28/79

Page 29: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

StartDate Start time (default current date) DateTime N

TimeRange Range in hour from 0 to 23 (default 0 = 24 hours)

Int N

Result: A series of follow records will return.

Name Description Type and Limit

Required?

Username user name String (31) 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

Byte Y

ErrorMsg Error message detail String Y

Output:

<?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.

Parameters:

Name Description Type and Limit Required?

Copyright © SA Gaming 2019 All right reserved 29/79

Page 30: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

method must be “GetUserWinLost ” String (32) Y

Key secret key String (32) Y

Time current time in “yyyyMMddHHmmss” format

DateTime Y

Username User name String (20) Y

FromTime Start date and time DateTime Y

ToTime End of date and time DateTime Y

Type 0 - includes win and loss 1 - only includes win 2 - only includes loss

Int N

Result:

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.

Parameters:

Name Description Type and Limit Required?

method must be “GetTransactionDetails ” String (32) Y

Copyright © SA Gaming 2019 All right reserved 30/79

Page 31: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Key secret key String (32) Y

Time current time in “yyyyMMddHHmmss” format

DateTime Y

Username (optional)

User name String (20) N

FromTime Start date and time DateTime Y

ToTime End of date and time DateTime Y

Result:

Name Description Type and Limit Required?

Count Number of transactions Integer 32bit Y

Winlost Win/lose Decimal Y

TotalBet Total bet amount Decimal Y

TotalRolling Total rolling amount Decimal 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

  

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 be processed twice. Using a new OrderID for the same transfer may cause the duplicated transfer. Even you have checked the OrderID not existing by using CheckOrderID, you should still use the same OrderID.

5.5.1 DebitBalanceDV 

Transfer from the user’s balance.

Copyright © SA Gaming 2019 All right reserved 31/79

Page 32: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Parameters:

Name 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 User name Alphanumeric (5~20 characters)

String (20) Y

OrderId Order ID: OUT+YYYYMMDDHHMMSS+Username e.g. “OUT20131129130345peter1235”

String (40) Y

DebitAmount Debit amount. Maximum two decimal only.

Decimal Y

Result:

Name Description Type and Limit

Required?

Username User name 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

Copyright © SA Gaming 2019 All right reserved 32/79

Page 33: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

ErrorMsg Error message detail String Y

5.5.2 DebitAllBalanceDV 

Transfer all amount from the user’s balance.

Parameters:

Name 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 User name String (20) Y

OrderId Order ID: OUT+YYYYMMDDHHMMSS+Username e.g. “OUT20131129130345peter1235”

String (40) Y

Result:

Name Description Type and Limit Required?

Username User name 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. 108: Username length/format incorrect 116: Username does not exist 122: Order ID already exists

Byte Y

Copyright © SA Gaming 2019 All right reserved 33/79

Page 34: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

124: Database error 127: Invalid order ID format

ErrorMsg Error message detail String Y

 

5.5.3 CreditBalanceDV 

Transfer fund to user’s balance.

Parameters:

Name 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 User name String (20) Y

OrderId Order ID: IN+YYYYMMDDHHMMSS+Username e.g. “IN20131129130345peter1235”

String (40) Y

CreditAmount Credit amount. Decimal Y

Result:

Name Description Type and Limit

Required?

Username User name String Y

Balance Remained active balance Decimal Y

CreditAmount Credited amount. Decimal Y

OrderId Order ID String (40) Y

ErrorMsgId Error message 0: Success 106: Server not ready. Try again later.

Byte Y

Copyright © SA Gaming 2019 All right reserved 34/79

Page 35: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

ErrorMsg Error message detail String Y

5.5.4 CheckOrderId 

Check the OrderId that generated in DebitBalanceDV/DebitAllBalanceDV/CreditBalanceDV is existing or not in our system.

Parameters:

Name 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 ● DebitBalanceDV ● DebitAllBalanceDV ● CreditBalanceDV

String (40) Y

Result:

Name Description Type and Limit Required?

isExist The OrderId exist or not ● true - existing ● false - not existing

Bool Y

ErrorMsgId Error message 0: Success 106: Server not ready. Try again later. 124: Database error

Byte Y

Copyright © SA Gaming 2019 All right reserved 35/79

Page 36: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

ErrorMsg Error message detail String Y

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 CreditBalance/DebitBalance/DebitAllBalance 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:

1. GetUserBalance 2. 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:

1. 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.

2. PlayerWin When a bet placed before is winning, the total amount (including stakes) will send to partner system. If there are timeout or error, the request will be retried after n seconds within m tries. An expired request will move to the unsuccessful transaction list for back office to further process. Those unsuccessful transactions can be retired by the operator through the back office.

3. 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. If there are timeout or error, the request will be retried after n seconds within m tries. An expired request will move to the unsuccessful transaction list for back office to further process. Those unsuccessful transactions can be retry by the operator through the back office.

4. 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

Copyright © SA Gaming 2019 All right reserved 36/79

Page 37: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

done in the partner system side. If there are timeout or error, the request will be retried after n seconds within m tries. An expired request will move to the unsuccessful transaction list for back office to further process. Those unsuccessful transactions can be retry by the operator through the back office.

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 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 and /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:

username=peter1234&currency=CNY

6.3.1 Encryption procedures 

We will use DES CBC encryption. The following are the example of DES Encrypt/Decrypt function:

ASP.Net version 

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),

Copyright © SA Gaming 2019 All right reserved 37/79

Page 38: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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 

DES Encrypt/Decrypt function in PHP <?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" );

}

function pkcs5Pad ($text, $blocksize) {

$pad = $blocksize - (strlen ( $text ) % $blocksize);

return $text . str_repeat ( chr ( $pad ), $pad );

Copyright © SA Gaming 2019 All right reserved 38/79

Page 39: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

}

}

?>

6.3.2 POST 

After encrypted the request string, we will POST the encrypted string with urlencoded as plain text:

POST / HTTP/1.0

Content-Type: text/plain

kuVJgHRMSXOT7a7enWsOyki0NTSd7tTraFXJ%2F7xui4V5nWyik20DSurYFWlkzdMGMhbbqkrO5A2o

SUpPWXyrW1yFWFCOdU1GasqDd3WtnWv6htNdXqGw3uIcj%2Bc%2BYUDP2IQIVNL1hQrpytFPyIJisb

Eobll66Wb2IodCT%2Bqq3iDsQeu%2FVd2%2Bb7%2FZjExJOlGisn264ogMCoDsw5ya%2Bo9RDOOLZ6

RS2WHxI99nIOvmkPccx1wGWhT0%2Fw%3D%3D

Partner system have to url decode 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:

<?xml version="1.0" encoding="utf-8"?>

<RequestResponse>

<username>peter1234</username>

<currency>CNY</currency>

<amount >1532.36</amount >

<error>0</error>

</RequestResponse>

6.4 GetUserBalance 

This request is send to the partner system to retrieve the balance of a user.

Copyright © SA Gaming 2019 All right reserved 39/79

Page 40: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Input parameters:

Name Description Type and Limit

Required?

username Username of the user String (20) Y

currency ISO 3 characters e.g. CNY/USD. Except mXBT String (4) Y

E.g.

username=peter1234&currency=CNY

Response parameters:

Name Description Type and Limit

Required?

username Username of the user String (20) Y

currency ISO 3 characters e.g. CNY/USD. Except mXBT String (4) Y

amount Decimal format and max. 2 decimal places Decimal Y

error Error code Int Y

Copyright © SA Gaming 2019 All right reserved 40/79

Page 41: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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.

Name Description Type and Limit

Required?

username Username of the user String (20) Y

currency ISO 3 characters e.g. CNY/USD String (4) 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

gametype Game type bac - Baccarat dtx - Dragon & Tiger sicbo - Sic Bo rot - Roulette ftan - Fan Tan moneywheel - Money Wheel tip - Tips minigame - Mini Game

String Y

platform 0 - desktop 1 - mobile

Byte Y

gamecode When gametype is “minigame”, it is the game code

String N

hostid Host ID, please refer to Section 10. Int N

gameid Game ID String Y

E.g.

Copyright © SA Gaming 2019 All right reserved 41/79

Page 42: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

username=peter1234&currency=CNY&amount=10.00&txnid=843828123434&gametype=bac&g

ameid=133849980

Response parameters:

Name Description Type and Limit

Required?

username Username of the user String (20) Y

currency ISO 3 characters e.g. CNY/USD. Except mXBT String (4) Y

amount Amount after adjustment (decimal format and max. 2 decimal places)

Decimal Y

error Error code Int Y

Copyright © SA Gaming 2019 All right reserved 42/79

Page 43: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Copyright © SA Gaming 2019 All right reserved 43/79

Page 44: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

6.5.2 PlayerWin 

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

Copyright © SA Gaming 2019 All right reserved 44/79

Page 45: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Name Description Type and Limit

Required?

username Username of the user String (20) Y

currency ISO 3 characters e.g. CNY/USD String (4) 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

gametype Game type bac - Baccarat dtx - Dragon & Tiger sicbo - Sic Bo rot - Roulette ftan - Fan Tan moneywheel - Money Wheel minigame - Mini Game

String Y

gamecode When gametype is “minigame”, it is the game code

String N

Payouttime Time of the payout DateTime Y

hostid Host ID, please refer to Section 10. Int N

gameid Game ID String Y

E.g.

username=peter1234&currency=CNY&amount=20.00&txnid=843828125323&gametype=bac&g

ameid=133849980&hostid=123

Response parameters:

Name Description Type and Limit

Required?

username Username of the user String (20) Y

currency ISO 3 characters e.g. CNY/USD. Except mXBT String (4) Y

amount Amount after adjustment (decimal format and max. 2 decimal places)

Decimal Y

Copyright © SA Gaming 2019 All right reserved 45/79

Page 46: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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.

Name Description Type and Limit

Required?

username Username of the user String (20) Y

currency ISO 3 characters e.g. CNY/USD String (4) Y

txnid A unique id for all fund transfer String (16) Y

gametype Game type bac - Baccarat dtx - Dragon & Tiger sicbo - Sic Bo rot - Roulette ftan - Fan Tan moneywheel - Money Wheel tip - Tips minigame - Mini Game

String Y

gamecode When gametype is “minigame”, it is the game code

String N

Payouttime Time of the payout DateTime Y

hostid Host ID, please refer to Section 10. Int N

gameid Game ID String Y

E.g.

username=peter1234&currency=CNY&txnid=8438234356625&gametype=bac&gameid=133849

980

Response parameters:

Copyright © SA Gaming 2019 All right reserved 46/79

Page 47: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Name Description Type and Limit

Required?

username Username of the user String (20) Y

currency ISO 3 characters e.g. CNY/USD. Except mXBT String (4) 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 the 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 the previous transaction by the txn_reverse_id, you have to send us error = 0, else we will keep sending this request.

Name Description Type and Limit

Required?

username Username of the user String (20) Y

currency ISO 3 characters e.g. CNY/USD String (4) Y

amount Amount to reverse (decimal format and max. 2 decimal places)

Decimal Y

txnid A unique id for all fund transfer String (16) Y

gametype Game type bac - Baccarat dtx - Dragon & Tiger sicbo - Sic Bo rot - Roulette ftan - Fan Tan moneywheel - Money Wheel tip - Tips minigame - Mini Game

String Y

gamecode When gametype is “minigame”, it is the game code

String N

Copyright © SA Gaming 2019 All right reserved 47/79

Page 48: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

hostid Host ID, please refer to Section 10. Int N

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

E.g.

username=peter1234&currency=CNY&amount=20.00&txnid=4345234534534&gametype=bac&

gameid=133849980&txn_reverse_id=843828123434

Response parameters:

Name Description Type and Limit

Required?

username Username of the user String (20) Y

currency ISO 3 characters e.g. CNY/USD. Except mXBT String (4) Y

amount Amount after adjustment (decimal format and max. 2 decimal places)

Decimal Y

error Error code Int Y

Copyright © SA Gaming 2019 All right reserved 48/79

Page 49: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Copyright © SA Gaming 2019 All right reserved 49/79

Page 50: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

Copyright © SA Gaming 2019 All right reserved 50/79

Page 51: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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)

131 Wrong network

132 Sign unmatch

133 Create user failed

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

Copyright © SA Gaming 2019 All right reserved 51/79

Page 52: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

Copyright © SA Gaming 2019 All right reserved 52/79

Page 53: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

8. Game Launching Procedures 

The Token is required for each login. Please construct a query string with the following parameters and using GET to send to app.aspx (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 client logout.

N

mobile Optional parameter. true - Start the client in HTML5 mobile version.

N

h5web Optional parameter: true - Start the client in HTML5 desktop version. It will ignore “h5web” parameter if both h5web and mobile is true.

N

options Optional parameters to enable feature while entering lobby (URL Encoding will be needed)

1. defaulttable=<table_id> ○ To go into table directly

(601~616/630~632/640/660) ○ To go into multiple bet view (multibet)

Each parameter have to use comma to separate: options=defaulttable=612

N

For example: http://xx.sa-api.net/app.aspx?username=demo888&token=e93a9aeb9981da12b3&lobby=A999&lang=en_US&returnurl=http://yourdomain.com/yourlocation

Copyright © SA Gaming 2019 All right reserved 53/79

Page 54: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

lang Description

zh_TW Traditional Chinese

zh_CN Simplified Chinese

en_US English

jp Japanese

th Thai

vn Vietnamese

id Bahasa Indonesia

ms Malay

es Spanish

9. UserBetItem 

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 (0 for Multiplayer game) Int16 Y

HostName Host table name String Y

GameType Game type name (see below) String Y

Detail String N

Set Set Int Y

Round Round Int Y

BetType Bet item (details in other table) Baccarat Dragon Tiger

Byte Y

Copyright © SA Gaming 2019 All right reserved 54/79

Page 55: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Roulette Sicbo Fantan

BetAmount Bet amount (correct to cent) Decimal Y

Rolling Rolling (correct to cent) Decimal Y

GameResult Result of the game (details in other table) Baccarat Dragon Tiger Roulette Sicbo Fantan

String Y

ResultAmount Win or Lost amount (correct to cent) Decimal Y

Balance Remain balances (correct to cent) Decimal Y

GameType 

Code name Description

bac Baccarat

dtx Dragon Tiger

sicbo Sic Bo

ftan Fan Tan

rot Roulette

moneywheel Money Wheel

tip Tips

minigame Mini game

Baccarat 

GameResult of Baccarat 

Name Description Type and Limit

PlayerCard1 CardDetail Structure

Copyright © SA Gaming 2019 All right reserved 55/79

Page 56: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

CardDetail 

Suit ♠ = 1 ♥ = 2 ♣ = 3 ♦ = 4 Byte

Rank A = 1 2 = 2 … 10 = 10 J = 11 Q = 12 K = 13

Byte

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

Copyright © SA Gaming 2019 All right reserved 56/79

Page 57: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

29 NC. Banker Pair

30 SuperSix

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

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

BRSSTie NC. Tie Bool

BRSSPlayerWin NC. Player Bool

BRSSBankerWin NC. Bander Bool

BRSSPlayerPair NC. Player Pair Bool

BRSSBankerPair NC. Banker Pair Bool

BRSSSuperSix SuperSix Bool

BRPlayerNatural Player Natural Bool

BRBankerNatural Banker Natural Bool

Copyright © SA Gaming 2019 All right reserved 57/79

Page 58: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

Dragon Tiger 

GameResult of Dragon Tiger 

Name Description Type and Limit

DragonCard CardDetail Structure

TigerCard CardDetail Structure

ResultDetail Details of the result Structure

BetType for Dragon Tiger 

ID Description

0 Tie

1 Dragon

2 Tiger

ResultDetail for Dragon Tiger 

Name Description Type and Limit

DTRTie Tie game Bool

DTRDragonWin Dragon win Bool

DTRTigerWin Tiger win Bool

Copyright © SA Gaming 2019 All right reserved 58/79

Page 59: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Copyright © SA Gaming 2019 All right reserved 59/79

Page 60: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Sic Bo 

GameResult of Sic Bo 

Name Description Type and Limit

Dice1 Dice 1 Int

Dice2 Dice 2 Int

Dice3 Dice 3 Int

ResultDetail Details of the result Structure

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

Copyright © SA Gaming 2019 All right reserved 60/79

Page 61: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

Copyright © SA Gaming 2019 All right reserved 61/79

Page 62: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

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

Copyright © SA Gaming 2019 All right reserved 62/79

Page 63: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

Copyright © SA Gaming 2019 All right reserved 63/79

Page 64: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

Byte

Copyright © SA Gaming 2019 All right reserved 64/79

Page 65: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

Copyright © SA Gaming 2019 All right reserved 65/79

Page 66: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Fan Tan 

GameResult of Fan Tan 

Name Description Type and Limit

Point Remain buttons count: 1, 2, 3 or 4 Int

ResultDetail Details of the result Structure

BetType for Fan Tan 

ID Description ID Description

0 Odd 21 4 Nim 3

1 Even 22 12 Kwok

2 1 Zheng 23 14 Kwok

3 2 Zheng 24 23 Kwok

4 3 Zheng 25 34 Kwok

5 4 Zheng 26 1 Tong 23

6 1 Fan 27 1 Tong 24

7 2 Fan 28 1 Tong 34

8 3 Fan 29 2 Tong 13

9 4 Fan 30 2 Tong 14

10 1 Nim 2 31 2 Tong 34

11 1 Nim 3 32 3 Tong 12

12 1 Nim 4 33 3 Tong 14

13 2 Nim 1 34 3 Tong 24

14 2 Nim 3 35 4 Tong 12

15 2 Nim 4 36 4 Tong 13

16 3 Nim 1 37 4 Tong 23

Copyright © SA Gaming 2019 All right reserved 66/79

Page 67: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

17 3 Nim 2 38 123 Chun

18 3 Nim 4 39 124 Chun

19 4 Nim 1 40 134 Chun

20 4 Nim 2 41 234 Chun

ResultDetail for Fan Tan 

Name Description Type and Limit

FTROdd Odd Bool

FTREven Even Bool

FTRZhengOne 1 Zheng Bool

FTRZhengTwo 2 Zheng Bool

FTRZhengThree 3 Zheng Bool

FTRZhengFour 4 Zheng Bool

FTRFanOne 1 Fan Bool

FTRFanTwo 2 Fan Bool

FTRFanThree 3 Fan Bool

FTRFanFour 4 Fan Bool

FTROneNimTwo 1 Nim 2 Bool

FTROneNimThree 1 Nim 3 Bool

FTROneNimFour 1 Nim 4 Bool

FTRTwoNimOne 2 Nim 1 Bool

FTRTwoNimThree 2 Nim 3 Bool

FTRTwoNimFour 2 Nim 4 Bool

FTRThreeNimOne 3 Nim 1 Bool

FTRThreeNimTwo 3 Nim 2 Bool

FTRThreeNimFour 3 Nim 4 Bool

Copyright © SA Gaming 2019 All right reserved 67/79

Page 68: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

FTRFourNimOne 4 Nim 1 Bool

FTRFourNimTwo 4 Nim 2 Bool

FTRFourNimThree 4 Nim 3 Bool

FTRKwokOneTwo 12 Kwok Bool

FTRKwokOneFour 14 Kwok Bool

FTRKwokTwoThree 23 Kwok Bool

FTRKwokThreeFour 34 Kwok Bool

FTROneTongTwoThree 23 Tong 1 Bool

FTROneTongTwoFour 24 Tong 1 Bool

FTROneTongThreeFour 34 Tong 1 Bool

FTRTwoTongOneThree 13 Tong 2 Bool

FTRTwoTongOneFour 14 Tong 2 Bool

FTRTwoTongThreeFour 34 Tong 2 Bool

FTRThreeTongOneTwo 12 Tong 3 Bool

FTRThreeTongOneFour 14 Tong 3 Bool

FTRThreeTongTwoFour 24 Tong 3 Bool

FTRFourTongOneTwo 12 Tong 4 Bool

FTRFourTongOneThree 13 Tong 4 Bool

FTRFourTongTwoThree 23 Tong 4 Bool

FTRChunOneTwoThree 123 Chun Bool

FTRChunOneTwoFour 124 Chun Bool

FTRChunOneThreeFour 134 Chun Bool

FTRChunTwoThreeFour 234 Chun Bool

Roulette 

Copyright © SA Gaming 2019 All right reserved 68/79

Page 69: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

GameResult of Roulette 

Name Description Type and Limit

Point 0 to 36 Int

ResultDetail Details of the result Structure

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,121

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

Copyright © SA Gaming 2019 All right reserved 69/79

Page 70: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

Copyright © SA Gaming 2019 All right reserved 70/79

Page 71: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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 (1~34)

87 29,30 148 2nd Row (2~35)

88 29,32 149 3rd Row (3~36)

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

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

Copyright © SA Gaming 2019 All right reserved 71/79

Page 72: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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

Copyright © SA Gaming 2019 All right reserved 72/79

Page 73: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

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 (1~34) Bool

RRRow2 2nd Row (2~35) Bool

RRRow3 3rd Row (3~36) Bool

RR1To18 Small Bool

RR19To36 Big Bool

RROdd Odd Bool

RREven Even Bool

RRRed Red Bool

RRBlack Black Bool

Copyright © SA Gaming 2019 All right reserved 73/79

Page 74: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

Money Wheel 

GameResult of Money Wheel 

Name Description Type and Limit

Main

0 1

1 2

2 9

3 16

4 24

5 SA-Gold (50)

6 SA-Black (50)

Int

Side

7 Fish

8 Prawn

9 Crab

10 Coin

11 Gourd

12 Rooster

Int

ResultDetail Details of the result Structure

BetType for Money Wheel 

ID Description

0 1

Copyright © SA Gaming 2019 All right reserved 74/79

Page 75: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

1 2

2 9

3 16

4 24

5 50 Gold

6 50 Black

7 Fish

8 Prawn

9 Crab

10 Coin

11 Gourd

12 Rooster

ResultDetail for Roulette 

Name Description Type and Limit

MWRMain1 1 Bool

MWRMain2 2 Bool

MWRMain3 9 Bool

MWRMain4 16 Bool

MWRMain5 24 Bool

MWRMain6 50 Gold Bool

MWRMain7 50 Black Bool

MWRSide1 Fish Bool

MWRSide2 Prawn Bool

Copyright © SA Gaming 2019 All right reserved 75/79

Page 76: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

MWRSide3 Crab Bool

MWRSide4 Coin Bool

MWRSide5 Gourd Bool

MWRSide6 Rooster Bool

Tips 

GameResult for Tips 

There is no GameResult for Tips.

BetType for Money Wheel 

ID Description

254 Tips

ResultDetails for Tips 

There is no ResultDetials for Tips.

 

10. Host ID to Game mapping 

 

ID Game

402 Mini game

601 Baccarat 1

602 Baccarat 2

603 Baccarat 3

604 Baccarat 4

605 Baccarat 5

Copyright © SA Gaming 2019 All right reserved 76/79

Page 77: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

606 Baccarat 6

607 Baccarat 7

608 Baccarat 8

609 Baccarat 9

610 Baccarat 10

619 Baccarat 11

620 Baccarat 12

621 (remove on 7/22) Baccarat 13

611 (remove on 4/15) Baccarat 11

612 (remove on 4/15) Baccarat 12

613 Baccarat 13

614 Baccarat 14

615 Baccarat 15

616 Baccarat 16

630 Roulette

631 Sic Bo

632 Fan Tan

640 Dragon & Tiger

660 Money Wheel

 

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

Copyright © SA Gaming 2019 All right reserved 77/79

Page 78: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

CNY Chinese yen

USD US Dollar

EUR Euro

JPY Japanese yen

VND* Vietnamese Dong

AUD Australian Dollar

TWD Taiwan New Dollar

MYR Malaysian Ringgit

IDR* Indonesian Rupiah

SGD Singapore Dollar

GBP British Pound

THB Thai Baht

TRY Turkish Lira

UAH Ukrainian Hryvnia

mXBT milli Bitcoin

BND Bruneian Dollar

CAD Canadian Dollar

MMK* Burmese Kyat

NOK Norwegian Krone

SEK Swedish Krone

ZAR South Africa Rand

BDT Bangladeshi Taka

LKR Sri Lankan Rupee

INR Indian Rupee

RUB Russian Ruble

PLN Polish Zloty

Copyright © SA Gaming 2019 All right reserved 78/79

Page 79: TECHNICAL GUIDE - Documentation · 2019. 10. 18. · Roulette bet limit. 2019/03/04 3.0.6 Baccarat table ID 611, 612 and 613 will change to 619, 620 and 621. If you use d e fa u l

TECHNICAL GUIDE

AED Emirati Dirham

KHR* Cambodian Riel

BRL Brazilian Real

In our system, currency with * is divided by 1000 from real world currency.

Copyright © SA Gaming 2019 All right reserved 79/79