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

# Create a portfolio trade recommendation

> Creates a recommendation for a portfolio trade (buy/sell).



## OpenAPI

````yaml https://api.endaoment.org/oas-json post /v1/recommendations/trade
openapi: 3.0.0
info:
  title: Endaoment API
  description: The official Endaoment API endpoints
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.endaoment.org
    description: Production
security: []
tags: []
paths:
  /v1/recommendations/trade:
    post:
      tags:
        - Recommendations
      summary: Create a portfolio trade recommendation
      description: Creates a recommendation for a portfolio trade (buy/sell).
      operationId: RecommendationsController_createTradeRecommendation
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePortfolioTradeRecommendationInputDto'
      responses:
        '200':
          description: Portfolio trade recommendation successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecommendationCreatedResponseDto'
        '400':
          description: Invalid input data provided
      security:
        - bearer: []
components:
  schemas:
    CreatePortfolioTradeRecommendationInputDto:
      type: object
      properties:
        issuerEntityId:
          type: string
          description: Id of the entity issuing the trade
          format: uuid
        portfolioId:
          type: string
          description: ID of the Portfolio to assemble the trade for
          format: uuid
        issuerEntityType:
          type: string
          description: Type of the entity issuing the Trade
          enum:
            - org
            - fund
        amountUsdc:
          type: string
          description: >-
            Amount of the trade in USDC, in the smallest currency unit (1000000
            = 1 USD)
          example: '100000000'
        tradeType:
          type: string
          description: Type of trade
          enum:
            - Buy
            - Sell
        slippageToleranceBps:
          type: number
          description: >-
            Slippage tolerance for the trade in basis points (bps). Defaults to
            maximum slippage.
          example: 50
        isMax:
          type: boolean
          description: Whether the trade is a max trade, ignoring the amountUsdc value
          example: false
        collaboratingFundId:
          type: string
          description: ID of the fund that the advisor is collaborating with
          format: uuid
        uuid:
          type: string
          description: >-
            Unique identifier for the recommendation. Generated on the client
            side to ensure idempotency.
          format: uuid
      required:
        - issuerEntityId
        - portfolioId
        - issuerEntityType
        - amountUsdc
        - tradeType
        - uuid
    RecommendationCreatedResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The recommendation id
          example: 123e4567-e89b-12d3-a456-426614174000
      required:
        - id
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````