🖥️
DW-CMS-SERVER
  • Welcome
  • Reference
    • API Reference
      • 🃏GAME
      • 🎰SLOT GAME
      • ☺️AVATAR
      • 💰ACCOUNT
      • 🖥️TEST
      • Table Thumbnails
      • Baccarat
Powered by GitBook
On this page
  1. Reference
  2. API Reference

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 of agent_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&currency=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&currency=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.

PreviousTable Thumbnails

Last updated 6 months ago

Create and update game user information

get

Requested when creating a user ID and updating information

Query parameters
user_idstringRequired

ID of the user (MAX 20, English letters) - lowercase letters, numbers

nick_namestringOptional

User's nickname (MAX 20, English letters) - lowercase letters, numbers

currencystringRequired

Request a list of preferred currencies, separated by commas (,) and in uppercase. (Ex. KRW,USD,JPY,CNY,PHP)

Example: {"value":"KRW"}
Responses
200Success
application/json
get
GET /account_init?user_id=text&currency=text HTTP/1.1
Host: 
Accept: */*
200Success
{
  "result_code": 0
}

Check the amount held by the use

get
Query parameters
user_idstringRequired

Request a list of users to request using a comma (,) (MAX 20)

Example: {"value":"user1"}
currencystringOptional

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.

Example: {"value":null}
Responses
200Success
application/json
get
GET /account_balance?user_id=text HTTP/1.1
Host: 
Accept: */*
200Success
[
  {
    "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
      }
    ]
  }
]

Allows users to deposit money to play the game

get
Query parameters
user_idstringRequired

ID of the requesting user

currencystringRequired

Request a list of preferred currencies, separated by commas (,) and in uppercase. (Ex. KRW,USD,JPY,CNY,PHP)

amountstringRequired

Amount to deposit

transaction_idstringRequired

Unique value to prevent duplicate transactions

Responses
200Success
application/json
get
GET /account_deposit?user_id=text&currency=text&amount=text&transaction_id=text HTTP/1.1
Host: 
Accept: */*
200Success
{
  "transaction_id": "user10033921123d",
  "balance": 10000
}

Allows users to deposit money to play the game

get
Query parameters
user_idstringRequired

ID of the requesting user

currencystringRequired

Request a list of preferred currencies, separated by commas (,) and in uppercase. (Ex. KRW,USD,JPY,CNY,PHP)

amountstringRequired

Amount to deposit

transaction_idstringRequired

Unique value to prevent duplicate transactions

Responses
200Success
application/json
get
GET /account_withdraw?user_id=text&currency=text&amount=text&transaction_id=text HTTP/1.1
Host: 
Accept: */*
200Success
{
  "transaction_id": "user10033921123d",
  "balance": 10000
}

Request an address to access the game

get
Query parameters
user_idstringRequired

ID of the requesting user

currencystringRequired

The type of currency you want to use. (Ex. KRW,USD,JPY,CNY,PHP)

languagestringRequired

game language (Ex. KO = Korean, EN = English, CN = Chinese, JP = Japanese.)

home_urlstringOptional

Game type or main page URL to return to when an error occurs If null, the game page ends and disappears.

feedback_data1stringOptional

Feedback data you will receive added to your betting history

feedback_data2stringOptional

Feedback data you will receive added to your betting history

bet_n_maxnumber · doubleRequired

Max limit for betting on Player Banker

Example: 50000
bet_n_minnumber · doubleRequired

MIN limit for betting on Player Banker

Example: 5000
bet_t_maxnumber · doubleRequired

MAX limit for betting on Tie

Example: 50000
bet_t_minnumber · doubleRequired

MIN limit for betting on Tie

Example: 500
bet_r_maxnumber · doubleRequired

MAX limit for pair betting

Example: 50000
bet_r_minnumber · doubleRequired

MIN limit for pair betting

Example: 500
Responses
200Success
application/json
get
GET /game_lobby?user_id=text&currency=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: */*
200Success
{
  "game_url": "http://dowinn.com/gameLobby?asdkjfkjsdksdjekiiffiekkdkdkdkfjkf"
}

Request a list of users currently connected to the game

get
Responses
200Success
application/json
get
GET /game_online_users HTTP/1.1
Host: 
Accept: */*
200Success
[
  {
    "user_id": "user1",
    "currency": "PHP",
    "amount": 100
  },
  {
    "user_id": "user2",
    "currency": "KRW",
    "amount": 100000
  }
]

Forces the user who is playing the game to log out

get
Query parameters
user_idstringRequired

Request a list of users to request using a comma (,) (MAX 20)

Example: {"value":"user1"}
Responses
200Success
application/json
get
GET /game_kick?user_id=text HTTP/1.1
Host: 
Accept: */*
200Success
{
  "result_code": 0
}

Change the betting limit for users playing the game

get
Query parameters
user_idstringRequired

ID of the requesting user

bet_n_maxnumber · doubleRequired

Max limit for betting on Player Banker

bet_n_minnumber · doubleRequired

Min limit for betting on Player Banker

bet_t_maxnumber · doubleRequired

MAX limit for betting on Thai

bet_t_minnumber · doubleRequired

Min limit for betting on Thai

bet_r_maxnumber · doubleRequired

MAX limit for pair betting

bet_r_minnumber · doubleRequired

Min limit for pair betting

currencystringRequired

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
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&currency=text HTTP/1.1
Host: 
Accept: */*

View player banker game data MAX limit available for betting

get
  • 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)
Query parameters
methodstringRequired

get_bet_history

typestringRequired

ALL : All data requests (processing deadline, in progress)

END : Request only data that has been processed

ING : Request only ongoing data

pagenumberRequired

page. starts from 1

user_idstringOptional

ID of the requesting user

null: All user data

user1: Request only user1’s data

start_datestringOptional

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)

end_datestringOptional

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)

last_indexnumberOptional

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)

bet_indexnumberOptional

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)

Responses
200Success
application/json
get
GET /get_bet_history?method=text&type=text&page=1 HTTP/1.1
Host: 
Accept: */*
200Success
{
  "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"
    }
  ]
}
  • API Documentation
  • Connection Information
  • API Request Format
  • Data Request Structure
  • Common API Sample Data
  • API Response Format
  • Common Parameter Values
  • Result Codes
  • Seamless API Information
  • GameServer to Agent System Request Format
  • Agent System to GameServer Response Format
  • GETCreate and update game user information
  • GETCheck the amount held by the use
  • GETAllows users to deposit money to play the game
  • GETAllows users to deposit money to play the game
  • POSTConfirmation for logged in user information
  • POSTConfirmation user's bet
  • POSTConfirmation of user's bet cancellation
  • POSTCheck user's betting results
  • POSTModify user's betting results
  • POSTUser connection terminated
  • GETRequest an address to access the game
  • GETRequest a list of users currently connected to the game
  • GETForces the user who is playing the game to log out
  • GETChange the betting limit for users playing the game
  • GETView player banker game data MAX limit available for betting

Confirmation for logged in user information

post

GameServer to Agent System

Query parameters
user_idstringOptional

ID of the requesting user

Example: {"value":"test_id"}
Body
anyOptional
Responses
200
Agent System to GameServer
application/json
post
POST / HTTP/1.1
Host: [login]
Content-Type: examples
Accept: */*
Content-Length: 66

{
  "command": "login",
  "time": 1709650800,
  "data": {
    "user_id": "test_id"
  }
}
200

Agent System to GameServer

{
  "result": 0,
  "agent_id": "test001",
  "time": 1709650800,
  "data": {
    "user_id": "test_id",
    "balance": 1000000
  }
}

Confirmation user's bet

post

GameServer to Agent System

Query parameters
user_idstringOptional

ID of the requesting user

currencystringOptional

Currency type EX: KRW

game_typestringOptional

Game Type EX: BAC

table_nostringOptional

table number

game_nostringOptional

Game round number (table shoe round information)

tot_bet_amountnumber · doubleOptional

Total bet amount

betsarray · objectOptional

Detailed betting history list

bet_indexstringOptional

Unique Betting Index

bet_typestringOptional

Bet Type EX: P

bet_amountnumber · doubleOptional

Bet amount

Body
anyOptional
Responses
200
Agent System to GameServer
application/json
post
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
      }
    ]
  }
}
200

Agent System to GameServer

{
  "result": 0,
  "agent_id": "test001",
  "time": 1709650800,
  "data": {
    "user_id": "test_id",
    "balance": 1000000
  }
}

Confirmation of user's bet cancellation

post

GameServer to Agent System

Query parameters
user_idstringOptional

ID of the requesting user

currencystringOptional

Currency type EX: KRW

game_typestringOptional

Game Type EX: BAC

table_nostringOptional

table number

game_nostringOptional

Game round number (table shoe round information)

tot_bet_amountnumber · doubleOptional

Total bet amount

betsarray · objectOptional

Detailed betting history list

bet_indexstringOptional

Unique Betting Index

bet_typestringOptional

Bet Type EX: P

bet_amountnumber · doubleOptional

Bet amount

Body
anyOptional
Responses
200
Agent System to GameServer
application/json
post
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
      }
    ]
  }
}
200

Agent System to GameServer

{
  "result": 0,
  "agent_id": "test001",
  "time": 1709650800,
  "data": {
    "user_id": "test_id",
    "balance": 1000000
  }
}

Check user's betting results

post

GameServer to Agent System

Query parameters
user_idstringOptional

ID of the requesting user

currencystringOptional

Currency type EX: KRW

tot_bet_amountnumber · doubleOptional

Total bet amount

tot_winlosenumber · doubleOptional

Total WinLose Amount

game_typestringOptional

Game Type EX: BAC

table_nostringOptional

table number

game_nostringOptional

Game round number (table shoe round information)

resultstringOptional

Game result EX: P, BP CANCELED GAME: CANCEL

result_detailstringOptional

Game result detailed data EX: P:C11,S1,H6|B:C6,D11

betsarray · objectOptional

Detailed betting history list

bet_indexstringOptional

Unique Betting Index

bet_typestringOptional

Bet Type EX: P

bet_amountnumber · doubleOptional

Bet amount

winlosenumber · doubleOptional

WinLose : Amount

EX : 1000 User Bet

WIN : 1000

LOSE : -1000

TIE : 0

Body
anyOptional
Responses
200
Agent System to GameServer
application/json
post
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
      }
    ]
  }
}
200

Agent System to GameServer

{
  "result": 0,
  "agent_id": "test001",
  "time": 1709650800,
  "data": {
    "user_id": "test_id",
    "balance": 1000000
  }
}

Modify user's betting results

post

GameServer to Agent System

Query parameters
user_idstringOptional

ID of the requesting user

currencystringOptional

Currency type EX: KRW

tot_bet_amountnumber · doubleOptional

Total bet amount

tot_winlosenumber · doubleOptional

Total WinLose Amount

tot_winlose_beforenumber · doubleOptional

Total WinLose amount before change

game_typestringOptional

Game Type EX: BAC

table_nostringOptional

table number

game_nostringOptional

Game round number (table shoe round information)

resultstringOptional

Game result EX: P, BP CANCELED GAME: CANCEL

result_detailstringOptional

Game result detailed data EX: P:C11,S1,H6|B:C6,D11

result_beforestringOptional

Game result before change EX: P, BP CANCELED GAME: CANCEL

result_detail_beforestringOptional

Detailed game result data before change EX: P:C9,S1,H6|B:C6,D11

betsarray · objectOptional

Detailed betting history list

bet_indexstringOptional

Unique Betting Index

bet_typestringOptional

Bet Type EX: P

bet_amountnumber · doubleOptional

Bet amount

winlosenumber · doubleOptional

WinLose : Amount

EX : 1000 User Bet

WIN : 1000

LOSE : -1000

TIE : 0

winlose_beforenumber · doubleOptional

WinLose : Amount

EX : 1000 User Bet

WIN : 1000

LOSE : -1000

TIE : 0

Body
anyOptional
Responses
200
Agent System to GameServer
application/json
post
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
      }
    ]
  }
}
200

Agent System to GameServer

{
  "result": 0,
  "agent_id": "test001",
  "time": 1709650800,
  "data": {
    "user_id": "test_id",
    "balance": 1000000
  }
}

User connection terminated

post

GameServer to Agent System

Query parameters
user_idstringOptional

ID of the requesting user

balancenumber · doubleOptional

User's holding amount

Body
anyOptional
Responses
200
Agent System to GameServer
application/json
post
POST / HTTP/1.1
Host: [logout]
Content-Type: examples
Accept: */*
Content-Length: 85

{
  "command": "logout",
  "time": 1709650800,
  "data": {
    "user_id": "test_id",
    "balance": 1000000
  }
}
200

Agent System to GameServer

{
  "result": 0,
  "agent_id": "test001",
  "time": 1709650800,
  "data": {
    "user_id": "test_id",
    "balance": 1000000
  }
}