> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trusset.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Position

> Retrieve one position with live on-chain figures and its full history

Returns a single position record merged with live loan data from the market contract, plus every transaction recorded against it. This is the endpoint behind a position detail view.

On-chain values take precedence where a linked `onChainLoanId` exists. Stored values are used as a fallback when the chain read returns nothing.

## Path Parameters

<ParamField path="marketId" type="string" required>Market ID.</ParamField>
<ParamField path="positionId" type="string" required>Position ID.</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="positionId" type="string">Position record ID.</ResponseField>
    <ResponseField name="onChainLoanId" type="string">Numeric loan ID on the market contract, or null when the position has no linked chain loan.</ResponseField>
    <ResponseField name="userAddress" type="string">Borrower address.</ResponseField>
    <ResponseField name="borrowedAmount" type="string">Outstanding principal in borrow asset units.</ResponseField>
    <ResponseField name="collateralAmount" type="string">Collateral pledged, in collateral token units.</ResponseField>
    <ResponseField name="accumulatedInterest" type="string">Interest accrued and unpaid, in borrow asset units.</ResponseField>
    <ResponseField name="healthFactor" type="string">Health factor as a decimal string. Below `1.0` the loan is liquidatable.</ResponseField>
    <ResponseField name="priceAtBorrow" type="string">Collateral price recorded when the loan was opened. Useful for computing price movement since origination.</ResponseField>
    <ResponseField name="status" type="string">`ACTIVE`, `REPAID`, or `LIQUIDATED`.</ResponseField>
    <ResponseField name="openedAt" type="string">ISO 8601 timestamp.</ResponseField>
    <ResponseField name="transactions" type="array">Every transaction on this position, newest first.</ResponseField>
  </Expandable>
</ResponseField>

<Note>
  `status` is read from the stored record and is not re-derived from chain state here. A loan repaid without a confirm call can still read `ACTIVE` until the next reconciliation pass. For a live view of whether the loan is open, read `active` from [Get Loan](/endpoints/external-securities-lending/get-loan), or call [List Positions](/endpoints/external-securities-lending/list-positions), which reconciles before returning.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/lending-external-securities/api/positions/{marketId}/positions/{positionId}" \
    -H "X-API-Key: trusset_your_key_here"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "positionId": "secpos_014",
      "onChainLoanId": "5",
      "userAddress": "0xabc...def",
      "borrowedAmount": "50000.000000",
      "collateralAmount": "1000.000000000000000000",
      "accumulatedInterest": "128.750000",
      "healthFactor": "1.842000000000000000",
      "priceAtBorrow": "104.820000",
      "status": "ACTIVE",
      "openedAt": "2025-06-10T08:00:00.000Z",
      "transactions": [
        {
          "id": "sectx_002",
          "marketId": "clx_secmarket_001",
          "positionId": "secpos_014",
          "txType": "BORROW",
          "userAddress": "0xabc...def",
          "amount": "50000",
          "txHash": "0x123...789",
          "timestamp": "2025-06-10T08:00:00.000Z"
        }
      ]
    }
  }
  ```

  ```json Error - Not Found theme={null}
  {
    "success": false,
    "error": {
      "code": "POSITION_NOT_FOUND",
      "message": "Position not found"
    }
  }
  ```
</ResponseExample>
