Baccarat
API Documentation
Connection Information
To connect to the API, the following information must be issued:
agent_id
: Common agent ID used for API connection.agent_pass
: Password for admin use.agent_key
: Key value used for API connection.API_URL
: Common API connection address.ADMIN_URL
: Address for administrator access.seamless_url
: Callback address for receiving callback data (provided by the agent).update_url
: Callback address for receiving result changes, etc. (provided by the agent).
API Request Format
API requests use the HTTP Protocol (GET
, POST
). The format is as follows:
HTTP://API_URL/method_url?agent_id=xxx&time=xx&data=xxxx&key=xxx
Protocol
:GET
.method_url
: Command URL for API requests.agent_id
: Issued agent ID.time
: Time of API request (Unix Timestamp, 10 digits).data
: Information to be requested, encoded in Base64.key
: MD5 key value ofagent_id + time + api_key + data (Base64 encoded)
, case insensitive.
Data Request Structure
The data
parameter is structured as:
name1=value1&name2=value2&name3=value3
This must be encoded in Base64.
Example:
Base64(name1=value1&name2=value2&name3=value3)
Common API Sample Data
Agent Info
agent_id
:test
api_key
:12345678901234567890123456789012
account_init
Item
Description
Request Data
user_id=2710t001¤cy=KRW
BASE64 Encoding
dXNlcl9pZD0yNzEwdDAwMSZjdXJyZW5jeT1LUlc=
String for MD5
test171026797668612345678901234567890123456789012dXNlcl9pZD0yNzEwdDAwMSZjdXJyZW5jeT1LUlc=
MD5
29babd5b3fe8d1c8b9c467ed2409b690
Final Request Data
http://stage.dwclub6789.com:9000/api/v2/account_init?agent_id=test&time=1710267976686&data=dXNlcl9pZD0yNzEwdDAwMSZjdXJyZW5jeT1LUlc=key=29babd5b3fe8d1c8b9c467ed2409b690
Result
{ "result_code": 0 }
game_lobby
Item
Description
Request Data
user_id=2710t001¤cy=KRW&language=KO&home_url=https://www.dwclub888.com&bet_n_max=1000000&bet_n_min=10000&bet_t_max=125000&bet_t_min=1000&bet_r_max=90000&bet_r_min=1000
BASE64 Encoding
dXNlcl9pZD0yNzEwdDAwMSZjdXJyZW5jeT1LUlcmbGFuZ3VhZ2U9S08maG9tZV91cmw9aHR0cHM6Ly93d3cuZHdjbHViODg4LmNvbSZiZXRfbl9tYXg9MTAwMDAwMCZiZXRfbl9taW49MTAwMDAmYmV0X3RfbWF4PTEyNTAwMCZiZXRfdF9taW49MTAwMCZiZXRfcl9tYXg9OTAwMDAmYmV0X3JfbWluPTEwMDA=
String for MD5
test171026845922512345678901234567890123456789012dXNlcl9pZD0yNzEwdDAwMSZjdXJyZW5jeT1LUlcmbGFuZ3VhZ2U9S08maG9tZV91cmw9aHR0cHM6Ly93d3cuZHdjbHViODg4LmNvbSZiZXRfbl9tYXg9MTAwMDAwMCZiZXRfbl9taW49MTAwMDAmYmV0X3RfbWF4PTEyNTAwMCZiZXRfdF9taW49MTAwMCZiZXRfcl9tYXg9OTAwMDAmYmV0X3JfbWluPTEwMDA=
MD5
0a734b6781f0c2a46e4c833b4137f691
Final Request Data
http://stage.dwclub6789.com:9000/api/v2/game_lobby?agent_id=test&time=1710268459225&data=dXNlcl9pZD0yNzEwdDAwMSZjdXJyZW5jeT1LUlcmbGFuZ3VhZ2U9S08maG9tZV91cmw9aHR0cHM6Ly93d3cuZHdjbHViODg4LmNvbSZiZXRfbl9tYXg9MTAwMDAwMCZiZXRfbl9taW49MTAwMDAmYmV0X3RfbWF4PTEyNTAwMCZiZXRfdF9taW49MTAwMCZiZXRfcl9tYXg9OTAwMDAmYmV0X3JfbWluPTEwMDA=key=0a734b6781f0c2a46e4c833b4137f691
Result
{ "result_code": 0, "response_data": { "game_url": "http://dowinluck.com:8090/game?s=encoded_url&lang=KO" } }
API Response Format
The API response is returned in JSON format.
Parameter Name
Type
Description
result_code
int
0 = success, non-zero = error codes.
error_message
string
Error message if an error occurs.
response_data
string
Result data in JSON format.
Common Parameter Values
Parameter Name
Type
Description
currency
string
KRW, USD, JPY, CNY, PHP
language
string
KO = Korean, EN = English, CN = Chinese, JP = Japanese
card suit
string
H = Hearts, D = Diamonds, S = Spades, C = Clubs
card number
string
1 ~ 10 = Numbers, 11 = Jack, 12 = Queen, 13 = King
Result Codes
Code
Description
0
Request succeeded.
1
Unknown error.
2
Missing required items in the API request.
3
Key error (Invalid MD5 key).
4
Data format error.
5
Request expired.
6
Incorrect agent_id
.
9
Blocked User.
100
Data value error.
101
No permission.
102
Insufficient balance.
103
Integration Failure.
Seamless API Information
Request Format:
API communication uses the HTTP Protocol
POST
.Data Format:
Data to be sent and received uses JSON format.
Encryption:
Encrypt JSON data using
AES 256, ECB, PKCS7 (Java: PKCS5)
.Example:
{
"command": "login",
"time": 1709650800,
"data": { "user_id": "test_id" }
}
Encrypted Example:
"4hd9JAR2qN3t5wNdzggG55aLmcSU00FkpVZ4i1hFNx8NlJhUS+Ol+8A0STva4wwfH0hAlSnTlMtRUU0oeUIpV4QMFfpiVDWRdiRKamTJDgfndUi8kiYa+lDN7m5ZhFd2"
GameServer to Agent System Request Format
Parameter Name
Type
Description
command
string
Command name.
time
int64
Unix Timestamp (10 digits).
data
JSON
Data in JSON format.
Agent System to GameServer Response Format
Parameter Name
Type
Description
result
int
0 = success, non-zero = error codes.
agent_id
string
Issued agent ID.
time
int64
Unix Timestamp (10 digits).
data
JSON
Data in JSON format.
Requested when creating a user ID and updating information
ID of the user (MAX 20, English letters) - lowercase letters, numbers
User's nickname (MAX 20, English letters) - lowercase letters, numbers
Request a list of preferred currencies, separated by commas (,) and in uppercase. (Ex. KRW,USD,JPY,CNY,PHP)
{"value":"KRW"}
GET /account_init?user_id=text¤cy=text HTTP/1.1
Host:
Accept: */*
{
"result_code": 0
}
Request a list of users to request using a comma (,) (MAX 20)
{"value":"user1"}
Request a list of preferred currencies, separated by commas (,) and in uppercase. (Ex. KRW,USD,JPY,CNY,PHP) Note: If no currencies are specified, all available currencies will be requested.
{"value":null}
GET /account_balance?user_id=text HTTP/1.1
Host:
Accept: */*
[
{
"user_id": "user1",
"balance": [
{
"currency": "KRW",
"amount": 10000
},
{
"currency": "USD",
"amount": 1000
},
{
"currency": "PHP",
"amount": 100
}
]
},
{
"user_id": "user2",
"balance": [
{
"currency": "KRW",
"amount": 10000
},
{
"currency": "USD",
"amount": 1000
},
{
"currency": "PHP",
"amount": 100
}
]
}
]
ID of the requesting user
Request a list of preferred currencies, separated by commas (,) and in uppercase. (Ex. KRW,USD,JPY,CNY,PHP)
Amount to deposit
Unique value to prevent duplicate transactions
GET /account_deposit?user_id=text¤cy=text&amount=text&transaction_id=text HTTP/1.1
Host:
Accept: */*
{
"transaction_id": "user10033921123d",
"balance": 10000
}
ID of the requesting user
Request a list of preferred currencies, separated by commas (,) and in uppercase. (Ex. KRW,USD,JPY,CNY,PHP)
Amount to deposit
Unique value to prevent duplicate transactions
GET /account_withdraw?user_id=text¤cy=text&amount=text&transaction_id=text HTTP/1.1
Host:
Accept: */*
{
"transaction_id": "user10033921123d",
"balance": 10000
}
GameServer to Agent System
ID of the requesting user
{"value":"test_id"}
POST / HTTP/1.1
Host: [login]
Content-Type: examples
Accept: */*
Content-Length: 66
{
"command": "login",
"time": 1709650800,
"data": {
"user_id": "test_id"
}
}
Agent System to GameServer
{
"result": 0,
"agent_id": "test001",
"time": 1709650800,
"data": {
"user_id": "test_id",
"balance": 1000000
}
}
GameServer to Agent System
ID of the requesting user
Currency type EX: KRW
Game Type EX: BAC
table number
Game round number (table shoe round information)
Total bet amount
Detailed betting history list
Unique Betting Index
Bet Type EX: P
Bet amount
POST / HTTP/1.1
Host: [bet]
Content-Type: examples
Accept: */*
Content-Length: 289
{
"command": "bet",
"time": 1709650800,
"data": {
"user_id": "test_id",
"currency": "KRW",
"game_type": "BAC",
"table_no": "RP001",
"game_no": "RP0012403050926",
"tot_bet_amount": 200000,
"bets": [
{
"bet_index": "15",
"bet_type": "P",
"bet_amount": 1000000
},
{
"bet_index": "16",
"bet_type": "B",
"bet_amount": 1000000
}
]
}
}
Agent System to GameServer
{
"result": 0,
"agent_id": "test001",
"time": 1709650800,
"data": {
"user_id": "test_id",
"balance": 1000000
}
}
GameServer to Agent System
ID of the requesting user
Currency type EX: KRW
Game Type EX: BAC
table number
Game round number (table shoe round information)
Total bet amount
Detailed betting history list
Unique Betting Index
Bet Type EX: P
Bet amount
POST / HTTP/1.1
Host: [bet_cancel]
Content-Type: examples
Accept: */*
Content-Length: 296
{
"command": "bet_cancel",
"time": 1709650800,
"data": {
"user_id": "test_id",
"currency": "KRW",
"game_type": "BAC",
"table_no": "RP001",
"game_no": "RP0012403050926",
"tot_bet_amount": 200000,
"bets": [
{
"bet_index": "15",
"bet_type": "P",
"bet_amount": 1000000
},
{
"bet_index": "16",
"bet_type": "B",
"bet_amount": 1000000
}
]
}
}
Agent System to GameServer
{
"result": 0,
"agent_id": "test001",
"time": 1709650800,
"data": {
"user_id": "test_id",
"balance": 1000000
}
}
GameServer to Agent System
ID of the requesting user
Currency type EX: KRW
Total bet amount
Total WinLose Amount
Game Type EX: BAC
table number
Game round number (table shoe round information)
Game result EX: P, BP CANCELED GAME: CANCEL
Game result detailed data EX: P:C11,S1,H6|B:C6,D11
Detailed betting history list
Unique Betting Index
Bet Type EX: P
Bet amount
WinLose : Amount
EX : 1000 User Bet
WIN : 1000
LOSE : -1000
TIE : 0
POST / HTTP/1.1
Host: [result]
Content-Type: examples
Accept: */*
Content-Length: 399
{
"command": "result",
"time": 1709650800,
"data": {
"user_id": "test_id1",
"currency": "KRW",
"tot_bet_amount": 200000,
"tot_winlose": 0,
"game_type": "BAC",
"table_no": "RP001",
"game_no": "RP0012403050926",
"result": "P,BP",
"result_detail": "P:C11,S1,H6|B:C6,D11",
"bets": [
{
"betindex": "15",
"bet_type": "P",
"bet_amount": 1000000,
"winlose": 1000000
},
{
"betindex": "16",
"bet_type": "B",
"bet_amount": 1000000,
"winlose": -1000000
}
]
}
}
Agent System to GameServer
{
"result": 0,
"agent_id": "test001",
"time": 1709650800,
"data": {
"user_id": "test_id",
"balance": 1000000
}
}
GameServer to Agent System
ID of the requesting user
Currency type EX: KRW
Total bet amount
Total WinLose Amount
Total WinLose amount before change
Game Type EX: BAC
table number
Game round number (table shoe round information)
Game result EX: P, BP CANCELED GAME: CANCEL
Game result detailed data EX: P:C11,S1,H6|B:C6,D11
Game result before change EX: P, BP CANCELED GAME: CANCEL
Detailed game result data before change EX: P:C9,S1,H6|B:C6,D11
Detailed betting history list
Unique Betting Index
Bet Type EX: P
Bet amount
WinLose : Amount
EX : 1000 User Bet
WIN : 1000
LOSE : -1000
TIE : 0
WinLose : Amount
EX : 1000 User Bet
WIN : 1000
LOSE : -1000
TIE : 0
POST / HTTP/1.1
Host: [result_change]
Content-Type: examples
Accept: */*
Content-Length: 556
{
"command": "result_change",
"time": 1709650800,
"data": {
"user_id": "test_id1",
"currency": "KRW",
"tot_bet_amount": 200000,
"tot_winlose": 0,
"tot_winlose_before": -2000000,
"game_type": "BAC",
"table_no": "RP001",
"game_no": "RP0012403050926",
"result": "P,BP",
"result_detail": "P:C11,S1,H6|B:C6,D11",
"result_before": "B,BP",
"result_detail_before": "P:C9,S1,H6|B:C6,D11",
"bets": [
{
"betindex": "15",
"bet_type": "P",
"bet_amount": 1000000,
"winlose": -1000000,
"winlose_before": 1000000
},
{
"betindex": "16",
"bet_type": "B",
"bet_amount": 1000000,
"winlose": -1000000,
"winlose_before": -1000000
}
]
}
}
Agent System to GameServer
{
"result": 0,
"agent_id": "test001",
"time": 1709650800,
"data": {
"user_id": "test_id",
"balance": 1000000
}
}
GameServer to Agent System
ID of the requesting user
User's holding amount
POST / HTTP/1.1
Host: [logout]
Content-Type: examples
Accept: */*
Content-Length: 85
{
"command": "logout",
"time": 1709650800,
"data": {
"user_id": "test_id",
"balance": 1000000
}
}
Agent System to GameServer
{
"result": 0,
"agent_id": "test001",
"time": 1709650800,
"data": {
"user_id": "test_id",
"balance": 1000000
}
}
ID of the requesting user
The type of currency you want to use. (Ex. KRW,USD,JPY,CNY,PHP)
game language (Ex. KO = Korean, EN = English, CN = Chinese, JP = Japanese.)
Game type or main page URL to return to when an error occurs If null, the game page ends and disappears.
Feedback data you will receive added to your betting history
Feedback data you will receive added to your betting history
Max limit for betting on Player Banker
50000
MIN limit for betting on Player Banker
5000
MAX limit for betting on Tie
50000
MIN limit for betting on Tie
500
MAX limit for pair betting
50000
MIN limit for pair betting
500
GET /game_lobby?user_id=text¤cy=text&language=text&bet_n_max=1&bet_n_min=1&bet_t_max=1&bet_t_min=1&bet_r_max=1&bet_r_min=1 HTTP/1.1
Host:
Accept: */*
{
"game_url": "http://dowinn.com/gameLobby?asdkjfkjsdksdjekiiffiekkdkdkdkfjkf"
}
Request a list of users to request using a comma (,) (MAX 20)
{"value":"user1"}
GET /game_kick?user_id=text HTTP/1.1
Host:
Accept: */*
{
"result_code": 0
}
ID of the requesting user
Max limit for betting on Player Banker
Min limit for betting on Player Banker
MAX limit for betting on Thai
Min limit for betting on Thai
MAX limit for pair betting
Min limit for pair betting
Request a list of preferred currencies you want to change, separated by commas (,) and in uppercase. (Ex. KRW,USD,JPY,CNY,PHP) Note: If no currencies are specified, all available currencies will be requested.
GET /edit_bet_limit?user_id=text&bet_n_max=1&bet_n_min=1&bet_t_max=1&bet_t_min=1&bet_r_max=1&bet_r_min=1¤cy=text HTTP/1.1
Host:
Accept: */*
- When requesting a date, start_date and end_data are required.
- Base time data is UTC+8 hours.
- The data standard searched when requesting a date is [Betting Time]
- user_id, date, and last_index can all be used together in a request.
- Date or one of last_index or bet_index must be requested(Exception when type = ING - date, last_index, bet_index are not required)
get_bet_history
ALL : All data requests (processing deadline, in progress)
END : Request only data that has been processed
ING : Request only ongoing data
page. starts from 1
ID of the requesting user
null: All user data
user1: Request only user1βs data
Base date to start the search. (Format 2023-01-13 12:33:11)
Date or one of last_index or bet_index must be requested(Exception when type = ING - date, last_index, bet_index are not required)
The standard date for closing the inquiry. (Format 2023-01-13 23:59:59)
Date or one of last_index or bet_index must be requested(Exception when type = ING - date, last_index, bet_index are not required)
Returns 5000 data after the requested betting index number (excluding)
Date or one of last_index or bet_index must be requested(Exception when type = ING - date, last_index, bet_index are not required)
Returns the requested betting index number data
Date or one of last_index or bet_index must be requested(Exception when type = ING - date, last_index, bet_index are not required)
GET /get_bet_history?method=text&type=text&page=1 HTTP/1.1
Host:
Accept: */*
{
"total_page": 1,
"req_page": 1,
"list": [
{
"bet_index": 15,
"game_type": "BAC",
"table_no": "RP001",
"game_no": "D0012301210105",
"user_id": "test11",
"start_date": "2023-01-22T00:36:31",
"bet_date": "2023-01-22T00:36:37",
"end_date": "2023-01-22T00:37:31",
"currency": "KRW",
"balance_before": 300000,
"bet_amount": 100000,
"bet_type": "P",
"winlose": 0,
"balance_ after": 200000,
"stat": "WA",
"result": "P,PP",
"result_detail": "P:C11,S1,H6|B:C6,D11",
"feedback_data1": "feedback1",
"feedback_data2": "feedback2"
}
]
}
Last updated