GET: Withdrawal

GET /withdrawals/requests

const getWithdrawalRequests = () => {
  const timestamp = Math.round(Date.now() / 1000)
  const payload = timestamp + 'GET' + '/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,
    body,
    json: true
  }

  return request.get('https://api.ndax.in/withdrawals/requests', options)
}

Sample Response

{
  "message": [
    {
      "id": 78,
      "withdrawal_account_id": 51,
      "participant_code": "ABCDEF",
      "requestor_participant_code": "ABCDEF",
      "requested_amount": "23",
      "settled_amount": "21",
      "status": "APPROVED",
      "asset": "BTC",
      "account_group": "00SCXM",
      "transaction_id": null,
      "requested_timestamp": 1554395972174,
      "gas_price": null,
      "client_withdrawal_request_id": null,
      "on_chain_status": "PENDING",
      "fee_amount": "0.003163149641603118"
    }
  ],
  "page": 1,
  "total_pages": 1
}

Returns an array of all withdrawal requests created by users as part of your participant.

Query parameters include:

  • participant_code (optional) will default to the participant the API key was created for

  • page (optional) for paginating through your list of addresses

  • status (optional) for selecting requests with specific status APPROVED, REJECTED etc.

  • gas_price (optional) for selecting requests with specific gas price

  • client_withdrawal_request_id (optional) for selecting requests with specific client withdrawal request id

  • on_chain_status (optional) for selecting on chain with specific status. You can use CONFIRMED or PENDING.

  • requested_timestamp filters withdrawal requests based on a given timestamp in milliseconds 1593798130060 or nanoseconds 1593798130060000000 using the following params for the following filter types:

    • [gt] greater than a given timestamp, e.g. requested_timestamp[gt]=1593798130060

    • [gte] greater than or equal to a given timestamp, e.g. requested_timestamp[gte]=1593798130060

    • [e] equal to a given timestamp, e.g. requested_timestamp[e]=1593798130060

    • [lt] less than a given timestamp, e.g. requested_timestamp[lt]=1593798130060

    • [lte] lower than or equal to a given timestamp, e.g. requested_timestamp[lte]=1593798130060

    • combinations are also possible, e.g. to find a withdrawal requests between 1593798130555 and 1593798130777 you can use the next combination requested_timestamp[gt]=1593798130555&requested_timestamp[lt]=1593798130777

Response:

ParameterDescriptionType

id

The withdrawal request ID

number

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 ID of the withdrawal account the address belongs to

number

asset

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

string

participant_code

The participant the request belongs to, e.g. ABCDEF

string

requestor_participant_code

The participant code of the requestor, e.g. ABCDEF

string

account_group

The account group the request was made against, e.g. 00SCXM for the Seed Digital Commodities Market account group

string

requested_amount

The initially requested amount, e.g. 100.10

string

settled_amount

The settled amount. This can be less than or equal to the requested_amount, e.g. 99

string or null

transaction_id

The on-chain transaction id once the withdrawal has been confirmed

string or null

status

The current status of the withdrawal request

string

requested_timestamp

The timestamp for when the withdrawal request was requested

timestamp

gas_price

The transaction fee payable on the Ethereum network If the asset is not an ERC-20 token, this field will always be null

string or null

on_chain_status

Indicates whether or not the crypto withdrawal has been confirmed on-chain

string or null

fee_amount

will return the network fee amount

string

Last updated