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

# Internal Operation

> Allows moving funds between the checking (DEFAULT) account and the investment (INVESTMENT) account. Deposit: moves funds from DEFAULT to INVESTMENT to invest. Withdrawal: moves funds from INVESTMENT to DEFAULT to use the money. Requires complete investment KYC.



## OpenAPI

````yaml POST /api/public/v1/operations/internal
openapi: 3.0.3
info:
  title: Wallbit Public API
  description: >-
    Wallbit Public API allows developers to integrate Wallbit functionality into
    their applications. Access account balances, view transaction history, and
    execute trades programmatically using API Keys.
  version: 1.0.0
  contact:
    name: Wallbit API Support
    email: dev@wallbit.io
servers:
  - url: https://api.wallbit.io
    description: Production server
  - url: http://localhost
    description: Local development server
security:
  - apiKey: []
tags:
  - name: Balance
    description: Endpoints to retrieve account balances
  - name: Transactions
    description: Endpoints to retrieve transaction history
  - name: Trades
    description: Endpoints to execute trading operations
  - name: Fees
    description: >-
      Endpoints to retrieve fee configuration for the authenticated user (e.g.
      stock trading fees by subscription tier)
  - name: Account Details
    description: Endpoints to obtain bank account details
  - name: Wallets
    description: Endpoints to obtain wallet addresses
  - name: Rates
    description: Endpoints to retrieve fiat exchange rates from Wallbit
  - name: Assets
    description: Endpoints to query information about assets (stocks) and categories
  - name: Operations
    description: Endpoints for deposit and withdrawal investment operations
  - name: Cards
    description: Endpoints to block and unblock cards
  - name: API Key
    description: Endpoints to revoke the API key used for authentication
paths:
  /api/public/v1/operations/internal:
    post:
      tags:
        - Operations
      summary: Perform internal operation (investment deposit or withdrawal)
      description: >-
        Allows moving funds between the checking (DEFAULT) account and the
        investment (INVESTMENT) account. Deposit: moves funds from DEFAULT to
        INVESTMENT to invest. Withdrawal: moves funds from INVESTMENT to DEFAULT
        to use the money. Requires complete investment KYC.
      operationId: internalOperation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - currency
                - from
                - to
                - amount
              properties:
                currency:
                  type: string
                  description: Currency code
                  example: USD
                from:
                  type: string
                  enum:
                    - DEFAULT
                    - INVESTMENT
                  description: Source account
                  example: DEFAULT
                to:
                  type: string
                  enum:
                    - DEFAULT
                    - INVESTMENT
                  description: Destination account
                  example: INVESTMENT
                amount:
                  type: number
                  format: float
                  description: Amount to transfer
                  minimum: 1
                  maximum: 999999
                  example: 100
            examples:
              deposit:
                summary: Deposit to investment account
                value:
                  currency: USD
                  from: DEFAULT
                  to: INVESTMENT
                  amount: 100
              withdrawal:
                summary: Withdrawal from investment account
                value:
                  currency: USD
                  from: INVESTMENT
                  to: DEFAULT
                  amount: 50
      responses:
        '200':
          description: Operation completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                locked:
                  summary: Account locked
                  value:
                    error: Your investment account is locked
                kyc-incomplete:
                  summary: KYC incomplete
                  value:
                    error: You must complete investment KYC to perform this operation
                migrating:
                  summary: Account migrating
                  value:
                    error: Your account is being migrated. Please try again later.
        '422':
          description: Validation error or insufficient funds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                insufficient-funds:
                  summary: Insufficient funds
                  value:
                    error: Insufficient funds
                validation:
                  summary: Validation error
                  value:
                    message: The given data was invalid.
                    errors:
                      amount:
                        - The amount field is required.
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - apiKey: []
components:
  schemas:
    Transaction:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          description: Transaction unique identifier
        type:
          type: string
          description: Transaction type
          example: WITHDRAWAL_LOCAL
        external_address:
          type: string
          nullable: true
          description: >-
            External address used for the transaction (for example, a name in
            WITHDRAWAL_LOCAL operations)
          example: Juan Perez
        source_currency:
          type: object
          properties:
            code:
              type: string
            alias:
              type: string
        dest_currency:
          type: object
          properties:
            code:
              type: string
            alias:
              type: string
        source_amount:
          type: number
          format: float
          description: Source amount
        dest_amount:
          type: number
          format: float
          description: Destination amount
        status:
          type: string
          description: Transaction status
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        comment:
          type: string
          nullable: true
          description: Optional comment
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message
        error:
          type: string
          description: Error description
  responses:
    Unauthorized:
      description: Missing or invalid API Key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: Missing API Key
              value:
                message: API Key required. Please provide X-API-Key header.
            invalid:
              summary: Invalid API Key
              value:
                message: Invalid or expired API Key.
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              your_permissions:
                type: array
                items:
                  type: string
          example:
            message: 'Insufficient permissions. Required permission: read'
            your_permissions:
              - trade
    TooManyRequests:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              retry_after:
                type: integer
                description: Seconds until rate limit resets
          example:
            message: Too many requests. Please try again later.
            retry_after: 42
      headers:
        X-RateLimit-Limit:
          description: Total requests allowed per minute
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests remaining in current window
          schema:
            type: integer
        X-RateLimit-Reset:
          description: Unix timestamp when rate limit resets
          schema:
            type: integer
        Retry-After:
          description: Seconds to wait before retry
          schema:
            type: integer
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-API-Key
      in: header
      description: >-
        API Key authentication. Obtain your API key from the Wallbit dashboard
        under Settings → API Keys.

````