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

# Change collateral account leverage

> Change the leverage setting for a collateral trading account via the WhiteBIT V4 API.

* [Collateral account summary](/api-reference/collateral-trading/collateral-account-summary) — View current margin and equity details
* [Collateral account hedge mode](/api-reference/collateral-trading/collateral-account-hedge-mode) — Check current hedge mode status
* [Update collateral account hedge mode](/api-reference/collateral-trading/update-collateral-account-hedge-mode) — Enable or disable hedge mode
* [Open positions](/api-reference/collateral-trading/open-positions) — View current open positions


## OpenAPI

````yaml /openapi/private/http-trade-v4.yaml POST /api/v4/collateral-account/leverage
openapi: 3.0.3
info:
  title: Private HTTP API V4 - Collateral Trading
  description: |
    WhiteBIT Private HTTP API V4 for collateral/margin trading operations.

    Base URL: https://whitebit.com

    All endpoints return time in Unix-time format.
    All endpoints return either a JSON object or array.
    For receiving responses from API calls please use http method POST.

    Authentication required for all endpoints.
  version: 4.0.0
  license:
    name: WhiteBIT Terms of Service
    url: https://whitebit.com/terms
servers:
  - url: https://whitebit.com
    description: WhiteBIT Global Server
  - url: https://whitebit.eu
    description: WhiteBIT EU Server
security:
  - ApiKeyAuth: []
    PayloadAuth: []
    SignatureAuth: []
tags:
  - name: Collateral Trading
    description: Endpoints for collateral/margin trading operations
  - name: Spot Trading
    description: Endpoints for spot trading operations
  - name: Market Fee
    description: Endpoints for querying trading fees
paths:
  /api/v4/collateral-account/leverage:
    post:
      tags:
        - Collateral Trading
      summary: Change Collateral Account Leverage
      description: >
        The endpoint changes the leverage level for the
        [collateral](/glossary#balance-collateral) trading account. Leverage
        determines the ratio of borrowed funds to collateral and directly
        affects margin requirements and liquidation thresholds. Accepted values:
        `1`, `2`, `3`, `5`, `10`, `20`, `50`, `100`.


        Each leverage level has a corresponding bracket defining the maximum
        position size for the tier. When a position exceeds the bracket limit,
        the system applies higher tiers with progressively lower leverage. Query
        market-specific brackets via `GET /api/v4/public/futures`.


        <Warning>

        Rate limit: 1000 requests/10 sec.

        </Warning>


        <Note>

        A market's `max_leverage` field (from `GET /api/v4/public/futures`) may
        be lower than `100`. Setting leverage above a market's maximum results
        in an error.

        </Note>


        <Warning>

        Changing leverage affects **all open positions** across margin and
        futures trading. Decreasing leverage increases margin requirements — if
        available funds are insufficient to support the new level, the request
        returns an error.

        </Warning>


        <Accordion title="Error Codes">
          - `30` - invalid `leverage` value (out of range, non-integer, or wrong type). Setting leverage above a market's `max_leverage` also surfaces here as an out-of-range value
          - `17` - the requested leverage is valid but available balance is insufficient to support it
          - `113` - leverage cannot be changed while open positions or orders exist
        </Accordion>
      operationId: changeCollateralAccountLeverage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - leverage
                - request
                - nonce
              properties:
                leverage:
                  type: integer
                  minimum: 1
                  maximum: 100
                  description: >-
                    Target leverage level. Accepted values: `1`, `2`, `3`, `5`,
                    `10`, `20`, `50`, `100`. The effective maximum depends on
                    the market's `max_leverage`.
                  example: 5
                request:
                  type: string
                  example: '{{request}}'
                nonce:
                  type: integer
                  example: 1594297865000
            example:
              leverage: 5
              request: '{{request}}'
              nonce: 1594297865000
      responses:
        '200':
          description: Successful response - leverage changed
          content:
            application/json:
              schema:
                type: object
                properties:
                  leverage:
                    type: integer
                    description: >-
                      Active leverage level for the collateral account after the
                      update, from `1` (no leverage) to `100`
                    example: 5
              example:
                leverage: 5
        '422':
          description: Inner validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily unavailable
      security:
        - ApiKeyAuth: []
          PayloadAuth: []
          SignatureAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Error code
          example: 30
        message:
          type: string
          description: Error message
          example: Validation failed
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Detailed error information
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-TXC-APIKEY
      description: The public WhiteBIT API key.
    PayloadAuth:
      type: apiKey
      in: header
      name: X-TXC-PAYLOAD
      description: Base64-encoded JSON request body.
    SignatureAuth:
      type: apiKey
      in: header
      name: X-TXC-SIGNATURE
      description: >-
        HMAC-SHA512 signature of the payload, hex-encoded. Computed as
        hex(HMAC-SHA512(payload, api_secret)).

````