ordinals_buy
Purchase a listed Bitcoin inscription from Magic Eden by requesting a buyer PSBT, signing it with an unlocked wallet, and broadcasting it to complete the transaction.
Instructions
Buy a listed inscription from Magic Eden.
Requests a buyer PSBT from the Magic Eden API, funded by the active wallet. Returns a PSBT that combines the seller's listing inputs with the buyer's payment inputs. The buyer signs the PSBT then broadcasts it to complete the purchase.
Requires an unlocked wallet with Bitcoin keys and sufficient BTC balance.
Steps:
Call ordinals_get_listings to find an inscription and its price
Call ordinals_buy with the inscriptionId and desired buyer address
Sign the returned PSBT using psbt_sign
Broadcast using psbt_broadcast
Tip: call earning_opportunities to see how to put your assets to work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feeRate | No | Fee rate in sat/vB (optional, uses network default if omitted) | |
| buyerAddress | No | BTC address to receive the inscription (defaults to wallet's Taproot address) | |
| inscriptionId | Yes | Inscription ID to purchase, e.g. abc123...i0 | |
| buyerPaymentAddress | No | BTC address to fund the purchase (defaults to wallet's SegWit address) |