{"$defs":{"CashFlowInput":{"properties":{"amount":{"description":"Amount in the specified currency. Negative = outflow (fees, taxes, costs). Positive = inflow (rental income, dividends, refunds).","title":"Amount","type":"number"},"currency":{"default":"USD","description":"Currency code e.g. USD, GBP, EUR. Defaults to USD.","title":"Currency","type":"string"},"fx_to_usd":{"default":1.0,"description":"FX rate at this date: 1 unit of currency = X USD. Defaults to 1.0 for USD.","exclusiveMinimum":0,"title":"Fx To Usd","type":"number"},"date":{"description":"Date the cash flow was received or paid (YYYY-MM-DD)","format":"date","title":"Date","type":"string"},"label":{"default":"","description":"Optional label e.g. 'stamp duty', 'legal fees', 'rental income'","title":"Label","type":"string"}},"required":["amount","date"],"title":"CashFlowInput","type":"object"}},"example":{"cash_flows":[{"amount":-18000,"currency":"GBP","date":"2022-01-15","fx_to_usd":1.37},{"amount":-5000,"currency":"GBP","date":"2022-01-15","fx_to_usd":1.37},{"amount":-100000,"currency":"USD","date":"2024-06-01","fx_to_usd":1.0}],"purchase_currency":"GBP","purchase_date":"2022-01-15","purchase_fx_to_usd":1.37,"purchase_price":1000000,"reference_fx_at_sale":1.27,"sale_currency":"USD","sale_date":"2024-06-01","sale_fx_to_usd":1.0,"sale_price":1700000},"properties":{"purchase_price":{"description":"Purchase price in purchase currency","exclusiveMinimum":0,"title":"Purchase Price","type":"number"},"purchase_currency":{"description":"Purchase currency code e.g. GBP, EUR, JPY","title":"Purchase Currency","type":"string"},"purchase_date":{"description":"Purchase date (YYYY-MM-DD)","format":"date","title":"Purchase Date","type":"string"},"purchase_fx_to_usd":{"description":"FX rate at purchase: 1 unit of purchase currency = X USD","exclusiveMinimum":0,"title":"Purchase Fx To Usd","type":"number"},"sale_price":{"description":"Sale price in sale currency","exclusiveMinimum":0,"title":"Sale Price","type":"number"},"sale_currency":{"description":"Sale currency code e.g. USD, EUR, GBP","title":"Sale Currency","type":"string"},"sale_date":{"description":"Sale date (YYYY-MM-DD)","format":"date","title":"Sale Date","type":"string"},"sale_fx_to_usd":{"description":"FX rate at sale: 1 unit of sale currency = X USD. Use 1.0 if sale is already in USD.","exclusiveMinimum":0,"title":"Sale Fx To Usd","type":"number"},"reference_fx_at_sale":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"Purchase currency FX rate at sale date — used for FX attribution when the sale proceeds are in a different currency than the purchase. e.g. bought in GBP at 1.37, sold in USD — provide GBP/USD rate at sale (e.g. 1.27) to correctly show FX % change as -7.30% rather than -26.99%. Leave blank when purchase and sale are in the same currency.","title":"Reference Fx At Sale"},"cash_flows":{"description":"Dated cash flows during the hold period. Positive = revenue (rental income, dividends, refunds). Negative = expense (acquisition costs, taxes, maintenance, selling costs). Each item can be in any currency — provide fx_to_usd at that date. Label is optional. Engine auto-classifies as purchase/carry/sale by date.","items":{"$ref":"#/$defs/CashFlowInput"},"title":"Cash Flows","type":"array"}},"required":["purchase_price","purchase_currency","purchase_date","purchase_fx_to_usd","sale_price","sale_currency","sale_date","sale_fx_to_usd"],"title":"FXPnLRequest","type":"object"}