Browse the extensions reference

position

returns Position

Single enriched position by id.

Arguments

NameTypeDescription
positionIdString!The position's id.

Returns Position

Read projection for a single position. Pairs cents-precision fields (costBasis, currentValue) with pre-computed dollar floats (*_dollars) to spare clients the conversion. The cents fields are authoritative.

FieldTypeDescription
idString!Position ID (pos_* ULID).
portfolioIdString!Owning portfolio ID.
securityIdString!Held security ID.
securityNameStringCached display name of the held security, denormalized for list rendering. May lag the security row's current name briefly.
entityNameStringCached display name of the security's issuing entity.
quantityFloat!Quantity held in units defined by quantityType.
quantityTypeString!Unit basis (shares, units, principal).
costBasisInt!Cost basis in **cents** of currency. Authoritative.
costBasisDollarsFloat!Cost basis pre-converted to dollars (cost_basis / 100). Convenience for display; costBasis is the source of truth.
currencyString!ISO 4217 currency code for costBasis and currentValue.
currentValueIntLatest mark-to-market value in **cents**, or null if unmarked.
currentValueDollarsFloatCurrent value in dollars (current_value / 100). null when currentValue is null.
valuationDateDateDate currentValue was sourced (YYYY-MM-DD).
valuationSourceStringFree-text source attribution for the current valuation.
acquisitionDateDateDate the position was acquired (YYYY-MM-DD).
dispositionDateDateDate the position was disposed, if status='disposed'. null for active positions.
statusString!Lifecycle state. One of: active (currently held), disposed (soft-deleted via update-portfolio-block dispose), archived (historical record only).
notesStringFree-text notes attached to the position.
createdAtDateTime!Row creation timestamp (UTC).
updatedAtDateTime!Last-modified timestamp (UTC).

Example

query
{ position(positionId: "...") { id portfolioId securityId securityName } }
curl
curl -X POST "https://api.robosystems.ai/extensions/$GRAPH_ID/graphql" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ position(positionId: \"...\") { id portfolioId securityId securityName } }"}'