create_stableswap_order
Swap pool collateral for an iAsset or redeem an iAsset for collateral, returning an unsigned CBOR transaction for client-side signing. Check pool details for collateral asset and minimum amounts.
Instructions
Submit a stableswap order: swap the pool collateral for iAsset (minting=true) or iAsset for the pool collateral (minting=false). Returns an unsigned transaction (CBOR hex) for client-side signing. See get_stableswap_pool for the collateral asset and minimum order amounts.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"address": "<address>",
"asset": "<asset>",
"amount": "<amount>",
"minting": "<minting>"
},
"name": "create_stableswap_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | Yes | iAsset name, e.g. iUSD | |
| amount | Yes | Amount to swap in the smallest unit of the asset being paid in: the collateral when minting, the iAsset when redeeming | |
| address | Yes | User Cardano bech32 address | |
| minting | Yes | true = collateral → iAsset (mint direction); false = iAsset → collateral (redeem direction) | |
| collateralAsset | No | Collateral asset of the pool: its token name (e.g. USDA), '<policyId>.<assetNameHex>', or ADA. Optional when the iAsset has a single stableswap pool, which is then used. |