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

# Get open positions

> The account's open bets, grouped by selection (`outcome`), by `fixture` or by `bookmaker`, largest first. Only the fields of the grouping are set on each position.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/positions
openapi: 3.1.0
info:
  title: Apexium Trading API
  version: '1'
  description: Public API, authenticated with an API key in the x-api-key header.
servers:
  - url: https://api.apexiumbet.com
    description: Production
security:
  - apiKey: []
tags:
  - name: Health
    description: Whether the API is up, without an API key
  - name: Account
    description: The account behind the API key and its balance
  - name: Reference data
    description: OddsPapi sports, tournaments, participants, markets and bookmakers
  - name: Fixtures
    description: 'OddsPapi fixtures: schedule, status, scores'
  - name: Odds
    description: OddsPapi odds, limited to the account's bookmakers
  - name: Betslip
    description: >-
      The price and stake limits of one selection at each of the account's
      bookmakers
  - name: Orders
    description: Preview, place, read and cancel orders
  - name: Bets
    description: The bets your orders were split into
  - name: Positions and PnL
    description: Open exposure and realised results
paths:
  /v1/positions:
    get:
      tags:
        - Positions and PnL
      summary: Get open positions
      description: >-
        The account's open bets, grouped by selection (`outcome`), by `fixture`
        or by `bookmaker`, largest first. Only the fields of the grouping are
        set on each position.
      parameters:
        - schema:
            default: outcome
            type: string
            enum:
              - outcome
              - fixture
              - bookmaker
          in: query
          name: groupBy
          required: false
        - schema:
            minLength: 1
            maxLength: 255
            type: string
          in: query
          name: fixtureId
          required: false
        - schema:
            type: array
            items:
              minLength: 1
              maxLength: 64
              type: string
          in: query
          name: bookmaker
          required: false
          description: Repeat the parameter to ask for several values
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - groupBy
                  - positions
                  - totals
                properties:
                  groupBy:
                    type: string
                    enum:
                      - outcome
                      - fixture
                      - bookmaker
                  positions:
                    type: array
                    items:
                      type: object
                      required:
                        - fixtureId
                        - marketId
                        - outcomeId
                        - playerId
                        - bookmaker
                        - openBets
                        - matchedStake
                        - pendingStake
                        - unplacedStake
                        - averagePrice
                        - potentialReturn
                      properties:
                        fixtureId:
                          anyOf:
                            - type: string
                            - type: 'null'
                        marketId:
                          anyOf:
                            - type: integer
                            - type: 'null'
                        outcomeId:
                          anyOf:
                            - type: integer
                            - type: 'null'
                        playerId:
                          anyOf:
                            - type: integer
                            - type: 'null'
                        bookmaker:
                          anyOf:
                            - type: string
                            - type: 'null'
                        openBets:
                          description: Bets not settled yet that hold stake
                          type: integer
                        matchedStake:
                          description: Stake of the bets accepted by the bookmaker
                          type: object
                          required:
                            - amount
                            - amountCents
                            - currency
                          properties:
                            amount:
                              pattern: ^-?\d+\.\d{2}$
                              description: Decimal string, two decimals
                              type: string
                            amountCents:
                              description: >-
                                The same amount in integer cents: amount times
                                100
                              type: integer
                            currency:
                              description: ISO 4217 code
                              type: string
                        pendingStake:
                          description: Stake of the bets still PENDING or WAITING
                          type: object
                          required:
                            - amount
                            - amountCents
                            - currency
                          properties:
                            amount:
                              pattern: ^-?\d+\.\d{2}$
                              description: Decimal string, two decimals
                              type: string
                            amountCents:
                              description: >-
                                The same amount in integer cents: amount times
                                100
                              type: integer
                            currency:
                              description: ISO 4217 code
                              type: string
                        unplacedStake:
                          description: >-
                            Remainder of orders with an expiry, not placed yet.
                            It is not held against the balance and belongs to no
                            bookmaker, so it appears only in the totals when
                            grouping by bookmaker, and not at all with a
                            bookmaker filter.
                          type: object
                          required:
                            - amount
                            - amountCents
                            - currency
                          properties:
                            amount:
                              pattern: ^-?\d+\.\d{2}$
                              description: Decimal string, two decimals
                              type: string
                            amountCents:
                              description: >-
                                The same amount in integer cents: amount times
                                100
                              type: integer
                            currency:
                              description: ISO 4217 code
                              type: string
                        averagePrice:
                          description: >-
                            Stake-weighted price of the matched bets; outcome
                            grouping only
                          anyOf:
                            - type: string
                            - type: 'null'
                        potentialReturn:
                          description: >-
                            Matched stake plus the net profit if the selection
                            wins, as the dashboard shows it; outcome grouping
                            only
                          anyOf:
                            - description: Money amount
                              type: object
                              required:
                                - amount
                                - amountCents
                                - currency
                              properties:
                                amount:
                                  pattern: ^-?\d+\.\d{2}$
                                  description: Decimal string, two decimals
                                  type: string
                                amountCents:
                                  description: >-
                                    The same amount in integer cents: amount
                                    times 100
                                  type: integer
                                currency:
                                  description: ISO 4217 code
                                  type: string
                            - type: 'null'
                  totals:
                    description: >-
                      For agent accounts matchedStake + pendingStake equals
                      exposure in GET /v1/balance when no filter is set. Retail
                      exposure is the full betting liability (lay risk,
                      unmatched commitments, commission) and can be higher.
                    type: object
                    required:
                      - openBets
                      - matchedStake
                      - pendingStake
                      - unplacedStake
                    properties:
                      openBets:
                        description: Bets not settled yet that hold stake
                        type: integer
                      matchedStake:
                        description: Stake of the bets accepted by the bookmaker
                        type: object
                        required:
                          - amount
                          - amountCents
                          - currency
                        properties:
                          amount:
                            pattern: ^-?\d+\.\d{2}$
                            description: Decimal string, two decimals
                            type: string
                          amountCents:
                            description: 'The same amount in integer cents: amount times 100'
                            type: integer
                          currency:
                            description: ISO 4217 code
                            type: string
                      pendingStake:
                        description: Stake of the bets still PENDING or WAITING
                        type: object
                        required:
                          - amount
                          - amountCents
                          - currency
                        properties:
                          amount:
                            pattern: ^-?\d+\.\d{2}$
                            description: Decimal string, two decimals
                            type: string
                          amountCents:
                            description: 'The same amount in integer cents: amount times 100'
                            type: integer
                          currency:
                            description: ISO 4217 code
                            type: string
                      unplacedStake:
                        description: >-
                          Remainder of orders with an expiry, not placed yet. It
                          is not held against the balance and belongs to no
                          bookmaker, so it appears only in the totals when
                          grouping by bookmaker, and not at all with a bookmaker
                          filter.
                        type: object
                        required:
                          - amount
                          - amountCents
                          - currency
                        properties:
                          amount:
                            pattern: ^-?\d+\.\d{2}$
                            description: Decimal string, two decimals
                            type: string
                          amountCents:
                            description: 'The same amount in integer cents: amount times 100'
                            type: integer
                          currency:
                            description: ISO 4217 code
                            type: string
        '400':
          description: Error. `code` is stable; `message` is for humans and may change.
          content:
            application/json:
              schema:
                description: >-
                  Error. `code` is stable; `message` is for humans and may
                  change.
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    enum:
                      - VALIDATION_FAILED
                      - MODE_REQUIRED
                      - INVALID_STAKE
                      - INVALID_PRICE
                      - INVALID_EXPIRY
                      - CURRENCY_NOT_SUPPORTED
                      - BOOKMAKER_NOT_AVAILABLE_VIA_API
                      - BOOKMAKER_NOT_AVAILABLE
                      - INVALID_API_KEY
                      - API_ACCESS_DENIED
                      - ACCOUNT_NOT_ACTIVE
                      - BETTING_NOT_ALLOWED
                      - BALANCE_UNAVAILABLE
                      - INSUFFICIENT_FUNDS
                      - MAX_STAKE_PER_FIXTURE_EXCEEDED
                      - PRICE_NOT_AVAILABLE
                      - PRICE_CHANGED
                      - NO_LIQUIDITY
                      - INSUFFICIENT_LIQUIDITY
                      - CLIENT_ORDER_ID_REUSED
                      - PREVIOUS_ATTEMPT_UNRESOLVED
                      - NOT_FOUND
                      - INVALID_CURSOR
                      - INVALID_WINDOW
                      - ORDER_BUSY
                      - CONFLICT
                      - FORBIDDEN
                      - RATE_LIMITED
                      - BETTING_SUSPENDED
                      - EXPIRY_NOT_AVAILABLE
                      - PUBLIC_API_DISABLED
                      - SERVICE_UNAVAILABLE
                      - UPSTREAM_UNAVAILABLE
                      - FEED_UNAVAILABLE
                      - FEED_TIMEOUT
                      - INTERNAL_ERROR
                  message:
                    type: string
                  details: {}
        '401':
          description: Error. `code` is stable; `message` is for humans and may change.
          content:
            application/json:
              schema:
                description: >-
                  Error. `code` is stable; `message` is for humans and may
                  change.
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    enum:
                      - VALIDATION_FAILED
                      - MODE_REQUIRED
                      - INVALID_STAKE
                      - INVALID_PRICE
                      - INVALID_EXPIRY
                      - CURRENCY_NOT_SUPPORTED
                      - BOOKMAKER_NOT_AVAILABLE_VIA_API
                      - BOOKMAKER_NOT_AVAILABLE
                      - INVALID_API_KEY
                      - API_ACCESS_DENIED
                      - ACCOUNT_NOT_ACTIVE
                      - BETTING_NOT_ALLOWED
                      - BALANCE_UNAVAILABLE
                      - INSUFFICIENT_FUNDS
                      - MAX_STAKE_PER_FIXTURE_EXCEEDED
                      - PRICE_NOT_AVAILABLE
                      - PRICE_CHANGED
                      - NO_LIQUIDITY
                      - INSUFFICIENT_LIQUIDITY
                      - CLIENT_ORDER_ID_REUSED
                      - PREVIOUS_ATTEMPT_UNRESOLVED
                      - NOT_FOUND
                      - INVALID_CURSOR
                      - INVALID_WINDOW
                      - ORDER_BUSY
                      - CONFLICT
                      - FORBIDDEN
                      - RATE_LIMITED
                      - BETTING_SUSPENDED
                      - EXPIRY_NOT_AVAILABLE
                      - PUBLIC_API_DISABLED
                      - SERVICE_UNAVAILABLE
                      - UPSTREAM_UNAVAILABLE
                      - FEED_UNAVAILABLE
                      - FEED_TIMEOUT
                      - INTERNAL_ERROR
                  message:
                    type: string
                  details: {}
        '403':
          description: Error. `code` is stable; `message` is for humans and may change.
          content:
            application/json:
              schema:
                description: >-
                  Error. `code` is stable; `message` is for humans and may
                  change.
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    enum:
                      - VALIDATION_FAILED
                      - MODE_REQUIRED
                      - INVALID_STAKE
                      - INVALID_PRICE
                      - INVALID_EXPIRY
                      - CURRENCY_NOT_SUPPORTED
                      - BOOKMAKER_NOT_AVAILABLE_VIA_API
                      - BOOKMAKER_NOT_AVAILABLE
                      - INVALID_API_KEY
                      - API_ACCESS_DENIED
                      - ACCOUNT_NOT_ACTIVE
                      - BETTING_NOT_ALLOWED
                      - BALANCE_UNAVAILABLE
                      - INSUFFICIENT_FUNDS
                      - MAX_STAKE_PER_FIXTURE_EXCEEDED
                      - PRICE_NOT_AVAILABLE
                      - PRICE_CHANGED
                      - NO_LIQUIDITY
                      - INSUFFICIENT_LIQUIDITY
                      - CLIENT_ORDER_ID_REUSED
                      - PREVIOUS_ATTEMPT_UNRESOLVED
                      - NOT_FOUND
                      - INVALID_CURSOR
                      - INVALID_WINDOW
                      - ORDER_BUSY
                      - CONFLICT
                      - FORBIDDEN
                      - RATE_LIMITED
                      - BETTING_SUSPENDED
                      - EXPIRY_NOT_AVAILABLE
                      - PUBLIC_API_DISABLED
                      - SERVICE_UNAVAILABLE
                      - UPSTREAM_UNAVAILABLE
                      - FEED_UNAVAILABLE
                      - FEED_TIMEOUT
                      - INTERNAL_ERROR
                  message:
                    type: string
                  details: {}
        '429':
          description: Error. `code` is stable; `message` is for humans and may change.
          content:
            application/json:
              schema:
                description: >-
                  Error. `code` is stable; `message` is for humans and may
                  change.
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    enum:
                      - VALIDATION_FAILED
                      - MODE_REQUIRED
                      - INVALID_STAKE
                      - INVALID_PRICE
                      - INVALID_EXPIRY
                      - CURRENCY_NOT_SUPPORTED
                      - BOOKMAKER_NOT_AVAILABLE_VIA_API
                      - BOOKMAKER_NOT_AVAILABLE
                      - INVALID_API_KEY
                      - API_ACCESS_DENIED
                      - ACCOUNT_NOT_ACTIVE
                      - BETTING_NOT_ALLOWED
                      - BALANCE_UNAVAILABLE
                      - INSUFFICIENT_FUNDS
                      - MAX_STAKE_PER_FIXTURE_EXCEEDED
                      - PRICE_NOT_AVAILABLE
                      - PRICE_CHANGED
                      - NO_LIQUIDITY
                      - INSUFFICIENT_LIQUIDITY
                      - CLIENT_ORDER_ID_REUSED
                      - PREVIOUS_ATTEMPT_UNRESOLVED
                      - NOT_FOUND
                      - INVALID_CURSOR
                      - INVALID_WINDOW
                      - ORDER_BUSY
                      - CONFLICT
                      - FORBIDDEN
                      - RATE_LIMITED
                      - BETTING_SUSPENDED
                      - EXPIRY_NOT_AVAILABLE
                      - PUBLIC_API_DISABLED
                      - SERVICE_UNAVAILABLE
                      - UPSTREAM_UNAVAILABLE
                      - FEED_UNAVAILABLE
                      - FEED_TIMEOUT
                      - INTERNAL_ERROR
                  message:
                    type: string
                  details: {}
        '503':
          description: Error. `code` is stable; `message` is for humans and may change.
          content:
            application/json:
              schema:
                description: >-
                  Error. `code` is stable; `message` is for humans and may
                  change.
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    enum:
                      - VALIDATION_FAILED
                      - MODE_REQUIRED
                      - INVALID_STAKE
                      - INVALID_PRICE
                      - INVALID_EXPIRY
                      - CURRENCY_NOT_SUPPORTED
                      - BOOKMAKER_NOT_AVAILABLE_VIA_API
                      - BOOKMAKER_NOT_AVAILABLE
                      - INVALID_API_KEY
                      - API_ACCESS_DENIED
                      - ACCOUNT_NOT_ACTIVE
                      - BETTING_NOT_ALLOWED
                      - BALANCE_UNAVAILABLE
                      - INSUFFICIENT_FUNDS
                      - MAX_STAKE_PER_FIXTURE_EXCEEDED
                      - PRICE_NOT_AVAILABLE
                      - PRICE_CHANGED
                      - NO_LIQUIDITY
                      - INSUFFICIENT_LIQUIDITY
                      - CLIENT_ORDER_ID_REUSED
                      - PREVIOUS_ATTEMPT_UNRESOLVED
                      - NOT_FOUND
                      - INVALID_CURSOR
                      - INVALID_WINDOW
                      - ORDER_BUSY
                      - CONFLICT
                      - FORBIDDEN
                      - RATE_LIMITED
                      - BETTING_SUSPENDED
                      - EXPIRY_NOT_AVAILABLE
                      - PUBLIC_API_DISABLED
                      - SERVICE_UNAVAILABLE
                      - UPSTREAM_UNAVAILABLE
                      - FEED_UNAVAILABLE
                      - FEED_TIMEOUT
                      - INTERNAL_ERROR
                  message:
                    type: string
                  details: {}
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.