> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Withdrawal

> Create a withdrawal.

Use the Prime SDK or CLI to test this endpoint by following the [quickstart](/prime/introduction/quickstart) guide and running with the following examples

<Tabs>
  <Tab title="Java">
    ```java theme={null}
    TransactionsService transactionsService = PrimeServiceFactory.createTransactionsService(client);

    CreateWithdrawalRequest request = new CreateWithdrawalRequest.Builder()
        .portfolioId("PORTFOLIO_ID_HERE")
        .walletId("WALLET_ID_HERE")
        .amount("0.001")
        .destinationType(DestinationType.DESTINATION_BLOCKCHAIN)
        .idempotencyKey(UUID.randomUUID().toString())
        .currencySymbol("ETH")
        .blockchainAddress(new BlockchainAddress.Builder()
            .address("DESTINATION_WALLET_ADDRESS")
            .build())
        .build();

    CreateWithdrawalResponse response = transactionsService.createWithdrawal(request);
    ```

    For more information, please visit the [Prime Java SDK](https://github.com/coinbase-samples/prime-sdk-java).
  </Tab>

  <Tab title=".NET">
    ```csharp wrap theme={null}
    var transactionsService = new TransactionsService(client);

    var request = new CreateWithdrawalRequest("PORTFOLIO_ID_HERE", "WALLET_ID_HERE")
    {
        Amount = "0.001",
        DestinationType = DestinationType.DESTINATION_BLOCKCHAIN,
        IdempotencyKey = Guid.NewGuid().ToString(),
        CurrencySymbol = "ETH",
        BlockchainAddress = new BlockchainAddress
        {
            Address = "DESTINATION_WALLET_ADDRESS",
        },
    };

    var response = transactionsService.CreateWithdrawal(request);
    ```

    For more information, please visit the [Prime .NET SDK](https://github.com/coinbase-samples/prime-sdk-dotnet).
  </Tab>

  <Tab title="Go">
    ```go wrap theme={null}
    transactionsService := transactions.NewTransactionsService(client)

    request := &transactions.CreateWalletWithdrawalRequest{
        PortfolioId: "PORTFOLIO_ID_HERE",
        WalletId: "WALLET_ID_HERE",
        Amount: "0.001",
        DestinationType: "DESTINATION_BLOCKCHAIN",
        IdempotencyKey: uuid.New().String(),
        Symbol: "ETH",
        BlockchainAddress: &transactions.BlockchainAddress{
            Address: "DESTINATION_WALLET_ADDRESS",
        },
    }

    response, err := transactionsService.CreateWalletWithdrawal(context.Background(), request)
    ```

    For more information, please visit the [Prime Go SDK](https://github.com/coinbase-samples/prime-sdk-go).
  </Tab>

  <Tab title="Python">
    ```python wrap theme={null}
    prime_client = PrimeClient(credentials)

    request = CreateWithdrawalRequest(
        portfolio_id="PORTFOLIO_ID_HERE",
        wallet_id="WALLET_ID_HERE",
        amount = '0.001',
        destination_type = 'DESTINATION_BLOCKCHAIN',
        idempotency_key = str(uuid.uuid4()),
        currency_symbol = 'ETH',
        blockchain_address = BlockchainAddress(
            address='DESTINATION_WALLET_ADDRESS',
        ),
    )

    response = prime_client.create_withdrawal(request)
    ```

    For more information, please visit the [Prime Python SDK](https://github.com/coinbase-samples/prime-sdk-py).
  </Tab>

  <Tab title="CLI">
    ```bash wrap theme={null}
    primectl create-withdrawal --help
    ```

    For more information, please visit the [Prime CLI](https://github.com/coinbase-samples/prime-cli).
  </Tab>

  <Tab title="TS/JS">
    ```typescript wrap theme={null}
    const transactionsService = new TransactionsService(client);

    transactionsService.createWithdrawal({
        portfolioId: 'PORTFOLIO_ID_HERE',
        walletId: 'WALLET_ID_HERE',
        amount: "0.001",
        idempotencyKey: uuidv4(),
        currencySymbol: "ETH",
        destinationType: DestinationType.DestinationBlockchain,
        blockchainAddress: {
            address: 'DESTINATION_WALLET_ADDRESS',
        }
    }).then(async (response) => {
        console.log('Withdrawal: ', response);
    })
    ```

    For more information, please visit the [Prime TS SDK](https://github.com/coinbase-samples/prime-sdk-ts).
  </Tab>
</Tabs>


## OpenAPI

````yaml POST /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals
openapi: 3.0.1
info:
  title: REST API
  description: >-
    The Coinbase Prime REST API provides programmatic access to trading,
    custody, staking, market data, and account management functionality.
  version: '0.1'
servers:
  - url: https://api.prime.coinbase.com/
security: []
tags:
  - name: PrimeRESTAPI
paths:
  /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals:
    post:
      tags:
        - Transactions
      summary: Create Withdrawal
      description: Create a withdrawal.
      operationId: PrimeRESTAPI_CreateWalletWithdrawal
      parameters:
        - name: portfolio_id
          in: path
          description: The portfolio ID
          required: true
          schema:
            type: string
        - name: wallet_id
          in: path
          description: The wallet ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              required:
                - amount
                - currency_symbol
                - destination_type
                - idempotency_key
              type: object
              properties:
                amount:
                  type: string
                  description: The amount in whole units of the withdrawal
                destination_type:
                  $ref: >-
                    #/components/schemas/coinbase.public_rest_api.DestinationType
                idempotency_key:
                  type: string
                  description: The idempotency key associated with the withdrawal
                currency_symbol:
                  type: string
                  description: The currency symbol for the withdrawal
                payment_method:
                  $ref: >-
                    #/components/schemas/coinbase.public_rest_api.PaymentMethodDestination
                blockchain_address:
                  $ref: >-
                    #/components/schemas/coinbase.public_rest_api.BlockchainAddress
                counterparty:
                  $ref: >-
                    #/components/schemas/coinbase.public_rest_api.CounterpartyDestination
                travel_rule_data:
                  $ref: '#/components/schemas/coinbase.public_rest_api.TravelRuleData'
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalResponse
components:
  schemas:
    coinbase.public_rest_api.DestinationType:
      title: |-
        - UNKNOWN_DESTINATION: nil value
         - DESTINATION_PAYMENT_METHOD: A fiat bank account linked to a payment method id via Payment Method Service
         - DESTINATION_BLOCKCHAIN: A blockchain network address
         - DESTINATION_WALLET: An on platform wallet UUID
        NOTE: this is not usable in the withdrawals endpoint
              only transfers
         - DESTINATION_COUNTERPARTY: Counterparty ID
      type: string
      enum:
        - DESTINATION_PAYMENT_METHOD
        - DESTINATION_BLOCKCHAIN
        - DESTINATION_WALLET
        - DESTINATION_COUNTERPARTY
    coinbase.public_rest_api.PaymentMethodDestination:
      type: object
      properties:
        payment_method_id:
          title: The payment method id to pay out
          type: string
    coinbase.public_rest_api.BlockchainAddress:
      type: object
      properties:
        address:
          title: The address
          type: string
          description: The address on the network
        account_identifier:
          title: >-
            The destination value’s account_identifier (MEMO/DESTINATION TAG)
            value
             for the withdrawal
          type: string
          description: >-
            The account identifier (used on some chains to distinguish accounts
            using the same address)
        network:
          $ref: '#/components/schemas/coinbase.public_rest_api.Network'
    coinbase.public_rest_api.CounterpartyDestination:
      title: Represents a destination for a counterparty payment
      type: object
      properties:
        counterparty_id:
          title: The counterparty ID to pay out
          type: string
    coinbase.public_rest_api.TravelRuleData:
      type: object
      properties:
        beneficiary:
          $ref: '#/components/schemas/coinbase.public_rest_api.TravelRuleParty'
        originator:
          $ref: '#/components/schemas/coinbase.public_rest_api.TravelRuleParty'
        is_self:
          title: True if user owns the counterparty address (self-transfer)
          type: boolean
        is_intermediary:
          type: boolean
          description: >-
            True if Coinbase is being used as an intermediary for a customer
            transfer.
        opt_out_of_ownership_verification:
          title: True to skip wallet ownership verification
          type: boolean
        attest_verified_wallet_ownership:
          type: boolean
          description: >-
            Whether the originating VASP attests to verified wallet ownership.

            When true with is_intermediary, enables automatic VASP data
            enrichment from the legal entity.
      description: Data object used for withdrawals.
    coinbase.public_rest_api.CreateWalletWithdrawalResponse:
      type: object
      properties:
        activity_id:
          type: string
          description: The activity ID associated with the withdrawal
        approval_url:
          type: string
          description: A URL to the activity in the Prime application
        symbol:
          type: string
          description: The currency symbol associated with the withdrawal
        amount:
          type: string
          description: The amount of the withdrawal
        fee:
          type: string
          description: The network fee associated with the withdrawal
        destination_type:
          title: The type of the end destination for the withdrawal
          type: string
          description: The destination type used for the withdrawal
        source_type:
          type: string
          description: The source type used for the withdrawal
        blockchain_destination:
          $ref: '#/components/schemas/coinbase.public_rest_api.BlockchainAddress'
        counterparty_destination:
          $ref: >-
            #/components/schemas/coinbase.public_rest_api.CounterpartyDestination
        blockchain_source:
          $ref: '#/components/schemas/coinbase.public_rest_api.BlockchainAddress'
        transaction_id:
          type: string
          description: The id of the just created transaction
    coinbase.public_rest_api.Network:
      type: object
      properties:
        id:
          title: The name of the network
          type: string
          description: 'The network id: base, bitcoin, ethereum, solana etc'
        type:
          title: The network type
          type: string
          description: 'The network type: mainnet, testnet, etc'
    coinbase.public_rest_api.TravelRuleParty:
      type: object
      properties:
        name:
          title: Legal name (for entities or simple name format)
          type: string
        natural_person_name:
          $ref: '#/components/schemas/coinbase.public_rest_api.NaturalPersonName'
        address:
          $ref: '#/components/schemas/coinbase.public_rest_api.DetailedAddress'
        wallet_type:
          $ref: '#/components/schemas/coinbase.public_rest_api.TravelRuleWalletType'
        vasp_id:
          title: VASP identifier when wallet_type is VASP
          type: string
        vasp_name:
          title: VASP name fallback when vasp_id is unknown
          type: string
        personal_id:
          type: string
          description: |-
            Personal identifier for travel rule compliance.
            For individuals: passport number, national ID, driver's license.
            For institutions: LEI (Legal Entity Identifier).
        date_of_birth:
          $ref: '#/components/schemas/google.type.Date'
        telephone_number:
          type: string
          description: Telephone number for contact purposes.
        account_id:
          type: string
          description: |-
            Account identifier for travel rule compliance.
            If not provided, defaults to portfolio ID.
      description: >-
        Represents a party in a travel rule transfer (originator or
        beneficiary).
    coinbase.public_rest_api.NaturalPersonName:
      title: Natural person name components
      type: object
      properties:
        first_name:
          title: Given/first name
          type: string
        middle_name:
          title: optional middle name (currently unused)
          type: string
        last_name:
          title: Family/last name
          type: string
    coinbase.public_rest_api.DetailedAddress:
      title: Detailed address information
      type: object
      properties:
        address_1:
          title: Primary address line
          type: string
        address_2:
          title: Secondary address line (optional)
          type: string
        address_3:
          title: Tertiary address line (optional)
          type: string
        city:
          title: City name
          type: string
        state:
          title: State or province
          type: string
        country_code:
          title: ISO 3166-1 alpha-2 country code
          type: string
        postal_code:
          title: Postal/ZIP code
          type: string
    coinbase.public_rest_api.TravelRuleWalletType:
      title: Type of wallet being used for transfers
      type: string
      description: |-
        - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED: Default unspecified wallet type
         - TRAVEL_RULE_WALLET_TYPE_VASP: Centralized exchange wallet
         - TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED: Self-hosted/custodial wallet
      default: TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED
      enum:
        - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED
        - TRAVEL_RULE_WALLET_TYPE_VASP
        - TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED
    google.type.Date:
      title: >-
        Represents a whole or partial calendar date, such as a birthday. The
        time of

        day and time zone are either specified elsewhere or are insignificant.
        The

        date is relative to the Gregorian Calendar. This can represent one of
        the

        following:
      type: object
      properties:
        year:
          type: integer
          description: >-
            Year of the date. Must be from 1 to 9999, or 0 to specify a date
            without

            a year.
          format: int32
        month:
          type: integer
          description: >-
            Month of a year. Must be from 1 to 12, or 0 to specify a year
            without a

            month and day.
          format: int32
        day:
          type: integer
          description: >-
            Day of a month. Must be from 1 to 31 and valid for the year and
            month, or 0

            to specify a year by itself or a year and month where the day isn't

            significant.
          format: int32
      description: >-
        * A full date, with non-zero year, month, and day values.

        * A month and day, with a zero year (for example, an anniversary).

        * A year on its own, with a zero month and a zero day.

        * A year and month, with a zero day (for example, a credit card
        expiration
          date).

        Related types:


        * [google.type.TimeOfDay][google.type.TimeOfDay]

        * [google.type.DateTime][google.type.DateTime]

        * [google.protobuf.Timestamp][google.protobuf.Timestamp]

````