NDAX
  • Introduction
    • About NDAX
    • Purpose
  • General Information
  • FIX
    • FIX Straight Through Processing
    • Supported Message Type
    • Resources
    • Sequence Diagram
    • Header & Trailer
    • Administrative Message
      • Logon (35=A)
      • Heartbeat (35=0)
      • TestRequest (35=1)
      • ResendRequest (35=2)
      • Reject (35=3)
      • SequenceReset (35=4)
      • Logout (35=5)
    • Application Message
      • TradeCaptureReport (35=AE)
      • TradeCaptureReportAck (35=AR)
    • Message Component
      • RootParties
      • TrdCapRptSideGrp
      • Parties
  • Web API
    • Endpoints
    • Time
  • Private Endpoints
    • Authentication
    • Index
    • Trades
      • GET Trade
      • POST Trade
      • Batch Trades
    • Positions
      • GET Position
      • GET Platform Position
    • Accounts
      • GET Status
      • Delivery
      • Account
      • History
      • Movement
    • Deposits
      • GET
      • GET: Digital Asset Address
      • POST: Digital Asset Address
      • GET: Fiat Deposit
      • GET: Withdrawal
        • GET: Withdrawal by ID
        • GET: Digital Asset
        • Digital Asset by ID
        • Fiat
        • Fiat by ID
      • Gas Fees
      • POST: Withdrawal
      • Delete: Withdrawal
    • Transfers
      • POST: Transfer
      • GET: Transfer by ID
    • Participants
      • GET
      • GET by Email
      • POST New
      • Region
      • Patch
      • Relation
      • Documents
    • Liquidity
      • GET
      • POST
    • Convert
    • Withdraw
    • Payments
      • POST
      • GET
      • GET Status
    • Rewards & Loyalty
    • Awards
  • Private Socket Feed
    • Overiew
    • Authentication
    • Basic Setup
    • Balances
    • Prices
    • Subscription
  • Security
    • Don't
    • Bounty
  • Contact
Powered by GitBook
On this page
  1. Private Endpoints
  2. Accounts

Account

GET /accounts/:account_id

const getAccount = () => {
  const timestamp = Math.round(Date.now() / 1000)
  const payload = timestamp + 'GET' + '/accounts/e5e18303-a352-4c28-8dab-3779e66a659b' + '{}'
  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/e5e18303-a352-4c28-8dab-3779e66a659b`,
    options
  )
}

Response "message" field contains various fields that provide details about the account, such as the asset type ("e₹"), the account owner ("ABC123"), the account type ("collateral_deficiency"), the account group ("0CDCX"), the account label ("general"), the balance ("0.00"), the account ID ("ce819fe8-b1d7-43bb-961c-e09ede0988d3"), and the last update timestamp (1554395972174).

Sample Response

{
  "message": {
    "asset": "e₹",
    "account_owner": "ABC123",
    "account_type": "collateral_deficiency",
    "account_group": "0CDCX",
    "account_label": "general",
    "balance": "0.00",
    "account_id": "ce819fe8-b1d7-43bb-961c-e09ede0988d3",
    "last_update": 1554395972174
  }
}

Information about a specific account. Response parameters listed below.

Parameter
Description
Type

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 sub account determination used for allocating towards settlements

string

balance

The balance in the account

string

account_id

Unique ID of the specific account

string

last_update

Timestamp of last settlement run

timestamp

account_label

The account label associated with the account

string

PreviousDeliveryNextHistory

Last updated 2 years ago