swarmtrade_transition_trade
Transition a trade to its next state in the negotiation protocol, such as accepted or rejected, using optimistic concurrency control with version numbers.
Instructions
Advance a trade to its next state in the negotiation protocol. Requires the current version for optimistic concurrency.
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": {
"trade_id": "<trade_id>",
"next_state": "<next_state>",
"from_version": "<from_version>"
},
"name": "swarmtrade_transition_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trade_id | Yes | The trade/handshake ID | |
| next_state | Yes | Target state (e.g. "accepted", "countered", "rejected", "escrowed", "delivery_confirmed", "settled") | |
| from_version | Yes | Current version number of the trade (for optimistic concurrency control) | |
| quote | No | Quote details if transitioning with a price change (trade_value, currency, terms) |