Quote a trade
quote_tradeWhat a buy or a sell of a Souvenir coin gives now, as the coin's page quotes it: { out, minOut, feeLamports, partial, venue }. out and minOut are the coin's raw units for a buy, lamports for a sell; minOut is the least you get at slippageBps. feeLamports is the trading fee (null on a pump.fun coin, where pump.fun takes it); partial, a buy larger than the curve has left (spent and refund say how much goes in). A coin paired with $SOUVENIR (get_coin's pair) trades in SOL the same way: one transaction swaps through $SOUVENIR, and keepsSouv, a little $SOUVENIR, stays in your wallet. pay: 'souvenir' trades it in $SOUVENIR you hold instead: the amount of a buy, and out and minOut of a sell, are then raw $SOUVENIR (6 decimals). Trading a coin, in order: (1) quote_trade to see what you would get; (2) build_trade with your wallet's address; (3) sign the transaction it answers with your wallet; (4) send_transaction, or send it yourself through any Solana RPC. No sign-in: your wallet's signature is the approval, and Souvenir never needs its private key. The same fees and limits as the coin's page on souvenir.finance. An agent helping a person, which can't sign with their wallet, uses request_trade instead and gives them the link to approve it with their own wallet.
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": "quote_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pay | No | What a coin paired with $SOUVENIR is paid in (a sell: what it receives): sol, the default, or souvenir. Any other coin takes sol only. | |
| mint | Yes | The coin's mint address (base58). | |
| side | Yes | buy: spend SOL for the coin. sell: the coin for SOL. With pay souvenir, $SOUVENIR in place of 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). With pay souvenir, a buy's is raw $SOUVENIR (6 decimals). | |
| slippageBps | No | The most the price may move against you before the trade refuses, in basis points (300 is 3%, the site's default). |