---
# System prepended metadata

title: API
tags: [API]

---

---
title: API

tags: API

language_tabs:
- bash

includes:

search: true

toc_footers:
- <a href='http://github.com/mpociot/documentarian'>Documentation Powered by Documentarian</a>
---

# API

# 目錄
- [文檔簡介](#文檔簡介)
- [文檔版本歷史](#文檔版本歷史)
- [API位置](#API位置)
- [API調用精度限制](#API調用精度限制)
- [加密流程](#加密流程)
- [IP限制](#IP限制)
- [語系](#語系)
- [Web API](#Web-API)
    - [共用API](#共用-API)
        - [創建會員帳號](#創建會員帳號(已完成))
        - [遊戲登入url](#遊戲登入url(已完成))
        - [取得會員剩餘額度](#取得會員剩餘額度(已完成))
        - [注單編號取得注單詳細結果連結](#注單編號取得注單詳細結果連結)
        - [取得會員下注內容](#取得會員下注內容)
        - [會員登出](#會員登出)
    - [Transfer Wallet API](#Transfer-Wallet-API)
        - [設定會員金額轉出入](#設定會員金額轉出入(已完成))
    
- [遊戲編號相關](#遊戲編號相關)
- [百家樂相關資料](#百家樂相關資料)
- [錯誤代碼](#錯誤代碼)
- [BetType說明](#BetType說明)
- [會員狀態](#會員狀態)
- [補單狀態](#補單狀態)

# 文檔簡介
Web Service API 接口用於接入遊戲系統, 包括註冊, 查詢用戶帳戶, 用戶下注記錄查詢和從帳戶提現或者帳戶充值,轉帳錢包. 

# 文檔版本歷史 

## 1.0.0 - 2021/05/18

- 文檔初始化

# API位置
- 測試站: http://casino.qf-net.net:8080/cashapi/
- 正式站: https://lv668.net/cashapi/

# API調用精度限制

所有的點數值只保留小數點後兩位, 例如：1000.23, 89.32, 1002304.89 

# 加密流程

- Request
- 所有請求需要包含以下參數

| Parameter | Type   | Description    |
| --------- | ------ | -------------- |
| `AgentId` | string | 公鑰(代理編號) |
| `Key`     | string | 驗證參數       |

- Response
- 所有回應需要包含以下欄位

| Parameter   | Type   | Description |
| ----------- | ------ | ----------- |
| `ErrorCode` | String | 狀態碼      |
| `Message`   | String | 狀態描述    |
| `Data`      | Object | 數據資料    |
```json
{ 
    "ErrorCode":"0",
    "Message":"",
    "Data":{
        ......
    }
}
```

## Key 產生方式

Key = {6個任意字元} + MD5(所有請求參數串 + KeyG) + {6個任意字元}

- 任意字元
  任意填入，前後各 6 字元不需相同，驗證時會去頭尾後比對中間加密部份
- 請求參數串
  依各 API 方法參數列表，務必**按請求參數順序**以 `parameter1=value1&parameter2=value2&...` 格式串起，API 端將會檢查請求參數串內容及順序，以確保請求參數未被竄改
  EX:
    - 如果 GET query string 是
      `Account=Test1&GameId=A01&Lang=zh-CN&AgentId=10081`
      請求參數串即為：
        ```bash
        "Account=Test1&GameId=A01&Lang=zh-CN&AgentId=10081"
        ```
    - 如果 POST request body 是
        ```json
        {
          "Account": "Test1",
          "GameId": "A01",
          "Lang": "zh-CN",
          "AgentId": "10081"
        }
        ```
        請求參數串即為：
        ```bash
        "Account=Test1&GameId=A01&Lang=zh-CN&AgentId=10081"
        ```
- KeyG
    ```bash
    KeyG = MD5(DateTime.now().setZone("UTC-4").toString("yyMMd") + 公鑰(AgentId) + 私鑰(AgentKey))
    ```
    - 日期為當下 UTC-4 時間，日期格式為 `yyMMd`，例如：
      2018/2/7 => 18027, 7 號是 `7` 而不是 `07`
      2018/2/18 => 180218
#### 範例

以下使用 nodejs 及 [Luxon](https://github.com/moment/luxon) 時間套件進行加密範例

```javascript=
const agentId = 'Your AgentId';
const agentKey = 'Your AgentKey';

let requestData = {
    'parameter1': 'value1',
    'parameter2': 'value2',
    'parameter3': 'value3'
};

const date = DateTime.now().setZone('UTC-4').toFormat('yyMMd');
const keyG = md5(date + agentId + agentKey);

let paramsString = '';
for (const [key, value] of Object.entries(requestData)) {
  if (paramsString !== '') {
    paramsString += '&';
  }
  paramsString += key + '=' + value;
}
// 帶入 Key
requestData.Key = Math.random().toString(36).substr(2,6) + md5(paramsString + keyG) + Math.random().toString(36).substr(2,6));

// 發請請求
...

```


# IP限制

所有API只通過貴方所提供給我方的IP,除此之外的IP皆無法通過 

# 語系
平台API支援語系切換,只需加上lang參數

- zh-TW:繁體(預設值)
- zh-CN:簡體
- en-US:英文



# Web API

## 共用 API

### 創建會員帳號(已完成)

> Example request:

```bash
curl -X POST \
    "http://casino.qf-net.net:8080/cashapi/member/add" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"AgentId": "公鑰(代理編號)","Account":"emilytest","Password":"xxx","Port":"A1,A2,A3","Key":"驗證參數"}'

```

```javascript
const url = new URL(
    "http://casino.qf-net.net:8080/cashapi/member/add"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "AgentId": "公鑰(代理編號)",
    "Account": "emilytest",
    "Password":"xxx",
    "Port":"A1,A2,A3",
    "Key":"驗證參數"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));
```


> Example response (200):

```json
{
    "ErrorCode": 0,
    "Message": "新增成功",
    "CostTime": 0.2570350170135498046875,
    "CostMemory": "726k"
}
```

#### HTTP Request
`POST cashapi/member/add`

##### Body Parameters
| Parameter    | Type   | Status   | Description                                                  |
| ------------ | ------ | -------- | ------------------------------------------------------------ |
| `Account`    | string | required | 會員帳號(帳號請輸入4~20位英文數字)                           |
| `Password`    | string | required | 會員密碼(密碼規則:須為6-18碼英數字夾雜且符合0-9及a-z字,特殊字元可包含 _ . ! @ # $ & * + = |)                           |
| `Port` | string | required | 會員盤口,[取得代理可設定會員的盤口](#取得代理可設定會員的盤口),多個用逗號隔開(至少設定一個，至多設定三個)|

<!-- END_2145fb50ab8623efd3359a4e9fcc0cdb -->

<!-- START_eee7e5ce87e797068e47fc84c7cc209d -->
### 遊戲登入url(已完成)

> Example request:

```bash
curl -X POST \
    "http://casino.qf-net.net:8080/cashapi/member/login" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"AgentId": "公鑰(代理編號)","Account":"jackytest","Password":"xxxxx","Device":"PC","ClientIP":"127.0.0.1",Key":"驗證參數"}'
```

```javascript
const url = new URL(
    "http://casino.qf-net.net:8080/cashapi/member/login"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "AgentId": "公鑰(代理編號)",
    "Account": "jackytest",
    "Password": "xxxx",
    "Device": "PC",
    "ClientIP": "127.0.0.1",
    "Key":"驗證參數"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));
```

> Example response (200):

```json
{
    "ErrorCode": 0,
    "CostTime": 0.373978137969970703125,
    "Data": {
        "LoginUrl": "http://casino.qf-net.net/pcgame/index.html?token=1b4c48b02f7cfe21d66707ec0d0e85ee4",
        "Token": "1b4c48b02f7cfe21d66707ec0d0e85ee4"
    },
    "CostMemory": "19k"
}
```

#### HTTP Request
`POST cashapi/member/login`


##### Query Parameters

| Parameter | Status   | Description                     |
| --------- | -------- | ------------------------------- |
| `Account` | required | 會員帳號                        |
| `Password` | required | 會員密碼                        |
| `Device` | required | PC:電腦版 H5:手機版                       |
| `ClientIP` | required | 會員IP                        |

### 設定會員的盤口(已完成)
> Example request:

```bash
curl -X POST \
    "http://casino.qf-net.net:8080/cashapi/member/port" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"AgentId": "公鑰(代理編號)","Account":"emilytest","Port":"A1,A2,A3","Key":"驗證參數"}'

```

```javascript
const url = new URL(
    "http://casino.qf-net.net:8080/cashapi/member/port"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "AgentId": "公鑰(代理編號)",
    "Account": "emilytest",
    "Port": "A1,A2,A3",
    "Key":"驗證參數"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));
```


> Example response (200):

```json
{
    "ErrorCode": 0,
    "Message": "設定成功",
    "CostTime": 0.116917133331298828125,
    "CostMemory": "57k"
}
```

#### HTTP Request
`POST cashapi/member/port`

##### Body Parameters
| Parameter  | Type   | Status   | Description                                                  |
| ---------- | ------ | -------- | ------------------------------------------------------------ |
| `Account`  | string | required | 會員帳號                                                     |
| `Port` | string | required | 會員盤口,多個用逗號隔開 |

<!-- END_58e5d92e27a5d19f6324abad67febc7c -->

<!-- START_58e5d92e27a5d19f6324abad67febc7c -->

### 取得代理可設定會員的盤口(已完成)

> Example request:

```bash
curl -X POST \
    "http://casino.qf-net.net:8080/cashapi/member/getagentport" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"AgentId": "公鑰(代理編號)","GameType":"JB(遊戲種類)","Key":"驗證參數"}'
```

```javascript
const url = new URL(
    "http://casino.qf-net.net:8080/cashapi/member/getagentport"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "AgentId": "公鑰(代理編號)",
    "GameType": "JB(遊戲種類)",
    "Key":"驗證參數"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));
```


> Example response (200):

```json
{
    "ErrorCode": 0,
    "Data": [
        {
            "Port": "A1",
            "QuotaMin": "20",
            "QuotaMax": "100"
        },
        {
            "Port": "A2",
            "QuotaMin": "20",
            "QuotaMax": "160"
        },
        {
            "Port": "A3",
            "QuotaMin": "20",
            "QuotaMax": "200"
        },
        {
            "Port": "A4",
            "QuotaMin": "50",
            "QuotaMax": "300"
        },
        {
            "Port": "A5",
            "QuotaMin": "50",
            "QuotaMax": "500"
        },
        {
            "Port": "A6",
            "QuotaMin": "50",
            "QuotaMax": "600"
        },
        {
            "Port": "A7",
            "QuotaMin": "100",
            "QuotaMax": "1000"
        },
        {
            "Port": "A8",
            "QuotaMin": "100",
            "QuotaMax": "2000"
        }
    ],
    "CostTime": 0.0204780101776123046875,
    "CostMemory": "690k"
}
```

#### HTTP Request
`POST cashapi/member/getagentport`

##### Body Parameters
| Parameter  | Type   | Status   | Description                                                  |
| ---------- | ------ | -------- | ------------------------------------------------------------ |
| `GameType` | string | required | 遊戲種類(暫時只有JB)

### 取得會員剩餘額度

> Example request:

```bash
curl -X POST \
    "http://casino.qf-net.net:8080/cashapi/member/quota" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"AgentId": "公鑰(代理編號)","Account":"kaitest","Key":"驗證參數"}'
```

```javascript
const url = new URL(
    "http://casino.qf-net.net:8080/cashapi/member/quota"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "AgentId": "公鑰(代理編號)",
    "Account": "kaitest",
    "Key":"驗證參數"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));
```


> Example response (200):

```json
{
    "ErrorCode": 0,
    "CostTime": 0.0016338825225830078125,
    "Data": {
        "account": "wb_kaitest",
        "credit": "522"
    },
    "CostMemory": "8k"
}
```

#### HTTP Request
`POST cashapi/member/quota`

##### Query Parameters

| Parameter | Status   | Description |
| --------- | -------- | ----------- |
| `Account` | required | 會員帳號    |

### 取得會員下注內容

> Example request:

```bash
curl -X POST \
    "http://casino.qf-net.net:8080/cashapi/wagers/GetBetRecordByTime" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"AgentId": "公鑰(代理編號)","StartTime":"2020-02-10 15:30:30","EndTime":"2020-02-10 18:30:30","Page":"1","PageLimit":"100","Key":"驗證參數"}'

```

```javascript
const url = new URL(
    "http://casino.qf-net.net:8080/cashapi/wagers/GetBetRecordByTime"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "AgentId": "公鑰(代理編號)",
    "StartTime": "2020-02-10T15:30:30",
    "EndTime": "2020-02-10T18:30:30",
    "Page": "1",
    "PageLimit": "100",
    "Key":"驗證參數"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));
```


> Example response (200):

```json
{
    "ErrorCode": 0,
    "CostTime": 4.1749479770660400390625,
    "Data": {
        "Result": [
            {
                "Account": "wb_shiuan",
                "WagersId": "9756109",
                "GameId": "casino",
                "GameType": "1",
                "BetAmount": "100.000",
                "validBetAmount": 100,
                "WagersTime": "2021-05-24 11:19:26",
                "PayoffTime": "2021-05-24 11:19:27",
                "SettlementTime": "2021-05-23 08:00:58",
                "PayoffAmount": "100.000",
                "Jackpot": "0",
                "Status": "1",
                "Contribution": "",
                "GameCategoryId": "2",
                "Currency": "RMB",
                "GameMethod": "1",
                "TableType": "1",
                "TableId": "37",
                "Round": "1621825892",
                "Run": "13",
                "GameResult": "s12,h9,h8,d6,,",
                "BetType":"TPW"
            },
            {
                "Account": "wb_shiuan",
                "WagersId": "9756108",
                "GameId": "casino",
                "GameType": "1",
                "BetAmount": "50.000",
                "validBetAmount": 50,
                "WagersTime": "2021-05-24 11:19:26",
                "PayoffTime": "2021-05-24 11:19:27",
                "SettlementTime": "2021-05-23 08:00:58",
                "PayoffAmount": "-50.000",
                "Jackpot": "0",
                "Status": "2",
                "Contribution": "",
                "GameCategoryId": "2",
                "Currency": "RMB",
                "GameMethod": "1",
                "TableType": "1",
                "TableId": "37",
                "Round": "1621825892",
                "Run": "13",
                "GameResult": "s12,h9,h8,d6,,",
                "BetType":"TBW"
            },
            {
                "Account": "wb_shiuan",
                "WagersId": "9756107",
                "GameId": "casino",
                "GameType": "1",
                "BetAmount": "100.000",
                "validBetAmount": 100,
                "WagersTime": "2021-05-24 10:43:21",
                "PayoffTime": "2021-05-24 10:43:22",
                "SettlementTime": "2021-05-11 12:59:52",
                "PayoffAmount": "95.000",
                "Jackpot": "0",
                "Status": "1",
                "Contribution": "",
                "GameCategoryId": "2",
                "Currency": "RMB",
                "GameMethod": "1",
                "TableType": "1",
                "TableId": "17",
                "Round": "1621822099",
                "Run": "51",
                "GameResult": "c12,c9,s3,c4,c8,",
                "BetType":"TPW"
            },
            {
                "Account": "wb_shiuan",
                "WagersId": "9756106",
                "GameId": "casino",
                "GameType": "1",
                "BetAmount": "50.000",
                "validBetAmount": 50,
                "WagersTime": "2021-05-24 10:43:04",
                "PayoffTime": "2021-05-24 10:43:04",
                "SettlementTime": "2021-05-11 13:00:21",
                "PayoffAmount": "50.000",
                "Jackpot": "0",
                "Status": "1",
                "Contribution": "",
                "GameCategoryId": "2",
                "Currency": "RMB",
                "GameMethod": "1",
                "TableType": "1",
                "TableId": "38",
                "Round": "1621822037",
                "Run": "55",
                "GameResult": "h3,c8,h2,d4,c2,s11",
                "BetType":"FBW"
            },
            {
                "Account": "wb_shiuan",
                "WagersId": "9756105",
                "GameId": "casino",
                "GameType": "1",
                "BetAmount": "20.000",
                "validBetAmount": 20,
                "WagersTime": "2021-05-24 10:42:47",
                "PayoffTime": "2021-05-24 10:42:48",
                "SettlementTime": "2021-05-11 12:59:52",
                "PayoffAmount": "19.000",
                "Jackpot": "0",
                "Status": "1",
                "Contribution": "",
                "GameCategoryId": "2",
                "Currency": "RMB",
                "GameMethod": "1",
                "TableType": "1",
                "TableId": "17",
                "Round": "1621822099",
                "Run": "50",
                "GameResult": "d3,s2,h1,c4,s12,",
                "BetType":"TBW"
            }
        ]
    },
    "CostMemory": "22k"
}
```
#### Response 欄位定義

| 欄位           | 名稱                                                         |
| -------------- | ------------------------------------------------------------ |
| Account        | 會員帳號                                                     |
| WagersId       | 注單編號                                                     |
| GameId         | 遊戲代號                                                     |
| GameType       | [遊戲類別](#遊戲類別)                                        |
| BetAmount      | 下注金額                                                     |
| validBetAmount | 有效金額                                                     |
| WagersTime     | 下注時間                                                     |
| PayoffTime     | 更新時間                                                     |
| SettlementTime | 歸帳時間                                                     |
| PayoffAmount   | 輸贏                                                         |
| Commission     | 退水                                                         |
| Jackpot        | 獎金                                                         |
| Status         | [注單狀態](#注單狀態)                                        |
| Contribution   | 貢獻金                                                       |
| GameCategoryId | 遊戲類型1:電子2:真人3:彩票4:體育5:捕魚6:棋牌                 |
| Currency       | [幣別](#幣別)                                                |
| GameMethod     | [遊戲玩法](#遊戲玩法)                                        |
| TableType      | [桌檯類型](#桌檯類型)                                        |
| TableId        | 遊戲局桌檯Id                                                 |
| Round          | 輪號                                                         |
| Run            | 局號                                                         |
| GameResult     | 開牌結果，順序：[閒1,莊1,閒2,莊2,閒補,莊補]，若空的表示 無補牌 |                                                 |
|BetType|[玩法](#BetType說明) |



#### HTTP Request
`POST cashapi/wagers/GetBetRecordByTime`

##### Body Parameters
| Parameter   | Type   | Status   | Description            |
| ----------- | ------ | -------- | ---------------------- |
| `StartTime` | string | required | 開始時間               |
| `EndTime`   | string | required | 結束時間               |
| `Page`      | string | required | 頁數                   |
| `PageLimit` | string | optional | 每頁幾筆,最高上限10000 |


<!-- END_ed186d080ec7bf4d1f741083ce9c7d7f -->

<!-- START_2cb8d575ff728d1a5f4f67b18867cd2f -->
### 注單編號取得注單詳細結果連結

> Example request:

```bash
curl -X POST \
    "http://casino.qf-net.net:8080/cashapi/wagers/GetGameDetailUrl" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"AgentId": "公鑰(代理編號)","WagersId":"1","Key":"驗證參數"}'

```

```javascript
const url = new URL(
    "http://casino.qf-net.net:8080/cashapi/wagers/GetGameDetailUrl"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "AgentId": "公鑰(代理編號)",
    "WagersId": "1",
    "Key":"驗證參數"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));
```


> Example response (200):

```json
{
    "ErrorCode": 0,
    "CostTime": 0.0002400875091552734375,
    "Data": "http://casino.qf-net.net:8080/wagers/detail.php?aid=16141725593609201&wagersid=9756106",
    "CostMemory": "1k"
}
```

#### HTTP Request
`POST cashapi/wagers/GetGameDetailUrl`

##### Body Parameters
| Parameter  | Type   | Status   | Description |
| ---------- | ------ | -------- | ----------- |
| `WagersId` | string | required | 注單編號    |

### 會員登出

> Example request:

```bash
curl -X POST \
    "http://casino.qf-net.net:8080/cashapi/member/kickmember" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"AgentId": "公鑰(代理編號)","Account":"kaitest","Key":"驗證參數"}'

```

```javascript
const url = new URL(
    "http://casino.qf-net.net:8080/cashapi/member/kickmember"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "AgentId": "公鑰(代理編號)",
    "Account": "kaitest",
    "Key":"驗證參數"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));
```


> Example response (200):

```json
{
    "ErrorCode": 0,
    "CostTime": 0.0363361835479736328125,
    "CostMemory": "14k"
}
```

#### HTTP Request
`POST cashapi/member/kickmember`

##### Body Parameters
| Parameter | Type   | Status   | Description |
| --------- | ------ | -------- | ----------- |
| `Account` | string | required | 會員帳號    |

<!-- END_c16df8c0e24a5a1013448008c14f6d12 -->

## Transfer Wallet API

> 多錢包 API

### 設定會員金額轉出入

> Example request:

```bash
curl -X POST \
    "http://casino.qf-net.net:8080/cashapi/member/transfer" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"AgentId": "公鑰(代理編號)","Account":"jackytest","Amount":"100","TransactionId":"62943311","TransferType":2,"Key":"驗證參數"}'

```

```javascript
const url = new URL(
    "http://casino.qf-net.net:8080/cashapi/member/transfer"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "AgentId": "公鑰(代理編號)",
    "Account": "jackytest",
    "Amount": "100",
    "TransactionId": "62943311",
    "TransferType": 2,
    "Key":"驗證參數"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));
```


> Example response (200):

```json
{
    "code": 200,
    "ErrorCode": 0,
    "CostTime": 0.207190990447998046875,
    "Data": {
        "TransactionId": "62943311",
        "Balance": "300",
        "Status": "1"
    },
    "CostMemory": "769k"
}
```

#### HTTP Request
`POST cashapi/member/transfer`

##### Body Parameters
| Parameter       | Type    | Status   | Description                                               |
| --------------- | ------- | -------- | --------------------------------------------------------- |
| `Account`       | string  | required | 會員帳號                                                  |
| `Amount`        | string  | required | 金額                                                      |
| `TransactionId` | string  | required | 平台交易編號 ,介接平台產⽣，核對帳務(限英數字,長度4~40字) |
| `TransferType`  | integer | required | 1.轉出,2.轉入，核對帳務                                   |

## 遊戲編號相關
| 代號  | 名稱   |
| ----- | ------ |
| xg006 | xg真人 |


## 百家樂相關資料

### 代號

| 代號       | 名稱                                                         |
| ---------- | ------------------------------------------------------------ |
| GameMethod | 百家樂類型                                                   |
| TableType  | 桌台類型                                                     |
| TableId    | 遊戲局桌檯Id                                                 |
| Round      | 局號                                                         |
| Run        | 輪號                                                         |
| GameResult | 開牌結果gameType等於<br>1，百家樂時，順序：[閒1,莊1,閒2,莊2,閒補,莊補]，若空的表示 無補牌<br>5，龍虎時，順序：[龍,虎] |
| BetType    | 下注注區列表                                                 |
| Commission | 退水                                                         |

### 遊戲類別

| 遊戲名稱       | gameType |
| -------------- | -------- |
| 百家樂         | 1        |
| 骰寶           | 2        |
| 輪盤           | 3        |

### 遊戲玩法

| 名稱       | GameMethod |
| ---------- | ---------- |
| 百家樂標準 | 1          |

### 桌檯類型

| 名稱       | TableType |
| ---------- | --------- |
| 標準百家樂 | 1         |

## 百家樂撲克牌代碼說明

撲克牌代碼為花色和數字的組合 ex SA 代表黑桃A

## 花色

| 牌例 | 對應 |
| ---- | ---- |
| S    | 黑桃 |
| H    | 紅心 |
| D    | 方塊 |
| C    | 梅花 |

## 數字

| 牌例 | 對應 |
| ---- | ---- |
| A    | 1   |
| 2    | 2    |
| 3    | 3    |
| 4    | 4    |
| 5    | 5    |
| 6    | 6    |
| 7    | 7    |
| 8    | 8    |
| 9    | 9    |
| 0    | 10   |
| J    | J    |
| Q    | Q    |
| K    | K    |

## 補單狀態
| 狀態        | ModifiedStatus |
| ----------- | -------------- |
| Normal      | 正常已結算     |
| Modified    | 改單           |
| Canceled    | 事後取消       |
| NonCheckout | 未結算         |

## 交易狀態
| 狀態 | status |
| ---- | ------ |
| 1    | 成功   |
| 2    | 失敗   |

## 會員狀態
| 狀態 | Status   |
| ---- | -------- |
| 3    | 正常     |
| 2    | 停止下注 |
| -2   | 停用     |

## 注單狀態
| 狀態 | status |
| ---- | ------ |
| 1    | 待結算   |
| 2    | 註銷單 |
| 3    | 已結算和局   |
| 4    | 已刪單 |

## 錯誤代碼

| code | 錯誤說明               |
| ---- | ---------------------- |
| 1    | 參數是必須的           |
| 3    | 哈希無效(加密無效)     |
| 4    | 未找到該資料           |
| 5    | http method 是不允許的 |
| 6    | 功能未找到             |
| 7    | 內部服務器錯誤         |
| 8    | 帳號已存在             |
| 15   | 數據格式錯誤           |
| 18   | 超過可用額度           |
| 65   | 遠方API回傳錯誤        |
| 66   | 沒有實做該API          |
| 67   | 交易編號已存在         |
| 71   | 日期間隔不正確         |
| 77   | 會員不存在             |
| 81   | 超過代理可使用限額     |


## 遊戲語系

| code  | 錯誤說明 |
| ----- | -------- |
| zh-CN | 簡體     |
| zh-TW | 繁體     |
| en-US | 英語     |
| th    | 泰語     |
| id    | 印尼文   |
| ko    | 韩文     |
| ja    | 日語     |
| vn    | 越語     |

## 幣別

| 代碼 | 幣別     |
| ---- | -------- |
| TWD  | 台幣     |
| RMB  | 人民幣   |
| USD  | 美金     |
| THB  | 泰銖     |
| IDR  | 印尼盾   |
| MYR  | 馬幣     |
| VND  | 越南盾   |
| KRW  | 韓幣     |
| SGD  | 新加坡幣 |
| NZD  | 紐西蘭幣 |
| AUD  | 澳元     |
| JPY  | 日圓     |
| INR  | 印度盧比 |
|HKD   |港幣      |


### BetType說明

| 代碼             | 說明            |
| ---------------- | --------------- |
|TAP              |任意一對|
|TBP              |莊對子|
|TBW              |莊|
|TDD              |大|
|TPP              |閒對子|
|TPW              |閒|
|TSS              |小|
|TTT              |和局|
|TWP              |完美對子|
|FAP              |任意一對(免傭)|
|FBP              |莊對子(免傭)|
|FBW              |莊(免傭)|
|FDD              |大(免傭)|
|FPP              |閒對子(免傭)|
|FPW              |閒(免傭)|
|FS6              |超级6(免傭)|
|FSS              |小(免傭)|
|FTT              |和局(免傭)|
|FWP              |完美對子(免傭)|