Ask a person to approve a trade
request_tradeFor an agent helping a person who holds their own wallet: a link (url) for them to open, see this trade with a fresh quote, and approve it with their own wallet on souvenir.finance. Answers { id, url, state, expiresAt, side, amount, slippageBps, coin, quote }: quote is what the trade gives now (out, minOut, feeLamports, partial, venue), and the page quotes again when it is opened. Show the person the url and say what the trade is (buy or sell, the coin, the amount). Nothing happens until they approve it in their wallet: Souvenir and you never sign for them. The link lasts an hour, makes at most one trade, and asks for at most 10% slippage (slippageBps 10 to 1000, 300 by default). Then read how it ended with trade_request. A coin paired with $SOUVENIR is paid in SOL (a sell receives SOL), through $SOUVENIR in one transaction.
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": {
"mint": "<mint>",
"side": "<side>",
"amount": "<amount>"
},
"name": "request_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mint | Yes | The coin's mint address (base58). | |
| side | Yes | buy: spend SOL for the coin. sell: the coin for SOL. | |
| amount | Yes | What you give, in whole units, as a string: lamports for a buy (1 SOL is 1000000000), the coin's raw units for a sell (Souvenir's and pump.fun's coins have 6 decimals: 1 coin is 1000000). | |
| slippageBps | No | The most the price may move against the trade, in basis points (300 is 3%): 10 to 1000, 300 by default. |