Skip to main content
Glama

RiskReward Trading Calculators

Fee-aware position size

calculate_position_size
Read-onlyIdempotent

Calculate position quantity and notional for a linear crypto futures trade from user-specified account balance, risk percentage, entry and stop. Includes separate entry/stop fees and optional target profit and net R. Direction is derived. Use when asked how much to buy or sell for a specified risk budget. Ask for missing prices or risk preference; do not invent them. Does not calculate liquidation, leverage, inverse contracts, exchange lot rounding, signals, or execute orders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feesNoUser-supplied rates. Omission explicitly assumes zero fees; no exchange rate lookup is performed.
stopPriceYesPlanned stop price. Direction is derived from entry and stop.
entryPriceYesPlanned entry price in quote currency per base unit.
riskPercentYesUser-chosen account risk percentage, e.g. 1 means 1%. Never infer a risk preference.
targetPriceNoOptional profit target, opposite the stop relative to entry.
quoteCurrencyNoCurrency shared by all monetary inputs. Defaults to USD; no currency conversion is performed.
accountBalanceYesAccount balance in the same quote currency as prices.
instrumentTypeNoLinear quote-margined instruments only. Inverse contracts and liquidation are unsupported.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYes
inputsYes
metricsYes
formulasYes
warningsYes
assumptionsYes
reproduceUrlYes
documentationUrlYes
calculationVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources