Record a trade
record_tradeRecords a trade the user agreed to: pass the dealId from check_trade (preferred; then list each card's confirmed value in the same order) or the cards themselves, the value the user confirmed for EVERY line (the total for that line's quantity), and any cash in or out. An outgoing card bought through Deal Desk can be given by its purchase dealId. Show the user every value and the cash and pass confirm true after they confirm or edit each one. Outgoing cards leave the collection at their value; incoming cards join it with their value as cost (slab certNumber when visible). All or nothing: if one card can't be recorded nothing is, and the message names it. Trade values are estimates, kept apart from cash profit. If the result has alerts, show them to the user before anything else.
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": {
"confirm": "<confirm>"
},
"name": "record_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cashIn | No | Cash the user received in USD. | |
| dealId | No | The dealId from check_trade. | |
| cashOut | No | Cash the user paid in USD. | |
| confirm | Yes | True once the user said yes to every value and the cash; never set it before that. | |
| incoming | No | ||
| outgoing | No | ||
| idempotencyKey | No | A unique key for this record (any short text you make up once); a retry with the same key never records twice. |