Buy raffle tickets
Builds a purchase of ticketCount tickets in raffle raffleKey, signed and paid for by buyer.
Returns 400 if the raffle has ended or sold out, or if the purchase would take the wallet past the raffle's per-wallet limit or 40% of all tickets. A holder-only raffle also requires the wallet to hold an eligible asset.
Authorization
ApiKeyAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Buys raffle tickets. For SOL-denominated raffles, wrapped-SOL setup instructions are prepended automatically.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v2/tx/raffles/buy-tickets" \ -H "Content-Type: application/json" \ -d '{ "buyer": "string", "raffleKey": "string", "ticketCount": 0 }'{ "result": { "tx": "string" }}Close refund claim POST
Builds a transaction that closes an empty refund claim and returns its rent to rentPayer, the wallet that paid it, who signs. Any refund left in the claim must be paid out first. Find claims with GET /v2/auctions/bid-refund-claims/{rentPayer}.
Cancel raffle POST
Builds a transaction cancelling raffle raffleKey and returning the prize to creator, who must have created it. Tickets already sold become refundable.