Skip to main content

Websocket User Data Streams

  • The base API endpoint is: https://api.mexc.com
  • A User Data Stream listenKey is valid for 60 minutes after creation.
  • Doing a PUT on a listenKey will extend its validity for 60 minutes.
  • Doing a DELETE on a listenKey will close the stream and invalidate the listenKey.
  • websocket baseurl: wss://wbs-api.mexc.com/ws
  • User Data Streams are accessed at /ws?listenKey=listenKey
    For example, when using the encrypted WebSocket protocol: wss://wbs-api.mexc.com/ws?listenKey=pqia91ma19a5s61cv6a81va65sd099v8a65a1a5s61cv6a81va65sdf19v8a65a1
  • A single connection is only valid for 24 hours; expect to be disconnected at the 24 hour mark.
  • Each UID can apply for a maximum of 60 listen keys (excluding invalid listen keys).
  • Each listen key maximum support 5 websocket connection (which means each uid can applies for a maximum of 60 listen keys and 300 ws links).