> ## 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.

# Commit Action

> Commits a transaction id of user's any action (deposit/trade/withdraw) to verify and processes balance change.



## OpenAPI

````yaml POST /commit
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:
  /commit:
    post:
      description: >-
        Commits a transaction id of user's any action (deposit/trade/withdraw)
        to verify and processes balance change.
      requestBody:
        description: Details of the commit request.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommitRequest'
        required: true
      responses:
        '200':
          description: Successful commit response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommitResponse'
        '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:
    CommitRequest:
      required:
        - tx_id
      type: object
      properties:
        tx_id:
          description: The transaction id of any action (trade/deposit/withdraw)
          type: string
    CommitResponse:
      required:
        - status
        - action_type
        - already_processed
        - vanish_fee
        - tx_fee
        - user_address
      type: object
      properties:
        status:
          description: >-
            The result of the commit operation to determine the state of the
            transaction and balance.

            If the status is rejected, a deposit transaction has failed initial
            compliance or risk screening, and can notify that funds will be
            refunded to the user’s wallet after extended screening is completed.
          enum:
            - pending
            - completed
            - failed
            - expired
            - rejected
          type: string
        action_type:
          description: >-
            The type of action that was committed. Indicates whether the
            operation was a deposit, withdrawal, or trade.
          enum:
            - deposit
            - withdraw
            - trade
          type: string
        already_processed:
          description: >-
            Indicates whether the given transaction ID (tx_id) was already
            processed before this commit attempt.
          type: boolean
        balance_changes:
          type: array
          items:
            $ref: '#/components/schemas/BalanceChange'
          description: >-
            A list of token balance changes that resulted from the committed
            action. Empty if the commit failed or was already processed.
        vanish_fee:
          description: The fee amount charged by Vanish, expressed in lamports.
          type: string
          format: int64
        tx_fee:
          description: The transaction fee amount, expressed in lamports.
          type: string
          format: int64
        user_address:
          description: The wallet address of the user who created this commit.
          type: string
        screening_eta_seconds:
          description: >-
            Optional. If provided, the estimated time, in seconds, required to
            screen the commit.
          type: integer
    Error:
      type: string
    BalanceChange:
      required:
        - token_address
        - change
      type: object
      properties:
        token_address:
          description: The token address
          type: string
        change:
          description: >-
            Amount of balance change in the smallest unit (e.g., lamports for
            SOL).
          type: string
          format: int64
  responses:
    UnauthorizedError:
      description: API key is missing or invalid
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````