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 Socket Feed

Prices

The price feed provides real-time Bid/Ask price levels of up to a depth of 10 for the available symbols.

Listing available symbols

The symbols available for subscription can be fetched by sending a message of type info and with the topic set to available-symbols.

{
  "messageType": "info",
  "topic": "available-symbols",
  "key": "API_PUBLIC_KEY",
  "passphrase": "PASSPHRASE",
  "timestamp": "TIMESTAMP",
  "signature": "SIGNATURE"
}

Available symbols response

{
  "messageType": "info",
  "topic": "available-symbols",
  "body": {
    "message": [
      "BTC/e₹",
      "ETH/e₹",
      "LTC/e₹",
      ...
    ]
  }
}

Subscribing to a Symbol

In order to subscribe to the price feed, a message of type subscribe must be sent.

{
  "messageType": "subscribe",
  "topic": "prices",
  "body": {
    "filter": {
      "symbol": "BTC/e₹"
    }
  },
  "key": "API_PUBLIC_KEY",
  "passphrase": "PASSPHRASE",
  "timestamp": "TIMESTAMP",
  "signature": "SIGNATURE"
}
Parameter
Description
Type

body{}

An object used to filter which symbol will be subscribed to. This is a required field for the price feed.

object

messageType

Subscription message type - subscribe

string

topic

Topic to subscribe to - prices for the price feed

string

key

Your public key

string

passphrase

Your passphrase

string

timestamp

Time in seconds since Unix Epoch

string

signature

your hmac signature

string

Subscription response

{
  "body": "Successfully subscribed to the BTC/e₹ feed",
  "messageType": "Subscribe"
}

Price update

After successfully subscribing to a symbol, you will be sent price-updated messages whenever the price is updated.

Parameter
Description
Type

bid_levels[]

Array of Bid price levels (up to a depth of 10)

string

ask_levels[]

Array of Ask price levels (up to a depth of 10)

string

symbol

The symbol which was subscribed to

string

messageType

Price update message type - price-update

string

The price level object comprises these fields:

Parameter
Description
Type

price

The level price

string

quantity

The level quantity

string

side

The level side - buy or sell

string

{
  "messageType": "price-update",
  "body": {
    "symbol": "BTC/e₹",
    "bid_levels": [
      {
        "price": "17260.4677",
        "quantity": "4.50",
        "side": "buy"
      },
      {
        "price": "17255.445175",
        "quantity": "2.77",
        "side": "buy"
      },
      {
        "price": "17251.475275",
        "quantity": "2.55",
        "side": "buy"
      },
      {
        "price": "17245.941475",
        "quantity": "3.34",
        "side": "buy"
      }
    ],
    "ask_levels": [
      {
        "price": "17317.16195",
        "quantity": "14.59",
        "side": "sell"
      },
      {
        "price": "17320.83275",
        "quantity": "65.77",
        "side": "sell"
      },
      {
        "price": "17324.872625",
        "quantity": "15.54",
        "side": "sell"
      },
      {
        "price": "17330.139425",
        "quantity": "9.09",
        "side": "sell"
      }
    ]
  }
}
PreviousBalancesNextSubscription

Last updated 2 years ago