Delist From Secondary Market
Remove a sell order from the secondary market, making the tokens no longer available for sale.
Endpoint
POST /v2/users/secondary-markets/users/{user_id}/tokens/{token_id}/delist
Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer {token} |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | The unique identifier of the user who owns the sell order |
| token_id | string | Yes | The unique identifier of the token |
Request Body
{
"deal_id": 12
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| deal_id | number | Yes | The unique identifier of the deal to delist |
Response
Returns confirmation of the delisting operation.
Success Response (200 OK)
{
"success": true,
"message": "Deal delisted successfully",
"data": {
"deal_id": "number",
"user_id": "string",
"token_id": "string",
"quantity": "number",
"remaining_quantity": "number",
"price": {
"amount": "number",
"decimal": "number",
"symbol": "string"
},
"status": "string",
"delisted_at": "string",
"created_at": "string"
}
}
Example
Request
curl -X POST "\{\{baseUrl\}\}/v2/users/secondary-markets/users/680c02896d91ca0145cfeb81/tokens/68ae06cfcccf4e8fc19362d1/delist" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer \{\{token\}\}" \
-d '{
"deal_id": 12
}'
Response
{
"success": true,
"message": "Deal delisted successfully",
"data": {
"deal_id": 12,
"user_id": "680c02896d91ca0145cfeb81",
"token_id": "68ae06cfcccf4e8fc19362d1",
"quantity": 50,
"remaining_quantity": 35,
"price": {
"amount": 12.5,
"decimal": 6,
"symbol": "USDT"
},
"status": "delisted",
"delisted_at": "2024-01-15T16:30:00Z",
"created_at": "2024-01-15T10:30:00Z"
}
}
Error Responses
400 Bad Request
{
"error": "Invalid parameters",
"details": "Deal ID is required"
}
401 Unauthorized
{
"error": "Authentication required"
}
403 Forbidden
{
"error": "Access denied",
"details": "You can only delist your own deals"
}
404 Not Found
{
"error": "Deal not found",
"details": "The specified deal does not exist or has already been completed"
}
409 Conflict
{
"error": "Deal cannot be delisted",
"details": "Deal is already completed or cancelled"
}
500 Internal Server Error
{
"error": "Internal server error"
}
Important Notes
- Ownership Verification: Only the owner of the sell order can delist it
- Deal Status: Only active deals can be delisted
- Token Return: Remaining unsold tokens are returned to the user's balance
- Partial Sales: If some tokens were already sold, only the remaining quantity is delisted
- Irreversible Action: Once delisted, the same deal cannot be reactivated
- Market Impact: Delisting removes the tokens from the secondary market immediately
- Audit Trail: All delisting operations are logged for audit purposes