Set leverage
Deprecated
/futures/cross/leveragePrivateDeprecated: /futures is being replaced by the /perp API; this route has no /perp equivalent yet. Set the leverage of the cross margin position. If the available margin is not enough to cover the new position, some of the P&L, valued at the Mark price, is realized to cover the difference if possible. Returns the updated position.
Permissions: futures:cross:write
application/json- body
leverage*numberNew leverage
1 <= value <= 100The updated cross position
application/json- response
id*stringPosition ID
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidupdatedAt*stringTimestamp marking the last update of the position
date-timemargin*integerCross margin balance
quantity*numberQuantity of the position
leverage*integerLeverage of the position
0 < valueentryPrice*|Entry price
runningMargin*integerRunning margin
initialMargin*integerInitial margin
maintenanceMargin*integerMaintenance margin
liquidation*|Liquidation price
tradingFees*integerTrading fees
fundingFees*integerFunding fees
totalPl*integerTotal profit/loss
deltaPl*integerDelta profit/loss
import { createHttpClient } from '@ln-markets/sdk/rest/v3'
const client = createHttpClient({
key: 'your-key',
secret: 'your-secret',
passphrase: 'your-passphrase',
})
const result = await client.futures.cross.setLeverage({
leverage: 20
}){
"id": "c0b9f9a0-4f6e-4a5a-8b7a-7f0f5f9a8a1e",
"updatedAt": "2023-05-23T09:52:57.863Z",
"margin": 100,
"quantity": 100,
"leverage": 10,
"entryPrice": 100,
"runningMargin": 100,
"initialMargin": 100,
"maintenanceMargin": 100,
"liquidation": 100,
"tradingFees": 100,
"fundingFees": 100,
"totalPl": 100,
"deltaPl": 100
}Deposit to cross margin POST
Deprecated: /futures is being replaced by the /perp API; this route has no /perp equivalent yet. Move amount sats from your balance to the cross margin…
Withdraw from cross margin POST
Deprecated: /futures is being replaced by the /perp API; this route has no /perp equivalent yet. Move amount sats from the cross margin account back to…