Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.wooxpro.com/llms.txt

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

【Private】Position Channel

Get Position Data

Pushing Rules

  1. User login required
  2. After subscribing, then the changes will be pushed
  3. 10 seconds timed push

Request

Request
{
    "action": "subscribe",
    "args":["futures/position"]
}
Message Format: {"action":"subscribe","args":["<channel>"]}
  • actions: subscribe
  • channel: Channel name futures/position, fixed value

Response

Response
{
  "group": "futures/position",
  "data": [
    {
      "symbol": "BTCUSDT",
      "hold_volume": "2000",
      "position_type": 1,
      "open_type": 1,
      "frozen_volume": "0",
      "close_volume": "0",
      "hold_avg_price": "19406.2092",
      "close_avg_price": "0",
      "open_avg_price": "19406.2092",
      "liquidate_price": "15621.998406",
      "create_time": 1662692862255,
      "update_time": 1662692862255,
      "position_mode": "hedge_mode"
    }
  ]
}
Return data description:
FieldTypeDescription
symbolStringContract pair (e.g. BTCUSDT)
hold_volumeStringNumber of positions
position_typeIntPosition type
-1=long
-2=short
open_typeIntOpen position type
-1=isolated
-2=cross
frozen_volumeStringFrozen volume
close_volumeStringClose volume
hold_avg_priceStringAverage price of a position
close_avg_priceStringAverage close price
open_avg_priceStringAverage opening price
liquidate_priceStringLiquidation price
create_timeLongPosition created timestamp (ms)
update_timeLongPosition updated timestamp (ms)
position_modeStringPosition mode
-hedge_mode
-one_way_mode