Cancel Order
Cancels an active order that has not yet been fully executed. Only orders with status ORDER_STATUS_PENDING
, ORDER_STATUS_ACCEPTED
, or ORDER_STATUS_PARTIALLY_FILLED
can be cancelled. See Order Statuses for a complete reference of all available statuses.
Request URL
DELETE https://ddp.definitive.fi/v2/portfolio/trade/{orderId}
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
orderId | string | Yes | UUID of the order to cancel |
Example
const json = await AuthHelpers.signAndSend({
path: "/v2/portfolio/trade/00000000-0000-0000-0000-000000000001",
method: "DELETE",
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});
console.log(json);
Response
{
success: true,
message: "Order cancelled successfully"
}
References
Notes
- Use the Get Order Details endpoint to inspect the latest order status
- Cancellations are final and cannot be undone