POST: Withdrawal

POST /withdrawals/requests

const postWithdrawalRequest = () => {
  const body = {
    withdrawal_account_id: 123,
    participant_code: "ABCDEF",
    amount: "20",
    asset: "BTC",
    account_group: "00SCXM"
  }
  const timestamp = Math.round(Date.now() / 1000)
  const payload = timestamp + 'POST' + '/withdrawals/requests' + JSON.stringify(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.post(`https://api.ndax.in/withdrawals/requests`, options)
}

Sample Response

{
  "message": {
    "id": 117,
    "withdrawal_account_id": 146,
    "participant_code": "ABCDEF",
    "requestor_participant_code": "ABCDEF",
    "account_group": "00NDAX",
    "requested_amount": "20",
    "settled_amount": null,
    "status": "APPROVED",
    "asset": "BTC",
    "requested_timestamp": 1561996924964,
    "gas_price": null,
    "client_withdrawal_request_id": null,
    "on_chain_status": "PENDING",
    "fee_amount": "0.003163149641603118"
  }
}

Creates new withdrawal requests to be settled. Withdrawal requests created through the API go directly into an APPROVED state. To retrieve withdrawal account IDs use the GET /withdrawals/digital_asset_addresses and GET /withdrawals/fiat_accounts endpoints.

There are 3 ways to submit withdrawal requests:

  1. The first, standard method uses a withdrawal_account_id to choose the location to withdrawal to, which can be for a fiat currency or a digital asset. The account must be in an APPROVED state before submitting withdrawal requests to it.

  2. The second method allows for submitting a digital asset address instead of the withdrawal_account_id. When POSTing an address, NDAX will first scan to see if you already have an existing withdrawal_account_id for that destination, and if not, it will create one automatially and provide you the withdrawal_account_id in response. This is not available as standard. Please contact us if you'd like to learn more about this option.

  3. The third method allows for submitting a fiat withdrawal account{} instead of the withdrawal_account_id. When POSTing an account{}, NDAX will first scan to see if you already have an existing withdrawal_account_id for that destination, and if not, it will create one automatially and provide you the withdrawal_account_id in response. This is not available as standard. Please contact us if you'd like to learn more about this option.

Request body:

ParameterDescriptionType

client_withdrawal_request_id

A unique identifier for the withdrawal, generally produced by the Platform on which the trade was executed Note: this must be unique, per platform, per 24 hour period

string

withdrawal_account_id

The whitelisted withdrawal account or address to withdraw funds to Note: only one of withdrawal_account_id, address or account{} can be submitted per withdrawal, but NDAX will always respond with withdrawal_account_id

string

address

The digital asset address to withdraw funds to, which may or may not already exist in NDAX as an approved withdrawal_account_id Note: only one of withdrawal_account_id, address or account{} can be submitted per withdrawal, but NDAX will always respond with withdrawal_account_id

string

account{}

The fiat account to withdraw funds to, which may or may not already exist in NDAX as an approved withdrawal_account_id Note: only one of withdrawal_account_id, address or account{} can be submitted per withdrawal, but NDAX will always respond with withdrawal_account_id

object

participant_code

The participant code against whom the withdrawal will be made

string

account_group

The account group to withdraw against, e.g. 00SCXM for the Seed Digital Commodities Market account group

string

account_label

The account label associated with the account

string

amount

The amount to withdraw

string

asset

The asset code for the withdrawal request, e.g. BTC

string

destination_tag

For tag-based assets, please provide the memo id/destination tag value in this field. For more information on when and how to populate this field, please refer here

string

no_destination_tag

The value should be true or false. For more information on when and how to populate this field, please refer here

boolean

gas_price

Applicable only for ERC-20 tokens, the transaction fee payable on the Ethereum network - refer to our FAQ on how this works

string

input_data

Applicable only for smart contract executions on the Ethereum blockchain. This is the ABI encoding of the function and its arguments in RLP format.

string

Account field shape:

ParameterDescriptionType

name

The nickname given to the withdrawal account Note: NDAX will append the last 4 digits of the account number to this when saving it

string

limit

The limit applied to the account on a per-withdrawal basis

number

type

The type of account: REAL_TIME_FIAT for 24/7 e₹ withdrawals, e₹ for International wires or SWIFT INTERNATIONAL_FIAT for international wires

string

beneficiary_name

The owner of the account at the withdrawal destination

string

account_number

The unique IBAN or account number for the final withdrawal destination

string

bank_name

The name of the destination financial institution

string

routing_number

For US wires, the ABA routing number identifies the destination financial institution

string

swift_code

SWIFT code, if applicable

string

recipient_instructions

Any additional instructions on the account

string

intermediary_ bank_name

Intermediary bank name, if applicable

string

intermediary_ bank_code_type

Intermediary bank identifier code type, if applicable Options include SWIFT

string

intermediary_ bank_code

Intermediary bank identifier that corresponds to intermediary_bank_code_type, if applicable

string

intermediary_ bank_account_number

Intermediary bank IBAN or account number, if applicable

string

correspondent_ bank_name

Correspondent bank name, if applicable

string

correspondent_ bank_code_type

Correspondent bank identifier code type, if applicable Options include SWIFT

string

correspondent_ bank_code

Correspondent bank identifier that corresponds to correspondent_bank_code_type, if applicable

string

correspondent_ bank_account_number

Correspondent bank IBAN or account number, if applicable

string

Last updated