Skip to main content

Open Position

CHANNEL

wss://futures.kraken.com/ws/v1

open_positions

This subscription feed publishes the open positions of the user account.

Request

MESSAGE BODY

event string required
subscribe or unsubscribe
feed string required
The requested subscription feed open_positions
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

Response Success

MESSAGE BODY

event string
The result, subscribed or subscribed_failed or unsubscribed or unsubscribed_failed
feed string
The requested subscription feed open_positions
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

Response Snapshot

MESSAGE BODY

feed string
The subscribed feed
account string
The user account
positions list of structures
A list containing the user open positions.
instrument string
The instrument (referred also as symbol or product_id) of the order
balance float
The size of the position.
entry_price positive float
The average entry price of the instrument.
mark_price positive float
The market price of the position instrument.
index_price positive float
The index price of the position instrument.
pnl float
The profit and loss of the position.
liquidation_threshold float
The mark price of the contract at which the position will be liquidated.
return_on_equity float
The percentage gain or loss relative to the initial margin used in the position. Formula: PnL/IM
unrealized_funding float
Unrealised funding from funding rate
effective_leverage float
How leveraged the net position is in a given margin account. Formula: Position Value at Market / Portfolio Value.
initial_margin float
The initial margin for the open position.
initial_margin_with_orders float
The initial margin for the open position and open orders of the same instrument.
maintenance_margin float
The maintenance margin for the open.
pnl_currency float
The profit currency for the position, not returned for inverse positions.
seq float
The message sequence.
timestamp float
The unix timestamp of open positions state in milliseconds.

Response Error

MESSAGE BODY

event string
Always error
message string
An error message out of:
Invalid product id
Invalid feed
Json Error