Get trade
/perp/isolated/tradePrivateGet one of your trades in any state, of any perpetual market, by its id or its clientId (pass exactly one). A running trade pl is the unrealized P&L, valued at the Mark price, or null while its market has no price. An unknown trade fails with NOT_FOUND.
Permissions: futures:isolated:read
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)$uuidclientId?stringClient ID given when the trade was placed
length <= 64OK
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.getTrade({
id: 'd0b9f9a0-4f6e-4a5a-8b7a-7f0f5f9a8a1e',
clientId: 'test-client-id-123'
}){
"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"
}Close trade POST
Close a running trade at the bid (long) or ask (short) price for its size. Its margin plus P&L, and the maintenance margin left after the closing fee, are…
Place trade POST
Place a new isolated trade on a perpetual market. Returns the trade: running for a market order, open for a limit order until it fills. Limit order…