commitPartialProfitCost

declare function commitPartialProfitCost(symbol: string, dollarAmount: number): Promise<boolean>;

Executes partial close at profit level by absolute dollar amount (moving toward TP).

Convenience wrapper around commitPartialProfit that converts a dollar amount to a percentage of the invested position cost automatically. Price must be moving toward take profit (in profit direction).

Automatically detects backtest/live mode from execution context. Automatically fetches current price via getAveragePrice.

Parameter Description
symbol Trading pair symbol
dollarAmount Dollar value of position to close (e.g. 150 closes $150 worth)