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

# Open a New LP Position

> Initiate a new Liquidity Provider (LP) position by minting tokens.

This endpoint allows users to open a new LP position, enabling them to participate
in liquidity provision. The minting process involves creating a new position with
specified parameters, such as token amounts and pool details. The response will
confirm the successful creation of the LP position, providing users with the
necessary information to manage their newly minted position. This functionality is
crucial for users looking to expand their liquidity provision activities, offering
them the opportunity to engage in decentralized finance (DeFi) markets effectively.
                    <Info>
                    **Required Allowances**

                        In order to make this transaction, token allowances need to be set for the following contracts.

                     - `AerodromeSlipstreamNonfungiblePositionManager`
                    </Info>
                



## OpenAPI

````yaml /v1/combined_spec.json post /v1/aerodrome_slipstream/liquidity_provision/mint
openapi: 3.1.0
info:
  title: Compass API
  description: Compass Labs DeFi API
  version: 0.0.1
servers:
  - url: https://api.compasslabs.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v1/aerodrome_slipstream/liquidity_provision/mint:
    post:
      tags:
        - Aerodrome Slipstream
      summary: Open a New LP Position
      description: >-
        Initiate a new Liquidity Provider (LP) position by minting tokens.


        This endpoint allows users to open a new LP position, enabling them to
        participate

        in liquidity provision. The minting process involves creating a new
        position with

        specified parameters, such as token amounts and pool details. The
        response will

        confirm the successful creation of the LP position, providing users with
        the

        necessary information to manage their newly minted position. This
        functionality is

        crucial for users looking to expand their liquidity provision
        activities, offering

        them the opportunity to engage in decentralized finance (DeFi) markets
        effectively.
                            <Info>
                            **Required Allowances**

                                In order to make this transaction, token allowances need to be set for the following contracts.

                             - `AerodromeSlipstreamNonfungiblePositionManager`
                            </Info>
                        
      operationId: v1_aerodrome_slipstream_liquidity_provision_mint
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/AerodromeSlipstreamMintLiquidityProvisionRequest
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from compass_api_sdk import CompassAPI, models


            with CompassAPI(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as compass_api:

                res = compass_api.aerodrome_slipstream.aerodrome_slipstream_liquidity_provision_mint(token0="USDC", token1="USDT", tick_spacing=1, tick_lower=100, tick_upper=200, amount0_desired=0.01, amount1_desired=0, amount0_min=0, amount1_min=0, chain=models.AerodromeSlipstreamMintLiquidityProvisionRequestChain.BASE, sender="0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a", recipient="0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a", estimate_gas=True)

                # Handle response
                print(res)
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { CompassApiSDK } from "@compass-labs/api-sdk";

            const compassApiSDK = new CompassApiSDK({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await compassApiSDK.aerodromeSlipstream.aerodromeSlipstreamLiquidityProvisionMint({
                token0: "USDC",
                token1: "USDT",
                tickSpacing: 1,
                tickLower: 100,
                tickUpper: 200,
                amount0Desired: 0.01,
                amount1Desired: 0,
                amount0Min: 0,
                amount1Min: 0,
                recipient: "0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a",
                chain: "base",
                sender: "0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    AerodromeSlipstreamMintLiquidityProvisionRequest:
      properties:
        action_type:
          type: string
          const: AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION
          title: Action Type
          default: AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION
        token0:
          type: string
          title: Token
          description: The symbol or address of the first token in the pair.
          examples:
            - WETH
          default: USDC
        token1:
          type: string
          title: Token
          description: The symbol or address of the second token in the pair.
          examples:
            - USDC
          default: USDT
        tick_spacing:
          type: integer
          minimum: 1
          title: Tick Spacing
          description: The tick spacing of the pool
          examples:
            - 100
            - 300
            - 400
            - 500
            - 1000
            - 1500
            - 2500
            - 2700
            - 3000
            - 5000
            - 6000
            - 7000
            - 8000
            - 9000
            - 10000
            - 20000
          default: 1
        tick_lower:
          type: integer
          title: Tick Lower
          description: The lower tick of the range to mint the position in
          examples:
            - -1000
          default: 100
        tick_upper:
          type: integer
          title: Tick Upper
          description: The upper tick of the range to mint the position in
          examples:
            - 1000
          default: 200
        amount0_desired:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount0 Desired
          description: The desired amount of the first token to deposit
          examples:
            - '1.5'
          default: 0.01
        amount1_desired:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount1 Desired
          description: The desired amount of the second token to deposit
          examples:
            - '1.7'
          default: 0
        amount0_min:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount0 Min
          description: The minimum amount of the first token to deposit
          examples:
            - '1.4'
          default: 0
        amount1_min:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount1 Min
          description: The minimum amount of the second token to deposit
          examples:
            - '1.6'
          default: 0
        recipient:
          anyOf:
            - type: string
            - type: 'null'
          title: Recipient
          description: The address that will receive the LP tokens
          examples:
            - '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B'
          default: '0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a'
        chain:
          type: string
          enum:
            - base
          title: Chain
          default: base
          examples:
            - base
        sender:
          type: string
          title: Sender
          description: The address of the transaction sender.
          examples:
            - '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B'
          default: '0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a'
        estimate_gas:
          type: boolean
          title: Estimate Gas
          description: >-
            Determines whether to estimate gas costs for transactions, also
            verifying that the transaction can be successfully executed.
          default: true
      type: object
      required:
        - token0
        - token1
        - tick_spacing
        - tick_lower
        - tick_upper
        - amount0_desired
        - amount1_desired
        - amount0_min
        - amount1_min
        - chain
        - sender
      title: AerodromeSlipstreamMintLiquidityProvisionRequest
      description: Request model for minting a new liquidity position.
      default:
        sender: '0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a'
        chain: base
        token0: USDC
        token1: USDT
        tick_spacing: 1
        tick_lower: 100
        tick_upper: 200
        amount0_desired: 0.01
        amount1_desired: 0
        amount0_min: 0
        amount1_min: 0
        recipient: '0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a'
      required_allowances:
        - AerodromeSlipstreamNonfungiblePositionManager
    TransactionResponse:
      properties:
        transaction:
          anyOf:
            - $ref: '#/components/schemas/UnsignedTransaction'
            - $ref: '#/components/schemas/UserOperationResponse'
          title: Transaction
          description: >-
            The unsigned transaction data. User must sign and broadcast to
            network.
      type: object
      required:
        - transaction
      title: TransactionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UnsignedTransaction:
      properties:
        chainId:
          type: string
          title: Chainid
          description: The chain id of the transaction
        data:
          type: string
          title: Data
          description: The data of the transaction
        from:
          type: string
          title: From
          description: The sender of the transaction
        gas:
          anyOf:
            - type: string
            - type: 'null'
          title: Gas
          description: The gas of the transaction
        to:
          type: string
          title: To
          description: The recipient of the transaction
        value:
          type: string
          title: Value
          description: The value of the transaction
        nonce:
          type: string
          title: Nonce
          description: The nonce of the address
        maxFeePerGas:
          type: string
          title: Maxfeepergas
          description: The max fee per gas of the transaction
        maxPriorityFeePerGas:
          type: string
          title: Maxpriorityfeepergas
          description: The max priority fee per gas of the transaction
      type: object
      required:
        - chainId
        - data
        - from
        - gas
        - to
        - value
        - nonce
        - maxFeePerGas
        - maxPriorityFeePerGas
      title: UnsignedTransaction
      example:
        chainId: '0x2105'
        data: >-
          0x1688f0b900000000000000000000000029fcb43b46531bca003ddc8fcb67ffe91900c762000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000675f4a3d
        from: '0x4A83b4413CF41C3244027e1590E35a0F48403F0c'
        gas: '0x7a120'
        maxFeePerGas: '0x59682f00'
        maxPriorityFeePerGas: '0x3b9aca00'
        nonce: '0x5'
        to: '0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67'
        value: '0x0'
    UserOperationResponse:
      properties:
        to:
          type: string
          title: To
          description: The target contract address for the operation
        data:
          type: string
          title: Data
          description: The calldata for the operation
        value:
          type: string
          title: Value
          description: The ETH value to send with the operation
      type: object
      required:
        - to
        - data
        - value
      title: UserOperationResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Compass API Key. Get your key
        [here](https://www.compasslabs.ai/dashboard).

````