Get Secondary Market Group Search
Search for secondary market groups associated with a specific user.
Endpoint
GET /v2/users/{user_id}/secondary-markets
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | The unique identifier of the user |
Query Parameters
This endpoint is a GET: paging and filters travel in the query string, not in a JSON body. There is no request body.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | Yes | Page number for pagination |
| per_page | integer | Yes | Number of items per page |
Response
Returns a paginated list of secondary market groups associated with the user.
Success Response (200 OK)
{
"data": [
{
"id": "string",
"token_id": "string",
"token_name": "string",
"token_symbol": "string",
"deal_id": "number",
"quantity": "number",
"price": {
"amount": "number",
"decimal": "number",
"symbol": "string"
},
"seller_id": "string",
"seller_name": "string",
"status": "string",
"created_at": "string",
"updated_at": "string"
}
],
"total": "number",
"page": 1,
"per_page": 10
}
Example
Request
curl "\{\{baseUrl\}\}/v2/users/680c02896d91ca0145cfeb81/secondary-markets?page=1&per_page=10" \
-H "Authorization: Bearer \{\{token\}\}"
Response
{
"data": [
{
"id": "deal_123",
"token_id": "68ae06cfcccf4e8fc19362d1",
"token_name": "Real Estate Token",
"token_symbol": "RET",
"deal_id": 13,
"quantity": 50,
"price": {
"amount": 12.5,
"decimal": 6,
"symbol": "USDT"
},
"seller_id": "680c02896d91ca0145cfeb82",
"seller_name": "John Doe",
"status": "active",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"total": 1,
"page": 1,
"per_page": 10
}
Error Responses
400 Bad Request
{
"error": "Invalid request parameters"
}
401 Unauthorized
{
"error": "Authentication required"
}
403 Forbidden
{
"error": "Access denied"
}
404 Not Found
{
"error": "User not found"
}
500 Internal Server Error
{
"error": "Internal server error"
}