Skip to main content

Get Leverage Information

API Description

This interface provides leverage details for both filled (retrieved using the Position ID) and unfilled (retrieved using the Order ID) orders. Please note that leverage information can only be obtained for one order (either filled or unfilled) at a time.

Note: Leverage information is only available via RESTful API.

Precautions

None

Authentication

This is a private interface and requires authentication. For details on using the RESTful API, refer to Introduction > Authentication & Code Snippet > Futures > RESTful Private Interface.

Request Method

GET

Endpoint

/v1/perpum/positions/leverage

Frequency Limit

The frequency limit for this interface is 10 requests/s per user ID and IP. In addition to this per-interface limit, a global rate limit is also enforced.

For detailed information on Global rate limits and API Rate Limiting Policy, please refer to the "Frequency Limit" section at click here

Request Parameters

ParameterMandatoryTypeDescription
positionIdfalseLongRequired when querying the leverage of a filled order.
orderIdfalseLongRequired when querying the leverage of an unfilled order.

Response Parameters

ParameterTypeDescription
dataBigDecimalPosition leverage

Request Example

The following Python code shows how to get the leverage of an unfilled order using the order ID.

Note: For a complete code example, please refer to Introduction > Authentication & Code Snippet > Futures > RESTful Private Interface.

params = {
# "positionId" : "",
"orderId" : "33308747742951172",
}

api_url = "/v1/perpum/positions/leverage"
method = "GET"
response_code, response_data = FuturesRestfulPrivate(params, api_url, method, sec_key, api_key) # the function FuturesRestfulPrivate() is defined in section (Introduction > Authentication & Code Snippet > Futures > RESTful Private Interface)

Note: For a complete Java code example, please refer to Introduction > Authentication & Code Snippet > Futures > RESTful Private Interface.

Response Example

The following is an example response returned by the above Python request:

{'code': 0, 'data': {'value': 5}, 'msg': ''}