Portfolios

Corrects a lot that was entered wrong. Only the fields you send change. The instrument itself cannot be edited — a lot on the wrong stock or contract is a different holding, so delete it and add the right one. To record a sale, close the lot instead of editing its quantity down; editing it away loses the realized profit.

patch/v1/portfolios/{id}/lots/{lotId}

Request

Path parameters

idstring uuid required

The portfolio holding the lot.

lotIdstring uuid required

The lot to correct.

Request body

quantitynumber double nullable

The corrected signed size. Negative is a short position or a written option.

costPerUnitnumber double nullable

The corrected price per share, always positive.

acquiredDatestring date nullable

The corrected trade date, yyyy-MM-dd.

notestring nullable

The corrected note. Send an empty string to clear it.

fxRatenumber double nullable

The corrected broker exchange rate: units of the portfolio's currency per 1 unit of the lot's currency.

clearFxRateboolean nullable

Send true to remove the broker exchange rate, so the lot converts at the official rate on its trade date. Cannot be combined with fxRate.

Response

OK

portfolioIdstring uuid
portfolioNamestring nullable
deduplicatedboolean

True when this request repeated an add that had already landed, so nothing was created and the existing lot is returned. A client that retried a timed-out request reads this instead of discovering a second holding. The response is 200 rather than 201.

Changes

No recorded changes to this operation across all 1 revision of this API.