Cancel trade
Deprecated
/futures/isolated/trade/cancelPrivateDeprecated: use POST /perp/isolated/trade/cancel instead. Cancel an open trade (a limit order not filled yet). Returns the canceled trade.
Permissions: futures:isolated:write
application/json- body
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)$uuidOK
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)$uuidtype*"limit"Trade type
"limit"side*stringTrade side
"buy""sell"openingFee*integerFee that would have been paid when opening
closingFee*integerNo closing fee for canceled trades
maintenanceMargin*integerNo maintenance margin for canceled trades
quantity*numberNumber of contracts that were ordered
margin*integerMargin that was reserved for the order
leverage*numberLeverage multiplier that was requested
price*numberLimit price for the order (in USD)
liquidation*numberCalculated liquidation price for the order (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*|No exit price for canceled trades (in USD)
pl*integerNo profit/loss for canceled trades
createdAt*stringTimestamp when the trade was created
date-timefilledAt*nullNever filled in market (null for canceled trades)
closedAt*stringTimestamp when the trade was canceled
date-timeentryPrice*numberIntended entry price for the position (in USD)
entryMargin*integerInitial margin that was reserved
open*booleanWhether the trade is open (false for canceled)
running*booleanWhether the trade is running (false for canceled)
canceled*booleanWhether the trade was canceled before being filled
closed*booleanWhether the trade is closed (false for canceled)
sumFundingFees*integerNo funding fees for canceled trades
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)
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.isolated.cancel({
id: 'd0b9f9a0-4f6e-4a5a-8b7a-7f0f5f9a8a1e'
}){
"id": "d0b9f9a0-4f6e-4a5a-8b7a-7f0f5f9a8a1e",
"type": "limit",
"side": "buy",
"openingFee": 10,
"closingFee": 0,
"maintenanceMargin": 0,
"quantity": 100,
"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": "2025-09-01T15:04:21.129Z",
"entryPrice": 20000,
"entryMargin": 1000,
"open": false,
"running": false,
"canceled": true,
"closed": false,
"sumFundingFees": 0,
"sumCashInPl": 0,
"sumCashInMargin": 0,
"clientId": "test-client-id-123"
}Cancel all trades POST
Deprecated: use POST /perp/isolated/trades/cancel-all instead. Cancel all your open BTC/USD trades. Returns the canceled trades.
Cash-in trade POST
Deprecated: use POST /perp/isolated/trade/cash-in instead. Move amount sats from a running trade to your balance. Funds are first taken from the trade's…