Price cells for an x402 payment
prepare_x402_orderPrice cells and return a ready-to-send x402 request (URL, method, headers, JSON body, exact amount). Nothing is reserved or charged. Send it with an x402 client (x402-fetch, x402-axios, @x402/fetch); it pays and creates the order in one request. Raise the client's max amount if the price is above its default cap (x402-fetch 0.10 USDC, @x402/fetch 1 USDC). Cells that already have an owner can be bought over at the overwrite price (get_wall_info prices.rule: the multiplier times the last price while the cell is inside its reset window, otherwise the empty-cell price); total_usd here, and the 402 of the returned request, state the exact amount. Areas map to the HTTP body as [y*1000+x, 0xRRGGBB] pairs.
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": {
"areas": "<areas>",
"accepted_terms": "<accepted_terms>"
},
"name": "prepare_x402_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| areas | Yes | One to 20 non-overlapping areas, each a rect + color and/or a list of cells with colours. | |
| owner | No | Public display name shown on the cells (max 40 characters). Default "anonymous". | |
| accepted_terms | Yes | Must be true: you accept the terms (https://cellionaire.com/terms). |