Build a swap to sign
build_swapThe transactions that make a swap from wallet, for that wallet to sign and send in order: an approval of exactly the amount sold when ScroogeRouter needs one, then the swap, which pays the output to the same wallet. The swap is simulated from the wallet where it can be. Nothing is signed or sent by this tool. Send within a couple of minutes, or build again.
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": {
"token_in": "<token_in>",
"token_out": "<token_out>",
"amount": "<amount>",
"wallet": "<wallet>"
},
"name": "build_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | How much of token_in to sell, as a decimal number such as 0.5 | |
| wallet | Yes | The address that will sign and send the transactions, and receive the output | |
| token_in | Yes | What is sold: a symbol (ETH, USDG, SCROOGE, NVDA…) or a contract address on Robinhood Chain | |
| token_out | Yes | What is bought: a symbol (ETH, USDG, SCROOGE, NVDA…) or a contract address on Robinhood Chain | |
| slippage_bps | No | Optional: the most the price may move before the swap reverts, in basis points (default 50 = 0.5%, at most 300 = 3% unless allow_high_slippage) | |
| allow_high_slippage | No | Optional: allow slippage up to 1000 basis points (10%); leave it off unless a thin market needs it |