> For the complete documentation index, see [llms.txt](https://docs.swappi.io/swappi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swappi.io/swappi/products/lottery/getting-your-ticket.md).

# Getting Your Ticket

To buy a Swappi Loterry ticket:&#x20;

1. Go to Swappi.
2. In Swappi, go to Lottery.
3. In Swappi Lottery, click **Get Ticket**.
4. In the Buy Tickets dialog, enter the number of tickets that you want to buy. In this case, we'll buy 1 ticket.\
   The cost of those ticket is displayed next to Cost. In this case, the cost of our ticket is about 83 PPI.
5. Click Approve to approve Swappi Lottery to spend PPI on your behalf.
6. In the MetaMask dialog, click Confirm.
7. Now let's choose our lucky lottery numbers! Click **View/Edit Numbers**. Optionally, you can click **Buy Instantly** and skip to step 10.
8. In Edit Numbers, see the ticket number that you got. If you want a new lottery number of numbers, click **Randomize**, until you get a lottery number that makes you feel lucky.
9. Once you're ready, click **Confirm & Buy**.
10. In the MetaMask notification, click **Confirm** to confirm the purchase of your lottery ticket(s).

You have successfully bought a ticket for Swappi Lottery, now go have fun!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.swappi.io/swappi/products/lottery/getting-your-ticket.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
