Skip to main content
Glama

Update Portfolio Lot

UpdatePortfolioLot

Correct a lot the USER already recorded: a mistyped quantity, price, trade date, note or exchange rate. Only the fields you pass change; the rest are left alone.

The instrument itself cannot be edited: a lot on the wrong stock or the wrong contract is a different holding, so remove it with RemovePortfolioLot and add the right one. To record a sale, use ClosePortfolioLot rather than editing the quantity down, because editing it away loses the realized profit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoOptional. A replacement note, up to 256 characters.
lotIdYesThe lot id shown by GetMyPortfolio, e.g. a1b2c3d4.
fxRateNoOptional. The broker's exchange rate on the trade, as units of the portfolio's currency per 1 unit of the lot's currency.
quantityNoOptional. The corrected signed size. Negative is a short or written option.
portfolioYesThe portfolio holding the lot, by name.
clearFxRateNoOptional. True removes the broker's exchange rate, so the lot converts at the official rate on its trade date. Cannot be combined with fxRate.
costPerUnitNoOptional. The corrected price per share, always positive.
acquiredDateNoOptional. The corrected trade date, as yyyy-MM-dd.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / clearFxRate
      Added value: +{
      +  "default": false,
      +  "description": "Optional. True removes the broker's exchange rate, so the lot converts at the official rate on its trade date. Cannot be combined with fxRate.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / fxRate
      Added value: +{
      +  "default": null,
      +  "description": "Optional. The broker's exchange rate on the trade, as units of the portfolio's currency per 1 unit of the lot's currency.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
  2. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.