Recent Orders

This endpoint allows receiving the last 100 order related events. The orders are returned in the same order as they occurred.

Authentication is required.

Endpoint

Request Type Permissible API Keys
/api/v3/recentorders
GET Read, Read-write, Master
Argument Type Required Description
symbol
string No The symbol of the futures contract. 
Sample Calls

https://futures.kraken.com/derivatives/api/v3/recentorders

https://futures.kraken.com/derivatives/api/v3/recentorders?symbol=pi_ethusd

Sample Return if Successful

 

{
"result" : "success",
"serverTime":"2019-05-09T11:48:27.507Z",
"orderEvents": [
{
"timestamp": 1550250827587,
"event": {
"timestamp": "1550250827587",
"uid": "41803af4-150b-4724-89ac-e9ca65b5a15f",
"orderPlaced": {
"order": {
"uid": "80280424-0aca-4df9-8c0e-a91c59ff15a0",
"accountId": "1234",
"tradeable": "PI_BCHUSD",
"direction": "BUY",
"quantity": "1",
"filled": "0",
"timestamp": "1550250827587",
"limitPrice": "110",
"orderType": "LIMIT",
"clientId": "",
"stopPrice": ""
},
"reason": "NEW_USER_ORDER"
}
}
},
{
"timestamp": 1550250849804,
"event": {
"timestamp": "1550250849804",
"uid": "9d77a9d1-e556-4808-ae87-bc29f47c5196",
"orderCancelled": {
"order": {
"uid": "b83a9c64-9c20-4272-ba49-08543b16497f",
"accountId": "1234",
"tradeable": "PI_BCHUSD",
"direction": "BUY",
"quantity": "1",
"filled": "0",
"timestamp": "1550250827587",
"limitPrice": "110",
"orderType": "LIMIT",
"clientId": "",
"stopPrice": ""
},
"reason": "CANCELLED_BY_USER"
}
}
},
{
"timestamp": 1550663225607,
"event": {
"timestamp": "1550663225607",
"uid": "9b5972c1-19ee-461c-8c6b-a6a7c3eccbd8",
"orderRejected": {
"order": {
"uid": "5f7e2329-37b5-4e46-8b1c-5b3a0bb7bcf8",
"accountId": "1234",
"tradeable": "PI_BCHUSD",
"direction": "BUY",
"quantity": "1",
"filled": "0",
"timestamp": "1550663225607",
"limitPrice": "147",
"orderType": "POST_ONLY",
"clientId": "",
"stopPrice": ""
},
"reason": "POST_WOULD_EXECUTE"
}
}
},
{
"timestamp": 1550700823833,
"event": {
"timestamp": "1550700823833",
"uid": "07392b6e-7a10-485a-82f4-0e9fee25de1b",
"executionEvent": {
"execution": {
"uid": "03f74113-9709-4cef-b3e9-2851bb5d64e9",
"takerOrder": {
"uid": "9b03b740-8ac4-4d0c-972b-e80895e51dce",
"accountId": "1234",
"tradeable": "PI_BCHUSD",
"direction": "BUY",
"quantity": "1",
"filled": "0",
"timestamp": "1550700823833",
"limitPrice": "145.6",
"orderType": "IMMEDIATE_OR_CANCEL",
"clientId": "",
"stopPrice": ""
},
"timestamp": "1550700823833",
"quantity": "1",
"price": "144.2",
"markPrice": "144.05000000000",
"limitFilled": False
}
}
}
}
]
}

Field

Type Description
result
string Always success
serverTime
ISO8601 datetime The server date and time
orderEvents
Array of structures 

An array containing structures of types:

  • orderPlaced
  • orderCancelled
  • orderRejected
  • executionEvent
timestamp Unix timestamp The event timestamp
uid UUID The event unique identifier. 

 

 

Order Placed

reason

string

A brief description of the event, one of:

  • NEW_USER_ORDER : A new order that was placed by the user.
  • LIQUIDATION_ORDER: An order placed by the system for liquidation purposes
  • LIMIT_FROM_STOP: A new limit order placed because a stop order order was triggered
order
structure The order associated with the event
uid
UUID The unique order identifier. 
accountId
integer (string format) The account id
tradeable string The tradeable (symbol) of the futures contract
direction string Buy for buy orders and SELL for sell orders

quantity

positive integer (string format) The quantity (size) of the order
filled positive  integer (string format) The filled amount of the order
timestamp Unix timestamp (string format) The order timestamp
limitPrice positive float (string format) The limit price associated with the order.
orderType  string

 One of:

  • LIMIT
  • IMMEDIATE_OR_CANCEL
  • POST_ONLY
  • LIQUIDATION
  • ASSIGNMENT
clientId string  The provided client order id or an empty string.
stopPrice positive float (string format) The stop price of a stop order. Applies only for STOP orders otherwise an empty string is returned

Order Cancelled

reason  string One of:
  • STOP_ORDER_TRIGGERED: A stop order that triggers cancels itself and places a new limit order.
  • CANCELLED_BY_USER: User cancelled an order through the API
  • CONTRACT_EXPIRED: The order was cancelled because the contract that was placed upon has expired
  • NOT_ENOUGH_MARGIN: The order was cancelled due to lack of funds in the margin account
  • DEAD_MAN_SWITCH: The activation of the dead man switch cancelled the order
  • CANCELLED_BY_ADMIN: The order was cancelled by the system administrator
  • MARKET_INACTIVE: The market is inactive and cannot accept any orders
order structure See Order Placed Event

Order Rejected

reason  

A brief description of the event, one of:

  • POST_WOULD_EXECUTE: A post-only order would be executed if not rejected. Applies only for POST orders
  • IOC_WOULD_NOT_EXECUTE: An immediate or cancel order would not get executed. Applies only for IOC (market) orders
  • WOULD_EXECUTE_SELF: The order would execute against an order one of the same account.
order structure

See Order Placed Event

Execution Event

execution  structure

The execution associated with the event

uid UUID

The unique identifier of the execution

timestamp

Unix timestamp (string format) The execution timestamp
price positive float (string format) 

The execution price

markPrice positive float (string format) 

The market price at the time/

limitFilled Boolean True if the maker order of the execution was filled in its entirety otherwise False
takerOrder / makerOrder structure See Order Placed Event
Sample Return if Unsuccessful
{  
"result":"error",
"serverTime":"2016-02-25T09:45:53.818Z",
   "error":"apiLimitExceeded",
}

Field

Type Description
result
String Always error
serverTime
ISO8601 datetime The server date and time
error
string

The reason the API call failed, either of:

  • apiLimitExceeded: the API limit for the calling IP address has been exceeded
  • authenticationError: the request could not be authenticated
  • accountInactive: the Crypto Facilities account the request refers to is inactive
  • invalidArgument: <argument>:argument "<argument>" is invalid
  • nonceBelowThreshold: <threshold> the provided nonce is below the <threshold>
  • nonceDuplicate: <duplicate> the provided nonce is a duplicate as it has been used in a previous request