Cancel Smart Order
This API allows you to cancel a pending smart order.
USE CASE
Cancel a smart order you no longer want. A cancelled order cannot be resumed, so pause it instead if you may need it later.
Details
- Cancel a pending Smart Order. Once cancelled, the order cannot be resumed.
- Send only the
flowIdof the smart order. You can find it in the Smart Order Book. - Cancellation is rejected if the order is already executed, already cancelled or was cancelled by the system.
- The success message says the request was sent. Check the Smart Order Book for the final state.
- Rate limits differ between the Standard and Prime plans. See Plans & rate limits.
Request Attributes
| Attribute | Data Type | Required | Description |
|---|---|---|---|
flowId | string | Yes | Unique identifier of the Smart Order to cancel |
Validations & Error Handling
| Scenario | Error Message |
|---|---|
| Invalid flowid | "The provided smart order ID is invalid." |
| Invalid request payload | "The input details entered is invalid." |
| Internal error | "Error in Unmarshal" |
| Order already executed | "The cancellation attempt failed as the smart order was already executed." |
| Order already cancelled | "The cancellation attempt failed as the smart order was already cancelled." |
| Order cancelled by system | "The cancellation attempt failed as the smart order cancelled by system" |
| Invalid cancel request | "Smart order cannot be cancel." |
Response Attributes
| Attribute | Data Type | Description |
|---|---|---|
code | int | Status code: 200 for success; negative values indicate errors. |
message | string | "Request sent successfully to cancel smart order" or error description. |
s | string | "ok" for success, "error" for failure. |
Last updated on