> This page is for Taurus PRIME.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://taurushq.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://taurushq.ferndocs.com/_mcp/server.

# Deposits & Withdrawals

# Deposits and Withdrawals

This guide covers the complete workflow for depositing and withdrawing funds.

## Overview

The platform supports:

* **Crypto deposits/withdrawals**: On-chain transactions via whitelisted addresses
* **Fiat deposits/withdrawals**: Bank transfers

## Prerequisites

* Authenticated session (JWT or API key)
* `CanDeposit` permission (for deposits)
* `CanWithdraw` permission (for withdrawals)
* Verified Client Account

---

## Part 1: Whitelisted External Addresses

Before making crypto withdrawals, you must whitelist destination addresses.

### Step 1: Create Whitelisted Address

**Endpoint:** `POST /api/rest/v1/investors/addresses/external`

#### Request

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/investors/addresses/external" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "instrumentId": "7a3fae7e-5a17-4931-821c-54b021f643da",
    "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
    "label": "My Hardware Wallet",
    "memo": ""
  }'
```

#### Request Fields

| Field          | Type   | Required | Description                         |
| -------------- | ------ | -------- | ----------------------------------- |
| `instrumentId` | UUID   | Yes      | Instrument ID (e.g., BTC)           |
| `address`      | string | Yes      | Blockchain address                  |
| `label`        | string | Yes      | Human-readable label                |
| `memo`         | string | No       | Memo/tag (required for some chains) |

#### Response (200 OK)

```json
{
  "result": {
    "id": "whitelist-uuid",
    "instrumentId": "7a3fae7e-5a17-4931-821c-54b021f643da",
    "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
    "label": "My Hardware Wallet",
    "status": "STATUS_PENDING_CONFIRMATION",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}
```

### Step 2: Resend Confirmation Code (if needed)

**Endpoint:** `POST /api/rest/v1/investors/addresses/external/init`

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/investors/addresses/external/init" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "addressId": "whitelist-uuid"
  }'
```

### Step 3: Confirm Address Whitelisting

After receiving the confirmation code via email, confirm with 2FA.

**Endpoint:** `POST /api/rest/v1/investors/addresses/external/confirm`

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/investors/addresses/external/confirm" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "123456789",
    "challenge": "123456"
  }'
```

#### Request Fields

| Field       | Type   | Required | Description                |
| ----------- | ------ | -------- | -------------------------- |
| `code`      | string | Yes      | Validation code from email |
| `challenge` | string | Yes      | 2FA TOTP code              |

### Step 4: Verify Address (for some addresses)

Some addresses require additional verification.

**Endpoint:** `POST /api/rest/v1/investors/addresses/external/verify`

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/investors/addresses/external/verify" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "addressId": "whitelist-uuid"
  }'
```

#### Response (200 OK)

```json
{
  "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
  "amount": "0.00001",
  "validUntil": "2024-01-15T12:30:00Z"
}
```

### Step 5: List Whitelisted Addresses

**Endpoint:** `GET /api/rest/v1/investors/addresses/external`

```bash
curl -X GET "https://api.t-dx.com/api/rest/v1/investors/addresses/external" \
  -H "Authorization: Bearer <access-token>"
```

#### Query Parameters

This endpoint supports [standard pagination, sorting, and filtering](/prime/docs/api-gett-making-requests#pagination).

#### Response (200 OK)

```json
{
  "result": [
    {
      "id": "whitelist-uuid",
      "instrumentId": "7a3fae7e-5a17-4931-821c-54b021f643da",
      "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
      "label": "My Hardware Wallet",
      "status": "STATUS_ACTIVE",
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "cursors": {
      "self": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "first": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "last": "",
      "next": "",
      "previous": ""
    }
  }
}
```

### Step 6: Get Specific Address

**Endpoint:** `GET /api/rest/v1/investors/addresses/external/{id}`

```bash
curl -X GET "https://api.t-dx.com/api/rest/v1/investors/addresses/external/whitelist-uuid" \
  -H "Authorization: Bearer <access-token>"
```

### Step 7: Delete Whitelisted Address

**Endpoint:** `DELETE /api/rest/v1/investors/addresses/external/{id}`

```bash
curl -X DELETE "https://api.t-dx.com/api/rest/v1/investors/addresses/external/whitelist-uuid" \
  -H "Authorization: Bearer <access-token>"
```

---

## Part 2: Bank Accounts

### Step 1: List Bank Accounts

**Endpoint:** `GET /api/rest/v1/bank-accounts/mine`

```bash
curl -X GET "https://api.t-dx.com/api/rest/v1/bank-accounts/mine" \
  -H "Authorization: Bearer <access-token>"
```

#### Response (200 OK)

```json
{
  "result": [
    {
      "id": "bank-account-uuid",
      "iban": "CH93 0076 2011 6238 5295 7",
      "currency": "",
      "bank": {
        "swiftbic": "EXBKCHZZ",
        "name": "My Bank AG",
        "street": "",
        "postalCode": "",
        "city": "",
        "country": "CH",
        "sicCode": ""
      },
      "owner": {
        "name": "John Doe",
        "street": "",
        "postalCode": "",
        "city": "",
        "country": ""
      },
      "label": "My Primary Account",
      "instrumentId": "8b4gbf8f-6b28-5042-932d-65c132g754eb",
      "externalBankAccountNumber": "",
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "cursors": {
      "self": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "first": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "last": "",
      "next": "",
      "previous": ""
    }
  }
}
```

#### Bank Account Fields

| Field                       | Type      | Description                             |
| --------------------------- | --------- | --------------------------------------- |
| `id`                        | UUID      | Bank account identifier                 |
| `iban`                      | string    | IBAN number                             |
| `currency`                  | string    | Currency code (optional)                |
| `bank`                      | object    | Bank information                        |
| `bank.swiftbic`             | string    | SWIFT/BIC code                          |
| `bank.name`                 | string    | Bank name                               |
| `bank.country`              | string    | Bank country code                       |
| `owner`                     | object    | Account holder information              |
| `owner.name`                | string    | Account holder name                     |
| `label`                     | string    | User-defined label                      |
| `instrumentId`              | UUID      | Associated fiat instrument ID           |
| `externalBankAccountNumber` | string    | External account number (if applicable) |
| `createdAt`                 | timestamp | Creation time                           |

### Step 2: Create Bank Account

**Endpoint:** `POST /api/rest/v1/bank-accounts/mine`

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/bank-accounts/mine" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "bankAccount": {
      "iban": "CH93 0076 2011 6238 5295 7",
      "bank": {
        "swiftbic": "EXBKCHZZ",
        "name": "My Bank AG",
        "country": "CH"
      },
      "owner": {
        "name": "John Doe"
      },
      "label": "My Primary Account",
      "instrumentId": "8b4gbf8f-6b28-5042-932d-65c132g754eb"
    }
  }'
```

### Step 3: Delete Bank Account

**Endpoint:** `DELETE /api/rest/v1/bank-accounts/mine/{id}`

```bash
curl -X DELETE "https://api.t-dx.com/api/rest/v1/bank-accounts/mine/bank-account-uuid" \
  -H "Authorization: Bearer <access-token>"
```

---

## Part 3: Deposits

### Step 1: Create Deposit Declaration

Declare an incoming deposit (required for tracking).

**Endpoint:** `POST /api/rest/v1/deposits`

#### Request (Crypto Deposit)

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/deposits" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "instrumentId": "7a3fae7e-5a17-4931-821c-54b021f643da",
    "declaredQuantity": "0.50000000",
    "sourceType": "SOURCE_TYPE_CRYPTO_ADDRESS",
    "externalAddressId": "whitelist-uuid"
  }'
```

#### Request (Fiat Deposit)

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/deposits" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "instrumentId": "8b4gbf8f-6b28-5042-932d-65c132g754eb",
    "declaredQuantity": "10000.00",
    "sourceType": "SOURCE_TYPE_BANK_ACCOUNT",
    "bankAccountId": "bank-account-uuid"
  }'
```

#### Request Fields

| Field                | Type    | Required | Description                         |
| -------------------- | ------- | -------- | ----------------------------------- |
| `subAccountId`       | UUID    | Yes      | Sub-account to credit               |
| `instrumentId`       | UUID    | Yes      | Instrument ID                       |
| `declaredQuantity`   | decimal | Yes      | Expected deposit amount             |
| `sourceType`         | enum    | Yes      | Source type (see below)             |
| `externalAddressId`  | UUID    | No       | Whitelisted address ID (for crypto) |
| `bankAccountId`      | UUID    | No       | Bank account ID (for fiat)          |
| `thirdPartyExchange` | enum    | No       | External exchange name              |

#### Source Types

| Value                        | Description                  |
| ---------------------------- | ---------------------------- |
| `SOURCE_TYPE_BANK_ACCOUNT`   | Fiat bank transfer           |
| `SOURCE_TYPE_CRYPTO_ADDRESS` | Crypto from external address |
| `SOURCE_TYPE_INTERNAL`       | Internal transfer            |

#### Response (200 OK)

```json
{
  "result": {
    "id": "deposit-uuid",
    "clientAccountId": "8aee564e-2eb1-4a57-b686-05476c2cfd93",
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "instrumentId": "7a3fae7e-5a17-4931-821c-54b021f643da",
    "declaredQuantity": "0.50000000",
    "status": "STATUS_NEW",
    "type": "TYPE_CRYPTO",
    "sourceType": "SOURCE_TYPE_CRYPTO_ADDRESS",
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  }
}
```

### Step 2: List Deposits

**Endpoint:** `GET /api/rest/v1/deposits/by-sub-account/{subAccountId}`

```bash
curl -X GET "https://api.t-dx.com/api/rest/v1/deposits/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804" \
  -H "Authorization: Bearer <access-token>"
```

#### Query Parameters

This endpoint supports [standard pagination, sorting, and filtering](/prime/docs/api-gett-making-requests#pagination).

| Parameter | Type      | Description                             |
| --------- | --------- | --------------------------------------- |
| `fields`  | \[]string | Load sub-resources (e.g., `instrument`) |

**Supported filters:** `instrument_id`, `status`

#### Response (200 OK)

```json
{
  "result": [
    {
      "id": "deposit-uuid",
      "clientAccountId": "8aee564e-2eb1-4a57-b686-05476c2cfd93",
      "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
      "userId": "user-uuid",
      "instrumentId": "7a3fae7e-5a17-4931-821c-54b021f643da",
      "externalId": "external-reference",
      "declaredQuantity": "0.50000000",
      "receivedQuantity": "0.50000000",
      "status": "STATUS_EXECUTED",
      "type": "TYPE_CRYPTO",
      "messageId": "123456789",
      "referenceNumber": "deposit-ref",
      "valuedAt": "2024-01-15T11:30:00Z",
      "cryptoTransactionId": "",
      "externalAddressId": "whitelist-uuid",
      "thirdPartyExchange": "THIRD_PARTY_EXCHANGE_UNDEFINED",
      "fee": "0.00",
      "attributes": [],
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T11:30:00Z"
    }
  ],
  "pagination": {
    "cursors": {
      "self": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "first": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "last": "",
      "next": "",
      "previous": ""
    }
  }
}
```

#### Deposit Fields

| Field                 | Type      | Description                            |
| --------------------- | --------- | -------------------------------------- |
| `id`                  | UUID      | Deposit identifier                     |
| `clientAccountId`     | UUID      | Client account ID                      |
| `subAccountId`        | UUID      | Sub-account ID                         |
| `userId`              | UUID      | User who declared the deposit          |
| `instrumentId`        | UUID      | Instrument being deposited             |
| `externalId`          | string    | External reference ID                  |
| `declaredQuantity`    | decimal   | Amount declared                        |
| `receivedQuantity`    | decimal   | Amount received                        |
| `status`              | enum      | Deposit status (see below)             |
| `type`                | enum      | `TYPE_CRYPTO` or `TYPE_BANK_TRANSFER`  |
| `messageId`           | string    | Internal message reference             |
| `referenceNumber`     | string    | Reference for tracking                 |
| `valuedAt`            | timestamp | Value date (null if pending)           |
| `cryptoTransactionId` | string    | Blockchain transaction ID (for crypto) |
| `externalAddressId`   | UUID      | Source address ID (for crypto)         |
| `thirdPartyExchange`  | enum      | Third party exchange if applicable     |
| `fee`                 | decimal   | Fee amount                             |
| `attributes`          | array     | Additional attributes                  |
| `createdAt`           | timestamp | Creation time                          |
| `updatedAt`           | timestamp | Last update time                       |

### Deposit Status Values

| Status               | Description                      |
| -------------------- | -------------------------------- |
| `STATUS_NEW`         | Deposit declared, awaiting funds |
| `STATUS_TO_CONFIRM`  | Awaiting confirmation            |
| `STATUS_CONFIRMED`   | Confirmed, processing            |
| `STATUS_IN_PROGRESS` | Processing in progress           |
| `STATUS_EXECUTED`    | Completed, balance credited      |
| `STATUS_FAILED`      | Deposit failed                   |
| `STATUS_CANCELED`    | Cancelled                        |

### Step 3: Get Specific Deposit

**Endpoint:** `GET /api/rest/v1/deposits/by-sub-account/{subAccountId}/{id}`

```bash
curl -X GET "https://api.t-dx.com/api/rest/v1/deposits/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804/deposit-uuid" \
  -H "Authorization: Bearer <access-token>"
```

### Step 4: Cancel Deposit

Cancel a pending deposit declaration.

**Endpoint:** `POST /api/rest/v1/deposits/by-sub-account/{subAccountId}/{id}/cancel`

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/deposits/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804/deposit-uuid/cancel" \
  -H "Authorization: Bearer <access-token>"
```

---

## Part 4: Withdrawals

### Step 1: Create Withdrawal

**Endpoint:** `POST /api/rest/v1/withdrawals`

#### Request (Crypto Withdrawal)

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/withdrawals" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "instrumentId": "7a3fae7e-5a17-4931-821c-54b021f643da",
    "quantity": "0.50000000",
    "externalAddressId": "whitelist-uuid"
  }'
```

#### Request (Fiat Withdrawal)

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/withdrawals" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "instrumentId": "8b4gbf8f-6b28-5042-932d-65c132g754eb",
    "quantity": "10000.00",
    "bankAccountId": "bank-account-uuid"
  }'
```

#### Request Fields

| Field               | Type    | Required | Description                      |
| ------------------- | ------- | -------- | -------------------------------- |
| `subAccountId`      | UUID    | Yes      | Sub-account to debit             |
| `instrumentId`      | UUID    | Yes      | Instrument ID                    |
| `quantity`          | decimal | Yes      | Withdrawal amount                |
| `externalAddressId` | UUID    | No       | Whitelisted address (for crypto) |
| `bankAccountId`     | UUID    | No       | Bank account (for fiat)          |

#### Response (200 OK)

```json
{
  "result": {
    "id": "withdrawal-uuid",
    "clientAccountId": "8aee564e-2eb1-4a57-b686-05476c2cfd93",
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "instrumentId": "7a3fae7e-5a17-4931-821c-54b021f643da",
    "quantity": "0.50000000",
    "fee": "0.00005000",
    "status": "STATUS_PENDING_USER_CONFIRMATION",
    "type": "TYPE_CRYPTO",
    "externalAddressId": "whitelist-uuid",
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  }
}
```

### Step 2: Initialize Withdrawal Confirmation

Request a confirmation code via email.

**Endpoint:** `POST /api/rest/v1/withdrawals/init`

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/withdrawals/init" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "withdrawalId": "withdrawal-uuid",
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804"
  }'
```

### Step 3: Confirm Withdrawal

Confirm with email code and 2FA.

**Endpoint:** `POST /api/rest/v1/withdrawals/confirm`

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/withdrawals/confirm" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "123456789",
    "challenge": "123456"
  }'
```

#### Request Fields

| Field       | Type   | Required | Description                |
| ----------- | ------ | -------- | -------------------------- |
| `code`      | string | Yes      | Validation code from email |
| `challenge` | string | Yes      | 2FA TOTP code              |

### Step 4: List Withdrawals

**Endpoint:** `GET /api/rest/v1/withdrawals/by-sub-account/{subAccountId}`

```bash
curl -X GET "https://api.t-dx.com/api/rest/v1/withdrawals/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804" \
  -H "Authorization: Bearer <access-token>"
```

#### Query Parameters

This endpoint supports [standard pagination, sorting, and filtering](/prime/docs/api-gett-making-requests#pagination).

| Parameter | Type      | Description                                                 |
| --------- | --------- | ----------------------------------------------------------- |
| `fields`  | \[]string | Load sub-resources (e.g., `instrument`, `external_address`) |

**Supported filters:** `instrument_id`, `status`

#### Response (200 OK)

```json
{
  "result": [
    {
      "id": "withdrawal-uuid",
      "clientAccountId": "8aee564e-2eb1-4a57-b686-05476c2cfd93",
      "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
      "userId": "user-uuid",
      "instrumentId": "7a3fae7e-5a17-4931-821c-54b021f643da",
      "externalId": "external-reference",
      "quantity": "0.50000000",
      "fee": "0.00005000",
      "feeInstrumentId": "7a3fae7e-5a17-4931-821c-54b021f643da",
      "status": "STATUS_EXECUTED",
      "type": "TYPE_CRYPTO",
      "messageId": "123456789",
      "valuedAt": "2024-01-15T10:45:00Z",
      "externalAddressId": "whitelist-uuid",
      "bankAccountId": "",
      "attributes": [],
      "externalAddress": null,
      "instrument": null,
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:45:00Z"
    }
  ],
  "pagination": {
    "cursors": {
      "self": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "first": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "last": "",
      "next": "",
      "previous": ""
    }
  }
}
```

#### Withdrawal Fields

| Field               | Type      | Description                              |
| ------------------- | --------- | ---------------------------------------- |
| `id`                | UUID      | Withdrawal identifier                    |
| `clientAccountId`   | UUID      | Client account ID                        |
| `subAccountId`      | UUID      | Sub-account ID                           |
| `userId`            | UUID      | User who initiated the withdrawal        |
| `instrumentId`      | UUID      | Instrument being withdrawn               |
| `externalId`        | string    | External reference ID                    |
| `quantity`          | decimal   | Withdrawal amount                        |
| `fee`               | decimal   | Fee amount                               |
| `feeInstrumentId`   | UUID      | Instrument ID for fee                    |
| `status`            | enum      | Withdrawal status (see below)            |
| `type`              | enum      | `TYPE_CRYPTO` or `TYPE_BANK_TRANSFER`    |
| `messageId`         | string    | Internal message reference               |
| `valuedAt`          | timestamp | Value date (null if pending)             |
| `externalAddressId` | UUID      | Whitelisted address (for crypto)         |
| `bankAccountId`     | UUID      | Bank account (for fiat)                  |
| `attributes`        | array     | Additional attributes                    |
| `externalAddress`   | object    | Populated when `fields=external_address` |
| `instrument`        | object    | Populated when `fields=instrument`       |
| `createdAt`         | timestamp | Creation time                            |
| `updatedAt`         | timestamp | Last update time                         |

### Withdrawal Status Values

| Status                                          | Description                               |
| ----------------------------------------------- | ----------------------------------------- |
| `STATUS_ACTIVE`                                 | Withdrawal created, awaiting confirmation |
| `STATUS_PENDING_USER_CONFIRMATION`              | Awaiting user confirmation (2FA)          |
| `STATUS_TO_CONFIRM`                             | Awaiting admin confirmation               |
| `STATUS_ACCEPTED`                               | Accepted, processing                      |
| `STATUS_PENDING_BOOKING_IN_CORE_BANKING_SYSTEM` | Pending core banking                      |
| `STATUS_PENDING_EXECUTION`                      | Pending execution                         |
| `STATUS_EXECUTED`                               | Completed                                 |
| `STATUS_REFUSED`                                | Refused by admin                          |
| `STATUS_CANCELED`                               | Cancelled by user                         |
| `STATUS_FAILED`                                 | Failed                                    |

### Step 5: Get Specific Withdrawal

**Endpoint:** `GET /api/rest/v1/withdrawals/by-sub-account/{subAccountId}/{id}`

```bash
curl -X GET "https://api.t-dx.com/api/rest/v1/withdrawals/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804/withdrawal-uuid" \
  -H "Authorization: Bearer <access-token>"
```

### Step 6: Cancel Unconfirmed Withdrawal

Cancel a withdrawal before confirmation.

**Endpoint:** `POST /api/rest/v1/withdrawals/unconfirmed/cancel`

```bash
curl -X POST "https://api.t-dx.com/api/rest/v1/withdrawals/unconfirmed/cancel" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "withdrawalId": "withdrawal-uuid",
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804"
  }'
```

---

## Error Scenarios

| Status | Code                     | Description                               |
| ------ | ------------------------ | ----------------------------------------- |
| 400    | `INVALID_ARGUMENT`       | Invalid address format or amount          |
| 403    | `NOT_ENOUGH_FUNDS`       | Insufficient balance                      |
| 403    | `WITHDRAWAL_NOT_ENABLED` | Withdrawals disabled for instrument       |
| 403    | `DEPOSIT_NOT_ENABLED`    | Deposits disabled for instrument          |
| 404    | `NOT_FOUND`              | Withdrawal, deposit, or address not found |
| 409    | `ALREADY_EXISTS`         | Address already whitelisted               |
| 422    | `FAILED_PRECONDITION`    | Amount below minimum threshold            |

## Related

* [Wallet Information](/prime/docs/api-usec-03-wallet-information) - View balances
* [Domains: Funding](/prime/docs/api-doma-fund-funding) - Full payments and settlement lines reference
* [Domains: Custody](/prime/docs/api-doma-cust-custody) - Custody and address documentation