> ## 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 accounts



## OpenAPI

````yaml /_generated/openapi.yaml get /query/accounts
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/accounts:
    get:
      tags:
        - Query
      summary: List accounts
      operationId: listAccounts
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/AfterCursor'
        - name: wallet_pubkey
          in: query
          schema:
            $ref: '#/components/schemas/Hex32'
      responses:
        '200':
          description: Account rows
          content:
            application/json:
              schema:
                type: object
                required:
                  - rows
                properties:
                  rows:
                    type: array
                    items:
                      $ref: '#/components/schemas/AccountRow'
                  next_cursor:
                    type: string
        '400':
          $ref: '#/components/responses/QueryError'
        '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
    AfterCursor:
      name: after
      in: query
      description: >-
        Exclusive keyset cursor returned as next_cursor. Supported by accounts
        and monotone sequence-number lists; unsupported sort orders reject it
        with 400 rather than silently ignoring it. The decimal value must fit
        the backing non-negative PostgreSQL BIGINT; overflow returns 400.
      schema:
        type: string
        pattern: ^[0-9]+$
  schemas:
    Hex32:
      type: string
      pattern: ^[0-9a-fA-F]{64}$
    AccountRow:
      type: object
      additionalProperties: false
      required:
        - account_id
        - wallet_pubkey
        - fee_tier
        - margin_mode
        - policy_id
        - created_at
        - updated_at
      properties:
        account_id:
          type: integer
        wallet_pubkey:
          $ref: '#/components/schemas/Hex32'
        fee_tier:
          type: integer
        margin_mode:
          type: integer
        policy_id:
          type: integer
        created_at:
          type: string
        updated_at:
          type: string
    QueryErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  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.

````