---
title: "Set margin configuration"
method: POST
path: "/account/margin/{market}"
tags: ["Account"]
---

# Set margin configuration

`POST /account/margin/{market}`

Set margin configuration for an account and market

## Path parameters

- `market` string, required

## Request body

- RequestsAccountMarginRequest
  - `leverage` integer, required — Leverage value (1 up to market's maximum leverage)
  - `margin_type` string, required — Margin type (CROSS or ISOLATED)
  - `on_behalf_of_account` string — Specify sub-account ID to set margin for, if not provided, it will be the main account itself

## Response `200`

OK

- ResponsesUpdateAccountMarginConfigResp
  - `account` string — Account ID
  - `leverage` integer — Leverage value
  - `margin_type` string — Margin type (CROSS/ISOLATED)
  - `market` string — Market symbol

## Other responses

- `400` — Bad Request

## Changes

- **2025-12-24** `846a2e2b455b` — 1 breaking, 2 info
  - added required request body
  - added the media type `application/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `400`

[Change history](https://skmtc.dev/tradeparadex/apis/paradex-rest-api-2/changes/account/margin/:market/post.md)

---

[API](https://skmtc.dev/tradeparadex/apis/paradex-rest-api-2.md) · [All operations](https://skmtc.dev/tradeparadex/apis/paradex-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/tradeparadex/apis/paradex-rest-api-2/revisions/846a2e2b455b?raw)
