Target Sell Price
workflow.run_target_sell_priceThe sell price that makes a target ROI or a target profit on a spot trade after both fees: the inverse of workflow.run_crypto_profit. Give exactly one of targetRoiPct (a fraction, 0.25 = 25%, negative for a stop price, above -1) or targetProfit (money; needs investment or quantity). Fees are a fraction of each fill's value (0.001 = 0.1%): the buy fee on top of the coins' cost, the sell fee out of the sale value (each fee at most 0.05); prices may be in any currency and results are in the same one; investment is the total cash spent, buy fee included. sellPrice = buyPrice x (1 + buyFee) x (1 + ROI) / (1 - sellFee); a target ROI of 0 is the break-even price. Edge cases: giving both or neither of targetRoiPct and targetProfit is an error; giving both investment and quantity is an error; targetProfit without a size is an error; a target that loses the whole stake or more (ROI of -1 or lower, or cost plus target profit at or below zero) is an error; a negative target gives a stop price below break-even. Not covered: taxes, FIFO/LIFO lots, slippage, withdrawal or network fees, currency conversion, leverage and funding. A target ROI does not depend on the size; with investment or quantity the cost, proceeds, profit and fees are returned too. Use when user asks "at what price do I sell to make 20% after fees?" or "to net $500 on this position, where do I put my limit sell?". Returns: sellPrice, requiredRoiPct (a fraction), priceChangePct, priceMultiple, breakevenSellPrice, and with a size: quantity, totalCost, sellValue, sellFee, proceeds, profit, totalFees (null without one).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"buyPrice": "<buyPrice>"
},
"name": "workflow.run_target_sell_price"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buyPrice | Yes | Price paid per coin | |
| quantity | No | Number of coins bought. Give this or investment, not both | |
| buyFeePct | No | Buy fee as a fraction of the trade value, 0 to 0.05 (0.001 = 0.1%). Default 0 | |
| investment | No | Total cash spent on the buy, buy fee included. Give this or quantity, not both | |
| sellFeePct | No | Sell fee as a fraction of the trade value, 0 to 0.05. Default 0 | |
| targetProfit | No | Target profit in money after both fees (negative for a loss limit). Needs investment or quantity. Give this or targetRoiPct, not both | |
| targetRoiPct | No | Target return as a fraction of the cost (0.25 = 25%), above -1. Give this or targetProfit, not both |