--- title: "Registering a portfolio recipe" slug: "setting-a-portfolio-recipe" updated: 2026-03-04T09:01:15Z published: 2026-03-04T09:01:15Z canonical: "support.lusid.com/setting-a-portfolio-recipe" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # Registering a portfolio recipe A recipe is a hierarchical, modular document whose primary purpose is to govern valuation operations. [More information](/v1/docs/what-is-a-recipe). You must register a recipe with a portfolio if: - You wish to enable instrument events for that portfolio, whether this is [instrument lifecycle events](/v1/docs/understanding-instrument-lifecycle-events-emitted-by-lusid) or [corporate actions](/v1/docs/understanding-dedicated-corporate-action-events). - The portfolio contains complex instruments that require market data in order to [generate holdings](/v1/docs/holdings), such as floating-rate bonds or inflation-linked bonds. Sometimes this means it is called a ‘holdings recipe’, but it is the same thing. > **Note**: You can create a ‘universal’ recipe and use it everywhere: in valuation, reconciliation and other operations requiring a recipe, and also register it with all your portfolios to enable instrument events and generate complex holdings. You do not have to create separate recipes. ## Creating a portfolio recipe **As a minimum**, we recommend calling the [UpsertConfigurationRecipe](https://www.lusid.com/docs/api/lusid/endpoints/configuration-recipe/UpsertConfigurationRecipe/) API to create a basic portfolio recipe as follows: ```json curl -X POST 'https://.lusid.com/api/api/recipes'  -H 'Content-Type: application/json-patch+json'  -H 'Authorization: Bearer '  -d '{  "configurationRecipe": {    "scope": "MyRecipes",    "code": "MyBasicPortfolioRecipe",    "description": "Basic portfolio recipe",    "market": {      "marketRules": [        {          "key": "Fx.*.*",          "supplier": "Lusid",          "dataScope": "MyFxRates",          "quoteType": "Rate",          "field": "mid",          "quoteInterval": "1D.0D"        },        {          "key": "Quote.RIC.*",          "supplier": "Lusid",          "dataScope": "MyFloatingRateBondFixings",          "quoteType": "Rate",          "field": "mid",          "quoteInterval": "1D.0D"        },        {          "key": "Inflation.InflationIndex.*",          "supplier": "Lusid",          "dataScope": "MyInflationIndexFixings",          "quoteType": "Index",          "field": "mid",          "quoteInterval": "1D.0D"        }      ]    },    "pricing": {      "modelRules": [        {          "instrumentType": "Bond",          "modelName": "BondLookupPricer"        },        {          "instrumentType": "ComplexBond",          "modelName": "BondLookupPricer"        },        {          "instrumentType": "InflationLinkedBond",          "modelName": "BondLookupPricer"        },        {          "instrumentType": "Future",          "modelName": "ConstantTimeValueOfMoney"        },        {          "instrumentType": "EquityOption",          "modelName": "ConstantTimeValueOfMoney"        },        {          "instrumentType": "FxOption",          "modelName": "ConstantTimeValueOfMoney"        },        {          "instrumentType": "CdsIndex",          "modelName": "CdsLookupPricer"        },        {          "instrumentType": "CreditDefaultSwap",          "modelName": "CdsLookupPricer"        },        {          "instrumentType": "FlexibleRepo",          "modelName": "FlexibleRepoSimplePricer"        },        {          "instrumentType": "InterestRateSwap",          "modelName": "Discounting"        },      ]    }  } }' ``` This recipe: - Has a `scope` of `MyRecipes` and a `code` of `MyPortfolioRecipe`. You can of course change these to any values you like, providing the latter is unique within the former. - Has market data rules that locate market data. Note that the `dataScope` field must be the same as the `scope` in which quotes are encapsulated when [loaded into the LUSID Quote Store](/v1/docs/how-do-i-upload-a-market-price-or-fx-spot-rate-to-the-quote-store), so you might want to change these to something more appropriate. - Has pricing rules that change the default [pricing models](/v1/docs/what-pricing-models-can-i-use-in-my-valuation) for certain instrument types to the recommended models. ## Registering a recipe with portfolios ### Existing portfolios Call the [PatchPortfolioDetails](https://www.lusid.com/docs/api#operation/PatchPortfolioDetails) API to register the scope and code of the recipe with an existing portfolio, for example: ```json curl -X POST 'https://.lusid.com/api/api/transactionportfolios/US-Equities/Income/details'  -H 'Content-Type: application/json-patch+json'  -H 'Authorization: Bearer '  -d '[  {    "value": {      "scope": "MyRecipes",      "code": "MyBasicPortfolioRecipe"    },    "path": "/instrumentEventConfiguration/recipeId",    "op": "add"  } ]' ``` In the LUSID web app, navigate to the **Data Management > Portfolios** dashboard, locate the portfolio, click the **Edit** button (at the end of the row), click **Next** to open the **Details** screen, and then select the recipe from the **Holdings recipe** dropdown: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(303).png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A00%3A51Z&se=2026-11-04T03%3A00%3A51Z&sr=c&sp=r&sig=LZawJOb9XxS1gRtZ4RDQFwtS0kB5aLooHeOFcsU%2BoZw%3D) ### New portfolios Call the [CreatePortfolio](https://www.lusid.com/docs/api/lusid/endpoints/transaction-portfolios/CreatePortfolio) API and specify an `instrumentEventConfiguration` object to register the recipe when you create a portfolio, for example: ```json curl -X POST 'https://.lusid.com/api/api/transactionportfolios/US-Equities' -H 'Authorization: Bearer ' -H 'Content-Type: application/json-patch+json' -d '{  "displayName": "Income portfolio for US equities",  "code": "Income",  "created": "2024-10-30T00:00:00Z",  "baseCurrency": "USD",  "instrumentEventConfiguration": {    "recipeId": {      "scope": "MyRecipes",      "code": "MyBasicPortfolioRecipe"    }  } }' ``` In the LUSID web app, navigate to the **Data Management > Portfolios** dashboard, click the **Create portfolio** button and follow the instructions, making sure to select the recipe from the **Holdings recipe** dropdown on the **Details** screen: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(304).png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A00%3A51Z&se=2026-11-04T03%3A00%3A51Z&sr=c&sp=r&sig=LZawJOb9XxS1gRtZ4RDQFwtS0kB5aLooHeOFcsU%2BoZw%3D) ##