API-v2 (No-transfer Wallet)
Introduction
No-transfer wallet allows users to place bets without manually transferring funds to the Hash platform. When users log in successfully, the Hash platform automatically retrieves user funds for each bet, and bets can only be placed when sufficient funds are available.
Flow Chart

1. Frontend Integration
Building Integration Links
Hash Game provides PC and H5 web pages for merchant application integration. Merchants can integrate with Hash Game frontend website through iframe embedding.
- Frontend Address
Please contact the Hash Game team to obtain
Integration Method
Merchants assemble Hash Game lobby or individual game access addresses in the backend and embed them in the frontend.
Assembly content: https://${baseURL contact official to obtain}?merchant_id=0&entry=lobby¤cy=USDT&token=&lang=en
Required Parameter Description
- merchant_id - Merchant ID, obtained by merchants applying to Hash Game
- entry - Game type, e.g., lobby for game hall, more details in Game Types
- currency - Currency type, e.g., USDT, more details in Currency Types
- token - User authorization code, merchant's user login authorization token
- It is recommended to use bidirectional encryption/decryption, encrypting user key information into a string
- Hash Game doesn't care about how this content is decrypted, the original content will be returned
- Note: Due to GET parameter passing, please use URL encoding for this content
- When this parameter doesn't exist or is empty, the game will show an unauthorized user popup
- lang - Language code, more details in Language Code Description
- home_url - Home page address or other page address (redirected to when user login expires)
- theme - System theme, dark (dark mode), light (bright mode), default light mode
Embedded Link Example
https://${baseURL}?merchant_id=1001&entry=lobby¤cy=USDT&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NDc4Mzg3ODksImhhbGxfaWQiOjEsImlhdCI6MTc0Nzc1MjM4OSwidXNlcl9pZCI6MX0.D-u6uFV5eZaNZ3zqqfO4hPIyvSuyjsfum9MUe4eFHvw&lang=en&theme=dark
2. Merchant Implementation
⚠ Protocol Compliance Requirements All interface implementations must strictly follow the Communication Protocol specifications, especially for Hash Game data encryption/decryption verification:
- Request parameters must be AES encrypted
- Response data must be verified and decrypted
- Merchant ID must be passed through Header
2.1 Get User
Interface: POST /api/v2/user/info
Brief Description
Get user information through token
Request Content
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| token | Yes | string | User authorization code |
Success Response Data Fields
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| user_id | Yes | int64 | Merchant partner's unique user identifier |
| username | Yes | string | User nickname |
| avatar | Yes | string | User avatar address |
Example
{
"code": 0,
"data": {
"user_id": 10001,
"username": "testuser123",
"avatar": "https://example.com/default.jpg"
}
}Error Response
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| code | Yes | int | Error code (refer to error code documentation) |
| msg | Yes | string | Error description |
2.2 User Balance
Interface: POST /api/v2/user/balance
Brief Description
Get user's currency balance through token
Request Content
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| token | Yes | string | User authorization code |
| currency | Yes | string | Currency identifier ('USDT', 'TRX'), default USDT |
Success Response Data Fields
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| user_id | Yes | int64 | Merchant partner's unique user identifier |
| balance | Yes | float64 | Digital currency balance |
| currency | Yes | string | Currency identifier ('USDT', 'TRX'), default USDT |
Example
{
"code": 0,
"data": {
"user_id": 10001,
"balance": 1000.0,
"currency": "USDT"
}
}Error Response
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| code | Yes | int | Error code (refer to error code documentation) |
| msg | Yes | string | Error description |
2.3 Order Placement
Interface: POST /api/v2/order/add
Brief Description
Request order placement with amount, bet is successful when third party returns success
Request Content
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| token | Yes | string | User authorization code |
| user_id | Yes | int32 | Merchant partner's unique user identifier |
| order_no | Yes | string | Order number (unique) |
| username | Yes | string | Username |
| entry_key | Yes | string | Game identifier (refer to game type description) |
| round_id | Yes | int64 | Number of rounds |
| currency | No | string | Currency identifier ('USDT', 'TRX'), default USDT |
| amount | Yes | float64 | Bet amount |
| bet_info | Yes | string | Bet details. This is a JSON string containing a JSON array.Click to view sub-order structure and examplesEach element in the array is a JSON object representing bet details, with the following structure:
Example (entire bet_info field value, note this is a string, internal JSON needs escaping):"[{\"key\":\"Big\",\"name\":\"Big\",\"amount\":1,\"is_win\":true,\"prize\":200,\"odds\":200},{\"key\":\"Even\",\"name\":\"Even\",\"amount\":1,\"is_win\":true,\"prize\":200,\"odds\":200}]" |
Success Response Data Fields
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| order_no | Yes | string | Order number |
| balance | Yes | float64 | Balance |
| currency | Yes | string | Currency type |
Error Response
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| code | Yes | int | Error code (refer to error code documentation) |
| msg | Yes | string | Error description |
2.4 Order Update
Interface: POST /api/v2/order/update
Brief Description
When user order status changes, such as from pending settlement to settled, repeatedly notify the user; Orders will be polled for notification before merchant returns correct results; once per minute, until 10 times after which notifications stop. If merchants need long-term maintenance shutdown, they can use 3.2 Order Details Interface to query results when the server restarts
⚠ Note When getting order status, do not settle repeatedly
Request Parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| user_id | Yes | string | Merchant partner's unique user identifier |
| username | Yes | string | User nickname |
| order_no | Yes | string | Order number (unique) |
| entry_key | Yes | string | Game identifier (refer to game integration documentation) |
| round_id | Yes | int64/string | Game round number (value type depends on game type) |
| amount | Yes | float64 | Total bet amount |
| currency | Yes | string | Currency type, e.g.: USDT |
| status | Yes | int32 | Order status:0-Pending1-Success2-Failed3-Pending settlement4-Cancelled |
| bill | No | float64 | Bill amount (optional) |
| profit | No | float64 | Platform profit (optional) |
| prize | Yes | float64 | Prize distributed (tax included) |
| tax | Yes | float64 | Tax |
| bonus | Yes | float64 | Game special reward |
| bet_time | Yes | int64 | Bet time (unix millisecond timestamp) |
| reckon_time | No | int64 | Settlement time (unix millisecond timestamp, optional if not settled) |
| bet_info | Yes | string | Bet details (JSON string format) |
| result | No | string | Game result (optional) |
| is_win | Yes | bool | Is winning |
| remark | No | string | Remarks (optional) |
Success Response
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| code | Yes | int | 0 |
| msg | Yes | string | Description |
| data | Yes | object | Object information |
Success data Return Parameter
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| order_no | Yes | string | Order number |
| balance | Yes | float64 | Balance after operation |
| currency | Yes | string | Currency |
Error Response
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| code | Yes | int | Error code (refer to error code documentation) |
| msg | Yes | string | Error description |
3. Hash Game Services
3.1 Game List
Interface: GET api/v2/game/list
Brief Description
Get platform's currently online games
Request Parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| page | Yes | int | Page number |
| page_size | Yes | int | Items per page |
| category | No | int | Category, default 1 |
List Item Description
| Field Name | Type | Description |
|---|---|---|
| entry | string | Game unique identifier |
| name | string | Game name |
| icon | string | Game icon |
Return Parameter
{
"code": 0,
"msg": "SUCCESS",
"data": {
"list": [
{
"entry": "pc28-1",
"name": "pc28 Advanced Room",
"icon": "https:xxxx.jpg"
}
],
"page": 1,
"page_size": 10
}
}Error Response
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| code | Yes | int | Error code (refer to error code documentation) |
| msg | Yes | string | Error description |
3.2 Game Login
Interface: GET api/v2/game/login
Brief Description
Login game
Request Parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| entry | Yes | string | Game identifier/ID |
| token | Yes | string | token |
| currency | Yes | string | Currency, default USDT |
| lang | No | string | Language, default English |
Success Structure Description
| Field Name | Type | Description |
|---|---|---|
| game_url | string | Login address |
Return Parameter
{
"code": 0,
"msg": "SUCCESS",
"data": {
"game_url": "https://${baseURL}?merchant_id=1001&entry=lobby¤cy=USDT&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NDc4Mzg3ODksImhhbGxfaWQiOjEsImlhdCI6MTc0Nzc1MjM4OSwidXNlcl9pZCI6MX0.D-u6uFV5eZaNZ3zqqfO4hPIyvSuyjsfum9MUe4eFHvw&lang=en"
}
}Error Response
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| code | Yes | int | Error code (refer to error code documentation) |
| msg | Yes | string | Error description |
3.3 Order Query
Interface: GET api/v2/order/list
Brief Description
Platform all player order data, return Success and settled orders
Request Parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| page | Yes | int | Page number |
| page_size | Yes | int | Items per page |
| start_time | No | int | Millisecond timestamp, query start time, default start of today |
| end_time | No | int | Millisecond timestamp, query end time, default end of today |
| max_id | No | int | Max pull value |
List Item Description
| Field Name | Type | Description |
|---|---|---|
| id | int64 | Primary key id |
| order_no | string | System unique order number |
| block_id | string | Block hash |
| user_id | int64 | User ID |
| username | string | Username (masked) |
| game_code | string | Game identifier |
| entry_key | string | Game entry identifier code |
| entry_name | string | Game entry name |
| room_id | int32 | Room ID |
| room_name | string | Room name |
| round_id | int64 | Game unique identifier |
| amount | float64 | Order amount (including positive and negative) |
| currency | string | Currency code (CNY/USD etc.) |
| status | int32 | Order status (see status enumeration) |
| bill | float64 | Bill amount |
| profit | float64 | Platform profit/loss (positive profit/negative loss) |
| prize | float64 | Prize amount |
| tax | float64 | Tax |
| bonus | float64 | Extra reward amount |
| bet_time | int64 | Bet timestamp (seconds) |
| reckon_time | int64 | Settlement timestamp (0 if not settled) |
| bet_info | string | Bet details (JSON string format) |
| result | string | Draw result |
| is_win | bool | YesNo win |
| remark | string | Remark |
Return Parameter
{
"code": 0,
"msg": "SUCCESS",
"data": {
"list": [
{
"user_id": 9,
"username": "RSwVUYp",
"order_no": "202506061653316411",
"block_id": "0000000004579244e0f582546c32e30225bf30c0fa9eb2f281334fd7b83ddf23",
"game_code": "pc28",
"entry_key": "pc28-1",
"entry_name": "",
"room_id": 1,
"room_name": "",
"round_id": 72847940,
"amount": 10,
"currency": "USDT",
"status": 3,
"bill": 0,
"profit": 0,
"prize": 0,
"tax": 0,
"bonus": 0,
"bet_time": 1749200012000,
"reckon_time": 0,
"bet_info": "[{\"key\":\"Big\",\"name\":\"Big\",\"odds\":200,\"amount\":10}]",
"result": "",
"is_win": false,
"remark": ""
}
],
"page": 1,
"page_size": 10
}
}Error Response
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| code | Yes | int | Error code (refer to error code documentation) |
| msg | Yes | string | Error description |
3.4 Order Details
Interface: GET api/v2/order/details
Brief Description
Platform player order detailed information
Request Parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| order_no | Yes | string | Order number (unique) |
Success Response Data (200)
| Field Name | Type | Description |
|---|---|---|
| order_no | string | System unique order number |
| block_id | string | Block hash |
| user_id | int64 | User ID |
| username | string | Username (masked) |
| game_code | string | Game identifier |
| entry_key | string | Game entry identifier code |
| entry_name | string | Game entry name |
| room_id | int32 | Room ID |
| room_name | string | Room name |
| round_id | int64 | Game unique identifier |
| amount | float64 | Order amount (including positive and negative) |
| currency | string | Currency code (CNY/USD etc.) |
| status | int32 | Order status (see status enumeration) |
| bill | float64 | Bill amount |
| profit | float64 | Platform profit/loss (positive profit/negative loss) |
| prize | float64 | Prize amount |
| tax | float64 | Tax |
| bonus | float64 | Extra reward amount |
| bet_time | int64 | Bet timestamp (seconds) |
| reckon_time | int64 | Settlement timestamp (0 if not settled) |
| bet_info | string | Bet details (JSON string format) |
| result | string | Draw result |
| is_win | bool | YesNo win |
| remark | string | Remark |
{
"code": 0,
"msg": "SUCCESS",
"data": {
"user_id": 9,
"username": "RSwVUYp",
"order_no": "202506061653316411",
"block_id": "0000000004579244e0f582546c32e30225bf30c0fa9eb2f281334fd7b83ddf23",
"game_code": "pc28",
"entry_key": "pc28-1",
"entry_name": "",
"room_id": 1,
"room_name": "",
"round_id": 72847940,
"amount": 10,
"currency": "USDT",
"status": 3,
"bill": 0,
"profit": 0,
"prize": 0,
"tax": 0,
"bonus": 0,
"bet_time": 1749200012000,
"reckon_time": 0,
"bet_info": "[{\"key\":\"Big\",\"name\":\"Big\",\"odds\":200,\"amount\":10}]",
"result": "",
"is_win": false,
"remark": ""
}
}Error Response
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| code | Yes | int | Error code (refer to error code documentation) |
| msg | Yes | string | Error description |

