# Positions

## Fetch Positions

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

```json
{"openapi":"3.1.0","info":{"title":"gateway-api","version":"0.0.1"},"servers":[{"url":"https://data.api.landytech.net","description":"Generated server url"}],"security":[{"basicAuth":[]}],"paths":{"/api/v2/positions/{entityId}":{"get":{"tags":["positions"],"summary":"Fetch Positions","description":"The `positions` endpoint returns the positions, per published entity date","operationId":"getPositions","parameters":[{"name":"X-Result-Limit","in":"header","description":"Maximum number of items to retrieve","required":false,"schema":{"type":"integer","format":"int32"}},{"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 transactions 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"}}],"responses":{"200":{"description":"List of entities 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":{"content":{"$ref":"#/components/schemas/PositionDetails","description":"Position details"}}},"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"},"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.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":{"$ref":"#/components/schemas/SubPortfolioDetails","description":"Breakdown of holdings by sub-portfolio."}}},"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"}}}}}}
```
