market_close
Closes a metered deal's payment channel on the XRP Ledger and records it, returning unused funds to the buyer; seller closes immediately, buyer closes after the settle delay.
Instructions
Either party of a metered deal: close the payment channel on the ledger and record it; the unused rest returns to the buyer. The seller’s close is immediate; the buyer’s takes effect after the settle delay (or at once after the channel expires) — run it again then. Moves money: on mainnet pass yes=true only after the person you act for agrees.
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": {
"contract": "<contract>"
},
"name": "market_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as | No | Practice market only: act as this party id. | |
| yes | No | Confirms a mainnet money movement. | |
| demo | No | Use the practice market on this computer (nothing published, no real money). | |
| network | No | Which market (default testnet). Validate on testnet, then use mainnet (real XRP). | |
| contract | Yes | Contract id. |