Skip to main content

Documentation Index

Fetch the complete documentation index at: https://kraken-sandbox.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

WSSfutures.kraken.com/ws/v1open_orders
This subscription feed publishes information about user open orders.

Request

event
string
required
subscribe or unsubscribe
feed
string
required
The requested subscription feed. Value: open_orders
api_key
string
required
The user API key.
original_challenge
string
required
The message that is received from a challenge request.
signed_challenge
string
required
The signed challenge message with user API secret.
{
  "event": "subscribe",
  "feed": "open_orders",
  "api_key": "CMl2SeSn09Tz+2tWuzPiPUjaXEQRGq6qv5UaexXuQ3SnahDQU/gO3aT+",
  "original_challenge": "226aee50-88fc-4618-a42a-34f7709570b2",
  "signed_challenge": "RE0DVOc7vS6pzcEjGWd/WJRRBWb54RkyvV+AZQSRl4+rap8Rlk64diR+Z9DQILm7qxncswMmJyvP/2vgzqqh+g=="
}

Response Success

event
string
One of: subscribed, subscribed_failed, unsubscribed, unsubscribed_failedThe result.
feed
string
The requested subscription feed. Value: open_orders
api_key
string
The user API key.
original_challenge
string
The message that is received from a challenge request.
signed_challenge
string
The signed challenge message with user API secret.
{
  "event": "subscribed",
  "feed": "open_orders",
  "api_key": "CMl2SeSn09Tz+2tWuzPiPUjaXEQRGq6qv5UaexXuQ3SnahDQU/gO3aT+",
  "original_challenge": "226aee50-88fc-4618-a42a-34f7709570b2",
  "signed_challenge": "RE0DVOc7vS6pzcEjGWd/WJRRBWb54RkyvV+AZQSRl4+rap8Rlk64diR+Z9DQILm7qxncswMmJyvP/2vgzqqh+g=="
}

Response Snapshot

feed
string
The subscribed feed.
account
string
The user account.
orders
list of structures
The user open orders.
{
  "feed": "open_orders_snapshot",
  "account": "e258dba9-4dd4-4da5-bfef-75beb91c098e",
  "orders": [
    {
      "instrument": "PF_XBTUSD",
      "time": 1612275024153,
      "last_update_time": 1612275024153,
      "qty": 1000,
      "filled": 0,
      "limit_price": 34900,
      "stop_price": 13789,
      "type": "stop",
      "order_id": "723ba95f-13b7-418b-8fcf-ab7ba6620555",
      "direction": 1,
      "reduce_only": false,
      "triggerSignal": "last"
    },
    {
      "instrument": "PF_XBTUSD",
      "time": 1612275024153,
      "last_update_time": 1612275178153,
      "qty": 12,
      "filled": 0,
      "stop_price": 3200.1,
      "type": "trailing_stop",
      "order_id": "59302619-41d2-4f0b-941f-7e7914760ad3",
      "direction": 1,
      "reduce_only": false,
      "triggerSignal": "mark",
      "trailing_stop_options": {
        "max_deviation": 20.0,
        "unit": "percent"
      }
    },
    {
      "instrument": "PF_XBTUSD",
      "time": 1612275209430,
      "last_update_time": 1612275209430,
      "qty": 1000,
      "filled": 0,
      "limit_price": 35058,
      "stop_price": 0,
      "type": "limit",
      "order_id": "7a2f793e-26f3-4987-a938-56d296a11560",
      "direction": 1,
      "reduce_only": false
    }
  ]
}

Response Delta

feed
string
The subscribed feed.
order
structure
The user order.
is_cancel
boolean
If false the open order has been either placed or partially filled and needs to be updated. If true the open order was either fully filled, cancelled or rejected (for post-only). If it was filled or cancelled it must be removed from open orders snapshot.
reason
string
Reason behind the received delta:
  • new_placed_order_by_user: User placed a new order
  • liquidation: User position liquidated. The order cancelled
  • stop_order_triggered: A stop order triggered. The system removed the stop order
  • limit_order_from_stop: The system created a limit order because an existing stop order triggered
  • partial_fill: The order filled partially
  • full_fill: The order filled fully and removed
  • cancelled_by_user: The order cancelled by the user and removed
  • contract_expired: The order contract expired. All open orders of that contract removed
  • not_enough_margin: The order removed due to insufficient margin
  • market_inactive: The order removed because market became inactive
  • cancelled_by_admin: The order removed by administrator’s action
  • dead_man_switch: The order removed because dead man’s switch was triggered
  • ioc_order_failed_because_it_would_not_be_executed: The immediate or cancel order was rejected due to insufficient liquidity
  • post_order_failed_because_it_would_filled: The post only order was rejected as it crosses the spread and would be immediately filled
  • would_execute_self: The order was rejected as it would execute against another order from the same account
  • would_not_reduce_position: The order was rejected as the reduce-only option was selected and it would not reduce the position
  • order_for_edit_not_found: The order edit was rejected as the order to be edited could not be found
{
  "feed": "open_orders",
  "order": {
    "instrument": "PF_XBTUSD",
    "time": 1567702877410,
    "last_update_time": 1567702877410,
    "qty": 304.0,
    "filled": 0.0,
    "limit_price": 10640.0,
    "stop_price": 0.0,
    "type": "limit",
    "order_id": "59302619-41d2-4f0b-941f-7e7914760ad3",
    "direction": 1,
    "reduce_only": true
  },
  "is_cancel": false,
  "reason": "new_placed_order_by_user"
}

Response Error

event
string
Value: error
message
string
One of: Invalid feed, Json ErrorAn error message.
{
  "event": "error",
  "message": "Invalid feed"
}