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

# Get Positions

> Fetch positions for user's subaccounts.

Returns positions grouped by subaccount. Optionally filter to a specific subaccount.
By default, only positions in open markets are returned.



## OpenAPI

````yaml /openapi.json get /v1/positions
openapi: 3.1.0
info:
  title: Centos Finance API
  contact:
    name: Centos Finance
    url: https://centosfi.com/
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.centosfi.com
security: []
tags:
  - name: markets
    description: Search and discover prediction markets across Kalshi and Polymarket.
  - name: subaccounts
    description: >-
      Manage trading subaccounts. Each subaccount can have its own exchange
      credentials and positions.
  - name: positions
    description: View current portfolio positions across all connected exchanges.
  - name: fills
    description: Retrieve trade execution history and fill details.
  - name: prices
    description: Get historical price data and candlesticks from exchanges.
  - name: orders
    description: Place and manage orders on prediction market exchanges.
  - name: complex-orders
    description: >-
      Manage complex orders: conditional orders (take-profit and stop-loss),
      TWAP, and other advanced order types.
paths:
  /v1/positions:
    get:
      tags:
        - positions
      summary: Get Positions
      description: >-
        Fetch positions for user's subaccounts.


        Returns positions grouped by subaccount. Optionally filter to a specific
        subaccount.

        By default, only positions in open markets are returned.
      operationId: get_positions_v1_positions_get
      parameters:
        - name: subaccount_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Filter by specific subaccount
            title: Subaccount Id
          description: Filter by specific subaccount
        - name: include_closed
          in: query
          required: false
          schema:
            type: boolean
            description: Include positions in closed markets
            default: false
            title: Include Closed
          description: Include positions in closed markets
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPositionListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UserPositionListResponse:
      properties:
        subaccount_to_positions:
          items:
            additionalProperties:
              anyOf:
                - type: string
                - items:
                    $ref: '#/components/schemas/PositionResponse'
                  type: array
            type: object
          type: array
          title: Subaccount To Positions
      type: object
      required:
        - subaccount_to_positions
      title: UserPositionListResponse
      description: Schema for list of positions for a user.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PositionResponse:
      properties:
        centos_id:
          type: integer
          title: Centos Id
        position:
          type: number
          title: Position
        exchange_name:
          type: string
          title: Exchange Name
        exchange_ticker:
          type: string
          title: Exchange Ticker
      type: object
      required:
        - centos_id
        - position
        - exchange_name
        - exchange_ticker
      title: PositionResponse
      description: Schema for position response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````