Trade economics check
trade_checkDeterministic pre-trade economics check for a long (buy) round trip. Call it before placing a trade: given size, entry/exit reference prices, maker/taker roles, fees, spread and slippage, it returns whether the trade still clears after all costs (result.economically_clears, result.reason), the net P&L and return, a per-leg cost breakdown, the break-even and minimum profitable exit prices, and every assumption applied. No predictions, no market data, no execution. Costs 1 prepaid credit per successful check; invalid input costs nothing. Requires "Authorization: Bearer smk_..." (get a key at https://smolabot.arison8.com).
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": {
"symbol": "<symbol>",
"side": "<side>",
"size": "<size>",
"entry_price": "<entry_price>",
"exit_price": "<exit_price>",
"entry_liquidity": "<entry_liquidity>",
"exit_liquidity": "<exit_liquidity>",
"maker_fee_bps": "<maker_fee_bps>",
"taker_fee_bps": "<taker_fee_bps>",
"spread_bps": "<spread_bps>",
"slippage_bps": "<slippage_bps>"
},
"name": "trade_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | Long-only: "buy". Shorts are rejected with SIDE_NOT_SUPPORTED. | |
| size | Yes | Exactly one of quantity (base units) or notional (quote currency, at the entry reference price). | |
| symbol | Yes | Label only; does not affect the math. | |
| exit_price | Yes | Expected exit reference (mid) price, before spread, slippage and fees. | |
| spread_bps | Yes | FULL bid/ask spread in bps; a taker leg pays half. | |
| entry_price | Yes | Entry reference (mid) price, before spread, slippage and fees. | |
| slippage_bps | Yes | Adverse slippage per taker leg, in bps. | |
| maker_fee_bps | Yes | ||
| taker_fee_bps | Yes | ||
| exit_liquidity | Yes | ||
| entry_liquidity | Yes | ||
| profit_buffer_bps | No | Optional required net return in bps; omitted means 0 (echoed in assumptions). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | Present when ok=false. Stable machine-readable code; field-level `errors` for VALIDATION_FAILED. | |
| usage | Yes | ||
| result | No | Present when ok=true: the canonical /check result. | |
| request_id | Yes | ||
| model_version | Yes | Calculation model version. Same version + same input = same output. |