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

# List positions



## OpenAPI

````yaml /_generated/openapi.yaml get /query/positions
openapi: 3.1.0
info:
  title: Joyride Core HTTP API
  version: 0.1.0
  description: |
    HTTP endpoints served by joyride-core v8 components. Decimal money,
    price, and quantity fields are strings with up to 8 decimal places unless
    noted otherwise.
servers:
  - url: https://joyride.exchange/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Public
  - name: Query
  - name: Withdrawals
  - name: Market Data
    description: Publicly accessible market data. No authentication required.
  - name: Account
    description: Account-scoped history and provisioning. Requires a bearer JWT.
  - name: Referrals
    description: Referral-code validation and attribution surfaces.
  - name: AI Chat
    description: >
      AI-powered trading assistant. Uses SIWS (Sign In With Solana)
      authentication

      and JWT sessions. Returns responses as Server-Sent Events (SSE).
paths:
  /query/positions:
    get:
      tags:
        - Query
      summary: List positions
      operationId: listPositions
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: Position rows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PositionRows'
        '401':
          $ref: '#/components/responses/QueryError'
components:
  parameters:
    AccountId:
      name: account_id
      in: query
      schema:
        type: integer
        minimum: 0
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
  schemas:
    PositionRows:
      type: object
      required:
        - rows
      properties:
        rows:
          type: array
          items:
            $ref: '#/components/schemas/PositionRow'
    PositionRow:
      type: object
      required:
        - account_id
        - instrument_id
        - symbol
        - quantity
        - avg_price
        - updated_at
      properties:
        account_id:
          type: integer
        instrument_id:
          type: integer
        symbol:
          type:
            - string
            - 'null'
          description: >-
            Human-facing instrument symbol, joined from the projected
            `instruments` table. Null only when the read model has not been
            reprojected since the instrument-symbols migration.
        quantity:
          $ref: '#/components/schemas/DecimalString'
        avg_price:
          $ref: '#/components/schemas/DecimalString'
        updated_at:
          type: string
    QueryErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    DecimalString:
      type: string
      pattern: ^-?[0-9]+(\.[0-9]{1,8})?$
      examples:
        - '100.00000000'
  responses:
    QueryError:
      description: Query API error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/QueryErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        SIWS-issued JWT. Admin commands require the `admin` role, `admin:*`, or
        the exact `admin:<type>` scope; admin reads use their documented read
        scope.

````