GET

Liquidity

GET /liquidity/rfq

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

Returns a quote to buy or sell a certain asset, in return for another asset. See one-pager here for more details.

Query parameters include:

  • side (required) the side of the quote buy or sell)

  • underlying (required) the underlying asset for the quote

  • quoted_currency (required) the quoted asset for the quote

  • 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.

  • account_label (optional) the account label associated with the account.

Response:

ParameterDescriptionType

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

main_quote_id

the quote ID for the liquidity provider for the quote itself

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

Last updated