Delete: Withdrawal

DELETE /withdrawals/requests/:id

const deleteWithdrawalRequest = () => {
  const timestamp = Math.round(Date.now() / 1000)
  const payload = timestamp + 'DELETE' + '/withdrawals/requests' + '{}'
  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,
    json: true
  }
  const withdrawalRequestId = 1

  return request.delete(
    `https://api.ndax.in/withdrawals/requests/${withdrawalRequestId}`,
    options
  )
}

Rejects a pending withdrawal request.

Sample Response

{
  "message": {
    "id": 1,
    "withdrawal_account_id": 146,
    "participant_code": "ABCDEF",
    "requestor_participant_code": "ABCDEF",
    "requested_amount": "20",
    "account_group": "00SCXM",
    "settled_amount": null,
    "status": "REJECTED",
    "asset": "BTC",
    "requested_timestamp": 1561996924964,
    "gas_price": null,
    "client_withdrawal_request_id": null,
    "on_chan_status": null,
    "fee_amount": "0.003163149641603118"
  }
}

Last updated