CLI Reference
Transaction
CreatePool
Create a pool to market for trading.
A pool is tied to a single market and places orders to market based on the preset logic. Once a pool is created, liquidity providers can create positions.
Usage
Argument
Description
market-id
id of the market where the pool's order will be placed
price
initial pool price
Example
AddLiquidity
Add liquidity to existing position or make a new position.
Position(s) belong to a pool. Therefore, a pool must exist in order to create a position. Anyone can create a position with custom range.
Usage
Argument
Description
pool-id
pool id
lower-price
lower bound for price range of liquidity providing
upper-price
upper bound for price range of liquidity providing
desired-amount
deposit amounts of base and quote coins
Example
RemoveLiquidity
Withdraw coins from the liquidity providing position.
Withdrawal requests are typically processed in the order they are received, rather than being delayed until the end of a batch.
Usage
Argument
Description
position-id
position id
liquidity
amount of liquidity to be removed from the position
Example
Collect
Collect rewards accumulated in a position.
The reward consists of the swap fee and farming reward accumulated in the position.
Usage
Argument
Description
position-id
position id
amount
amounts of reward to be withdrawn
Example
CreatePrivateFarmingPlan
Create a new private farming plan.
The newly created plan's farming pool address is automatically generated and will have no balances in the account initially.
Manually send enough reward coins to the generated farming pool address to make sure that the rewards allocation happens.
The plan's termination address is set to the plan creator.
Argument
Description
description
a brief description of the plan
termination-address
address where the remaining farming rewards in the farming pool transferred when the plan is terminated
start-time
the time at which the plan begins, in RFC3339 format
end-time
the time at which the plan ends, in RFC3339 format
reward-allocations...
whitespace-separated list of the reward allocations
Example
TerminatePrivateFarmingPlan
Terminate a private farming plan.
The plan's termination address must be same with the message sender.
Usage
| Argument | Description | | |:------------------|:--------------- | | farming-plan-id | farming plan id |
Example
Query
Params
Query the current amm parameters information
Usage
Example
AllPools
Query for all pools
Usage
Example
Pool
Query details for the particular pool
Usage
Example
AllPositions
Query for all positions
Usage
Example
Position
Query details for the particular position
Usage
Example
AddLiquiditySimulation
Query expected result for add-liquidity
Usage
Example
RemoveLiquiditySimulation
Query expected result for remove-liquidity
Usage
Example
CollectibleCoins
Query collectible coins(fees, rewards) in the position.
Usage
Example
AllTickInfos
Query for information of all ticks in the particular pool
Usage
Example
TickInfo
Query details for the particular tick in the pool
Usage
Example
AllFarmingPlans
Query for all farming plans
Usage
Example
FarmingPlan
Query details for the particular farming plan
Usage
Example
Last updated