Build an unsigned swap
build_swapSame as quote, plus the unsigned transaction (to, data, value, chainId) for the taker's wallet to sign, and the approval it needs first when selling a token. Stoa never signs or sends anything.
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": {
"sellToken": "<sellToken>",
"buyToken": "<buyToken>",
"amount": "<amount>",
"taker": "<taker>"
},
"name": "build_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Network. Default robinhood. | |
| taker | Yes | The wallet that signs, pays and receives. | |
| amount | Yes | Amount to sell, integer in the sell token's smallest unit (wei). | |
| buyToken | Yes | Token to buy: a token address, or "native" for the gas token (ETH on Robinhood Chain, HYPE on Elysium). | |
| referrer | No | Optional wallet that earns 10% of Stoa's fee on this swap. | |
| sellToken | Yes | Token to sell: a token address, or "native" for the gas token (ETH on Robinhood Chain, HYPE on Elysium). | |
| slippageBps | No | Max slippage in basis points. Default 50. | |
| deadlineSeconds | No | Seconds until the transaction expires. Default 120. |