GET Status

GET /accounts

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.

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?

Last updated