Skip to main content

Sell On OTC

Create an OTC (Over-The-Counter) sell offer for tokens owned by a user.

Endpoint

POST /v2/users/otcs/users/{user_id}/tokens/{token_id}/sell

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer {token}

Path Parameters

ParameterTypeRequiredDescription
user_idstringYesThe unique identifier of the user selling the tokens
token_idstringYesThe unique identifier of the token to sell

Request Body

{
"quantity": 3,
"price": {
"id": "6913307ec95e268b239b2d8b",
"amount": 12
}
}

Parameters

ParameterTypeRequiredDescription
quantitynumberYesNumber of tokens to sell
priceobjectYesPrice information for the tokens
price.idstringYesCurrency token ID
price.amountnumberYesPrice amount per token

Example

Request

curl --location 'https://test-integration-api.tokenizationtr.com/v2/users/otcs/users/6913872755654191dede37da/tokens/691331aec95e268b239b2d91/sell' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJRCI6Ijk3MWNlZGVmLWVlZDctNDcwZi04YWIzLTBhZTM3ZDc0NTY4NCIsImV4cGlyYXRpb24iOjE3NjMwODM3NjcsInN1cGVydmlzb3JFbWFpbCI6ImRldkBydWRpcS5jb20iLCJzdXBlcnZpc29ySUQiOiI2OGQyODBiYmM1ODA3M2NkZjU2NDJkMjAiLCJzdXBlcnZpc29yTm9kZUlEIjoiNjY1YWU1MzZhNjM5MmI3NWNmZDQwMzUyIiwic3VwZXJ2aXNvck5vZGVJbnRJRCI6MSwic3VwZXJ2aXNvck5vZGVQYXRoIjoiMSIsInN1cGVydmlzb3JSb2xlSUQiOiI2NjVhZTc5NjEwY2UyMTZkYmMzNWM5M2IiLCJzdXBlcnZpc29yUm9sZVByaW9yaXR5IjoxMDB9.0l-NJTDICHXuhwb0PGX6wwXO50zhMysxepUntC1sxJY' \
--data '{
"quantity": 3,
"price": {
"id": "6913307ec95e268b239b2d8b",
"amount": 12
}
}'

Response

A successful response returns the created OTC sell offer.

{
"quantity": 3,
"price": {
"id": "6913307ec95e268b239b2d8b",
"amount": 12
}
}

Error Responses

400 Bad Request

{
"error": "Invalid parameters",
"details": "Quantity must be greater than 0"
}

401 Unauthorized

{
"error": "Authentication required"
}

403 Forbidden

{
"error": "Access denied",
"details": "Insufficient permissions to create OTC offers"
}

404 Not Found

{
"error": "Resource not found",
"details": "User or token not found"
}

422 Unprocessable Entity

{
"error": "Insufficient token balance",
"details": "User does not have enough tokens to create this offer"
}

500 Internal Server Error

{
"error": "Internal server error"
}

Important Notes

  • OTC Trading: Over-the-counter trading allows for direct negotiation between parties
  • Token Ownership: User must own the tokens they want to sell
  • Price Negotiation: Offers can be marked as negotiable for flexible pricing
  • Settlement Terms: Custom settlement periods and payment methods can be specified
  • Minimum Quantities: Sellers can set minimum purchase requirements
  • Expiration: Offers automatically expire after the specified date
  • Privacy: OTC deals offer more privacy compared to public secondary markets
  • Direct Communication: Buyers and sellers can communicate directly through the platform