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

# Interact with yield pool



## OpenAPI

````yaml https://backend.swap.coffee/openapi post /v1/yield/pool/{pool_address}/{user_address}
openapi: 3.0.3
info:
  title: Swap Coffee API
  version: 1.0.0
servers:
  - url: https://backend.swap.coffee/
  - url: http://localhost:8080/
security:
  - {}
  - ApiKey: []
tags:
  - name: Entity
    description: Tokens, pools, DEXes, etc.
  - name: Routing
    description: >-
      Core functionality of the aggregation service. Build routes, get
      transactions, etc.
  - name: Strategies
    description: Limit orders, DCA, VCA, etc.
  - name: Yield
    description: >-
      Yield aggregator functionality. Provides and handles routes to pools with
      the best yield.
  - name: Referral
    description: Everything related to the referral program of swap.coffee.
  - name: Cashback
    description: Cashback programs conducted on swap.coffee.
  - name: Claim
    description: Claiming various rewards available on swap.coffee.
  - name: Contests
    description: Timed contests based on trading volumes for certain token-pairs.
  - name: Staking
    description: Responsible of managing staked funds, corresponding rewards, etc.
  - name: DEX
    description: Core functionality of the Coffee DEX service.
  - name: LiquidityProvisioning
    description: Everything related to liquidity provisioning in DEXes.
  - name: Boosts
    description: >-
      Functionality to support incentives and rewards for liquidity providers
      among all DEXes.
  - name: Profile
    description: Retrieve information about user profiles.
  - name: Partnership
    description: Various functionality for our partners.
  - name: Statistics
    description: Retrieve information about dex aggregation stats.
  - name: Ton
    description: Retrieve information about TON entities.
  - name: Auth
    description: Auth operations. For internal usage only.
paths:
  /v1/yield/pool/{pool_address}/{user_address}:
    post:
      tags:
        - Yield
      summary: Interact with yield pool
      operationId: interactYieldPoolUser
      parameters:
        - name: pool_address
          in: path
          required: true
          description: Pool address
          schema:
            type: string
        - name: user_address
          in: path
          required: true
          description: User address
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiYieldInteractionRequest'
      responses:
        '200':
          description: Transaction to be sent
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiTransactionResponse'
        default:
          $ref: '#/components/responses/ApiError'
components:
  schemas:
    ApiYieldInteractionRequest:
      type: object
      required:
        - request_data
      properties:
        request_data:
          oneOf:
            - $ref: '#/components/schemas/ApiDexPoolLiquidityProvisioningRequest'
            - $ref: '#/components/schemas/ApiDexCLMMPoolLiquidityProvisioningRequest'
            - $ref: '#/components/schemas/ApiDexDLMMPoolLiquidityProvisioningRequest'
            - $ref: '#/components/schemas/ApiDexPoolLiquidityWithdrawalRequest'
            - $ref: '#/components/schemas/ApiDexCLMMPoolLiquidityWithdrawalRequest'
            - $ref: '#/components/schemas/ApiDexDLMMLiquidityWithdrawalRequest'
            - $ref: '#/components/schemas/ApiStonfiFarmRequest'
            - $ref: >-
                #/components/schemas/ApiYieldInteractionRequest_DexStonfiWithdrawFromStaking
            - $ref: >-
                #/components/schemas/ApiYieldInteractionRequest_LiquidStakingStake
            - $ref: >-
                #/components/schemas/ApiYieldInteractionRequest_LiquidStakingUnstake
            - $ref: '#/components/schemas/ApiYieldInteractionRequest_LendingDeposit'
            - $ref: '#/components/schemas/ApiYieldInteractionRequest_LendingWithdraw'
          discriminator:
            propertyName: yieldTypeResolver
            mapping:
              dex_provide_liquidity:
                $ref: '#/components/schemas/ApiDexPoolLiquidityProvisioningRequest'
              dex_withdraw_liquidity:
                $ref: '#/components/schemas/ApiDexPoolLiquidityWithdrawalRequest'
              dex_clmm_provide_liquidity:
                $ref: >-
                  #/components/schemas/ApiDexCLMMPoolLiquidityProvisioningRequest
              dex_clmm_withdraw_liquidity:
                $ref: '#/components/schemas/ApiDexCLMMPoolLiquidityWithdrawalRequest'
              dex_dlmm_provide_liquidity:
                $ref: >-
                  #/components/schemas/ApiDexDLMMPoolLiquidityProvisioningRequest
              dex_dlmm_withdraw_liquidity:
                $ref: '#/components/schemas/ApiDexDLMMLiquidityWithdrawalRequest'
              dex_stonfi_lock_staking:
                $ref: '#/components/schemas/ApiStonfiFarmRequest'
              dex_stonfi_withdraw_staking:
                $ref: >-
                  #/components/schemas/ApiYieldInteractionRequest_DexStonfiWithdrawFromStaking
              liquid_staking_stake:
                $ref: >-
                  #/components/schemas/ApiYieldInteractionRequest_LiquidStakingStake
              liquid_staking_unstake:
                $ref: >-
                  #/components/schemas/ApiYieldInteractionRequest_LiquidStakingUnstake
              lending_deposit:
                $ref: '#/components/schemas/ApiYieldInteractionRequest_LendingDeposit'
              lending_withdraw:
                $ref: >-
                  #/components/schemas/ApiYieldInteractionRequest_LendingWithdraw
    ApiTransactionResponse:
      type: object
      required:
        - query_id
        - message
      properties:
        query_id:
          type: integer
          format: int64
        message:
          $ref: '#/components/schemas/ApiTransactionBoc'
    ApiDexPoolLiquidityProvisioningRequest:
      type: object
      required:
        - user_wallet
        - asset_1_amount
        - asset_2_amount
      properties:
        user_wallet:
          type: string
          example: UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV
        asset_1_amount:
          type: string
          description: Absolute value
        asset_2_amount:
          type: string
          description: Absolute value
        min_lp_amount:
          type: string
          description: Absolute value
        reserves_ratio_condition:
          $ref: >-
            #/components/schemas/ApiDexPoolLiquidityProvisioningReservesRatioCondition
    ApiDexCLMMPoolLiquidityProvisioningRequest:
      type: object
      required:
        - asset_1_amount_desired
        - asset_2_amount_desired
        - asset_1_amount_to_send
        - asset_2_amount_to_send
        - lp_amount
        - tick_lower
        - tick_upper
      properties:
        asset_1_amount_desired:
          type: string
          description: Absolute value
        asset_2_amount_desired:
          type: string
          description: Absolute value
        asset_1_amount_to_send:
          type: string
          description: Absolute value
        asset_2_amount_to_send:
          type: string
          description: Absolute value
        lp_amount:
          type: string
          description: Absolute value
        tick_lower:
          type: integer
          format: int64
        tick_upper:
          type: integer
          format: int64
    ApiDexDLMMPoolLiquidityProvisioningRequest:
      type: object
      required:
        - asset_1_amount
        - asset_2_amount
        - shape_type
        - bin_from
        - bin_to
      properties:
        asset_1_amount:
          type: string
          description: Amount of first token to provide
        asset_2_amount:
          type: string
          description: Amount of second token to provide
        shape_type:
          type: string
          enum:
            - curve
            - spot
            - bidask
          description: Shape type for liquidity distribution
        bin_from:
          type: integer
          format: int32
          description: Starting bin index for liquidity provision, inclusive
        bin_to:
          type: integer
          format: int32
          description: Ending bin index for liquidity provision, inclusive
        fallback_ratio:
          type: number
          format: double
          description: Fallback ratio for liquidity distribution (0-1)
          minimum: 0
          maximum: 1
    ApiDexPoolLiquidityWithdrawalRequest:
      type: object
      required:
        - user_address
        - lp_amount
      properties:
        user_address:
          type: string
          example: UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV
        lp_amount:
          type: string
          description: Absolute value
    ApiDexCLMMPoolLiquidityWithdrawalRequest:
      type: object
      required:
        - lp_amount
        - position_id
        - tick_lower
        - tick_upper
      properties:
        lp_amount:
          type: string
          description: Absolute value
        tick_lower:
          type: integer
          format: int64
        tick_upper:
          type: integer
          format: int64
        position_id:
          type: integer
          format: int64
          description: Position id, used for interaction with CLMM protocol
    ApiDexDLMMLiquidityWithdrawalRequest:
      type: object
      required:
        - burn_all
      properties:
        burn_all:
          type: boolean
          default: true
          description: >-
            Whether to burn all liquidity from position. If true, `bins_to_burn`
            is ignored
        bins_to_burn:
          type: object
          additionalProperties:
            type: string
          description: Map of bin index to LP amount to burn
    ApiStonfiFarmRequest:
      type: object
      required:
        - lp_amount
        - minter_address
      properties:
        lp_amount:
          type: string
        minter_address:
          type: string
    ApiYieldInteractionRequest_DexStonfiWithdrawFromStaking:
      type: object
      required:
        - position_address
      properties:
        position_address:
          type: string
          description: Stonfi farm position address
          example: EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH
    ApiYieldInteractionRequest_LiquidStakingStake:
      type: object
      required:
        - amount
      properties:
        amount:
          type: string
    ApiYieldInteractionRequest_LiquidStakingUnstake:
      type: object
      required:
        - amount
      properties:
        amount:
          type: string
    ApiYieldInteractionRequest_LendingDeposit:
      type: object
      required:
        - amount
      properties:
        amount:
          type: string
          format: bigint
          description: Input amount
    ApiYieldInteractionRequest_LendingWithdraw:
      type: object
      required:
        - amount
      properties:
        amount:
          type: string
          format: bigint
          description: Input amount
    ApiTransactionBoc:
      type: object
      required:
        - payload_cell
        - address
        - value
      properties:
        payload_cell:
          type: string
          description: >-
            Base64-encoded cell. Treated as a payload field in TonConnect
            transaction.
          format: base64
        address:
          type: string
          example: EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez
        value:
          type: string
          format: int128
          description: >-
            Amount of nanotons to be sent. Can be passed to TonConnect
            transaction.
        state_init:
          type: string
          format: base64
          description: >-
            Base64-encoded cell. Treated as a stateInit field in TonConnect
            transaction.
        extra:
          type: array
          items:
            $ref: '#/components/schemas/ApiExtraCurrency'
    ApiDexPoolLiquidityProvisioningReservesRatioCondition:
      type: object
      required:
        - denominator
        - min_nominator
        - max_nominator
      properties:
        denominator:
          type: integer
          format: int32
        min_nominator:
          type: integer
          format: int32
        max_nominator:
          type: integer
          format: int32
    ApiExtraCurrency:
      type: object
      required:
        - id
        - amount
      properties:
        id:
          type: integer
          format: int64
        amount:
          type: string
          format: int128
  responses:
    ApiError:
      description: Some error during request processing
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      name: X-Api-Key
      in: header

````