All order management methods are private endpoints — they require a valid API key and secret. These methods cover the full order lifecycle: placing single and batch orders, amending open orders, cancelling individual or all orders, and the Dead Man’s Switch safety mechanism.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sieblyio/kraken-api/llms.txt
Use this file to discover all available pages before exploring further.
API key permissions required: Orders and trades — Create & modify orders. Use
getAssetPairs() to look up trading pair constraints (ordermin, costmin, tick_size) before placing orders.generateNewOrderID()
A utility helper that generates a unique 32-character hex string suitable for use as a cl_ord_id. Call this before submitOrder() to track your orders without depending on the Kraken-assigned txid.
Signature
submitOrder(params)
Place a new order on the spot exchange. Supports all order types including market, limit, stop-loss, take-profit, and trailing stops.
Signature
Order type. One of:
market, limit, iceberg, stop-loss, take-profit, stop-loss-limit, take-profit-limit, trailing-stop, trailing-stop-limit, settle-position.Order direction.
Order quantity in base currency (as a string-encoded decimal).
Asset pair to trade (e.g.
"XBTUSD").Limit price for
limit, stop-loss-limit, take-profit-limit orders. Stop price for stop-loss, take-profit, trailing-stop, trailing-stop-limit orders.Secondary price for limit portion of
stop-loss-limit and take-profit-limit orders, or trailing offset for trailing stops.Price signal to trigger stop orders. Defaults to
last.Leverage factor for margin orders (e.g.
"2:1").If
true, the order only reduces an existing margin position and never opens a new one.Self-trade prevention behaviour when both sides of a trade would belong to the same account.
cancel-newest cancels the incoming order; cancel-oldest cancels the resting order; cancel-both cancels both.Comma-delimited order flags:
post— post-only order (maker only)fcib— prefer fee in base currencyfciq— prefer fee in quote currencynompp— no market price protectionviqc— volume in quote currency
Time-in-force policy.
GTC = Good-Til-Cancelled, IOC = Immediate-Or-Cancel, GTD = Good-Til-Date, FOK = Fill-Or-Kill.Scheduled start time.
0 for now, +<n> for n seconds from now, or Unix timestamp.Expiration time. Same format as
starttm.RFC3339 timestamp after which the order should be rejected if not yet placed (max 60 seconds in the future).
Client-defined order ID (max 36 characters). Recommended — use
generateNewOrderID() to create one.Integer user reference ID for grouping orders.
Visible quantity for iceberg orders. Must be less than
volume.If
true, validates the order but does not submit it. Useful for parameter testing.Closing order type to attach (conditional close). E.g.
"limit".Closing order price.
Closing order secondary price.
Asset class of the pair.
| Property | Value |
|---|---|
| HTTP method | POST |
| Endpoint | 0/private/AddOrder |
| Auth required | Yes |
SpotSubmitOrderResponse
| Field | Type | Description |
|---|---|---|
descr.order | string | Human-readable order description |
descr.close | string? | Close order description (if attached) |
txid | string[] | Array of transaction IDs assigned by Kraken |
- Market Order
- Limit Order
- Post-Only Limit
- Validate Only
amendOrder(params)
Amend an existing open order. The order’s Kraken transaction ID and client order ID remain unchanged, and queue priority is maintained where possible.
Signature
Transaction ID of the order to amend. Either
txid or cl_ord_id is required.Client order ID of the order to amend.
New order quantity (total, not delta).
New display quantity for iceberg orders.
New limit price.
New trigger/stop price.
Asset pair (required for some amend operations).
Update post-only flag.
RFC3339 deadline timestamp.
| Property | Value |
|---|---|
| HTTP method | POST |
| Endpoint | 0/private/AmendOrder |
| Auth required | Yes |
cancelOrder(params)
Cancel a particular open order (or set of open orders) by txid, userref, or cl_ord_id.
Signature
Transaction ID, user reference ID, or comma-delimited list of transaction IDs to cancel.
Client order ID to cancel.
| Property | Value |
|---|---|
| HTTP method | POST |
| Endpoint | 0/private/CancelOrder |
| Auth required | Yes |
| Field | Type | Description |
|---|---|---|
count | number | Number of orders cancelled |
pending | boolean? | If true, a partially filled order is pending cancellation |
cancelAllOrders()
Cancel all currently open orders. No parameters required.
Signature
| Property | Value |
|---|---|
| HTTP method | POST |
| Endpoint | 0/private/CancelAll |
| Auth required | Yes |
cancelAllOrdersAfter(params)
Dead Man’s Switch. Sets a countdown timer that will automatically cancel all client orders if not reset before expiry. Send timeout: 0 to disable the timer. Designed to protect against network disconnections or system failures.
Signature
Number of seconds until all orders are cancelled. Set to
0 to disable the timer. Maximum: 86400 (24 hours).| Property | Value |
|---|---|
| HTTP method | POST |
| Endpoint | 0/private/CancelAllOrdersAfter |
| Auth required | Yes |
| Field | Type | Description |
|---|---|---|
currentTime | string | Server time when request was received |
triggerTime | string | Scheduled cancellation time |
You must continuously reset the timer before it expires. The timer resets each time you call
cancelAllOrdersAfter() with a non-zero timeout. If your process crashes, the timer will fire and cancel all orders.submitBatchOrders(params)
Submit a collection of orders (minimum 2, maximum 15) for a single trading pair. Validation is applied to the entire batch before any orders are placed — if one order fails validation, the whole batch is rejected.
Signature
Asset pair for all orders in the batch. All orders must share the same pair.
Array of 2–15 order objects. Each item supports the same fields as
submitOrder() except pair.If
true, validates the batch but does not submit. Useful for parameter testing.RFC3339 deadline timestamp for the batch.
Asset class filter.
Broker identifier (if applicable).
| Property | Value |
|---|---|
| HTTP method | POST |
| Endpoint | 0/private/AddOrderBatch |
| Auth required | Yes |
{ orders: SpotBatchOrderResult[] }
Each SpotBatchOrderResult contains txid?, descr?, and error? (if that specific order failed).
cancelBatchOrders(params)
Cancel multiple open orders by txid, userref, or cl_ord_id. Supports up to 50 unique IDs/references per call.
Signature
Array of transaction IDs or user reference IDs to cancel.
Array of client order IDs to cancel.
| Property | Value |
|---|---|
| HTTP method | POST |
| Endpoint | 0/private/CancelOrderBatch |
| Auth required | Yes |
createSubaccount(params)
Create a trading subaccount. Must be called using an API key from the master account.
Signature
Username for the new subaccount.
Email address for the new subaccount.
| Property | Value |
|---|---|
| HTTP method | POST |
| Endpoint | 0/private/CreateSubaccount |
| Auth required | Yes (master account API key) |
submitSubaccountTransfer(params)
Transfer funds between the master account and subaccounts, or between subaccounts. Must be called using an API key from the master account.
Signature
Asset to transfer (e.g.
"EUR", "XBT").Amount to transfer.
Source account UID.
Destination account UID.
Asset class of the transferred asset.
| Property | Value |
|---|---|
| HTTP method | POST |
| Endpoint | 0/private/AccountTransfer |
| Auth required | Yes (master account API key) |
SpotAccountTransferResponse
| Field | Type | Description |
|---|---|---|
transfer_id | string | Unique transfer identifier |
status | string | Transfer status |