preview_trade
Simulate a token trade to estimate output before executing on Basis protocol.
Instructions
Preview a buy or sell without executing.
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": "<token>",
"direction": "<direction>"
},
"name": "preview_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Token name or address | |
| amount_usdb | No | USDB amount (for buys) | |
| amount_token | No | Token amount (for sells) | |
| direction | Yes | 'buy' or 'sell' |