All order management methods require API key authentication. InitialiseDocumentation 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.
DerivativesClient with your Futures API key and secret — the SDK handles HMAC signing automatically.
Submit Orders
submitOrder(params)
Places a limit, market, stop, take-profit, immediate-or-cancel, post-only, fill-or-kill, or trailing-stop order for any currently listed futures contract.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/sendorder - Auth required: Yes
FuturesSendOrderParams):
Order type. One of:
| Value | Description |
|---|---|
lmt | Limit order — rests in the book at the specified price |
mkt | Market order — executes immediately at best available price |
post | Post-only limit — rejected if it would immediately execute as a taker |
ioc | Immediate-or-cancel — fills what it can then cancels any remainder |
fok | Fill-or-kill — must fill entirely or is fully cancelled |
stp | Stop order — triggers a limit order when the stop price is reached |
take_profit | Take-profit order — triggers when price moves favourably past the stop price |
trailing_stop | Trailing stop — stop price tracks the market at a fixed deviation |
The futures contract symbol, e.g.
PF_ETHUSD.Order direction.
Order quantity in contract units.
Limit price. Required for
lmt, post, stp, and take_profit orders.Stop trigger price. Required for
stp, take_profit, and trailing_stop orders.Client-assigned order ID (max 36 chars). Use
client.generateNewOrderID() to generate one.If
true, the order will only reduce an existing position and will not open or increase a position.The price signal used to trigger stop and take-profit orders. Defaults to
mark.Maximum trailing stop deviation. Required for
trailing_stop orders.Unit for the trailing stop deviation.
Offset value for the limit price on a stop or take-profit order that generates a limit order on trigger.
Unit for
limitPriceOffsetValue.ISO 8601 timestamp. The order is rejected (
wouldProcessAfterSpecifiedTime) if not processed by this time.Promise<DerivativesAPISuccessResponse<{ sendStatus: FuturesSendOrderStatus }>>
The FuturesSendOrderStatus.status field indicates the outcome:
| Status | Description |
|---|---|
placed | Order accepted and resting in the book |
partiallyFilled | IOC order partially executed |
filled | Order fully executed immediately |
cancelled | Order was not placed |
marketSuspended | Market is suspended |
invalidPrice / invalidSize | Validation failure |
insufficientAvailableFunds | Not enough margin |
postWouldExecute | Post-only order would have crossed the book |
iocWouldNotExecute | IOC order found no liquidity |
selfFill | Would have matched against own order |
wouldCauseLiquidation | Order would trigger liquidation |
outsidePriceCollar | Price outside the dislocation protection band |
- Limit order
- Market order
- Post-only
- Reduce-only
- Stop order
- Trailing stop
Edit Orders
editOrder(params)
Amends an existing open order — you can change the size, limit price, stop price, and trailing stop parameters. When trailing stop parameters are sent unchanged, the system recalculates the stop price after the edit.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/editorder - Auth required: Yes
FuturesEditOrderParams):
The exchange-assigned order ID to edit. Provide either
orderId or cliOrdId.The client-assigned order ID to edit.
New order quantity.
New limit price.
New stop trigger price.
New trailing stop deviation value.
Unit for the trailing stop deviation.
Whether
size is an absolute quantity or a relative change to the current order size.ISO 8601 timestamp deadline for processing.
Promise<DerivativesAPISuccessResponse<{ editStatus: FuturesEditOrderStatus }>>
The editStatus.status can be edited, invalidSize, invalidPrice, insufficientAvailableFunds, outsidePriceCollar, postWouldExecute, wouldNotReducePosition, orderForEditNotFound, or orderForEditNotAStop.
Cancel Orders
cancelOrder(params)
Cancels a single open order identified by exchange order ID or client order ID.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/cancelorder - Auth required: Yes
Exchange-assigned order ID to cancel. Provide either
order_id or cliOrdId.Client-assigned order ID to cancel.
ISO 8601 timestamp deadline for processing.
Promise<DerivativesAPISuccessResponse<{ cancelStatus: FuturesCancelOrderStatus }>>
Response status: cancelled, filled (already filled before cancel arrived), or notFound.
cancelAllOrders(params?)
Cancels all open orders, optionally scoped to a specific futures symbol or margin account.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/cancelallorders - Auth required: Yes
If provided, only orders for this symbol are cancelled.
Promise<DerivativesAPISuccessResponse<{ cancelStatus: FuturesCancelAllOrdersStatus }>>
cancelAllOrdersAfter(params)
Implements a Dead Man’s Switch — sets a countdown timer that will cancel all open orders when it expires. Send this request periodically to reset the timer; send timeout: 0 to deactivate the switch.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/cancelallordersafter - Auth required: Yes
Countdown in seconds before all orders are cancelled. Set to
0 to deactivate the switch.Promise<DerivativesAPISuccessResponse<{ status: FuturesDeadMansSwitchStatus }>>
The response includes currentTime and triggerTime (when the cancel will fire if not reset).
The recommended pattern is to call this every 15–20 seconds with a 60-second timeout. This keeps orders safe during brief connectivity issues while ensuring cancellation on a prolonged outage.
Batch Order Management
batchOrderManagement(params)
Sends, edits, and cancels multiple orders in a single atomic request. Each entry in the batchOrder array has an order field ('send', 'edit', or 'cancel') that determines its type.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/batchorder - Auth required: Yes
FuturesBatchOrderParams):
Array of order operations. Each element is one of
FuturesBatchOrderSend, FuturesBatchOrderEdit, or FuturesBatchOrderCancel.ISO 8601 timestamp. Entire batch is rejected if not processed by this time.
FuturesBatchOrderSend fields:
| Field | Type | Required | Description |
|---|---|---|---|
order | 'send' | ✓ | Operation type |
order_tag | string | ✓ | Tag to match responses back to requests |
orderType | string | ✓ | Same values as submitOrder |
symbol | string | ✓ | Futures contract symbol |
side | 'buy' | 'sell' | ✓ | Order direction |
size | number | ✓ | Order quantity |
limitPrice | number | — | Limit price |
stopPrice | number | — | Stop trigger price |
cliOrdId | string | — | Client order ID |
reduceOnly | boolean | — | Reduce-only flag |
triggerSignal | 'mark' | 'index' | 'last' | — | Stop trigger signal |
FuturesBatchOrderEdit fields:
| Field | Type | Required | Description |
|---|---|---|---|
order | 'edit' | ✓ | Operation type |
order_id | string | ✓ | Exchange order ID to edit |
size | number | — | New size |
limitPrice | number | — | New limit price |
stopPrice | number | — | New stop price |
qtyMode | 'ABSOLUTE' | 'RELATIVE' | — | Size mode |
FuturesBatchOrderCancel fields:
| Field | Type | Required | Description |
|---|---|---|---|
order | 'cancel' | ✓ | Operation type |
order_id | string | — | Exchange order ID to cancel |
cliOrdId | string | — | Client order ID to cancel |
Promise<DerivativesAPISuccessResponse<{ batchStatus: FuturesBatchOrderStatus[] }>>
- Submit batch
- Edit & cancel batch
- Mixed batch
Transfers
submitWalletTransfer(params)
Transfers funds between two margin accounts that share the same collateral currency, or between a margin account and the cash account.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/transfer - Auth required: Yes
Source account name, e.g.
flex, cash, or a single-collateral account name like fi_xbtusd.Destination account name.
Currency to transfer, e.g.
BTC, USDT, ETH.Amount to transfer.
Promise<DerivativesAPISuccessResponse<Record<string, never>>>
submitTransferToSpot(params)
Withdraws digital assets from your Futures wallet to your Kraken Spot wallet. Wallet names can be found in the accounts response from getAccounts().
- HTTP method:
POST - Endpoint:
derivatives/api/v3/withdrawal - Auth required: Yes
Currency to withdraw, e.g.
USDT, BTC, ETH.Amount to withdraw as a string.
Source Futures wallet name. Defaults to the cash wallet.
Promise<DerivativesAPISuccessResponse<{ uid: string }>>
submitSubaccountTransfer(params)
Transfers funds between the master account and a subaccount, or between two accounts (margin ↔ cash) on either side.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/transfer/subaccount - Auth required: Yes
UID of the source user (master or subaccount).
UID of the destination user.
Source account name on the
fromUser.Destination account name on the
toUser.Currency to transfer.
Amount to transfer as a string.
Promise<DerivativesAPISuccessResponse<Record<string, never>>>
RFQ (Request for Quote)
All RFQ methods are currently available exclusively in the Kraken Futures DEMO environment and are not available in production.
getOpenRFQs()
Retrieves all currently open RFQs.
- HTTP method:
GET - Endpoint:
derivatives/api/v3/rfqs - Auth required: No
Promise<DerivativesAPISuccessResponse<{ rfqs: FuturesRfq[] }>>
getOpenRFQ(params)
Retrieves a specific open RFQ by its unique identifier.
- HTTP method:
GET - Endpoint:
derivatives/api/v3/rfqs/{rfqUid} - Auth required: No
The unique identifier of the RFQ to retrieve.
Promise<DerivativesAPISuccessResponse<{ rfq: FuturesRfq }>>
getRFQOpenOffers()
Returns all open offers your account has placed on currently open RFQs.
- HTTP method:
GET - Endpoint:
derivatives/api/v3/rfqs/open-offers - Auth required: Yes
Promise<DerivativesAPISuccessResponse<{ openOffers: FuturesOpenOffer[] }>>
submitRFQNewOffer(params)
Places a new offer on an open RFQ. At least one of bid or ask must be provided.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/rfqs/{rfqUid}/place-offer - Auth required: Yes
The RFQ to place an offer on.
Your bid price for the RFQ amount.
Your ask price for the RFQ amount.
Promise<DerivativesAPISuccessResponse<{ offerUid: string }>>
updateRFQOpenOffer(params)
Replaces an existing open offer on an RFQ. At least one of bid or ask must be provided.
- HTTP method:
PUT - Endpoint:
derivatives/api/v3/rfqs/{rfqUid}/replace-offer - Auth required: Yes
The RFQ whose offer to replace.
Updated bid price.
Updated ask price.
Promise<DerivativesAPISuccessResponse<Record<string, never>>>
cancelRFQOffer(params)
Cancels the current open offer on an RFQ.
- HTTP method:
DELETE - Endpoint:
derivatives/api/v3/rfqs/{rfqUid}/cancel-offer - Auth required: Yes
The RFQ whose offer to cancel.
Promise<DerivativesAPISuccessResponse<Record<string, never>>>
Assignment Preferences
Assignment programs allow you to participate in contract assignment when counterparty positions are liquidated.getAssignmentPrograms()
Returns currently active assignment programs.
- HTTP method:
GET - Endpoint:
derivatives/api/v3/assignmentprogram/current - Auth required: Yes
Promise<DerivativesAPISuccessResponse<{ participants: FuturesAssignmentProgram[] }>>
addAssignmentPreference(params)
Adds an assignment program preference for your account.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/assignmentprogram/add - Auth required: Yes
The contract type to opt into for assignment.
Whether to accept long position assignments.
Whether to accept short position assignments.
When to be available for assignment.
Whether this preference is active.
Specific contract symbol (optional, defaults to all contracts of the type).
Maximum position size to accept per assignment.
Maximum total position size to hold via assignment.
Promise<DerivativesAPISuccessResponse<FuturesAssignmentProgram>>
deleteAssignmentPreference(params)
Deletes an assignment program preference by ID.
- HTTP method:
POST - Endpoint:
derivatives/api/v3/assignmentprogram/delete - Auth required: Yes
The ID of the assignment preference to delete.
Promise<DerivativesAPISuccessResponse<FuturesAssignmentProgram>>
getAssignmentPreferencesHistory()
Returns the full history of assignment program preference changes for your account.
- HTTP method:
GET - Endpoint:
derivatives/api/v3/assignmentprogram/history - Auth required: Yes
Promise<DerivativesAPISuccessResponse<{ participants: FuturesAssignmentProgramHistory[] }>>
Utility
generateNewOrderID()
Generates a cryptographically random 32-character string suitable for use as a cliOrdId. This is a synchronous local helper — no API call is made.
Returns: string