GET Status
GET /accounts
GET /accountsconst 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 byaccount_label(optional) the account label to filter the response byaccount_owner(optional) the account owner value to filter the response byasset(optional) the asset to filter the response byaccount_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.
asset
The asset code for the specific account, e.g. e₹
string
account_owner
The code of the participant that owns the account
string
account_type
available, collateral, payable, receivable or collateral_deficiency
string
account_group
The group that the account is a part of
string
account_label
The account label associated with the account
string
balance
The balance in the account
string
account_id
Unique ID of the specific account
string
last_update
Timestamp when the account balance was updated
timestamp
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:
availablerefers to assets that are free for use in trading, settling, for paying fees or withdrawingcollateralrefers to assets that are currently being held for open positions, if/when a trade has been collateralized by the platformpayablerefers to a settlement amount you must pay that is outstanding due having insufficientavailablebalance, or due to your counterparty having insufficientavailablebalancereceivablerefers to a settlement amount you will receive, but has not been paid due to you having insufficientavailablebalance to fulfill your side, or due to your counterparty having insufficientavailablebalance to fulfill theirscollateral_deficiencyrefers 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