Update Token Metric
Updates the metrics of a specific token.
Request
PUT /v2/admin/token/{token_id}/metric
Parameters
| Name | Type | In | Description |
|---|---|---|---|
token_id | string | path | Required. The ID of the token to update |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer token for authentication |
Content-Type | Required. Must be application/json |
Request Body
| Name | Type | Description |
|---|---|---|
total_supply | number | Total supply of the token |
term_duration_in_months | number | Duration of the term in months |
min_purchase_quantity | number | Minimum quantity that can be purchased |
max_purchase_quantity | number | Maximum quantity that can be purchased |
min_tokens_required_for_rental_income | number | Minimum tokens required to receive rental income |
rental_income | number | Amount of rental income |
rental_income_symbol | string | Symbol of the rental income currency |
rental_payment_period_in_days | number | Period between rental payments in days |
Example
curl --request PUT \
--url '\{\{baseUrl\}\}/v2/admin/token/67d8774e903bfcbe7eb5d93e/metric' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--data '{
"total_supply": 100,
"term_duration_in_months": 12,
"min_purchase_quantity": 1,
"max_purchase_quantity": 100,
"min_tokens_required_for_rental_income": 5,
"rental_income": 250.50,
"rental_income_symbol": "USDT",
"rental_payment_period_in_days": 30
}'
Response
A successful request returns an empty response with status code 200.
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing authentication token |
| 404 | Not Found - Token ID does not exist |
| 500 | Internal Server Error |