Position Size
position_sizeRisk-based position sizing for trading agents: from account balance, risk per trade (percent or fixed amount), entry and stop price returns units to buy/sell, notional, leverage needed, stop distance, and with a target the reward:risk ratio, profit at target and break-even win rate. Optional fees and lot-size rounding. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/position-size
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": {
"accountBalance": "<accountBalance>",
"entryPrice": "<entryPrice>",
"stopPrice": "<stopPrice>"
},
"name": "position_size"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feePct | No | Fee per side in percent of notional (included in the risk) | |
| lotSize | No | Round units down to this step (e.g. 0.001 BTC, 1 share) | |
| riskPct | No | Percent of the account to risk | |
| stopPrice | Yes | Stop loss; below entry = long, above = short | |
| entryPrice | Yes | ||
| riskAmount | No | Fixed amount to risk (overrides riskPct) | |
| targetPrice | No | Optional take-profit | |
| accountBalance | Yes | Account equity |