# API

## Get SMOY Price and TVL

<mark style="color:blue;">`GET`</mark> `https://api.samoyedfinance.app/quote/info`

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "price": 0.02137,
  "bnbPrice": 400.7752,
  "tvl": 166168.7684,
  "currency": "USD"
}
```

{% endtab %}
{% endtabs %}

## Get Raffle information

<mark style="color:blue;">`GET`</mark> `https://api.samoyedfinance.app/quote/raffle`

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
"data": {
"balance": 0,
"balanceUSD": 0,
"currency": "BNB",
"vaults": [],
"minRaffleAmount": 0.01,
"minVaultAmount": 0.003,
"minVaultCount": 2,
"raffle": "https://bscscan.com/address/0xcF586d88EcA628d2F62791352Fb36DBDA3B0514e#writeContract",
"winner": null
}
}
```

{% endtab %}
{% endtabs %}

## Get Vaults information

<mark style="color:blue;">`GET`</mark> `https://api.samoyedfinance.app/quote/vault`

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
"data": [
{
"symbol": "SMOY",
"tvl": 1929.6695,
"pendingReward": 0.0073,
"strategy": "https://bscscan.com/address/0xa1B0A2c8e71A7EB620f326DC14aDb0fD0785FdbC#writeContract",
"helper": "https://bscscan.com/address/0x89d7dDcaf8C7d8F4506925b242cfF5b6452f8b55"
},
{
"symbol": "BNB-BUSD",
"tvl": 11547.4345,
"pendingReward": 0.1326,
"strategy": "https://bscscan.com/address/0xB8a4874c44F1ED9B952EAbD9bC42e37e3B675732#writeContract",
"helper": "https://bscscan.com/address/0x85ACfa6EFe7d536c19A30fD154F1f8BA02bAc5fB"
},
{
"symbol": "AVAX-BNB",
"tvl": 604.0903,
"pendingReward": 7.9726,
"strategy": "https://bscscan.com/address/0x7eF609439e71AdE6dfc39450F0C0Ba20dF7E531d#writeContract",
"helper": "https://bscscan.com/address/0x85ACfa6EFe7d536c19A30fD154F1f8BA02bAc5fB"
},
{
"symbol": "GALA-BNB",
"tvl": 120.7482,
"pendingReward": 2.1597,
"strategy": "https://bscscan.com/address/0xD5266B69AFcc8dAFcb4492387Ba6c24dB6c28Cad#writeContract",
"helper": "https://bscscan.com/address/0x85ACfa6EFe7d536c19A30fD154F1f8BA02bAc5fB"
},
{
"symbol": "MATIC-BNB",
"tvl": 350.0697,
"pendingReward": 4.1093,
"strategy": "https://bscscan.com/address/0x30dF67a616EB1b2DB7BB6983580CBA4F0F58BEcE#writeContract",
"helper": "https://bscscan.com/address/0x85ACfa6EFe7d536c19A30fD154F1f8BA02bAc5fB"
},
{
"symbol": "USDT-BUSD",
"tvl": 151.1108,
"pendingReward": 0.4965,
"strategy": "https://bscscan.com/address/0x833c3761a57D0b706b4C7676270981c8A67157E0#writeContract",
"helper": "https://bscscan.com/address/0x85ACfa6EFe7d536c19A30fD154F1f8BA02bAc5fB"
}
],
"currency": "USD"
}
```

{% endtab %}
{% endtabs %}

## Get SMOY Price

<mark style="color:blue;">`GET`</mark> `https://api.samoyedfinance.app/quote/price`

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "smoy": 0.02137,
  "bnb": 400.7752,
  "eth": 2580.4651,
  "btc": 36313.5233,
  "currency": "USD"
}
```

{% endtab %}
{% endtabs %}

## Get Token

<mark style="color:green;">`POST`</mark> `https://api.samoyedfinance.app/auth/login`

Pls contact us if you need a credential

#### Query Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| username<mark style="color:red;">\*</mark> | string |             |
| password<mark style="color:red;">\*</mark> | string |             |

{% tabs %}
{% tab title="200 token is valid for 365 days" %}

```
{
    "success": true,
    "message": "Authentication successful",
    "user": {
        "username": "foo"
    },
    "token": "YOUR_TOKEN",
    "expirationDate": 1663241111
}
```

{% endtab %}

{% tab title="404 " %}

```
{    "message": "Error message"}
```

{% endtab %}
{% endtabs %}

## List all user's NFTs

<mark style="color:blue;">`GET`</mark> `https://api.samoyedfinance.app/nft/:account`

#### Path Parameters

| Name                                      | Type   | Description        |
| ----------------------------------------- | ------ | ------------------ |
| account<mark style="color:red;">\*</mark> | string | BSC wallet address |

{% tabs %}
{% tab title="200 " %}

```
{
    "godfathers": [
        {
            "seasonNumber": 1,
            "ticketType": 6,
            "rarity": 1,
            "ticketNumber": 4649880
        },
        {
            "seasonNumber": 1,
            "ticketType": 6,
            "rarity": 1,
            "ticketNumber": 4619803
        },
        {
            "seasonNumber": 1,
            "ticketType": 6,
            "rarity": 1,
            "ticketNumber": 385480
        }
    ],
    "puppys": [
        {
            "seasonNumber": 1,
            "ticketType": 2,
            "pack": 0,
            "ticketNumber": 4
        },
        {
            "seasonNumber": 1,
            "ticketType": 2,
            "pack": 0,
            "ticketNumber": 12
        }
    ]
}
```

{% endtab %}

{% tab title="500 " %}

```
{
    "error": {
        "status": 500,
        "message": "invalid address (argument=\"address\", value=\"0xad7a593f7ea7730f437accadc1846115eb9a2993s\", code=INVALID_ARGUMENT, version=address/5.4.0) (argument=\"owner\", value=\"0xad7a593f7ea7730f437accadc1846115eb9a2993s\", code=INVALID_ARGUMENT, version=abi/5.4.1)"
    }
}
```

{% endtab %}
{% endtabs %}

## Get Godfather image

<mark style="color:blue;">`GET`</mark> `https://api.samoyedfinance.app/nft/godfather/:ticketNumber`

public access

#### Path Parameters

| Name                                           | Type   | Description |
| ---------------------------------------------- | ------ | ----------- |
| ticketNumber<mark style="color:red;">\*</mark> | number |             |

#### Query Parameters

| Name                                     | Type   | Description          |
| ---------------------------------------- | ------ | -------------------- |
| size<mark style="color:red;">\*</mark>   | string | small, medium, large |
| rarity<mark style="color:red;">\*</mark> | number | Number 1 to 6        |

{% tabs %}
{% tab title="200 " %}

```
byte64
```

{% endtab %}

{% tab title="400 " %}

```
{
    "message": "rarity is required"
}
or
{
    "message": "Incorrect size, only small, medium, large"
}
```

{% endtab %}
{% endtabs %}

## Get Puppy image

<mark style="color:blue;">`GET`</mark> `https://api.samoyedfinance.app/nft/puppy/:ticketNumber`

public access

#### Path Parameters

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

#### Query Parameters

| Name                                   | Type   | Description          |
| -------------------------------------- | ------ | -------------------- |
| size<mark style="color:red;">\*</mark> | string | small, medium, large |
| pack                                   | number | greater than 0       |

{% tabs %}
{% tab title="200 " %}

```
byte64
```

{% endtab %}

{% tab title="400 " %}

```
{
    "message": "rarity is required"
}
or
{
    "message": "Incorrect size, only small, medium, large"
}
```

{% endtab %}
{% endtabs %}

## Get Godfather info

<mark style="color:blue;">`GET`</mark> `https://api.samoyedfinance.app/nft/godfather/:ticketNumber/info`

#### Path Parameters

| Name                                           | Type   | Description |
| ---------------------------------------------- | ------ | ----------- |
| ticketNumber<mark style="color:red;">\*</mark> | number |             |

#### Query Parameters

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | string |             |

{% tabs %}
{% tab title="200 " %}

```
{
    "seasonNumber": 1,
    "ticketType": 6,
    "rarity": 1,
    "ticketNumber": 143597
}
```

{% endtab %}
{% endtabs %}

## Get Puppy info

<mark style="color:blue;">`GET`</mark> `https://api.samoyedfinance.app/nft/puppy/:ticketNumber/info`

#### Path Parameters

| Name                                           | Type   | Description |
| ---------------------------------------------- | ------ | ----------- |
| ticketNumber<mark style="color:red;">\*</mark> | number |             |

#### Query Parameters

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | string |             |

{% tabs %}
{% tab title="200 " %}

```
{
    "seasonNumber": 1,
    "ticketType": 2,
    "pack": 0,
    "ticketNumber": 18
}
```

{% endtab %}
{% endtabs %}

## Logout

<mark style="color:green;">`POST`</mark> `https://api.samoyedfinance.app/auth/logout`

{% tabs %}
{% tab title="200 " %}

```
{}
```

{% endtab %}
{% endtabs %}

## Server status

<mark style="color:blue;">`GET`</mark> `https://api.samoyedfinance.app/auth/server_status`

{% tabs %}
{% tab title="200 " %}

```
{
    "online": true
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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://docs.samoyedfinance.app/resource/api.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.
