Skip to content

User ws

Quick Start

Restful API

Public Interface

User Interface

Order Interface

Tax Filing Interface

WebSocket API

WebSocket Introduction

Public Interface

User Interface

Order Interface


1. Query account balance

{
  "id": "2d812f20c9e1030f5551eab0e039f613",
  "method": "user.account",
  "params": {
    "nonce": "17832",
    "timestamp": "1724285700000",
    "apiKey": "9a25209b66004da404d9ddcb48d1e11f",
    "sign": "--signature here--"
    }
}

Parameters

Name Type Mandatory Description
None

Response

{
  "id": "2d812f20c9e1030f5551eab0e039f613",
  "code": "0",
  "msg": "success",
  "data": [//Account Information
    {
      "coin": "BTC",//Coin
      "balance": 10000.00,//Balance
      "balanceLocked": 1000.00//Locked Balance
    }
  ]
}

2. Get user information

Same semantics as REST user ยท Get user information: returns the uid for the API key; for a sub-account key, returns the linked master account uid. Signing rules are in WebSocket Introduction.

{
  "id": "2d812f20c9e1030f5551eab0e039f613",
  "method": "user.info",
  "params": {
    "nonce": "17832",
    "timestamp": "1724285700000",
    "apiKey": "9a25209b66004da404d9ddcb48d1e11f",
    "sign": "--signature here--"
    }
}

Parameters

Name Type Mandatory Description
None

Response

{
  "id": "2d812f20c9e1030f5551eab0e039f613",
  "code": "0",
  "msg": "success",
  "data": {
    "uid": 681979174
  }
}

The data object follows the same contract as REST: uid is int64 and may be null.