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": 10,
"price": {
"amount": 12,
"decimal": 6,
"symbol": "USDT"
},
"negotiable": true,
"minimum_quantity": 5,
"expires_at": "2024-02-15T10:30:00Z",
"terms": {
"settlement_period": "24_hours",
"payment_method": "USDT",
"additional_notes": "Bulk discount available for orders over 50 tokens"
}
}

Parameters

ParameterTypeRequiredDescription
quantitynumberYesNumber of tokens to sell
priceobjectYesPrice information for the tokens
price.amountnumberYesPrice amount per token
price.decimalnumberYesNumber of decimal places for the price
price.symbolstringYesCurrency symbol (e.g., "USDT", "ETH")
negotiablebooleanNoWhether the price is negotiable (default: false)
minimum_quantitynumberNoMinimum quantity for a single purchase
expires_atstringNoISO 8601 datetime when the offer expires
termsobjectNoAdditional terms and conditions
terms.settlement_periodstringNoExpected settlement timeframe
terms.payment_methodstringNoPreferred payment method
terms.additional_notesstringNoAny additional notes or conditions

Response

Returns confirmation of the OTC sell offer creation.

Success Response (200 OK)

{
"success": true,
"message": "OTC sell offer created successfully",
"data": {
"deal_id": "number",
"user_id": "string",
"token_id": "string",
"quantity": "number",
"price": {
"amount": "number",
"decimal": "number",
"symbol": "string"
},
"negotiable": "boolean",
"minimum_quantity": "number",
"status": "string",
"expires_at": "string",
"created_at": "string",
"terms": {
"settlement_period": "string",
"payment_method": "string",
"additional_notes": "string"
},
"estimated_total": {
"amount": "number",
"decimal": "number",
"symbol": "string"
}
}
}

Example

Request

curl -X POST "\{\{baseUrl\}\}/v2/users/otcs/users/680c02896d91ca0145cfeb81/tokens/68ae06cfcccf4e8fc19362d1/sell" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer \{\{token\}\}" \
-d '{
"quantity": 10,
"price": {
"amount": 12,
"decimal": 6,
"symbol": "USDT"
},
"negotiable": true,
"minimum_quantity": 5,
"expires_at": "2024-02-15T10:30:00Z",
"terms": {
"settlement_period": "24_hours",
"payment_method": "USDT",
"additional_notes": "Bulk discount available"
}
}'

Response

{
"success": true,
"message": "OTC sell offer created successfully",
"data": {
"deal_id": 15,
"user_id": "680c02896d91ca0145cfeb81",
"token_id": "68ae06cfcccf4e8fc19362d1",
"quantity": 10,
"price": {
"amount": 12,
"decimal": 6,
"symbol": "USDT"
},
"negotiable": true,
"minimum_quantity": 5,
"status": "active",
"expires_at": "2024-02-15T10:30:00Z",
"created_at": "2024-01-15T14:30:00Z",
"terms": {
"settlement_period": "24_hours",
"payment_method": "USDT",
"additional_notes": "Bulk discount available"
},
"estimated_total": {
"amount": 120,
"decimal": 6,
"symbol": "USDT"
}
}
}

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