Idempotency

To prevent duplicate operations (e.g. placing the same order multiple times), all POST requests support idempotency using the idempotency-key header.

How It Works

  • Include an idempotency-key header with your POST request.

  • The request body is hashed and cached for 24 hours.

  • If the same key is reused:

    • If the request body is the same, the original response is returned.

      • The response will include the header: x-idempotent-replay: true

    • If the request body is different, a 409 Conflict error is returned.

This ensures safe retries without performing the same operation multiple times.

Requirements

  • The value of idempotency-key must be a UUID v4 string.

  • Keys must be unique per logical operation.

  • Cached responses expire after 24 hours.