Returns the remaining cost basis in dollars — how much of the position is still held (not yet closed by partials). Correctly accounts for DCA entries between partial closes.
Correctly-named alias for getTotalCostClosed.
Trading pair symbol
Promise - remaining cost basis in dollars
import { getRemainingCostBasis } from "backtest-kit";const remaining = await getRemainingCostBasis("BTCUSDT");console.log(`Holding $${remaining} of position`); Copy
import { getRemainingCostBasis } from "backtest-kit";const remaining = await getRemainingCostBasis("BTCUSDT");console.log(`Holding $${remaining} of position`);
Returns the remaining cost basis in dollars — how much of the position is still held (not yet closed by partials). Correctly accounts for DCA entries between partial closes.
Correctly-named alias for getTotalCostClosed.