Skip to main content

Delete Trade

DELETE /api/v1/trades/{tradeId}

Description

Deletes a specific trade from the system. This endpoint is used to remove outdated or no longer needed trade entries, helping to maintain the cleanliness and relevance of trade data within the system.

URL Parameters:

  • tradeId (required): The unique identifier of the trade to be deleted. This must be included in the URL path.

Headers:

  • tenantId (required): The tenant ID under which the trade is registered. This header identifies the specific tenant environment and should be included.
  • userId (required): The user ID of the individual responsible for deleting the trade. This header is used for authentication and authorization.

Example Request:

curl -X DELETE "http://[base_url]/api/v1/trades/{tradeId}" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456"

Responses:

  • 200 OK: Successfully deleted the trade. The response typically includes a confirmation message stating that the trade has been removed.

Example Response:

{
"message": "Trade deleted successfully."
}

Error Responses:

  • 400 Bad Request: Incorrect parameters provided.
  • 404 Not Found: No trade found with the provided tradeId.
  • 403 Forbidden: The user does not have permission to delete the trade.

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request DELETE \ 
--url /api/v1/trades/{tradeId} \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!