Skip to main content
Receive real-time updates on your positions.
  • Topic: position
  • Stream: Private (wss://api.ekiden.fi/ws/private)

Authenticate

Use authentication flow described in the Connect page.

Subscribe

{ "op": "subscribe", "args": ["position"], "req_id": "202001" }
Ack:
{ "op": "subscribed", "args": ["position"], "req_id": "202001" }

Events

Messages arrive with op: "event", topic: "position", and data is an array of Position. Example:
{
	"op": "event",
	"topic": "position",
	"server_ts_ms": 1731541800000,
	"data": [
		{
			"risk_id": 1,
			"risk_limit_value": "100000000",
			"symbol": "BTC-USDC",
			"sub_account_address": "0xsubacct...",
			"side": "Sell",
			"size": "250",
			"avg_price": "100100",
			"position_value": "25025000",
			"margin_mode": "Cross",
			"position_balance": "50000",
			"position_status": "Normal",
			"leverage": "10",
			"mark_price": "100200",
			"liq_price": "100000",
			"bust_price": "95000",
			"position_im": "1200",
			"position_im_by_mp": "1210",
			"position_mm": "800",
			"position_mm_by_mp": "810",
			"unrealized_pnl": "-25",
			"unrealized_funding": "0",
			"realized_pnl_cur": "0",
			"realized_pnl_cum": "1000",
			"cum_funding": "-5",
			"adl_rank_indicator": "Zero",
			"is_reduce_only": false,
			"created_time": "1731541700000",
			"updated_time": "1731541800000",
			"seq": 999
		}
	]
}
Field notes:
  • Numeric values are encoded as strings to preserve precision.
  • Times (created_time, updated_time) are Unix milliseconds (encoded as strings).

Fields

FieldTypeNotes
risk_idintegerRisk tier ID
risk_limit_valuestringRisk limit value
symbolstringSymbol name
sub_account_addressstringSub-account address
sidestringBuy (long) or Sell (short)
sizestringPosition size (always positive)
avg_pricestringAverage entry price
position_valuestringPosition value
margin_modestringCross or Isolated
position_balancestringPosition margin
position_statusstringNormal, Liq, Adl
leveragestringPosition leverage
mark_pricestringMark price
liq_pricestringLiquidation price
bust_pricestringBankruptcy price
position_imstringInitial margin
position_im_by_mpstringInitial margin (mark price)
position_mmstringMaintenance margin
position_mm_by_mpstringMaintenance margin (mark price)
take_profitstring or nullTake profit price
stop_lossstring or nullStop loss price
trailing_stopstring or nullTrailing stop distance
unrealized_pnlstringUnrealized PnL (mark)
unrealized_fundingstringNet unsettled funding PnL
realized_pnl_curstringCurrent realized PnL since position creation
realized_pnl_cumstringCumulative realized PnL
cum_fundingstringNet realized funding PnL
adl_rank_indicatorstringAuto-deleverage rank
is_reduce_onlybooleanReduce-only flag
created_timestringCreated time (ms)
updated_timestringUpdated time (ms)
seqintegerCross sequence
mmr_sys_update_timestring or nullSystem MM update time (ms)
leverage_sys_updated_timestring or nullSystem leverage update time (ms)
See schema details in AsyncAPI: Position.