Prepare a trade
phlece_prepare_tradeBuilds the transactions to buy or sell a Phlece coin from a given wallet (with payWith, a buy paid in another Arc coin, routed in one transaction): any one-time approvals first, then the swap with a minimum output. Checks the balance and, when no approval is needed, simulates the swap on Arc. Returns unsigned transactions in order; the caller's wallet signs and sends them. Nothing is sent by this tool.
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": {
"wallet": "<wallet>",
"coin": "<coin>",
"side": "<side>",
"amount": "<amount>"
},
"name": "phlece_prepare_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | The coin's 0x address or its ticker (for example PHLECE or $PHLECE). | |
| side | Yes | ||
| amount | Yes | For a buy, the coin to spend (the paired coin, or payWith); for a sell, the coins to sell. A decimal string. | |
| wallet | Yes | The wallet that will sign and send, as a 0x address. | |
| payWith | No | Buys only: pay with a coin other than the pair, in one transaction. EURC, GBPA, cirBTC, WETH or XAUM, another Phlece coin with the same pair (ticker or address), or any token address with a Uniswap v3 pool against the pair. The route goes through the pool that gives the most coins. Omit to pay with the pair. | |
| slippageBps | No | Default 250 (2.5%). |