Skip to main content
POST
/
v1
/
perps
/
leverage
Set Leverage
curl --request POST \
  --url https://api.ondoperps.xyz/v1/perps/leverage \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "market": "AAPL-USD.P",
  "leverage": "10"
}
'
{
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
market
string
required

Perps market to set leverage for

Example:

"AAPL-USD.P"

leverage
string
required

New leverage value. Must be a positive integer not exceeding the market maximum.

Example:

"10"

Response

Leverage updated successfully

success
boolean
required

Whether the request was successful

Example:

true

error
string

Error message, present only on failure

Example:

""

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

Example:

""