Skip to main content

How do I verify outcomes and safely retry for create/cancel?

When the server is unable to process your request or there are transient network issues, it may return an HTTP 500 (Internal Server Error) or miss/delay acknowledgment/confirmation responses for create/cancel requests. Use the following steps to verify the outcome and decide whether to retry:
  • Check order status by Polling Order Status.
  • Wait a reasonable amount of time (e.g., 3 seconds) before checking the order status so the request has time to be processed.
  • If an order to be created is stuck in pending status for too long (e.g., 30 seconds), cancel the order and retry creation.
  • If an order to be cancelled is still active after a reasonable wait time (e.g., 3 seconds), retry cancellation since the initial cancel request may have been lost.