Open Position

1 Open Position

1.1 Function params

  • account: the signer of the user.

  • pool: the pool object.

  • tick_lower: the lower tick index for the pool.

  • tick_upper: the upper tick index for the pool.

1.2 Function

// tucana_clmm::router
public entry fun open_position(
    account: &signer,
    pool: Object<Pool>,
    tick_lower: u32,
    tick_upper: u32,
)

2 Open Position With Liquidity With All

1.1 Function params

  • account: the signer of the user.

  • pool: the pool object.

  • tick_lower: the lower tick index for the pool.

  • tick_upper: the upper tick index for the pool.

  • amount_a: the amount of coin a will be remove.

  • amount_b: the amount of coin b will be remove.

  • fix_amount_a: if true, fix the amount of coin a, then remove liquidity. the amount of coin b will be auto calculate by amount a and position tick range and liquidity.

1.2 Function

// tucana_clmm::router
public entry fun open_position_with_liquidity_with_all(
    account: &signer,
    pool: Object<Pool>,
    tick_lower: u32,
    tick_upper: u32,
    amount_a: u64,
    amount_b: u64,
    fix_amount_a: bool,
)

Last updated