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

# Create prediction proposal

> Create a prediction proposal with an initial prediction (group leader only). Takes an event/market reference — never a title; the backend resolves titles and the outcome token server-side. Buys must be at least $4 (`AMOUNT_BELOW_MINIMUM`) and clear the market's venue minimum of typically 5 contracts at the current price (`MIN_ORDER_SIZE`; the error message includes the market's dollar minimum). An ACTIVE or still-settling (PENDING) proposal for the same outcome in the group cannot be duplicated (400). Subject to regional restrictions (see Eligibility & geo restrictions).



## OpenAPI

````yaml /openapi.json post /api/v1/predictions/proposals
openapi: 3.1.0
info:
  title: Murmo API
  version: 1.0.0
  description: >-
    REST API for the Murmo trading platform. Spot swaps, prediction markets,
    perpetual futures, social copy-trading groups, portfolio, and chat —
    everything a bot or AI agent needs to trade on Solana with a single API key.


    **The money contract:** every monetary value on the wire is a full-precision
    plain decimal **string** (e.g. `"12.50"`), never a number, never raw base
    units, never scientific notation, never rounded. Send money the same way.
    See the *Money & precision* guide.


    **Auth:** send `Authorization: Bearer murmo_...` on every request. Keys are
    created in the Murmo app.
  contact:
    name: Murmo Support
    email: support@murmo.xyz
servers:
  - url: https://api.alpha-labs.trade
    description: Production
  - url: http://localhost:3000
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Identity
    description: Who am I, which key is this, and what is my rate budget.
  - name: Account
    description: >-
      Wallet value, balances, holdings, PnL, and the deposit address for funding
      in.
  - name: Spot
    description: Token discovery and group spot proposals.
  - name: Stocks
    description: >-
      Ondo tokenized stocks: the supported-ticker catalog and ticker-based
      trading over the group/proposal flow.
  - name: Predictions
    description: >-
      Polymarket-backed prediction markets: browse events, propose, predict,
      sell, claim.
  - name: Perpetuals
    description: 'Phoenix RISE perps: markets, proposals, open/increase/reduce/close/claim.'
  - name: Groups
    description: 'Copy-trade groups: membership, admin, and auto-follow.'
  - name: Portfolio
    description: Cross-vertical open positions, past positions, and trade history.
  - name: Chat
    description: Group chat over REST (the stateless counterpart to the WebSocket gateway).
paths:
  /api/v1/predictions/proposals:
    post:
      tags:
        - Predictions
      summary: Create prediction proposal
      description: >-
        Create a prediction proposal with an initial prediction (group leader
        only). Takes an event/market reference — never a title; the backend
        resolves titles and the outcome token server-side. Buys must be at least
        $4 (`AMOUNT_BELOW_MINIMUM`) and clear the market's venue minimum of
        typically 5 contracts at the current price (`MIN_ORDER_SIZE`; the error
        message includes the market's dollar minimum). An ACTIVE or
        still-settling (PENDING) proposal for the same outcome in the group
        cannot be duplicated (400). Subject to regional restrictions (see
        Eligibility & geo restrictions).
      operationId: createPredictionProposal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePredictionProposalBody'
            examples:
              default:
                value:
                  groupId: 1a9d212a-de67-45f4-88f5-6e9f41e78dc0
                  eventId: presidential-election-winner-2028
                  marketId: will-jd-vance-win-the-2028-us-presidential-election
                  isYes: true
                  amountUsd: '10.00'
                  reason: Vance value
      responses:
        '200':
          description: >-
            Created proposal and the opening trade (or a PENDING settling
            receipt).
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      proposal:
                        $ref: '#/components/schemas/PredictionProposal'
                      trade:
                        oneOf:
                          - $ref: '#/components/schemas/PredictionTrade'
                          - type: 'null'
                        description: >-
                          The opening trade. Null while `pending` is true
                          (asynchronous fill).
                      pending:
                        type: boolean
                        description: >-
                          True: funds are committed and the buy is settling
                          asynchronously — the proposal is returned with status
                          PENDING and flips to ACTIVE on the confirmed fill (or
                          FAILED with funds returned). False: synchronous fill;
                          `trade` is populated.
                      actionJobId:
                        type: string
                        nullable: true
                        description: >-
                          Settlement job id for an asynchronous fill; null on
                          synchronous fills.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    CreatePredictionProposalBody:
      type: object
      required:
        - groupId
        - eventId
        - marketId
        - isYes
        - amountUsd
      properties:
        groupId:
          type: string
        eventId:
          type: string
          description: >-
            Event slug (e.g. `presidential-election-winner-2028`), as returned
            by the events endpoints.
        marketId:
          type: string
          description: >-
            Market slug for the specific market within the event (e.g.
            `will-jd-vance-win-the-2028-us-presidential-election`); the side is
            chosen with `isYes`.
        isYes:
          type: boolean
          description: Buy the YES side (true) or NO side (false).
        amountUsd:
          allOf:
            - $ref: '#/components/schemas/MoneyString'
          description: >-
            Minimum $4, and at least the market's venue minimum (typically 5
            contracts at the current price — see MIN_ORDER_SIZE).
        reason:
          type: string
          maxLength: 500
    PredictionProposal:
      type: object
      properties:
        id:
          type: string
        groupId:
          type: string
        createdById:
          type: string
        eventId:
          type: string
          description: >-
            Event slug (e.g. `presidential-election-winner-2028`). Legacy
            proposals may hold older identifier formats.
        marketId:
          type: string
          description: Market slug for the specific market within the event.
        outcomeMint:
          type: string
          description: >-
            Venue outcome-token id for the chosen side (legacy proposals hold a
            Solana mint address).
        eventTitle:
          type: string
          nullable: true
        marketTitle:
          type: string
          nullable: true
        eventImageUrl:
          type: string
          nullable: true
        isYes:
          type: boolean
        status:
          type: string
          enum:
            - PENDING
            - ACTIVE
            - CLOSED
            - RESOLVED
            - FAILED
          description: >-
            PENDING = buy settling (visible only to its creator); ACTIVE = open;
            CLOSED = sell-only; RESOLVED = market resolved; FAILED = buy gave
            up, funds returned (creator-only).
        result:
          type: string
          nullable: true
          enum:
            - 'YES'
            - 'NO'
            - INVALID
            - CANCELLED
            - null
          description: >-
            Resolution outcome; null until resolved. INVALID = 50/50 resolution
            — both sides redeem at $0.50 per contract.
        didWin:
          type: boolean
          nullable: true
          description: >-
            Whether the proposal's side won; null until resolved (false on
            INVALID — both sides claim $0.50).
        reason:
          type: string
          nullable: true
        resolvedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    PredictionTrade:
      type: object
      properties:
        id:
          type: string
        proposalId:
          type: string
        groupId:
          type: string
        walletAddress:
          type: string
        tradeType:
          type: string
          enum:
            - BUY
            - SELL
            - CLAIM
            - LOST
        tokenAmount:
          $ref: '#/components/schemas/DecimalString'
        tokenDecimals:
          type: integer
        pricePerTokenUsd:
          $ref: '#/components/schemas/MoneyString'
        totalCostUsd:
          allOf:
            - $ref: '#/components/schemas/MoneyString'
          description: >-
            Gross fill value (tokenAmount × pricePerTokenUsd). The venue fee is
            charged on top on buys and deducted from delivery on sells;
            pnlPct/pnlUsd are already net of it.
        venueFeeUsd:
          allOf:
            - $ref: '#/components/schemas/MoneyString'
          description: >-
            Venue fee charged at match on this fill. "0" on fee-free trades
            (claims, resolutions).
        pnlPct:
          oneOf:
            - $ref: '#/components/schemas/DecimalString'
            - type: 'null'
          description: Exit trades only (SELL/CLAIM/LOST); null on buys. Net of venue fees.
        pnlUsd:
          oneOf:
            - $ref: '#/components/schemas/MoneyString'
            - type: 'null'
          description: Exit trades only (SELL/CLAIM/LOST); null on buys. Net of venue fees.
        txSignature:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
    MoneyString:
      type: string
      description: >-
        A monetary amount as a full-precision plain decimal string in USD —
        never a number, never raw base units, never scientific notation, never
        rounded. Parse with a decimal library; round only for display.
      example: '12.50'
    DecimalString:
      type: string
      description: >-
        A non-money decimal (percentage, ratio, price) as a full-precision plain
        decimal string (never scientific notation).
      example: '4.27'
    Error:
      type: object
      description: >-
        Errors come in two shapes. Coded business errors: `{ message, code }`.
        Generic framework errors: `{ statusCode, message, error }` (message may
        be an array of validation strings).
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: Query parameter "groupId" is required
        error:
          type: string
          example: Bad Request
        code:
          type: string
          description: >-
            Stable machine-readable code on business errors (e.g.
            NOT_GROUP_MEMBER, MARKET_NOT_ACTIVE, AMOUNT_BELOW_MINIMUM,
            MIN_ORDER_SIZE, NO_LIQUIDITY, FUNDING_REFUNDED). The full list is
            published as error-catalog.json.
          example: NOT_GROUP_MEMBER
  responses:
    BadRequest:
      description: Invalid input.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid credential.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        Authenticated but not permitted (e.g. not a group member, or the product
        is restricted in your region).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send your API key as `Authorization: Bearer murmo_...`. Keys are created
        in the Murmo app. Header-only — keys are never read from the query
        string. Valid for the REST API under /api/v1 only (not the GraphQL
        endpoint).

````