Skip to main content

Websocket User Data Request

API Description#

  • User data request need a successful connection with the user data stream with a listenKey.
  • The following data can be sent through the websocket instance in order to request for user data. Examples can be seen below.
  • The id used in the JSON payloads is an unsigned INT used as an identifier to uniquely identify the messages going back and forth.

Request Form#

Response

{    "result"[        {            "req":"`<listenKey>`@account",   // request name 1            "res":            // response to the request name 1                ...        },        {            "req":"`<listenKey>`@balance",   // request name 2, if existing            "res":            // response to the request name 2, if existing                ...        }    ]    "id": 12     // request ID}

Request Example#

  • Request

    {    

    "method": "REQUEST",
    "params":
    [
    "<listenKey>@account", // request name 1
    "<listenKey>@balance" // request name 2, if existing
    ],
    "id": 12 // request ID.
    }