tapp_swap_clmm
Perform a token swap on a Concentrated Liquidity Market Maker (CLMM) pool using specified input amount, minimum output, direction, and target price. Execute trades efficiently within the Tapp Exchange ecosystem.
Instructions
Execute a swap on a CLMM (Concentrated Liquidity Market Maker) pool
Input Schema
Name | Required | Description | Default |
---|---|---|---|
a2b | Yes | Direction of the swap; true for token A to B, false for B to A | |
amountIn | Yes | The input token amount for the swap | |
fixedAmountIn | No | Indicates whether amountIn is fixed (defaults to true) | |
minAmountOut | Yes | The minimum acceptable output amount | |
poolId | Yes | The address of the CLMM pool | |
targetSqrtPrice | Yes | The target square root price |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"a2b": {
"description": "Direction of the swap; true for token A to B, false for B to A",
"type": "boolean"
},
"amountIn": {
"description": "The input token amount for the swap",
"type": "number"
},
"fixedAmountIn": {
"description": "Indicates whether amountIn is fixed (defaults to true)",
"type": "boolean"
},
"minAmountOut": {
"description": "The minimum acceptable output amount",
"type": "number"
},
"poolId": {
"description": "The address of the CLMM pool",
"type": "string"
},
"targetSqrtPrice": {
"description": "The target square root price",
"type": "number"
}
},
"required": [
"poolId",
"amountIn",
"minAmountOut",
"a2b",
"targetSqrtPrice"
],
"type": "object"
}