Account
Real-time updates of your futures positions, orders, conditional orders and TP/SL levels.
Use this stream to keep your positions, active orders, conditional orders and TP/SL levels in sync without polling. Every change to one of them produces one message carrying the full, current object — the same object the Futures REST API returns. Changes made anywhere (web, mobile app, API, the engine itself: fills, TP/SL, liquidation, funding) are pushed to every open connection of your account.
Endpoint
wss://futures-trading-service.outpoll.com/ws/accountAuthentication
Send an API-key-signed AUTH as the first message, within 5 seconds; sign ts + "GET" + "/ws/account". See Futures Account → Authentication.
{
"t": "AUTH",
"d": {
"key": "your-api-key",
"ts": "1790835600",
"sig": "signature"
}
}The server replies {"t":"AUTH","d":{"ok":true}}.
Message Envelope
e
string
Object kind: POSITION, ORDER, CONDITIONAL, TPSL
ts
integer
Server send time, epoch ms
d is shortened here; each payload is described below. Fields inside d are always present; a missing value is null.
Message Types
AUTH
Client → Server
Authenticate with your API key (first message)
AUTH
Server → Client
Authentication acknowledgement {"ok": true}
ping
Client → Server
Plain-text keep-alive
pong
Server → Client
Plain-text answer to ping
POSITION
Server → Client
A position was opened, changed, closed or liquidated
ORDER
Server → Client
An order was placed, filled, changed or cancelled
CONDITIONAL
Server → Client
A conditional (stop / OCO) order was placed, changed, triggered, cancelled or rejected
TPSL
Server → Client
A position TP/SL level was added, changed, triggered or cancelled
The type of a data message is its e field. There is no subscribe message: after AUTH you receive every update of your account.
Actions
e
a
Meaning
POSITION
OPENED
New position opened
POSITION
UPDATED
Position changed and remains open: scale-in, partial close, partial liquidation, funding settlement, bonus change
POSITION
CLOSED
Position fully closed (manual, API, TP/SL, reduce-only, NETTING reversal)
POSITION
LIQUIDATED
Position fully liquidated
ORDER
PLACED
Limit order accepted and resting (st = NEW)
ORDER
FILLED
Order executed: market orders, filled limits, and system-created closes (TP/SL, liquidation)
ORDER
UPDATED
Resting order changed in place (for example, its attached TP/SL)
ORDER
CANCELLED
Order cancelled, by you or by the system
CONDITIONAL
PLACED
Conditional order armed (single stop or each OCO leg)
CONDITIONAL
UPDATED
Pending conditional order amended (trigger, size, attached TP/SL)
CONDITIONAL
TRIGGERED
Trigger reached; the resulting order was placed (it arrives as an ORDER message)
CONDITIONAL
CANCELLED
Cancelled: by you, by the other OCO leg, or by the system
CONDITIONAL
REJECTED
Trigger reached but the resulting order could not be placed
TPSL
ADDED
New TP/SL level set on a position
TPSL
UPDATED
Level price or size changed (same id)
TPSL
TRIGGERED
Level fired; the close order arrives as an ORDER message
TPSL
CANCELLED
Level cancelled, by you or by the system
Position Payload
e = POSITION. Same object as Get Open Positions, with the differences noted below.
id
string
Position ID (UUID)
pi
integer
Pair ID (gid)
s
string
LONG or SHORT
sz
decimal
Size. Linear: base coin. Inverse: USD contracts
e
decimal
Average entry price
l
decimal
Leverage
im
decimal
Initial margin in the settlement coin, incl. bonus part bm
lq
decimal | null
Liquidation price stored on the position at this change; null if none. For CROSS it is not recalculated on price moves — use Get Open Positions for the live value
upn
null
Always null on this stream. Calculate unrealized PnL from market data: best bid for LONG, best ask for SHORT
mmd
string
ISOLATED or CROSS
tf
decimal
Trading fees owed and not yet charged (normally 0)
af
decimal
Funding owed (paid, not yet settled); settled on close
rpn
decimal
Net realized PnL: close PnL − all fees ± funding. Same value as REST
bm
decimal
Bonus locked in margin; 0 if none
bib
decimal
Margin the bonus share was fixed against; bm / bib = bonus-funded fraction on close
Order Payload
e = ORDER. Same object as Place Order.
id
string
Order ID (UUID)
pi
integer
Pair ID
d
string
OPEN_LONG, OPEN_SHORT, CLOSE_LONG, CLOSE_SHORT
ty
string
MARKET or LIMIT
st
string
NEW (resting), FILLED, CANCELLED
q
decimal
Order quantity
fq
decimal
Filled quantity
afp
decimal | null
Average fill price; null until filled
p
decimal | null
Limit price; null for MARKET
l
decimal
Leverage applied
f
decimal
Fee in the settlement coin: maker fee to pay (resting) or fee charged (filled)
rpn
decimal | null
Realized PnL of this fill (closing fills only)
po
string | null
Position ID; null for an unfilled opening limit
ca
integer
Created (placement) time, epoch ms
ea
integer | null
Execution time, epoch ms; null until filled
atp
decimal | null
Attached take-profit price
asl
decimal | null
Attached stop-loss price
mm
string
ISOLATED or CROSS
Conditional Payload
e = CONDITIONAL. Same object as Place Conditional Order.
id
string
Conditional order ID (UUID)
pi
integer
Pair ID
d
string
OPEN_LONG, OPEN_SHORT, CLOSE_LONG, CLOSE_SHORT
ot
string
STOP_MARKET
trp
decimal
Trigger price
q
decimal
Quantity; an estimate at trp for spend-sized orders, final at trigger
s
decimal | null
Spend for spend-sized orders; null otherwise
l
decimal
Leverage
st
string
PENDING, TRIGGERED, CANCELLED, REJECTED
og
string | null
OCO group ID; null for a single stop
ca
number
Created time, epoch seconds with fraction (unlike the other payloads' ms); × 1000 for ms
atp
decimal | null
Attached take-profit price
asl
decimal | null
Attached stop-loss price
mm
string
ISOLATED or CROSS
pm
string
NETTING or HEDGING
TPSL Payload
e = TPSL. One position TP/SL level — the same object as in the position's tpsl array. Merge it into the position with ID po: upsert on ADDED / UPDATED, remove on TRIGGERED / CANCELLED.
id
string
Level ID (UUID)
po
string
Position ID
ty
string
TP or SL
p
decimal
Trigger price
q
decimal | null
Quantity to close; null for an entire-position level
ep
boolean
true = entire-position level, false = partial with fixed q
toi
string | null
ID of the close order the level produced (set on TRIGGERED)
Heartbeat
Send the plain text ping every 20–30 seconds; the server replies pong. Both are plain text, not JSON.
Errors
No error messages are sent. Authentication failures close the connection with code 1008 (auth required). Other unrecognised messages are ignored.
Reconnect
There is no snapshot on connect and no replay of missed messages. On every (re)connect:
Reconnect with exponential backoff and jitter.
Python Example
Was this helpful?

