Skip to main content
Glama

position_calculate

Read-onlyIdempotent

Risk-first position sizing with quantity, notional, margin, effective leverage, fees, funding, breakeven, liquidation estimate, target R multiples and warnings. Use position_plan_on_chart instead when the user should see the plan on the chart.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYes
stopYes
entryYes
equityYesAccount equity in quote currency.
feeBpsNoFee per side in basis points. Default 4.
targetsNoTake-profit prices and the percentage closed at each. Allocations should total 100.
leverageNoSelected venue leverage. Default 1.
fundingRateNoFunding per settlement as a fraction, e.g. 0.0001.
riskPercentYesEquity risked if the stop fills, in percent.
holdingHoursNoExpected holding time for the funding estimate.
fundingPerDayNoFunding settlements per day. Default 3.
maintenanceMarginRateNoFraction used for approximate liquidation. Default 0.005.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / required
      Previous value: -[
      -  "side",
      -  "equity",
      -  "riskPercent",
      -  "entry",
      -  "stop",
      -  "targets"
      -]New value: +[
      +  "side",
      +  "equity",
      +  "riskPercent",
      +  "entry",
      +  "stop"
      +]
  2. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources