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

# Close strategy

> Closes an existing lending strategy and returns the serialized transaction required to do so.



## OpenAPI

````yaml post /markets/strategy/close/{strategy}
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/close/{strategy}:
    post:
      tags:
        - Markets
        - Strategy
      summary: Close strategy
      description: >-
        Closes an existing lending strategy and returns the serialized
        transaction required to do so.
      operationId: closeStrategy
      parameters:
        - name: strategy
          in: path
          required: true
          schema:
            type: string
          description: Onchain address of the strategy to close.
        - name: payer
          in: header
          required: true
          schema:
            type: string
          description: Wallet that pays transaction fees for the close transaction.
      responses:
        '200':
          description: Serialized transaction for closing the strategy.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VersionedTransactionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/GeneralError'
components:
  schemas:
    VersionedTransactionResponse:
      type: object
      required:
        - message
        - signatures
      properties:
        message:
          type: string
          description: Base64-encoded versioned transaction message.
        signatures:
          type: array
          items:
            $ref: '#/components/schemas/VersionedTransactionSignature'
    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.

````