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

# Create strategy

> Creates a new lending strategy, deposits the initial principal amount, and may return multiple transactions when lookup-table setup or external yield account initialization is required.



## OpenAPI

````yaml post /markets/strategy/create
openapi: 3.1.3
info:
  title: Loopscale API
  version: 1.0.0
servers:
  - url: https://tars.loopscale.com/v1
    description: Loopscale Production Server
security: []
paths:
  /markets/strategy/create:
    post:
      tags:
        - Markets
        - Strategy
      summary: Create strategy
      description: >-
        Creates a new lending strategy, deposits the initial principal amount,
        and may return multiple transactions when lookup-table setup or external
        yield account initialization is required.
      operationId: createStrategy
      parameters:
        - name: payer
          in: header
          required: true
          schema:
            type: string
          description: >-
            Wallet that pays transaction fees. If you normally use the same
            wallet as the lender, pass that wallet here.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStrategyRequest'
      responses:
        '200':
          description: >-
            One or more serialized transactions needed to create and fund the
            strategy.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VersionedTransactionBatchResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/GeneralError'
components:
  schemas:
    CreateStrategyRequest:
      type: object
      required:
        - principalMint
        - lender
        - amount
      properties:
        principalMint:
          type: string
          description: Mint address of the principal asset the strategy will lend.
        lender:
          type: string
          description: Wallet that will own and fund the strategy.
        amount:
          type: number
          description: >-
            Initial principal amount to deposit into the strategy, in native
            token units.
        originationsEnabled:
          type: boolean
          description: Whether the strategy should accept new originations immediately.
        liquidityBuffer:
          type: number
          description: Amount of principal to reserve as idle liquidity.
        interestFee:
          type: number
          description: Interest fee charged by the strategy, in cBPS.
        originationFee:
          type: number
          description: Origination fee charged by the strategy, in cBPS.
        originationCap:
          type: number
          description: Maximum amount of principal that can be originated.
        collateralTerms:
          type: array
          description: Optional collateral-term presets to initialize on the strategy.
          items:
            $ref: '#/components/schemas/MultiCollateralTermsUpdateParams'
        marketInformation:
          type: string
          description: >-
            Optional verified market information account to bind to the
            strategy.
        externalYieldSourceArgs:
          $ref: '#/components/schemas/TxnExternalYieldSourceArgs'
    VersionedTransactionBatchResponse:
      type: array
      items:
        $ref: '#/components/schemas/VersionedTransactionResponse'
    MultiCollateralTermsUpdateParams:
      type: object
      required:
        - apy
        - indices
      properties:
        apy:
          type: number
          description: APY for the grouped collateral term entries, in cBPS.
        indices:
          type: array
          items:
            $ref: '#/components/schemas/CollateralTermsIndices'
    TxnExternalYieldSourceArgs:
      type: object
      required:
        - newExternalYieldSource
        - createExternalYieldAccount
      properties:
        newExternalYieldSource:
          type: integer
          description: External yield source identifier.
        createExternalYieldAccount:
          type: boolean
          description: >-
            Whether a new external yield account should be created alongside the
            strategy.
    VersionedTransactionResponse:
      type: object
      required:
        - message
        - signatures
      properties:
        message:
          type: string
          description: Base64-encoded versioned transaction message.
        signatures:
          type: array
          items:
            $ref: '#/components/schemas/VersionedTransactionSignature'
    CollateralTermsIndices:
      type: object
      required:
        - collateralIndex
        - durationIndex
      properties:
        collateralIndex:
          type: integer
          description: Collateral slot index in market information.
        durationIndex:
          type: integer
          description: Duration preset index for the collateral term.
    VersionedTransactionSignature:
      type: object
      required:
        - publicKey
        - signature
      properties:
        publicKey:
          type: string
        signature:
          type: string
  responses:
    BadRequest:
      description: Bad Request
      content:
        text/plain:
          schema:
            type: string
            example: Invalid strategy address
    GeneralError:
      description: General Server Error
      content:
        text/plain:
          schema:
            type: string
            example: Failed to deserialize the JSON body into the target type.

````