> ## 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 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. Dev (canary) = newest features;
    Staging (stable) = pre-production.
  version: 0.0.0-dev
  contact: {}
servers:
  - url: https://api.endaoment.org
    description: Production
security: []
tags:
  - name: Partner Endpoints
    description: Tech-platform partner server-to-server APIs
  - name: Authentication
    description: OAuth callers, API keys, and session verification
  - name: Funds
    description: Donor-advised fund lifecycle
  - name: Donations
    description: Donation pledges, supported assets, and impact totals
  - name: Portfolios
    description: Investment portfolio catalog
  - name: Nonprofit Organizations
    description: Nonprofit lookup, subprojects, and missing-org intake
  - name: Grant Transfers
    description: Grant and entity transfers
  - name: Collaboration
    description: Collaborator recommendations and fund collaboration
  - name: Activity
    description: Public and scoped activity feeds
paths:
  /v1/recommendations/trade:
    post:
      tags:
        - Collaboration
      summary: Create portfolio trade recommendation
      description: Creates a recommendation for a portfolio trade (buy/sell).
      operationId: RecommendationsController_createTradeRecommendation_v1
      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

````