Remove takeprofit
/perp/isolated/trade/takeprofitPrivateRemove the takeprofit from an open or running trade. The trade id and the market keys are passed as query parameters. Returns the updated trade.
Permissions: futures:isolated:write
id*stringTrade 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)$uuidinstrument*stringInstrument of the market
"inverse_perp""quanto_perp"pair*stringPair of the market
OK
application/json- response
id*stringInternal trade 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)$uuidinstrument*stringInstrument of the market
"inverse_perp""quanto_perp"pair*stringPair of the market
type*"limit"Open trades are always limit orders
"limit"side*stringTrade side
"buy""sell"openingFee*integerFee to be paid when opening the position
closingFee*integerFee for closing (0 until position is opened)
maintenanceMargin*integerMaintenance margin (0 until position is opened)
quantity*numberNumber of contracts to trade
entryNotionalUsd*numberNotional value at entry (in USD)
exitNotionalUsd*|Notional value at exit (in USD), null until the trade is closed
margin*integerMargin reserved for the order
leverage*numberLeverage multiplier for the position
price*numberLimit price at which to enter the position (in USD)
liquidation*numberCalculated liquidation price for the position (in USD)
stoploss*numberStop loss price level (0 if not set, in USD)
takeprofit*numberTake profit price level (0 if not set, in USD)
stoplossTrailingDistance*numberTrailing stop distance as a fraction of price (0 if not trailing)
exitPrice*|Exit price (0 until position is closed, in USD)
pl*integerProfit and loss (0 until position is opened)
createdAt*stringTimestamp when the order was created
date-timefilledAt*nullTimestamp when filled (null while order is open)
closedAt*nullTimestamp when closed (null while order is open)
entryPrice*numberIntended entry price for the position (in USD)
entryMargin*integerInitial margin reserved for the order
entryBtcPrice*numberBitcoin price the sats amounts of the trade are valued at (in USD)
open*booleanWhether the trade is open (waiting to be filled)
running*booleanWhether the trade is running (false until filled)
canceled*booleanWhether the trade was canceled
closed*booleanWhether the trade is closed
sumFundingFees*integerFunding fees (0 until position is opened)
sumQuantoAdjustmentFees*integerTotal quanto adjustment fees accumulated for the position
sumCashInPl*integerTotal amount cashed in from PL over the trade lifetime
sumCashInMargin*integerTotal amount cashed in from margin over the trade lifetime
clientId*|Optional custom data field (max 64 characters)
label*|Optional free label (max 64 characters) to group or tag trades, e.g. by strategy. Not unique.
nullimport { createHttpClient } from '@ln-markets/sdk/rest/v3'
const client = createHttpClient({
key: 'your-key',
secret: 'your-secret',
passphrase: 'your-passphrase',
})
const result = await client.perp.isolated.removeTakeprofit({
id: 'd0b9f9a0-4f6e-4a5a-8b7a-7f0f5f9a8a1e',
instrument: 'inverse_perp',
pair: 'btc_usd'
}){
"id": "d0b9f9a0-4f6e-4a5a-8b7a-7f0f5f9a8a1e",
"instrument": "inverse_perp",
"pair": "btc_usd",
"type": "limit",
"side": "buy",
"openingFee": 10,
"closingFee": 0,
"maintenanceMargin": 0,
"quantity": 100,
"entryNotionalUsd": 100,
"exitNotionalUsd": null,
"margin": 1000,
"leverage": 10,
"price": 20000,
"liquidation": 18000,
"stoploss": 10,
"takeprofit": 10,
"stoplossTrailingDistance": 0,
"exitPrice": 0,
"pl": 0,
"createdAt": "2025-09-01T15:04:21.129Z",
"filledAt": null,
"closedAt": null,
"entryPrice": 20000,
"entryMargin": 1000,
"entryBtcPrice": 100000,
"open": true,
"running": false,
"canceled": false,
"closed": false,
"sumFundingFees": 0,
"sumQuantoAdjustmentFees": 0,
"sumCashInPl": 0,
"sumCashInMargin": 0,
"clientId": "test-client-id-123",
"label": "strategy-a"
}Update stoploss PUT
Set the stoploss of an open or running trade. With mode: fixed value is a stop price; with mode: trailing value is a trailing distance (fraction of price…
Update takeprofit PUT
Set the takeprofit price of an open or running trade. Returns the updated trade. To remove the takeprofit, use DELETE /perp/isolated/trade/takeprofit.