# API Documentation

### API Documentation

## PKG API Document Integration Instructions

### Regional Restrictions

* Official/Test Environment Restrictions:\
  Game Interface:Restriction Philippines,US, Canada, Australia, New Zealand,UK, and the European Union (EU) countries\
  Demo platform: Only open to Taiwan, Hong Kong, the UK, and other regions.\
  BO: Global Restriction\
  API: Global Restriction

### Wallet Description

* Single wallet\
  This refers to the `PKG` calling the Operator's system to handle all game logic and financial transactions. Each transaction triggers a real-time API call to the Operator."\
  Consequently, the Operator will be required to develop API endpoints. The fundamental endpoints include Player Authentication, Get Player Balance, Deduct Balance (Debit), Credit Balance, and Cancel Transaction.。
* Transfer wallet\
  This refers to transferring funds from the Operator's main wallet to the PKG game wallet before gameplay can proceed。

### signature Instructions

* Signature Header: Every API request must include a `signature` parameter in the HTTP Headers. The signing method described below applies to all APIs.。
* Request Format: `application/x-www-form-urlencoded`
* Response Format: `JSON`
* Time Units: All time and timestamp fields use **milliseconds** as the default unit.。
* Signature Format:\
  hex(sha256(appSecret + requestTime))\
  Golang Examples:<br>

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

#### Supported languages ​​and currencies

* [languages](/en/enum/enum-lang.md)
* [currencies](/en/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/en/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.
