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

Convert

GET /convert_withdraw/rfq

const getQuote = () => {
  const body = '{}'
  const timestamp = Math.round(Date.now() / 1000)
  const payload = timestamp + 'GET' + '/convert_withdraw/rfq' + body
  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/convert_withdraw/rfq?underlying=BTC&quoted_currency=e₹&side=buy&quantity=1&withdrawal_address=address`, options)
}

Sample Response

{
  "request_id": "ce819fe8-b1d7-43bb-961c-e09ede0988d3",
  "participant_code": "CUST01",
  "quoted_currency": "e₹",
  "side": "BUY",
  "quantity": "1",
  "price": "11430.90",
  "quote_id": "5cd07738b861c31e3bd61467BTC1Buy1568311644602",
  "expire_ts": 1568311649602,
  "account_group": "00SCXM",
  "account_label": "general",
  "obo_participant": {
    "participant_code": "20XRLH",
    "account_group": "WRD1K0",
    "account_label": "general"
  },
  "network_fee_notional": "1",
  "network_fee_quantity": "1",
  "main_quote_id": "c3a7e3a6-a911-43e8-b3bb-2b562c2d8c28",
  "total_notional": "11.00",
  "underlying": "ETH",
  "asset_cost_notional": "20"
}

Returns a quote for the asset purchase amount and also the network fee associated with an eminent withdrawal.

Query parameters include:

  • side (required) the side of the quote, supported value: buy

  • underlying (required) the underlying asset for the quote

  • quoted_currency (required) the quoted asset for the quote

  • withdrawal_address (required) the on-chain address for the withdrawal

  • quantity (optional) The amount of the underlying currency (either quantity or total must be provided)

  • total (optional) the desired amount of the quoted_currency for the quote (either quantity or total must be provided)

  • participant_code (optional) the participant that is requesting to buy/sell. Can be the platform's code or the customer's.

Response:

Parameter
Description
Type

request_id

The identifier of the RFQ

string

participant_code

The identifier of the participant making the quote request

string

quoted_currency

The asset code for the quoted currency, e.g. e₹

string

side

The participant side of the quote - buy or sell

string

quantity

The amount of the quoted currency

string

price

The cost per unit of underlying currency

string

quote_id

The identifier for the quote Note: this is required to execute the quote

string

expire_ts

Timestamp when the quote will expire

timestamp

account_group

The group that the account is a part of

string

account_label

The account label associated with the account

string

obo_participant

on behalf of participant is the details of the participant benefiting the trade if not the submitter

object

network_fee_notional

fee notional in the currency quoted on the RFQ

string

network_fee_quantity

fee quantity in the underlying asset

string

total_notional

The calculation: (price * quantity) + (network_fee_notional * network_fee_quantity)

string

underlying

The asset code for the underlying currency, e.g. BTC

string

PreviousPOSTNextWithdraw

Last updated 2 years ago