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

# Open a perp position (create proposal)

> Open a NEW perp position, creating the proposal atomically. `collateralUsd` and `leverage` are numeric strings; `stopLossPct`/`takeProfitPct` are optional % collateral-ROI brackets. The wallet is resolved server-side. Subject to regional restrictions (see Eligibility & geo restrictions).



## OpenAPI

````yaml /openapi.json post /api/v1/perps/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/perps/proposals:
    post:
      tags:
        - Perpetuals
      summary: Open a perp position (create proposal)
      description: >-
        Open a NEW perp position, creating the proposal atomically.
        `collateralUsd` and `leverage` are numeric strings;
        `stopLossPct`/`takeProfitPct` are optional % collateral-ROI brackets.
        The wallet is resolved server-side. Subject to regional restrictions
        (see Eligibility & geo restrictions).
      operationId: openPerpProposal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenPerpProposalBody'
            examples:
              default:
                value:
                  groupId: 1a9d212a-de67-45f4-88f5-6e9f41e78dc0
                  marketSymbol: BTC
                  side: LONG
                  collateralUsd: '25.00'
                  leverage: '5'
                  reason: Bullish
                  takeProfitPct: '100'
      responses:
        '200':
          description: The opened position.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerpPositionResultEnvelope'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    OpenPerpProposalBody:
      type: object
      required:
        - groupId
        - marketSymbol
        - side
        - collateralUsd
        - leverage
      properties:
        groupId:
          type: string
        marketSymbol:
          type: string
          example: BTC
        side:
          type: string
          enum:
            - LONG
            - SHORT
        collateralUsd:
          $ref: '#/components/schemas/MoneyString'
        leverage:
          type: string
          description: Numeric string, e.g. "5".
          example: '5'
        reason:
          type: string
        stopLossPct:
          type: string
          description: Optional % collateral-ROI stop-loss.
        takeProfitPct:
          type: string
          description: Optional % collateral-ROI take-profit.
    PerpPositionResultEnvelope:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PerpPositionResult'
    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'
    PerpPositionResult:
      type: object
      description: >-
        Result of an open/increase/reduce. Close-side fields are populated on a
        full close.
      properties:
        assignmentId:
          type: string
        proposalId:
          type: string
        subaccountIndex:
          type: integer
        txSignature:
          type: string
        marketSymbol:
          type: string
        side:
          type: string
          enum:
            - LONG
            - SHORT
        closePnlUsd:
          oneOf:
            - $ref: '#/components/schemas/MoneyString'
            - type: 'null'
        closePnlPct:
          oneOf:
            - $ref: '#/components/schemas/DecimalString'
            - type: 'null'
        closeProceedsUsd:
          oneOf:
            - $ref: '#/components/schemas/MoneyString'
            - type: 'null'
        closedBaseUnits:
          type: string
          nullable: true
        isFullClose:
          type: boolean
          nullable: true
    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
    DecimalString:
      type: string
      description: >-
        A non-money decimal (percentage, ratio, price) as a full-precision plain
        decimal string (never scientific notation).
      example: '4.27'
  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).

````