prepare-swap-transaction
Generates an unsigned transaction for swapping tokens on the Osmosis blockchain, specifying pool ID, sender address, input token, minimum output, and slippage tolerance for secure swaps.
Instructions
Prepares an unsigned transaction for token swap
Input Schema
Name | Required | Description | Default |
---|---|---|---|
poolId | Yes | The ID of the liquidity pool | |
sender | Yes | The sender's Osmosis address | |
slippageTolerance | No | Slippage tolerance percentage (e.g., 0.01 for 1%) | |
tokenIn | Yes | ||
tokenOutMinAmount | Yes | Minimum amount of output token to receive |
Input Schema (JSON Schema)
{
"properties": {
"poolId": {
"description": "The ID of the liquidity pool",
"type": "string"
},
"sender": {
"description": "The sender's Osmosis address",
"type": "string"
},
"slippageTolerance": {
"description": "Slippage tolerance percentage (e.g., 0.01 for 1%)",
"type": "number"
},
"tokenIn": {
"properties": {
"amount": {
"description": "Amount to swap",
"type": "string"
},
"denom": {
"description": "Input token denomination",
"type": "string"
}
},
"required": [
"denom",
"amount"
],
"type": "object"
},
"tokenOutMinAmount": {
"description": "Minimum amount of output token to receive",
"type": "string"
}
},
"required": [
"poolId",
"sender",
"tokenIn",
"tokenOutMinAmount"
],
"type": "object"
}