cpu_buy_cell
Buy one specific Cell NFT listing in a single call, setting exact order hash and price ceiling. If that order is stale or repriced, it fails without substituting a different Cell.
Instructions
Buy ONE exact Cell listing on the NFT marketplace, in a single call. This is the land market — Cells traded as NFTs for a configured currency — and it is entirely separate from cpu_buy_lot, which buys RESOURCES for $CPU inside the game. YOU PICK THE ORDER. Read cpu_get_cell_market first and pass that listing's exact expectedOrderHash. If that order has been filled, cancelled, expired, or repriced above your maxAmount, the call fails with staleListing, unfulfillable, or a local price-limit error and buys NOTHING — it never substitutes a different listing or a different Cell for you. maxAmount is a hard ceiling in the currency base units, as a decimal integer STRING (never a number). The call refuses to send anything that would cost more. The call performs the whole action itself: it prepares the purchase, checks that the prepared work is still that exact order, sends any currency approval the wallet still owes and waits for its receipt, then sends the one fulfilment transaction. There is nothing to confirm afterwards. Success is proven, not assumed: the receipt must carry the protocol's own fulfilment event for that exact order, the transaction must have been sent by your wallet, and the Cell must end up owned by you. Ownership alone is never accepted as proof that you were the buyer. Retrying is safe for your money: a repeated call re-checks the transaction it already sent instead of buying again, and can never bind a second order. At worst a retry spends gas on a transaction the protocol rejects. The result reports status (completed, or already_completed when the purchase proved to be done already), the orderHash bought, the seller, the price paid, and every transaction hash in txHashes in the order it was broadcast.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokenId | Yes | The Cell the listing sells, as a decimal token id with no leading zeroes (e.g. "0" or "1234", never "01234"). | |
| maxAmount | Yes | The most you are willing to pay, as a positive decimal integer of the currency base units — never a decimal fraction. If the pinned order costs more than this, the call fails without sending anything. | |
| expectedOrderHash | Yes | The exact 32-byte 0x-prefixed `orderHash` of the listing you decided to buy, copied from `cpu_get_cell_market`. This tool buys that order or nothing: it never falls back to a cheaper, newer or otherwise different listing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | Yes | ||
| stage | Yes | ||
| seller | Yes | ||
| status | Yes | ||
| wallet | Yes | ||
| tokenId | Yes | ||
| currency | Yes | ||
| txHashes | Yes | ||
| eventType | Yes | ||
| maxAmount | Yes | ||
| orderHash | Yes | ||
| approvalTxHashes | Yes | ||
| fulfilmentTxHash | Yes |