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

# Get All Market Positions

> Fetch all market positions for the specified wallet



## OpenAPI

````yaml https://docs.api.monacoprotocol.xyz/api/v1/exchange-openapi-general.json get /wallets/{id}/positions-all
openapi: 3.1.0
info:
  title: BetDEX General Integration API
  description: >-
    A RESTful API that allows you to interact with the BetDEX Exchange. Provides
    endpoints for managing Events, Markets, Sessions, Wallets and Orders. To
    interact with the API, a client must have an App Id and an API Key to
    authenticate and create a session.
  version: '0.1'
servers:
  - url: https://sandbox.api.btdx.io/
    description: Sandbox API Server
  - url: https://prod.api.btdx.io/
    description: Production API Server
security: []
tags:
  - name: API Key Management
  - name: App Management
  - name: Currencies
  - name: Event Categories
  - name: Event Groups
  - name: Event Subcategories
  - name: Events
  - name: External Reference Sources
  - name: Heartbeat Management
  - name: Market Prices
  - name: Market Types
  - name: Markets
  - name: Orders
  - name: Participants
  - name: Session Management
  - name: Status
  - name: Trades
  - name: Wallet API Key Management
  - name: Wallets
paths:
  /wallets/{id}/positions-all:
    get:
      tags:
        - Wallets
      summary: Get All Market Positions
      description: Fetch all market positions for the specified wallet
      operationId: getAllMarketPositions
      parameters:
        - name: authorization
          in: header
          description: Header with the accessToken for the current session
          required: true
          schema:
            type: string
          example: Bearer eyJ0eXAiOiJ...bjV7AtDgA
        - name: id
          in: path
          description: wallet id
          required: true
          schema:
            type: string
        - name: filter
          in: query
          description: >-
            Filter market positions by settlement status. Active returns
            positions where settlement has not happened yet; Settled returns
            positions that have been settled. Defaults to Active
          required: false
          schema:
            type: string
            default: Active
            enum:
              - Active
              - Settled
          example: Active
        - name: page
          in: query
          description: Zero-based page index (0..N)
          schema:
            type: integer
            default: 0
        - name: size
          in: query
          description: The size of the page to be returned
          schema:
            type: integer
            default: 20
        - name: sort
          in: query
          description: >-
            Sorting criteria in the format: property,(asc|desc). Default sort
            order is ascending. Multiple sort criteria are supported.
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PagedMarketPositionResponse'
        '401':
          description: Session invalid
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PagedMarketPositionResponse'
        '403':
          description: Missing permission
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PagedMarketPositionResponse'
        '404':
          description: Not found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PagedMarketPositionResponse'
components:
  schemas:
    PagedMarketPositionResponse:
      type: object
      properties:
        _meta:
          $ref: '#/components/schemas/Meta'
        positions:
          type: array
          items:
            $ref: '#/components/schemas/MarketPosition'
        markets:
          type: array
          items:
            $ref: '#/components/schemas/MarketSummary'
    Meta:
      type: object
      properties:
        _primary_document:
          type: string
          enum:
            - apiKeys
            - apps
            - categories
            - commissionRates
            - currencies
            - depositAddresses
            - depositRequests
            - events
            - eventGroups
            - externalReferences
            - externalReferenceSources
            - heartbeats
            - ids
            - markets
            - marketOutcomes
            - marketPositions
            - marketTypes
            - orders
            - participants
            - prices
            - priceLadders
            - sessions
            - statuses
            - subcategories
            - trades
            - transactions
            - wallets
            - walletMetrics
            - withdrawalRequests
        _count:
          type: integer
          format: int32
        _page:
          $ref: '#/components/schemas/PageMeta'
    MarketPosition:
      type: object
      properties:
        market:
          $ref: '#/components/schemas/DocumentReference'
        walletId:
          type: string
        exposures:
          type: object
          additionalProperties:
            type: number
    MarketSummary:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        inPlayStatus:
          type: string
          enum:
            - NotApplicable
            - PrePlay
            - InPlay
        published:
          type: boolean
        suspended:
          type: boolean
        status:
          type: string
          enum:
            - Initializing
            - Open
            - Locking
            - Locked
            - Settling
            - Settled
            - Voiding
            - Voided
            - Closed
        lockAt:
          type: string
          format: date-time
        settledAt:
          type: string
          format: date-time
        event:
          $ref: '#/components/schemas/DocumentReference'
    PageMeta:
      type: object
      properties:
        _pageNumber:
          type: integer
          format: int32
        _pageSize:
          type: integer
          format: int32
        _totalElements:
          type: integer
          format: int64
        _totalPages:
          type: integer
          format: int32
    DocumentReference:
      type: object
      properties:
        _ref:
          type: string
        _ids:
          type: array
          items:
            type: string

````