---
description: Raffle specific endpoints.
---

# Raffle info

{% hint style="info" %}
For query parameter `chain` see supported chains [here](..#supported-chains)
{% endhint %}

## Get ticket price

## Current ticket price

<mark style="color:blue;">`GET`</mark> `https://api.rpslabs/v1/ticket_price`

Returns current price of one ticket in wei

#### Query Parameters

| Name                                    | Type   | Description                            |
| --------------------------------------- | ------ | -------------------------------------- |
| chain<mark style="color:red;">\*</mark> | String | Blockchain hosting the raffle contract |

#### Headers

| Name                                            | Type | Description |
| ----------------------------------------------- | ---- | ----------- |
| Authorization<mark style="color:red;">\*</mark> |      | API Key     |

{% tabs %}
{% tab title="200: OK Success" %}
```json
{
    "ticket_price": "50000000000000000"
}
```
{% endtab %}

{% tab title="500: Internal Server Error Internal Server Error" %}
```json
{
    "message": "INTERNAL_SERVER_ERROR",
    "code": 500
}
```
{% endtab %}

{% tab title="400: Bad Request Incorrect Chain" %}
```json
{
    "message": "INCORRECT_CHAIN",
    "code": 400
}
```
{% endtab %}
{% endtabs %}

## Potential ticket amount

## Potential ticket amount

<mark style="color:blue;">`GET`</mark> `https://api.rpslabs/v1/potential_ticket`

Returns an amount of tickets that `fee` and `multiplier` of a certain action would give to a user.

#### Query Parameters

| Name                                         | Type    | Description                            |
| -------------------------------------------- | ------- | -------------------------------------- |
| chain<mark style="color:red;">\*</mark>      | String  | Blockchain hosting the raffle contract |
| fee<mark style="color:red;">\*</mark>        | Integer | Action fee in `wei`                    |
| multiplier<mark style="color:red;">\*</mark> | Integer | Ticket multiplier for certain user     |

{% tabs %}
{% tab title="200: OK Success" %}
```json
{
    "ticket_amount": 50
}
```
{% endtab %}

{% tab title="400: Bad Request Incorrect Chain" %}
```json
{
    "message": "INCORRECT_CHAIN",
    "code": 400
}
```
{% endtab %}

{% tab title="500: Internal Server Error Internal Server Error" %}
```json
{
    "message": "INTERNAL_SERVER_ERROR",
    "code": 500
}
```
{% endtab %}
{% endtabs %}

