# Query withdrawal history

Query withdrawal transaction history for current user. Transactions are sorted by `createdTime`.

Endpoint: GET /custody/v2/withdraw/history
Version: 1.0.1
Security: SSO_TOKEN

## Query parameters:

  - `currency` (string)
    Digital asset code.

  - `txId` (string)
    External blockchain transaction ID.

  - `status` (integer)
    An integer that indicates the status of the withdrawal transactions to return:
* 0 = email sent
* 1 = cancelled
* 2 = awaiting approval
* 3 = rejected
* 4 = processing
* 5 = failure
* 6 = completed

  - `limit` (integer)
    Number of records to return. Max value of 1000. If your query results in more than 1000 transactions, only the first 1000 are returned.

  - `startTime` (integer)
    Start of time period of withdrawals to return based on the transaction's `createdTime`.

Unix time in milliseconds.

If you specify `startTime` and do not specify `endTime`, the current time is used. The `startTime` must be before `endTime`.

  - `endTime` (integer)
    End of time period of withdrawals to return based on the transaction's `createdTime`.

Unix time in milliseconds.

If this parameter is specified, you must also specify a `startTime` value before `endTime`.

If you specify `startTime` and do not specify `endTime`, the current time is used.

## Response 200 fields (application/json):

  - `id` (string)
    Withdrawal transaction ID.
    Example: 769800519366885376

  - `amount` (string)
    Withdrawal amount.
    Example: 0.01

  - `transactionFee` (string)
    The fee for the transaction, if any.
    Example: 0.0001

  - `currency` (string)
    Digital asset code.
    Example: BTC

  - `network` (string)
    Chain name / network
    Example: BTC

  - `status` (integer)
    An integer that indicates the status of the withdrawal transactions to return:
* 0 = email sent
* 1 = cancelled
* 2 = awaiting approval
* 3 = rejected
* 4 = processing
* 5 = failure
* 6 = completed
    Example: 0

  - `address` (string)
    Withdrawal address.
    Example: bc1qrpp7g75sx3ejclvsfdw2uahzchtyu7vumkuadu

  - `tag` (string)
    Additional field required by some blockchains for identifying the transaction recipient beyond a wallet address.

  - `txId` (string)
    Transaction ID.
    Example: 98A3EA560C6B3336D348B6C83F0F95ECE4F1F5919E94BD006E5BF3BF264FACFC

  - `createdTime` (integer)
    The time the transaction was created. Unix time in milliseconds.
    Example: 1661493146000

  - `updatedTime` (integer)
    The time the transaction was updated. Unix time in milliseconds.
    Example: 1661493146000

  - `reason` (string)
    Example: Rejection reason

