> For the complete documentation index, see [llms.txt](https://docs.landytech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.landytech.com/api-endpoints/position.md).

# Position

## Fetch Positions

> The \`positions\` endpoint returns the positions, per published entity date

```json
{"openapi":"3.1.0","info":{"title":"gateway-api","version":"2.0"},"tags":[{"name":"Position"}],"servers":[{"url":"https://data.api.landytech.net","description":"Generated server url"}],"security":[{"basicAuth":[]}],"paths":{"/api/v2/positions/{entityId}":{"get":{"tags":["Position"],"summary":"Fetch Positions","description":"The `positions` endpoint returns the positions, per published entity date","operationId":"getPositions","parameters":[{"name":"fields","in":"query","description":"List of field names to retrieve. If empty, all fields will be returned.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"entityId","in":"path","description":"Unique identifier provided by Landytech","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"fromDate","in":"query","description":"Start of position date range (inclusive)","required":false,"schema":{"type":"string","format":"date"}},{"name":"toDate","in":"query","description":"End of position date range (inclusive)","required":false,"schema":{"type":"string","format":"date"}},{"name":"consolidationType","in":"query","description":"DIRECT returns the entity's directly held assets. LOOK_THROUGH includes positions of underlying entities linked through configured look-through relationships. If not provided, DIRECT is used","required":false,"schema":{"type":"string"}},{"name":"fromUpdatedDate","in":"query","description":"Return only records that have been updated on or after the specified date time","required":false,"schema":{"type":"string"}},{"name":"requestPageSize","in":"query","description":"Number of records per page","required":false,"schema":{"type":"integer","format":"int32","default":1000,"maximum":10000}},{"name":"pageToken","in":"query","description":"Token used for pagination. For the first page, this should not be provided. For subsequent pages, use the `nextPageToken` value returned in the previous response","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of positions with selected fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionResponse"}}}},"401":{"description":"Unauthorized, missing or invalid authentication"},"403":{"description":"Forbidden, user does not have permission"}}}}},"components":{"schemas":{"PositionResponse":{"type":"object","description":"Position data returned by the API","properties":{"data":{"type":"array","description":"Position details","items":{"$ref":"#/components/schemas/PositionDetails"}},"pagination":{"oneOf":[{"$ref":"#/components/schemas/PaginationDetails"},{"type":"null"}]},"meta":{"oneOf":[{"$ref":"#/components/schemas/MetadataDetails"},{"type":"null"}]}},"required":["data"]},"PositionDetails":{"type":"object","description":"Position data returned by the API","properties":{"ENTITY.ID":{"type":"integer","format":"int64","description":"Unique identifier of the entity the request was made for. This identifier is created by Sesame"},"ENTITY.NAME":{"type":"string","description":"Name of the entity the request was made for"},"ASSET.NAME":{"type":"string","description":"Name of the investment held"},"ASSET.ID":{"type":"integer","format":"int64","description":"ID of the investment held. This identifier is created by Sesame"},"ASSET.TYPE":{"type":"string","description":"Type of the investment held"},"ASSET.ISIN":{"type":"string","description":"ISIN of the asset."},"POSITION.DATE":{"type":"string","format":"date","description":"The date of the position in the investment"},"POSITION.QUANTITY":{"type":"number","description":"Quantity of units of the investment held"},"POSITION.MARKET_VALUE_LOCAL":{"type":"number","description":"Market value of the holding, in local currency"},"POSITION.UNIT_PRICE_LOCAL":{"type":"number","description":"Price per unit of the investment held, in local currency"},"POSITION.LOCAL_CURRENCY":{"type":"string","description":"Currency that the position is denominated in"},"POSITION.PRICE_SOURCE":{"type":"string","description":"Source of the unit price (UNIT_PRICE_LOCAL) used to value the position on this date. Possible values:\n- POSITION_PRICE: unit price received with the custodian's position data (feed portfolio) or from user-loaded data (user portfolio) for this date\n- ASSET_SESAME: price from Sesame's market data providers\n- ASSET_USER_LOADED: price loaded by a user against the asset in Sesame. Applies to this client's account only\n- ASSET_CUSTODIAN: price sent to Landytech by the custodian or data provider through an automated feed\n- MANUAL_OVERRIDE_PRICE: unit price entered manually in Sesame, overriding all other price sources\n- MANUAL_OVERRIDE_VALUATION: total market value entered manually in Sesame, for non-unitised investments (those with a value but no unit price). MARKET_VALUE_LOCAL is the entered value, and UNIT_PRICE_LOCAL is that value divided by the quantity held\nNot returned where no price applies, for example cash","enum":["POSITION_PRICE","ASSET_SESAME","ASSET_USER_LOADED","ASSET_CUSTODIAN","MANUAL_OVERRIDE_PRICE","MANUAL_OVERRIDE_VALUATION"]},"POSITION.GRANULARITY":{"$ref":"#/components/schemas/PositionGranularityDetails","description":"Granularity of the position."},"POSITION.UPDATED_DATE":{"type":"string","format":"date-time","description":"Last updated date of the position."}},"required":["ASSET.ID","ASSET.NAME","ASSET.TYPE","ENTITY.ID","ENTITY.NAME","POSITION.DATE","POSITION.LOCAL_CURRENCY","POSITION.MARKET_VALUE_LOCAL","POSITION.QUANTITY","POSITION.UNIT_PRICE_LOCAL"]},"PositionGranularityDetails":{"type":"object","description":"Returns cash holdings split by sub-portfolio codes. The sub-portfolio code provides a level more granularity than the entity-level balances. That is, a sub-portfolio code reflects the cash balances separated by the specific sub-account codes. These codes will differ per currency, and per intention. For example, capital versus income accounts","properties":{"SUB_PORTFOLIO":{"type":"array","description":"Breakdown of holdings by sub-portfolio.","items":{"$ref":"#/components/schemas/SubPortfolioDetails"}}}},"SubPortfolioDetails":{"type":"object","description":"The cash balance (position) for the POSITION.DATE, decomposed into the underlying SUB_PORTFOLIO_CODEs","properties":{"SUB_PORTFOLIO_CODE":{"type":"string","description":"A string providing further granularity about the sub bank accounts balance which contribute to the cash position on this date. This could be a bank account number which differs per nature (capital/income), within the main account. The main account or portfolio identifier is shown in the PORTFOLIO_CODES field in the `entities` endpoint"},"MARKET_VALUE_LOCAL":{"type":"number","description":"The cash balance of that SUB_PORTFOLIO_CODE on the position date"}}},"PaginationDetails":{"type":"object","description":"Pagination data returned by the API","properties":{"nextPageToken":{"type":["string","null"],"description":"Token used to fetch the next page of result. This token is opaque and must be used as is"},"hasNextPage":{"type":["boolean","null"],"description":"A boolean indicating if there is a next page to this resource"},"pageSize":{"type":["integer","null"],"format":"int64","description":"Number of elements in the current page. This API is not providing the total number of elements for this resource."}},"required":["hasNextPage","pageSize"]},"MetadataDetails":{"type":"object","description":"Metadata returned by the API","properties":{"requestId":{"type":["string","null"],"format":"uuid","description":"Id of the request"},"responseType":{"type":["string","null"],"description":"Format of the request"}},"required":["requestId"]}}}}
```
