{"openapi":"3.0.4","info":{"title":"Get holdings","description":"Calculate holdings for a transaction portfolio.","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/api"}],"paths":{"/api/transactionportfolios/{scope}/{code}/holdings":{"get":{"tags":["Transaction Portfolios"],"summary":"Get holdings","description":"Calculate holdings for a transaction portfolio.","operationId":"GetHoldings","parameters":[{"name":"scope","in":"path","description":"The scope of the transaction portfolio.","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}},{"name":"code","in":"path","description":"The code of the transaction portfolio. Together with the scope this uniquely identifies\r\n            the transaction portfolio.","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}},{"name":"effectiveAt","in":"query","description":"The effective datetime or cut label at which to retrieve the holdings of the transaction\r\n            portfolio. Defaults to the current LUSID system datetime if not specified.","schema":{"type":"string","format":"dateorcutlabel"}},{"name":"asAt","in":"query","description":"The asAt datetime at which to retrieve the holdings of the transaction portfolio. Defaults\r\n            to return the latest version if not specified.","schema":{"type":"string","format":"date-time"},"x-nullable":true},{"name":"filter","in":"query","description":"Expression to filter the result set.\r\n            For example, to filter on the Holding Type, use \"holdingType eq 'p'\".\r\n            For more information about filtering LUSID results, see https://support.lusid.com/knowledgebase/article/KA-01914.","schema":{"maxLength":16384,"minLength":0,"pattern":"^[\\s\\S]*$","type":"string"}},{"name":"propertyKeys","in":"query","description":"A list of property keys from the \"Instrument\", \"Holding\", \"Custodian Account\", \"Legal Entity\" or \"Portfolio\" domain to decorate onto\r\n            holdings. These must have the format {domain}/{scope}/{code}, for example \"Instrument/system/Name\" or \"Holding/system/Cost\".","schema":{"type":"array","items":{"type":"string","description":"The key that uniquely identifies the property. It has the format {domain}/{scope}/{code}."}},"x-nullable":true},{"name":"byTaxlots","in":"query","description":"Whether or not to expand the holdings to return the underlying tax-lots. Defaults to\r\n            False.","schema":{"type":"boolean"},"x-nullable":true},{"name":"includeSettlementEventsAfterDays","in":"query","description":"Number of days ahead to bring back settlements from, in relation to the specified effectiveAt","schema":{"type":"integer","format":"int32"},"x-nullable":true},{"name":"timelineScope","in":"query","description":"The scope of the Timeline.","schema":{"maxLength":512,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}},{"name":"timelineCode","in":"query","description":"The code of the Timeline. This can optionally include a colon, followed by the Closed Period Id to use at the head of the timeline, for a timeline with unconfirmed periods.","schema":{"maxLength":1025,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+(:[a-zA-Z0-9\\-_]+)?$","type":"string"}},{"name":"closedPeriodId","in":"query","description":"The closed period ID. If this is specified, both timelineScope and timelineCode must be specified. Either closedPeriodId or effectiveAt can be used with a Timeline.","schema":{"maxLength":512,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}}],"responses":{"200":{"description":"The holdings and version of the specified transaction portfolio","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/VersionedResourceListOfPortfolioHolding"},"example":{"version":{"effectiveFrom":"2019-03-05T12:00:00.0000000+00:00","asAtDate":"2019-03-05T12:00:00.0000000+00:00"},"values":[{"instrumentScope":"default","instrumentUid":"LUID_XH4GNUEX","subHoldingKeys":{"Transaction/Algo/Name":{"key":"Transaction/Algo/Name","value":{"labelValue":"Algo1"}}},"properties":{"Instrument/default/Name":{"key":"Instrument/default/Name","value":{"labelValue":"Example Instrument 1"},"effectiveFrom":"2010-01-01T00:00:00.0000000+00:00"}},"holdingType":"P","units":10,"settledUnits":10,"cost":{"amount":2.5,"currency":"GBP"},"costPortfolioCcy":{"amount":2.5,"currency":"GBP"},"currency":"ZZZ","holdingTypeName":"Position","holdingId":1,"settlementSchedule":[],"unsettledUnits":0,"overdueUnits":0}],"links":[]}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/VersionedResourceListOfPortfolioHolding"},"example":{"version":{"effectiveFrom":"2019-03-05T12:00:00.0000000+00:00","asAtDate":"2019-03-05T12:00:00.0000000+00:00"},"values":[{"instrumentScope":"default","instrumentUid":"LUID_XH4GNUEX","subHoldingKeys":{"Transaction/Algo/Name":{"key":"Transaction/Algo/Name","value":{"labelValue":"Algo1"}}},"properties":{"Instrument/default/Name":{"key":"Instrument/default/Name","value":{"labelValue":"Example Instrument 1"},"effectiveFrom":"2010-01-01T00:00:00.0000000+00:00"}},"holdingType":"P","units":10,"settledUnits":10,"cost":{"amount":2.5,"currency":"GBP"},"costPortfolioCcy":{"amount":2.5,"currency":"GBP"},"currency":"ZZZ","holdingTypeName":"Position","holdingId":1,"settlementSchedule":[],"unsettledUnits":0,"overdueUnits":0}],"links":[]}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/VersionedResourceListOfPortfolioHolding"},"example":{"version":{"effectiveFrom":"2019-03-05T12:00:00.0000000+00:00","asAtDate":"2019-03-05T12:00:00.0000000+00:00"},"values":[{"instrumentScope":"default","instrumentUid":"LUID_XH4GNUEX","subHoldingKeys":{"Transaction/Algo/Name":{"key":"Transaction/Algo/Name","value":{"labelValue":"Algo1"}}},"properties":{"Instrument/default/Name":{"key":"Instrument/default/Name","value":{"labelValue":"Example Instrument 1"},"effectiveFrom":"2010-01-01T00:00:00.0000000+00:00"}},"holdingType":"P","units":10,"settledUnits":10,"cost":{"amount":2.5,"currency":"GBP"},"costPortfolioCcy":{"amount":2.5,"currency":"GBP"},"currency":"ZZZ","holdingTypeName":"Position","holdingId":1,"settlementSchedule":[],"unsettledUnits":0,"overdueUnits":0}],"links":[]}}}},"400":{"description":"The details of the input related failure","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidValidationProblemDetails"}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidValidationProblemDetails"}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidValidationProblemDetails"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidProblemDetails"}}}}},"security":[{"BearerAuth":[]}],"x-fbn-apistatus":"Stable"}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}