mallow docs

Buy raffle tickets

POST
/v2/tx/raffles/buy-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
x-api-key<token>

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"  }}