Skip to content

Get Leverage

Returns the leverage selected for a subaccount: one entry per market where a leverage was set with Update Leverage. A market without an entry uses its maximum leverage.

Each entry carries the custom initial margin fraction in parts per million; the leverage is 1,000,000 / custom_imf_ppm.

Method Declaration

TypeScript
async getPerpetualMarketsLeverage(
    address: string,
    subaccountNumber: number,
): Promise<ClobModule.QueryLeverageResponse>

Parameters

ParameterLocationTypeRequiredDescription
ownerpathAddresstrueAddress of the account that owns the subaccount
numberpathu32trueSubaccount number

Response

StatusMeaningSchemaDescription
200OKClobPairLeverageInfoclob_pair_leverage: selected leverage per clob pair
400Bad RequestThe request was malformed or invalid.
{ "clob_pair_leverage": [{ "clob_pair_id": 3, "custom_imf_ppm": 500000 }] }

Here clob pair 3 (XRP-USD) is set to 2×.

Examples: API