Skip to main content

Get Secondary Token

Get secondary market information for a specific token and user.

Endpoint

POST /v2/users/secondary-markets/users/{user_id}/tokens/{token_id}

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer {token}

Path Parameters

ParameterTypeRequiredDescription
user_idstringYesThe unique identifier of the user
token_idstringYesThe unique identifier of the token

Request Body

{
"page": 1,
"per_page": 10
}

Parameters

ParameterTypeRequiredDescription
pageintegerYesPage number for pagination
per_pageintegerYesNumber of items per page

Response

Returns secondary market information for the specified token and user.

Success Response (200 OK)

{
"data": [
{
"deal_id": "number",
"quantity": "number",
"price": {
"amount": "number",
"decimal": "number",
"symbol": "string"
},
"seller_id": "string",
"seller_name": "string",
"buyer_id": "string",
"buyer_name": "string",
"status": "string",
"transaction_hash": "string",
"created_at": "string",
"updated_at": "string"
}
],
"pagination": {
"current_page": 1,
"per_page": 10,
"total": "number",
"total_pages": "number"
}
}

Example

Request

curl -X POST "\{\{baseUrl\}\}/v2/users/secondary-markets/users/680c02896d91ca0145cfeb81/tokens/68ae06cfcccf4e8fc19362d1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer \{\{token\}\}" \
-d '{
"page": 1,
"per_page": 10
}'

Response

{
"data": [
{
"deal_id": 13,
"quantity": 25,
"price": {
"amount": 12.5,
"decimal": 6,
"symbol": "USDT"
},
"seller_id": "680c02896d91ca0145cfeb82",
"seller_name": "John Doe",
"buyer_id": "680c02896d91ca0145cfeb81",
"buyer_name": "Jane Smith",
"status": "completed",
"transaction_hash": "0x1234567890abcdef1234567890abcdef12345678",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T11:30:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 10,
"total": 1,
"total_pages": 1
}
}

Error Responses

400 Bad Request

{
"error": "Invalid request parameters"
}

401 Unauthorized

{
"error": "Authentication required"
}

403 Forbidden

{
"error": "Access denied"
}

404 Not Found

{
"error": "User or token not found"
}

500 Internal Server Error

{
"error": "Internal server error"
}