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.
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) |