Buy or sell at market (unsigned txs)
market_tradeBuild a market buy or sell of a listed stock token on The River's best-execution route (the same route as the site's trade ticket: KyberSwap across DEX pools, else the token's listed pool). A buy says what it spends (spend, base units of USDC/USDG); a sell says what it sells (quantity, base units of the token). Returns the quote (price, minimum out after slippage, fee, venue) and an exact approve only when the allowance is short, then the swap. slippageBps defaults to 100 (1%). Returns unsigned transactions for the user to sign in their own wallet, in order; nothing is sent or signed here.
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": {
"chainId": "<chainId>",
"owner": "<owner>",
"side": "<side>",
"token": "<token>"
},
"name": "market_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | ||
| owner | Yes | 0x... address | |
| spend | No | Buy only: base units to spend, e.g. "25000000" = 25 USDC | |
| token | Yes | The stock token, 0x... | |
| chainId | Yes | 8453 Base, 4663 Robinhood Chain | |
| quantity | No | Sell only: token base units to sell | |
| slippageBps | No |