> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cog888.net/llms.txt
> Use this file to discover all available pages before exploring further.

# 查詢額度

> 查詢玩家遊戲額度

<Accordion title="此 API 可能返回的錯誤代碼">
  | 代碼   | 說明            |
  | ---- | ------------- |
  | 0    | 成功            |
  | 2    | 無效參數          |
  | 20   | Secret key 錯誤 |
  | 36   | 伺服器錯誤         |
  | 9999 | 未知錯誤          |
</Accordion>


## OpenAPI

````yaml /transfer-openapi.json GET /api/v1/dt/credit
openapi: 3.1.0
info:
  title: 轉帳錢包 API
  description: Game-API 用於 vendor 向遊戲取得遊戲相關數據
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: Production server
security: []
paths:
  /api/v1/dt/credit:
    get:
      tags:
        - User API
      summary: 查詢額度
      description: 查詢玩家遊戲額度
      operationId: queryCredit
      parameters:
        - name: platform_id
          in: query
          required: true
          schema:
            type: string
          description: 平台方的產品 ID
        - name: username
          in: query
          required: true
          schema:
            type: string
          description: 用戶在遊戲中的帳號
        - name: key
          in: query
          required: true
          schema:
            type: string
          description: md5(username + 平台密鑰)
        - name: uuid
          in: query
          required: true
          schema:
            type: string
          description: 各平台自定義的唯一性請求序號，長度 >= 32 且 <= 128 字節
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  credit:
                    type: string
                    description: 額度
              example:
                credit: '12345'
        '400':
          description: 錯誤
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: 2
                  msg: >-
                    request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is
                    error
                  uuid: 9e96610f-5388-42df-b3ed-ba1b3178c63b
components:
  schemas:
    Error:
      type: object
      properties:
        code:
          type: string
          description: 錯誤代碼
        message:
          type: string
          description: 錯誤訊息
        data:
          description: 資料（通常為 null）
        status_code:
          type: integer
          description: HTTP 狀態碼
        service:
          type: string
          description: 服務名稱

````