# API 文檔

## 地區限制

* 正式/測試環境限制说明:\
  遊戲介面：限制菲律賓、美國、加拿大、澳洲、紐西蘭、英國以及歐盟（EU）國家\
  Demo站台：只開放台灣、香港、英國等地區\
  後台：全球限制\
  API：全球限制

## 錢包說明

* 單一錢包\
  指的是由"PKG"呼叫"運營商"，進行所有遊戲以及金額交易，每一筆交易將即時調用運營商API，\
  因此將會需要營商開發 API 端口，基本的 API 端口包含驗證玩家、取得玩家餘額、餘額扣款、增加餘額、取消交易。
* 轉帳錢包\
  指從運營商的主錢包將金额 轉帳至 PKG 遊戲錢包才可进行遊戲。

## 簽名說明(signature)

* 請求API都需加入Headers參數`signature`,簽名方式如下,所有API通用。
* 請求格式為 `application/x-www-form-urlencoded`
* 回傳格式為 `JSON`
* 所有時間和時間戳相關欄位均以**毫秒為預設單位**。
* 簽名格式:\
  hex(sha256(appSecret + requestTime))\
  golang範例:<br>

```
requestTimeStr := strconv.Itoa(requestTime)
hash := sha256.Sum256([]byte(appSecret + requestTimeStr))
signature := hex.EncodeToString(hash[:])
```

### 支援語系與貨幣

* [支援語系](/enum/enum-lang.md)
* [支援貨幣](/enum/enum-currency.md)

### 相關動畫說明

* 寶箱動畫 僅在遊戲桌內顯示
* 財神開牌動畫 大廳多台:不顯示（多台不會有財神桌）\
  大廳好路:不顯示\
  遊戲桌內好路:不顯示\
  遊戲桌內路圖:顯示
* 換靴動畫 大廳多台:顯示\
  大廳好路:顯示\
  遊戲桌內好路:顯示（仍在瀏覽時剛好有桌子進行換靴一樣會有）\
  遊戲桌內路圖:顯示


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pkg333.app/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
