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

# Set leverage for a market

> Set per-market leverage for one `(exchange, asset)` pair; read the current value via `GET /exchange/market-settings`.



## OpenAPI

````yaml https://vooi-api-app.fly.dev/swagger/json post /exchange/leverage
openapi: 3.1.0
info:
  title: VOOI API
  description: Unified perps API
  version: '1.0'
  contact: {}
servers:
  - url: https://perps-api.vooi.io
security: []
tags: []
paths:
  /exchange/leverage:
    post:
      tags:
        - Exchange
      summary: Set leverage for a market
      description: >-
        Set per-market leverage for one `(exchange, asset)` pair; read the
        current value via `GET /exchange/market-settings`.
      operationId: ExchangeController_setLeverage
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetLeverageBodyDto'
      responses:
        '201':
          description: ''
        '503':
          description: ExchangeApiError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDTO'
      security:
        - bearer: []
components:
  schemas:
    SetLeverageBodyDto:
      type: object
      properties:
        asset:
          type: string
          minLength: 1
          description: >-
            Asset identifier: base symbol (e.g. "ETH") or full pair (e.g.
            "ETHUSDC").
          example: ETH
        exchange:
          type: string
          enum:
            - aster
            - binance
            - bybit
            - extended
            - gate
            - hyperliquid
            - lighter
            - mexc
            - ondo
            - robinhood
          description: Supported perpetual exchange
        leverage:
          type: number
          exclusiveMinimum: 0
          example: 10
      required:
        - asset
        - exchange
        - leverage
      title: SetLeverage
    ErrorResponseDTO:
      type: object
      properties:
        message:
          type: string
          example: 'Invalid order id: 123'
        statusCode:
          example: 503
          type: number
      required:
        - message
      title: ErrorResponse
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.