# Account Channel

### Description

Data will be pushed when the following events occurred:
1. Push on first-time subscription
2. Push when spot/margin/futures orders are filled in the unified trading account
3. Push when the fund settlement is done
4. Push when balance changes (transfers, airdrops, loans, etc.)

<div className="api-aligning">

```json title="Request Example"
{
    "op": "subscribe",
    "args": [
        {
            "instType": "UTA",
            "topic": "account"
        }
    ]
}
```

### Request Parameters

| Parameter    |  Type      | Required | Description                                          | 
|:-----------------|:--------------------|:---------|:-----------------------------------------------------|
| op               | String              | Yes      | Operation <br/> `subscribe`/`unsubscribe`            |
| args             | List&lt;Object&gt;  | Yes      | Subscribed channels                                  |
| &gt; instType    | String              | Yes      | Product Type <br/> `UTA` Unified trading account     |
| &gt; topic       | String              | Yes      | Topic<br/>`account`                                  |


</div>

<div className="api-br-10"></div>

<div className="api-aligning">

```json title="Response Example"
{
    "event": "subscribe",
    "arg": {
        "instType": "UTA",
        "topic": "account"
    },
    "connId": "xxxxxxxxxx"
}
```

### Response Parameters
| Parameter    |  Type | Description                                                                                         | 
|:----------------|:---------------|:----------------------------------------------------------------------------------------------------|
| event           | String         | Operation <br/> `subscribe` Subscribe <br/> `unsubscribe` Unsubscribe <br/> `error` Parameter Error |
| arg             | Object         | Subscribed Channel                                                                                  |
| &gt; instType  | String         | Product Type <br/> `UTA`                                                                            |
| &gt; topic     | String         | Topic <br/> `account`                                                                        |
| code            | String         | Error Code                                                                                          |
| msg             | String         | Error Message                                                                                       |
| connId          | String         | Connection ID                                                                                       |

</div>


<div className="api-br-10"></div>


<div className="api-aligning">

```json title="Push Data"
{
  "data": [{
    "unrealisedPnL": "-10116.55",
    "totalEquity": "4976919.05",
    "positionMgnRatio": "0",
    "mmr": "408.08",
    "effEquity": "4847952.35",
    "imr": "17795.97",
    "mgnRatio": "0",
    "coin": [{
      "debts": "0",
      "balance": "0.9992",
      "available": "0.9992",
      "borrow": "0",
      "locked": "0",
      "equity": "0.9992",
      "coin": "ETH",
      "usdValue": "2488.667472",
      "bonus": "0"
    }, {
      "debts": "0",
      "balance": "52.00819",
      "available": "52.00819",
      "borrow": "0",
      "locked": "0",
      "equity": "52.00819",
      "coin": "BTC",
      "usdValue": "4630564.31304974",
      "bonus": "0"
    }, {
      "debts": "0",
      "balance": "354411.45536458",
      "available": "344282.65536458",
      "borrow": "0",
      "locked": "0",
      "equity": "344282.65536458",
      "coin": "USDT",
      "usdValue": "343866.07335159",
      "bonus": "10"
    }]
  }],
  "arg": {
    "instType": "UTA",
    "topic": "account"
  },
  "action": "snapshot",
  "ts": 1740546523244
}
```

### Push Parameters

| Parameter            | Type   | Description                                                                                                                            |
|----------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------|
| action               | String | Action <br/>`snapshot` Full data <br/>`update` Incremental data                                                                        |
| ts                   | Number | Timestamp                                                                                                                              |
| arg                  | Object | Subscribe channel                                                                                                                      |
| &gt; instType        | String | Product type<br/> `UTA`                                                                                                                |
| &gt; topic           | String | Topic<br/>`account`                                                                                                                    |
| data                 | List   | Subscribed data                                                                                                                        |
| &gt; totalEquity     | String | Account equity (USD)                                                                                                                   |
| &gt; effEquity       | String | Effective margin (USD)<br/> The net value available for margin in spot and perpetual trades under cross-margin mode, converted to fiat |
| &gt; mmr             | String | Maintenance margin (USD) <br/>The minimum margin required to maintain the position, converted to fiat                                  |
| &gt; imr             | String | Initial margin (USD) Total initial margin of assets in base coin, converted to fiat                                                    |
| &gt; mgnRatio        | String | Margin ratio                                                                                                                           |
| &gt;positionMgnRatio | String | Hold position margin ratio                                                                                                             |
| &gt; unrealisedPnL   | String | Unrealised profit and loss                                                                                                             |
| &gt; coin            | List   | Coin list                                                                                                                              |
| &gt;&gt; coin        | String | Coin name                                                                                                                              |
| &gt;&gt; balance     | String | Coin balance                                                                                                                           |
| &gt;&gt; locked      | String | Locked amount <br/> _Only applicable for spot order placement_                                                                         |
| &gt;&gt; equity      | String | Coin equity (USD)                                                                                                                      |
| &gt;&gt; usdValue    | String | Coin value (USD)                                                                                                                       |
| &gt;&gt; available   | String | Available balance                                                                                                                      |
| &gt;&gt; borrow      | String | Borrowed amount                                                                                                                        |
| &gt;&gt; debts       | String | Debt <br/> _Only applicable for margin trading_                                                                                        |
| &gt;&gt; bonus       | String | USDT bonus amount                                                                                                                      |


</div>




