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

# Get Account Details

> Returns the full profile for the given account. Only the authenticated account owner may access their own account.



## OpenAPI

````yaml GET /v1/accounts/{account_id}
openapi: 3.0.3
info:
  title: Predicta Markets API
  description: >-
    The Predicta Markets REST API lets you build on top of a continuous
    double-auction prediction market platform. Users buy and sell shares in
    YES/NO outcomes of real-world events. When a market resolves, holders of the
    winning side receive payouts; holders of the losing side lose their stake.


    Data model hierarchy: Market → MarketAsset → MarketAssetOption (prediction
    key) → Order. A Market is a question about a real-world event (e.g. 'Will
    Arsenal win the Premier League?'). Each Market contains one or more
    MarketAssets — the tradeable outcomes. Simple binary markets have a single
    asset; multi-player markets (e.g. Player of the Match) have one asset per
    candidate. Each MarketAsset exposes two options, YES and NO, each carrying a
    prediction_key — the unique hash you pass when placing an order to identify
    exactly which outcome you are trading.


    Trading flow: (1) call GET /v1/markets to find a market; (2) inspect
    market_assets and their options to get the prediction_key for the outcome
    you want; (3) call POST /v1/markets/{market_id}/orders with that
    prediction_key, your price, and quantity. Orders match immediately when a
    counterparty exists, otherwise they rest as open limit orders in the order
    book.


    Price system: all prices are integers in the range 1–99, representing cents.
    Price equals implied probability in percent — a YES price of 65 means the
    market implies a 65% chance the event will occur. YES and NO prices for the
    same asset always sum to approximately 100.


    Currency: the platform's internal unit is PT (Predicta Token). Balances,
    prices, and payout amounts are expressed in PT unless the market was created
    with a real-currency denomination.


    QID system: many resources expose a human-readable qualified ID (qid)
    alongside the numeric id. QIDs are computed, not stored as database columns.
    Prefix conventions — MA: market, MAA: market asset, AP: account payout. Most
    path parameters accept either the numeric id or the qid interchangeably.


    Authentication: include your API key in the X-Api-Key request header. All
    account-scoped endpoints require authentication. Market listing and detail
    endpoints are public.
  version: 1.0.0
  contact:
    email: api-support@predictamarkets.com
servers:
  - url: https://api.predictamarkets.com
    description: Production
security: []
paths:
  /v1/accounts/{account_id}:
    get:
      tags:
        - Account
      summary: Get Account Details
      description: >-
        Returns the full profile for the given account. Only the authenticated
        account owner may access their own account.
      operationId: get_account_holdings
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/TQID'
          description: Account ID (integer) or QID string (e.g. `ACC-1042`)
      responses:
        '200':
          description: Account details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponseSchema'
              example:
                id: 1042
                qid: ACC-1042
                first_name: Jane
                last_name: Doe
                email: jane@example.com
                account_type: PLAYER
                currency: KES
                language: EN
                phone_number: '+254700000000'
                date_of_birth: '1990-05-15'
                national_id: null
                gender: female
                address: 123 Main St
                city: Nairobi
                country: KE
                photo_url: null
                display_currency: null
                balance: '4500.00'
                blocked_balance: '0.00'
                is_verified: true
                referral_code: JANE42
                external_user_id: 550e8400-e29b-41d4-a716-446655440000
                blocked_from_chatting_at: null
                blocked_from_wagering_at: null
                blocked_from_withdrawal_at: null
                reputation_score: 12
                created_at: '2024-03-01T10:00:00Z'
                updated_at: '2025-05-01T08:30:00Z'
        '400':
          description: Invalid ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: Invalid account_id
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: Not authenticated
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: You are not authorized to access this account
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: Account with ID 9999 not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - apiKey: []
components:
  schemas:
    TQID:
      anyOf:
        - type: string
        - type: integer
      description: >-
        Flexible identifier type that accepts either a numeric integer ID or a
        human-readable qualified ID string (QID). QIDs follow a prefix
        convention: MA for markets, MAA for market assets, AP for account
        payouts. Most path parameters that accept an ID use this type so callers
        can use whichever form is more convenient.
    AccountResponseSchema:
      properties:
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        account_type:
          $ref: '#/components/schemas/AccountTypeEnum'
        currency:
          $ref: '#/components/schemas/CurrencyEnum'
        language:
          $ref: '#/components/schemas/LanguageEnum'
        phone_number:
          title: Phone Number
          type: string
          nullable: true
        date_of_birth:
          title: Date Of Birth
          type: string
          format: date
          nullable: true
        national_id:
          title: National Id
          type: string
          nullable: true
        gender:
          title: Gender
          type: string
          nullable: true
        address:
          title: Address
          type: string
          nullable: true
        city:
          title: City
          type: string
          nullable: true
        country:
          title: Country
          type: string
          nullable: true
        photo_url:
          title: Photo Url
          type: string
          nullable: true
        display_currency:
          $ref: '#/components/schemas/CurrencyEnum'
          nullable: true
        qid:
          title: Qid
          type: string
          nullable: true
          description: >-
            Human-readable qualified ID for this account (e.g. ACC-1042).
            Computed from the numeric id — not stored as a column. Can be used
            interchangeably with the numeric id in path parameters.
        id:
          type: integer
          title: Id
        balance:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Balance
          description: >-
            Total account balance in the account's primary currency (available +
            suspense). For a detailed breakdown see GET
            /v1/accounts/{account_id}/balances.
        blocked_balance:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Blocked Balance
          default: '0'
          description: >-
            Amount currently blocked/frozen by an operator (e.g. for compliance
            review). This is separate from suspense and cannot be used for
            trading or withdrawal.
        email:
          type: string
          title: Email
        external_user_id:
          title: External User Id
          type: string
          format: uuid
          nullable: true
          description: >-
            UUID assigned by the authentication provider (OAuth2 sub claim).
            Links this account to the identity record in the auth system.
        is_verified:
          type: boolean
          title: Is Verified
          description: >-
            True if the account has passed identity verification (KYC). Some
            features and higher withdrawal limits require verification.
        referral_code:
          title: Referral Code
          type: string
          nullable: true
          description: >-
            This account's unique referral code. Share this code or append it to
            a link to earn referral commissions when new users sign up and
            trade.
        blocked_from_chatting_at:
          title: Blocked From Chatting At
          type: string
          format: date-time
          nullable: true
          description: >-
            If set, the timestamp when this account was blocked from the
            platform chat. Null if not blocked.
        blocked_from_wagering_at:
          title: Blocked From Wagering At
          type: string
          format: date-time
          nullable: true
          description: >-
            If set, the timestamp when this account was blocked from placing
            orders (wagering). Null if not blocked.
        blocked_from_withdrawal_at:
          title: Blocked From Withdrawal At
          type: string
          format: date-time
          nullable: true
          description: >-
            If set, the timestamp when this account was blocked from withdrawing
            funds. Null if not blocked.
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        reputation_score:
          type: integer
          title: Reputation Score
          description: >-
            Platform reputation score for the account. Increases through
            activity (trading, winning, referrals) and decreases through policy
            violations. May gate certain platform features.
      type: object
      required:
        - first_name
        - last_name
        - account_type
        - currency
        - language
        - id
        - balance
        - email
        - is_verified
        - created_at
        - updated_at
        - reputation_score
      title: AccountResponseSchema
      description: >-
        Full account profile returned by GET /v1/accounts/{account_id} and
        account mutation endpoints. Includes identity fields, balance totals,
        verification status, and moderation flags.
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
      required:
        - detail
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
      description: >-
        Returned by FastAPI when request validation fails (HTTP 422). Contains
        one or more ValidationError entries describing each invalid field.
    AccountTypeEnum:
      type: string
      enum:
        - PLAYER
        - HUB
      title: AccountTypeEnum
      description: >-
        Role of the account: PLAYER (standard user) or HUB (B2B operator
        sub-platform).
    CurrencyEnum:
      type: string
      enum:
        - NGN
        - USD
        - KES
        - GHS
        - ZAR
        - XOF
        - TZS
        - EUR
        - GBP
        - CAD
        - AUD
        - CHF
        - CNY
        - INR
        - MXN
        - NZD
        - RUB
        - SEK
        - SGD
        - THB
        - TRY
        - UAH
        - VND
        - JPY
        - UGX
        - RWF
        - USDC
        - USDT
        - PT
      title: CurrencyEnum
      description: >-
        ISO currency code or platform token. PT is Predicta's internal token
        used for most markets. USDC and USDT are supported stablecoins. All
        other values are standard ISO 4217 fiat codes.
    LanguageEnum:
      type: string
      enum:
        - EN
        - KIS
      title: LanguageEnum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          description: >-
            Path to the invalid field as a list of keys and/or array indices.
            For example, ['body', 'price'] indicates the price field in the
            request body failed validation.
        msg:
          type: string
          title: Message
          description: Human-readable explanation of what validation rule was violated.
        type:
          type: string
          title: Error Type
          description: >-
            Machine-readable Pydantic error type (e.g. 'value_error.missing',
            'type_error.integer').
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
      description: >-
        A single field validation failure within an HTTP 422 response. The loc
        array traces the path to the invalid field (e.g. ['body', 'price']).
  responses:
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            detail: An unexpected error occurred. Please try again later.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      x-default: your-api-key-here

````