Gas Fees

GET /withdrawals/estimate_network_fee

const getEstimateNetworkFee = () => {
  const timestamp = Math.round(Date.now() / 1000)
  const payload = timestamp + 'GET' + '/withdrawals/estimate_network_fee' + '{}'
  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/withdrawals/estimate_network_fee',
    options
  )
}

Sample Response

{
  "message": {
        "underlying": "BTC",
        "quoted_currency": "e₹",
        "network_fee_asset": "BTC",
        "network_fee_quantity": "0.000172825",
        "total_notional": "3.3733791241663290125"
    }
}

Retrive the estimate network fee. The following query parameters are required:

  • underlying

  • quoted_currency

Optional query parameters include:

  • amount The amount of the underlying currency

  • destination_address The destination_address is the receiving address for the withdrawal request

  • contract_call In a future release, this field will denote if the destination address is a smart contract address. False is the only acceptable value for now.

ParameterDescriptionType

underlying

The asset being valued

string

quoted_currency

The asset in which the underlying is being valued

string

network_fee_asset

The network fee asset

string

network_fee_quantity

The quantity of network fee

string

total_notional

fee_amount x (index price for fee_currency quoted in quoted_currency)

string

Last updated