v56

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-03113163377.5 KB
Account

Set margin configuration

Set margin configuration for an account and market

post/account/margin/{market}

Path parameters

marketstring required

Market Name - example: BTC-USD-PERP

Request body

leverageinteger required

Leverage value (1 up to market's maximum leverage)

margin_typestring required

Margin type (CROSS or ISOLATED)

on_behalf_of_accountstring

Specify sub-account ID to set margin for, if not provided, it will be the main account itself

Example request

{
  "leverage": 10,
  "margin_type": "CROSS",
  "on_behalf_of_account": "0x1234567890abcdef"
}

Response

OK

accountstring

Account ID

leverageinteger

Leverage value

margin_typestring

Margin type (CROSS/ISOLATED)

marketstring

Market symbol