Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Funding Cost

workflow.run_funding_cost
Read-only

Calculate the total funding cost (or income) for holding a perpetual futures position. Use when user asks "how much funding will I pay holding X days?" or "is funding eating my profit?". Returns: totalCost (positive = you pay, negative = you receive; in the coin for inverse), costPerDay, annualPct, totalPeriods, breakevenShift (size of the price move whose PnL equals the funding: up for a positive rate, down for a negative one, for either side).

Input Schema

NameRequiredDescriptionDefault
daysYesNumber of days to hold
sideYesTrade direction: "long" or "short"
sizeBaseYesPosition size in base asset
entryPriceYesEntry price
fundingRateYesFunding rate per 8h period as fraction, e.g. 0.0001
contractTypeNolinear = USDT-margined (default), inverse = coin-margined. For inverse, sizeBase is USD contracts and cost figures come out in the base coin.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / side / description
      Added value: +"Trade direction: \"long\" or \"short\""
  2. Changed1 schema field changed
    • addedInput schema / properties / contractType
      Added value: +{
      +  "description": "linear = USDT-margined (default), inverse = coin-margined. For inverse, sizeBase is USD contracts and cost figures come out in the base coin.",
      +  "enum": [
      +    "linear",
      +    "inverse"
      +  ],
      +  "type": "string"
      +}
  3. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.