Idempotency key
- You can use idempotency keys with POST and PUT requests. Using
Idempotency-Keyin your request header for GET and DELETE will not work as they are inherently idempotent. - The
<key>value in your idempotent request can have a maximum of 40 characters.
Idempotency-Key: <key> to the header of your POST or PUT request.
You generate the key yourself, for example as a UUID. The following examples create a vault account with an idempotency key:
Transaction idempotency
When creating transactions, use theexternalTxId parameter rather than an idempotency key in the Create Transaction API call. You set externalTxId yourself as a unique value in the request body. If another transaction request is made with the same externalTxId value, Fireblocks rejects it with an HTTP 400 code and error code 1438.
While externalTxId is optional, it is an industry standard. Not using it creates a double spending risk - Fireblocks has no value to check for duplicates, so retrying a request after a timeout or network error can create the same transaction twice.
Learn more about the externalTxId parameter here