Skip to main content
WSS
/
Use JSON-RPC post with params.type: "action" to call all Exchange/action endpoints from the REST API reference over WebSocket.

Example Request

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "post",
  "params": {
    "type": "action",
    "payload": {
      "action": {
        "data": {
          "collateralId": 1,
          "amount": "50",
          "toDerivativesAccount": false,
          "nonce": 1774279181328
        },
        "type": "internalBalanceTransferRequest"
      },
      "signature": "0x22ea3cd743b8c1090ab6987fddfec85d9d9d459e9ca2060295243b0a2065247424b431b6f7bbd60e1f0b0540b1de390c760eb6c518455430fbd64f5ba0451ef11c",
      "nonce": 1774279181328
    }
  }
}
Messages
JSON-RPC post action request
type:object

Request-response call over WebSocket for Exchange action REST methods.

JSON-RPC post response
type:object

Success or error response for post requests.