# Transfer Subaccount Balance

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/subaccounts/transfers:
    post:
      summary: Transfer Subaccount Balance
      deprecated: false
      description: >-
        Transfers an amount of a single currency from one account to another,
        where both accounts belong to the authenticated account holder (the main
        account or any of its subaccounts).


        The debit is applied to the source account first; if the credit to the
        destination fails, the debit is automatically rolled back.


        **Required API scope:** `SUBACCOUNT_TRANSFER`. The API key presented in
        the `Authorization: Bearer <token>` header must carry this permission
        (keys with `UI_HOLDER` / `UI_ACCOUNT` permissions are also authorised).


        Both `source_account_id` and `destination_account_id` must be owned by
        the caller and must be different from one another. Amount precision is
        truncated to 8 decimal places (3 for SHIB, PEPE and BTT).



        :::info[Note]

        This endpoint does not allow transfers to and from the `instant-trade`
        account.

        :::
      operationId: transferSubaccountBalance
      tags:
        - One Trading Public REST API/Funding
        - Subaccounts
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubaccountTransferRequest'
            examples:
              default:
                value:
                  amount: '100.00'
                  currency: EUR
                  source_account_id: 8f2b6c1e-0a9d-4c7e-9b21-2f5d3a1c4e6a
                  destination_account_id: 3c7a1d40-6b2e-4f88-9a10-7e5c2b9f0d13
                summary: Move 100 EUR from a subaccount to the main account
      responses:
        '200':
          description: Transfer completed. Returns the outgoing transfer record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubaccountTransferResponse'
              examples:
                default:
                  summary: default
                  value:
                    transfer:
                      account_holder: 3c7a1d40-6b2e-4f88-9a10-7e5c2b9f0d13
                      transfer_id: 5b9e2f10-8c4a-4d21-b6f7-1a2c3d4e5f60
                      source_account_id: 8f2b6c1e-0a9d-4c7e-9b21-2f5d3a1c4e6a
                      destination_account_id: 3c7a1d40-6b2e-4f88-9a10-7e5c2b9f0d13
                      currency: EUR
                      amount: '100.00'
                      time: '2026-07-03T10:15:30.000Z'
          headers: {}
          x-apidog-name: OK
        '400':
          description: >-
            Validation error. Returned when a required field is missing, the
            amount is malformed, source and destination are identical, the
            source balance is insufficient, or a BLP account would drop below
            its threshold.
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missingAmount:
                  summary: missingAmount
                  value:
                    error: amount is required.
                invalidAmount:
                  summary: invalidAmount
                  value:
                    error: invalid amount.
                sameAccount:
                  summary: sameAccount
                  value:
                    error: >-
                      source_account_id and destination_account_id cannot be the
                      same.
                insufficientBalance:
                  summary: insufficientBalance
                  value:
                    error: >-
                      Account 8f2b… contains 50 EUR and a transfer of 100 was
                      requested
          headers: {}
          x-apidog-name: Bad Request
        '403':
          description: >-
            Permission denied. The API key lacks the `SUBACCOUNT_TRANSFER`
            scope, the caller is not a valid account holder, or one of the
            accounts is not owned by the caller.
          content:
            application/json:
              schema: *ref_0
              examples:
                default:
                  summary: default
                  value:
                    error: Permission denied.
          headers: {}
          x-apidog-name: Forbidden
        '422':
          description: >-
            Unprocessable. The source account has insufficient funds, or the
            user is currently in a de-risk state.
          content:
            application/json:
              schema: *ref_0
              examples:
                insufficientFunds:
                  summary: insufficientFunds
                  value:
                    error: INSUFFICIENT_FUNDS
                derisk:
                  summary: derisk
                  value:
                    error: USER_MGMT_USER_IN_DERISK
          headers: {}
          x-apidog-name: Parameter Error
        '500':
          description: Server error or server configuration error.
          content:
            application/json:
              schema: *ref_0
              examples:
                default:
                  summary: default
                  value:
                    error: Server error.
          headers: {}
          x-apidog-name: Server Error
      security: []
      x-apidog-folder: One Trading Public REST API/Funding
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/349694/apis/api-4422334-run
components:
  schemas:
    SubaccountTransferRequest:
      type: object
      required:
        - amount
        - currency
        - source_account_id
        - destination_account_id
      properties:
        amount:
          type: string
          description: >-
            Amount to transfer, as a decimal string. Must match `^[0-9,.]*$`.
            Truncated to 8 decimal places (3 for SHIB, PEPE, BTT).
          examples:
            - '100.00'
        currency:
          type: string
          description: Currency (asset) code of the balance to move.
          examples:
            - EUR
        source_account_id:
          type: string
          description: Account to debit. Must be owned by the caller.
          examples:
            - 8f2b6c1e-0a9d-4c7e-9b21-2f5d3a1c4e6a
        destination_account_id:
          type: string
          description: >-
            Account to credit. Must be owned by the caller and different from
            `source_account_id`.
          examples:
            - 3c7a1d40-6b2e-4f88-9a10-7e5c2b9f0d13
      x-apidog-orders:
        - amount
        - currency
        - source_account_id
        - destination_account_id
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    SubaccountTransferResponse:
      type: object
      properties:
        transfer:
          type: object
          properties:
            account_holder:
              type: string
              description: Account holder that owns both accounts.
            transfer_id:
              type: string
              description: Unique identifier for this transfer.
            source_account_id:
              type: string
            destination_account_id:
              type: string
            currency:
              type: string
            amount:
              type: string
            time:
              type: string
              format: date-time
              description: ISO-8601 timestamp of the transfer.
          x-apidog-orders:
            - account_holder
            - transfer_id
            - source_account_id
            - destination_account_id
            - currency
            - amount
            - time
          x-apidog-ignore-properties: []
      x-apidog-orders:
        - transfer
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
      x-apidog-orders:
        - error
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearerAuth:
      type: bearer
      scheme: bearer
      description: >-
        API key issued to the account holder, sent as `Authorization: Bearer
        <token>`. The key must hold the `SUBACCOUNT_TRANSFER` scope.
servers:
  - url: https://api.onetrading.com/fast
    description: Production Env
security: []

```