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

# Create Sell Transaction

> Generate a Base64 encoded sell transaction for a standard pool.

**Flow:** First call `/quote/sell` to get a quote, then pass the `quote_response` here to build the transaction. The returned transaction must be signed by the payer and submitted to the Solana network.



## OpenAPI

````yaml /openapi.json post /tx/sell
openapi: 3.1.0
info:
  title: heaven-tx-api
  description: ''
  license:
    name: ''
  version: 0.1.14
servers:
  - url: https://tx.api.heaven.xyz
security: []
tags:
  - name: heaven-api
    description: Heaven API
paths:
  /tx/sell:
    post:
      tags:
        - Standard Pool API
      summary: Create Sell Transaction
      description: >-
        Generate a Base64 encoded sell transaction for a standard pool.


        **Flow:** First call `/quote/sell` to get a quote, then pass the
        `quote_response` here to build the transaction. The returned transaction
        must be signed by the payer and submitted to the Solana network.
      operationId: create_sell_tx
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSellTxRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSellTxResponse'
components:
  schemas:
    CreateSellTxRequest:
      type: object
      required:
        - payer
        - quote_response
        - encoded_user_defined_event_data
      properties:
        compute_unit_limit:
          type:
            - integer
            - 'null'
          description: Optional compute unit limit for the transaction
          default: 200000
          example: 200000
          minimum: 0
        compute_unit_price:
          type:
            - integer
            - 'null'
          description: Optional compute unit price for the transaction
          default: 40000000
          example: 40000000
          minimum: 0
        encoded_user_defined_event_data:
          type: string
          description: Encoded user defined event data
          example: custom_event_data
        payer:
          type: string
          description: Payer of the transaction
          example: G2pX3b4Y8m7v5xX9L5f6y7z8A9B0C1D2E3F4G5H6I7J8K
        quote_response:
          $ref: '#/components/schemas/QuoteSellResponse'
          description: >-
            The full quote response object from the Quote Sell endpoint. Pass
            the entire response without modification.
        source:
          type:
            - string
            - 'null'
          description: >-
            Optional source token account for the sell operation. If not
            provided, the payer's associated token account will be used.
          example: G2pX3b4Y8m7v5xX9L5f6y7z8A9B0C1D2E3F4G5H6I7J8K
    CreateSellTxResponse:
      type: object
      required:
        - tx
      properties:
        tx:
          type: string
          description: Base64 encoded transaction
    QuoteSellResponse:
      type: object
      required:
        - amount_in
        - amount_in_ui
        - minimum_out
        - minimum_out_ui
        - config_version
        - mint
        - program_id
        - slippage_bps
      properties:
        amount_in:
          type: integer
          format: int64
          minimum: 0
          description: Amount of tokens to sell (native units).
        amount_in_ui:
          type: number
          format: double
          description: Amount of tokens to sell (human-readable with decimals).
        config_version:
          type: integer
          format: int32
          minimum: 0
          description: Protocol config version used for the quote.
        minimum_out:
          type: integer
          format: int64
          minimum: 0
          description: Minimum SOL output after slippage (lamports).
        minimum_out_ui:
          type: number
          format: double
          description: Minimum SOL output after slippage (human-readable).
        mint:
          type: string
          description: Mint address of the token being sold.
        program_id:
          type: string
          description: Heaven DEX program ID used.
        slippage_bps:
          type: integer
          format: int64
          minimum: 0
          description: Slippage tolerance applied (basis points).

````