Returns the list of partial close events for the current pending signal.
Each element represents a partial profit or loss close executed via commitPartialProfit / commitPartialLoss (or their Cost variants).
Returns null if no pending signal exists. Returns an empty array if no partials were executed yet.
Each entry contains:
type
percent
currentPrice
costBasisAtClose
entryCountAtClose
Trading pair symbol
Promise resolving to array of partial close records or null
import { getPositionPartials } from "backtest-kit";const partials = await getPositionPartials("BTCUSDT");// No partials yet: []// After one partial profit: [{ type: "profit", percent: 50, currentPrice: 45000, ... }] Copy
import { getPositionPartials } from "backtest-kit";const partials = await getPositionPartials("BTCUSDT");// No partials yet: []// After one partial profit: [{ type: "profit", percent: 50, currentPrice: 45000, ... }]
Returns the list of partial close events for the current pending signal.
Each element represents a partial profit or loss close executed via commitPartialProfit / commitPartialLoss (or their Cost variants).
Returns null if no pending signal exists. Returns an empty array if no partials were executed yet.
Each entry contains:
type— "profit" or "loss"percent— percentage of position closed at this partialcurrentPrice— execution price of the partial closecostBasisAtClose— accounting cost basis at the moment of this partialentryCountAtClose— number of DCA entries accumulated at this partial