πUser Data Stream
Websocket User Data Stream API Documentation
General WSS information
A User Data Stream
listenKeyis valid for 60 minutes after creation.Doing a
PUTon alistenKeywill extend its validity for 60 minutes.Doing a
DELETEon alistenKeywill close the stream.User Data Streams are accessed at /openapi/ws/<listenKey>
A single connection to api endpoint is only valid for 24 hours; expect to be disconnected at the 24 hour mark
User data stream payloads are not guaranteed to be in order during heavy periods; make sure to order your updates using E
API Endpoints
Create a listenKey
POST /openapi/v1/userDataStreamStart a new user data stream. The stream will close after 60 minutes unless a keepalive is sent.
Weight: 1
Parameters:
recvWindow
LONG
NO
timestamp
LONG
YES
Response:
Ping/Keep-alive a listenKey
Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes.
Weight: 1
Parameters:
listenKey
STRING
YES
recvWindow
LONG
NO
timestamp
LONG
YES
Response:
Close a listenKey
Close out a user data stream.
Weight: 1
Parameters:
listenKey
STRING
YES
recvWindow
LONG
NO
timestamp
LONG
YES
Response:
Web Socket Payloads
Account Update
Account state is updated with the outboundAccountInfo event.
Payload:
Order Update
Orders are updated with the executionReport event. Check the API documentation and below for relevant enum definitions. Average price can be found by doing Z divided by z.
Payload:
Spot:
Contract:
Execution types:
NEW
PARTIALLY_FILLED
FILLED
CANCELED
REJECTED
Position Update
Payload:
Last updated