# GET Status

#### `GET /accounts` <a href="#get-accounts" id="get-accounts"></a>

```
const getAccounts = () => {
  const timestamp = Math.round(Date.now() / 1000)
  const payload = timestamp + 'GET' + '/accounts' + '{}'
  const decodedSecret = Buffer.from(apiSecret, 'base64')
  const hmac = crypto.createHmac('sha256', decodedSecret)
  const signedPayload = hmac.update(payload).digest('base64')

  // SET HEADERS
  const headers = {
    'X-NDAX-API-KEY': 'public_key',
    'X-NDAX-SIGNED': signedPayload,
    'X-NDAX-TIMESTAMP': timestamp,
    'X-NDAX-PASSPHRASE': 'passphrase'
  }
  const options = {
    headers,
    body,
    json: true
  }

  return request.get(`https://api.ndax.in/accounts`, options)
}
```

> Sample Response

```
{
  "message": [
    {
      "asset": "e₹",
      "account_owner": "ABCDEF",
      "account_type": "collateral_deficiency",
      "account_group": "XYZ456",
      "account_label": "general",
      "balance": "0.00",
      "account_id": "ce819fe8-b1d7-43bb-961c-e09ede0988d3",
      "last_update": 1554395972174
    }
  ],
  "page": 1,
  "total_pages": 1
}
```

Query parameters include:

* `page` (optional) the page you would like to request (responses are paginated to 200 records per page)
* `account_group` (optional) the account group to filter the response by
* `account_label` (optional) the account label to filter the response by
* `account_owner` (optional) the account owner value to filter the response by
* `asset` (optional) the asset to filter the response by
* `account_type` (optional) the account\_type to filter the response by

Returns an array of all accounts with a non-zero balance maintained at NDAX and their balances as of the most recent settlement run. Response parameters listed below.

<table><thead><tr><th>Parameter</th><th width="414.3333333333333">Description</th><th>Type</th></tr></thead><tbody><tr><td>asset</td><td>The asset code for the specific account, e.g. e₹</td><td>string</td></tr><tr><td>account_owner</td><td>The code of the participant that owns the account</td><td>string</td></tr><tr><td>account_type</td><td><code>available</code>, <code>collateral</code>, <code>payable</code>, <code>receivable</code> or <code>collateral_deficiency</code></td><td>string</td></tr><tr><td>account_group</td><td>The group that the account is a part of</td><td>string</td></tr><tr><td>account_label</td><td>The account label associated with the account</td><td>string</td></tr><tr><td>balance</td><td>The balance in the account</td><td>string</td></tr><tr><td>account_id</td><td>Unique ID of the specific account</td><td>string</td></tr><tr><td>last_update</td><td>Timestamp when the account balance was updated</td><td>timestamp</td></tr></tbody></table>

**Assets**

Refer to our FAQ page to see which assets we support and their corresponding asset codes.

**Account Type**

Account types refer to their utilization. NDAX maintains 5 account types:

* `available` refers to assets that are free for use in trading, settling, for paying fees or withdrawing
* `collateral` refers to assets that are currently being held for open positions, if/when a trade has been collateralized by the platform
* `payable` refers to a settlement amount you must pay that is outstanding due having insufficient `available` balance, or due to your counterparty having insufficient `available` balance
* `receivable` refers to a settlement amount you will receive, but has not been paid due to you having insufficient `available` balance to fulfill your side, or due to your counterparty having insufficient `available` balance to fulfill theirs
* `collateral_deficiency` refers to the amount that is owed by the participant to cover collateral requirements

Refer to our FAQ for more information: What types of accounts are supported?

**Account Group**

Account groups are utilized as part of the NDAX settlement infrastructure, to determine for which purpose the funds in the account have been allocated. Generally, an account group refers to a platform.

Refer to our FAQ for more information: What is an account group?

**Account Label**

Account Labels can be thought of as “sub account groups”. Within each account group, you can have many Account Labels. They are used to separate funds at a more granular level. The default value is `general`.

Refer to our FAQ for more information: What is an Account Label?
