Documentation Index
Fetch the complete documentation index at: https://developer.cregis.com/llms.txt
Use this file to discover all available pages before exploring further.
API URL
POST /api/v1/collection
Request
Request Parameters
| Name | Type | Required | Description |
|---|
| pid | integer(int64) | Yes | WaaS project ID. Go to Cregis > WaaS > Select project > Settings > Developer to view |
| currency | string | Yes | Token to withdraw (chain_id and token_id) |
| from_address | string | Yes | Source address (must be enabled project address) |
| to_address | string | Yes | Destination address (must be project wallet) |
| amount | string | No | Amount to collect. If empty, collect all available funds. Different tokens have different precision requirements |
| nonce | string | Yes | 6-character random string |
| timestamp | integer(int64) | Yes | Current timestamp (milliseconds) |
| sign | string | Yes | Digital signature to prevent tampering |
Request Example
{
"pid": 1382528827416576,
"currency": "195@195",
"from_address": "TJ6j9CosgGRxuVwuMFsxKwuqbUFaSd1SZr",
"to_address": "TFVjBSg1dzszYSyB1dNx4cQnxaD6bHYCE1",
"amount": "1.1",
"nonce": "hwlkk6",
"timestamp": 1688004243314,
"sign": "d6eef2de79e39f434a38efb910213ba6"
}
Response
Response Result
| Name | Type | Description |
|---|
| code | string | Response Code |
| msg | string | Response Message |
| data | object | Response Data Object |
Response data Object
| Name | Type | Description |
|---|
| cid | integer(int64) | System Sequence Number |
Response Example
{
"code": "00000",
"msg": "ok",
"data": {
"cid": 1382528827416576
}
}