---
title: "Set Leverage"
method: POST
path: "/v1/perps/leverage"
tags: ["Positions"]
---

# Set Leverage

`POST /v1/perps/leverage`

Sets the leverage for a market. Leverage must be a positive integer and cannot exceed the market's maximum leverage. Reducing leverage while insufficient margin is available will return 400 with `error_code=insufficient_margin`. For how leverage and margin work, see [Leverage](/leverage).

## Request body

- SetLeverageReq
  - `market` string, required — Perps market to set leverage for
  - `leverage` string, required — New leverage value. Must be a positive integer not exceeding the market maximum.

## Response `200`

Leverage updated successfully

- GenericResponse
  - `success` boolean, required — Whether the request was successful
  - `error` string — Error message, present only on failure
  - `error_code` string — Semantic error code. See each endpoint's error responses for the specific codes it can return.
  - `deprecated` string — Deprecation notice, if applicable

## Other responses

- `400` — Bad request. The request was malformed or failed validation.
- `401` — Authentication required. Provide a valid JWT or API key.
- `403` — Access denied. The authenticated account does not have permission.
- `429` — Rate limit exceeded. Slow down request frequency.
- `500` — Internal server error.

---

[API](https://skmtc.net/ondoperps/apis/ondo-perps-rest-api.md) · [All operations](https://skmtc.net/ondoperps/apis/ondo-perps-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ondoperps/ondo-perps-rest-api/revisions/39df6b2fa672/schema)
