> ## Documentation Index
> Fetch the complete documentation index at: https://core.vanish.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Withdraw

> Creates a user's withdrawal transaction.



## OpenAPI

````yaml POST /withdraw/create
openapi: 3.0.1
info:
  title: Vanish Core API
  description: API endpoints for the Vanish Core service.
  license:
    name: MIT
  version: 2.0.0
servers:
  - url: https://core-api-dev.vanish.trade
security:
  - ApiKeyAuth: []
paths:
  /withdraw/create:
    post:
      description: Creates a user's withdrawal transaction.
      requestBody:
        description: >-
          Details of the withdrawal, including the token address and the amount
          to be withdrawn.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWithdrawRequest'
        required: true
      responses:
        '200':
          description: Successful withdrawal transaction data response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWithdrawResponse'
        '401':
          description: >-
            Unauthorized. The request is missing a valid API key or the
            signature is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/responses/UnauthorizedError'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateWithdrawRequest:
      required:
        - user_address
        - token_address
        - amount
        - timestamp
        - additional_sol
        - user_signature
      type: object
      properties:
        user_address:
          description: The wallet address of the user making the withdrawal.
          type: string
        token_address:
          description: The address of the token being withdrawn.
          type: string
        amount:
          description: >-
            The amount of tokens to withdraw, specified in the smallest unit
            (e.g., lamports for SOL). Can be provided as a string or a number
          oneOf:
            - type: string
              pattern: ^[0-9]+$
            - type: integer
              format: int64
        timestamp:
          description: >-
            Unix timestamp (in milliseconds) representing the time of the
            request. Can be provided as a string or a number
          oneOf:
            - type: string
              pattern: ^[0-9]+$
            - type: integer
              format: int64
        additional_sol:
          description: >-
            Additional SOL (in lamports) required to support the loan/trade
            operation, typically used for ATA creation and account
            initialization
          oneOf:
            - type: string
              pattern: ^[0-9]+$
            - type: integer
              format: int64
        user_signature:
          description: >-
            A digital signature of 'By signing, I hereby agree to Vanish's Terms
            of Service and agree to be bound by them
            (docs.vanish.trade/legal/TOS)


            Details:
            withdraw:{token_address}:{amount}:{additional_sol}:{timestamp}',
            signed by the user's wallet.
          type: string
    CreateWithdrawResponse:
      required:
        - tx_id
        - transaction_data
      type: object
      properties:
        tx_id:
          description: The transaction ID of the withdrawal.
          type: string
        transaction_data:
          description: Serialized withdraw transaction body to be executed on-chain.
          type: string
    Error:
      type: string
  responses:
    UnauthorizedError:
      description: API key is missing or invalid
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````