Cancel and Replace a Spot Order
A 3-step recipe with Kraken. We can help you get access.
Recipe · 3 steps
Cancel and Replace a Spot Order
with Kraken
Cancel a resting spot order and submit a replacement.
- Query the existing order to confirm its current terms before cancelling. Private Spot endpoints are signed and accept application/x-www-form-urlencoded bodies.
- Cancel the order by transaction id. The result count reflects how many orders were cancelled.
- Place the replacement order with the new terms once the original has been confirmed cancelled.
What you'll need to have ready
- nonce: Ever-increasing nonce for the signed request.
- otp: One-time password if two-factor is enabled on the API key.
- txid: The transaction id of the order to cancel.
- pair: The asset pair for the replacement order (e.g. XBTUSD).
- type: Direction of the replacement order, buy or sell.
- ordertype: Type of the replacement order (market, limit, etc.).
- volume: Volume of the replacement order in base-asset terms.
- price: Limit price for the replacement order.
For your developer
Arazzo workflow kraken:cancel-and-replace-order, 3 operations: queryOrdersInfo → cancelOrder → addOrder. Specs on APIs.io.