> For the complete documentation index, see [llms.txt](https://trident-cas.sabn.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trident-cas.sabn.xyz/api/sweepstake.md).

# Sweepstake

Use these endpoints to access sweepstake configuration and calculation logic.

**Base Path**: `/sweepstake`

***

### Endpoints

#### 1. GET `/sweepstake/value`

Retrieves the current configured value for "USD to Sweepstake Balance" conversion.

**Response**

```json
{
  "value": number
}
```

**Example**

**Request:**

```bash
GET /sweepstake/value
```

**Response:**

```json
{
    "value": 1.66
}
```

***

#### 2. GET `/sweepstake/calc-deposit`

Calculates the sweepstake balance equivalent for a given USD deposit amount based on the current configuration.

**Query Parameters**

| Parameter | Type   | Required | Description                               |
| --------- | ------ | -------- | ----------------------------------------- |
| `amount`  | number | Yes      | The USD deposit amount to calculate from. |

**Response**

```json
{
  "value": number
}
```

**Error Responses**

* **400 Bad Request**: If `amount` is missing or not a valid number.
* **500 Internal Server Error**: If an error occurs during calculation.

**Example**

**Request:**

```bash
GET /sweepstake/calc-deposit?amount=100
```

**Response:**

```json
{
    "value": 60.24
}
```


---

# 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:

```
GET https://trident-cas.sabn.xyz/api/sweepstake.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
